@gajae-code/coding-agent 0.11.8 → 0.11.10
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/CHANGELOG.md +35 -1
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/config/model-profiles.d.ts +2 -3
- package/dist/types/config/model-registry.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +12 -5
- package/dist/types/gjc-runtime/deep-interview-draft.d.ts +8 -0
- package/dist/types/gjc-runtime/deep-interview-payload.d.ts +41 -0
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +32 -17
- package/dist/types/gjc-runtime/deep-interview-repair.d.ts +17 -0
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +135 -4
- package/dist/types/gjc-runtime/state-writer.d.ts +45 -0
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +5 -3
- package/dist/types/modes/components/welcome.d.ts +2 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +16 -8
- package/dist/types/runtime-mcp/redaction.d.ts +2 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +3 -1
- package/dist/types/sdk/bus/daemon-paths.d.ts +1 -0
- package/dist/types/sdk/bus/index.d.ts +8 -1
- package/dist/types/sdk/bus/operator-runtime.d.ts +1 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +14 -7
- package/dist/types/sdk/bus/telegram-daemon.d.ts +74 -5
- package/dist/types/sdk/session.d.ts +7 -0
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/session/internal/managed-session-scope.d.ts +13 -3
- package/dist/types/session/internal/managed-session-storage.d.ts +8 -3
- package/dist/types/session/session-manager.d.ts +5 -1
- package/dist/types/session/session-storage.d.ts +13 -0
- package/dist/types/skill-state/active-state.d.ts +4 -0
- package/dist/types/task/provider-retry-status.d.ts +13 -0
- package/dist/types/task/types.d.ts +3 -0
- package/dist/types/tools/index.d.ts +3 -1
- package/package.json +8 -8
- package/scripts/generate-sdk-operation-inventory.ts +1 -0
- package/src/cli/mcp-cli.ts +4 -21
- package/src/cli/notify-cli.ts +1 -0
- package/src/cli.ts +32 -0
- package/src/commands/deep-interview.ts +9 -4
- package/src/commit/agentic/index.ts +3 -3
- package/src/commit/map-reduce/index.ts +2 -2
- package/src/config/model-profiles.ts +9 -10
- package/src/config/model-registry.ts +4 -2
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +78 -163
- package/src/eval/js/tool-bridge.ts +1 -1
- package/src/gjc-runtime/deep-interview-ambiguity.ts +68 -47
- package/src/gjc-runtime/deep-interview-draft.ts +843 -0
- package/src/gjc-runtime/deep-interview-payload.ts +262 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +310 -227
- package/src/gjc-runtime/deep-interview-repair.ts +1674 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +264 -103
- package/src/gjc-runtime/deep-interview-state.ts +916 -4
- package/src/gjc-runtime/ralplan-runtime.ts +3 -1
- package/src/gjc-runtime/state-writer.ts +166 -2
- package/src/gjc-runtime/workflow-manifest.generated.json +386 -1
- package/src/gjc-runtime/workflow-manifest.ts +191 -5
- package/src/hooks/skill-state.ts +23 -1
- package/src/internal-urls/docs-index.generated.ts +6 -5
- package/src/modes/components/welcome.ts +10 -2
- package/src/modes/controllers/selector-controller.ts +38 -8
- package/src/modes/interactive-mode.ts +29 -9
- package/src/prompts/agent-fragments/restricted-bash.md +1 -1
- package/src/prompts/agents/architect.md +8 -1
- package/src/prompts/agents/critic.md +8 -1
- package/src/prompts/agents/planner.md +8 -1
- package/src/prompts/system/system-prompt.md +1 -0
- package/src/runtime-mcp/json-rpc.ts +7 -4
- package/src/runtime-mcp/redaction.ts +30 -0
- package/src/sdk/broker/identity.ts +22 -12
- package/src/sdk/broker/session-index.ts +11 -1
- package/src/sdk/bus/chat-daemon-control.ts +5 -3
- package/src/sdk/bus/daemon-paths.ts +2 -0
- package/src/sdk/bus/index.ts +60 -5
- package/src/sdk/bus/notification-service.ts +19 -5
- package/src/sdk/bus/operator-runtime.ts +31 -5
- package/src/sdk/bus/telegram-cli.ts +6 -13
- package/src/sdk/bus/telegram-daemon-cli.ts +8 -3
- package/src/sdk/bus/telegram-daemon-contract.ts +15 -7
- package/src/sdk/bus/telegram-daemon-control.ts +14 -5
- package/src/sdk/bus/telegram-daemon.ts +685 -120
- package/src/sdk/protocol/operation-inventory.generated.json +11 -0
- package/src/sdk/session.ts +12 -0
- package/src/session/agent-session.ts +140 -10
- package/src/session/internal/managed-session-scope.ts +339 -228
- package/src/session/internal/managed-session-storage.ts +17 -4
- package/src/session/session-manager.ts +96 -33
- package/src/session/session-storage.ts +23 -0
- package/src/skill-state/active-state.ts +10 -0
- package/src/skill-state/workflow-mutation-guard.ts +41 -7
- package/src/task/executor.ts +154 -44
- package/src/task/provider-retry-status.ts +88 -0
- package/src/task/render.ts +45 -26
- package/src/task/types.ts +3 -0
- package/src/tools/ask.ts +1 -0
- package/src/tools/bash-allowed-prefixes.ts +45 -1
- package/src/tools/index.ts +3 -1
- package/src/tools/subagent-render.ts +74 -16
- package/src/tools/subagent.ts +2 -0
- package/vendor/insane-search/MANIFEST.json +4 -1
- package/vendor/insane-search/engine/bias_check.py +5 -0
- package/vendor/insane-search/engine/fetch_chain.py +67 -1
- package/vendor/insane-search/engine/transport.py +13 -2
- package/vendor/insane-search/engine/validators.py +4 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TypeScript is the authoritative source of truth for GJC workflow manifests.
|
|
3
|
-
*
|
|
4
|
-
* hand-edited.
|
|
3
|
+
* Keep the checked-in JSON projection synchronized manually with this module.
|
|
5
4
|
*/
|
|
6
5
|
|
|
7
6
|
import { CANONICAL_GJC_WORKFLOW_SKILLS, type CanonicalGjcWorkflowSkill } from "../skill-state/canonical-skills";
|
|
@@ -23,7 +22,9 @@ export interface WorkflowVerb {
|
|
|
23
22
|
name: string;
|
|
24
23
|
planned?: boolean;
|
|
25
24
|
/** Invocation surface that exposes this verb in the real CLI parser. */
|
|
26
|
-
surface?: "state-action" | "command-positional" | "command-flag";
|
|
25
|
+
surface?: "state-action" | "command-positional" | "command-flag" | "draft-action";
|
|
26
|
+
/** Legacy surface retained for callers that have not migrated to normal typed commands. */
|
|
27
|
+
compatibilityOnly?: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface TypedArgSpec {
|
|
@@ -32,6 +33,7 @@ export interface TypedArgSpec {
|
|
|
32
33
|
enumValues?: string[];
|
|
33
34
|
required?: boolean;
|
|
34
35
|
appliesToVerbs?: string[];
|
|
36
|
+
compatibilityOnly?: boolean;
|
|
35
37
|
planned?: boolean;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -93,6 +95,9 @@ function stateVerbs(): WorkflowVerb[] {
|
|
|
93
95
|
function positionalVerbs(names: readonly string[]): WorkflowVerb[] {
|
|
94
96
|
return names.map(name => verb(name, "command-positional"));
|
|
95
97
|
}
|
|
98
|
+
function draftVerbs(names: readonly string[]): WorkflowVerb[] {
|
|
99
|
+
return names.map(name => verb(name, "draft-action"));
|
|
100
|
+
}
|
|
96
101
|
|
|
97
102
|
function flagVerbs(names: readonly string[]): WorkflowVerb[] {
|
|
98
103
|
return names.map(name => verb(name, "command-flag"));
|
|
@@ -160,19 +165,200 @@ export const WORKFLOW_MANIFEST: Record<CanonicalGjcWorkflowSkill, SkillManifest>
|
|
|
160
165
|
{ from: "handoff", to: "complete", verb: "clear" },
|
|
161
166
|
{ from: "interviewing", to: "complete", verb: "clear" },
|
|
162
167
|
],
|
|
163
|
-
verbs: [
|
|
168
|
+
verbs: [
|
|
169
|
+
...stateVerbs(),
|
|
170
|
+
...flagVerbs(["kickoff", "write-spec"]),
|
|
171
|
+
...draftVerbs(["draft create", "draft edit", "draft show", "draft check", "draft rebase", "draft discard"]),
|
|
172
|
+
...positionalVerbs([
|
|
173
|
+
"initialize-context",
|
|
174
|
+
"confirm-topology",
|
|
175
|
+
"record-answer",
|
|
176
|
+
"apply-round-result",
|
|
177
|
+
"inspect",
|
|
178
|
+
"sanity-check",
|
|
179
|
+
]),
|
|
180
|
+
...plannedVerbs(PLANNED_ADMIN_VERBS),
|
|
181
|
+
],
|
|
164
182
|
typedArgs: [
|
|
165
183
|
{ name: "quick", type: "boolean", appliesToVerbs: ["kickoff"] },
|
|
166
184
|
{ name: "standard", type: "boolean", appliesToVerbs: ["kickoff"] },
|
|
167
185
|
{ name: "deep", type: "boolean", appliesToVerbs: ["kickoff"] },
|
|
168
186
|
{ name: "threshold", type: "number", appliesToVerbs: ["kickoff"] },
|
|
169
187
|
{ name: "threshold-source", type: "string", appliesToVerbs: ["kickoff"] },
|
|
188
|
+
{ name: "trace", type: "boolean", appliesToVerbs: ["kickoff"] },
|
|
189
|
+
{ name: "json", type: "boolean", appliesToVerbs: ["kickoff", "write-spec"] },
|
|
170
190
|
{ name: "stage", type: "enum", enumValues: ["final"], appliesToVerbs: ["write-spec"] },
|
|
171
191
|
{ name: "slug", type: "string", appliesToVerbs: ["write-spec"] },
|
|
172
192
|
{ name: "spec", type: "string", required: true, appliesToVerbs: ["write-spec"] },
|
|
173
193
|
{ name: "handoff", type: "enum", enumValues: ["ralplan"], appliesToVerbs: ["write-spec"] },
|
|
174
194
|
{ name: "deliberate", type: "boolean", appliesToVerbs: ["write-spec"] },
|
|
175
|
-
{
|
|
195
|
+
{
|
|
196
|
+
name: "session-id",
|
|
197
|
+
type: "string",
|
|
198
|
+
required: true,
|
|
199
|
+
appliesToVerbs: ["draft create"],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "for",
|
|
203
|
+
type: "enum",
|
|
204
|
+
enumValues: ["initialize-context", "confirm-topology", "record-answer", "apply-round-result"],
|
|
205
|
+
required: true,
|
|
206
|
+
appliesToVerbs: ["draft create"],
|
|
207
|
+
},
|
|
208
|
+
{ name: "round-key", type: "string", appliesToVerbs: ["draft create"] },
|
|
209
|
+
{ name: "round", type: "number", appliesToVerbs: ["draft create"] },
|
|
210
|
+
{ name: "question-id", type: "string", appliesToVerbs: ["draft create"] },
|
|
211
|
+
{ name: "round-id", type: "string", appliesToVerbs: ["draft create"] },
|
|
212
|
+
{ name: "component-id", type: "string", appliesToVerbs: ["draft create"] },
|
|
213
|
+
{ name: "dimension", type: "string", appliesToVerbs: ["draft create"] },
|
|
214
|
+
{
|
|
215
|
+
name: "draft-id",
|
|
216
|
+
type: "string",
|
|
217
|
+
required: true,
|
|
218
|
+
appliesToVerbs: [
|
|
219
|
+
"draft edit",
|
|
220
|
+
"draft show",
|
|
221
|
+
"draft check",
|
|
222
|
+
"draft rebase",
|
|
223
|
+
"draft discard",
|
|
224
|
+
"initialize-context",
|
|
225
|
+
"confirm-topology",
|
|
226
|
+
"record-answer",
|
|
227
|
+
"apply-round-result",
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "expected-draft-revision",
|
|
232
|
+
type: "number",
|
|
233
|
+
required: true,
|
|
234
|
+
appliesToVerbs: [
|
|
235
|
+
"draft edit",
|
|
236
|
+
"draft rebase",
|
|
237
|
+
"draft discard",
|
|
238
|
+
"initialize-context",
|
|
239
|
+
"confirm-topology",
|
|
240
|
+
"record-answer",
|
|
241
|
+
"apply-round-result",
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: "op",
|
|
246
|
+
type: "enum",
|
|
247
|
+
enumValues: ["set", "append", "remove"],
|
|
248
|
+
required: true,
|
|
249
|
+
appliesToVerbs: ["draft edit"],
|
|
250
|
+
},
|
|
251
|
+
{ name: "path", type: "string", required: true, appliesToVerbs: ["draft edit"] },
|
|
252
|
+
{ name: "value", type: "string", appliesToVerbs: ["draft edit"] },
|
|
253
|
+
{ name: "value-file", type: "string", appliesToVerbs: ["draft edit"] },
|
|
254
|
+
{ name: "null", type: "boolean", appliesToVerbs: ["draft edit"] },
|
|
255
|
+
{ name: "to-state-revision", type: "number", required: true, appliesToVerbs: ["draft rebase"] },
|
|
256
|
+
{
|
|
257
|
+
name: "json",
|
|
258
|
+
type: "boolean",
|
|
259
|
+
required: true,
|
|
260
|
+
appliesToVerbs: [
|
|
261
|
+
"draft create",
|
|
262
|
+
"draft edit",
|
|
263
|
+
"draft show",
|
|
264
|
+
"draft check",
|
|
265
|
+
"draft rebase",
|
|
266
|
+
"draft discard",
|
|
267
|
+
"initialize-context",
|
|
268
|
+
"confirm-topology",
|
|
269
|
+
"record-answer",
|
|
270
|
+
"apply-round-result",
|
|
271
|
+
"inspect",
|
|
272
|
+
"sanity-check",
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: "session-id",
|
|
277
|
+
type: "string",
|
|
278
|
+
required: true,
|
|
279
|
+
appliesToVerbs: ["inspect", "sanity-check"],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "session-id",
|
|
283
|
+
type: "string",
|
|
284
|
+
required: true,
|
|
285
|
+
compatibilityOnly: true,
|
|
286
|
+
appliesToVerbs: ["initialize-context", "confirm-topology", "record-answer", "apply-round-result"],
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "schema-version",
|
|
290
|
+
type: "number",
|
|
291
|
+
required: true,
|
|
292
|
+
compatibilityOnly: true,
|
|
293
|
+
appliesToVerbs: ["initialize-context", "confirm-topology", "record-answer", "apply-round-result"],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "expected-revision",
|
|
297
|
+
type: "number",
|
|
298
|
+
required: true,
|
|
299
|
+
compatibilityOnly: true,
|
|
300
|
+
appliesToVerbs: ["initialize-context", "confirm-topology", "record-answer", "apply-round-result"],
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: "input-json",
|
|
304
|
+
type: "object",
|
|
305
|
+
required: true,
|
|
306
|
+
compatibilityOnly: true,
|
|
307
|
+
appliesToVerbs: ["initialize-context", "confirm-topology"],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: "round",
|
|
311
|
+
type: "number",
|
|
312
|
+
required: true,
|
|
313
|
+
compatibilityOnly: true,
|
|
314
|
+
appliesToVerbs: ["record-answer", "apply-round-result"],
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: "question-id",
|
|
318
|
+
type: "string",
|
|
319
|
+
required: true,
|
|
320
|
+
compatibilityOnly: true,
|
|
321
|
+
appliesToVerbs: ["record-answer", "apply-round-result"],
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: "round-id",
|
|
325
|
+
type: "string",
|
|
326
|
+
compatibilityOnly: true,
|
|
327
|
+
appliesToVerbs: ["record-answer", "apply-round-result"],
|
|
328
|
+
},
|
|
329
|
+
{ name: "component-id", type: "string", compatibilityOnly: true, appliesToVerbs: ["record-answer"] },
|
|
330
|
+
{ name: "dimension", type: "string", compatibilityOnly: true, appliesToVerbs: ["record-answer"] },
|
|
331
|
+
{
|
|
332
|
+
name: "answer-json",
|
|
333
|
+
type: "object",
|
|
334
|
+
required: true,
|
|
335
|
+
compatibilityOnly: true,
|
|
336
|
+
appliesToVerbs: ["record-answer"],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: "question-json",
|
|
340
|
+
type: "string",
|
|
341
|
+
required: true,
|
|
342
|
+
compatibilityOnly: true,
|
|
343
|
+
appliesToVerbs: ["record-answer"],
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: "result-json",
|
|
347
|
+
type: "object",
|
|
348
|
+
required: true,
|
|
349
|
+
compatibilityOnly: true,
|
|
350
|
+
appliesToVerbs: ["apply-round-result"],
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: "selector",
|
|
354
|
+
type: "enum",
|
|
355
|
+
enumValues: ["summary", "recent-scored", "pending", "round", "topology", "facts", "triggers", "floor"],
|
|
356
|
+
required: true,
|
|
357
|
+
appliesToVerbs: ["inspect"],
|
|
358
|
+
},
|
|
359
|
+
{ name: "round-key", type: "string", appliesToVerbs: ["inspect"] },
|
|
360
|
+
{ name: "cursor", type: "string", appliesToVerbs: ["inspect"] },
|
|
361
|
+
{ name: "limit", type: "number", appliesToVerbs: ["inspect"] },
|
|
176
362
|
{ name: "args", type: "string", planned: true },
|
|
177
363
|
{ name: "metadata-json", type: "string", planned: true },
|
|
178
364
|
],
|
package/src/hooks/skill-state.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as path from "node:path";
|
|
|
3
3
|
import { logger } from "@gajae-code/utils";
|
|
4
4
|
import type { SkillDiscoverySettings } from "../config/skill-settings-defaults";
|
|
5
5
|
import { detectDeepInterviewPlaintextAskLeak } from "../deep-interview/plaintext-gate-guard";
|
|
6
|
+
import { scoreToUnits } from "../gjc-runtime/deep-interview-ambiguity";
|
|
6
7
|
import { activeSnapshotPath, modeStatePath as sessionModeStatePath } from "../gjc-runtime/session-layout";
|
|
7
8
|
import { resolveGjcSessionForRead } from "../gjc-runtime/session-resolution";
|
|
8
9
|
import { ModeStateSchema, SkillActiveStateSchema } from "../gjc-runtime/state-schema";
|
|
@@ -410,8 +411,29 @@ async function seedSkillActivationState(
|
|
|
410
411
|
...(input.turnId ? { turn_id: input.turnId } : {}),
|
|
411
412
|
};
|
|
412
413
|
if (skill === "deep-interview") {
|
|
413
|
-
|
|
414
|
+
const threshold = DEFAULT_DEEP_INTERVIEW_AMBIGUITY_THRESHOLD;
|
|
415
|
+
const thresholdUnits = scoreToUnits(threshold);
|
|
416
|
+
modeState.schema_version = 1;
|
|
417
|
+
modeState.resolution = "standard";
|
|
418
|
+
modeState.threshold = threshold;
|
|
419
|
+
modeState.threshold_units = thresholdUnits;
|
|
414
420
|
modeState.threshold_source = "default";
|
|
421
|
+
modeState.state = {
|
|
422
|
+
setup: { status: "unresolved" },
|
|
423
|
+
type: "greenfield",
|
|
424
|
+
intent_contract_required: true,
|
|
425
|
+
rounds: [],
|
|
426
|
+
established_facts: [],
|
|
427
|
+
topology: { status: "pending", components: [], deferred_components: [] },
|
|
428
|
+
ontology_snapshots: [],
|
|
429
|
+
auto_researched_rounds: [],
|
|
430
|
+
auto_answered_rounds: [],
|
|
431
|
+
architect_failures: 0,
|
|
432
|
+
current_ambiguity: 1.0,
|
|
433
|
+
threshold,
|
|
434
|
+
threshold_units: thresholdUnits,
|
|
435
|
+
threshold_source: "default",
|
|
436
|
+
};
|
|
415
437
|
}
|
|
416
438
|
|
|
417
439
|
await readExistingStateForMutation(initializedStatePath);
|