@gajae-code/coding-agent 0.8.1 → 0.9.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/CHANGELOG.md +63 -0
- package/dist/types/append-only-mode.d.ts +31 -0
- package/dist/types/capability/rule.d.ts +8 -0
- package/dist/types/cli/completion-cli.d.ts +41 -0
- package/dist/types/cli/config-cli.d.ts +1 -0
- package/dist/types/cli/fixture-report.d.ts +20 -0
- package/dist/types/cli/fixture-report.test.d.ts +1 -0
- package/dist/types/cli/nofile-limit.d.ts +11 -0
- package/dist/types/cli/notify-cli.d.ts +7 -0
- package/dist/types/cli/update-cli.d.ts +22 -0
- package/dist/types/cli.d.ts +124 -1
- package/dist/types/commands/completion.d.ts +29 -0
- package/dist/types/commands/config.d.ts +3 -0
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/config/file-lock.d.ts +7 -6
- package/dist/types/config/keybindings.d.ts +2 -2
- package/dist/types/config/model-profile-activation.d.ts +6 -0
- package/dist/types/config/settings-schema.d.ts +105 -1
- package/dist/types/config/settings.d.ts +8 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/export/ttsr.d.ts +14 -3
- package/dist/types/extensibility/extensions/runner.d.ts +2 -1
- package/dist/types/extensibility/extensions/types.d.ts +8 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +39 -0
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +10 -1
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +17 -2
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +7 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +3 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +28 -1
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +42 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +120 -13
- package/dist/types/goals/runtime.d.ts +1 -0
- package/dist/types/hooks/native-skill-hook.d.ts +12 -0
- package/dist/types/main.d.ts +4 -1
- package/dist/types/modes/components/assistant-message.d.ts +5 -1
- package/dist/types/modes/components/model-selector.d.ts +4 -0
- package/dist/types/modes/components/queued-message-selector.d.ts +12 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/status-line.d.ts +9 -0
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/controllers/event-controller.d.ts +5 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -3
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/print-mode.d.ts +13 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +14 -0
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +19 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +23 -1
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -0
- package/dist/types/notifications/config.d.ts +14 -1
- package/dist/types/notifications/daemon-paths.d.ts +1 -0
- package/dist/types/notifications/index.d.ts +6 -3
- package/dist/types/notifications/lifecycle-commands.d.ts +11 -3
- package/dist/types/notifications/telegram-daemon.d.ts +23 -3
- package/dist/types/notifications/telegram-reference.d.ts +0 -5
- package/dist/types/notifications/threaded-render.d.ts +6 -0
- package/dist/types/runtime-api-key.d.ts +7 -0
- package/dist/types/sdk.d.ts +3 -0
- package/dist/types/session/agent-session.d.ts +53 -1
- package/dist/types/session/agent-storage.d.ts +1 -0
- package/dist/types/session/file-mention-pruning.d.ts +8 -0
- package/dist/types/session/messages.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +17 -1
- package/dist/types/skill-state/active-state.d.ts +18 -1
- package/dist/types/system-prompt.d.ts +18 -2
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/fork-context-budget.d.ts +7 -0
- package/dist/types/task/token-log.d.ts +30 -0
- package/dist/types/task/token-log.test.d.ts +1 -0
- package/dist/types/tools/bisect.d.ts +81 -0
- package/dist/types/tools/computer.d.ts +2 -2
- package/dist/types/tools/index.d.ts +1 -0
- package/dist/types/tools/search.d.ts +2 -2
- package/dist/types/utils/file-mentions.d.ts +14 -0
- package/dist/types/utils/git.d.ts +32 -0
- package/dist/types/web/scrapers/youtube.d.ts +8 -0
- package/dist/types/workflow/workflow-intent-diff.d.ts +8 -2
- package/dist/types/workflow/workflow-intent-report-consumer.d.ts +50 -0
- package/dist/types/workflow/workflow-intent-report-schema.d.ts +2 -0
- package/dist/types/workflow/workflow-intent-report.d.ts +48 -0
- package/package.json +7 -7
- package/src/append-only-mode.ts +58 -0
- package/src/autoresearch/prompt.md +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/capability/rule.ts +9 -0
- package/src/cli/completion-cli.ts +234 -0
- package/src/cli/config-cli.ts +61 -9
- package/src/cli/fast-help.ts +1 -0
- package/src/cli/fixture-report.test.ts +230 -0
- package/src/cli/fixture-report.ts +171 -0
- package/src/cli/nofile-limit.ts +48 -0
- package/src/cli/notify-cli.ts +91 -7
- package/src/cli/update-cli.ts +85 -9
- package/src/cli.ts +29 -1
- package/src/commands/completion.ts +84 -0
- package/src/commands/config.ts +2 -0
- package/src/commands/contribution-prep.ts +1 -1
- package/src/commands/deep-interview.ts +2 -1
- package/src/config/file-lock.ts +73 -34
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-profile-activation.ts +65 -0
- package/src/config/model-registry.ts +14 -2
- package/src/config/settings-schema.ts +68 -1
- package/src/config/settings.ts +22 -0
- package/src/coordinator-mcp/server.ts +34 -8
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +50 -18
- package/src/defaults/gjc/skills/ralplan/SKILL.md +40 -99
- package/src/defaults/gjc/skills/team/SKILL.md +17 -14
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +59 -4
- package/src/defaults/gjc/skills/ultragoal/pipeline-validation-contracts.md +30 -0
- package/src/defaults/gjc-defaults.ts +9 -0
- package/src/discovery/helpers.ts +10 -0
- package/src/discovery/index.ts +1 -0
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +60 -2
- package/src/export/ttsr.ts +96 -18
- package/src/extensibility/extensions/runner.ts +183 -219
- package/src/extensibility/extensions/types.ts +9 -0
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +156 -44
- package/src/gjc-runtime/deep-interview-ambiguity.ts +206 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +62 -8
- package/src/gjc-runtime/deep-interview-runtime.ts +210 -2
- package/src/gjc-runtime/deep-interview-state.ts +44 -2
- package/src/gjc-runtime/session-state-sidecar.ts +263 -20
- package/src/gjc-runtime/state-runtime.ts +12 -2
- package/src/gjc-runtime/state-writer.ts +15 -0
- package/src/gjc-runtime/team-runtime.ts +187 -15
- package/src/gjc-runtime/ultragoal-guard.ts +55 -66
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +315 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +1663 -159
- package/src/gjc-runtime/workflow-manifest.generated.json +113 -2
- package/src/gjc-runtime/workflow-manifest.ts +74 -1
- package/src/goals/runtime.ts +10 -2
- package/src/hindsight/backend.ts +1 -3
- package/src/hooks/native-skill-hook.ts +124 -4
- package/src/internal-urls/docs-index.generated.ts +16 -7
- package/src/main.ts +95 -43
- package/src/memories/index.ts +12 -1
- package/src/modes/components/assistant-message.ts +241 -82
- package/src/modes/components/custom-editor.ts +1 -0
- package/src/modes/components/model-selector.ts +54 -11
- package/src/modes/components/queued-message-selector.ts +92 -0
- package/src/modes/components/settings-selector.ts +4 -0
- package/src/modes/components/status-line.ts +167 -54
- package/src/modes/components/tool-execution.ts +44 -19
- package/src/modes/components/welcome.ts +160 -44
- package/src/modes/controllers/command-controller.ts +40 -4
- package/src/modes/controllers/event-controller.ts +66 -47
- package/src/modes/controllers/extension-ui-controller.ts +4 -10
- package/src/modes/controllers/input-controller.ts +180 -18
- package/src/modes/controllers/selector-controller.ts +122 -27
- package/src/modes/interactive-mode.ts +51 -16
- package/src/modes/print-mode.ts +43 -4
- package/src/modes/prompt-action-autocomplete.ts +21 -20
- package/src/modes/rpc/rpc-mode.ts +29 -3
- package/src/modes/rpc/rpc-types.ts +9 -0
- package/src/modes/shared/agent-wire/command-validation.ts +4 -0
- package/src/modes/shared/agent-wire/event-contract.ts +22 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +82 -0
- package/src/modes/shared/agent-wire/scopes.ts +1 -0
- package/src/modes/types.ts +1 -0
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/modes/utils/ui-helpers.ts +19 -6
- package/src/notifications/config.ts +25 -5
- package/src/notifications/daemon-paths.ts +2 -0
- package/src/notifications/index.ts +117 -14
- package/src/notifications/lifecycle-commands.ts +37 -7
- package/src/notifications/lifecycle-orchestrator.ts +19 -6
- package/src/notifications/telegram-daemon-cli.ts +2 -2
- package/src/notifications/telegram-daemon-control.ts +5 -3
- package/src/notifications/telegram-daemon.ts +302 -51
- package/src/notifications/telegram-reference.ts +0 -16
- package/src/notifications/threaded-render.ts +17 -1
- package/src/prompts/agents/architect.md +19 -10
- package/src/prompts/agents/critic.md +16 -18
- package/src/prompts/agents/executor.md +14 -11
- package/src/prompts/agents/planner.md +18 -13
- package/src/prompts/ci-green-request.md +3 -8
- package/src/prompts/goals/goal-continuation.md +0 -5
- package/src/prompts/goals/goal-mode-active.md +0 -5
- package/src/prompts/system/agent-creation-architect.md +2 -2
- package/src/prompts/system/plan-mode-active.md +1 -1
- package/src/prompts/system/plan-mode-subagent.md +3 -3
- package/src/prompts/system/project-prompt.md +0 -13
- package/src/prompts/system/subagent-system-prompt.md +3 -2
- package/src/prompts/system/system-prompt.md +29 -19
- package/src/prompts/system/volatile-project-context.md +10 -0
- package/src/prompts/system/web-search.md +4 -7
- package/src/prompts/tools/apply-patch.md +6 -0
- package/src/prompts/tools/ast-edit.md +1 -0
- package/src/prompts/tools/bash.md +1 -1
- package/src/prompts/tools/bisect.md +22 -0
- package/src/prompts/tools/browser.md +1 -1
- package/src/prompts/tools/computer.md +2 -2
- package/src/prompts/tools/cron.md +0 -2
- package/src/prompts/tools/eval.md +2 -2
- package/src/prompts/tools/find.md +1 -1
- package/src/prompts/tools/github.md +6 -6
- package/src/prompts/tools/goal.md +1 -3
- package/src/prompts/tools/image-gen.md +12 -5
- package/src/prompts/tools/irc.md +5 -4
- package/src/prompts/tools/job.md +2 -2
- package/src/prompts/tools/lsp.md +1 -1
- package/src/prompts/tools/monitor.md +2 -2
- package/src/prompts/tools/patch.md +2 -2
- package/src/prompts/tools/replace.md +2 -21
- package/src/prompts/tools/rewind.md +1 -1
- package/src/prompts/tools/search-tool-bm25.md +1 -11
- package/src/prompts/tools/search.md +1 -1
- package/src/prompts/tools/skill.md +3 -2
- package/src/prompts/tools/ssh.md +2 -1
- package/src/prompts/tools/subagent.md +2 -2
- package/src/prompts/tools/task.md +4 -5
- package/src/prompts/tools/todo-write.md +1 -1
- package/src/prompts/tools/vim.md +1 -0
- package/src/prompts/tools/web-search.md +2 -0
- package/src/prompts/tools/write.md +8 -2
- package/src/runtime-api-key.ts +16 -0
- package/src/sdk.ts +52 -28
- package/src/session/agent-session.ts +951 -132
- package/src/session/agent-storage.ts +4 -0
- package/src/session/file-mention-pruning.ts +64 -0
- package/src/session/messages.ts +4 -0
- package/src/session/session-manager.ts +103 -4
- package/src/skill-state/active-state.ts +141 -5
- package/src/skill-state/deep-interview-mutation-guard.ts +67 -3
- package/src/slash-commands/builtin-registry.ts +218 -71
- package/src/system-prompt.ts +57 -16
- package/src/task/executor.ts +132 -24
- package/src/task/fork-context-advisory.ts +2 -7
- package/src/task/fork-context-budget.ts +9 -0
- package/src/task/index.ts +13 -6
- package/src/task/output-manager.ts +20 -8
- package/src/task/receipt.ts +26 -7
- package/src/task/token-log.test.ts +188 -0
- package/src/task/token-log.ts +179 -0
- package/src/tools/bisect.ts +367 -0
- package/src/tools/computer.ts +246 -43
- package/src/tools/index.ts +3 -0
- package/src/tools/output-meta.ts +116 -4
- package/src/tools/search.ts +8 -2
- package/src/tools/skill.ts +15 -0
- package/src/tools/telegram-send.ts +6 -0
- package/src/utils/file-mentions.ts +39 -7
- package/src/utils/git.ts +73 -0
- package/src/web/scrapers/youtube.ts +24 -12
- package/src/workflow/workflow-intent-diff.ts +29 -6
- package/src/workflow/workflow-intent-report-consumer.ts +221 -0
- package/src/workflow/workflow-intent-report-schema.ts +129 -0
- package/src/workflow/workflow-intent-report.ts +135 -0
|
@@ -11,9 +11,16 @@ export interface TtsrMatchContext {
|
|
|
11
11
|
/** Stable key to isolate buffering (for example a tool call ID). */
|
|
12
12
|
streamKey?: string;
|
|
13
13
|
}
|
|
14
|
+
/** Tracks when a rule was last injected (for repeat gating). */
|
|
15
|
+
export interface TtsrInjectionRecord {
|
|
16
|
+
name: string;
|
|
17
|
+
lastInjectedAt: number;
|
|
18
|
+
repeatMode?: "once" | "after-gap";
|
|
19
|
+
repeatGap?: number;
|
|
20
|
+
}
|
|
14
21
|
export declare class TtsrManager {
|
|
15
22
|
#private;
|
|
16
|
-
constructor(settings?: TtsrSettings);
|
|
23
|
+
constructor(settings?: Partial<TtsrSettings>);
|
|
17
24
|
/** Add a TTSR rule to be monitored. */
|
|
18
25
|
addRule(rule: Rule): boolean;
|
|
19
26
|
/**
|
|
@@ -29,8 +36,10 @@ export declare class TtsrManager {
|
|
|
29
36
|
markInjectedByNames(ruleNames: string[]): void;
|
|
30
37
|
/** Get names of all injected rules (for persistence). */
|
|
31
38
|
getInjectedRuleNames(): string[];
|
|
32
|
-
/**
|
|
33
|
-
|
|
39
|
+
/** Get full injected rule records (for persistence). */
|
|
40
|
+
getInjectedRecords(): TtsrInjectionRecord[];
|
|
41
|
+
/** Restore injected state from legacy rule names or persisted records. */
|
|
42
|
+
restoreInjected(records: string[] | TtsrInjectionRecord[]): void;
|
|
34
43
|
/** Reset stream buffers (called on new turn). */
|
|
35
44
|
resetBuffer(): void;
|
|
36
45
|
/** Check if any TTSR rules are registered. */
|
|
@@ -39,6 +48,8 @@ export declare class TtsrManager {
|
|
|
39
48
|
incrementMessageCount(): void;
|
|
40
49
|
/** Get current message count. */
|
|
41
50
|
getMessageCount(): number;
|
|
51
|
+
/** Restore message counter after session resume. */
|
|
52
|
+
restoreMessageCount(messageCount: number): void;
|
|
42
53
|
/** Get settings. */
|
|
43
54
|
getSettings(): Required<TtsrSettings>;
|
|
44
55
|
}
|
|
@@ -61,7 +61,8 @@ export declare class ExtensionRunner {
|
|
|
61
61
|
private readonly cwd;
|
|
62
62
|
private readonly sessionManager;
|
|
63
63
|
private readonly modelRegistry;
|
|
64
|
-
|
|
64
|
+
private readonly sessionMetadata?;
|
|
65
|
+
constructor(extensions: Extension[], runtime: ExtensionRuntime, cwd: string, sessionManager: SessionManager, modelRegistry: ModelRegistry, sessionMetadata?: ExtensionContext["sessionMetadata"]);
|
|
65
66
|
initialize(actions: ExtensionActions, contextActions: ExtensionContextActions, commandContextActions?: ExtensionCommandContextActions, uiContext?: ExtensionUIContext): void;
|
|
66
67
|
/**
|
|
67
68
|
* Forward a `credential_disabled` event from `AuthStorage` to extension handlers.
|
|
@@ -186,6 +186,12 @@ export interface CompactOptions {
|
|
|
186
186
|
onComplete?: (result: CompactionResult) => void;
|
|
187
187
|
onError?: (error: Error) => void;
|
|
188
188
|
}
|
|
189
|
+
export interface ExtensionSessionMetadata {
|
|
190
|
+
kind: "main" | "sub";
|
|
191
|
+
taskDepth: number;
|
|
192
|
+
parentTaskPrefix?: string;
|
|
193
|
+
currentAgentType?: string;
|
|
194
|
+
}
|
|
189
195
|
/**
|
|
190
196
|
* Context passed to extension event handlers.
|
|
191
197
|
*/
|
|
@@ -202,6 +208,8 @@ export interface ExtensionContext {
|
|
|
202
208
|
cwd: string;
|
|
203
209
|
/** Session manager (read-only) */
|
|
204
210
|
sessionManager: ReadonlySessionManager;
|
|
211
|
+
/** Session classification supplied by the SDK for extension policy decisions. */
|
|
212
|
+
sessionMetadata?: ExtensionSessionMetadata;
|
|
205
213
|
/** Model registry for API key resolution */
|
|
206
214
|
modelRegistry: ModelRegistry;
|
|
207
215
|
/** Current model (may be undefined) */
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type DeepInterviewStateEnvelope } from "./deep-interview-state";
|
|
2
|
+
export interface AmbiguityFloorBreakdown {
|
|
3
|
+
floor: number;
|
|
4
|
+
disputed_fact_count: number;
|
|
5
|
+
unscored_active_component_count: number;
|
|
6
|
+
auto_answer_ratio: number;
|
|
7
|
+
}
|
|
8
|
+
export interface AmbiguityClampResult {
|
|
9
|
+
effective: number;
|
|
10
|
+
clamped: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Compute the deterministic floor from the inner deep-interview `state` object. */
|
|
13
|
+
export declare function computeAmbiguityFloor(inner: unknown): AmbiguityFloorBreakdown;
|
|
14
|
+
/** Clamp an LLM-reported ambiguity to the deterministic floor: `max(reported, floor)`. */
|
|
15
|
+
export declare function clampReportedAmbiguity(reported: number, floor: number): AmbiguityClampResult;
|
|
16
|
+
/**
|
|
17
|
+
* Mark every established fact recorded in `retractedRound` as disputed. This is the
|
|
18
|
+
* mechanical contradiction signal for answer retraction: when the user replaces an
|
|
19
|
+
* already-scored answer (A -> B pivot), the facts that answer established can no
|
|
20
|
+
* longer be trusted, so they raise the floor until re-confirmed or superseded.
|
|
21
|
+
* Returns new arrays/objects; never mutates the input.
|
|
22
|
+
*/
|
|
23
|
+
export declare function disputeFactsFromRetractedRound(facts: readonly unknown[], retractedRound: number): {
|
|
24
|
+
facts: Record<string, unknown>[];
|
|
25
|
+
disputedIds: string[];
|
|
26
|
+
};
|
|
27
|
+
export interface AppliedAmbiguityFloor {
|
|
28
|
+
envelope: DeepInterviewStateEnvelope;
|
|
29
|
+
breakdown: AmbiguityFloorBreakdown;
|
|
30
|
+
clamped: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Enforce the floor invariant on a full deep-interview envelope: recompute the floor
|
|
34
|
+
* from persisted evidence, clamp `state.current_ambiguity`, and clamp the latest
|
|
35
|
+
* scored round (preserving the original value as `reported_ambiguity` for audit).
|
|
36
|
+
* Historical rounds are never rewritten. Idempotent and non-mutating; every writer
|
|
37
|
+
* (state CLI write/reconcile, recorder) applies this immediately before persisting.
|
|
38
|
+
*/
|
|
39
|
+
export declare function applyAmbiguityFloorToEnvelope(value: unknown): AppliedAmbiguityFloor;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DeepInterviewEstablishedFact, type DeepInterviewRoundRecord, type DeepInterviewStateEnvelope, type DeepInterviewTriggerMetadata } from "./deep-interview-state";
|
|
2
|
+
export * from "./deep-interview-ambiguity";
|
|
2
3
|
export * from "./deep-interview-state";
|
|
3
4
|
/**
|
|
4
5
|
* Runtime-owned deep-interview round recorder (conflict-aware scoring support).
|
|
@@ -86,12 +87,20 @@ export declare function projectCompactState(value: unknown, options?: {
|
|
|
86
87
|
}): DeepInterviewCompactState;
|
|
87
88
|
/** Refresh the best-effort HUD cache from persisted deep-interview state. */
|
|
88
89
|
export declare function syncDeepInterviewRecorderHud(cwd: string, statePath: string, sessionId: string | undefined): Promise<void>;
|
|
89
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Record an `answered` shell for one round (append-or-merge by durable key).
|
|
92
|
+
*
|
|
93
|
+
* Retraction dynamics: replacing an already-`scored` answer is a mechanical
|
|
94
|
+
* contradiction signal (the user pivoted). The facts that round established are
|
|
95
|
+
* marked disputed, which raises the deterministic ambiguity floor immediately —
|
|
96
|
+
* without waiting for the LLM scorer to self-report a trigger.
|
|
97
|
+
*/
|
|
90
98
|
export declare function appendOrMergeDeepInterviewRound(cwd: string, statePath: string, input: DeepInterviewAnswerInput, options?: {
|
|
91
99
|
sessionId?: string;
|
|
92
100
|
}): Promise<{
|
|
93
101
|
action: AppendOrMergeAction;
|
|
94
102
|
record: DeepInterviewRoundRecord;
|
|
103
|
+
disputedFactIds?: string[];
|
|
95
104
|
}>;
|
|
96
105
|
/** Merge scoring output into the same round record, transitioning to `scored`. */
|
|
97
106
|
export declare function enrichDeepInterviewRoundScoring(cwd: string, statePath: string, input: DeepInterviewScoringInput, options?: {
|
|
@@ -4,7 +4,7 @@ export * from "./deep-interview-recorder";
|
|
|
4
4
|
*
|
|
5
5
|
* The CLI itself does not run the Socratic interview; that lives inside the `/skill:deep-interview`
|
|
6
6
|
* skill executed by the agent. This handler validates the documented argument-hint surface
|
|
7
|
-
* (`[--quick|--standard|--deep] <idea>`), seeds `.gjc/state/deep-interview-state.json`, and
|
|
7
|
+
* (`[--trace] [--quick|--standard|--deep] <idea>`), seeds `.gjc/state/deep-interview-state.json`, and
|
|
8
8
|
* updates the shared HUD rail via `syncSkillActiveState` so the active interview is visible to
|
|
9
9
|
* the TUI.
|
|
10
10
|
*/
|
|
@@ -21,6 +21,13 @@ export interface DeepInterviewEstablishedFact {
|
|
|
21
21
|
dimension?: string;
|
|
22
22
|
evidence?: string;
|
|
23
23
|
disputed: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Resolution pointer for a disputed fact: the id of the fact that replaced it
|
|
26
|
+
* after the user confirmed a pivot. A disputed fact without `superseded_by`
|
|
27
|
+
* keeps the deterministic ambiguity floor elevated; setting it releases the
|
|
28
|
+
* pressure while preserving the contradicted fact for audit.
|
|
29
|
+
*/
|
|
30
|
+
superseded_by?: string;
|
|
24
31
|
}
|
|
25
32
|
export interface DeepInterviewTriggerMetadata {
|
|
26
33
|
kind: DeepInterviewTriggerKind;
|
|
@@ -54,7 +61,12 @@ export interface DeepInterviewRoundRecord {
|
|
|
54
61
|
answered_at: string;
|
|
55
62
|
scored_at?: string;
|
|
56
63
|
scores?: Record<string, number>;
|
|
64
|
+
/** Effective ambiguity after the deterministic floor clamp (`max(reported, floor)`). */
|
|
57
65
|
ambiguity?: number;
|
|
66
|
+
/** Original LLM-reported ambiguity, preserved for audit when the floor clamped it. */
|
|
67
|
+
reported_ambiguity?: number;
|
|
68
|
+
/** Deterministic floor in effect when this round was scored, when it clamped. */
|
|
69
|
+
ambiguity_floor?: number;
|
|
58
70
|
triggers?: DeepInterviewTriggerMetadata[];
|
|
59
71
|
}
|
|
60
72
|
export interface DeepInterviewStateEnvelope {
|
|
@@ -80,8 +92,11 @@ export declare function deriveRoundKey(interviewId: string | undefined, input: {
|
|
|
80
92
|
* legacy flattened fields hoisted in losslessly, transcript duplicates removed
|
|
81
93
|
* from the top level, and `rounds`/`established_facts` guaranteed to be arrays.
|
|
82
94
|
*
|
|
83
|
-
* Idempotent: a canonical envelope is returned unchanged in shape.
|
|
84
|
-
* unknown envelope
|
|
95
|
+
* Idempotent: a canonical envelope is returned unchanged in shape. Preserves all
|
|
96
|
+
* unknown envelope and nested fields except the envelope-reserved keys that leak
|
|
97
|
+
* into `state` (see `ENVELOPE_RESERVED_STATE_KEYS`), which are stripped so a
|
|
98
|
+
* malformed envelope-in-state write cannot permanently nest state. Never mutates
|
|
99
|
+
* the input.
|
|
85
100
|
*/
|
|
86
101
|
export declare function normalizeDeepInterviewEnvelope(value: unknown): DeepInterviewStateEnvelope;
|
|
87
102
|
/**
|
|
@@ -3,6 +3,11 @@ export declare const GJC_COORDINATOR_SESSION_STATE_FILE_ENV = "GJC_COORDINATOR_S
|
|
|
3
3
|
export declare const GJC_COORDINATOR_SESSION_ID_ENV = "GJC_COORDINATOR_SESSION_ID";
|
|
4
4
|
export declare const GJC_COORDINATOR_SESSION_BRANCH_ENV = "GJC_COORDINATOR_SESSION_BRANCH";
|
|
5
5
|
export type RuntimeState = "ready_for_input" | "running" | "needs_user_input" | "completed" | "errored";
|
|
6
|
+
/** Test-only counters for runtime sidecar hot-path assertions. */
|
|
7
|
+
export declare const __sessionStateSidecarPerfCounters: {
|
|
8
|
+
persistFromEventCalls: number;
|
|
9
|
+
reset(): void;
|
|
10
|
+
};
|
|
6
11
|
interface RuntimeStateEvent {
|
|
7
12
|
type: string;
|
|
8
13
|
messages?: unknown[];
|
|
@@ -26,6 +31,8 @@ export declare function readTerminalRuntimeStateMarker(input: {
|
|
|
26
31
|
cwd?: string | null;
|
|
27
32
|
sessionFile?: string | null;
|
|
28
33
|
}): Promise<TerminalRuntimeStateStatus>;
|
|
34
|
+
export declare function stateForEvent(event: RuntimeStateEvent): RuntimeState | null;
|
|
35
|
+
export declare function eventAffectsCoordinatorRuntimeState(event: RuntimeStateEvent): boolean;
|
|
29
36
|
export declare function persistCoordinatorRuntimeStateFromEvent(event: RuntimeStateEvent, context: RuntimeStateContext): Promise<void>;
|
|
30
37
|
export declare function persistCoordinatorRuntimeStateFromPostmortem(reason: postmortem.Reason, context: RuntimeStateContext): void;
|
|
31
38
|
export declare function registerCoordinatorRuntimeStateFinalizer(context: RuntimeStateContext): () => void;
|
|
@@ -142,6 +142,8 @@ export declare function readExistingStateForMutation(filePath: string): Promise<
|
|
|
142
142
|
export declare function workflowEnvelopeContentSha256(value: unknown): string;
|
|
143
143
|
export declare function stampWorkflowEnvelopeChecksum<T>(value: T, filePath: string, computedAt?: string): T;
|
|
144
144
|
export declare function detectWorkflowEnvelopeIntegrityMismatch(filePath: string): Promise<WorkflowEnvelopeIntegrityMismatch | undefined>;
|
|
145
|
+
type ActiveStateCacheInvalidator = (cwd?: string, sessionId?: string) => void;
|
|
146
|
+
export declare function setActiveStateCacheInvalidator(invalidator: ActiveStateCacheInvalidator): void;
|
|
145
147
|
export declare function persistedStateRevision(value: unknown): number;
|
|
146
148
|
export declare function writeGuardedJsonAtomic(targetPath: string, value: unknown, options: GuardedStateWriterOptions): Promise<GuardedWriteResult>;
|
|
147
149
|
export declare function writeGuardedWorkflowEnvelopeAtomic(targetPath: string, value: unknown, options: GuardedStateWriterOptions): Promise<GuardedWriteResult>;
|
|
@@ -239,3 +241,4 @@ export declare function beginWorkflowTransactionJournal(input: {
|
|
|
239
241
|
}): Promise<string>;
|
|
240
242
|
export declare function updateWorkflowTransactionJournal(cwd: string, sessionId: string, mutationId: string, patch: Partial<WorkflowTransactionJournal>): Promise<string>;
|
|
241
243
|
export declare function completeWorkflowTransactionJournal(cwd: string, sessionId: string, mutationId: string): Promise<void>;
|
|
244
|
+
export {};
|
|
@@ -146,6 +146,7 @@ export interface GjcTeamWorkerLifecycle {
|
|
|
146
146
|
}
|
|
147
147
|
export type GjcTeamNotificationDeliveryState = "pending" | "sent" | "queued" | "deferred" | "failed" | "delivered" | "acknowledged";
|
|
148
148
|
export type GjcTeamPaneAttemptResult = "sent" | "queued" | "deferred" | "failed";
|
|
149
|
+
export type GjcTeamMailboxDeliveryTransportKind = "notifications_sdk" | "pane";
|
|
149
150
|
export interface GjcTeamNotification {
|
|
150
151
|
id: string;
|
|
151
152
|
kind: "mailbox_message" | "worker_lifecycle" | "invalid_attempt";
|
|
@@ -164,6 +165,29 @@ export interface GjcTeamNotification {
|
|
|
164
165
|
updated_at: string;
|
|
165
166
|
replay_count: number;
|
|
166
167
|
}
|
|
168
|
+
export interface GjcTeamMailboxDeliveryInput {
|
|
169
|
+
team_name: string;
|
|
170
|
+
state_dir: string;
|
|
171
|
+
config: GjcTeamConfig;
|
|
172
|
+
notification: GjcTeamNotification;
|
|
173
|
+
message: GjcTeamMailboxMessage;
|
|
174
|
+
cwd: string;
|
|
175
|
+
env: NodeJS.ProcessEnv;
|
|
176
|
+
}
|
|
177
|
+
export type GjcTeamMailboxDeliveryResult = {
|
|
178
|
+
transport: "notifications_sdk";
|
|
179
|
+
state: GjcTeamNotificationDeliveryState;
|
|
180
|
+
reason?: string;
|
|
181
|
+
} | {
|
|
182
|
+
transport: "pane";
|
|
183
|
+
state: GjcTeamPaneAttemptResult;
|
|
184
|
+
reason?: string;
|
|
185
|
+
};
|
|
186
|
+
export interface GjcTeamMailboxDeliveryTransport {
|
|
187
|
+
deliverMailboxMessage(input: GjcTeamMailboxDeliveryInput): Promise<GjcTeamMailboxDeliveryResult | null>;
|
|
188
|
+
}
|
|
189
|
+
export declare function setGjcTeamMailboxDeliveryTransport(transport: GjcTeamMailboxDeliveryTransport | undefined): () => void;
|
|
190
|
+
export declare function setGjcTeamMailboxDeliveryTransportForTest(transport: GjcTeamMailboxDeliveryTransport | undefined): () => void;
|
|
167
191
|
export interface GjcTeamNotificationSummary {
|
|
168
192
|
total: number;
|
|
169
193
|
replay_eligible: number;
|
|
@@ -197,6 +221,7 @@ export interface GjcTeamStartOptions {
|
|
|
197
221
|
cwd?: string;
|
|
198
222
|
env?: NodeJS.ProcessEnv;
|
|
199
223
|
dryRun?: boolean;
|
|
224
|
+
mailboxDeliveryTransport?: GjcTeamMailboxDeliveryTransport;
|
|
200
225
|
}
|
|
201
226
|
export interface GjcTeamApiClaimResult {
|
|
202
227
|
ok: boolean;
|
|
@@ -280,7 +305,8 @@ export declare function pruneTeamWorkerGcRecord(record: GcRecord, probe: GcPidPr
|
|
|
280
305
|
export declare function persistGjcTeamModeStateSummary(snapshot: GjcTeamSnapshot, cwd?: string): Promise<void>;
|
|
281
306
|
export declare function recoverGjcTeamStaleClaims(teamName: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamLivenessRecoveryResult>;
|
|
282
307
|
type GjcTeamTaskMetadataInput = Partial<Pick<GjcTeamTask, "owner" | "lane" | "required_role" | "allowed_roles" | "depends_on" | "blocked_by">>;
|
|
283
|
-
|
|
308
|
+
type CommandPathResolver = (command: string) => string | null;
|
|
309
|
+
export declare function resolveGjcWorkerCommand(cwd?: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, argv?: string[], execPath?: string, which?: CommandPathResolver): string;
|
|
284
310
|
/** @internal Exported for unit tests. */
|
|
285
311
|
export declare function buildWorkerCommand(config: GjcTeamConfig, worker: GjcTeamWorker, platform?: NodeJS.Platform): string;
|
|
286
312
|
export type GjcWorkerCheckpointClassification = {
|
|
@@ -305,6 +331,7 @@ export declare function classifyGjcTeamCheckpointFiles(files: string[]): {
|
|
|
305
331
|
protected: string[];
|
|
306
332
|
};
|
|
307
333
|
export declare function classifyWorkerCheckpointStatus(cwd: string): GjcWorkerCheckpointClassification;
|
|
334
|
+
export declare function classifyWorkerCheckpointStatusAsync(cwd: string): Promise<GjcWorkerCheckpointClassification>;
|
|
308
335
|
export declare function startGjcTeam(options: GjcTeamStartOptions): Promise<GjcTeamSnapshot>;
|
|
309
336
|
export declare function readGjcTeamSnapshot(teamName: string, cwd?: string, env?: NodeJS.ProcessEnv, options?: GjcTeamSnapshotOptions): Promise<GjcTeamSnapshot>;
|
|
310
337
|
export declare function monitorGjcTeamSnapshot(teamName: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamSnapshot>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { UltragoalCompletionVerification, UltragoalGoal, UltragoalGoalStatus, UltragoalLedgerEvent, UltragoalPlan, UltragoalReceiptKind } from "./ultragoal-runtime";
|
|
2
|
+
export type UltragoalReceiptFreshnessDiagnostic = {
|
|
3
|
+
state: "inactive" | "unrelated_goal" | "active_verified_complete" | "active_missing_receipt" | "active_stale_receipt" | "active_missing_final_receipt" | "active_dirty_quality_gate" | "active_review_blocked_unrecorded" | "active_review_blocked_recorded" | "unreadable_fail_closed";
|
|
4
|
+
message: string;
|
|
5
|
+
goalId?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function requiredUltragoalGoals(plan: UltragoalPlan): UltragoalGoal[];
|
|
8
|
+
export declare function receiptRelevantGoals(plan: UltragoalPlan, goal: UltragoalGoal, receiptKind: UltragoalReceiptKind): UltragoalGoal[];
|
|
9
|
+
export declare function computeUltragoalPlanGeneration(input: {
|
|
10
|
+
plan: UltragoalPlan;
|
|
11
|
+
ledger: readonly UltragoalLedgerEvent[];
|
|
12
|
+
goal: UltragoalGoal;
|
|
13
|
+
receiptKind: UltragoalReceiptKind;
|
|
14
|
+
beforeStatus: UltragoalGoalStatus;
|
|
15
|
+
excludeEventId?: string;
|
|
16
|
+
targetGoalUpdatedAt?: string;
|
|
17
|
+
}): {
|
|
18
|
+
planGeneration: string;
|
|
19
|
+
basis: UltragoalCompletionVerification["basis"];
|
|
20
|
+
};
|
|
21
|
+
export declare function findLedgerReceiptEvent(ledger: readonly UltragoalLedgerEvent[], receipt: UltragoalCompletionVerification): UltragoalLedgerEvent | null;
|
|
22
|
+
export declare function validateReceiptFreshBase(input: {
|
|
23
|
+
plan: UltragoalPlan;
|
|
24
|
+
ledger: readonly UltragoalLedgerEvent[];
|
|
25
|
+
goal: UltragoalGoal;
|
|
26
|
+
receipt: UltragoalCompletionVerification;
|
|
27
|
+
receiptKind: UltragoalReceiptKind;
|
|
28
|
+
}): UltragoalReceiptFreshnessDiagnostic | null;
|
|
29
|
+
export declare function findFreshBatchCloseReceipt(input: {
|
|
30
|
+
plan: UltragoalPlan;
|
|
31
|
+
ledger: readonly UltragoalLedgerEvent[];
|
|
32
|
+
deferredGoal: UltragoalGoal;
|
|
33
|
+
deferredReceipt: UltragoalCompletionVerification;
|
|
34
|
+
}): UltragoalCompletionVerification | null;
|
|
35
|
+
export declare function validateDeferredMemberReceiptFresh(input: {
|
|
36
|
+
plan: UltragoalPlan;
|
|
37
|
+
ledger: readonly UltragoalLedgerEvent[];
|
|
38
|
+
goal: UltragoalGoal;
|
|
39
|
+
receipt: UltragoalCompletionVerification;
|
|
40
|
+
receiptKind: UltragoalReceiptKind;
|
|
41
|
+
requireClose: boolean;
|
|
42
|
+
}): UltragoalReceiptFreshnessDiagnostic;
|
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
import type { WorkflowHudSummary } from "../skill-state/active-state";
|
|
2
|
+
export { computeUltragoalPlanGeneration, receiptRelevantGoals } from "./ultragoal-receipt-freshness";
|
|
2
3
|
export type UltragoalGjcGoalMode = "aggregate" | "per-story";
|
|
3
4
|
export type UltragoalGoalStatus = "pending" | "active" | "complete" | "failed" | "blocked" | "review_blocked" | "superseded";
|
|
5
|
+
export type UltragoalPipelineMetadataSource = "original_plan_graph" | "legacy_brief_only" | "steering";
|
|
6
|
+
export type UltragoalPipelineOverlapState = "none" | "open" | "joined_clean" | "blocked_disjoint_continue" | "quarantine_required" | "rebaseline_complete";
|
|
7
|
+
export interface UltragoalPipelineTargets extends JsonObject {
|
|
8
|
+
files: string[];
|
|
9
|
+
surfaces: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface UltragoalPipelineMetadata extends JsonObject {
|
|
12
|
+
schemaVersion: 1;
|
|
13
|
+
goalId: string;
|
|
14
|
+
source: UltragoalPipelineMetadataSource;
|
|
15
|
+
eligible: boolean;
|
|
16
|
+
dependsOn: string[];
|
|
17
|
+
independentOf: string[];
|
|
18
|
+
targets: UltragoalPipelineTargets;
|
|
19
|
+
metadataHash: string;
|
|
20
|
+
overlap: UltragoalPipelineOverlapState;
|
|
21
|
+
overlapId?: string;
|
|
22
|
+
priorGoalId?: string;
|
|
23
|
+
nextGoalId?: string;
|
|
24
|
+
blockerFootprints?: UltragoalPipelineTargets[];
|
|
25
|
+
invalidationReason?: string;
|
|
26
|
+
invalidatedAt?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface UltragoalGoalMetadataInput {
|
|
29
|
+
schemaVersion: 1;
|
|
30
|
+
goalId: string;
|
|
31
|
+
source: UltragoalPipelineMetadataSource;
|
|
32
|
+
dependsOn?: string[];
|
|
33
|
+
independentOf?: string[];
|
|
34
|
+
targets?: Partial<UltragoalPipelineTargets>;
|
|
35
|
+
}
|
|
36
|
+
export interface UltragoalValidationBatchMetadata extends JsonObject {
|
|
37
|
+
schemaVersion: 1;
|
|
38
|
+
batchId: string;
|
|
39
|
+
memberIds: string[];
|
|
40
|
+
finalGoalId: string;
|
|
41
|
+
mode: "aggregate-only";
|
|
42
|
+
metadataHash: string;
|
|
43
|
+
}
|
|
44
|
+
export interface UltragoalValidationBatchInput {
|
|
45
|
+
schemaVersion: 1;
|
|
46
|
+
batchId: string;
|
|
47
|
+
memberIds: string[];
|
|
48
|
+
finalGoalId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UltragoalPipelineOverlapHandles extends JsonObject {
|
|
51
|
+
review: JsonObject;
|
|
52
|
+
qa: JsonObject;
|
|
53
|
+
implementation: JsonObject;
|
|
54
|
+
}
|
|
55
|
+
export interface UltragoalPipelineOverlapReceipt extends JsonObject {
|
|
56
|
+
ok: true;
|
|
57
|
+
event: string;
|
|
58
|
+
overlap_id: string;
|
|
59
|
+
prior_goal_id: string;
|
|
60
|
+
next_goal_id?: string;
|
|
61
|
+
goal_id?: string;
|
|
62
|
+
status?: UltragoalPipelineOverlapState;
|
|
63
|
+
next_goal_status?: UltragoalGoalStatus;
|
|
64
|
+
goals_path: string;
|
|
65
|
+
ledger_path: string;
|
|
66
|
+
}
|
|
67
|
+
export type UltragoalPipelineLedgerEventName = "pipeline_overlap_started" | "pipeline_overlap_joined" | "pipeline_overlap_blocked" | "pipeline_overlap_quarantined" | "pipeline_overlap_rebaselined";
|
|
68
|
+
export interface UltragoalPipelineLedgerEvent extends UltragoalLedgerEvent {
|
|
69
|
+
event: UltragoalPipelineLedgerEventName;
|
|
70
|
+
schemaVersion: 1;
|
|
71
|
+
overlapId: string;
|
|
72
|
+
priorGoalId: string;
|
|
73
|
+
nextGoalId: string;
|
|
74
|
+
}
|
|
4
75
|
export interface UltragoalGoal {
|
|
5
76
|
id: string;
|
|
6
77
|
title: string;
|
|
@@ -13,6 +84,8 @@ export interface UltragoalGoal {
|
|
|
13
84
|
evidence?: string;
|
|
14
85
|
steering?: Record<string, unknown>;
|
|
15
86
|
completionVerification?: UltragoalCompletionVerification;
|
|
87
|
+
pipelineMetadata?: UltragoalPipelineMetadata;
|
|
88
|
+
validationBatch?: UltragoalValidationBatchMetadata;
|
|
16
89
|
}
|
|
17
90
|
export interface UltragoalPlan {
|
|
18
91
|
version: 1;
|
|
@@ -45,6 +118,26 @@ export interface UltragoalCompletionVerification {
|
|
|
45
118
|
requiredGoalSetHashBeforeCheckpoint: string;
|
|
46
119
|
};
|
|
47
120
|
checkpointLedgerEventId: string;
|
|
121
|
+
validationBatch?: {
|
|
122
|
+
schemaVersion: 1;
|
|
123
|
+
role: "deferred-member";
|
|
124
|
+
batchId: string;
|
|
125
|
+
memberIds: string[];
|
|
126
|
+
finalGoalId: string;
|
|
127
|
+
metadataHash: string;
|
|
128
|
+
changeSetHash: string;
|
|
129
|
+
} | {
|
|
130
|
+
schemaVersion: 1;
|
|
131
|
+
role: "batch-close";
|
|
132
|
+
batchId: string;
|
|
133
|
+
memberIds: string[];
|
|
134
|
+
finalGoalId: string;
|
|
135
|
+
memberMetadataHashes: Record<string, string>;
|
|
136
|
+
memberReceiptIds: Record<string, string>;
|
|
137
|
+
memberCheckpointLedgerEventIds: Record<string, string>;
|
|
138
|
+
memberChangeSetHashes: Record<string, string>;
|
|
139
|
+
unionHash: string;
|
|
140
|
+
};
|
|
48
141
|
}
|
|
49
142
|
export interface UltragoalLedgerEvent extends JsonObject {
|
|
50
143
|
eventId?: string;
|
|
@@ -106,6 +199,7 @@ export interface UltragoalStatusSummary {
|
|
|
106
199
|
nudgeRemaining?: number;
|
|
107
200
|
nudgeGoalId?: string;
|
|
108
201
|
nudgeTargetKind?: UltragoalNudgeTargetKind;
|
|
202
|
+
pipelineOverlap?: JsonObject;
|
|
109
203
|
}
|
|
110
204
|
export interface UltragoalCommandResult {
|
|
111
205
|
reviewBlockerGoalIds?: string[];
|
|
@@ -161,18 +255,6 @@ export declare function recordUltragoalNudgeIfBudgetRemaining(input: {
|
|
|
161
255
|
reason: string;
|
|
162
256
|
currentGoalObjective?: string;
|
|
163
257
|
}): Promise<UltragoalNudgeOutcome>;
|
|
164
|
-
export declare function computeUltragoalPlanGeneration(input: {
|
|
165
|
-
plan: UltragoalPlan;
|
|
166
|
-
ledger: readonly UltragoalLedgerEvent[];
|
|
167
|
-
goal: UltragoalGoal;
|
|
168
|
-
receiptKind: UltragoalReceiptKind;
|
|
169
|
-
beforeStatus: UltragoalGoalStatus;
|
|
170
|
-
excludeEventId?: string;
|
|
171
|
-
targetGoalUpdatedAt?: string;
|
|
172
|
-
}): {
|
|
173
|
-
planGeneration: string;
|
|
174
|
-
basis: UltragoalCompletionVerification["basis"];
|
|
175
|
-
};
|
|
176
258
|
export declare function readUltragoalPlan(cwd: string, sessionId?: string | null): Promise<UltragoalPlan | null>;
|
|
177
259
|
export declare function getUltragoalStatus(cwd: string, sessionId?: string | null): Promise<UltragoalStatusSummary>;
|
|
178
260
|
export declare function buildUltragoalHudSummary(summary: UltragoalStatusSummary, latestLedger?: UltragoalLedgerEvent): WorkflowHudSummary;
|
|
@@ -181,6 +263,10 @@ export declare function createUltragoalPlan(input: {
|
|
|
181
263
|
brief: string;
|
|
182
264
|
gjcGoalMode?: UltragoalGjcGoalMode;
|
|
183
265
|
sessionId?: string | null;
|
|
266
|
+
goalMetadata?: UltragoalGoalMetadataInput[];
|
|
267
|
+
goalMetadataJson?: string;
|
|
268
|
+
validationBatches?: UltragoalValidationBatchInput[];
|
|
269
|
+
validationBatchJson?: string;
|
|
184
270
|
}): Promise<UltragoalPlan>;
|
|
185
271
|
export interface UltragoalRunCompletionState {
|
|
186
272
|
requiredGoals: UltragoalGoal[];
|
|
@@ -190,6 +276,27 @@ export interface UltragoalRunCompletionState {
|
|
|
190
276
|
hasBlockers: boolean;
|
|
191
277
|
needsFinalAggregateReceipt: boolean;
|
|
192
278
|
}
|
|
279
|
+
export declare function startUltragoalPipelineOverlap(input: {
|
|
280
|
+
cwd: string;
|
|
281
|
+
priorGoalId: string;
|
|
282
|
+
nextGoalId: string;
|
|
283
|
+
reviewHandles: JsonObject | JsonObject[];
|
|
284
|
+
qaHandles: JsonObject | JsonObject[];
|
|
285
|
+
implementationHandle: JsonObject;
|
|
286
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
287
|
+
export declare function joinUltragoalPipelineOverlap(input: {
|
|
288
|
+
cwd: string;
|
|
289
|
+
overlapId: string;
|
|
290
|
+
reviewResult: JsonObject;
|
|
291
|
+
qaResult: JsonObject;
|
|
292
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
293
|
+
export declare function rebaselineUltragoalPipelineOverlap(input: {
|
|
294
|
+
cwd: string;
|
|
295
|
+
overlapId: string;
|
|
296
|
+
goalId: string;
|
|
297
|
+
evidence: string;
|
|
298
|
+
targetState: JsonObject;
|
|
299
|
+
}): Promise<UltragoalPipelineOverlapReceipt>;
|
|
193
300
|
export declare function getUltragoalRunCompletionState(plan: UltragoalPlan, options?: {
|
|
194
301
|
retryFailed?: boolean;
|
|
195
302
|
}): UltragoalRunCompletionState;
|
|
@@ -218,6 +325,7 @@ interface UltragoalChangeSet extends JsonObject {
|
|
|
218
325
|
mergeBase?: string;
|
|
219
326
|
paths: UltragoalChangeSetPath[];
|
|
220
327
|
rawDiffStat?: string;
|
|
328
|
+
rawDiff?: string;
|
|
221
329
|
trusted: true;
|
|
222
330
|
}
|
|
223
331
|
export declare function normalizeSurfaceToken(value: string): string;
|
|
@@ -300,4 +408,3 @@ interface UltragoalReviewResult extends JsonObject {
|
|
|
300
408
|
export declare function resolveGitBase(cwd: string, branch?: string): Promise<string>;
|
|
301
409
|
export declare function runUltragoalReview(cwd: string, args: readonly string[]): Promise<UltragoalReviewResult>;
|
|
302
410
|
export declare function runNativeUltragoalCommand(args: string[], cwd?: string): Promise<UltragoalCommandResult>;
|
|
303
|
-
export {};
|
|
@@ -35,6 +35,7 @@ export declare class GoalRuntime {
|
|
|
35
35
|
#private;
|
|
36
36
|
constructor(host: GoalRuntimeHost);
|
|
37
37
|
get snapshot(): GoalRuntimeSnapshot;
|
|
38
|
+
shouldTrackTurnBaseline(): boolean;
|
|
38
39
|
onTurnStart(turnId: string, baselineUsage: GoalTokenUsage): void;
|
|
39
40
|
onToolCompleted(toolName: string): Promise<void>;
|
|
40
41
|
onGoalToolCompleted(): Promise<void>;
|
|
@@ -11,6 +11,18 @@ interface GjcNativeHookDispatchOptions {
|
|
|
11
11
|
effectiveSkillConfig?: EffectiveSkillConfigInput;
|
|
12
12
|
configPaths?: string[];
|
|
13
13
|
}
|
|
14
|
+
export declare function clearGjcNativeSkillHookCachesForTesting(): void;
|
|
15
|
+
export declare function getGjcNativeSkillHookCacheStatsForTesting(): {
|
|
16
|
+
effectiveSkillConfigResolutions: number;
|
|
17
|
+
};
|
|
18
|
+
export declare function resolveGjcNativeSkillConfigForTesting(input: {
|
|
19
|
+
cwd: string;
|
|
20
|
+
configPaths?: string[];
|
|
21
|
+
sessionId?: string;
|
|
22
|
+
threadId?: string;
|
|
23
|
+
stateDir?: string;
|
|
24
|
+
}): Promise<EffectiveSkillConfigInput>;
|
|
14
25
|
export declare function dispatchGjcNativeSkillHook(payload: HookPayload, options?: GjcNativeHookDispatchOptions): Promise<GjcNativeHookDispatchResult>;
|
|
26
|
+
export declare function runGjcNativeSkillHookInProcess(payload: HookPayload): Promise<string>;
|
|
15
27
|
export declare function runGjcNativeSkillHookCli(): Promise<void>;
|
|
16
28
|
export {};
|
package/dist/types/main.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface InteractiveModeNotify {
|
|
|
18
18
|
message: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function submitInteractiveInput(mode: Pick<InteractiveMode, "markPendingSubmissionStarted" | "finishPendingSubmission" | "showError" | "checkShutdownRequested">, session: Pick<AgentSession, "prompt" | "promptCustomMessage">, input: SubmittedUserInput): Promise<void>;
|
|
21
|
+
type CreateSessionForMain = (options: CreateAgentSessionOptions, context?: {
|
|
22
|
+
skipPostCreateModelRefresh?: boolean;
|
|
23
|
+
}) => Promise<CreateAgentSessionResult>;
|
|
21
24
|
type AcpSessionFactory = (cwd: string) => Promise<AgentSession>;
|
|
22
25
|
export interface AcpSessionFactoryOptions {
|
|
23
26
|
baseOptions: CreateAgentSessionOptions;
|
|
@@ -27,7 +30,7 @@ export interface AcpSessionFactoryOptions {
|
|
|
27
30
|
modelRegistry: ModelRegistry;
|
|
28
31
|
parsedArgs: Pick<Args, "apiKey" | "default" | "model" | "mpreset" | "thinking">;
|
|
29
32
|
rawArgs: string[];
|
|
30
|
-
createSession:
|
|
33
|
+
createSession: CreateSessionForMain;
|
|
31
34
|
}
|
|
32
35
|
export declare function applyStartupModelProfiles(args: {
|
|
33
36
|
session: AgentSession;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { AssistantMessage, ImageContent, Usage } from "@gajae-code/ai";
|
|
2
2
|
import { Container } from "@gajae-code/tui";
|
|
3
|
+
interface AssistantMessageUpdateOptions {
|
|
4
|
+
streaming?: boolean;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Component that renders a complete assistant message
|
|
5
8
|
*/
|
|
@@ -12,5 +15,6 @@ export declare class AssistantMessageComponent extends Container {
|
|
|
12
15
|
setHideThinkingBlock(hide: boolean): void;
|
|
13
16
|
setToolResultImages(toolCallId: string, images: ImageContent[]): void;
|
|
14
17
|
setUsageInfo(usage: Usage): void;
|
|
15
|
-
updateContent(message: AssistantMessage): void;
|
|
18
|
+
updateContent(message: AssistantMessage, options?: AssistantMessageUpdateOptions): void;
|
|
16
19
|
}
|
|
20
|
+
export {};
|
|
@@ -10,6 +10,7 @@ export type ModelSelectorSelection = {
|
|
|
10
10
|
kind: "assignment";
|
|
11
11
|
model: Model;
|
|
12
12
|
role: GjcModelAssignmentTargetId | null;
|
|
13
|
+
roles?: readonly GjcModelAssignmentTargetId[];
|
|
13
14
|
thinkingLevel?: ThinkingLevel;
|
|
14
15
|
selector?: string;
|
|
15
16
|
} | {
|
|
@@ -56,6 +57,9 @@ export declare class ModelSelectorComponent extends Container {
|
|
|
56
57
|
refreshPresetProfiles(profileName?: string): void;
|
|
57
58
|
getSearchInput(): Input;
|
|
58
59
|
__testSelectProfile(profileName: string, setDefault: boolean): Promise<void>;
|
|
60
|
+
__testSelectAssignment(selection: Omit<Extract<ModelSelectorSelection, {
|
|
61
|
+
kind: "assignment";
|
|
62
|
+
}>, "kind">): Promise<void>;
|
|
59
63
|
__testSelectPresetAction(profileName: string, action: "rename" | "delete"): Promise<void>;
|
|
60
64
|
__testSelectedPresetRowIdentity(): string | undefined;
|
|
61
65
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container, SelectList } from "@gajae-code/tui";
|
|
2
|
+
import type { QueuedMessageEditEntry } from "../../session/agent-session";
|
|
3
|
+
type QueuedMessageMoveDirection = "up" | "down";
|
|
4
|
+
export type { QueuedMessageMoveDirection };
|
|
5
|
+
export declare class QueuedMessageSelectorComponent extends Container {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(entries: QueuedMessageEditEntry[], onSelect: (entry: QueuedMessageEditEntry) => void, onDelete: (entry: QueuedMessageEditEntry, selectedIndex: number) => void, onMove: (entry: QueuedMessageEditEntry, selectedIndex: number, direction: QueuedMessageMoveDirection) => void, onCancel: () => void, options?: {
|
|
8
|
+
selectedIndex?: number;
|
|
9
|
+
});
|
|
10
|
+
handleInput(keyData: string): void;
|
|
11
|
+
getSelectList(): SelectList;
|
|
12
|
+
}
|
|
@@ -16,6 +16,8 @@ export interface SettingsRuntimeContext {
|
|
|
16
16
|
thinkingLevel: ThinkingLevel | undefined;
|
|
17
17
|
/** Available themes */
|
|
18
18
|
availableThemes: string[];
|
|
19
|
+
/** Available model profile names (from the model registry) */
|
|
20
|
+
availableModelProfiles: string[];
|
|
19
21
|
/** Working directory for plugins tab */
|
|
20
22
|
cwd: string;
|
|
21
23
|
}
|
|
@@ -90,5 +90,14 @@ export declare class StatusLineComponent implements Component {
|
|
|
90
90
|
* everything fits on one row.
|
|
91
91
|
*/
|
|
92
92
|
getPreviewContent(width: number): string;
|
|
93
|
+
getCacheStatsForTest(): {
|
|
94
|
+
rowHits: number;
|
|
95
|
+
rowMisses: number;
|
|
96
|
+
};
|
|
97
|
+
invalidateBranchForTest(): void;
|
|
98
|
+
setCachedPrForTest(pr: {
|
|
99
|
+
number: number;
|
|
100
|
+
url: string;
|
|
101
|
+
} | null): void;
|
|
93
102
|
render(width: number): string[];
|
|
94
103
|
}
|