@gempack/squad-mcp 0.8.2 → 0.10.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +7 -4
- package/CHANGELOG.md +92 -0
- package/README.md +41 -35
- package/agents/senior-debugger.md +85 -0
- package/commands/debug.md +22 -0
- package/commands/stats.md +22 -0
- package/dist/config/ownership-matrix.d.ts +1 -1
- package/dist/config/ownership-matrix.js +16 -0
- package/dist/config/ownership-matrix.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-loader.js +1 -0
- package/dist/resources/agent-loader.js.map +1 -1
- package/dist/runs/aggregate.d.ts +166 -0
- package/dist/runs/aggregate.js +378 -0
- package/dist/runs/aggregate.js.map +1 -0
- package/dist/runs/store.d.ts +328 -0
- package/dist/runs/store.js +406 -0
- package/dist/runs/store.js.map +1 -0
- package/dist/tools/list-runs.d.ts +52 -0
- package/dist/tools/list-runs.js +142 -0
- package/dist/tools/list-runs.js.map +1 -0
- package/dist/tools/record-run.d.ts +202 -0
- package/dist/tools/record-run.js +124 -0
- package/dist/tools/record-run.js.map +1 -0
- package/dist/tools/registry.js +15 -1
- package/dist/tools/registry.js.map +1 -1
- package/dist/util/path-safety.d.ts +36 -0
- package/dist/util/path-safety.js +76 -0
- package/dist/util/path-safety.js.map +1 -1
- package/package.json +1 -1
- package/skills/brainstorm/SKILL.md +70 -7
- package/skills/debug/SKILL.md +345 -0
- package/skills/question/SKILL.md +73 -1
- package/skills/squad/SKILL.md +83 -0
- package/skills/stats/SKILL.md +189 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDef } from "./registry.js";
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
workspace_root: z.ZodEffects<z.ZodString, string, string>;
|
|
5
|
+
record: z.ZodObject<{
|
|
6
|
+
schema_version: z.ZodLiteral<1>;
|
|
7
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
8
|
+
status: z.ZodEnum<["in_flight", "completed", "aborted"]>;
|
|
9
|
+
started_at: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
completed_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
11
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
invocation: z.ZodEnum<["implement", "review", "task", "question", "brainstorm", "debug"]>;
|
|
13
|
+
mode: z.ZodEnum<["quick", "normal", "deep"]>;
|
|
14
|
+
mode_source: z.ZodEnum<["user", "auto"]>;
|
|
15
|
+
work_type: z.ZodOptional<z.ZodEnum<["Feature", "Bug Fix", "Refactor", "Performance", "Security", "Business Rule"]>>;
|
|
16
|
+
git_ref: z.ZodNullable<z.ZodObject<{
|
|
17
|
+
kind: z.ZodEnum<["head", "diff_base", "pr_head"]>;
|
|
18
|
+
value: z.ZodEffects<z.ZodString, string, string>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
value: string;
|
|
21
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
22
|
+
}, {
|
|
23
|
+
value: string;
|
|
24
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
25
|
+
}>>;
|
|
26
|
+
files_count: z.ZodNumber;
|
|
27
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
28
|
+
name: z.ZodEnum<[import("../config/ownership-matrix.js").AgentName, ...import("../config/ownership-matrix.js").AgentName[]]>;
|
|
29
|
+
model: z.ZodEnum<["haiku", "sonnet", "opus", "inherit"]>;
|
|
30
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
severity_score: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
batch_duration_ms: z.ZodNumber;
|
|
33
|
+
prompt_chars: z.ZodNumber;
|
|
34
|
+
response_chars: z.ZodNumber;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
37
|
+
score: number | null;
|
|
38
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
39
|
+
severity_score: number | null;
|
|
40
|
+
batch_duration_ms: number;
|
|
41
|
+
prompt_chars: number;
|
|
42
|
+
response_chars: number;
|
|
43
|
+
}, {
|
|
44
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
45
|
+
score: number | null;
|
|
46
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
47
|
+
severity_score: number | null;
|
|
48
|
+
batch_duration_ms: number;
|
|
49
|
+
prompt_chars: number;
|
|
50
|
+
response_chars: number;
|
|
51
|
+
}>, "many">;
|
|
52
|
+
verdict: z.ZodOptional<z.ZodNullable<z.ZodEnum<["APPROVED", "CHANGES_REQUIRED", "REJECTED"]>>>;
|
|
53
|
+
weighted_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
54
|
+
est_tokens_method: z.ZodLiteral<"chars-div-3.5">;
|
|
55
|
+
mode_warning: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
+
code: z.ZodEffects<z.ZodString, string, string>;
|
|
57
|
+
message: z.ZodEffects<z.ZodString, string, string>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
code: string;
|
|
60
|
+
message: string;
|
|
61
|
+
}, {
|
|
62
|
+
code: string;
|
|
63
|
+
message: string;
|
|
64
|
+
}>>>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
files_count: number;
|
|
67
|
+
status: "aborted" | "in_flight" | "completed";
|
|
68
|
+
agents: {
|
|
69
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
70
|
+
score: number | null;
|
|
71
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
72
|
+
severity_score: number | null;
|
|
73
|
+
batch_duration_ms: number;
|
|
74
|
+
prompt_chars: number;
|
|
75
|
+
response_chars: number;
|
|
76
|
+
}[];
|
|
77
|
+
mode: "quick" | "normal" | "deep";
|
|
78
|
+
id: string;
|
|
79
|
+
invocation: "debug" | "review" | "task" | "implement" | "question" | "brainstorm";
|
|
80
|
+
schema_version: 1;
|
|
81
|
+
started_at: string;
|
|
82
|
+
mode_source: "user" | "auto";
|
|
83
|
+
git_ref: {
|
|
84
|
+
value: string;
|
|
85
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
86
|
+
} | null;
|
|
87
|
+
est_tokens_method: "chars-div-3.5";
|
|
88
|
+
work_type?: "Feature" | "Bug Fix" | "Refactor" | "Performance" | "Security" | "Business Rule" | undefined;
|
|
89
|
+
duration_ms?: number | undefined;
|
|
90
|
+
weighted_score?: number | null | undefined;
|
|
91
|
+
completed_at?: string | undefined;
|
|
92
|
+
verdict?: "APPROVED" | "CHANGES_REQUIRED" | "REJECTED" | null | undefined;
|
|
93
|
+
mode_warning?: {
|
|
94
|
+
code: string;
|
|
95
|
+
message: string;
|
|
96
|
+
} | null | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
files_count: number;
|
|
99
|
+
status: "aborted" | "in_flight" | "completed";
|
|
100
|
+
agents: {
|
|
101
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
102
|
+
score: number | null;
|
|
103
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
104
|
+
severity_score: number | null;
|
|
105
|
+
batch_duration_ms: number;
|
|
106
|
+
prompt_chars: number;
|
|
107
|
+
response_chars: number;
|
|
108
|
+
}[];
|
|
109
|
+
mode: "quick" | "normal" | "deep";
|
|
110
|
+
id: string;
|
|
111
|
+
invocation: "debug" | "review" | "task" | "implement" | "question" | "brainstorm";
|
|
112
|
+
schema_version: 1;
|
|
113
|
+
started_at: string;
|
|
114
|
+
mode_source: "user" | "auto";
|
|
115
|
+
git_ref: {
|
|
116
|
+
value: string;
|
|
117
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
118
|
+
} | null;
|
|
119
|
+
est_tokens_method: "chars-div-3.5";
|
|
120
|
+
work_type?: "Feature" | "Bug Fix" | "Refactor" | "Performance" | "Security" | "Business Rule" | undefined;
|
|
121
|
+
duration_ms?: number | undefined;
|
|
122
|
+
weighted_score?: number | null | undefined;
|
|
123
|
+
completed_at?: string | undefined;
|
|
124
|
+
verdict?: "APPROVED" | "CHANGES_REQUIRED" | "REJECTED" | null | undefined;
|
|
125
|
+
mode_warning?: {
|
|
126
|
+
code: string;
|
|
127
|
+
message: string;
|
|
128
|
+
} | null | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
workspace_root: string;
|
|
132
|
+
record: {
|
|
133
|
+
files_count: number;
|
|
134
|
+
status: "aborted" | "in_flight" | "completed";
|
|
135
|
+
agents: {
|
|
136
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
137
|
+
score: number | null;
|
|
138
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
139
|
+
severity_score: number | null;
|
|
140
|
+
batch_duration_ms: number;
|
|
141
|
+
prompt_chars: number;
|
|
142
|
+
response_chars: number;
|
|
143
|
+
}[];
|
|
144
|
+
mode: "quick" | "normal" | "deep";
|
|
145
|
+
id: string;
|
|
146
|
+
invocation: "debug" | "review" | "task" | "implement" | "question" | "brainstorm";
|
|
147
|
+
schema_version: 1;
|
|
148
|
+
started_at: string;
|
|
149
|
+
mode_source: "user" | "auto";
|
|
150
|
+
git_ref: {
|
|
151
|
+
value: string;
|
|
152
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
153
|
+
} | null;
|
|
154
|
+
est_tokens_method: "chars-div-3.5";
|
|
155
|
+
work_type?: "Feature" | "Bug Fix" | "Refactor" | "Performance" | "Security" | "Business Rule" | undefined;
|
|
156
|
+
duration_ms?: number | undefined;
|
|
157
|
+
weighted_score?: number | null | undefined;
|
|
158
|
+
completed_at?: string | undefined;
|
|
159
|
+
verdict?: "APPROVED" | "CHANGES_REQUIRED" | "REJECTED" | null | undefined;
|
|
160
|
+
mode_warning?: {
|
|
161
|
+
code: string;
|
|
162
|
+
message: string;
|
|
163
|
+
} | null | undefined;
|
|
164
|
+
};
|
|
165
|
+
}, {
|
|
166
|
+
workspace_root: string;
|
|
167
|
+
record: {
|
|
168
|
+
files_count: number;
|
|
169
|
+
status: "aborted" | "in_flight" | "completed";
|
|
170
|
+
agents: {
|
|
171
|
+
name: import("../config/ownership-matrix.js").AgentName;
|
|
172
|
+
score: number | null;
|
|
173
|
+
model: "haiku" | "inherit" | "sonnet" | "opus";
|
|
174
|
+
severity_score: number | null;
|
|
175
|
+
batch_duration_ms: number;
|
|
176
|
+
prompt_chars: number;
|
|
177
|
+
response_chars: number;
|
|
178
|
+
}[];
|
|
179
|
+
mode: "quick" | "normal" | "deep";
|
|
180
|
+
id: string;
|
|
181
|
+
invocation: "debug" | "review" | "task" | "implement" | "question" | "brainstorm";
|
|
182
|
+
schema_version: 1;
|
|
183
|
+
started_at: string;
|
|
184
|
+
mode_source: "user" | "auto";
|
|
185
|
+
git_ref: {
|
|
186
|
+
value: string;
|
|
187
|
+
kind: "head" | "diff_base" | "pr_head";
|
|
188
|
+
} | null;
|
|
189
|
+
est_tokens_method: "chars-div-3.5";
|
|
190
|
+
work_type?: "Feature" | "Bug Fix" | "Refactor" | "Performance" | "Security" | "Business Rule" | undefined;
|
|
191
|
+
duration_ms?: number | undefined;
|
|
192
|
+
weighted_score?: number | null | undefined;
|
|
193
|
+
completed_at?: string | undefined;
|
|
194
|
+
verdict?: "APPROVED" | "CHANGES_REQUIRED" | "REJECTED" | null | undefined;
|
|
195
|
+
mode_warning?: {
|
|
196
|
+
code: string;
|
|
197
|
+
message: string;
|
|
198
|
+
} | null | undefined;
|
|
199
|
+
};
|
|
200
|
+
}>;
|
|
201
|
+
export declare const recordRunToolDef: ToolDef<typeof schema>;
|
|
202
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { SafeString } from "./_shared/schemas.js";
|
|
3
|
+
import { AGENT_NAMES_TUPLE } from "../config/ownership-matrix.js";
|
|
4
|
+
import { appendRun, INVOCATION_VALUES } from "../runs/store.js";
|
|
5
|
+
/**
|
|
6
|
+
* SINGLE WRITER CONTRACT (plan v4, cycle 2 architect A-4; extended in v0.10.0,
|
|
7
|
+
* v0.10.1).
|
|
8
|
+
*
|
|
9
|
+
* Legitimate callers of this tool are skills that own a two-phase lifecycle:
|
|
10
|
+
*
|
|
11
|
+
* - `skills/squad/SKILL.md` (v0.9.0+) — Phase 1 `in_flight` + Phase 10
|
|
12
|
+
* terminal pair for `/squad:implement` and `/squad:review` runs
|
|
13
|
+
* (invocations: `implement`, `review`, `task`).
|
|
14
|
+
* - `skills/debug/SKILL.md` (v0.10.0+) — Phase A `in_flight` + Phase C
|
|
15
|
+
* terminal pair for `/squad:debug` runs (invocation: `debug`).
|
|
16
|
+
* - `skills/question/SKILL.md` (v0.10.1+) — Phase 1.5 `in_flight` + Phase
|
|
17
|
+
* 3.5 terminal pair for `/squad:question` runs (invocation: `question`).
|
|
18
|
+
* - `skills/brainstorm/SKILL.md` (v0.10.1+) — Step 1.5 `in_flight` + Step
|
|
19
|
+
* 5.5 terminal pair for `/brainstorm` runs (invocation: `brainstorm`).
|
|
20
|
+
*
|
|
21
|
+
* Any other caller is a bug. The two-phase write pair is the transactional
|
|
22
|
+
* unit; emitting terminal rows from any other path (notably
|
|
23
|
+
* `apply_consolidation_rules`) breaks the `(in_flight, completed)` pair-by-id
|
|
24
|
+
* invariant that the aggregator relies on for stranded-run detection.
|
|
25
|
+
*
|
|
26
|
+
* Two phases of the skill's lifecycle:
|
|
27
|
+
*
|
|
28
|
+
* - **Phase 1 end** — skill writes `status: "in_flight"` with the static
|
|
29
|
+
* fields it knows (`id`, `started_at`, `mode`, `mode_source`, `work_type`,
|
|
30
|
+
* `git_ref`, `files_count`, `agents: [{name, model}]`). Scores, durations,
|
|
31
|
+
* verdict, and char counts are still pending.
|
|
32
|
+
*
|
|
33
|
+
* - **Phase 10 end** — skill writes `status: "completed" | "aborted"`
|
|
34
|
+
* carrying the full agent metrics + verdict + weighted_score. Same `id`
|
|
35
|
+
* as the in_flight row; aggregator pairs them.
|
|
36
|
+
*
|
|
37
|
+
* If `record_run` throws on the Phase 10 finalisation, the skill writes a
|
|
38
|
+
* second row with `status: "aborted"` and `mode_warning: { code:
|
|
39
|
+
* "RECORD_FAILED", message: <reason> }` so the in_flight row never strands.
|
|
40
|
+
* The skill's non-blocking try/catch covers I/O errors silently and surfaces
|
|
41
|
+
* security-class SquadError codes to the user (Security #7).
|
|
42
|
+
*/
|
|
43
|
+
// Re-use the runs store's Zod tuple via the shared schema definitions.
|
|
44
|
+
// We can't import the runRecordSchema directly because it's a structured
|
|
45
|
+
// instance; instead we redefine the inputs here as the tool boundary. The
|
|
46
|
+
// store re-validates inside `appendRun`, so any drift between the two
|
|
47
|
+
// schemas trips at the store layer rather than silently passing.
|
|
48
|
+
const InvocationEnum = z.enum(INVOCATION_VALUES);
|
|
49
|
+
const ModeEnum = z.enum(["quick", "normal", "deep"]);
|
|
50
|
+
const ModeSourceEnum = z.enum(["user", "auto"]);
|
|
51
|
+
const StatusEnum = z.enum(["in_flight", "completed", "aborted"]);
|
|
52
|
+
const WorkTypeEnum = z.enum([
|
|
53
|
+
"Feature",
|
|
54
|
+
"Bug Fix",
|
|
55
|
+
"Refactor",
|
|
56
|
+
"Performance",
|
|
57
|
+
"Security",
|
|
58
|
+
"Business Rule",
|
|
59
|
+
]);
|
|
60
|
+
const VerdictEnum = z.enum(["APPROVED", "CHANGES_REQUIRED", "REJECTED"]);
|
|
61
|
+
const ModelEnum = z.enum(["haiku", "sonnet", "opus", "inherit"]);
|
|
62
|
+
const AgentMetricsSchema = z.object({
|
|
63
|
+
name: z.enum(AGENT_NAMES_TUPLE),
|
|
64
|
+
model: ModelEnum,
|
|
65
|
+
score: z.number().int().min(0).max(100).nullable(),
|
|
66
|
+
severity_score: z.number().int().min(0).max(9999).nullable(),
|
|
67
|
+
batch_duration_ms: z.number().int().nonnegative().finite(),
|
|
68
|
+
prompt_chars: z.number().int().nonnegative().finite(),
|
|
69
|
+
response_chars: z.number().int().nonnegative().finite(),
|
|
70
|
+
});
|
|
71
|
+
const schema = z.object({
|
|
72
|
+
workspace_root: SafeString(4096),
|
|
73
|
+
record: z.object({
|
|
74
|
+
schema_version: z.literal(1),
|
|
75
|
+
id: SafeString(40),
|
|
76
|
+
status: StatusEnum,
|
|
77
|
+
started_at: SafeString(40),
|
|
78
|
+
completed_at: SafeString(40).optional(),
|
|
79
|
+
duration_ms: z.number().int().nonnegative().finite().optional(),
|
|
80
|
+
invocation: InvocationEnum,
|
|
81
|
+
mode: ModeEnum,
|
|
82
|
+
mode_source: ModeSourceEnum,
|
|
83
|
+
work_type: WorkTypeEnum.optional(),
|
|
84
|
+
git_ref: z
|
|
85
|
+
.object({
|
|
86
|
+
kind: z.enum(["head", "diff_base", "pr_head"]),
|
|
87
|
+
value: SafeString(200),
|
|
88
|
+
})
|
|
89
|
+
.nullable(),
|
|
90
|
+
files_count: z.number().int().nonnegative().finite(),
|
|
91
|
+
agents: z.array(AgentMetricsSchema).max(20),
|
|
92
|
+
verdict: VerdictEnum.nullable().optional(),
|
|
93
|
+
weighted_score: z.number().min(0).max(100).nullable().optional(),
|
|
94
|
+
est_tokens_method: z.literal("chars-div-3.5"),
|
|
95
|
+
mode_warning: z
|
|
96
|
+
.object({
|
|
97
|
+
code: SafeString(64),
|
|
98
|
+
message: SafeString(512),
|
|
99
|
+
})
|
|
100
|
+
.nullable()
|
|
101
|
+
.optional(),
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
async function handler(input) {
|
|
105
|
+
const result = await appendRun(input.workspace_root, input.record);
|
|
106
|
+
return {
|
|
107
|
+
ok: true,
|
|
108
|
+
file: result.filePath,
|
|
109
|
+
id: result.record.id,
|
|
110
|
+
status: result.record.status,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export const recordRunToolDef = {
|
|
114
|
+
name: "record_run",
|
|
115
|
+
description: "Append one RunRecord to .squad/runs.jsonl. Single-writer contract: only the lifecycle-owning " +
|
|
116
|
+
"skills should call this — squad (Phase 1 + Phase 10), debug (Phase A + Phase C), question " +
|
|
117
|
+
"(Phase 1.5 + Phase 3.5), brainstorm (Step 1.5 + Step 5.5). Validates against the RunRecord " +
|
|
118
|
+
"schema_version:1 and enforces MAX_RECORD_BYTES (4000) via RECORD_TOO_LARGE on overflow. " +
|
|
119
|
+
"Caller is responsible for matching in_flight↔terminal rows by id. File mode is 0o600 " +
|
|
120
|
+
"(user-only) on first create. mode_warning.message is stripped of control chars at write time.",
|
|
121
|
+
schema,
|
|
122
|
+
handler,
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=record-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-run.js","sourceRoot":"","sources":["../../src/tools/record-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAkB,MAAM,kBAAkB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,uEAAuE;AACvE,yEAAyE;AACzE,0EAA0E;AAC1E,sEAAsE;AACtE,iEAAiE;AAEjE,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AACrD,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAChD,MA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EAAE,UAAU,CAAC,EAAE,CAAC;YACpB,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC;SACzB,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,EAAE;KACd,CAAC;CACH,CAAC,CAAC;AAWH,KAAK,UAAU,OAAO,CAAC,KAAY;IACjC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,MAAmB,CAAC,CAAC;IAChF,OAAO;QACL,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,MAAM,CAAC,QAAQ;QACrB,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE;QACpB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;KAC7B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,+FAA+F;QAC/F,4FAA4F;QAC5F,6FAA6F;QAC7F,0FAA0F;QAC1F,uFAAuF;QACvF,+FAA+F;IACjG,MAAM;IACN,OAAO;CACR,CAAC"}
|
package/dist/tools/registry.js
CHANGED
|
@@ -20,7 +20,10 @@ import { detectChangedFilesTool } from "./detect-changed-files.js";
|
|
|
20
20
|
import { validatePlanTextTool } from "./validate-plan-text.js";
|
|
21
21
|
import { composeSquadWorkflowTool } from "./compose-squad-workflow.js";
|
|
22
22
|
import { composeAdvisoryBundleTool } from "./compose-advisory-bundle.js";
|
|
23
|
+
import { recordRunToolDef } from "./record-run.js";
|
|
24
|
+
import { listRunsToolDef } from "./list-runs.js";
|
|
23
25
|
import { isSquadError } from "../errors.js";
|
|
26
|
+
import { pathSafe, pathSafeDetails } from "../util/path-safety.js";
|
|
24
27
|
import { logger, newRequestId } from "../observability/logger.js";
|
|
25
28
|
const tools = new Map();
|
|
26
29
|
export function register(def) {
|
|
@@ -50,6 +53,8 @@ export function registerTools() {
|
|
|
50
53
|
register(validatePlanTextTool);
|
|
51
54
|
register(composeSquadWorkflowTool);
|
|
52
55
|
register(composeAdvisoryBundleTool);
|
|
56
|
+
register(recordRunToolDef);
|
|
57
|
+
register(listRunsToolDef);
|
|
53
58
|
}
|
|
54
59
|
export function listTools() {
|
|
55
60
|
return Array.from(tools.values()).map((t) => ({
|
|
@@ -145,8 +150,17 @@ export async function dispatchTool(name, args) {
|
|
|
145
150
|
duration_ms,
|
|
146
151
|
error_code: err.code,
|
|
147
152
|
});
|
|
153
|
+
// Sanitize absolute filesystem paths before the payload crosses the MCP
|
|
154
|
+
// dispatch boundary to the (potentially untrusted) client. The in-
|
|
155
|
+
// process SquadError still carries full paths for local debug; only
|
|
156
|
+
// this serialised copy is truncated. See path-safety.ts:pathSafe for
|
|
157
|
+
// the truncation shape (last 3 segments with `…/` prefix).
|
|
148
158
|
return asToolErrorResponse({
|
|
149
|
-
error: {
|
|
159
|
+
error: {
|
|
160
|
+
code: err.code,
|
|
161
|
+
message: pathSafe(err.message),
|
|
162
|
+
details: pathSafeDetails(err.details),
|
|
163
|
+
},
|
|
150
164
|
});
|
|
151
165
|
}
|
|
152
166
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAc,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;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QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC/D,IAAI,MAAM,YAAY,CAAC,CAAC,QAAQ;QAC9B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACnE,IAAI,MAAM,YAAY,CAAC,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;IACjF,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW;QAAE,OAAO,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7E,IAAI,MAAM,YAAY,CAAC,CAAC,UAAU;QAAE,OAAO,eAAe,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;IACnF,IAAI,MAAM,YAAY,CAAC,CAAC,UAAU;QAAE,OAAO,eAAe,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;IAC/E,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
export declare const MAX_BYTES = 16384;
|
|
2
|
+
/**
|
|
3
|
+
* Truncate absolute filesystem paths inside a string to their last 3 segments,
|
|
4
|
+
* with a `…/` prefix indicating truncation. Used by the MCP dispatch boundary
|
|
5
|
+
* (`src/tools/registry.ts`) to sanitise `SquadError.message` and
|
|
6
|
+
* `SquadError.details` before they leave the server to a (potentially
|
|
7
|
+
* untrusted) MCP client.
|
|
8
|
+
*
|
|
9
|
+
* Why: error messages routinely embed `workspaceRoot` or absolute file paths
|
|
10
|
+
* (e.g. `failed to read runs file /home/<user>/work/some-repo/.squad/runs.jsonl`).
|
|
11
|
+
* The full path leaks the local user's home directory and folder layout —
|
|
12
|
+
* useful debug context, but a sidechannel for username discovery if an MCP
|
|
13
|
+
* client logs or relays error payloads.
|
|
14
|
+
*
|
|
15
|
+
* The transform is purely cosmetic — the `SquadError` itself, in-process,
|
|
16
|
+
* still carries the full path for local debugging. Only the serialised
|
|
17
|
+
* payload that crosses the dispatch boundary is sanitised.
|
|
18
|
+
*
|
|
19
|
+
* Recognised path shapes (handled non-greedily so multiple paths in one
|
|
20
|
+
* string each truncate independently):
|
|
21
|
+
*
|
|
22
|
+
* - POSIX absolute: `/foo/bar/baz/qux/file.ts` → `…/baz/qux/file.ts`
|
|
23
|
+
* - Windows drive: `C:\foo\bar\baz\qux\file.ts` → `…/baz/qux/file.ts`
|
|
24
|
+
*
|
|
25
|
+
* Paths with fewer than 4 non-empty segments do not match the pattern (the
|
|
26
|
+
* regex requires at least two interior separators) and are returned as-is.
|
|
27
|
+
* Already-truncated paths (begin with `…/`) are idempotent under this
|
|
28
|
+
* function (lookbehind prevents re-matching).
|
|
29
|
+
*/
|
|
30
|
+
export declare function pathSafe(s: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Recursively apply `pathSafe` to every string leaf in an error-details
|
|
33
|
+
* payload. Top-level wrapper for `SquadError.details` sanitisation at the
|
|
34
|
+
* dispatch boundary. Returns a deep-cloned object — the in-process error
|
|
35
|
+
* is not mutated.
|
|
36
|
+
*/
|
|
37
|
+
export declare function pathSafeDetails(details: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
|
|
2
38
|
export interface SafePathContext {
|
|
3
39
|
rootRealCache: Map<string, string>;
|
|
4
40
|
}
|
package/dist/util/path-safety.js
CHANGED
|
@@ -3,6 +3,82 @@ import path from "node:path";
|
|
|
3
3
|
import { SquadError } from "../errors.js";
|
|
4
4
|
import { rejectIfMalformed, realpathOrSelf } from "./path-internal.js";
|
|
5
5
|
export const MAX_BYTES = 16_384;
|
|
6
|
+
/**
|
|
7
|
+
* Truncate absolute filesystem paths inside a string to their last 3 segments,
|
|
8
|
+
* with a `…/` prefix indicating truncation. Used by the MCP dispatch boundary
|
|
9
|
+
* (`src/tools/registry.ts`) to sanitise `SquadError.message` and
|
|
10
|
+
* `SquadError.details` before they leave the server to a (potentially
|
|
11
|
+
* untrusted) MCP client.
|
|
12
|
+
*
|
|
13
|
+
* Why: error messages routinely embed `workspaceRoot` or absolute file paths
|
|
14
|
+
* (e.g. `failed to read runs file /home/<user>/work/some-repo/.squad/runs.jsonl`).
|
|
15
|
+
* The full path leaks the local user's home directory and folder layout —
|
|
16
|
+
* useful debug context, but a sidechannel for username discovery if an MCP
|
|
17
|
+
* client logs or relays error payloads.
|
|
18
|
+
*
|
|
19
|
+
* The transform is purely cosmetic — the `SquadError` itself, in-process,
|
|
20
|
+
* still carries the full path for local debugging. Only the serialised
|
|
21
|
+
* payload that crosses the dispatch boundary is sanitised.
|
|
22
|
+
*
|
|
23
|
+
* Recognised path shapes (handled non-greedily so multiple paths in one
|
|
24
|
+
* string each truncate independently):
|
|
25
|
+
*
|
|
26
|
+
* - POSIX absolute: `/foo/bar/baz/qux/file.ts` → `…/baz/qux/file.ts`
|
|
27
|
+
* - Windows drive: `C:\foo\bar\baz\qux\file.ts` → `…/baz/qux/file.ts`
|
|
28
|
+
*
|
|
29
|
+
* Paths with fewer than 4 non-empty segments do not match the pattern (the
|
|
30
|
+
* regex requires at least two interior separators) and are returned as-is.
|
|
31
|
+
* Already-truncated paths (begin with `…/`) are idempotent under this
|
|
32
|
+
* function (lookbehind prevents re-matching).
|
|
33
|
+
*/
|
|
34
|
+
export function pathSafe(s) {
|
|
35
|
+
if (typeof s !== "string" || s.length === 0)
|
|
36
|
+
return s;
|
|
37
|
+
// POSIX absolute path: starts with /, captures everything until a whitespace,
|
|
38
|
+
// quote, or message-formatting boundary. The `(?<!…)` lookbehind prevents
|
|
39
|
+
// re-matching after an already-truncated `…/` prefix (idempotency).
|
|
40
|
+
const posix = /(?<!…)\/(?:[A-Za-z0-9._-][^\s'"`<>:,)\]]*\/)+[A-Za-z0-9._-][^\s'"`<>:,)\]]*/g;
|
|
41
|
+
// Windows drive path: drive letter + colon + backslash, captured similarly.
|
|
42
|
+
// Note: the Windows segment char-class adds a space (`[A-Za-z0-9._ -]` vs
|
|
43
|
+
// POSIX's `[A-Za-z0-9._-]`) because Windows directory names commonly contain
|
|
44
|
+
// spaces (`C:\Program Files\...`). POSIX paths conventionally do not, so
|
|
45
|
+
// the asymmetry is intentional, not a copy-paste oversight.
|
|
46
|
+
const win = /[A-Za-z]:\\(?:[A-Za-z0-9._ -][^\s'"`<>:,)\]]*\\)+[A-Za-z0-9._ -][^\s'"`<>:,)\]]*/g;
|
|
47
|
+
const truncate = (match, sep) => {
|
|
48
|
+
// Drop empty leading segment from absolute paths (leading `/` gives `""`).
|
|
49
|
+
const segments = match.split(sep).filter((p) => p.length > 0);
|
|
50
|
+
if (segments.length <= 3)
|
|
51
|
+
return match;
|
|
52
|
+
return "…/" + segments.slice(-3).join("/");
|
|
53
|
+
};
|
|
54
|
+
return s.replace(posix, (m) => truncate(m, "/")).replace(win, (m) => truncate(m, "\\"));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Recursively apply `pathSafe` to every string leaf in an error-details
|
|
58
|
+
* payload. Top-level wrapper for `SquadError.details` sanitisation at the
|
|
59
|
+
* dispatch boundary. Returns a deep-cloned object — the in-process error
|
|
60
|
+
* is not mutated.
|
|
61
|
+
*/
|
|
62
|
+
export function pathSafeDetails(details) {
|
|
63
|
+
if (details === undefined)
|
|
64
|
+
return undefined;
|
|
65
|
+
const out = {};
|
|
66
|
+
for (const [k, v] of Object.entries(details)) {
|
|
67
|
+
if (typeof v === "string") {
|
|
68
|
+
out[k] = pathSafe(v);
|
|
69
|
+
}
|
|
70
|
+
else if (Array.isArray(v)) {
|
|
71
|
+
out[k] = v.map((item) => (typeof item === "string" ? pathSafe(item) : item));
|
|
72
|
+
}
|
|
73
|
+
else if (v !== null && typeof v === "object") {
|
|
74
|
+
out[k] = pathSafeDetails(v);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
out[k] = v;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
6
82
|
export function createSafePathContext() {
|
|
7
83
|
return { rootRealCache: new Map() };
|
|
8
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-safety.js","sourceRoot":"","sources":["../../src/util/path-safety.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"path-safety.js","sourceRoot":"","sources":["../../src/util/path-safety.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtD,8EAA8E;IAC9E,0EAA0E;IAC1E,oEAAoE;IACpE,MAAM,KAAK,GAAG,8EAA8E,CAAC;IAC7F,4EAA4E;IAC5E,0EAA0E;IAC1E,6EAA6E;IAC7E,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,GAAG,GAAG,mFAAmF,CAAC;IAChG,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,GAAW,EAAU,EAAE;QACtD,2EAA2E;QAC3E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