@gajae-code/coding-agent 0.3.1 → 0.4.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 +46 -0
- package/README.md +1 -1
- package/dist/types/cli/args.d.ts +2 -0
- package/dist/types/commands/launch.d.ts +6 -0
- package/dist/types/config/model-profile-activation.d.ts +30 -0
- package/dist/types/config/model-profiles.d.ts +19 -0
- package/dist/types/config/model-registry.d.ts +25 -10
- package/dist/types/config/model-resolver.d.ts +1 -1
- package/dist/types/config/models-config-schema.d.ts +84 -0
- package/dist/types/config/settings-schema.d.ts +15 -0
- package/dist/types/edit/diff.d.ts +16 -0
- package/dist/types/edit/modes/replace.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/activation.d.ts +14 -0
- package/dist/types/extensibility/gjc-plugins/index.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/injection.d.ts +31 -0
- package/dist/types/extensibility/gjc-plugins/loader.d.ts +3 -0
- package/dist/types/extensibility/gjc-plugins/paths.d.ts +8 -0
- package/dist/types/extensibility/gjc-plugins/schema.d.ts +3 -0
- package/dist/types/extensibility/gjc-plugins/state.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/tools.d.ts +8 -0
- package/dist/types/extensibility/gjc-plugins/types.d.ts +64 -0
- package/dist/types/extensibility/gjc-plugins/validation.d.ts +4 -0
- package/dist/types/extensibility/skills.d.ts +9 -1
- package/dist/types/gjc-runtime/state-runtime.d.ts +22 -0
- package/dist/types/harness-control-plane/storage.d.ts +7 -0
- package/dist/types/lsp/client.d.ts +1 -0
- package/dist/types/main.d.ts +10 -1
- package/dist/types/modes/bridge/bridge-mode.d.ts +2 -0
- package/dist/types/modes/components/custom-provider-wizard.d.ts +10 -0
- package/dist/types/modes/components/model-selector.d.ts +6 -1
- package/dist/types/modes/components/provider-onboarding-selector.d.ts +1 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/prompt-action-autocomplete.d.ts +2 -2
- package/dist/types/modes/rpc/rpc-client.d.ts +9 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +179 -2
- package/dist/types/modes/shared/agent-wire/approval-gate.d.ts +57 -0
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +16 -1
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +47 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +7 -0
- package/dist/types/modes/shared/agent-wire/handshake.d.ts +11 -1
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +3 -1
- package/dist/types/modes/shared/agent-wire/responses.d.ts +1 -1
- package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +27 -0
- package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +68 -0
- package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +161 -0
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +61 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +114 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +39 -0
- package/dist/types/modes/theme/theme.d.ts +2 -1
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/runtime-mcp/transports/stdio.d.ts +0 -4
- package/dist/types/sdk.d.ts +8 -1
- package/dist/types/session/agent-session.d.ts +10 -0
- package/dist/types/session/blob-store.d.ts +17 -0
- package/dist/types/session/messages.d.ts +3 -0
- package/dist/types/session/session-storage.d.ts +6 -0
- package/dist/types/skill-state/active-state.d.ts +13 -0
- package/dist/types/task/executor.d.ts +1 -0
- package/dist/types/thinking.d.ts +3 -2
- package/dist/types/tools/hindsight-recall.d.ts +0 -2
- package/dist/types/tools/hindsight-reflect.d.ts +0 -2
- package/dist/types/tools/hindsight-retain.d.ts +0 -2
- package/dist/types/tools/index.d.ts +7 -4
- package/package.json +9 -7
- package/src/cli/args.ts +10 -0
- package/src/cli.ts +14 -0
- package/src/commands/harness.ts +192 -7
- package/src/commands/launch.ts +8 -0
- package/src/commands/ultragoal.ts +1 -21
- package/src/config/model-equivalence.ts +1 -1
- package/src/config/model-profile-activation.ts +157 -0
- package/src/config/model-profiles.ts +155 -0
- package/src/config/model-registry.ts +51 -5
- package/src/config/model-resolver.ts +3 -2
- package/src/config/models-config-schema.ts +42 -1
- package/src/config/settings-schema.ts +14 -1
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +11 -1
- package/src/defaults/gjc/skills/ultragoal/ai-slop-cleaner.md +61 -0
- package/src/defaults/gjc-defaults.ts +7 -0
- package/src/discovery/claude-plugins.ts +25 -5
- package/src/edit/diff.ts +64 -1
- package/src/edit/modes/replace.ts +60 -2
- package/src/extensibility/gjc-plugins/activation.ts +87 -0
- package/src/extensibility/gjc-plugins/index.ts +9 -0
- package/src/extensibility/gjc-plugins/injection.ts +114 -0
- package/src/extensibility/gjc-plugins/loader.ts +131 -0
- package/src/extensibility/gjc-plugins/paths.ts +66 -0
- package/src/extensibility/gjc-plugins/schema.ts +79 -0
- package/src/extensibility/gjc-plugins/state.ts +29 -0
- package/src/extensibility/gjc-plugins/tools.ts +47 -0
- package/src/extensibility/gjc-plugins/types.ts +97 -0
- package/src/extensibility/gjc-plugins/validation.ts +76 -0
- package/src/extensibility/skills.ts +39 -7
- package/src/gjc-runtime/state-runtime.ts +93 -2
- package/src/gjc-runtime/state-writer.ts +17 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +62 -2
- package/src/gjc-runtime/workflow-manifest.generated.json +5 -0
- package/src/gjc-runtime/workflow-manifest.ts +2 -2
- package/src/harness-control-plane/storage.ts +144 -2
- package/src/hashline/hash.ts +23 -0
- package/src/hooks/skill-state.ts +2 -0
- package/src/internal-urls/docs-index.generated.ts +8 -11
- package/src/lsp/client.ts +7 -0
- package/src/main.ts +67 -1
- package/src/modes/acp/acp-agent.ts +25 -2
- package/src/modes/bridge/bridge-mode.ts +124 -2
- package/src/modes/components/custom-provider-wizard.ts +318 -0
- package/src/modes/components/model-selector.ts +108 -18
- package/src/modes/components/provider-onboarding-selector.ts +6 -1
- package/src/modes/controllers/input-controller.ts +14 -2
- package/src/modes/controllers/selector-controller.ts +57 -1
- package/src/modes/prompt-action-autocomplete.ts +49 -10
- package/src/modes/rpc/rpc-client.ts +57 -3
- package/src/modes/rpc/rpc-mode.ts +67 -0
- package/src/modes/rpc/rpc-types.ts +224 -2
- package/src/modes/shared/agent-wire/approval-gate.ts +151 -0
- package/src/modes/shared/agent-wire/command-dispatch.ts +97 -4
- package/src/modes/shared/agent-wire/command-validation.ts +25 -1
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +222 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +13 -0
- package/src/modes/shared/agent-wire/handshake.ts +43 -3
- package/src/modes/shared/agent-wire/protocol.ts +7 -0
- package/src/modes/shared/agent-wire/responses.ts +2 -2
- package/src/modes/shared/agent-wire/scopes.ts +2 -0
- package/src/modes/shared/agent-wire/unattended-action-policy.ts +341 -0
- package/src/modes/shared/agent-wire/unattended-audit.ts +175 -0
- package/src/modes/shared/agent-wire/unattended-run-controller.ts +406 -0
- package/src/modes/shared/agent-wire/unattended-session.ts +180 -0
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +324 -0
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +331 -0
- package/src/modes/theme/theme.ts +6 -0
- package/src/modes/types.ts +1 -0
- package/src/prompts/memories/consolidation.md +1 -1
- package/src/prompts/memories/read-path.md +6 -7
- package/src/prompts/memories/unavailable.md +2 -2
- package/src/prompts/tools/bash.md +1 -1
- package/src/prompts/tools/irc.md +1 -1
- package/src/prompts/tools/read.md +2 -2
- package/src/prompts/tools/recall.md +1 -0
- package/src/prompts/tools/reflect.md +1 -0
- package/src/prompts/tools/retain.md +1 -0
- package/src/runtime-mcp/client.ts +7 -4
- package/src/runtime-mcp/manager.ts +45 -13
- package/src/runtime-mcp/transports/http.ts +40 -14
- package/src/runtime-mcp/transports/stdio.ts +11 -10
- package/src/sdk.ts +48 -1
- package/src/session/agent-session.ts +211 -2
- package/src/session/blob-store.ts +84 -0
- package/src/session/messages.ts +3 -0
- package/src/session/session-manager.ts +390 -33
- package/src/session/session-storage.ts +26 -0
- package/src/setup/provider-onboarding.ts +2 -2
- package/src/skill-state/active-state.ts +89 -1
- package/src/slash-commands/builtin-registry.ts +1 -1
- package/src/task/discovery.ts +7 -1
- package/src/task/executor.ts +18 -2
- package/src/task/index.ts +2 -0
- package/src/thinking.ts +8 -2
- package/src/tools/ask.ts +39 -9
- package/src/tools/hindsight-recall.ts +0 -2
- package/src/tools/hindsight-reflect.ts +0 -2
- package/src/tools/hindsight-retain.ts +0 -2
- package/src/tools/index.ts +7 -18
- package/src/tools/read.ts +3 -3
- package/src/tools/skill.ts +15 -3
- package/src/utils/edit-mode.ts +1 -1
package/dist/types/sdk.d.ts
CHANGED
|
@@ -49,6 +49,13 @@ export interface CreateAgentSessionOptions {
|
|
|
49
49
|
providerSessionId?: string;
|
|
50
50
|
/** Custom tools to register (in addition to built-in tools). Accepts both CustomTool and ToolDefinition. */
|
|
51
51
|
customTools?: (CustomTool | ToolDefinition)[];
|
|
52
|
+
/** Explicit parent/phase used to load active GJC sub-skill tools for this session. */
|
|
53
|
+
gjcSubskillToolContext?: {
|
|
54
|
+
parent: string;
|
|
55
|
+
phase: string;
|
|
56
|
+
sessionId?: string;
|
|
57
|
+
cwd?: string;
|
|
58
|
+
};
|
|
52
59
|
/** Inline extensions (merged with discovery). */
|
|
53
60
|
extensions?: ExtensionFactory[];
|
|
54
61
|
/** Additional extension paths to load (merged with discovery). */
|
|
@@ -95,7 +102,7 @@ export interface CreateAgentSessionOptions {
|
|
|
95
102
|
taskDepth?: number;
|
|
96
103
|
/** Current role-agent type/name for nested task sessions. */
|
|
97
104
|
currentAgentType?: string;
|
|
98
|
-
/** Parent Hindsight state to alias for subagent memory
|
|
105
|
+
/** Parent Hindsight state to alias for subagent private memory backend compatibility. */
|
|
99
106
|
parentHindsightSessionState?: HindsightSessionState;
|
|
100
107
|
/** Pre-allocated agent identity for IRC routing. Default: "0-Main" for top-level, parentTaskPrefix-derived for sub. */
|
|
101
108
|
agentId?: string;
|
|
@@ -57,11 +57,13 @@ import { type FileSlashCommand } from "../extensibility/slash-commands";
|
|
|
57
57
|
import { GoalRuntime } from "../goals/runtime";
|
|
58
58
|
import type { Goal, GoalModeState } from "../goals/state";
|
|
59
59
|
import type { HindsightSessionState } from "../hindsight/state";
|
|
60
|
+
import type { WorkflowGateEmitter } from "../modes/shared/agent-wire/unattended-session";
|
|
60
61
|
import type { PlanModeState } from "../plan-mode/state";
|
|
61
62
|
import { type AgentRegistry } from "../registry/agent-registry";
|
|
62
63
|
import { type DiscoverableMCPSearchIndex, type DiscoverableMCPTool } from "../runtime-mcp/discoverable-tool-metadata";
|
|
63
64
|
import { type SecretObfuscator } from "../secrets/obfuscator";
|
|
64
65
|
import { type DiscoverableTool, type DiscoverableToolSearchIndex } from "../tool-discovery/tool-index";
|
|
66
|
+
import type { ToolSession } from "../tools";
|
|
65
67
|
import type { CheckpointState } from "../tools/checkpoint";
|
|
66
68
|
import { type TodoItem, type TodoPhase } from "../tools/todo-write";
|
|
67
69
|
import type { ClientBridge } from "./client-bridge";
|
|
@@ -166,6 +168,8 @@ export interface AgentSessionConfig {
|
|
|
166
168
|
taskDepth?: number;
|
|
167
169
|
/** Tool registry for LSP and settings */
|
|
168
170
|
toolRegistry?: Map<string, AgentTool>;
|
|
171
|
+
/** Tool-session factory context used to lazily attach workflow-gate-only tools. */
|
|
172
|
+
workflowGateToolSession?: ToolSession;
|
|
169
173
|
/** Current session pre-LLM message transform pipeline */
|
|
170
174
|
transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => AgentMessage[] | Promise<AgentMessage[]>;
|
|
171
175
|
/** Provider payload hook used by the active session request path */
|
|
@@ -459,6 +463,10 @@ export declare class AgentSession {
|
|
|
459
463
|
* Replace RPC host-owned tools and refresh the active tool set before the next model call.
|
|
460
464
|
*/
|
|
461
465
|
refreshRpcHostTools(rpcTools: AgentTool[]): Promise<void>;
|
|
466
|
+
/**
|
|
467
|
+
* Refresh plugin sub-skill tools after workflow/sub-skill activation or phase changes.
|
|
468
|
+
*/
|
|
469
|
+
refreshGjcSubskillTools(): Promise<void>;
|
|
462
470
|
/** Whether auto-compaction is currently running */
|
|
463
471
|
get isCompacting(): boolean;
|
|
464
472
|
/**
|
|
@@ -496,6 +504,8 @@ export declare class AgentSession {
|
|
|
496
504
|
setPlanModeState(state: PlanModeState | undefined): void;
|
|
497
505
|
getGoalModeState(): GoalModeState | undefined;
|
|
498
506
|
setGoalModeState(state: GoalModeState | undefined): void;
|
|
507
|
+
getWorkflowGateEmitter(): WorkflowGateEmitter | undefined;
|
|
508
|
+
setWorkflowGateEmitter(emitter: WorkflowGateEmitter | undefined): void;
|
|
499
509
|
get goalRuntime(): GoalRuntime;
|
|
500
510
|
markPlanReferenceSent(): void;
|
|
501
511
|
setPlanReferencePath(path: string): void;
|
|
@@ -26,9 +26,20 @@ export declare class BlobStore {
|
|
|
26
26
|
putSync(data: Buffer): BlobPutResult;
|
|
27
27
|
/** Read blob by hash, returns Buffer or null if not found. */
|
|
28
28
|
get(hash: string): Promise<Buffer | null>;
|
|
29
|
+
/** Synchronously read blob by hash, returns Buffer or null if not found. */
|
|
30
|
+
getSync(hash: string): Buffer | null;
|
|
29
31
|
/** Check if a blob exists. */
|
|
30
32
|
has(hash: string): Promise<boolean>;
|
|
31
33
|
}
|
|
34
|
+
export declare class MemoryBlobStore extends BlobStore {
|
|
35
|
+
#private;
|
|
36
|
+
constructor();
|
|
37
|
+
put(data: Buffer): Promise<BlobPutResult>;
|
|
38
|
+
putSync(data: Buffer): BlobPutResult;
|
|
39
|
+
get(hash: string): Promise<Buffer | null>;
|
|
40
|
+
getSync(hash: string): Buffer | null;
|
|
41
|
+
has(hash: string): Promise<boolean>;
|
|
42
|
+
}
|
|
32
43
|
/** Check if a data string is a blob reference. */
|
|
33
44
|
export declare function isBlobRef(data: string): boolean;
|
|
34
45
|
/** Extract the SHA-256 hash from a blob reference string. */
|
|
@@ -61,3 +72,9 @@ export declare function resolveImageDataUrl(blobStore: BlobStore, data: string):
|
|
|
61
72
|
* If the blob is missing, logs a warning and returns a placeholder.
|
|
62
73
|
*/
|
|
63
74
|
export declare function resolveImageData(blobStore: BlobStore, data: string): Promise<string>;
|
|
75
|
+
/** Synchronously resolve an externalized provider image data URL back to its original string. */
|
|
76
|
+
export declare function resolveImageDataUrlSync(blobStore: BlobStore, data: string): string;
|
|
77
|
+
/** Synchronously resolve a blob reference back to base64 data. */
|
|
78
|
+
export declare function resolveImageDataSync(blobStore: BlobStore, data: string): string;
|
|
79
|
+
/** Synchronously resolve a blob reference back to utf8 text. */
|
|
80
|
+
export declare function resolveTextBlobSync(blobStore: BlobStore, data: string): string;
|
|
@@ -8,6 +8,7 @@ import type { AgentMessage } from "@gajae-code/agent-core";
|
|
|
8
8
|
import { type BranchSummaryMessage, type CompactionSummaryMessage } from "@gajae-code/agent-core/compaction/messages";
|
|
9
9
|
import type { AssistantMessage, ImageContent, Message, MessageAttribution, TextContent } from "@gajae-code/ai";
|
|
10
10
|
export { type BranchSummaryMessage, type CompactionSummaryMessage, createBranchSummaryMessage, createCompactionSummaryMessage, } from "@gajae-code/agent-core/compaction/messages";
|
|
11
|
+
import type { LoadedSubskillActivation } from "../extensibility/gjc-plugins";
|
|
11
12
|
import type { OutputMeta } from "../tools/output-meta";
|
|
12
13
|
export declare const SKILL_PROMPT_MESSAGE_TYPE = "skill-prompt";
|
|
13
14
|
export interface SkillPromptDetails {
|
|
@@ -15,6 +16,8 @@ export interface SkillPromptDetails {
|
|
|
15
16
|
path: string;
|
|
16
17
|
args?: string;
|
|
17
18
|
lineCount: number;
|
|
19
|
+
subskillActivation?: LoadedSubskillActivation;
|
|
20
|
+
subskillActivationSet?: LoadedSubskillActivation[];
|
|
18
21
|
/** Internal: tag used by AgentSession to remove the pending-display chip
|
|
19
22
|
* from `#steeringMessages` / `#followUpMessages` when the agent consumes
|
|
20
23
|
* this message. Not surfaced to renderers; the `__` prefix signals
|
|
@@ -30,7 +30,9 @@ export interface SessionStorage {
|
|
|
30
30
|
readTextPrefix(path: string, maxBytes: number): Promise<string>;
|
|
31
31
|
writeText(path: string, content: string): Promise<void>;
|
|
32
32
|
rename(path: string, nextPath: string): Promise<void>;
|
|
33
|
+
renameSync(path: string, nextPath: string): void;
|
|
33
34
|
unlink(path: string): Promise<void>;
|
|
35
|
+
unlinkSync(path: string): void;
|
|
34
36
|
deleteSessionWithArtifacts(sessionPath: string): Promise<void>;
|
|
35
37
|
openWriter(path: string, options?: {
|
|
36
38
|
flags?: "a" | "w";
|
|
@@ -49,7 +51,9 @@ export declare class FileSessionStorage implements SessionStorage {
|
|
|
49
51
|
readTextPrefix(path: string, maxBytes: number): Promise<string>;
|
|
50
52
|
writeText(path: string, content: string): Promise<void>;
|
|
51
53
|
rename(path: string, nextPath: string): Promise<void>;
|
|
54
|
+
renameSync(path: string, nextPath: string): void;
|
|
52
55
|
unlink(path: string): Promise<void>;
|
|
56
|
+
unlinkSync(path: string): void;
|
|
53
57
|
openWriter(path: string, options?: {
|
|
54
58
|
flags?: "a" | "w";
|
|
55
59
|
onError?: (err: Error) => void;
|
|
@@ -73,7 +77,9 @@ export declare class MemorySessionStorage implements SessionStorage {
|
|
|
73
77
|
readTextPrefix(path: string, maxBytes: number): Promise<string>;
|
|
74
78
|
writeText(path: string, content: string): Promise<void>;
|
|
75
79
|
rename(path: string, nextPath: string): Promise<void>;
|
|
80
|
+
renameSync(path: string, nextPath: string): void;
|
|
76
81
|
unlink(path: string): Promise<void>;
|
|
82
|
+
unlinkSync(path: string): void;
|
|
77
83
|
deleteSessionWithArtifacts(_sessionPath: string): Promise<void>;
|
|
78
84
|
openWriter(path: string, options?: {
|
|
79
85
|
flags?: "a" | "w";
|
|
@@ -18,6 +18,16 @@ export interface WorkflowHudSummary {
|
|
|
18
18
|
updated_at?: string;
|
|
19
19
|
}
|
|
20
20
|
export type { WorkflowStateReceipt } from "./workflow-state-contract";
|
|
21
|
+
export interface ActiveSubskillEntry {
|
|
22
|
+
plugin: string;
|
|
23
|
+
subskillName: string;
|
|
24
|
+
parent: string;
|
|
25
|
+
bindsTo: string;
|
|
26
|
+
phase: string;
|
|
27
|
+
activationArg: string;
|
|
28
|
+
filePath: string;
|
|
29
|
+
toolPaths: string[];
|
|
30
|
+
}
|
|
21
31
|
export interface SkillActiveEntry {
|
|
22
32
|
skill: string;
|
|
23
33
|
phase?: string;
|
|
@@ -33,6 +43,7 @@ export interface SkillActiveEntry {
|
|
|
33
43
|
handoff_from?: string;
|
|
34
44
|
handoff_to?: string;
|
|
35
45
|
handoff_at?: string;
|
|
46
|
+
active_subskills?: ActiveSubskillEntry[];
|
|
36
47
|
}
|
|
37
48
|
export interface SkillActiveState {
|
|
38
49
|
version?: number;
|
|
@@ -49,6 +60,7 @@ export interface SkillActiveState {
|
|
|
49
60
|
initialized_mode?: CanonicalGjcWorkflowSkill;
|
|
50
61
|
initialized_state_path?: string;
|
|
51
62
|
active_skills?: SkillActiveEntry[];
|
|
63
|
+
active_subskills?: ActiveSubskillEntry[];
|
|
52
64
|
[key: string]: unknown;
|
|
53
65
|
}
|
|
54
66
|
export interface SkillActiveStatePaths {
|
|
@@ -70,6 +82,7 @@ export interface SyncSkillActiveStateOptions {
|
|
|
70
82
|
handoff_from?: string;
|
|
71
83
|
handoff_to?: string;
|
|
72
84
|
handoff_at?: string;
|
|
85
|
+
active_subskills?: ActiveSubskillEntry[];
|
|
73
86
|
}
|
|
74
87
|
export declare function normalizeWorkflowHudSummary(raw: unknown): WorkflowHudSummary | undefined;
|
|
75
88
|
export declare function isCanonicalGjcWorkflowSkill(skill: string): skill is CanonicalGjcWorkflowSkill;
|
|
@@ -37,6 +37,7 @@ export interface ExecutorOptions {
|
|
|
37
37
|
* if the resolved subagent model has no working credentials. See #985.
|
|
38
38
|
*/
|
|
39
39
|
parentActiveModelPattern?: string;
|
|
40
|
+
parentSessionId?: string;
|
|
40
41
|
thinkingLevel?: ThinkingLevel;
|
|
41
42
|
outputSchema?: unknown;
|
|
42
43
|
/** Parent task recursion depth (0 = top-level, 1 = first child, etc.) */
|
package/dist/types/thinking.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type ResolvedThinkingLevel, ThinkingLevel } from "@gajae-code/agent-core";
|
|
2
|
-
import { type Effort
|
|
1
|
+
import { type ResolvedThinkingLevel, ThinkingLevel } from "@gajae-code/agent-core/thinking";
|
|
2
|
+
import { type Effort } from "@gajae-code/ai/model-thinking";
|
|
3
|
+
import type { Model } from "@gajae-code/ai/types";
|
|
3
4
|
/**
|
|
4
5
|
* Metadata used to render thinking selector values in the coding-agent UI.
|
|
5
6
|
*/
|
|
@@ -14,8 +14,6 @@ export declare class HindsightRecallTool implements AgentTool<typeof hindsightRe
|
|
|
14
14
|
query: z.ZodString;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
readonly strict = true;
|
|
17
|
-
readonly loadMode = "discoverable";
|
|
18
|
-
readonly summary = "Search hindsight memory for relevant prior context";
|
|
19
17
|
constructor(session: ToolSession);
|
|
20
18
|
static createIf(session: ToolSession): HindsightRecallTool | null;
|
|
21
19
|
execute(_id: string, params: HindsightRecallParams, signal?: AbortSignal): Promise<AgentToolResult>;
|
|
@@ -16,8 +16,6 @@ export declare class HindsightReflectTool implements AgentTool<typeof hindsightR
|
|
|
16
16
|
context: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
readonly strict = true;
|
|
19
|
-
readonly loadMode = "discoverable";
|
|
20
|
-
readonly summary = "Reflect on recent work and write hindsight memory";
|
|
21
19
|
constructor(session: ToolSession);
|
|
22
20
|
static createIf(session: ToolSession): HindsightReflectTool | null;
|
|
23
21
|
execute(_id: string, params: HindsightReflectParams, signal?: AbortSignal): Promise<AgentToolResult>;
|
|
@@ -20,8 +20,6 @@ export declare class HindsightRetainTool implements AgentTool<typeof hindsightRe
|
|
|
20
20
|
}, z.core.$strip>>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
readonly strict = true;
|
|
23
|
-
readonly loadMode = "discoverable";
|
|
24
|
-
readonly summary = "Store important facts in hindsight memory";
|
|
25
23
|
constructor(session: ToolSession);
|
|
26
24
|
static createIf(session: ToolSession): HindsightRetainTool | null;
|
|
27
25
|
execute(_id: string, params: HindsightRetainParams): Promise<AgentToolResult>;
|
|
@@ -5,6 +5,7 @@ import type { Settings } from "../config/settings";
|
|
|
5
5
|
import type { Skill } from "../extensibility/skills";
|
|
6
6
|
import type { GoalModeState, GoalRuntime } from "../goals";
|
|
7
7
|
import type { HindsightSessionState } from "../hindsight/state";
|
|
8
|
+
import type { WorkflowGateEmitter } from "../modes/shared/agent-wire/unattended-session";
|
|
8
9
|
import type { PlanModeState } from "../plan-mode/state";
|
|
9
10
|
import type { AgentRegistry } from "../registry/agent-registry";
|
|
10
11
|
import type { ForkContextSeed, ForkContextSeedOptions } from "../session/agent-session";
|
|
@@ -37,9 +38,6 @@ export * from "./debug";
|
|
|
37
38
|
export * from "./eval";
|
|
38
39
|
export * from "./find";
|
|
39
40
|
export * from "./gh";
|
|
40
|
-
export * from "./hindsight-recall";
|
|
41
|
-
export * from "./hindsight-reflect";
|
|
42
|
-
export * from "./hindsight-retain";
|
|
43
41
|
export * from "./image-gen";
|
|
44
42
|
export * from "./inspect-image";
|
|
45
43
|
export * from "./irc";
|
|
@@ -153,6 +151,8 @@ export interface ToolSession {
|
|
|
153
151
|
getPlanModeState?: () => PlanModeState | undefined;
|
|
154
152
|
/** Goal mode state (if active or paused) */
|
|
155
153
|
getGoalModeState?: () => GoalModeState | undefined;
|
|
154
|
+
/** Unattended workflow-gate emitter (present only when unattended mode is negotiated). */
|
|
155
|
+
getWorkflowGateEmitter?: () => WorkflowGateEmitter | undefined;
|
|
156
156
|
/** Goal runtime for the active agent session. */
|
|
157
157
|
getGoalRuntime?: () => GoalRuntime | undefined;
|
|
158
158
|
/** Bridge to the connected client (e.g. ACP editor host). Tools should route fs/terminal/permission requests through this when available. */
|
|
@@ -245,7 +245,10 @@ export declare const DEFAULT_ESSENTIAL_TOOL_NAMES: readonly string[];
|
|
|
245
245
|
export declare function computeEssentialBuiltinNames(settings: Settings): string[];
|
|
246
246
|
/**
|
|
247
247
|
* Public callable factory map. External callers may invoke `BUILTIN_TOOLS.read(session)` or
|
|
248
|
-
* `BUILTIN_TOOLS[name](session)` to construct a tool directly.
|
|
248
|
+
* `BUILTIN_TOOLS[name](session)` to construct a public coding-harness tool directly.
|
|
249
|
+
*
|
|
250
|
+
* Hindsight memory helpers are intentionally excluded: memory is a private backend
|
|
251
|
+
* integration, not a public gajae-code tool surface.
|
|
249
252
|
*/
|
|
250
253
|
export declare const BUILTIN_TOOLS: Record<string, ToolFactory>;
|
|
251
254
|
export declare const HIDDEN_TOOLS: Record<string, ToolFactory>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gaebal-gajae.dev",
|
|
7
7
|
"author": "Yeachan-Heo",
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
37
37
|
"lint": "biome lint .",
|
|
38
38
|
"test": "bun test",
|
|
39
|
+
"generate-schemas": "bun ../../scripts/generate-json-schemas.ts",
|
|
40
|
+
"check:schemas": "bun ../../scripts/generate-json-schemas.ts --check",
|
|
39
41
|
"fix": "biome check --write --unsafe . && bun run format-prompts && bun run generate-docs-index",
|
|
40
42
|
"fmt": "biome format --write . && bun run format-prompts",
|
|
41
43
|
"format-prompts": "bun scripts/format-prompts.ts",
|
|
@@ -48,12 +50,12 @@
|
|
|
48
50
|
"@agentclientprotocol/sdk": "0.21.0",
|
|
49
51
|
"@babel/parser": "^7.29.3",
|
|
50
52
|
"@mozilla/readability": "^0.6.0",
|
|
51
|
-
"@gajae-code/stats": "0.
|
|
52
|
-
"@gajae-code/agent-core": "0.
|
|
53
|
-
"@gajae-code/ai": "0.
|
|
54
|
-
"@gajae-code/natives": "0.
|
|
55
|
-
"@gajae-code/tui": "0.
|
|
56
|
-
"@gajae-code/utils": "0.
|
|
53
|
+
"@gajae-code/stats": "0.4.0",
|
|
54
|
+
"@gajae-code/agent-core": "0.4.0",
|
|
55
|
+
"@gajae-code/ai": "0.4.0",
|
|
56
|
+
"@gajae-code/natives": "0.4.0",
|
|
57
|
+
"@gajae-code/tui": "0.4.0",
|
|
58
|
+
"@gajae-code/utils": "0.4.0",
|
|
57
59
|
"@puppeteer/browsers": "^2.13.0",
|
|
58
60
|
"@types/turndown": "5.0.6",
|
|
59
61
|
"@xterm/headless": "^6.0.0",
|
package/src/cli/args.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface Args {
|
|
|
17
17
|
smol?: string;
|
|
18
18
|
slow?: string;
|
|
19
19
|
plan?: string;
|
|
20
|
+
mpreset?: string;
|
|
21
|
+
default?: boolean;
|
|
20
22
|
apiKey?: string;
|
|
21
23
|
systemPrompt?: string;
|
|
22
24
|
appendSystemPrompt?: string;
|
|
@@ -127,6 +129,10 @@ export function parseArgs(args: string[]): Args {
|
|
|
127
129
|
result.slow = args[++i];
|
|
128
130
|
} else if (arg === "--plan" && i + 1 < args.length) {
|
|
129
131
|
result.plan = args[++i];
|
|
132
|
+
} else if (arg === "--mpreset" && i + 1 < args.length) {
|
|
133
|
+
result.mpreset = args[++i];
|
|
134
|
+
} else if (arg === "--default") {
|
|
135
|
+
result.default = true;
|
|
130
136
|
} else if (arg === "--api-key" && i + 1 < args.length) {
|
|
131
137
|
result.apiKey = args[++i];
|
|
132
138
|
} else if (arg === "--system-prompt" && i + 1 < args.length) {
|
|
@@ -199,6 +205,10 @@ export function parseArgs(args: string[]): Args {
|
|
|
199
205
|
}
|
|
200
206
|
}
|
|
201
207
|
|
|
208
|
+
if (result.default && !result.mpreset) {
|
|
209
|
+
throw new Error("--default requires --mpreset <name>");
|
|
210
|
+
}
|
|
211
|
+
|
|
202
212
|
return result;
|
|
203
213
|
}
|
|
204
214
|
|
package/src/cli.ts
CHANGED
|
@@ -84,6 +84,20 @@ function isSubcommand(first: string | undefined): boolean {
|
|
|
84
84
|
async function runSmokeTest(): Promise<void> {
|
|
85
85
|
const { smokeTestSyncWorker } = await import("@gajae-code/stats");
|
|
86
86
|
await smokeTestSyncWorker();
|
|
87
|
+
// Prove the embedded native addon extracts and the new perf exports resolve in
|
|
88
|
+
// the COMPILED single binary (dev runs only load the on-disk .node). Loading the
|
|
89
|
+
// natives module triggers loadNative()/embedded extraction; calling each new
|
|
90
|
+
// export confirms the symbols are present in the shipped binary.
|
|
91
|
+
const { h06FormatHashLines, h02ScoreSequenceFuzzy, h01FindBestFuzzyMatch } = await import(
|
|
92
|
+
"../../natives/native/index.js"
|
|
93
|
+
);
|
|
94
|
+
const hashed = h06FormatHashLines("a\nb", 1);
|
|
95
|
+
if (hashed.split("\n").length !== 2) {
|
|
96
|
+
throw new Error(`smoke-test: h06FormatHashLines returned unexpected output: ${JSON.stringify(hashed)}`);
|
|
97
|
+
}
|
|
98
|
+
if (typeof h02ScoreSequenceFuzzy !== "function" || typeof h01FindBestFuzzyMatch !== "function") {
|
|
99
|
+
throw new Error("smoke-test: native fuzzy exports missing from embedded addon");
|
|
100
|
+
}
|
|
87
101
|
process.stdout.write("smoke-test: ok\n");
|
|
88
102
|
}
|
|
89
103
|
|