Phase 1A: Rename package to @vcg/agent-sdk and class to VCGAgentSDK
- Rename npm package from open-multi-agent to @vcg/agent-sdk - Rename OpenMultiAgent class to VCGAgentSDK in orchestrator - Add deprecated OpenMultiAgent re-export alias for backward compat - Update all doc comments and JSDoc references - Update all 4 example files to use new imports https://claude.ai/code/session_012cMotoivyjuMwbrnDo6YRg
This commit is contained in:
parent
6cc5545d6e
commit
fb97f273a4
|
|
@ -11,14 +11,14 @@
|
||||||
* ANTHROPIC_API_KEY env var must be set.
|
* ANTHROPIC_API_KEY env var must be set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { OpenMultiAgent, Agent, ToolRegistry, ToolExecutor, registerBuiltInTools } from '../src/index.js'
|
import { VCGAgentSDK, Agent, ToolRegistry, ToolExecutor, registerBuiltInTools } from '../src/index.js'
|
||||||
import type { OrchestratorEvent } from '../src/types.js'
|
import type { OrchestratorEvent } from '../src/types.js'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Part 1: Single agent via OpenMultiAgent (simplest path)
|
// Part 1: Single agent via OpenMultiAgent (simplest path)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
const orchestrator = new OpenMultiAgent({
|
const orchestrator = new VCGAgentSDK({
|
||||||
defaultModel: 'claude-sonnet-4-6',
|
defaultModel: 'claude-sonnet-4-6',
|
||||||
onProgress: (event: OrchestratorEvent) => {
|
onProgress: (event: OrchestratorEvent) => {
|
||||||
if (event.type === 'agent_start') {
|
if (event.type === 'agent_start') {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
* ANTHROPIC_API_KEY env var must be set.
|
* ANTHROPIC_API_KEY env var must be set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { OpenMultiAgent } from '../src/index.js'
|
import { VCGAgentSDK } from '../src/index.js'
|
||||||
import type { AgentConfig, OrchestratorEvent } from '../src/types.js'
|
import type { AgentConfig, OrchestratorEvent } from '../src/types.js'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
@ -100,7 +100,7 @@ function handleProgress(event: OrchestratorEvent): void {
|
||||||
// Orchestrate
|
// Orchestrate
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
const orchestrator = new OpenMultiAgent({
|
const orchestrator = new VCGAgentSDK({
|
||||||
defaultModel: 'claude-sonnet-4-6',
|
defaultModel: 'claude-sonnet-4-6',
|
||||||
maxConcurrency: 1, // run agents sequentially so output is readable
|
maxConcurrency: 1, // run agents sequentially so output is readable
|
||||||
onProgress: handleProgress,
|
onProgress: handleProgress,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
* ANTHROPIC_API_KEY env var must be set.
|
* ANTHROPIC_API_KEY env var must be set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { OpenMultiAgent } from '../src/index.js'
|
import { VCGAgentSDK } from '../src/index.js'
|
||||||
import type { AgentConfig, OrchestratorEvent, Task } from '../src/types.js'
|
import type { AgentConfig, OrchestratorEvent, Task } from '../src/types.js'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
@ -95,7 +95,7 @@ function handleProgress(event: OrchestratorEvent): void {
|
||||||
// Build the pipeline
|
// Build the pipeline
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
const orchestrator = new OpenMultiAgent({
|
const orchestrator = new VCGAgentSDK({
|
||||||
defaultModel: 'claude-sonnet-4-6',
|
defaultModel: 'claude-sonnet-4-6',
|
||||||
maxConcurrency: 2, // allow test + review to potentially run in parallel later
|
maxConcurrency: 2, // allow test + review to potentially run in parallel later
|
||||||
onProgress: handleProgress,
|
onProgress: handleProgress,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import { OpenMultiAgent, defineTool } from '../src/index.js'
|
import { VCGAgentSDK, defineTool } from '../src/index.js'
|
||||||
import type { AgentConfig, OrchestratorEvent } from '../src/types.js'
|
import type { AgentConfig, OrchestratorEvent } from '../src/types.js'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "open-multi-agent",
|
"name": "@vcg/agent-sdk",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Production-grade multi-agent orchestration framework. Model-agnostic, supports team collaboration, task scheduling, and inter-agent communication.",
|
"description": "VCG Agent SDK — turnkey multi-agent framework for international applications.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
||||||
15
src/index.ts
15
src/index.ts
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview open-multi-agent — public API surface.
|
* @fileoverview @vcg/agent-sdk — public API surface.
|
||||||
*
|
*
|
||||||
* Import from `'open-multi-agent'` to access everything you need:
|
* Import from `'@vcg/agent-sdk'` to access everything you need:
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* import { OpenMultiAgent, Agent, Team, defineTool } from 'open-multi-agent'
|
* import { VCGAgentSDK, Agent, Team, defineTool } from '@vcg/agent-sdk'
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* ## Quickstart
|
* ## Quickstart
|
||||||
*
|
*
|
||||||
* ### Single agent
|
* ### Single agent
|
||||||
* ```ts
|
* ```ts
|
||||||
* const orchestrator = new OpenMultiAgent({ defaultModel: 'claude-opus-4-6' })
|
* const orchestrator = new VCGAgentSDK({ defaultModel: 'claude-opus-4-6' })
|
||||||
* const result = await orchestrator.runAgent(
|
* const result = await orchestrator.runAgent(
|
||||||
* { name: 'assistant', model: 'claude-opus-4-6' },
|
* { name: 'assistant', model: 'claude-opus-4-6' },
|
||||||
* 'Explain monads in one paragraph.',
|
* 'Explain monads in one paragraph.',
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
*
|
*
|
||||||
* ### Multi-agent team (auto-orchestrated)
|
* ### Multi-agent team (auto-orchestrated)
|
||||||
* ```ts
|
* ```ts
|
||||||
* const orchestrator = new OpenMultiAgent()
|
* const orchestrator = new VCGAgentSDK()
|
||||||
* const team = orchestrator.createTeam('writers', {
|
* const team = orchestrator.createTeam('writers', {
|
||||||
* name: 'writers',
|
* name: 'writers',
|
||||||
* agents: [
|
* agents: [
|
||||||
|
|
@ -54,7 +54,10 @@
|
||||||
// Orchestrator (primary entry point)
|
// Orchestrator (primary entry point)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
export { OpenMultiAgent } from './orchestrator/orchestrator.js'
|
export { VCGAgentSDK } from './orchestrator/orchestrator.js'
|
||||||
|
|
||||||
|
/** @deprecated Use {@link VCGAgentSDK} instead. Will be removed in a future release. */
|
||||||
|
export { VCGAgentSDK as OpenMultiAgent } from './orchestrator/orchestrator.js'
|
||||||
export { Scheduler } from './orchestrator/scheduler.js'
|
export { Scheduler } from './orchestrator/scheduler.js'
|
||||||
export type { SchedulingStrategy } from './orchestrator/scheduler.js'
|
export type { SchedulingStrategy } from './orchestrator/scheduler.js'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* import { createAdapter } from './adapter.js'
|
* import { createAdapter } from '@vcg/agent-sdk'
|
||||||
*
|
*
|
||||||
* const anthropic = createAdapter('anthropic')
|
* const anthropic = createAdapter('anthropic')
|
||||||
* const openai = createAdapter('openai', process.env.OPENAI_API_KEY)
|
* const openai = createAdapter('openai', process.env.OPENAI_API_KEY)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* import { OpenAIAdapter } from './openai.js'
|
* import { OpenAIAdapter } from '@vcg/agent-sdk'
|
||||||
*
|
*
|
||||||
* const adapter = new OpenAIAdapter()
|
* const adapter = new OpenAIAdapter()
|
||||||
* const response = await adapter.chat(messages, {
|
* const response = await adapter.chat(messages, {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview OpenMultiAgent — the top-level multi-agent orchestration class.
|
* @fileoverview VCGAgentSDK — the top-level multi-agent orchestration class.
|
||||||
*
|
*
|
||||||
* {@link OpenMultiAgent} is the primary public API of the open-multi-agent framework.
|
* {@link VCGAgentSDK} is the primary public API of the @vcg/agent-sdk framework.
|
||||||
* It ties together every subsystem:
|
* It ties together every subsystem:
|
||||||
*
|
*
|
||||||
* - {@link Team} — Agent roster, shared memory, inter-agent messaging
|
* - {@link Team} — Agent roster, shared memory, inter-agent messaging
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
* ## Quick start
|
* ## Quick start
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* const orchestrator = new OpenMultiAgent({ defaultModel: 'claude-opus-4-6' })
|
* const orchestrator = new VCGAgentSDK({ defaultModel: 'claude-opus-4-6' })
|
||||||
*
|
*
|
||||||
* const team = orchestrator.createTeam('research', {
|
* const team = orchestrator.createTeam('research', {
|
||||||
* name: 'research',
|
* name: 'research',
|
||||||
|
|
@ -39,6 +39,8 @@
|
||||||
* dependents remain `'blocked'` indefinitely; all non-dependent tasks continue.
|
* dependents remain `'blocked'` indefinitely; all non-dependent tasks continue.
|
||||||
* - **Progress callbacks** — Callers can pass `onProgress` in the config to receive
|
* - **Progress callbacks** — Callers can pass `onProgress` in the config to receive
|
||||||
* structured {@link OrchestratorEvent}s without polling.
|
* structured {@link OrchestratorEvent}s without polling.
|
||||||
|
*
|
||||||
|
* @module @vcg/agent-sdk
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -330,16 +332,16 @@ async function buildTaskPrompt(task: Task, team: Team): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// OpenMultiAgent
|
// VCGAgentSDK
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top-level orchestrator for the open-multi-agent framework.
|
* Top-level orchestrator for the @vcg/agent-sdk framework.
|
||||||
*
|
*
|
||||||
* Manages teams, coordinates task execution, and surfaces progress events.
|
* Manages teams, coordinates task execution, and surfaces progress events.
|
||||||
* Most users will interact with this class exclusively.
|
* Most users will interact with this class exclusively.
|
||||||
*/
|
*/
|
||||||
export class OpenMultiAgent {
|
export class VCGAgentSDK {
|
||||||
private readonly config: Required<
|
private readonly config: Required<
|
||||||
Omit<OrchestratorConfig, 'onProgress'>
|
Omit<OrchestratorConfig, 'onProgress'>
|
||||||
> & Pick<OrchestratorConfig, 'onProgress'>
|
> & Pick<OrchestratorConfig, 'onProgress'>
|
||||||
|
|
@ -380,7 +382,7 @@ export class OpenMultiAgent {
|
||||||
createTeam(name: string, config: TeamConfig): Team {
|
createTeam(name: string, config: TeamConfig): Team {
|
||||||
if (this.teams.has(name)) {
|
if (this.teams.has(name)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`OpenMultiAgent: a team named "${name}" already exists. ` +
|
`VCGAgentSDK: a team named "${name}" already exists. ` +
|
||||||
`Use a unique name or call shutdown() to clear all teams.`,
|
`Use a unique name or call shutdown() to clear all teams.`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* @fileoverview Core type definitions for the open-multi-agent orchestration framework.
|
* @fileoverview Core type definitions for the @vcg/agent-sdk orchestration framework.
|
||||||
*
|
*
|
||||||
* All public types are exported from this single module. Downstream modules
|
* All public types are exported from this single module. Downstream modules
|
||||||
* import only what they need, keeping the dependency graph acyclic.
|
* import only what they need, keeping the dependency graph acyclic.
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
"types": ["node"],
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue