@gajae-code/coding-agent 0.11.11 → 0.12.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 +49 -3
- package/dist/types/cli/read-cli.d.ts +1 -0
- package/dist/types/commands/deep-interview.d.ts +9 -0
- package/dist/types/commands/harness.d.ts +22 -0
- package/dist/types/commands/read.d.ts +6 -0
- package/dist/types/config/model-registry.d.ts +4 -0
- package/dist/types/config/provider-auth-health.d.ts +14 -0
- package/dist/types/config/provider-ranking.d.ts +59 -0
- package/dist/types/config/settings-schema.d.ts +29 -1
- package/dist/types/config/settings.d.ts +2 -0
- package/dist/types/extensibility/extensions/types.d.ts +22 -2
- package/dist/types/extensibility/shared-events.d.ts +6 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +5 -12
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +17 -32
- package/dist/types/gjc-runtime/deep-interview-stage.d.ts +37 -0
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +4 -135
- package/dist/types/gjc-runtime/gc-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/memory-guard-owner-claims.d.ts +47 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +52 -1
- package/dist/types/gjc-runtime/state-writer.d.ts +5 -46
- package/dist/types/gjc-runtime/team-launch.d.ts +1 -1
- package/dist/types/gjc-runtime/team-runtime.d.ts +2 -1
- package/dist/types/gjc-runtime/team-store.d.ts +12 -0
- package/dist/types/gjc-runtime/team-worker-memory-guard.d.ts +92 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +7 -0
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +8 -0
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +3 -5
- package/dist/types/internal-urls/local-root-gc.d.ts +2 -0
- package/dist/types/main.d.ts +1 -1
- package/dist/types/memories/index.d.ts +2 -0
- package/dist/types/modes/acp/acp-agent.d.ts +8 -0
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/irc-sidebar.d.ts +41 -0
- package/dist/types/modes/components/read-tool-group.d.ts +4 -4
- package/dist/types/modes/components/session-observer-overlay.d.ts +4 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +8 -0
- package/dist/types/modes/controllers/event-controller.d.ts +3 -0
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/irc-observation-ledger.d.ts +17 -1
- package/dist/types/modes/types.d.ts +2 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +16 -0
- package/dist/types/runtime-mcp/smithery-auth.d.ts +5 -0
- package/dist/types/sdk/broker/lifecycle.d.ts +5 -0
- package/dist/types/sdk/bus/control-drain-lease.d.ts +52 -0
- package/dist/types/sdk/bus/index.d.ts +15 -1
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +37 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +2 -1
- package/dist/types/sdk/bus/reconciliation-store.d.ts +65 -0
- package/dist/types/sdk/host/control/operations.d.ts +1 -1
- package/dist/types/sdk/host/host.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +5 -0
- package/dist/types/session/agent-session.d.ts +44 -10
- package/dist/types/session/memory-guard-checkpoint-participant.d.ts +69 -0
- package/dist/types/session/session-manager.d.ts +25 -13
- package/dist/types/session/streaming-output.d.ts +60 -5
- package/dist/types/skill-state/active-state.d.ts +0 -4
- package/dist/types/skill-state/workflow-hud.d.ts +3 -0
- package/dist/types/tools/browser/launch.d.ts +7 -0
- package/dist/types/tools/fetch.d.ts +17 -1
- package/dist/types/tools/output-meta.d.ts +21 -1
- package/dist/types/tools/read-internals.d.ts +12 -0
- package/dist/types/tools/read.d.ts +45 -1
- package/dist/types/tools/resource-gc.d.ts +4 -0
- package/dist/types/tools/tool-result.d.ts +7 -1
- package/package.json +9 -13
- package/scripts/benchmark-sticky-viewport-pr1.ts +239 -0
- package/scripts/capture-sticky-viewport-showcase.ts +292 -0
- package/scripts/generate-sdk-operation-inventory.ts +2 -0
- package/scripts/verify-gjc-sdk-canonicalization.ts +122 -18
- package/scripts/verify-sticky-viewport-showcase.ts +611 -0
- package/src/capability/index.ts +8 -0
- package/src/cli/read-cli.ts +2 -1
- package/src/cli.ts +1 -0
- package/src/commands/deep-interview.ts +29 -9
- package/src/commands/harness.ts +35 -12
- package/src/commands/read.ts +11 -2
- package/src/commands/team.ts +1 -1
- package/src/config/model-registry.ts +21 -2
- package/src/config/provider-auth-health.ts +42 -0
- package/src/config/provider-ranking.ts +119 -0
- package/src/config/settings-schema.ts +23 -1
- package/src/config/settings.ts +246 -108
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +229 -82
- package/src/defaults/gjc/skills/ralplan/SKILL.md +58 -25
- package/src/defaults/gjc/skills/team/SKILL.md +1 -1
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +25 -15
- package/src/eval/py/executor.ts +7 -2
- package/src/extensibility/extensions/types.ts +28 -4
- package/src/extensibility/shared-events.ts +5 -0
- package/src/gjc-runtime/deep-interview-ambiguity.ts +47 -82
- package/src/gjc-runtime/deep-interview-recorder.ts +227 -310
- package/src/gjc-runtime/deep-interview-runtime.ts +109 -270
- package/src/gjc-runtime/deep-interview-stage.ts +1016 -0
- package/src/gjc-runtime/deep-interview-state.ts +12 -943
- package/src/gjc-runtime/gc-render.ts +1 -0
- package/src/gjc-runtime/gc-runtime.ts +11 -1
- package/src/gjc-runtime/memory-guard-owner-claims.ts +389 -0
- package/src/gjc-runtime/ralplan-runtime.ts +742 -85
- package/src/gjc-runtime/state-runtime.ts +2 -1
- package/src/gjc-runtime/state-writer.ts +70 -222
- package/src/gjc-runtime/team-launch.ts +34 -5
- package/src/gjc-runtime/team-runtime.ts +970 -33
- package/src/gjc-runtime/team-store.ts +32 -0
- package/src/gjc-runtime/team-worker-memory-guard.ts +363 -0
- package/src/gjc-runtime/team-workers.ts +1 -0
- package/src/gjc-runtime/tmux-owner-isolation.ts +18 -0
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +20 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +13 -7
- package/src/gjc-runtime/workflow-manifest.generated.json +97 -350
- package/src/gjc-runtime/workflow-manifest.ts +34 -179
- package/src/hooks/native-skill-hook.ts +17 -4
- package/src/hooks/skill-state.ts +1 -23
- package/src/internal-urls/docs-index.generated.ts +8 -9
- package/src/internal-urls/local-root-gc.ts +127 -0
- package/src/main.ts +9 -5
- package/src/memories/index.ts +10 -0
- package/src/modes/DESIGN.md +47 -0
- package/src/modes/acp/acp-agent.ts +43 -7
- package/src/modes/acp/acp-event-mapper.ts +14 -7
- package/src/modes/acp/acp-mode.ts +39 -3
- package/src/modes/components/assistant-message.ts +123 -22
- package/src/modes/components/irc-sidebar.ts +176 -62
- package/src/modes/components/model-selector.ts +61 -4
- package/src/modes/components/oauth-selector.ts +42 -12
- package/src/modes/components/read-tool-group.ts +82 -14
- package/src/modes/components/session-observer-overlay.ts +187 -32
- package/src/modes/components/settings-selector.ts +60 -18
- package/src/modes/components/tool-execution.ts +138 -27
- package/src/modes/controllers/event-controller.ts +109 -27
- package/src/modes/controllers/extension-ui-controller.ts +19 -2
- package/src/modes/controllers/input-controller.ts +18 -3
- package/src/modes/controllers/selector-controller.ts +83 -37
- package/src/modes/interactive-mode.ts +62 -3
- package/src/modes/irc-observation-ledger.ts +71 -15
- package/src/modes/runtime-init.ts +19 -2
- package/src/modes/types.ts +2 -0
- package/src/modes/utils/ui-helpers.ts +94 -1
- package/src/prompts/agents/architect.md +9 -1
- package/src/prompts/agents/critic.md +9 -0
- package/src/prompts/system/system-prompt.md +0 -1
- package/src/prompts/tools/read.md +4 -2
- package/src/runtime-mcp/smithery-auth.ts +17 -2
- package/src/runtime-mcp/smithery-connect.ts +11 -1
- package/src/sdk/broker/lifecycle.ts +25 -6
- package/src/sdk/bus/control-drain-lease.ts +104 -0
- package/src/sdk/bus/index.ts +341 -38
- package/src/sdk/bus/kind-aware-reconciliation.ts +242 -0
- package/src/sdk/bus/prompt-reconciliation.ts +2 -1
- package/src/sdk/bus/reconciliation-store.ts +224 -0
- package/src/sdk/host/control/dispatch.ts +5 -1
- package/src/sdk/host/control/operations.ts +1 -1
- package/src/sdk/host/host.ts +23 -1
- package/src/sdk/host/query/handlers.ts +55 -0
- package/src/sdk/mcp/server.ts +46 -18
- package/src/sdk/protocol/operation-inventory.generated.json +29 -0
- package/src/sdk/protocol/operation-registry.ts +7 -2
- package/src/sdk/session.ts +13 -1
- package/src/session/agent-session.ts +466 -50
- package/src/session/memory-guard-checkpoint-participant.ts +131 -0
- package/src/session/session-manager.ts +764 -17
- package/src/session/streaming-output.ts +262 -43
- package/src/setup/provider-onboarding.ts +19 -4
- package/src/skill-state/active-state.ts +0 -10
- package/src/skill-state/workflow-hud.ts +25 -2
- package/src/skill-state/workflow-mutation-guard.ts +65 -7
- package/src/tools/ask.ts +89 -69
- package/src/tools/browser/launch.ts +41 -6
- package/src/tools/fetch.ts +114 -23
- package/src/tools/output-meta.ts +176 -9
- package/src/tools/path-utils.ts +5 -1
- package/src/tools/read-internals.ts +44 -0
- package/src/tools/read.ts +1542 -310
- package/src/tools/resource-gc.ts +182 -18
- package/src/tools/tool-result.ts +14 -1
- package/src/web/search/providers/codex.ts +1 -1
- package/dist/types/gjc-runtime/deep-interview-draft.d.ts +0 -8
- package/dist/types/gjc-runtime/deep-interview-payload.d.ts +0 -41
- package/dist/types/gjc-runtime/deep-interview-repair.d.ts +0 -17
- package/src/gjc-runtime/deep-interview-draft.ts +0 -843
- package/src/gjc-runtime/deep-interview-payload.ts +0 -262
- package/src/gjc-runtime/deep-interview-repair.ts +0 -1674
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as crypto from "node:crypto";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import type { RecoveryFsRoot } from "@gajae-code/natives";
|
|
4
|
+
import type {
|
|
5
|
+
RecoveryHydrationContext,
|
|
6
|
+
ResumeSessionIdentity,
|
|
7
|
+
SessionDestinationInput,
|
|
8
|
+
SessionManager,
|
|
9
|
+
SessionManagerCheckpointRevisionStrings,
|
|
10
|
+
StrictSessionOpenFailure,
|
|
11
|
+
} from "./session-manager";
|
|
12
|
+
|
|
13
|
+
export interface MemoryGuardTranscriptDescriptorV1 {
|
|
14
|
+
bytes: string;
|
|
15
|
+
relative_path: string;
|
|
16
|
+
sha256: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface MemoryGuardCheckpointBlobAuthorityV1 {
|
|
20
|
+
kind: "checkpoint_blob_tree_v1";
|
|
21
|
+
manifest_relative_path: string;
|
|
22
|
+
manifest_sha256: string;
|
|
23
|
+
root_relative_path: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface MemoryGuardCheckpointBlobManifestEntryV1 {
|
|
27
|
+
bytes: string;
|
|
28
|
+
relative_path: string;
|
|
29
|
+
sha256: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface MemoryGuardCheckpointBlobManifestV1 {
|
|
33
|
+
entries: MemoryGuardCheckpointBlobManifestEntryV1[];
|
|
34
|
+
schema_version: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface MemoryGuardSessionManagerCheckpointV1 {
|
|
38
|
+
blob_authority: MemoryGuardCheckpointBlobAuthorityV1;
|
|
39
|
+
revisions: SessionManagerCheckpointRevisionStrings;
|
|
40
|
+
schema_version: 1;
|
|
41
|
+
session_id: string;
|
|
42
|
+
session_name: string | null;
|
|
43
|
+
transcript: MemoryGuardTranscriptDescriptorV1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MemoryGuardParticipantDescriptorV1 {
|
|
47
|
+
ordinal: number;
|
|
48
|
+
checkpoint: MemoryGuardCheckpointBlobAuthorityV1;
|
|
49
|
+
revisions: SessionManagerCheckpointRevisionStrings;
|
|
50
|
+
session_id: string;
|
|
51
|
+
session_name: string | null;
|
|
52
|
+
transcript: MemoryGuardTranscriptDescriptorV1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface MemoryGuardParticipantIngressLease {
|
|
56
|
+
readonly token: symbol;
|
|
57
|
+
release(): void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface MemoryGuardCreateCheckpointInput {
|
|
61
|
+
ingressLease: MemoryGuardParticipantIngressLease;
|
|
62
|
+
checkpointRoot: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type MemoryGuardRestoreBlockedReason =
|
|
66
|
+
| StrictSessionOpenFailure["reason"]
|
|
67
|
+
| "checkpoint-mismatch"
|
|
68
|
+
| "participant-mismatch"
|
|
69
|
+
| "transcript-mismatch"
|
|
70
|
+
| "blob-manifest-mismatch"
|
|
71
|
+
| "blob-missing"
|
|
72
|
+
| "blob-hash-mismatch"
|
|
73
|
+
| "blob-authority-mismatch"
|
|
74
|
+
| "destination-unavailable";
|
|
75
|
+
|
|
76
|
+
export interface MemoryGuardRestoreInput {
|
|
77
|
+
incidentAuthority: RecoveryFsRoot;
|
|
78
|
+
participant: MemoryGuardParticipantDescriptorV1;
|
|
79
|
+
checkpoint: MemoryGuardSessionManagerCheckpointV1;
|
|
80
|
+
destination: SessionDestinationInput;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type MemoryGuardRestoreResult =
|
|
84
|
+
| {
|
|
85
|
+
kind: "staged";
|
|
86
|
+
manager: SessionManager;
|
|
87
|
+
hydrationContext: RecoveryHydrationContext;
|
|
88
|
+
transcriptIdentity: ResumeSessionIdentity;
|
|
89
|
+
cleanup: () => Promise<void>;
|
|
90
|
+
}
|
|
91
|
+
| { kind: "blocked"; reason: MemoryGuardRestoreBlockedReason };
|
|
92
|
+
|
|
93
|
+
function sortJson(value: unknown): unknown {
|
|
94
|
+
if (Array.isArray(value)) return value.map(sortJson);
|
|
95
|
+
if (value && typeof value === "object") {
|
|
96
|
+
return Object.fromEntries(
|
|
97
|
+
Object.entries(value as Record<string, unknown>)
|
|
98
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
99
|
+
.map(([key, child]) => [key, sortJson(child)]),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function memoryGuardCanonicalJson(value: unknown): string {
|
|
106
|
+
return `${JSON.stringify(sortJson(value))}\n`;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function memoryGuardSha256Hex(value: Uint8Array | string): string {
|
|
110
|
+
return crypto.createHash("sha256").update(value).digest("hex");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function isMemoryGuardDecimalString(value: unknown): value is string {
|
|
114
|
+
return typeof value === "string" && /^(?:0|[1-9]\d*)$/.test(value);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function isMemoryGuardSha256Hex(value: unknown): value is string {
|
|
118
|
+
return typeof value === "string" && /^[0-9a-f]{64}$/.test(value);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function isMemoryGuardRelativePath(value: unknown): value is string {
|
|
122
|
+
if (typeof value !== "string" || value.length === 0) return false;
|
|
123
|
+
if (path.isAbsolute(value) || value.includes("\\")) return false;
|
|
124
|
+
const parts = value.split("/");
|
|
125
|
+
return parts.every(part => part.length > 0 && part !== "." && part !== "..");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function hasOnlyKeys(value: Record<string, unknown>, allowed: readonly string[]): boolean {
|
|
129
|
+
const keys = Object.keys(value);
|
|
130
|
+
return keys.length === allowed.length && keys.every(key => allowed.includes(key));
|
|
131
|
+
}
|