@gajae-code/coding-agent 0.15.5 → 0.15.6
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 +26 -1
- package/dist/types/async/job-manager.d.ts +83 -0
- package/dist/types/cli/auth-gateway-cli.d.ts +17 -0
- package/dist/types/cli/model-presets-cli.d.ts +9 -0
- package/dist/types/cli/update-cli.d.ts +2 -0
- package/dist/types/commands/auth-gateway.d.ts +3 -0
- package/dist/types/commands/gc.d.ts +13 -0
- package/dist/types/commands/model-presets.d.ts +21 -0
- package/dist/types/config/autorouting-tier-map.d.ts +96 -0
- package/dist/types/config/file-lock.d.ts +49 -2
- package/dist/types/config/internal/model-preset-registry-test-state.d.ts +4 -0
- package/dist/types/config/internal/model-preset-registry-test-support.d.ts +3 -0
- package/dist/types/config/keybindings.d.ts +3 -2
- package/dist/types/config/model-preset-registry.d.ts +368 -0
- package/dist/types/config/model-profile-activation.d.ts +39 -0
- package/dist/types/config/model-profiles.d.ts +5 -3
- package/dist/types/config/model-registry.d.ts +11 -5
- package/dist/types/config/settings-schema.d.ts +9 -0
- package/dist/types/coordinator-mcp/model-preset.d.ts +7 -5
- package/dist/types/coordinator-mcp/projection-scan.d.ts +46 -0
- package/dist/types/extensibility/extensions/types.d.ts +2 -5
- package/dist/types/gjc-runtime/empty-delete-gc.d.ts +58 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +2 -0
- package/dist/types/gjc-runtime/session-state-lock.d.ts +35 -6
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/main.d.ts +3 -1
- package/dist/types/modes/components/jobs-overlay-model.d.ts +4 -2
- package/dist/types/modes/jobs-observer.d.ts +36 -0
- package/dist/types/sdk/broker/broker.d.ts +3 -0
- package/dist/types/sdk/bus/kind-aware-reconciliation.d.ts +3 -0
- package/dist/types/sdk/bus/prompt-reconciliation.d.ts +4 -0
- package/dist/types/sdk/client/discovery.d.ts +1 -0
- package/dist/types/sdk/host/model-pin.d.ts +7 -2
- package/dist/types/sdk/host/sdk-run-capability.d.ts +1 -0
- package/dist/types/sdk/host/session-runtime.d.ts +15 -1
- package/dist/types/sdk/prompt-deadline-manager.d.ts +11 -1
- package/dist/types/sdk/protocol/adapter-validation.d.ts +2 -0
- package/dist/types/sdk/router/session-router.d.ts +9 -0
- package/dist/types/session/account-inventory.d.ts +1 -0
- package/dist/types/session/agent-session.d.ts +19 -7
- package/dist/types/session/fold-coordinator.d.ts +201 -0
- package/dist/types/session/sdk-run-capability-internal.d.ts +7 -0
- package/dist/types/session/sdk-run-capability.d.ts +2 -0
- package/dist/types/telemetry/control.d.ts +11 -0
- package/dist/types/telemetry/events.d.ts +20 -0
- package/dist/types/telemetry/index.d.ts +3 -0
- package/dist/types/telemetry/transport.d.ts +22 -0
- package/dist/types/tools/bash-interactive.d.ts +23 -0
- package/dist/types/tools/index.d.ts +6 -5
- package/dist/types/web/search/providers/base.d.ts +9 -4
- package/dist/types/web/search/providers/xai.d.ts +2 -1
- package/dist/types/web/search/types.d.ts +14 -0
- package/package.json +10 -7
- package/scripts/generate-hotkeys-docs.ts +4 -0
- package/scripts/generate-sdk-operation-inventory.ts +3 -3
- package/src/async/job-manager.ts +671 -39
- package/src/cli/auth-broker-cli.ts +40 -12
- package/src/cli/auth-gateway-cli.ts +273 -97
- package/src/cli/config-cli.ts +2 -2
- package/src/cli/fast-help.ts +3 -0
- package/src/cli/model-presets-cli.ts +100 -0
- package/src/cli/update-cli.ts +40 -5
- package/src/cli.ts +6 -2
- package/src/commands/auth-gateway.ts +12 -8
- package/src/commands/gc.ts +19 -0
- package/src/commands/model-presets.ts +24 -0
- package/src/config/autorouting-tier-map.ts +32 -0
- package/src/config/file-lock-gc.ts +9 -4
- package/src/config/file-lock.ts +775 -59
- package/src/config/internal/model-preset-registry-test-state.ts +28 -0
- package/src/config/internal/model-preset-registry-test-support.ts +11 -0
- package/src/config/keybindings.ts +6 -2
- package/src/config/model-preset-registry.ts +2799 -0
- package/src/config/model-profile-activation.ts +115 -28
- package/src/config/model-profile-contract.ts +4 -1
- package/src/config/model-profiles.ts +51 -9
- package/src/config/model-registry.ts +1021 -122
- package/src/config/settings-schema.ts +11 -0
- package/src/config/settings.ts +6 -1
- package/src/coordinator-mcp/model-preset.ts +32 -17
- package/src/coordinator-mcp/projection-scan.ts +571 -0
- package/src/coordinator-mcp/server.ts +19 -24
- package/src/coordinator-mcp/session-reaper.ts +9 -3
- package/src/extensibility/extensions/loader.ts +0 -1
- package/src/extensibility/extensions/types.ts +2 -3
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +1 -0
- package/src/gjc-runtime/empty-delete-gc.ts +301 -0
- package/src/gjc-runtime/gc-render.ts +29 -0
- package/src/gjc-runtime/gc-runtime.ts +174 -11
- package/src/gjc-runtime/session-state-lock.ts +1242 -141
- package/src/gjc-runtime/session-state-sidecar.ts +76 -3
- package/src/index.ts +1 -0
- package/src/internal-urls/docs-index.generated.ts +9 -8
- package/src/lsp/config.ts +4 -3
- package/src/lsp/path-trust.ts +12 -6
- package/src/main.ts +9 -2
- package/src/modes/acp/acp-agent.ts +11 -5
- package/src/modes/components/jobs-overlay-model.ts +99 -16
- package/src/modes/components/model-selector.ts +158 -18
- package/src/modes/components/status-line/segments.ts +6 -1
- package/src/modes/controllers/extension-ui-controller.ts +1 -1
- package/src/modes/controllers/input-controller.ts +23 -6
- package/src/modes/interactive-mode.ts +14 -1
- package/src/modes/jobs-observer.ts +149 -16
- package/src/modes/runtime-init.ts +1 -1
- package/src/modes/utils/injected-user-submission.ts +15 -1
- package/src/prompts/tools/bash.md +2 -2
- package/src/prompts/tools/fold-receipt.md +3 -0
- package/src/prompts/tools/job.md +1 -1
- package/src/sdk/acp/adapter.ts +17 -2
- package/src/sdk/broker/broker.ts +48 -21
- package/src/sdk/broker/lifecycle.ts +32 -6
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/chat-daemon-runtime.ts +11 -1
- package/src/sdk/bus/kind-aware-reconciliation.ts +36 -6
- package/src/sdk/bus/prompt-reconciliation.ts +28 -4
- package/src/sdk/bus/slack-conversation.ts +5 -1
- package/src/sdk/cli/session-cli.ts +12 -1
- package/src/sdk/client/discovery.ts +3 -1
- package/src/sdk/host/control/dispatch.ts +3 -0
- package/src/sdk/host/model-pin.ts +185 -25
- package/src/sdk/host/sdk-run-capability.ts +1 -0
- package/src/sdk/host/session-runtime.test.ts +371 -37
- package/src/sdk/host/session-runtime.ts +364 -52
- package/src/sdk/prompt-deadline-manager.ts +16 -1
- package/src/sdk/protocol/adapter-validation.ts +27 -0
- package/src/sdk/protocol/operation-inventory.generated.json +2 -2
- package/src/sdk/protocol/operation-registry.ts +4 -1
- package/src/sdk/router/session-router.ts +228 -96
- package/src/sdk/session.ts +83 -12
- package/src/session/account-inventory.ts +27 -11
- package/src/session/agent-session.ts +678 -103
- package/src/session/fold-coordinator.ts +433 -0
- package/src/session/sdk-run-capability-internal.ts +15 -0
- package/src/session/sdk-run-capability.ts +2 -0
- package/src/session/session-manager.ts +5 -4
- package/src/setup/provider-presets.json +1 -1
- package/src/slash-commands/helpers/credential-switch.ts +6 -1
- package/src/task/executor.ts +19 -3
- package/src/telemetry/control.ts +26 -0
- package/src/telemetry/events.ts +142 -0
- package/src/telemetry/index.ts +3 -0
- package/src/telemetry/transport.ts +87 -0
- package/src/tools/bash-interactive.ts +182 -85
- package/src/tools/bash.ts +772 -67
- package/src/tools/index.ts +7 -5
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/web/search/provider.ts +120 -11
- package/src/web/search/providers/anthropic.ts +89 -17
- package/src/web/search/providers/base.ts +9 -4
- package/src/web/search/providers/gemini.ts +87 -15
- package/src/web/search/providers/openai-compatible.ts +23 -8
- package/src/web/search/providers/xai.ts +98 -12
- package/src/web/search/types.ts +16 -0
|
@@ -984,9 +984,11 @@ export function eventAffectsCoordinatorRuntimeState(event: RuntimeStateEvent): b
|
|
|
984
984
|
}
|
|
985
985
|
|
|
986
986
|
class PreviousRuntimeStateReadError extends Error {
|
|
987
|
-
constructor() {
|
|
988
|
-
|
|
987
|
+
constructor(cause?: unknown) {
|
|
988
|
+
const lockDetail = cause instanceof SessionStateLockUnavailableError ? ` ${cause.message}` : "";
|
|
989
|
+
super(`Existing runtime state marker is invalid or unreadable; refusing to overwrite.${lockDetail}`);
|
|
989
990
|
this.name = "PreviousRuntimeStateReadError";
|
|
991
|
+
if (cause !== undefined) this.cause = cause;
|
|
990
992
|
}
|
|
991
993
|
}
|
|
992
994
|
|
|
@@ -1413,7 +1415,7 @@ async function withStateFileLock<T>(stateFile: string, operation: () => Promise<
|
|
|
1413
1415
|
try {
|
|
1414
1416
|
return await withSessionStateFileLock(stateFile, operation);
|
|
1415
1417
|
} catch (error) {
|
|
1416
|
-
if (error instanceof SessionStateLockUnavailableError) throw new PreviousRuntimeStateReadError();
|
|
1418
|
+
if (error instanceof SessionStateLockUnavailableError) throw new PreviousRuntimeStateReadError(error);
|
|
1417
1419
|
throw error;
|
|
1418
1420
|
}
|
|
1419
1421
|
}
|
|
@@ -1608,6 +1610,77 @@ export async function persistCoordinatorRuntimeStateFromEvent(
|
|
|
1608
1610
|
);
|
|
1609
1611
|
}
|
|
1610
1612
|
|
|
1613
|
+
export async function persistCoordinatorWorkerIntegrationOutcome(
|
|
1614
|
+
context: RuntimeStateContext,
|
|
1615
|
+
outcome: {
|
|
1616
|
+
kind: "worker_integration" | "terminal_persistence";
|
|
1617
|
+
status: "completed" | "failed" | "timed_out";
|
|
1618
|
+
correlationId?: string;
|
|
1619
|
+
error?: string;
|
|
1620
|
+
},
|
|
1621
|
+
): Promise<void> {
|
|
1622
|
+
const stateFile = runtimeStateFileForContext(context);
|
|
1623
|
+
if (!stateFile) return;
|
|
1624
|
+
const identity = normalizedIdentity(context);
|
|
1625
|
+
await serializeStateFileWrite(
|
|
1626
|
+
stateFile,
|
|
1627
|
+
async () =>
|
|
1628
|
+
await withCoordinatorTransactionLock(
|
|
1629
|
+
stateFile,
|
|
1630
|
+
async () =>
|
|
1631
|
+
await withStateFileLock(stateFile, async () => {
|
|
1632
|
+
const previous = await readPreviousPayloadForEvent(stateFile);
|
|
1633
|
+
if (Object.keys(previous).length === 0) return;
|
|
1634
|
+
assertPreviousRuntimeStateIdentity(previous, identity);
|
|
1635
|
+
const now = new Date().toISOString();
|
|
1636
|
+
const terminalPersistenceFailed =
|
|
1637
|
+
outcome.kind === "terminal_persistence" && outcome.status !== "completed";
|
|
1638
|
+
const reconciliation = {
|
|
1639
|
+
status: outcome.status,
|
|
1640
|
+
...(outcome.correlationId ? { correlation_id: outcome.correlationId } : {}),
|
|
1641
|
+
...(outcome.error ? { error: publicSafeErrorMessage(outcome.error) } : {}),
|
|
1642
|
+
observed_at: now,
|
|
1643
|
+
};
|
|
1644
|
+
const failureMessage = publicSafeErrorMessage(
|
|
1645
|
+
outcome.error ??
|
|
1646
|
+
(outcome.status === "timed_out"
|
|
1647
|
+
? "Worker integration timed out after terminal publication."
|
|
1648
|
+
: "Worker integration failed after terminal publication."),
|
|
1649
|
+
);
|
|
1650
|
+
const payload = {
|
|
1651
|
+
...previous,
|
|
1652
|
+
...(terminalPersistenceFailed
|
|
1653
|
+
? {
|
|
1654
|
+
state: "errored",
|
|
1655
|
+
ready_for_input: false,
|
|
1656
|
+
live: false,
|
|
1657
|
+
current_turn_id: null,
|
|
1658
|
+
execution_state: "failed",
|
|
1659
|
+
receipt_state: "absent",
|
|
1660
|
+
ended_at: now,
|
|
1661
|
+
reason: "terminal_persistence_failed",
|
|
1662
|
+
source: "agent_session_reconciliation",
|
|
1663
|
+
event: "terminal_persistence",
|
|
1664
|
+
}
|
|
1665
|
+
: {}),
|
|
1666
|
+
updated_at: now,
|
|
1667
|
+
[outcome.kind]: reconciliation,
|
|
1668
|
+
...(outcome.status !== "completed"
|
|
1669
|
+
? {
|
|
1670
|
+
error: {
|
|
1671
|
+
code: `${outcome.kind}_failed`,
|
|
1672
|
+
message: failureMessage,
|
|
1673
|
+
recoverable: true,
|
|
1674
|
+
},
|
|
1675
|
+
}
|
|
1676
|
+
: {}),
|
|
1677
|
+
};
|
|
1678
|
+
await writeStateFileSync(stateFile, payload, identity.sidecarKeyId);
|
|
1679
|
+
}),
|
|
1680
|
+
),
|
|
1681
|
+
);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1611
1684
|
function ownerTerminalSignal(reason: postmortem.Reason): TerminalSignal {
|
|
1612
1685
|
if (reason === postmortem.Reason.SIGTERM) return "SIGTERM";
|
|
1613
1686
|
if (reason === postmortem.Reason.SIGINT) return "SIGINT";
|
package/src/index.ts
CHANGED
|
@@ -45,6 +45,7 @@ export * from "./session/session-dump-format";
|
|
|
45
45
|
export * from "./session/session-manager";
|
|
46
46
|
export * from "./task/executor";
|
|
47
47
|
export type * from "./task/types";
|
|
48
|
+
export * from "./telemetry";
|
|
48
49
|
// Tools (detail types and utilities)
|
|
49
50
|
export * from "./tools";
|
|
50
51
|
export * from "./utils/git";
|