@gajae-code/coding-agent 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -1
- package/dist/types/async/job-manager.d.ts +17 -3
- package/dist/types/config/settings-schema.d.ts +54 -0
- package/dist/types/exa/mcp-client.d.ts +10 -1
- package/dist/types/exec/bash-executor.d.ts +45 -12
- package/dist/types/extensibility/extensions/types.d.ts +16 -2
- package/dist/types/extensibility/gjc-plugins/index.d.ts +12 -2
- package/dist/types/extensibility/gjc-plugins/installer.d.ts +63 -7
- package/dist/types/extensibility/gjc-plugins/lifecycle-reconciliation.d.ts +55 -0
- package/dist/types/extensibility/gjc-plugins/lifecycle.d.ts +64 -0
- package/dist/types/extensibility/gjc-plugins/runtime-quarantine.d.ts +67 -0
- package/dist/types/extensibility/gjc-plugins/session-validation.d.ts +3 -1
- package/dist/types/extensibility/gjc-plugins/types.d.ts +124 -0
- package/dist/types/gjc-runtime/launch-tmux.d.ts +1 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +18 -0
- package/dist/types/gjc-runtime/team-launch.d.ts +1 -1
- package/dist/types/gjc-runtime/team-runtime.d.ts +25 -0
- package/dist/types/gjc-runtime/team-worker-heartbeat.d.ts +43 -0
- package/dist/types/gjc-runtime/tmux-owner-isolation.d.ts +10 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +31 -80
- package/dist/types/modes/acp/acp-agent.d.ts +2 -19
- package/dist/types/modes/components/gjc-bundle-settings.d.ts +34 -0
- package/dist/types/modes/components/notifications-settings-editor.d.ts +1 -0
- package/dist/types/modes/components/session-observer-overlay.d.ts +18 -0
- package/dist/types/modes/components/settings-selector.d.ts +9 -0
- package/dist/types/modes/components/status-line/gh.d.ts +5 -0
- package/dist/types/modes/components/transcript-viewer-overlay.d.ts +18 -1
- package/dist/types/reminders/star-reminder.d.ts +3 -13
- package/dist/types/runtime-mcp/manager.d.ts +1 -0
- package/dist/types/sdk/acp/adapter.d.ts +3 -1
- package/dist/types/sdk/broker/transport.d.ts +2 -0
- package/dist/types/sdk/bus/attachment-registry.d.ts +1 -0
- package/dist/types/sdk/bus/chat-daemon-control.d.ts +4 -1
- package/dist/types/sdk/bus/config.d.ts +6 -2
- package/dist/types/sdk/bus/index.d.ts +29 -0
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +8 -1
- package/dist/types/sdk/bus/lifecycle-control-runtime.d.ts +4 -0
- package/dist/types/sdk/bus/reconciliation-store.d.ts +7 -3
- package/dist/types/sdk/bus/rich-draft.d.ts +1 -0
- package/dist/types/sdk/bus/rich-render.d.ts +2 -0
- package/dist/types/sdk/bus/telegram-adoption-intent.d.ts +165 -0
- package/dist/types/sdk/bus/telegram-cli.d.ts +12 -0
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +11 -4
- package/dist/types/sdk/bus/telegram-daemon.d.ts +25 -1
- package/dist/types/sdk/bus/telegram-reference.d.ts +11 -1
- package/dist/types/sdk/bus/threaded-render.d.ts +3 -2
- package/dist/types/sdk/bus/topic-registry.d.ts +11 -1
- package/dist/types/sdk/host/query/revision-store.d.ts +2 -0
- package/dist/types/sdk/host/reverse-leases.d.ts +1 -1
- package/dist/types/sdk/prompt-status.d.ts +23 -3
- package/dist/types/sdk/session.d.ts +6 -0
- package/dist/types/session/agent-session.d.ts +38 -2
- package/dist/types/session/artifacts.d.ts +8 -0
- package/dist/types/session/blob-store.d.ts +57 -4
- package/dist/types/session/internal/managed-session-storage.d.ts +8 -1
- package/dist/types/session/session-manager.d.ts +23 -6
- package/dist/types/session/session-storage.d.ts +4 -0
- package/dist/types/session/streaming-output.d.ts +36 -7
- package/dist/types/setup/credential-import.d.ts +12 -0
- package/dist/types/skill-state/active-state.d.ts +12 -0
- package/dist/types/skill-state/workflow-hud.d.ts +6 -0
- package/dist/types/task/executor.d.ts +3 -2
- package/dist/types/task/index.d.ts +3 -1
- package/dist/types/task/provider-retry-status.d.ts +8 -0
- package/dist/types/task/receipt.d.ts +7 -1
- package/dist/types/task/types.d.ts +23 -0
- package/dist/types/tools/ask-answer-registry.d.ts +2 -2
- package/dist/types/tools/bash-interactive.d.ts +4 -1
- package/dist/types/tools/bash.d.ts +3 -1
- package/dist/types/tools/image-gen.d.ts +4 -0
- package/dist/types/tools/index.d.ts +4 -0
- package/dist/types/tools/output-meta.d.ts +23 -2
- package/dist/types/tools/path-utils.d.ts +1 -0
- package/dist/types/tools/read.d.ts +0 -6
- package/dist/types/tools/review.d.ts +5 -7
- package/dist/types/tools/subagent.d.ts +2 -0
- package/dist/types/utils/gh.d.ts +13 -0
- package/dist/types/utils/image-resize.d.ts +1 -0
- package/dist/types/web/search/providers/kimi.d.ts +2 -0
- package/dist/types/web/search/providers/searxng.d.ts +7 -0
- package/dist/types/web/search/providers/xai.d.ts +2 -0
- package/package.json +10 -8
- package/scripts/acp-conformance-agent.ts +218 -0
- package/scripts/capture-gjc-bundle-settings.ts +306 -0
- package/scripts/generate-sdk-operation-inventory.ts +3 -0
- package/scripts/resident-memory-bench.ts +1341 -0
- package/scripts/run-acp-conformance.ts +285 -0
- package/src/async/job-manager.ts +78 -20
- package/src/cli/fast-help.ts +1 -1
- package/src/cli/plugin-cli.ts +176 -18
- package/src/commands/team.ts +19 -1
- package/src/config/file-lock.ts +11 -2
- package/src/config/settings-schema.ts +51 -0
- package/src/coordinator-mcp/question-gate-codec.ts +1 -1
- package/src/coordinator-mcp/server.ts +5 -12
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +1 -0
- package/src/defaults/gjc/skills/ralplan/SKILL.md +19 -16
- package/src/defaults/gjc/skills/team/SKILL.md +2 -0
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +37 -24
- package/src/defaults/gjc/skills/ultragoal/validation-batch-contracts.md +12 -0
- package/src/defaults/gjc-defaults.ts +4 -4
- package/src/exa/mcp-client.ts +12 -3
- package/src/exec/bash-executor.ts +144 -27
- package/src/extensibility/extensions/runner.ts +15 -0
- package/src/extensibility/extensions/types.ts +18 -1
- package/src/extensibility/gjc-plugins/constrained-hooks.ts +8 -2
- package/src/extensibility/gjc-plugins/index.ts +19 -2
- package/src/extensibility/gjc-plugins/installer.ts +189 -50
- package/src/extensibility/gjc-plugins/lifecycle-reconciliation.ts +199 -0
- package/src/extensibility/gjc-plugins/lifecycle.ts +626 -0
- package/src/extensibility/gjc-plugins/observability.ts +3 -3
- package/src/extensibility/gjc-plugins/prompt-appendix.ts +5 -1
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +12 -2
- package/src/extensibility/gjc-plugins/runtime-quarantine.ts +121 -0
- package/src/extensibility/gjc-plugins/schema.ts +84 -12
- package/src/extensibility/gjc-plugins/session-validation.ts +9 -3
- package/src/extensibility/gjc-plugins/types.ts +141 -0
- package/src/extensibility/gjc-plugins/validation.ts +9 -0
- package/src/gjc-runtime/launch-tmux.ts +25 -6
- package/src/gjc-runtime/managed-owner-admission.ts +1 -1
- package/src/gjc-runtime/ralplan-runtime.ts +411 -17
- package/src/gjc-runtime/team-launch.ts +8 -0
- package/src/gjc-runtime/team-runtime.ts +140 -32
- package/src/gjc-runtime/team-worker-heartbeat.ts +149 -0
- package/src/gjc-runtime/tmux-owner-isolation.ts +10 -0
- package/src/gjc-runtime/tmux-sessions.ts +58 -13
- package/src/gjc-runtime/ultragoal-runtime.ts +401 -611
- package/src/gjc-runtime/workflow-manifest.generated.json +8 -99
- package/src/gjc-runtime/workflow-manifest.ts +4 -68
- package/src/internal-urls/docs-index.generated.ts +15 -15
- package/src/modes/DESIGN.md +51 -0
- package/src/modes/acp/acp-agent.ts +298 -186
- package/src/modes/components/gjc-bundle-settings.ts +508 -0
- package/src/modes/components/notifications-settings-editor.ts +12 -1
- package/src/modes/components/oauth-selector.ts +68 -30
- package/src/modes/components/session-observer-overlay.ts +305 -86
- package/src/modes/components/settings-selector.ts +56 -5
- package/src/modes/components/status-line/gh.ts +16 -0
- package/src/modes/components/tool-status-header.ts +3 -14
- package/src/modes/components/transcript-viewer-overlay.ts +99 -24
- package/src/modes/controllers/command-controller.ts +4 -0
- package/src/modes/controllers/extension-ui-controller.ts +7 -0
- package/src/modes/controllers/selector-controller.ts +45 -0
- package/src/modes/runtime-init.ts +3 -0
- package/src/prompts/agent-fragments/ralplan-persistence.md +4 -3
- package/src/prompts/system/eager-todo.md +8 -4
- package/src/prompts/system/system-prompt.md +11 -4
- package/src/prompts/tools/bash.md +5 -5
- package/src/prompts/tools/search-tool-bm25.md +5 -0
- package/src/prompts/tools/task.md +1 -1
- package/src/reminders/star-reminder.ts +4 -42
- package/src/runtime-mcp/manager.ts +19 -4
- package/src/sdk/acp/adapter.ts +22 -6
- package/src/sdk/broker/transport.ts +35 -3
- package/src/sdk/bus/attachment-registry.ts +5 -1
- package/src/sdk/bus/chat-daemon-cli.ts +4 -39
- package/src/sdk/bus/chat-daemon-control.ts +6 -3
- package/src/sdk/bus/config.ts +18 -2
- package/src/sdk/bus/index.ts +661 -126
- package/src/sdk/bus/kind-aware-reconciliation.ts +148 -73
- package/src/sdk/bus/lifecycle-commands.ts +4 -1
- package/src/sdk/bus/lifecycle-control-runtime.ts +403 -88
- package/src/sdk/bus/reconciliation-store.ts +95 -16
- package/src/sdk/bus/rich-draft.ts +1 -1
- package/src/sdk/bus/rich-render.ts +2 -2
- package/src/sdk/bus/telegram-adoption-intent.ts +574 -0
- package/src/sdk/bus/telegram-cli.ts +33 -8
- package/src/sdk/bus/telegram-daemon-cli.ts +1 -0
- package/src/sdk/bus/telegram-daemon-contract.ts +11 -4
- package/src/sdk/bus/telegram-daemon.ts +916 -23
- package/src/sdk/bus/telegram-reference.ts +40 -3
- package/src/sdk/bus/threaded-render.ts +48 -3
- package/src/sdk/bus/topic-registry.ts +20 -0
- package/src/sdk/host/query/revision-store.ts +36 -2
- package/src/sdk/host/reverse-leases.ts +44 -7
- package/src/sdk/prompt-status.ts +16 -3
- package/src/sdk/protocol/operation-inventory.generated.json +22 -0
- package/src/sdk/session.ts +88 -9
- package/src/session/agent-session.ts +822 -172
- package/src/session/artifacts.ts +22 -0
- package/src/session/auth-broker-config.ts +10 -3
- package/src/session/blob-store.ts +915 -24
- package/src/session/internal/managed-session-scope.ts +44 -6
- package/src/session/internal/managed-session-storage.ts +48 -6
- package/src/session/session-manager.ts +1614 -435
- package/src/session/session-storage.ts +9 -1
- package/src/session/streaming-output.ts +238 -68
- package/src/setup/credential-import.ts +75 -13
- package/src/skill-state/active-state.ts +32 -0
- package/src/skill-state/workflow-hud.ts +17 -0
- package/src/skill-state/workflow-mutation-guard.ts +496 -2
- package/src/task/executor.ts +122 -39
- package/src/task/index.ts +23 -14
- package/src/task/provider-retry-status.ts +16 -0
- package/src/task/receipt.ts +23 -7
- package/src/task/render.ts +6 -2
- package/src/task/types.ts +108 -0
- package/src/tools/ask-answer-registry.ts +12 -6
- package/src/tools/ask.ts +86 -55
- package/src/tools/ast-edit.ts +1 -0
- package/src/tools/ast-grep.ts +1 -0
- package/src/tools/bash-interactive.ts +8 -3
- package/src/tools/bash.ts +503 -60
- package/src/tools/find.ts +1 -0
- package/src/tools/image-gen.ts +29 -5
- package/src/tools/index.ts +4 -0
- package/src/tools/output-meta.ts +108 -14
- package/src/tools/path-utils.ts +3 -2
- package/src/tools/read.ts +18 -0
- package/src/tools/review.ts +5 -7
- package/src/tools/search.ts +1 -0
- package/src/tools/subagent-render.ts +6 -2
- package/src/tools/subagent.ts +6 -0
- package/src/tools/telegram-send.ts +6 -3
- package/src/utils/gh.ts +39 -0
- package/src/utils/image-resize.ts +3 -0
- package/src/web/search/providers/anthropic.ts +4 -4
- package/src/web/search/providers/kimi.ts +15 -5
- package/src/web/search/providers/searxng.ts +47 -4
- package/src/web/search/providers/xai.ts +7 -2
- package/dist/types/gjc-runtime/ultragoal-pipeline.d.ts +0 -23
- package/src/defaults/gjc/skills/ultragoal/pipeline-validation-contracts.md +0 -30
- package/src/gjc-runtime/ultragoal-pipeline.ts +0 -306
|
@@ -48,6 +48,18 @@ export interface DiscoveryOptions {
|
|
|
48
48
|
env?: Record<string, string | undefined>;
|
|
49
49
|
/** Override the platform (defaults to `process.platform`). */
|
|
50
50
|
platform?: NodeJS.Platform;
|
|
51
|
+
/**
|
|
52
|
+
* Claude Code config directory holding `.credentials.json`.
|
|
53
|
+
*
|
|
54
|
+
* Defaults to the trusted `CLAUDE_CONFIG_DIR` value, else `<homeDir>/.claude`.
|
|
55
|
+
*/
|
|
56
|
+
claudeConfigDir?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Codex CLI home directory holding `auth.json`.
|
|
59
|
+
*
|
|
60
|
+
* Defaults to the trusted `CODEX_HOME` value, else `<homeDir>/.codex`.
|
|
61
|
+
*/
|
|
62
|
+
codexHome?: string;
|
|
51
63
|
/**
|
|
52
64
|
* Reader for the macOS Keychain `Claude Code-credentials` entry. Defaults to
|
|
53
65
|
* shelling out to `security`; injected in tests. Returns the raw JSON string,
|
|
@@ -88,6 +88,16 @@ export interface SyncSkillActiveStateOptions {
|
|
|
88
88
|
}
|
|
89
89
|
export declare function normalizeWorkflowHudSummary(raw: unknown): WorkflowHudSummary | undefined;
|
|
90
90
|
export declare function isCanonicalGjcWorkflowSkill(skill: string): skill is CanonicalGjcWorkflowSkill;
|
|
91
|
+
/**
|
|
92
|
+
* Continuation inertness for compaction auto-continue, derived from each
|
|
93
|
+
* workflow's manifest contract: manifest-terminal and explicitly inert phases
|
|
94
|
+
* are inert; unknown skills or phases unknown to the skill's manifest are
|
|
95
|
+
* conservatively inert so a synthetic continuation never wakes an unrecognized
|
|
96
|
+
* workflow. Generic Ultragoal `blocked` remains continuation-active because its
|
|
97
|
+
* blocker may be autonomously resolvable; verified human pauses are represented
|
|
98
|
+
* by the inline goal's `paused` status instead.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isWorkflowContinuationInert(skill: string, phase: string): boolean;
|
|
91
101
|
export declare function listActiveSkills(raw: unknown): SkillActiveEntry[];
|
|
92
102
|
export declare function normalizeSkillActiveState(raw: unknown): SkillActiveState | null;
|
|
93
103
|
export declare function getSkillActiveStatePaths(cwd: string, sessionId?: string): SkillActiveStatePaths;
|
|
@@ -95,6 +105,8 @@ export declare function collapsePlanningPipeline(entries: readonly SkillActiveEn
|
|
|
95
105
|
export type VisibleSkillActiveStateCacheTier = "security" | "hud";
|
|
96
106
|
export interface ReadVisibleSkillActiveStateOptions {
|
|
97
107
|
tier?: VisibleSkillActiveStateCacheTier;
|
|
108
|
+
/** Bypass all signature/TTL caches for authorization decisions. */
|
|
109
|
+
bypassCache?: boolean;
|
|
98
110
|
}
|
|
99
111
|
interface ActiveStateStatSignature {
|
|
100
112
|
path: string;
|
|
@@ -26,6 +26,12 @@ interface RalplanHudState extends WorkflowGateHudState {
|
|
|
26
26
|
verdict?: string;
|
|
27
27
|
latestSummary?: string;
|
|
28
28
|
pendingApproval?: boolean;
|
|
29
|
+
autoHandoff?: {
|
|
30
|
+
configuredTarget: string;
|
|
31
|
+
effectiveTarget: string;
|
|
32
|
+
degradationReason: string | null;
|
|
33
|
+
};
|
|
34
|
+
planningStuck?: boolean;
|
|
29
35
|
updatedAt?: string;
|
|
30
36
|
}
|
|
31
37
|
interface UltragoalLikeGoal {
|
|
@@ -19,7 +19,7 @@ import { SessionManager } from "../session/session-manager";
|
|
|
19
19
|
import type { ContextFileEntry } from "../tools";
|
|
20
20
|
import type { EventBus } from "../utils/event-bus";
|
|
21
21
|
import type { WorkspaceTree } from "../workspace-tree";
|
|
22
|
-
import { type AgentDefinition, type AgentProgress, type
|
|
22
|
+
import { type AgentDefinition, type AgentProgress, type SingleResult } from "./types";
|
|
23
23
|
import { type ExecutorExecutionMode } from "./ultragoal-redteam-activation";
|
|
24
24
|
export declare function trimForkContextSeedForModel(seed: ForkContextSeed, model: Model | undefined): ForkContextSeed;
|
|
25
25
|
/** Options for subagent execution */
|
|
@@ -79,6 +79,8 @@ export interface ExecutorOptions {
|
|
|
79
79
|
* subagents, and a main-model fast-mode auto-disable does not clobber it.
|
|
80
80
|
*/
|
|
81
81
|
inheritedServiceTier?: ServiceTier;
|
|
82
|
+
/** Resolve whether the effective subagent tier grants fast mode for the selected provider. */
|
|
83
|
+
isFastForSubagentProvider?: (provider?: string) => boolean;
|
|
82
84
|
/** Override local:// protocol options so subagent shares parent's local:// root */
|
|
83
85
|
localProtocolOptions?: LocalProtocolOptions;
|
|
84
86
|
/**
|
|
@@ -122,7 +124,6 @@ interface FinalizeSubprocessOutputArgs {
|
|
|
122
124
|
doneAborted: boolean;
|
|
123
125
|
signalAborted: boolean;
|
|
124
126
|
yieldItems?: YieldItem[];
|
|
125
|
-
reportFindings?: ReviewFinding[];
|
|
126
127
|
outputSchema: unknown;
|
|
127
128
|
}
|
|
128
129
|
interface FinalizeSubprocessOutputResult {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Model } from "@gajae-code/ai";
|
|
3
3
|
import type { ToolSession } from "..";
|
|
4
|
+
import { type SubagentRunOutcome } from "../async";
|
|
4
5
|
import type { Theme } from "../modes/theme/theme";
|
|
5
|
-
import { type TaskToolDetails, type TaskToolSchemaInstance } from "./types";
|
|
6
|
+
import { type SingleResult, type TaskToolDetails, type TaskToolSchemaInstance } from "./types";
|
|
6
7
|
import "../tools/review";
|
|
7
8
|
import { renderResult, renderCall as renderTaskCall } from "./render";
|
|
9
|
+
export declare function subagentRunOutcomeFromSingleResult(finalText: string, singleResult: Pick<SingleResult, "aborted" | "exitCode" | "paused" | "setupFailure"> | undefined): string | SubagentRunOutcome;
|
|
8
10
|
export { loadBundledAgents as BUNDLED_AGENTS } from "./agents";
|
|
9
11
|
export { discoverCommands, expandCommand, getCommand } from "./commands";
|
|
10
12
|
export { discoverAgents, getAgent } from "./discovery";
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { AgentProgress, TaskToolDetails } from "./types";
|
|
2
2
|
export type ProviderRetryKind = NonNullable<AgentProgress["retryState"]>["kind"];
|
|
3
3
|
export declare function classifyProviderRetry(errorMessage: string): ProviderRetryKind;
|
|
4
|
+
/**
|
|
5
|
+
* Prefer typed transport facts when present; fall back to message regex for
|
|
6
|
+
* message-only callers that never received `transportFailure.providerCode`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function classifyProviderRetryFromTransport(facts: {
|
|
9
|
+
providerCode?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
}): ProviderRetryKind;
|
|
4
12
|
export declare function providerNameFromModel(model: string | undefined): string | undefined;
|
|
5
13
|
export declare function providerRetryPhaseLabel(kind: ProviderRetryKind): string;
|
|
6
14
|
export declare function providerProgressAgeLabel(retryState: NonNullable<AgentProgress["retryState"]>, nowMs: number): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SingleResult, type TaskToolDetails } from "./types";
|
|
1
|
+
import { type ReviewFindingsArtifactRef, type SingleResult, type TaskToolDetails } from "./types";
|
|
2
2
|
export interface TaskRoi {
|
|
3
3
|
tokens: number;
|
|
4
4
|
contextTokens?: number;
|
|
@@ -29,6 +29,7 @@ export interface TaskResultReceipt {
|
|
|
29
29
|
contextWindow?: number;
|
|
30
30
|
modelOverride?: string | string[];
|
|
31
31
|
modelSubstitutionWarning?: SingleResult["modelSubstitutionWarning"];
|
|
32
|
+
fastMode?: boolean;
|
|
32
33
|
usage?: SingleResult["usage"];
|
|
33
34
|
cost?: number;
|
|
34
35
|
usageCostBreakdownComplete?: true;
|
|
@@ -37,6 +38,9 @@ export interface TaskResultReceipt {
|
|
|
37
38
|
attempt: number;
|
|
38
39
|
errorSummary: string;
|
|
39
40
|
};
|
|
41
|
+
setupFailure?: {
|
|
42
|
+
summary: string;
|
|
43
|
+
};
|
|
40
44
|
errorSummary?: string;
|
|
41
45
|
abortSummary?: string;
|
|
42
46
|
preview: string;
|
|
@@ -55,6 +59,8 @@ export interface TaskResultReceipt {
|
|
|
55
59
|
severity?: string;
|
|
56
60
|
summary: string;
|
|
57
61
|
}>;
|
|
62
|
+
/** Canonical full-fidelity findings; inline summaries are display-only. */
|
|
63
|
+
findingsRef?: ReviewFindingsArtifactRef;
|
|
58
64
|
};
|
|
59
65
|
extractedToolCounts?: Record<string, number>;
|
|
60
66
|
forkContext?: SingleResult["forkContext"];
|
|
@@ -368,6 +368,13 @@ export interface ReviewFinding {
|
|
|
368
368
|
line_start: number;
|
|
369
369
|
line_end: number;
|
|
370
370
|
}
|
|
371
|
+
/** Durable full-fidelity review findings artifact associated with a task result. */
|
|
372
|
+
export interface ReviewFindingsArtifactRef {
|
|
373
|
+
uri: `artifact://${string}`;
|
|
374
|
+
sizeBytes: number;
|
|
375
|
+
sha256: string;
|
|
376
|
+
findingCount: number;
|
|
377
|
+
}
|
|
371
378
|
/** Review summary submitted by the reviewer agent */
|
|
372
379
|
export interface ReviewSummary {
|
|
373
380
|
overall_correctness: "correct" | "incorrect";
|
|
@@ -439,6 +446,8 @@ export interface AgentProgress {
|
|
|
439
446
|
durationMs: number;
|
|
440
447
|
modelOverride?: string | string[];
|
|
441
448
|
modelSubstitutionWarning?: ModelSubstitutionWarning;
|
|
449
|
+
/** Whether the resolved subagent model runs under the effective fast service tier. */
|
|
450
|
+
fastMode?: boolean;
|
|
442
451
|
/** Data extracted by registered subprocess tool handlers (keyed by tool name) */
|
|
443
452
|
extractedToolData?: Record<string, unknown[]>;
|
|
444
453
|
/**
|
|
@@ -469,6 +478,8 @@ export interface AgentProgress {
|
|
|
469
478
|
attempt: number;
|
|
470
479
|
errorMessage: string;
|
|
471
480
|
};
|
|
481
|
+
/** Safe diagnostic retained in terminal progress when setup fails before the first LLM request. */
|
|
482
|
+
setupFailure?: SetupFailureSummary;
|
|
472
483
|
/**
|
|
473
484
|
* Snapshot of the most recent `task` tool call's in-flight `TaskToolDetails`,
|
|
474
485
|
* captured from `tool_execution_update`. Lets the parent UI surface live
|
|
@@ -478,6 +489,12 @@ export interface AgentProgress {
|
|
|
478
489
|
*/
|
|
479
490
|
inflightTaskDetails?: TaskToolDetails;
|
|
480
491
|
}
|
|
492
|
+
/** Bounded diagnostic retained when subagent setup fails before an LLM request starts. */
|
|
493
|
+
export interface SetupFailureSummary {
|
|
494
|
+
summary: string;
|
|
495
|
+
}
|
|
496
|
+
/** Create a bounded diagnostic that preserves a setup failure's cause without exposing credentials or local paths. */
|
|
497
|
+
export declare function createSetupFailureSummary(error: unknown): SetupFailureSummary;
|
|
481
498
|
/** Result from a single agent execution */
|
|
482
499
|
export interface SingleResult {
|
|
483
500
|
index: number;
|
|
@@ -501,7 +518,11 @@ export interface SingleResult {
|
|
|
501
518
|
contextWindow?: number;
|
|
502
519
|
modelOverride?: string | string[];
|
|
503
520
|
modelSubstitutionWarning?: ModelSubstitutionWarning;
|
|
521
|
+
/** Whether the resolved subagent model ran under the effective fast service tier. */
|
|
522
|
+
fastMode?: boolean;
|
|
504
523
|
error?: string;
|
|
524
|
+
/** Safe diagnostic for a failure before the subagent sent its first LLM request. */
|
|
525
|
+
setupFailure?: SetupFailureSummary;
|
|
505
526
|
aborted?: boolean;
|
|
506
527
|
abortReason?: string;
|
|
507
528
|
paused?: boolean;
|
|
@@ -521,6 +542,8 @@ export interface SingleResult {
|
|
|
521
542
|
producedChanges?: boolean;
|
|
522
543
|
/** Data extracted by registered subprocess tool handlers (keyed by tool name) */
|
|
523
544
|
extractedToolData?: Record<string, unknown[]>;
|
|
545
|
+
/** Full wrapper-owned review evidence, kept separate from caller completion data. */
|
|
546
|
+
reviewFindingsRef?: ReviewFindingsArtifactRef;
|
|
524
547
|
/**
|
|
525
548
|
* Terminal retry failure, when the subagent exited because the auto-retry
|
|
526
549
|
* loop gave up (retry-after exceeded the cap, or all attempts exhausted).
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { WorkflowGateEmitter } from "../modes/shared/agent-wire/workflow-gate-broker";
|
|
10
10
|
import type { AskAnswerSource } from "./index";
|
|
11
|
-
/** Register `source` for `sessionId`. Returns a disposer that
|
|
11
|
+
/** Register `source` for `sessionId`. Returns a disposer that restores the prior source. */
|
|
12
12
|
export declare function registerAskAnswerSource(sessionId: string, source: AskAnswerSource): () => void;
|
|
13
|
-
/** The answer source for `sessionId`, if one is registered. */
|
|
13
|
+
/** The highest-priority answer source for `sessionId`, if one is registered. */
|
|
14
14
|
export declare function getAskAnswerSource(sessionId: string): AskAnswerSource | undefined;
|
|
15
15
|
/** Publish a session's current workflow-gate emitter after mode initialization. */
|
|
16
16
|
export declare function notifyWorkflowGateEmitterChanged(sessionId: string, emitter: WorkflowGateEmitter | undefined): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentToolContext } from "@gajae-code/agent-core";
|
|
2
|
-
import { type OutputSummary } from "../session/streaming-output";
|
|
2
|
+
import { type OutputSummary, type TerminalArtifactPublisher } from "../session/streaming-output";
|
|
3
3
|
export interface BashInteractiveResult extends OutputSummary {
|
|
4
4
|
exitCode: number | undefined;
|
|
5
5
|
cancelled: boolean;
|
|
@@ -13,4 +13,7 @@ export declare function runInteractiveBashPty(ui: NonNullable<AgentToolContext["
|
|
|
13
13
|
env?: Record<string, string>;
|
|
14
14
|
artifactPath?: string;
|
|
15
15
|
artifactId?: string;
|
|
16
|
+
artifactPublisher?: TerminalArtifactPublisher;
|
|
17
|
+
spillThreshold?: number;
|
|
18
|
+
headBytes?: number;
|
|
16
19
|
}): Promise<BashInteractiveResult>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Component } from "@gajae-code/tui";
|
|
3
3
|
import * as z from "zod/v4";
|
|
4
|
+
import { type BashArtifactSaveResult } from "../exec/bash-executor";
|
|
4
5
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
5
6
|
import { type Theme } from "../modes/theme/theme";
|
|
6
7
|
import type { ToolSession } from ".";
|
|
7
8
|
import { type OutputMeta } from "./output-meta";
|
|
8
9
|
export declare const BASH_DEFAULT_PREVIEW_LINES = 10;
|
|
9
|
-
export
|
|
10
|
+
export type BashOriginalArtifactSaveResult = BashArtifactSaveResult;
|
|
11
|
+
export declare function saveBashOriginalArtifactForTests(session: ToolSession, originalText: string, onResult?: (result: BashOriginalArtifactSaveResult) => void): Promise<string | undefined>;
|
|
10
12
|
declare const bashSchemaBase: z.ZodObject<{
|
|
11
13
|
command: z.ZodString;
|
|
12
14
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -134,7 +134,11 @@ export declare function setConfiguredImageModel(config: ImageProviderConfig | nu
|
|
|
134
134
|
export declare function getConfiguredImageModel(): ImageProviderConfig | null;
|
|
135
135
|
/** Resolve the effective image model for a configured provider */
|
|
136
136
|
export declare function resolveImageModel(provider: string, modelOverride: string | null): string;
|
|
137
|
+
/** Test seam: the Google image key fallback as resolved from trusted env. */
|
|
138
|
+
export declare function googleImageApiKeyFromEnvForTest(): string | undefined;
|
|
137
139
|
export declare function isOpenAIHostedImageModel(model: Model | undefined): model is Model;
|
|
140
|
+
/** Test seam: the image-request base URL as resolved from trusted env. */
|
|
141
|
+
export declare function getOpenAIImageBaseUrlForTest(model: Model, authCredentialType?: "api_key" | "oauth"): string;
|
|
138
142
|
export declare const imageGenTool: CustomTool<typeof imageGenSchema, ImageGenToolDetails>;
|
|
139
143
|
export declare function getImageGenTools(modelRegistry?: ModelRegistry, activeModel?: Model): Promise<Array<CustomTool<typeof imageGenSchema, ImageGenToolDetails>>>;
|
|
140
144
|
export declare function getImageGenToolsWithRegistry(modelRegistry: ModelRegistry, activeModel?: Model): Promise<Array<CustomTool<typeof imageGenSchema, ImageGenToolDetails>>>;
|
|
@@ -215,6 +215,8 @@ export interface ToolSession {
|
|
|
215
215
|
strictToolNames?: boolean;
|
|
216
216
|
/** Get artifacts directory for artifact:// URLs */
|
|
217
217
|
getArtifactsDir?: () => string | null;
|
|
218
|
+
/** Additional artifacts directories explicitly authorized for this session's tree (parent/child/sibling reads). Derived only from the explicitly adopted/shared `ArtifactManager`; never enumerates unrelated live sessions. */
|
|
219
|
+
getAuthorizedArtifactsDirs?: () => readonly string[];
|
|
218
220
|
/** Get the ArtifactManager backing this session (shared across parent + subagents). */
|
|
219
221
|
getArtifactManager?: () => ArtifactManager | null;
|
|
220
222
|
/** Allocate a new artifact path and ID for session-scoped truncated output. */
|
|
@@ -240,6 +242,8 @@ export interface ToolSession {
|
|
|
240
242
|
settings: Settings;
|
|
241
243
|
/** Live service-tier intent of the parent session, inherited by `inherit` subagents. */
|
|
242
244
|
serviceTier?: ServiceTier;
|
|
245
|
+
/** Whether the effective subagent tier grants fast mode for a resolved provider. */
|
|
246
|
+
isFastForSubagentProvider?: (provider?: string) => boolean;
|
|
243
247
|
/** Plan mode state (if active) */
|
|
244
248
|
getPlanModeState?: () => PlanModeState | undefined;
|
|
245
249
|
/** Goal mode state (if active or paused) */
|
|
@@ -46,8 +46,12 @@ export interface TruncationMeta {
|
|
|
46
46
|
elidedBytes?: number;
|
|
47
47
|
/** Lines elided from the middle. */
|
|
48
48
|
elidedLines?: number;
|
|
49
|
-
/** Artifact ID
|
|
49
|
+
/** Artifact ID when output was persisted; completeness is tracked separately below. */
|
|
50
50
|
artifactId?: string;
|
|
51
|
+
/** Bytes omitted from an artifact after its hard storage cap was reached. */
|
|
52
|
+
artifactTruncatedBytes?: number;
|
|
53
|
+
/** Bounded diagnostic when artifact writer creation, write, or finalization failed. */
|
|
54
|
+
artifactFailureDiagnostic?: string;
|
|
51
55
|
/** Next offset for pagination (head truncation only) */
|
|
52
56
|
nextOffset?: number;
|
|
53
57
|
}
|
|
@@ -145,7 +149,7 @@ export declare class OutputMetaBuilder {
|
|
|
145
149
|
maxBytes?: number;
|
|
146
150
|
rangeBase?: "file" | "window";
|
|
147
151
|
}): this;
|
|
148
|
-
/** Add truncation info from OutputSummary. No-op if not truncated. */
|
|
152
|
+
/** Add truncation info from OutputSummary. No-op if not truncated or artifact evidence is absent. */
|
|
149
153
|
truncationFromSummary(summary: OutputSummary, options: TruncationSummaryOptions): this;
|
|
150
154
|
/** Add truncation info from truncated output text. No-op if truncation not detected. */
|
|
151
155
|
truncationFromText(text: string, options: TruncationTextOptions): this;
|
|
@@ -178,6 +182,10 @@ export declare class OutputMetaBuilder {
|
|
|
178
182
|
/** Create a new OutputMetaBuilder. */
|
|
179
183
|
export declare function outputMeta(): OutputMetaBuilder;
|
|
180
184
|
export declare function formatFullOutputReference(artifactId: string): string;
|
|
185
|
+
/**
|
|
186
|
+
* Format an artifact reference without claiming completeness when storage was hard-capped.
|
|
187
|
+
*/
|
|
188
|
+
export declare function formatArtifactReference(artifactId: string, artifactTruncatedBytes?: number): string;
|
|
181
189
|
export declare function formatTruncationMetaNotice(truncation: TruncationMeta): string;
|
|
182
190
|
/**
|
|
183
191
|
* Format styled artifact reference with warning color and brackets.
|
|
@@ -211,6 +219,19 @@ export declare function stripOutputNotice(text: string, meta: OutputMeta | undef
|
|
|
211
219
|
* middle elision with the same per-user configuration.
|
|
212
220
|
*/
|
|
213
221
|
export declare function resolveOutputSinkHeadBytes(s: Settings | undefined): number;
|
|
222
|
+
export declare const BASH_DEFAULT_OUTPUT_TAIL_BYTES = 1024;
|
|
223
|
+
/**
|
|
224
|
+
* Bash uses a deliberately small tail window to nudge callers toward focused
|
|
225
|
+
* commands and dedicated search tools. An explicitly configured shared tail
|
|
226
|
+
* budget still wins.
|
|
227
|
+
*/
|
|
228
|
+
export declare function resolveBashOutputSinkTailBytes(s: Settings): number;
|
|
229
|
+
/**
|
|
230
|
+
* Bash keeps only the tail unless the user explicitly opts into the shared
|
|
231
|
+
* head-retention setting. Schema defaults still apply to other streaming
|
|
232
|
+
* tools without silently turning Bash back into middle-elision mode.
|
|
233
|
+
*/
|
|
234
|
+
export declare function resolveBashOutputSinkHeadBytes(s: Settings): number;
|
|
214
235
|
/**
|
|
215
236
|
* Resolve the per-line column cap from session settings. Shared by streaming
|
|
216
237
|
* executors (bash/python/ssh/eval via OutputSink) and the `read` tool's
|
|
@@ -112,6 +112,7 @@ export interface ToolScopeOptions {
|
|
|
112
112
|
rawPaths: string[];
|
|
113
113
|
cwd: string;
|
|
114
114
|
getArtifactsDir?: () => string | null;
|
|
115
|
+
getAuthorizedArtifactsDirs?: () => readonly string[];
|
|
115
116
|
/** Verb used in the "Cannot {action} internal URL without a backing file: …" message. */
|
|
116
117
|
internalUrlAction: string;
|
|
117
118
|
/** Collect absolute paths flagged immutable by their internal-URL handler. */
|
|
@@ -84,12 +84,6 @@ export interface ReadToolDetails {
|
|
|
84
84
|
conflictCount?: number;
|
|
85
85
|
}
|
|
86
86
|
type ReadParams = ReadToolInput;
|
|
87
|
-
/**
|
|
88
|
-
* Read tool implementation.
|
|
89
|
-
*
|
|
90
|
-
* Reads files with support for images, converted documents (via markit), and text.
|
|
91
|
-
* Directories return a formatted listing with modification times.
|
|
92
|
-
*/
|
|
93
87
|
export declare class ReadTool implements AgentTool<typeof readSchema, ReadToolDetails> {
|
|
94
88
|
#private;
|
|
95
89
|
private readonly session;
|
|
@@ -50,14 +50,12 @@ export interface SubmitReviewDetails {
|
|
|
50
50
|
}
|
|
51
51
|
export type { ReportFindingDetails };
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
* `ReviewFinding` shape
|
|
53
|
+
* Convert tool-side `ReportFindingDetails` into the numeric-priority
|
|
54
|
+
* `ReviewFinding` shape used by caller-owned reviewer payloads.
|
|
55
55
|
*
|
|
56
56
|
* The `report_finding` tool exposes `priority` as a string enum (`"P0".."P3"`)
|
|
57
|
-
* for ergonomics,
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* that surfaces a finding is rejected with `findings.0.priority: expected
|
|
61
|
-
* number, received string`.
|
|
57
|
+
* for ergonomics, while reviewer schemas may explicitly declare numeric
|
|
58
|
+
* priorities. This pure conversion does not add findings to completion data;
|
|
59
|
+
* callers that include `findings` own both that field and its output schema.
|
|
62
60
|
*/
|
|
63
61
|
export declare function toReviewFinding(details: ReportFindingDetails): ReviewFinding;
|
|
@@ -38,6 +38,8 @@ export interface SubagentSnapshot {
|
|
|
38
38
|
durationMs: number;
|
|
39
39
|
resultText?: string;
|
|
40
40
|
errorText?: string;
|
|
41
|
+
/** Safe setup failure cause retained from the executor launch path. */
|
|
42
|
+
setupFailureSummary?: string;
|
|
41
43
|
resultPreview?: string;
|
|
42
44
|
outputRef?: string;
|
|
43
45
|
truncated?: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface GhResult {
|
|
2
|
+
exitCode: number;
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
timedOut?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type RunGh = (args: string[], options?: {
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
}) => Promise<GhResult>;
|
|
10
|
+
/** Run GitHub CLI without allowing it to consume the parent terminal's input. */
|
|
11
|
+
export declare function runGhDefault(args: string[], options?: {
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
}): Promise<GhResult>;
|
|
@@ -16,6 +16,8 @@ export interface KimiSearchParams {
|
|
|
16
16
|
authStorage: AuthStorage;
|
|
17
17
|
sessionId?: string;
|
|
18
18
|
}
|
|
19
|
+
/** Test seam: the Kimi search base URL as resolved from trusted env. */
|
|
20
|
+
export declare function resolveKimiSearchBaseUrlForTest(): string;
|
|
19
21
|
/** Execute Kimi web search. */
|
|
20
22
|
export declare function searchKimi(params: KimiSearchParams): Promise<SearchResponse>;
|
|
21
23
|
/** Search provider for Kimi web search. */
|
|
@@ -28,6 +28,13 @@ import type { AuthStorage } from "@gajae-code/ai";
|
|
|
28
28
|
import type { SearchResponse } from "../../../web/search/types";
|
|
29
29
|
import type { SearchParams } from "./base";
|
|
30
30
|
import { SearchProvider } from "./base";
|
|
31
|
+
/** Test seam: the SearXNG endpoint and auth material as resolved from trusted env. */
|
|
32
|
+
export declare function resolveSearxngConfigForTest(): {
|
|
33
|
+
endpoint: string | null;
|
|
34
|
+
token: string | null;
|
|
35
|
+
basicUsername: string | null;
|
|
36
|
+
basicPassword: string | null;
|
|
37
|
+
};
|
|
31
38
|
/** Execute SearXNG web search. */
|
|
32
39
|
export declare function searchSearXNG(params: {
|
|
33
40
|
query: string;
|
|
@@ -32,6 +32,8 @@ export interface XaiSearchParams {
|
|
|
32
32
|
authStorage: AuthStorage;
|
|
33
33
|
sessionId?: string;
|
|
34
34
|
}
|
|
35
|
+
/** Test seam: the xAI search base URL as resolved from trusted env. */
|
|
36
|
+
export declare function resolveXaiSearchBaseUrlForTest(): string;
|
|
35
37
|
export declare function buildXaiRequestBody(params: {
|
|
36
38
|
query: string;
|
|
37
39
|
systemPrompt: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.1",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
54
54
|
"@babel/parser": "^7.29.3",
|
|
55
55
|
"@mozilla/readability": "^0.6.0",
|
|
56
|
-
"@gajae-code/stats": "0.12.
|
|
57
|
-
"@gajae-code/agent-core": "0.12.
|
|
58
|
-
"@gajae-code/ai": "0.12.
|
|
59
|
-
"@gajae-code/bridge-client": "0.12.
|
|
60
|
-
"@gajae-code/natives": "0.12.
|
|
61
|
-
"@gajae-code/tui": "0.12.
|
|
62
|
-
"@gajae-code/utils": "0.12.
|
|
56
|
+
"@gajae-code/stats": "0.12.1",
|
|
57
|
+
"@gajae-code/agent-core": "0.12.1",
|
|
58
|
+
"@gajae-code/ai": "0.12.1",
|
|
59
|
+
"@gajae-code/bridge-client": "0.12.1",
|
|
60
|
+
"@gajae-code/natives": "0.12.1",
|
|
61
|
+
"@gajae-code/tui": "0.12.1",
|
|
62
|
+
"@gajae-code/utils": "0.12.1",
|
|
63
63
|
"@puppeteer/browsers": "^2.13.0",
|
|
64
64
|
"@types/turndown": "5.0.6",
|
|
65
65
|
"@xterm/headless": "^6.0.0",
|
|
@@ -327,6 +327,8 @@
|
|
|
327
327
|
"types": "./dist/types/export/html/*.d.ts",
|
|
328
328
|
"import": "./src/export/html/*.ts"
|
|
329
329
|
},
|
|
330
|
+
"./extensibility/gjc-plugins/installer": null,
|
|
331
|
+
"./extensibility/gjc-plugins/registry": null,
|
|
330
332
|
"./extensibility/*": {
|
|
331
333
|
"types": "./dist/types/extensibility/*.d.ts",
|
|
332
334
|
"import": "./src/extensibility/*.ts"
|