@concord-ai/concord-mcp 0.5.0 → 0.6.0
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.
- package/README.md +139 -52
- package/dist/artifacts/handoff-md.js +5 -1
- package/dist/artifacts/handoff-md.js.map +1 -1
- package/dist/artifacts/work-state-json.js +4 -0
- package/dist/artifacts/work-state-json.js.map +1 -1
- package/dist/artifacts/work-state-view.d.ts +4 -0
- package/dist/artifacts/work-state-view.js +7 -2
- package/dist/artifacts/work-state-view.js.map +1 -1
- package/dist/cli/commands/check.js +2 -1
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/doctor.js +35 -4
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/hook.d.ts +3 -3
- package/dist/cli/commands/hook.js +4 -4
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/install.js +25 -5
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/status.js +5 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/tasks.js +8 -4
- package/dist/cli/commands/tasks.js.map +1 -1
- package/dist/cli/commands/who.js +7 -2
- package/dist/cli/commands/who.js.map +1 -1
- package/dist/cli/context.d.ts +3 -2
- package/dist/cli/context.js +5 -4
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/dashboard/app.js +2 -2
- package/dist/cli/dashboard/app.js.map +1 -1
- package/dist/cli/index.js +16 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/workspace-options.d.ts +21 -0
- package/dist/cli/workspace-options.js +36 -0
- package/dist/cli/workspace-options.js.map +1 -0
- package/dist/config/paths.d.ts +17 -3
- package/dist/config/paths.js +80 -10
- package/dist/config/paths.js.map +1 -1
- package/dist/db/index.d.ts +4 -1
- package/dist/db/index.js +2 -0
- package/dist/db/index.js.map +1 -1
- package/dist/db/repositories/handoffs.d.ts +9 -1
- package/dist/db/repositories/handoffs.js +38 -3
- package/dist/db/repositories/handoffs.js.map +1 -1
- package/dist/db/repositories/ownership-events.d.ts +19 -0
- package/dist/db/repositories/ownership-events.js +43 -0
- package/dist/db/repositories/ownership-events.js.map +1 -0
- package/dist/db/repositories/tasks.d.ts +12 -0
- package/dist/db/repositories/tasks.js +33 -5
- package/dist/db/repositories/tasks.js.map +1 -1
- package/dist/db/rows.d.ts +33 -3
- package/dist/db/rows.js +87 -2
- package/dist/db/rows.js.map +1 -1
- package/dist/db/schema.js +36 -0
- package/dist/db/schema.js.map +1 -1
- package/dist/domain/adoption.d.ts +3 -3
- package/dist/domain/adoption.js +2 -2
- package/dist/domain/adoption.js.map +1 -1
- package/dist/domain/operations.d.ts +42 -0
- package/dist/domain/operations.js +2 -0
- package/dist/domain/operations.js.map +1 -0
- package/dist/domain/presence.js +1 -1
- package/dist/domain/presence.js.map +1 -1
- package/dist/domain/schemas.d.ts +34 -250
- package/dist/domain/schemas.js +108 -97
- package/dist/domain/schemas.js.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/install/codex-config.d.ts +21 -0
- package/dist/install/codex-config.js +68 -0
- package/dist/install/codex-config.js.map +1 -0
- package/dist/install/instructions.d.ts +6 -2
- package/dist/install/instructions.js +27 -34
- package/dist/install/instructions.js.map +1 -1
- package/dist/install/mcp-config.d.ts +24 -0
- package/dist/install/mcp-config.js +60 -0
- package/dist/install/mcp-config.js.map +1 -0
- package/dist/server.d.ts +6 -3
- package/dist/server.js +12 -15
- package/dist/server.js.map +1 -1
- package/dist/tools/claim-work.d.ts +1 -19
- package/dist/tools/claim-work.js +8 -63
- package/dist/tools/claim-work.js.map +1 -1
- package/dist/tools/get-task-context.d.ts +4 -4
- package/dist/tools/get-task-context.js +3 -51
- package/dist/tools/get-task-context.js.map +1 -1
- package/dist/tools/get-work-state.d.ts +5 -6
- package/dist/tools/get-work-state.js +18 -36
- package/dist/tools/get-work-state.js.map +1 -1
- package/dist/tools/handoff-lifecycle.d.ts +10 -0
- package/dist/tools/handoff-lifecycle.js +151 -0
- package/dist/tools/handoff-lifecycle.js.map +1 -0
- package/dist/tools/handoff.d.ts +5 -9
- package/dist/tools/handoff.js +56 -93
- package/dist/tools/handoff.js.map +1 -1
- package/dist/tools/register-agent.d.ts +1 -4
- package/dist/tools/register-agent.js +0 -52
- package/dist/tools/register-agent.js.map +1 -1
- package/dist/tools/review-ready.d.ts +2 -4
- package/dist/tools/review-ready.js +36 -45
- package/dist/tools/review-ready.js.map +1 -1
- package/dist/tools/task-lifecycle.d.ts +12 -0
- package/dist/tools/task-lifecycle.js +200 -0
- package/dist/tools/task-lifecycle.js.map +1 -0
- package/dist/tools/update-task.d.ts +1 -4
- package/dist/tools/update-task.js +14 -29
- package/dist/tools/update-task.js.map +1 -1
- package/dist/tools/workflow.d.ts +38 -0
- package/dist/tools/workflow.js +444 -0
- package/dist/tools/workflow.js.map +1 -0
- package/dist/tools/workspace-routing.d.ts +8 -0
- package/dist/tools/workspace-routing.js +15 -0
- package/dist/tools/workspace-routing.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspaces/manager.d.ts +43 -0
- package/dist/workspaces/manager.js +118 -0
- package/dist/workspaces/manager.js.map +1 -0
- package/package.json +3 -3
package/dist/domain/presence.js
CHANGED
|
@@ -38,7 +38,7 @@ export function detectStaleClaims(tasks, agents, now, thresholds = DEFAULT_PRESE
|
|
|
38
38
|
const byId = new Map(agents.map((agent) => [agent.agentId, agent]));
|
|
39
39
|
const stale = [];
|
|
40
40
|
for (const task of tasks) {
|
|
41
|
-
if (
|
|
41
|
+
if (!['active', 'blocked', 'handoff_offered'].includes(task.status) || task.agentId === null) {
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
44
|
const agent = byId.get(task.agentId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presence.js","sourceRoot":"","sources":["../../src/domain/presence.ts"],"names":[],"mappings":"AAgBA,wDAAwD;AACxD,MAAM,CAAC,MAAM,2BAA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-
export declare const
|
|
3
|
-
readonly
|
|
2
|
+
export declare const startWorkInputShape: {
|
|
3
|
+
readonly task_id: z.ZodString;
|
|
4
|
+
readonly title: z.ZodString;
|
|
4
5
|
readonly kind: z.ZodString;
|
|
5
|
-
readonly owner: z.ZodOptional<z.ZodString>;
|
|
6
|
-
readonly model: z.ZodOptional<z.ZodString>;
|
|
7
|
-
readonly summary: z.ZodOptional<z.ZodString>;
|
|
8
|
-
readonly status: z.ZodOptional<z.ZodEnum<["active", "blocked", "waiting_review", "done"]>>;
|
|
9
|
-
readonly branch: z.ZodOptional<z.ZodString>;
|
|
10
|
-
readonly worktree: z.ZodOptional<z.ZodString>;
|
|
11
|
-
readonly cwd: z.ZodOptional<z.ZodString>;
|
|
12
|
-
readonly pid: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
};
|
|
14
|
-
export declare const registerAgentInputSchema: z.ZodObject<{
|
|
15
6
|
readonly agent_id: z.ZodOptional<z.ZodString>;
|
|
16
|
-
readonly kind: z.ZodString;
|
|
17
7
|
readonly owner: z.ZodOptional<z.ZodString>;
|
|
18
8
|
readonly model: z.ZodOptional<z.ZodString>;
|
|
19
9
|
readonly summary: z.ZodOptional<z.ZodString>;
|
|
20
|
-
readonly status: z.ZodOptional<z.ZodEnum<["active", "blocked", "waiting_review", "done"]>>;
|
|
21
10
|
readonly branch: z.ZodOptional<z.ZodString>;
|
|
22
11
|
readonly worktree: z.ZodOptional<z.ZodString>;
|
|
23
12
|
readonly cwd: z.ZodOptional<z.ZodString>;
|
|
24
13
|
readonly pid: z.ZodOptional<z.ZodNumber>;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
kind: string;
|
|
27
|
-
status?: "active" | "blocked" | "waiting_review" | "done" | undefined;
|
|
28
|
-
owner?: string | undefined;
|
|
29
|
-
branch?: string | undefined;
|
|
30
|
-
worktree?: string | undefined;
|
|
31
|
-
agent_id?: string | undefined;
|
|
32
|
-
model?: string | undefined;
|
|
33
|
-
pid?: number | undefined;
|
|
34
|
-
cwd?: string | undefined;
|
|
35
|
-
summary?: string | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
kind: string;
|
|
38
|
-
status?: "active" | "blocked" | "waiting_review" | "done" | undefined;
|
|
39
|
-
owner?: string | undefined;
|
|
40
|
-
branch?: string | undefined;
|
|
41
|
-
worktree?: string | undefined;
|
|
42
|
-
agent_id?: string | undefined;
|
|
43
|
-
model?: string | undefined;
|
|
44
|
-
pid?: number | undefined;
|
|
45
|
-
cwd?: string | undefined;
|
|
46
|
-
summary?: string | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
export type RegisterAgentInput = z.infer<typeof registerAgentInputSchema>;
|
|
49
|
-
export declare const claimWorkInputShape: {
|
|
50
|
-
readonly task_id: z.ZodString;
|
|
51
|
-
readonly title: z.ZodString;
|
|
52
|
-
readonly owner: z.ZodOptional<z.ZodString>;
|
|
53
|
-
readonly agent: z.ZodOptional<z.ZodString>;
|
|
54
|
-
readonly branch: z.ZodOptional<z.ZodString>;
|
|
55
|
-
readonly worktree: z.ZodOptional<z.ZodString>;
|
|
56
14
|
readonly parent_task_id: z.ZodOptional<z.ZodString>;
|
|
57
15
|
readonly expected_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
16
|
readonly modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
17
|
readonly domains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
60
18
|
readonly risk_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
61
19
|
readonly notes: z.ZodOptional<z.ZodString>;
|
|
62
|
-
readonly
|
|
20
|
+
readonly workspace_id: z.ZodOptional<z.ZodString>;
|
|
63
21
|
};
|
|
64
|
-
export
|
|
65
|
-
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly agent: z.ZodOptional<z.ZodString>;
|
|
69
|
-
readonly branch: z.ZodOptional<z.ZodString>;
|
|
70
|
-
readonly worktree: z.ZodOptional<z.ZodString>;
|
|
71
|
-
readonly parent_task_id: z.ZodOptional<z.ZodString>;
|
|
72
|
-
readonly expected_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
-
readonly modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
|
-
readonly domains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
-
readonly risk_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
-
readonly notes: z.ZodOptional<z.ZodString>;
|
|
77
|
-
readonly agent_id: z.ZodOptional<z.ZodString>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
task_id: string;
|
|
80
|
-
title: string;
|
|
81
|
-
owner?: string | undefined;
|
|
82
|
-
agent?: string | undefined;
|
|
83
|
-
branch?: string | undefined;
|
|
84
|
-
worktree?: string | undefined;
|
|
85
|
-
expected_files?: string[] | undefined;
|
|
86
|
-
modules?: string[] | undefined;
|
|
87
|
-
domains?: string[] | undefined;
|
|
88
|
-
risk_tags?: string[] | undefined;
|
|
89
|
-
notes?: string | undefined;
|
|
90
|
-
parent_task_id?: string | undefined;
|
|
91
|
-
agent_id?: string | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
task_id: string;
|
|
94
|
-
title: string;
|
|
95
|
-
owner?: string | undefined;
|
|
96
|
-
agent?: string | undefined;
|
|
97
|
-
branch?: string | undefined;
|
|
98
|
-
worktree?: string | undefined;
|
|
99
|
-
expected_files?: string[] | undefined;
|
|
100
|
-
modules?: string[] | undefined;
|
|
101
|
-
domains?: string[] | undefined;
|
|
102
|
-
risk_tags?: string[] | undefined;
|
|
103
|
-
notes?: string | undefined;
|
|
104
|
-
parent_task_id?: string | undefined;
|
|
105
|
-
agent_id?: string | undefined;
|
|
106
|
-
}>;
|
|
107
|
-
export type ClaimWorkInput = z.infer<typeof claimWorkInputSchema>;
|
|
108
|
-
export declare const updateTaskInputShape: {
|
|
109
|
-
readonly task_id: z.ZodString;
|
|
110
|
-
readonly kind: z.ZodEnum<["intent", "progress", "assumption", "decision", "question", "answer", "blocker", "finding"]>;
|
|
111
|
-
readonly content: z.ZodString;
|
|
112
|
-
readonly agent: z.ZodOptional<z.ZodString>;
|
|
113
|
-
readonly agent_id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
export type StartWorkInput = z.infer<z.ZodObject<typeof startWorkInputShape>>;
|
|
23
|
+
export declare const inspectWorkInputShape: {
|
|
24
|
+
readonly task_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
readonly workspace_id: z.ZodOptional<z.ZodString>;
|
|
114
26
|
};
|
|
115
|
-
export
|
|
27
|
+
export type InspectWorkInput = z.infer<z.ZodObject<typeof inspectWorkInputShape>>;
|
|
28
|
+
export declare const updateWorkInputShape: {
|
|
116
29
|
readonly task_id: z.ZodString;
|
|
117
30
|
readonly kind: z.ZodEnum<["intent", "progress", "assumption", "decision", "question", "answer", "blocker", "finding"]>;
|
|
118
31
|
readonly content: z.ZodString;
|
|
119
|
-
readonly agent: z.ZodOptional<z.ZodString>;
|
|
120
32
|
readonly agent_id: z.ZodOptional<z.ZodString>;
|
|
121
|
-
|
|
122
|
-
task_id: string;
|
|
123
|
-
kind: "intent" | "progress" | "assumption" | "decision" | "question" | "answer" | "blocker" | "finding";
|
|
124
|
-
content: string;
|
|
125
|
-
agent?: string | undefined;
|
|
126
|
-
agent_id?: string | undefined;
|
|
127
|
-
}, {
|
|
128
|
-
task_id: string;
|
|
129
|
-
kind: "intent" | "progress" | "assumption" | "decision" | "question" | "answer" | "blocker" | "finding";
|
|
130
|
-
content: string;
|
|
131
|
-
agent?: string | undefined;
|
|
132
|
-
agent_id?: string | undefined;
|
|
133
|
-
}>;
|
|
134
|
-
export type UpdateTaskInput = z.infer<typeof updateTaskInputSchema>;
|
|
135
|
-
export declare const getTaskContextInputShape: {
|
|
136
|
-
readonly task_id: z.ZodString;
|
|
33
|
+
readonly workspace_id: z.ZodOptional<z.ZodString>;
|
|
137
34
|
};
|
|
138
|
-
export
|
|
139
|
-
|
|
140
|
-
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
task_id: string;
|
|
142
|
-
}, {
|
|
143
|
-
task_id: string;
|
|
144
|
-
}>;
|
|
145
|
-
export type GetTaskContextInput = z.infer<typeof getTaskContextInputSchema>;
|
|
146
|
-
export declare const handoffInputShape: {
|
|
35
|
+
export type UpdateWorkInput = z.infer<z.ZodObject<typeof updateWorkInputShape>>;
|
|
36
|
+
export declare const transferWorkInputShape: {
|
|
147
37
|
readonly task_id: z.ZodString;
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
38
|
+
readonly action: z.ZodEnum<["assign", "accept", "decline", "release", "reassign", "offer", "reopen"]>;
|
|
39
|
+
readonly agent_id: z.ZodString;
|
|
40
|
+
readonly expected_version: z.ZodNumber;
|
|
41
|
+
readonly to_agent_id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
readonly handoff_id: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
readonly lease_seconds: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
readonly expires_seconds: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
readonly force: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
readonly reason: z.ZodOptional<z.ZodString>;
|
|
47
|
+
readonly what_changed: z.ZodOptional<z.ZodString>;
|
|
150
48
|
readonly changed_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
151
49
|
readonly tests_run: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
152
50
|
readonly known_risks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
153
51
|
readonly assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
52
|
readonly decisions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
155
53
|
readonly guardrails_checked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
156
|
-
readonly needs_review_from: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
157
54
|
readonly next_steps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
158
|
-
readonly
|
|
55
|
+
readonly workspace_id: z.ZodOptional<z.ZodString>;
|
|
56
|
+
};
|
|
57
|
+
export type TransferWorkInput = z.infer<z.ZodObject<typeof transferWorkInputShape>>;
|
|
58
|
+
export declare const finishWorkInputShape: {
|
|
59
|
+
readonly needs_review_from: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
159
60
|
readonly diff_size: z.ZodOptional<z.ZodString>;
|
|
160
61
|
readonly open_questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
62
|
readonly provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -168,11 +69,8 @@ export declare const handoffInputShape: {
|
|
|
168
69
|
field: string;
|
|
169
70
|
source: string;
|
|
170
71
|
}>, "many">>;
|
|
171
|
-
readonly
|
|
172
|
-
|
|
173
|
-
export declare const handoffInputSchema: z.ZodObject<{
|
|
174
|
-
readonly task_id: z.ZodString;
|
|
175
|
-
readonly status: z.ZodString;
|
|
72
|
+
readonly reason: z.ZodOptional<z.ZodString>;
|
|
73
|
+
readonly workspace_id: z.ZodOptional<z.ZodString>;
|
|
176
74
|
readonly what_changed: z.ZodString;
|
|
177
75
|
readonly changed_files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
178
76
|
readonly tests_run: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -180,124 +78,10 @@ export declare const handoffInputSchema: z.ZodObject<{
|
|
|
180
78
|
readonly assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
181
79
|
readonly decisions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
182
80
|
readonly guardrails_checked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
183
|
-
readonly needs_review_from: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
184
81
|
readonly next_steps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
185
|
-
readonly ready_for_review: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
readonly diff_size: z.ZodOptional<z.ZodString>;
|
|
187
|
-
readonly open_questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
188
|
-
readonly provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
189
|
-
field: z.ZodString;
|
|
190
|
-
source: z.ZodString;
|
|
191
|
-
}, "strip", z.ZodTypeAny, {
|
|
192
|
-
field: string;
|
|
193
|
-
source: string;
|
|
194
|
-
}, {
|
|
195
|
-
field: string;
|
|
196
|
-
source: string;
|
|
197
|
-
}>, "many">>;
|
|
198
|
-
readonly agent_id: z.ZodOptional<z.ZodString>;
|
|
199
|
-
}, "strip", z.ZodTypeAny, {
|
|
200
|
-
status: string;
|
|
201
|
-
task_id: string;
|
|
202
|
-
what_changed: string;
|
|
203
|
-
agent_id?: string | undefined;
|
|
204
|
-
changed_files?: string[] | undefined;
|
|
205
|
-
tests_run?: string[] | undefined;
|
|
206
|
-
known_risks?: string[] | undefined;
|
|
207
|
-
assumptions?: string[] | undefined;
|
|
208
|
-
decisions?: string[] | undefined;
|
|
209
|
-
guardrails_checked?: string[] | undefined;
|
|
210
|
-
needs_review_from?: string[] | undefined;
|
|
211
|
-
next_steps?: string[] | undefined;
|
|
212
|
-
diff_size?: string | undefined;
|
|
213
|
-
open_questions?: string[] | undefined;
|
|
214
|
-
provenance?: {
|
|
215
|
-
field: string;
|
|
216
|
-
source: string;
|
|
217
|
-
}[] | undefined;
|
|
218
|
-
ready_for_review?: boolean | undefined;
|
|
219
|
-
}, {
|
|
220
|
-
status: string;
|
|
221
|
-
task_id: string;
|
|
222
|
-
what_changed: string;
|
|
223
|
-
agent_id?: string | undefined;
|
|
224
|
-
changed_files?: string[] | undefined;
|
|
225
|
-
tests_run?: string[] | undefined;
|
|
226
|
-
known_risks?: string[] | undefined;
|
|
227
|
-
assumptions?: string[] | undefined;
|
|
228
|
-
decisions?: string[] | undefined;
|
|
229
|
-
guardrails_checked?: string[] | undefined;
|
|
230
|
-
needs_review_from?: string[] | undefined;
|
|
231
|
-
next_steps?: string[] | undefined;
|
|
232
|
-
diff_size?: string | undefined;
|
|
233
|
-
open_questions?: string[] | undefined;
|
|
234
|
-
provenance?: {
|
|
235
|
-
field: string;
|
|
236
|
-
source: string;
|
|
237
|
-
}[] | undefined;
|
|
238
|
-
ready_for_review?: boolean | undefined;
|
|
239
|
-
}>;
|
|
240
|
-
export type HandoffInput = z.infer<typeof handoffInputSchema>;
|
|
241
|
-
export declare const reviewReadyInputShape: {
|
|
242
82
|
readonly task_id: z.ZodString;
|
|
243
|
-
readonly
|
|
244
|
-
readonly
|
|
245
|
-
readonly
|
|
246
|
-
readonly guardrails_checked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
247
|
-
readonly assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
248
|
-
readonly open_questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
-
readonly provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
250
|
-
field: z.ZodString;
|
|
251
|
-
source: z.ZodString;
|
|
252
|
-
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
field: string;
|
|
254
|
-
source: string;
|
|
255
|
-
}, {
|
|
256
|
-
field: string;
|
|
257
|
-
source: string;
|
|
258
|
-
}>, "many">>;
|
|
83
|
+
readonly agent_id: z.ZodString;
|
|
84
|
+
readonly expected_version: z.ZodNumber;
|
|
85
|
+
readonly outcome: z.ZodDefault<z.ZodEnum<["handoff", "review_ready", "complete", "closed"]>>;
|
|
259
86
|
};
|
|
260
|
-
export
|
|
261
|
-
readonly task_id: z.ZodString;
|
|
262
|
-
readonly plan_summary: z.ZodString;
|
|
263
|
-
readonly tests_run: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
264
|
-
readonly diff_size: z.ZodOptional<z.ZodString>;
|
|
265
|
-
readonly guardrails_checked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
266
|
-
readonly assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
267
|
-
readonly open_questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
268
|
-
readonly provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
269
|
-
field: z.ZodString;
|
|
270
|
-
source: z.ZodString;
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
field: string;
|
|
273
|
-
source: string;
|
|
274
|
-
}, {
|
|
275
|
-
field: string;
|
|
276
|
-
source: string;
|
|
277
|
-
}>, "many">>;
|
|
278
|
-
}, "strip", z.ZodTypeAny, {
|
|
279
|
-
task_id: string;
|
|
280
|
-
plan_summary: string;
|
|
281
|
-
tests_run?: string[] | undefined;
|
|
282
|
-
assumptions?: string[] | undefined;
|
|
283
|
-
guardrails_checked?: string[] | undefined;
|
|
284
|
-
diff_size?: string | undefined;
|
|
285
|
-
open_questions?: string[] | undefined;
|
|
286
|
-
provenance?: {
|
|
287
|
-
field: string;
|
|
288
|
-
source: string;
|
|
289
|
-
}[] | undefined;
|
|
290
|
-
}, {
|
|
291
|
-
task_id: string;
|
|
292
|
-
plan_summary: string;
|
|
293
|
-
tests_run?: string[] | undefined;
|
|
294
|
-
assumptions?: string[] | undefined;
|
|
295
|
-
guardrails_checked?: string[] | undefined;
|
|
296
|
-
diff_size?: string | undefined;
|
|
297
|
-
open_questions?: string[] | undefined;
|
|
298
|
-
provenance?: {
|
|
299
|
-
field: string;
|
|
300
|
-
source: string;
|
|
301
|
-
}[] | undefined;
|
|
302
|
-
}>;
|
|
303
|
-
export type ReviewReadyInput = z.infer<typeof reviewReadyInputSchema>;
|
|
87
|
+
export type FinishWorkInput = z.infer<z.ZodObject<typeof finishWorkInputShape>>;
|
package/dist/domain/schemas.js
CHANGED
|
@@ -1,66 +1,68 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { agentStatusValues } from '../db/rows.js';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The five public MCP workflow contracts. Internal lifecycle operations derive
|
|
4
|
+
* their TypeScript inputs from these shapes in operations.ts; they are not
|
|
5
|
+
* separate externally validated tools.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
* Distinct from the `agent` *kind* string — this identifies one running
|
|
10
|
-
* instance (e.g. `claude-code:7p8v`), obtained from `register_agent`. */
|
|
7
|
+
const taskIdField = z.string().min(1).describe('Stable task identifier, e.g. TASK-12');
|
|
11
8
|
const agentIdField = z
|
|
12
9
|
.string()
|
|
13
10
|
.optional()
|
|
14
|
-
.describe('
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
.describe('Existing agent identity to refresh; omit on the first call to generate one');
|
|
12
|
+
const actorAgentIdField = z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.describe('Registered agent identity performing this operation');
|
|
16
|
+
const taskVersionField = z
|
|
17
|
+
.number()
|
|
18
|
+
.int()
|
|
19
|
+
.positive()
|
|
20
|
+
.describe('Task version last read by the caller; stale versions are rejected');
|
|
21
|
+
const workspaceIdField = z
|
|
22
|
+
.string()
|
|
23
|
+
.min(1)
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Workspace id returned by a Concord operation. Omit to use the automatically resolved repository workspace.');
|
|
26
|
+
const evidenceInputShape = {
|
|
27
|
+
what_changed: z.string().min(1).describe('Concise summary of what changed'),
|
|
28
|
+
changed_files: z.array(z.string()).optional().describe('Files that changed'),
|
|
29
|
+
tests_run: z.array(z.string()).optional().describe('Test commands run'),
|
|
30
|
+
known_risks: z.array(z.string()).optional().describe('Known risks introduced'),
|
|
31
|
+
assumptions: z.array(z.string()).optional().describe('Assumptions made'),
|
|
32
|
+
decisions: z.array(z.string()).optional().describe('Notable decisions and why'),
|
|
33
|
+
guardrails_checked: z.array(z.string()).optional().describe('Guardrails checked'),
|
|
34
|
+
next_steps: z.array(z.string()).optional().describe('Remaining work or follow-ups'),
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const provenanceField = z
|
|
37
|
+
.array(z.object({ field: z.string(), source: z.string() }))
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Evidence source for review claims');
|
|
40
|
+
export const startWorkInputShape = {
|
|
41
|
+
task_id: taskIdField,
|
|
39
42
|
title: z.string().min(1).describe('Short human-readable title'),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'consistent across a session so the same agent is not recorded under different names.'),
|
|
43
|
+
kind: z.string().min(1).describe('Agent type or provider, e.g. claude-code or codex'),
|
|
44
|
+
agent_id: agentIdField,
|
|
45
|
+
owner: z.string().optional().describe('Human accountable for this agent and task'),
|
|
46
|
+
model: z.string().optional().describe('Model the agent is running'),
|
|
47
|
+
summary: z.string().optional().describe('One-line description of the current work'),
|
|
46
48
|
branch: z.string().optional().describe('Git branch, if known'),
|
|
47
49
|
worktree: z.string().optional().describe('Git worktree path, if used'),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
risk_tags: z.array(z.string()).optional().describe('Risk tags, e.g. payment-flow'),
|
|
58
|
-
notes: z.string().optional().describe('Freeform notes'),
|
|
59
|
-
agent_id: agentIdField,
|
|
50
|
+
cwd: z.string().optional().describe('Agent working directory'),
|
|
51
|
+
pid: z.number().int().optional().describe('Agent process id, if known'),
|
|
52
|
+
parent_task_id: z.string().optional().describe('Parent task for a smaller claimed unit'),
|
|
53
|
+
expected_files: z.array(z.string()).optional().describe('Files expected to change'),
|
|
54
|
+
modules: z.array(z.string()).optional().describe('Logical modules touched'),
|
|
55
|
+
domains: z.array(z.string()).optional().describe('Product domains touched'),
|
|
56
|
+
risk_tags: z.array(z.string()).optional().describe('Risk tags shared with related work'),
|
|
57
|
+
notes: z.string().optional().describe('Concise task notes'),
|
|
58
|
+
workspace_id: workspaceIdField,
|
|
60
59
|
};
|
|
61
|
-
export const
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
export const inspectWorkInputShape = {
|
|
61
|
+
task_id: taskIdField.optional().describe('Task to inspect; omit for the whole workspace state'),
|
|
62
|
+
workspace_id: workspaceIdField,
|
|
63
|
+
};
|
|
64
|
+
export const updateWorkInputShape = {
|
|
65
|
+
task_id: taskIdField,
|
|
64
66
|
kind: z
|
|
65
67
|
.enum([
|
|
66
68
|
'intent',
|
|
@@ -72,57 +74,66 @@ export const updateTaskInputShape = {
|
|
|
72
74
|
'blocker',
|
|
73
75
|
'finding',
|
|
74
76
|
])
|
|
75
|
-
.describe('
|
|
77
|
+
.describe('Kind of task-scoped update'),
|
|
76
78
|
content: z.string().min(1).describe('Concise context another agent needs'),
|
|
77
|
-
agent: z.string().optional().describe('Agent recording the update; defaults to the claimant'),
|
|
78
79
|
agent_id: agentIdField,
|
|
80
|
+
workspace_id: workspaceIdField,
|
|
79
81
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
const transferWorkActionValues = [
|
|
83
|
+
'assign',
|
|
84
|
+
'accept',
|
|
85
|
+
'decline',
|
|
86
|
+
'release',
|
|
87
|
+
'reassign',
|
|
88
|
+
'offer',
|
|
89
|
+
'reopen',
|
|
90
|
+
];
|
|
91
|
+
export const transferWorkInputShape = {
|
|
92
|
+
task_id: taskIdField,
|
|
93
|
+
action: z
|
|
94
|
+
.enum(transferWorkActionValues)
|
|
95
|
+
.describe('Ownership action to apply through the versioned task state machine'),
|
|
96
|
+
agent_id: actorAgentIdField,
|
|
97
|
+
expected_version: taskVersionField,
|
|
98
|
+
to_agent_id: z.string().min(1).optional().describe('Required for assign, reassign, and offer'),
|
|
99
|
+
handoff_id: z
|
|
100
|
+
.number()
|
|
101
|
+
.int()
|
|
102
|
+
.positive()
|
|
103
|
+
.optional()
|
|
104
|
+
.describe('Pending handoff to resolve; inferred from the task when omitted'),
|
|
105
|
+
lease_seconds: z.number().int().positive().optional(),
|
|
106
|
+
expires_seconds: z.number().int().positive().optional(),
|
|
107
|
+
force: z.boolean().optional(),
|
|
108
|
+
reason: z.string().min(1).optional(),
|
|
109
|
+
what_changed: evidenceInputShape.what_changed.optional().describe('Required for offer'),
|
|
110
|
+
changed_files: evidenceInputShape.changed_files,
|
|
111
|
+
tests_run: evidenceInputShape.tests_run,
|
|
112
|
+
known_risks: evidenceInputShape.known_risks,
|
|
113
|
+
assumptions: evidenceInputShape.assumptions,
|
|
114
|
+
decisions: evidenceInputShape.decisions,
|
|
115
|
+
guardrails_checked: evidenceInputShape.guardrails_checked,
|
|
116
|
+
next_steps: evidenceInputShape.next_steps,
|
|
117
|
+
workspace_id: workspaceIdField,
|
|
83
118
|
};
|
|
84
|
-
export const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
decisions: z.array(z.string()).optional().describe('Notable decisions and why'),
|
|
94
|
-
guardrails_checked: z.array(z.string()).optional().describe('Guardrails manually checked'),
|
|
119
|
+
export const finishWorkInputShape = {
|
|
120
|
+
task_id: taskIdField,
|
|
121
|
+
agent_id: actorAgentIdField,
|
|
122
|
+
expected_version: taskVersionField,
|
|
123
|
+
outcome: z
|
|
124
|
+
.enum(['handoff', 'review_ready', 'complete', 'closed'])
|
|
125
|
+
.default('complete')
|
|
126
|
+
.describe('Final task state; handoff records evidence without changing lifecycle state'),
|
|
127
|
+
...evidenceInputShape,
|
|
95
128
|
needs_review_from: z.array(z.string()).optional().describe('Who should review'),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.describe('Set true when this handoff also marks the task ready for review (before a PR). ' +
|
|
101
|
-
'This renders REVIEW_PACKET.md from the handoff.'),
|
|
102
|
-
diff_size: z
|
|
129
|
+
diff_size: z.string().optional().describe('Rough diff size, e.g. +120 / -30'),
|
|
130
|
+
open_questions: z.array(z.string()).optional().describe('Unresolved review questions'),
|
|
131
|
+
provenance: provenanceField,
|
|
132
|
+
reason: z
|
|
103
133
|
.string()
|
|
134
|
+
.min(1)
|
|
104
135
|
.optional()
|
|
105
|
-
.describe('
|
|
106
|
-
|
|
107
|
-
provenance: z
|
|
108
|
-
.array(z.object({ field: z.string(), source: z.string() }))
|
|
109
|
-
.optional()
|
|
110
|
-
.describe('Where each claim came from, e.g. { field: "tests", source: "command output" }'),
|
|
111
|
-
agent_id: agentIdField,
|
|
112
|
-
};
|
|
113
|
-
export const handoffInputSchema = z.object(handoffInputShape);
|
|
114
|
-
export const reviewReadyInputShape = {
|
|
115
|
-
task_id: z.string().min(1).describe('The task being marked review-ready'),
|
|
116
|
-
plan_summary: z.string().min(1).describe('What the change intended to do'),
|
|
117
|
-
tests_run: z.array(z.string()).optional().describe('Test commands run'),
|
|
118
|
-
diff_size: z.string().optional().describe('Rough diff size, e.g. "+120 / -30"'),
|
|
119
|
-
guardrails_checked: z.array(z.string()).optional().describe('Guardrails checked'),
|
|
120
|
-
assumptions: z.array(z.string()).optional().describe('Assumptions made'),
|
|
121
|
-
open_questions: z.array(z.string()).optional().describe('Unresolved questions for review'),
|
|
122
|
-
provenance: z
|
|
123
|
-
.array(z.object({ field: z.string(), source: z.string() }))
|
|
124
|
-
.optional()
|
|
125
|
-
.describe('Where each claim came from, e.g. { field: "tests", source: "command output" }'),
|
|
136
|
+
.describe('Audited terminal reason; defaults to the change summary'),
|
|
137
|
+
workspace_id: workspaceIdField,
|
|
126
138
|
};
|
|
127
|
-
export const reviewReadyInputSchema = z.object(reviewReadyInputShape);
|
|
128
139
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/domain/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/domain/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC,CAAC;AAEvF,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CAAC,4EAA4E,CAAC,CAAC;AAE1F,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CAAC,qDAAqD,CAAC,CAAC;AAEnE,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,EAAE;KACL,QAAQ,EAAE;KACV,QAAQ,CAAC,mEAAmE,CAAC,CAAC;AAEjF,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,EAAE;KACV,QAAQ,CACP,4GAA4G,CAC7G,CAAC;AAEJ,MAAM,kBAAkB,GAAG;IACzB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC3E,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QA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