@ceasarxuu/dsh-agent-team 0.0.0-stage → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { ModelSelection } from '@deepseek-ai/dsh-agent';
3
+ import { z } from 'zod';
4
+ import type { SessionTeams, TeamConfig, TeamDraft } from '../shared/types.ts';
5
+ declare const snapshotSchema: z.ZodObject<{
6
+ team: z.ZodType<TeamConfig, unknown, z.core.$ZodTypeInternals<TeamConfig, unknown>>;
7
+ prompts: z.ZodRecord<z.ZodString, z.ZodString>;
8
+ generation: z.ZodOptional<z.ZodString>;
9
+ nativeModel: z.ZodOptional<z.ZodObject<{
10
+ provider: z.ZodString;
11
+ model: z.ZodString;
12
+ reasoningEffort: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strict>>;
14
+ }, z.core.$strict>;
15
+ export type TeamSnapshot = z.infer<typeof snapshotSchema>;
16
+ export declare class TeamStore {
17
+ private readonly domain;
18
+ private templateWrites;
19
+ private constructor();
20
+ static open(ctx: Context): Promise<TeamStore>;
21
+ close(): Promise<void>;
22
+ list(): TeamConfig[];
23
+ listForSession(rootId: string): SessionTeams;
24
+ save(input: TeamDraft): Promise<TeamConfig>;
25
+ remove(id: string, revision: number): Promise<boolean>;
26
+ private writeTemplate;
27
+ getTeam(id: string, revision: number): TeamConfig;
28
+ createSnapshot(team: TeamConfig, nativeModel?: Readonly<ModelSelection>): TeamSnapshot;
29
+ rootSnapshot(rootId: string): TeamSnapshot | undefined;
30
+ setRoot(rootId: string, next?: TeamSnapshot): Promise<void>;
31
+ bindMember(childId: string, rootId: string, roleId: string, generation?: string): Promise<void>;
32
+ isCurrentMember(childId: string, rootId: string, generation: string): boolean;
33
+ binding(sessionId: string): {
34
+ rootId: string;
35
+ snapshot: {
36
+ team: TeamConfig;
37
+ prompts: Record<string, string>;
38
+ generation?: string | undefined;
39
+ nativeModel?: {
40
+ provider: string;
41
+ model: string;
42
+ reasoningEffort?: string | undefined;
43
+ } | undefined;
44
+ };
45
+ role: import("../shared/types.ts").TeamRole;
46
+ } | undefined;
47
+ }
48
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { RoleKind } from '../shared/types.ts';
2
+ /** Gate end capabilities independently of a role's editable instructions. */
3
+ export declare function roleToolAllowed(kind: RoleKind, tool: string): boolean;
@@ -0,0 +1,16 @@
1
+ import { Service, type Context } from '@deepseek-ai/cordis';
2
+ import { TeamConfigRemote } from './remote.ts';
3
+ declare module '@deepseek-ai/cordis' {
4
+ interface Context {
5
+ teamConfig: AgentTeamConfig;
6
+ }
7
+ }
8
+ export default class AgentTeamConfig extends TeamConfigRemote {
9
+ static inject: string[];
10
+ private store;
11
+ private runtime;
12
+ constructor(ctx: Context);
13
+ protected [Service.init](): Promise<void>;
14
+ /** Native scoped catalog; an unbound template looks up skills without a project directory. */
15
+ private listSkills;
16
+ }
@@ -0,0 +1,32 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
3
+ import type { SessionTeams, SkillChoice, TeamChoice, TeamConfig, TeamDraft } from './shared/types.ts';
4
+ declare module '@deepseek-ai/dsh-typert-protocol' {
5
+ interface RemoteErrorDetailsMap {
6
+ 'agent-team-config/rejected': {
7
+ readonly reason: string;
8
+ };
9
+ }
10
+ }
11
+ interface TeamOperations {
12
+ list(): TeamConfig[];
13
+ listForSession(rootSessionId: string): SessionTeams;
14
+ save(draft: TeamDraft): Promise<TeamConfig>;
15
+ remove(teamId: string, revision: number): Promise<boolean>;
16
+ skills(workspaceId: string | null, signal: AbortSignal): Promise<SkillChoice[]>;
17
+ launch(teamId: string, revision: number, workspaceId: string, signal: AbortSignal): Promise<string>;
18
+ switchTeam(sessionId: string, assignment: string | null, choice: TeamChoice | null, signal: AbortSignal): Promise<SessionTeams>;
19
+ }
20
+ export declare class TeamConfigRemote extends TypertRemoteService {
21
+ private readonly operations;
22
+ constructor(ctx: Context, operations: TeamOperations);
23
+ list(): TeamConfig[];
24
+ listForSession(rootSessionId: string): SessionTeams;
25
+ save(draft: TeamDraft): Promise<TeamConfig>;
26
+ deleteTemplate(teamId: string, revision: number): Promise<boolean>;
27
+ skills(workspaceId: string | null, signal: AbortSignal): Promise<SkillChoice[]>;
28
+ launch(teamId: string, revision: number, workspaceId: string, signal: AbortSignal): Promise<string>;
29
+ switchTeam(sessionId: string, assignment: string | null, choice: TeamChoice | null, signal: AbortSignal): Promise<SessionTeams>;
30
+ private checked;
31
+ }
32
+ export {};
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ import type { TeamConfig, TeamDraft } from './types.ts';
3
+ export declare const teamDraftSchema: z.ZodType<TeamDraft>;
4
+ export declare const teamConfigSchema: z.ZodType<TeamConfig>;
5
+ export declare function teamForLaunch(team: TeamConfig): TeamConfig;
@@ -0,0 +1,3 @@
1
+ import type { RoleKind, TeamRole } from './types.ts';
2
+ export declare function defaultPrompt(kind: RoleKind): string;
3
+ export declare function rolePrompt(role: TeamRole): string;
@@ -0,0 +1,42 @@
1
+ export type RoleKind = 'commander' | 'worker' | 'reviewer' | 'custom';
2
+ export interface RoleModel {
3
+ provider: string;
4
+ model: string;
5
+ }
6
+ export interface TeamRole {
7
+ id: string;
8
+ kind: RoleKind;
9
+ name: string;
10
+ description: string;
11
+ model: RoleModel | null;
12
+ maxInstances: number;
13
+ promptOverride: string | null;
14
+ preferredSkills: string[];
15
+ }
16
+ export interface TeamDraft {
17
+ id: string | null;
18
+ revision: number;
19
+ name: string;
20
+ roles: TeamRole[];
21
+ }
22
+ export interface TeamConfig {
23
+ id: string;
24
+ revision: number;
25
+ name: string;
26
+ roles: TeamRole[];
27
+ }
28
+ export interface SkillChoice {
29
+ name: string;
30
+ description: string;
31
+ }
32
+ export interface TeamChoice {
33
+ id: string;
34
+ revision: number;
35
+ }
36
+ export interface SessionTeams {
37
+ active: (TeamChoice & {
38
+ name: string;
39
+ assignment: string;
40
+ }) | null;
41
+ templates: TeamConfig[];
42
+ }
@@ -0,0 +1 @@
1
+ export type { RoleKind, RoleModel, SessionTeams, SkillChoice, TeamChoice, TeamConfig, TeamDraft, TeamRole } from './shared/types.ts';
package/lib/types.js ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,117 @@
1
1
  {
2
2
  "name": "@ceasarxuu/dsh-agent-team",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.3",
4
+ "description": "Reusable role, model, prompt and skill configurations for native DSH Agent Teams",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/ceasarXuu/dsh-agent-team.git"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "engines": {
16
+ "dsh": ">=0.2.2-rc.5 <0.3.0-0",
17
+ "node": ">=24.9.0"
18
+ },
19
+ "main": "./lib/index.js",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./lib/types/index.d.ts",
23
+ "default": "./lib/index.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/types/client/index.d.ts",
27
+ "default": "./lib/client.js"
28
+ },
29
+ "./typert": {
30
+ "types": "./lib/typert.host.d.ts",
31
+ "default": "./lib/typert.host.js"
32
+ },
33
+ "./remote": {
34
+ "types": "./lib/typert.remote-client.d.ts",
35
+ "default": "./lib/typert.remote-client.js"
36
+ },
37
+ "./package.json": "./package.json",
38
+ "./types": {
39
+ "types": "./lib/types/types.d.ts",
40
+ "default": "./lib/types.js"
41
+ }
42
+ },
43
+ "files": [
44
+ "lib",
45
+ "cordis.patch.yml",
46
+ "README.md",
47
+ "LICENSE",
48
+ "lib/typert.host.js",
49
+ "lib/typert.host.d.ts",
50
+ "lib/typert.remote-client.js",
51
+ "lib/typert.remote-client.d.ts",
52
+ "lib/typert.remote-client.d.ts.map"
53
+ ],
54
+ "dsh": {
55
+ "bundle": {
56
+ "patch": "./cordis.patch.yml"
57
+ },
58
+ "client": {
59
+ "platform": "web",
60
+ "inject": [
61
+ "@deepseek-ai/dsh-client-ui-model-selection",
62
+ "@deepseek-ai/dsh-client-ui-settings",
63
+ "@deepseek-ai/dsh-client-ui-workspace",
64
+ "@deepseek-ai/dsh-api-remotes"
65
+ ]
66
+ }
67
+ },
68
+ "scripts": {
69
+ "build": "node scripts/build.mjs",
70
+ "typecheck": "tsc --noEmit",
71
+ "test:unit": "node --import tsx --test tests/config.test.ts tests/admission.test.ts",
72
+ "test:host": "node --test tests/host.test.mjs"
73
+ },
74
+ "dependencies": {
75
+ "zod": "4.6.6"
76
+ },
77
+ "devDependencies": {
78
+ "@deepseek-ai/cordis": "4.1.0",
79
+ "@deepseek-ai/dsh": "0.2.2-rc.5",
80
+ "@deepseek-ai/dsh-typert-generator": "0.2.2-rc.5",
81
+ "@types/node": "^24.0.0",
82
+ "@types/react": "18.3.26",
83
+ "esbuild": "^0.25.0",
84
+ "react": "18.2.0",
85
+ "tsx": "^4.20.0",
86
+ "typescript": "6.0.3",
87
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
88
+ "@deepseek-ai/dsh-agent-team": "0.2.2-rc.5",
89
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.5",
90
+ "@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.5",
91
+ "@deepseek-ai/dsh-api-workspace-controller": "0.2.2-rc.5",
92
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.5",
93
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
94
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.2.2-rc.5",
95
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
96
+ "@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.5",
97
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
98
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
99
+ "@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.5",
100
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
101
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
102
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.5",
103
+ "@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
104
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
105
+ "@deepseek-ai/dsh-workspace": "0.2.2-rc.5",
106
+ "@deepseek-ai/dsh-storage-domain": "0.2.2-rc.5",
107
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
108
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5"
109
+ },
110
+ "peerDependencies": {
111
+ "@deepseek-ai/cordis": "~4.1.0",
112
+ "@deepseek-ai/dsh-storage-domain": ">=0.2.2-rc.5 <0.3.0-0",
113
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.5 <0.3.0-0",
114
+ "@deepseek-ai/dsh-typert-protocol": ">=0.2.2-rc.5 <0.3.0-0"
115
+ },
116
+ "types": "./lib/types/index.d.ts"
117
+ }