{"_id":"@cognitiondesk/agent-team-orchestration","name":"@cognitiondesk/agent-team-orchestration","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cognitiondesk/agent-team-orchestration","version":"0.1.0","description":"Team coordination for CognitionDesk apps — create agent teams (squads), assign scopes, inject skills, delegate tasks, and track progress. Tier 2 package that composes agent-runtime + orchestration-kit + skill-packs.","keywords":["cognitiondesk","agent","team","squad","orchestration","coordination","delegation"],"license":"MIT","type":"module","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"./src/index.js","module":"./src/index.js","exports":{".":{"import":"./src/index.js","require":"./src/index.js"}},"scripts":{"build":"vite build","dev":"vite build --watch"},"peerDependencies":{"@cognitiondesk/agent-runtime":">=0.1.0","@cognitiondesk/orchestration-kit":">=0.1.0","@cognitiondesk/skill-packs":">=0.1.0"},"peerDependenciesMeta":{"@cognitiondesk/agent-runtime":{"optional":true},"@cognitiondesk/orchestration-kit":{"optional":true},"@cognitiondesk/skill-packs":{"optional":true}},"devDependencies":{"vite":"^6.0.0"},"_id":"@cognitiondesk/agent-team-orchestration@0.1.0","gitHead":"5cbcf45eee62da13e54d31e9f4f07ebf4e111d03","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-a+6imNB3mC+g1ISOeQWnwvwGal39pKAiLfoOukqLw1bHd3lzKLyj64L+ori2t9ZXgh5jyvcNlXJvHafx6UUb0A==","shasum":"2b2c5cf693a98234abfe5858a92b5ff099d3ebc1","tarball":"https://registry.npmjs.org/@cognitiondesk/agent-team-orchestration/-/agent-team-orchestration-0.1.0.tgz","fileCount":7,"unpackedSize":24318,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGwFCQ1lhOp9EPKMW0F+iPySwSqWcuBBERvdwDNHMbWEAiAuhkMP0lGjy/7WmWXvObZH7QQojcINu9NL9I98tEwXeQ=="}]},"_npmUser":{"name":"lucilo","email":"lucilo@gmail.com"},"directories":{},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-team-orchestration_0.1.0_1782358513401_0.3911842502611218"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T03:35:13.301Z","0.1.0":"2026-06-25T03:35:13.545Z","modified":"2026-06-25T03:35:13.760Z"},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"description":"Team coordination for CognitionDesk apps — create agent teams (squads), assign scopes, inject skills, delegate tasks, and track progress. Tier 2 package that composes agent-runtime + orchestration-kit + skill-packs.","keywords":["cognitiondesk","agent","team","squad","orchestration","coordination","delegation"],"license":"MIT","readme":"# @cognitiondesk/agent-team-orchestration\r\n\r\nTeam coordination for CognitionDesk apps. Creates agent teams (squads), assigns scopes, injects skills, delegates tasks, and tracks progress. Composes the other Tier 2 packages into a unified team management API.\r\n\r\n**Tier 2 package** — composes `@cognitiondesk/agent-runtime` + `@cognitiondesk/orchestration-kit` + `@cognitiondesk/skill-packs` (all optional peer deps). Uses **no** `@mounaji_npm/*` packages.\r\n\r\n---\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install @cognitiondesk/agent-team-orchestration\r\n```\r\n\r\nFor full functionality, also install the peer packages:\r\n\r\n```bash\r\nnpm install @cognitiondesk/agent-team-orchestration \\\r\n  @cognitiondesk/agent-runtime \\\r\n  @cognitiondesk/orchestration-kit \\\r\n  @cognitiondesk/skill-packs\r\n```\r\n\r\n---\r\n\r\n## Quick start\r\n\r\n```js\r\nimport { createTeamManager } from '@cognitiondesk/agent-team-orchestration';\r\n\r\n// Mock mode (no backend needed)\r\nconst manager = await createTeamManager({ mock: true });\r\n\r\n// Create a team\r\nconst team = await manager.createTeam({\r\n  name: 'DevOps Squad',\r\n  scope: { kind: 'project', orgId: 'org_1', projectId: 'proj_123' },\r\n  coordinatorAgentId: 'agent-coordinator',\r\n  memberAgentIds: ['agent-worker-1', 'agent-worker-2'],\r\n  skillIds: ['devops-report', 'coordination'],\r\n  objective: 'Monitor and report on all deploys',\r\n});\r\n\r\n// List teams\r\nconst teams = await manager.listTeams({ kind: 'project', projectId: 'proj_123' });\r\n\r\n// Delegate a task from the coordinator to a worker\r\nconst task = await manager.delegateTask(team.id, {\r\n  title: 'Investigate latency spike',\r\n  workerAgentId: 'agent-worker-1',\r\n});\r\n\r\n// Get available skills\r\nconst skills = await manager.getAvailableSkills();\r\n```\r\n\r\n### With a real backend\r\n\r\n```js\r\nimport { createAgentRuntime } from '@cognitiondesk/agent-runtime';\r\n\r\nconst runtime = await createAgentRuntime({\r\n  backendUrl: 'https://api.cognitiondesk.com',\r\n  authToken: firebaseToken,\r\n});\r\n\r\nconst manager = await createTeamManager({\r\n  agentRuntime: runtime,\r\n  store: myBackendStore, // pluggable store\r\n});\r\n```\r\n\r\n---\r\n\r\n## API\r\n\r\n### `createTeamManager(opts) → Promise<AgentTeamManager>`\r\n\r\n| Option | Type | Description |\r\n|---|---|---|\r\n| `agentRuntime` | `AgentRuntime` | Runtime for agent CRUD (auto-created in mock mode if absent) |\r\n| `store` | `object` | Pluggable store with `get`, `list`, `save`, `delete` |\r\n| `delegator` | `TaskDelegator` | Pre-configured delegator (auto-created if absent) |\r\n| `skillPacks` | `object` | Skill packs module (auto-loaded if absent) |\r\n| `mock` | `boolean` | Force mock mode |\r\n\r\n### `AgentTeamManager` methods\r\n\r\n| Method | Description |\r\n|---|---|\r\n| `listTeams(scope?)` | List teams, optionally filtered by scope |\r\n| `getTeam(teamId)` | Get a single team |\r\n| `createTeam(team)` | Create a new agent team |\r\n| `updateTeam(teamId, updates)` | Update a team |\r\n| `deleteTeam(teamId)` | Delete a team |\r\n| `delegateTask(teamId, task)` | Delegate a task from coordinator to worker |\r\n| `getAvailableSkills()` | List all available skill packs |\r\n\r\n### Team shape\r\n\r\n```ts\r\nTeam {\r\n  id:                string\r\n  name:              string\r\n  scope:             { kind, orgId?, projectId?, ownerId? }\r\n  coordinatorAgentId: string\r\n  coordinator:       AgentActor\r\n  members:           AgentActor[]\r\n  skills:             SkillRef[]\r\n  objective:          string\r\n  createdAt:          string\r\n}\r\n```\r\n\r\nThis shape is compatible with `@mounaji_npm/forum-contracts` `AgentGroup` but does not depend on it.\r\n\r\n---\r\n\r\n## Architecture\r\n\r\n**Tier 2** in the three-tier model — this is the top-level composition package:\r\n\r\n```\r\nTier 1 — @mounaji_npm/*          (base: tokens, ui, auth, forum, contracts)\r\nTier 2 — @cognitiondesk/*\r\n  ├── agent-runtime              (agent CRUD + invocation)\r\n  ├── orchestration-kit          (task delegation + workflows)\r\n  ├── skill-packs                (injectable skills)\r\n  └── agent-team-orchestration   (THIS — composes all three into team management)\r\nTier 3 — apps (ai-forum-app, mounaji-platform, ...)\r\n```\r\n\r\n**Dependency rules:**\r\n- Optional peer deps on the other three `@cognitiondesk/*` packages.\r\n- Does **not** depend on any `@mounaji_npm/*` package.\r\n- Works standalone in mock mode (all peer deps auto-loaded with fallbacks).\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT","readmeFilename":"README.md","_rev":"1-603718db13746b45ef4b728f52f339d1"}