@gajae-code/coding-agent 0.18.7 → 0.18.8
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 +279 -1
- package/dist/types/async/job-manager.d.ts +1 -1
- package/dist/types/capability/mcp.d.ts +2 -0
- package/dist/types/capability/skill.d.ts +2 -0
- package/dist/types/capability/types.d.ts +2 -0
- package/dist/types/cli/public-command-errors.d.ts +3 -1
- package/dist/types/cli/setup-cli.d.ts +1 -1
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/config/autorouting-tier-map.d.ts +348 -9
- package/dist/types/config/file-lock.d.ts +1 -0
- package/dist/types/config/model-bindings-applier.d.ts +2 -0
- package/dist/types/config/model-profile-activation.d.ts +11 -3
- package/dist/types/config/model-registry.d.ts +4 -9
- package/dist/types/config/skill-settings-defaults.d.ts +2 -0
- package/dist/types/cursor-delete-path.d.ts +1 -0
- package/dist/types/cursor-mcp-name.d.ts +8 -0
- package/dist/types/customization/inventory.d.ts +2 -0
- package/dist/types/debug/report-bundle-parent.d.ts +2 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.d.ts +1 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.d.ts +31 -0
- package/dist/types/defaults/gjc-skills.generated.d.ts +5 -6
- package/dist/types/discovery/helpers.d.ts +6 -1
- package/dist/types/export/html/css-color.d.ts +2 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/extensions/types.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/runtime-adapters.d.ts +14 -1
- package/dist/types/extensibility/plugins/marketplace/cache.d.ts +2 -0
- package/dist/types/extensibility/plugins/plugin-link-path.d.ts +2 -0
- package/dist/types/extensibility/runtime-skill-discovery.d.ts +3 -1
- package/dist/types/extensibility/skill-management.d.ts +3 -1
- package/dist/types/extensibility/skills.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-crystallize.d.ts +74 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +11 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +5 -0
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +0 -5
- package/dist/types/gjc-runtime/state-argv.d.ts +1 -1
- package/dist/types/gjc-runtime/state-migrations.d.ts +8 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +95 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +11 -1
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +8 -0
- package/dist/types/internal-urls/skill-path.d.ts +1 -0
- package/dist/types/lsp/workspace-path.d.ts +1 -0
- package/dist/types/modes/acp/acp-agent.d.ts +7 -0
- package/dist/types/modes/components/custom-editor.d.ts +6 -0
- package/dist/types/modes/components/customization/customization-dashboard.d.ts +1 -0
- package/dist/types/modes/components/extensions/state-manager.d.ts +4 -3
- package/dist/types/modes/controllers/input-controller.d.ts +9 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/utils/interrupt-ownership.d.ts +3 -0
- package/dist/types/modes/utils/keybinding-matchers.d.ts +1 -0
- package/dist/types/modes/utils/macos-option-forwarding.d.ts +17 -0
- package/dist/types/progress/collect-project-progress.d.ts +38 -0
- package/dist/types/progress/progress-contract.d.ts +154 -0
- package/dist/types/progress/progress-snapshot.d.ts +11 -0
- package/dist/types/progress/project-progress.d.ts +141 -0
- package/dist/types/progress/render-progress.d.ts +28 -0
- package/dist/types/runtime-mcp/oauth-public-url.d.ts +1 -0
- package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +1 -0
- package/dist/types/runtime-mcp/smithery-registry.d.ts +24 -0
- package/dist/types/runtime-mcp/types.d.ts +6 -0
- package/dist/types/sdk/acp/adapter.d.ts +1 -1
- package/dist/types/sdk/broker/broker-exit.d.ts +6 -2
- package/dist/types/sdk/broker/broker.d.ts +18 -1
- package/dist/types/sdk/broker/session-index.d.ts +12 -6
- package/dist/types/sdk/bus/index.d.ts +12 -1
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -1
- package/dist/types/sdk/client/client.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +3 -0
- package/dist/types/sdk/index.d.ts +1 -0
- package/dist/types/sdk/router/session-router.d.ts +2 -0
- package/dist/types/sdk/session-list.d.ts +1 -1
- package/dist/types/sdk/session.d.ts +8 -0
- package/dist/types/session/agent-session.d.ts +38 -9
- package/dist/types/session/artifacts.d.ts +2 -2
- package/dist/types/session/internal/managed-gc-retirement-codec.d.ts +32 -0
- package/dist/types/session/internal/managed-session-scope.d.ts +79 -2
- package/dist/types/session/internal/managed-session-storage.d.ts +26 -1
- package/dist/types/session/internal/managed-task-owner-cleanup.d.ts +62 -0
- package/dist/types/session/internal/task-artifact-owner-access.d.ts +2 -0
- package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +9 -1
- package/dist/types/session/session-manager.d.ts +31 -5
- package/dist/types/session/session-retirement.d.ts +31 -7
- package/dist/types/session/session-storage.d.ts +62 -2
- package/dist/types/session/task-artifact-owner-codec.d.ts +2 -0
- package/dist/types/setup/credential-auto-import.d.ts +1 -1
- package/dist/types/setup/credential-import.d.ts +6 -4
- package/dist/types/skill-state/active-state.d.ts +38 -0
- package/dist/types/slash-commands/helpers/progress-report.d.ts +8 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/tools/bash-skill-urls.d.ts +1 -1
- package/dist/types/tools/index.d.ts +3 -0
- package/dist/types/tools/python.d.ts +9 -1
- package/dist/types/tools/recipe/recipe-guard.d.ts +7 -0
- package/dist/types/tools/restricted-cwd.d.ts +1 -0
- package/dist/types/tools/todo-write.d.ts +6 -0
- package/dist/types/utils/tools-checksum.d.ts +7 -0
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +21 -0
- package/scripts/verify-managed-empty-stop.ts +28 -0
- package/src/async/job-manager.ts +228 -122
- package/src/capability/index.ts +17 -0
- package/src/capability/mcp.ts +2 -0
- package/src/capability/skill.ts +2 -0
- package/src/capability/types.ts +2 -0
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/customize-doctor.ts +15 -2
- package/src/cli/public-command-errors.ts +21 -1
- package/src/cli/setup-cli.ts +4 -4
- package/src/cli/skills-cli.ts +5 -0
- package/src/commands/deep-interview.ts +47 -8
- package/src/commands/sdk.ts +28 -8
- package/src/config/autorouting-tier-map.ts +117 -7
- package/src/config/file-lock.ts +307 -68
- package/src/config/mcp-schema.json +4 -0
- package/src/config/model-bindings-applier.ts +20 -0
- package/src/config/model-profile-activation.ts +240 -46
- package/src/config/model-registry.ts +47 -153
- package/src/config/skill-settings-defaults.ts +7 -0
- package/src/coordinator-mcp/policy.ts +3 -2
- package/src/cursor-delete-path.ts +10 -0
- package/src/cursor-mcp-name.ts +15 -0
- package/src/cursor.ts +13 -2
- package/src/customization/inventory.ts +3 -0
- package/src/debug/report-bundle-parent.ts +22 -0
- package/src/debug/report-bundle.ts +3 -0
- package/src/debug/system-info.ts +13 -1
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.ts +67 -4
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.ts +80 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +105 -10
- package/src/defaults/gjc/skills/ralplan/SKILL.md +6 -4
- package/src/defaults/gjc-defaults.test.ts +18 -1
- package/src/defaults/gjc-defaults.ts +3 -0
- package/src/defaults/gjc-skills.generated.ts +58 -36
- package/src/discovery/agents.ts +6 -1
- package/src/discovery/builtin.ts +10 -0
- package/src/discovery/helpers.ts +159 -20
- package/src/discovery/mcp-json.ts +6 -0
- package/src/discovery/ssh.ts +1 -1
- package/src/discovery/substitute-plugin-root.ts +3 -1
- package/src/edit/file-read-cache.ts +1 -1
- package/src/eval/py/executor.ts +380 -120
- package/src/export/html/css-color.ts +9 -0
- package/src/export/html/index.ts +5 -4
- package/src/export/html/template.generated.ts +1 -1
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +7 -0
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +73 -8
- package/src/extensibility/plugins/manager.ts +3 -2
- package/src/extensibility/plugins/marketplace/cache.ts +15 -0
- package/src/extensibility/plugins/marketplace/manager.ts +11 -3
- package/src/extensibility/plugins/plugin-link-path.ts +12 -0
- package/src/extensibility/runtime-skill-discovery.ts +20 -2
- package/src/extensibility/skill-management.ts +6 -2
- package/src/extensibility/skills.ts +6 -1
- package/src/gjc-runtime/deep-interview-crystallize.ts +1814 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +20 -2
- package/src/gjc-runtime/deep-interview-runtime.ts +1415 -13
- package/src/gjc-runtime/deep-interview-stage.ts +98 -21
- package/src/gjc-runtime/gc-runtime.ts +206 -9
- package/src/gjc-runtime/launch-worktree.ts +14 -4
- package/src/gjc-runtime/ralplan-runtime.ts +447 -52
- package/src/gjc-runtime/state-argv.ts +2 -0
- package/src/gjc-runtime/state-migrations.ts +91 -29
- package/src/gjc-runtime/state-runtime.ts +3716 -135
- package/src/gjc-runtime/state-writer.ts +83 -8
- package/src/gjc-runtime/ultragoal-runtime.ts +16 -4
- package/src/gjc-runtime/workflow-manifest.generated.json +70 -42
- package/src/gjc-runtime/workflow-manifest.ts +54 -21
- package/src/harness-control-plane/operate.ts +12 -4
- package/src/harness-control-plane/owner.ts +5 -1
- package/src/hashline/parser.ts +48 -9
- package/src/hashline/recovery.ts +13 -4
- package/src/internal-urls/docs-index.generated.ts +18 -17
- package/src/internal-urls/skill-path.ts +19 -0
- package/src/internal-urls/skill-protocol.ts +2 -0
- package/src/lsp/edits.ts +6 -0
- package/src/lsp/workspace-path.ts +51 -0
- package/src/main.ts +195 -31
- package/src/modes/acp/acp-agent.ts +88 -4
- package/src/modes/components/custom-editor.ts +14 -0
- package/src/modes/components/customization/customization-dashboard.ts +12 -0
- package/src/modes/components/extensions/extension-dashboard.ts +2 -2
- package/src/modes/components/extensions/state-manager.ts +15 -5
- package/src/modes/components/model-selector.ts +1 -4
- package/src/modes/components/provider-onboarding-selector.ts +1 -1
- package/src/modes/components/status-line/segments.ts +4 -0
- package/src/modes/controllers/event-controller.ts +11 -4
- package/src/modes/controllers/input-controller.ts +74 -29
- package/src/modes/controllers/runtime-mcp-command-controller.ts +8 -3
- package/src/modes/controllers/selector-controller.ts +28 -15
- package/src/modes/interactive-mode.ts +4 -0
- package/src/modes/runtime-init.ts +4 -0
- package/src/modes/utils/abort-message.ts +3 -1
- package/src/modes/utils/interrupt-ownership.ts +12 -0
- package/src/modes/utils/keybinding-matchers.ts +4 -0
- package/src/modes/utils/macos-option-forwarding.ts +80 -0
- package/src/progress/collect-project-progress.ts +153 -0
- package/src/progress/progress-contract.ts +172 -0
- package/src/progress/progress-snapshot.ts +140 -0
- package/src/progress/project-progress.ts +446 -0
- package/src/progress/render-progress.ts +209 -0
- package/src/prompts/system/master-mode.md +1 -0
- package/src/prompts/tools/skill-discovery.md +1 -1
- package/src/runtime-mcp/config-writer.ts +10 -6
- package/src/runtime-mcp/config.ts +1 -0
- package/src/runtime-mcp/oauth-flow.ts +5 -0
- package/src/runtime-mcp/oauth-public-url.ts +8 -0
- package/src/runtime-mcp/plugin-network-boundary.ts +4 -0
- package/src/runtime-mcp/smithery-registry.ts +22 -3
- package/src/runtime-mcp/transports/http.ts +2 -2
- package/src/runtime-mcp/types.ts +6 -0
- package/src/sdk/acp/adapter.ts +93 -8
- package/src/sdk/broker/broker-exit.ts +52 -23
- package/src/sdk/broker/broker.ts +75 -6
- package/src/sdk/broker/ensure.ts +2 -0
- package/src/sdk/broker/lifecycle.ts +711 -66
- package/src/sdk/broker/session-index.ts +191 -81
- package/src/sdk/bus/chat-daemon-cli.ts +38 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +238 -43
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
- package/src/sdk/cli/session-cli.ts +17 -3
- package/src/sdk/client/client.ts +28 -8
- package/src/sdk/host/query/handlers.ts +9 -1
- package/src/sdk/host/session-runtime.test.ts +2647 -294
- package/src/sdk/host/session-runtime.ts +426 -109
- package/src/sdk/host/surface-policy.ts +1 -0
- package/src/sdk/index.ts +8 -0
- package/src/sdk/lifecycle-session.ts +3 -1
- package/src/sdk/prompt-deadline-manager.ts +15 -0
- package/src/sdk/protocol/operation-inventory.generated.json +146 -0
- package/src/sdk/protocol/operation-registry.ts +9 -2
- package/src/sdk/router/session-router.ts +75 -12
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +67 -38
- package/src/session/agent-session.ts +623 -224
- package/src/session/artifacts.ts +174 -70
- package/src/session/internal/managed-gc-retirement-codec.ts +319 -0
- package/src/session/internal/managed-session-scope.ts +3457 -462
- package/src/session/internal/managed-session-storage.ts +376 -61
- package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
- package/src/session/internal/task-artifact-owner-access.ts +19 -3
- package/src/session/internal/task-artifact-owner-transcript.ts +547 -1
- package/src/session/session-manager.ts +939 -133
- package/src/session/session-retirement.ts +573 -14
- package/src/session/session-storage.ts +417 -14
- package/src/session/task-artifact-owner-codec.ts +71 -8
- package/src/session/task-artifact-owner-retirement.ts +21 -19
- package/src/setup/credential-auto-import.ts +12 -3
- package/src/setup/credential-import.ts +176 -5
- package/src/setup/paseo/announce.ts +6 -1
- package/src/skill-state/active-state.ts +132 -2
- package/src/slash-commands/builtin-registry.ts +39 -9
- package/src/slash-commands/helpers/progress-report.ts +23 -0
- package/src/stt/setup.ts +3 -5
- package/src/task/commands.ts +3 -1
- package/src/task/executor.ts +4 -0
- package/src/task/index.ts +6 -0
- package/src/tools/ask.ts +205 -6
- package/src/tools/ast-edit.ts +4 -0
- package/src/tools/bash-allowed-prefixes.ts +15 -0
- package/src/tools/bash-skill-urls.ts +56 -3
- package/src/tools/bash.ts +48 -79
- package/src/tools/descriptors.ts +5 -1
- package/src/tools/eval.ts +56 -36
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/python.ts +187 -66
- package/src/tools/recipe/index.ts +9 -0
- package/src/tools/recipe/recipe-guard.ts +19 -0
- package/src/tools/restricted-cwd.ts +10 -0
- package/src/tools/skill-discovery.ts +5 -0
- package/src/tools/skill.ts +28 -1
- package/src/tools/todo-write.ts +10 -1
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tools/write.ts +1 -0
- package/src/utils/tools-checksum.ts +34 -0
- package/src/utils/tools-manager.ts +24 -6
- package/src/web/search/providers/codex.ts +3 -2
package/src/capability/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from "@gajae-code/utils";
|
|
23
23
|
|
|
24
24
|
import type { Settings } from "../config/settings";
|
|
25
|
+
import { resolveGlobalUserSkillLinkTrust } from "../config/skill-settings-defaults";
|
|
25
26
|
import { clearCache as clearFsCache, findRepoRoot, cacheStats as fsCacheStats, invalidate as invalidateFs } from "./fs";
|
|
26
27
|
import type {
|
|
27
28
|
Capability,
|
|
@@ -413,6 +414,8 @@ export async function loadCapability<T>(capabilityId: string, options: LoadOptio
|
|
|
413
414
|
const ordinaryOptions: LoadOptions = options.isolatedHome ? { ...options, isolatedHome: false } : options;
|
|
414
415
|
const cwd = ordinaryOptions.cwd ?? getProjectDir();
|
|
415
416
|
const home = getTrustedHomeDir();
|
|
417
|
+
const activeSettings = ordinaryOptions.settings ?? settingsByCwd.get(path.normalize(cwd));
|
|
418
|
+
const globalSettings = typeof activeSettings?.getGlobal === "function" ? activeSettings : undefined;
|
|
416
419
|
const userAgentDir = ordinaryOptions.agentDir ? path.resolve(ordinaryOptions.agentDir) : getAgentDir();
|
|
417
420
|
const profileAuthority =
|
|
418
421
|
ordinaryOptions.profileAuthority ??
|
|
@@ -429,6 +432,10 @@ export async function loadCapability<T>(capabilityId: string, options: LoadOptio
|
|
|
429
432
|
repoRoot,
|
|
430
433
|
isolatedHome: false,
|
|
431
434
|
settings: ordinaryOptions.settings,
|
|
435
|
+
allowExternalUserSkillSymlinks: resolveGlobalUserSkillLinkTrust({
|
|
436
|
+
trustUserSkills: globalSettings?.getGlobal("skills.trustUserSkills"),
|
|
437
|
+
enablePiUser: globalSettings?.getGlobal("skills.enablePiUser"),
|
|
438
|
+
}),
|
|
432
439
|
bypassCache: ordinaryOptions.bypassCache,
|
|
433
440
|
};
|
|
434
441
|
const providers = filterProviders(capability, ordinaryOptions);
|
|
@@ -521,6 +528,16 @@ export async function loadCapabilityForHome<T>(
|
|
|
521
528
|
isolatedHome,
|
|
522
529
|
homeIdentity,
|
|
523
530
|
settings: isolatedOptions.settings,
|
|
531
|
+
allowExternalUserSkillSymlinks: resolveGlobalUserSkillLinkTrust({
|
|
532
|
+
trustUserSkills:
|
|
533
|
+
typeof isolatedOptions.settings?.getGlobal === "function"
|
|
534
|
+
? isolatedOptions.settings.getGlobal("skills.trustUserSkills")
|
|
535
|
+
: undefined,
|
|
536
|
+
enablePiUser:
|
|
537
|
+
typeof isolatedOptions.settings?.getGlobal === "function"
|
|
538
|
+
? isolatedOptions.settings.getGlobal("skills.enablePiUser")
|
|
539
|
+
: undefined,
|
|
540
|
+
}),
|
|
524
541
|
};
|
|
525
542
|
|
|
526
543
|
return await loadImpl(capability, providers, ctx, isolatedOptions);
|
package/src/capability/mcp.ts
CHANGED
|
@@ -41,6 +41,8 @@ export interface MCPServer {
|
|
|
41
41
|
url?: string;
|
|
42
42
|
/** HTTP headers (for HTTP transport) */
|
|
43
43
|
headers?: Record<string, string>;
|
|
44
|
+
/** Persisted public-network requirement for an HTTP MCP endpoint. */
|
|
45
|
+
publicNetwork?: boolean;
|
|
44
46
|
/** Authentication configuration */
|
|
45
47
|
auth?: {
|
|
46
48
|
type: "oauth" | "apikey";
|
package/src/capability/skill.ts
CHANGED
|
@@ -41,6 +41,8 @@ export interface Skill {
|
|
|
41
41
|
name: string;
|
|
42
42
|
/** Absolute path to skill file */
|
|
43
43
|
path: string;
|
|
44
|
+
/** Lexical path used to discover the file, preserving symlink provenance for management operations. */
|
|
45
|
+
discoveryPath?: string;
|
|
44
46
|
/** Skill content (markdown) */
|
|
45
47
|
/** Lazily load the markdown body when the caller needs prompt content. */
|
|
46
48
|
loadContent?: () => Promise<string>;
|
package/src/capability/types.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface LoadContext {
|
|
|
44
44
|
bypassCache?: boolean;
|
|
45
45
|
/** Owning session settings for provider policy decisions. */
|
|
46
46
|
settings?: Settings;
|
|
47
|
+
/** User-owned permission to follow skill links outside a user scan root. */
|
|
48
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/**
|
|
@@ -467,7 +467,7 @@ async function runImport(flags: AuthBrokerCommandArgs["flags"]): Promise<void> {
|
|
|
467
467
|
if (!target) {
|
|
468
468
|
throw new Error("Usage: gjc auth-broker import <file|dir> [--provider=<id>] [--include-disabled] [--dry-run]");
|
|
469
469
|
}
|
|
470
|
-
const resolvedTarget = path.resolve(target.startsWith("~") ? target.replace(/^~/, os.homedir()) : target);
|
|
470
|
+
const resolvedTarget = path.resolve(target.startsWith("~") ? target.replace(/^~/, () => os.homedir()) : target);
|
|
471
471
|
const { entries, skipped } = await loadImportPlan(resolvedTarget, flags.provider, flags.includeDisabled === true);
|
|
472
472
|
|
|
473
473
|
if (flags.json) {
|
|
@@ -32,7 +32,7 @@ import { type SlashCommand, slashCommandCapability } from "../capability/slash-c
|
|
|
32
32
|
import { type CustomTool, toolCapability } from "../capability/tool";
|
|
33
33
|
import type { Capability, LoadContext, LoadResult, SourceMeta } from "../capability/types";
|
|
34
34
|
import { Settings, type Settings as SettingsInstance } from "../config/settings";
|
|
35
|
-
import { resolveSkillScopeTrust } from "../config/skill-settings-defaults";
|
|
35
|
+
import { resolveGlobalUserSkillLinkTrust, resolveSkillScopeTrust } from "../config/skill-settings-defaults";
|
|
36
36
|
import { getEmbeddedDefaultGjcSkills } from "../defaults/gjc-defaults";
|
|
37
37
|
import { initializeWithSettings, loadCapability } from "../discovery";
|
|
38
38
|
import { inspectClaudeConvention } from "../discovery/claude";
|
|
@@ -683,6 +683,10 @@ async function collectSkills(cwd: string, activeSettings: SettingsInstance): Pro
|
|
|
683
683
|
...activeSettings.getGroup("skills"),
|
|
684
684
|
cwd,
|
|
685
685
|
disabledExtensions: activeSettings.get("disabledExtensions"),
|
|
686
|
+
allowExternalUserSkillSymlinks: resolveGlobalUserSkillLinkTrust({
|
|
687
|
+
trustUserSkills: activeSettings.getGlobal("skills.trustUserSkills"),
|
|
688
|
+
enablePiUser: activeSettings.getGlobal("skills.enablePiUser"),
|
|
689
|
+
}),
|
|
686
690
|
});
|
|
687
691
|
for (const skill of result.skills) loadedNames.add(getSkillFilesystemIdentity(skill.name));
|
|
688
692
|
}
|
|
@@ -798,7 +802,16 @@ async function collectSkills(cwd: string, activeSettings: SettingsInstance): Pro
|
|
|
798
802
|
for (const dir of [...customDirs].sort()) {
|
|
799
803
|
const scan = await scanSkillsFromDir(
|
|
800
804
|
{ cwd, home: os.homedir(), repoRoot: null },
|
|
801
|
-
{
|
|
805
|
+
{
|
|
806
|
+
dir: expandTilde(dir),
|
|
807
|
+
providerId: "custom",
|
|
808
|
+
level: "user",
|
|
809
|
+
requireDescription: true,
|
|
810
|
+
allowExternalUserSkillSymlinks: resolveGlobalUserSkillLinkTrust({
|
|
811
|
+
trustUserSkills: activeSettings.getGlobal("skills.trustUserSkills"),
|
|
812
|
+
enablePiUser: activeSettings.getGlobal("skills.enablePiUser"),
|
|
813
|
+
}),
|
|
814
|
+
},
|
|
802
815
|
);
|
|
803
816
|
for (const skill of scan.items) {
|
|
804
817
|
const base: Omit<CustomizeDoctorItem, "status" | "reason" | "detail" | "remediation"> = {
|
|
@@ -20,6 +20,7 @@ export type PublicFailureKind =
|
|
|
20
20
|
| "timeout"
|
|
21
21
|
| "wait_timeout"
|
|
22
22
|
| "uncertain_after_send"
|
|
23
|
+
| "busy"
|
|
23
24
|
| "daemon_unhealthy"
|
|
24
25
|
| "daemon_stale"
|
|
25
26
|
| "daemon_mixed"
|
|
@@ -100,6 +101,10 @@ export const PUBLIC_COMMAND_DIAGNOSTICS = {
|
|
|
100
101
|
"The macOS open-file limit is below the recommended minimum; increase it before starting additional concurrent work.",
|
|
101
102
|
sdk_resource_gone:
|
|
102
103
|
"The requested resource is not available from this session endpoint; this reports absent resource state, not an empty result.",
|
|
104
|
+
sdk_unknown_operation:
|
|
105
|
+
"The --op value is not a known SDK operation id for this command. Per-session control ids include turn.prompt, turn.steer, turn.follow_up, turn.abort and turn.abort_and_prompt.",
|
|
106
|
+
sdk_scope_requires_repository:
|
|
107
|
+
"The selected session-list scope requires a Git repository. Run inside a checkout, pass --repo <path>, or use --scope cwd or --scope all.",
|
|
103
108
|
router_cleanup_failed: "SDK session Router cleanup failed.",
|
|
104
109
|
broker_cleanup_failed: "SDK broker client cleanup failed.",
|
|
105
110
|
// The broker reports this code from several distinct causes, so the text names none
|
|
@@ -162,6 +167,7 @@ const messages: Record<PublicFailureKind, string> = {
|
|
|
162
167
|
timeout: "The operation timed out; its outcome requires reconciliation.",
|
|
163
168
|
wait_timeout: "Waiting timed out after the operation was accepted. Do not replay it.",
|
|
164
169
|
uncertain_after_send: "The request was sent but its outcome is uncertain. Reconcile before any replay.",
|
|
170
|
+
busy: "The session is running a turn and refused the request.",
|
|
165
171
|
daemon_unhealthy: "The selected daemon is unhealthy.",
|
|
166
172
|
daemon_stale: "The selected daemon has stale runtime state.",
|
|
167
173
|
daemon_mixed: "Some daemon targets failed. Do not repeat mutations that already succeeded.",
|
|
@@ -282,6 +288,9 @@ export function classifyPublicCommandFailure(
|
|
|
282
288
|
else if (kind === "uncertain_after_send") {
|
|
283
289
|
category = "uncertain";
|
|
284
290
|
outcomeCertainty = "unknown";
|
|
291
|
+
} else if (kind === "busy") {
|
|
292
|
+
category = "unavailable";
|
|
293
|
+
if (outcomeCertainty === "not-applied") retryability = "yes";
|
|
285
294
|
} else if (
|
|
286
295
|
[
|
|
287
296
|
"unavailable",
|
|
@@ -325,7 +334,18 @@ export function classifyPublicCommandFailure(
|
|
|
325
334
|
nextSteps.push(step("Wait for the existing restart to finish, then inspect status; do not restart again."));
|
|
326
335
|
const session = references.find(ref => ref.kind === "sessionId");
|
|
327
336
|
const operation = references.find(ref => ref.kind === "operationRef");
|
|
328
|
-
if (
|
|
337
|
+
if (kind === "busy" && canonical[0] === "sdk" && outcomeCertainty === "not-applied") {
|
|
338
|
+
// A refused-before-execution request has no operation record to reconcile:
|
|
339
|
+
// point at the busy turn instead of a status lookup that can only say unknown.
|
|
340
|
+
nextSteps.push(
|
|
341
|
+
step(
|
|
342
|
+
"Steer the active turn with `sdk session raw control <sessionId> --op turn.steer`, or wait until the session is idle before sending again.",
|
|
343
|
+
session && executableValue(session.value)
|
|
344
|
+
? ["sdk", "session", "inspect", session.value]
|
|
345
|
+
: ["sdk", "session", "list"],
|
|
346
|
+
),
|
|
347
|
+
);
|
|
348
|
+
} else if (
|
|
329
349
|
canonical[0] === "sdk" &&
|
|
330
350
|
session &&
|
|
331
351
|
operation &&
|
package/src/cli/setup-cli.ts
CHANGED
|
@@ -766,7 +766,7 @@ async function confirmImport(count: number): Promise<boolean> {
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
/**
|
|
769
|
-
* Discover existing Claude Code / Codex CLI credentials and import them into the
|
|
769
|
+
* Discover existing Claude Code / Codex CLI / Kiro CLI credentials and import them into the
|
|
770
770
|
* gjc credential store after a redacted preview + confirmation. Falls back to
|
|
771
771
|
* manual-setup guidance when nothing importable is found.
|
|
772
772
|
*/
|
|
@@ -834,7 +834,7 @@ export async function handleCredentialsSetup(
|
|
|
834
834
|
for (const line of formatDiscoverySummary(filteredResult)) process.stdout.write(` ${line}\n`);
|
|
835
835
|
process.stdout.write(
|
|
836
836
|
chalk.yellow(
|
|
837
|
-
`\nNo importable Claude/Codex credentials found. Continue with manual setup:\n` +
|
|
837
|
+
`\nNo importable Claude/Codex/Kiro CLI credentials found. Continue with manual setup:\n` +
|
|
838
838
|
` ${APP_NAME} setup provider (add an API-compatible provider)\n` +
|
|
839
839
|
` ${APP_NAME} (then /login) (interactive OAuth/subscription login)\n`,
|
|
840
840
|
),
|
|
@@ -930,7 +930,7 @@ ${chalk.bold("Components:")}
|
|
|
930
930
|
provider Optional: add a preset, OpenAI-compatible, or Anthropic-compatible API provider
|
|
931
931
|
python Optional: verify a Python 3 interpreter is reachable for code execution
|
|
932
932
|
stt Optional: install speech-to-text dependencies (openai-whisper, recording tools)
|
|
933
|
-
credentials Optional: import existing Claude Code / Codex CLI credentials
|
|
933
|
+
credentials Optional: import existing Claude Code / Codex CLI / Kiro CLI credentials
|
|
934
934
|
|
|
935
935
|
|
|
936
936
|
${chalk.bold("Provider example:")}
|
|
@@ -998,7 +998,7 @@ ${chalk.bold("Examples:")}
|
|
|
998
998
|
${APP_NAME} setup stt Install speech-to-text dependencies
|
|
999
999
|
${APP_NAME} setup stt --check Check if STT dependencies are available
|
|
1000
1000
|
${APP_NAME} setup python --check Check if Python execution is available
|
|
1001
|
-
${APP_NAME} setup credentials Discover & import existing Claude/Codex credentials
|
|
1001
|
+
${APP_NAME} setup credentials Discover & import existing Claude/Codex/Kiro CLI credentials
|
|
1002
1002
|
${APP_NAME} setup credentials --dry-run Preview importable credentials (redacted)
|
|
1003
1003
|
${APP_NAME} setup credentials --yes Import without an interactive prompt
|
|
1004
1004
|
${APP_NAME} setup paseo Register GJC as a Paseo ACP provider
|
package/src/cli/skills-cli.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* filesystem-discovered custom skills.
|
|
4
4
|
*/
|
|
5
5
|
import { Settings } from "../config/settings";
|
|
6
|
+
import { resolveGlobalUserSkillLinkTrust } from "../config/skill-settings-defaults";
|
|
6
7
|
import {
|
|
7
8
|
DEFAULT_GJC_DEFINITION_NAMES,
|
|
8
9
|
type EmbeddedDefaultGjcSkill,
|
|
@@ -111,6 +112,10 @@ export async function runSkillsCommand(cmd: SkillsCommandArgs): Promise<void> {
|
|
|
111
112
|
...settings.getGroup("skills"),
|
|
112
113
|
disabledExtensions: settings.get("disabledExtensions"),
|
|
113
114
|
},
|
|
115
|
+
allowExternalUserSkillSymlinks: resolveGlobalUserSkillLinkTrust({
|
|
116
|
+
trustUserSkills: settings.getGlobal("skills.trustUserSkills"),
|
|
117
|
+
enablePiUser: settings.getGlobal("skills.enablePiUser"),
|
|
118
|
+
}),
|
|
114
119
|
});
|
|
115
120
|
if (cmd.flags?.json) {
|
|
116
121
|
writeJson({
|
|
@@ -7,37 +7,71 @@ export default class DeepInterview extends Command {
|
|
|
7
7
|
|
|
8
8
|
All deep-interview state operations go through this command — no gjc state needed:
|
|
9
9
|
read Print the persisted envelope, revision, content sha, and any pending draft
|
|
10
|
-
write One-shot incremental JSON merge into state
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
write One-shot incremental JSON merge into state; required --input '<json>'|@file
|
|
11
|
+
must use the {"state":{...}} shape (--reset replaces; the locked intent
|
|
12
|
+
contract survives a reset)
|
|
13
|
+
kickoff Seed an interviewing session; --trace and --json are supported alongside
|
|
14
|
+
--quick|--standard|--deep
|
|
15
|
+
write-spec Persist a final spec through --write; --force only overwrites corrupt state
|
|
16
|
+
stage Stage one JSON transition draft; required --for <transition> and --input
|
|
17
|
+
'<json>'|@file use the {"state":{...}} shape
|
|
13
18
|
check Dry-run the staged draft against current state (same merge apply performs)
|
|
14
19
|
apply Commit the staged draft with runtime-owned revision+sha CAS
|
|
15
20
|
discard Remove the pending draft
|
|
16
21
|
clear Clear deep-interview state for the session (lifecycle passthrough)
|
|
22
|
+
approve-execution Record the user's separate, explicit approval for a ready canonical Crystal
|
|
17
23
|
handoff Hand off to the next workflow skill (lifecycle passthrough)
|
|
24
|
+
--crystallize Promote a bounded authenticated conversation snapshot into a versioned
|
|
25
|
+
Crystal; required --input '<crystallize JSON>'|@file and --slug <slug>
|
|
26
|
+
|
|
27
|
+
Crystallize input must be a JSON object with these required fields (optional prior, removed_ids,
|
|
28
|
+
resolved_open_gaps, resolved_conflicts, and their anchors may extend the object):
|
|
29
|
+
{"snapshot":{"revision":N,"start":N,"end":N,"digest":"<sha256>","messages":[...]},
|
|
30
|
+
"current_revision":N,"items":[{"id":"...","kind":"goal|constraint|decision|acceptance_criterion|non_goal",
|
|
31
|
+
"classification":"confirmed|inferred|disputed","statement":"...","anchor":{"message_index":N,"quote":"..."}}],
|
|
32
|
+
"open_gaps":[],"conflicts":[]}
|
|
33
|
+
Confirmed items require a verbatim user anchor; inferred/disputed items must not be treated as
|
|
34
|
+
confirmed. The raw --input payload is bounded to 1 MiB; items are capped at 128 and each text
|
|
35
|
+
field at 10,000 characters, and snapshot messages must be contiguous, ordered, and cover
|
|
36
|
+
start..end (maximum 200 messages). The
|
|
37
|
+
digest/current_revision must match the live authenticated transcript. A ready Crystal persists as
|
|
38
|
+
deep-interview-<slug>-v<spec_version>.md;
|
|
39
|
+
needs-questions, stale, or superseded Crystal input does not publish a spec. Crystallize always
|
|
40
|
+
leaves execution_approval as not-approved; approve-execution is a separate explicit transition.
|
|
18
41
|
|
|
19
42
|
Ambiguity is runtime-owned: apply/write derive current_ambiguity from the latest valid scored
|
|
20
43
|
round and clamp it to the deterministic floor. Sessions resolve from --session-id, payload
|
|
21
|
-
session_id, or GJC_SESSION_ID
|
|
44
|
+
session_id, or GJC_SESSION_ID. A relative GJC_SESSION_FILE is resolved against the requested
|
|
45
|
+
workspace cwd, never the process launch directory.`;
|
|
22
46
|
static strict = false;
|
|
23
47
|
static flags = {
|
|
24
48
|
quick: Flags.boolean({ description: "Seed a quick deep-interview run" }),
|
|
25
49
|
standard: Flags.boolean({ description: "Seed a standard deep-interview run" }),
|
|
26
50
|
deep: Flags.boolean({ description: "Seed a deep deep-interview run" }),
|
|
51
|
+
crystallize: Flags.boolean({ description: "Crystallize a bounded conversation snapshot into a versioned spec" }),
|
|
27
52
|
trace: Flags.boolean({ description: "Run a bounded trace evidence pre-step before interview questions" }),
|
|
28
53
|
threshold: Flags.string({ description: "Override ambiguity threshold for kickoff" }),
|
|
29
54
|
"threshold-source": Flags.string({ description: "Describe the threshold override source" }),
|
|
30
55
|
"session-id": Flags.string({
|
|
31
56
|
description: "Route state/spec handoff through a session-scoped .gjc/_session-{sessionid} directory",
|
|
32
57
|
}),
|
|
33
|
-
input: Flags.string({
|
|
58
|
+
input: Flags.string({
|
|
59
|
+
description:
|
|
60
|
+
'Required JSON object (or @file): generic api uses --input; write/stage use {"state":{...}}; crystallize uses snapshot/current_revision/items; payload <=1 MiB',
|
|
61
|
+
}),
|
|
34
62
|
for: Flags.string({
|
|
35
63
|
description: "Transition for stage: initialize-context | record-round | update-facts | merge-state",
|
|
36
64
|
}),
|
|
37
65
|
reset: Flags.boolean({ description: "With write: replace state instead of incremental merge" }),
|
|
38
|
-
write: Flags.boolean({
|
|
66
|
+
write: Flags.boolean({
|
|
67
|
+
description:
|
|
68
|
+
"Persist a final deep-interview spec through the sanctioned GJC CLI/API (requires --spec; positional write requires --input)",
|
|
69
|
+
}),
|
|
39
70
|
stage: Flags.string({ description: 'Spec stage for --write (currently "final")' }),
|
|
40
|
-
slug: Flags.string({
|
|
71
|
+
slug: Flags.string({
|
|
72
|
+
description:
|
|
73
|
+
"Required with --crystallize; safe slug for .gjc/_session-{sessionid}/specs/deep-interview-<slug>.md",
|
|
74
|
+
}),
|
|
41
75
|
spec: Flags.string({ description: "Final spec markdown or a path to the final spec markdown" }),
|
|
42
76
|
handoff: Flags.string({ description: 'After --write, hand off to a workflow target (currently "ralplan")' }),
|
|
43
77
|
deliberate: Flags.boolean({
|
|
@@ -48,13 +82,18 @@ session_id, or GJC_SESSION_ID.`;
|
|
|
48
82
|
};
|
|
49
83
|
static examples = [
|
|
50
84
|
'$ gjc deep-interview --trace --standard "<idea>"',
|
|
85
|
+
'$ gjc deep-interview --trace --standard "<idea>" --json',
|
|
51
86
|
"$ gjc deep-interview read --json",
|
|
52
|
-
'$ gjc deep-interview write --input \'{"state":{"threshold":0.05}}\' --json',
|
|
87
|
+
'$ gjc deep-interview write --input \'{"state":{"threshold":0.05,"threshold_source":"default"}}\' --json',
|
|
53
88
|
'$ gjc deep-interview stage --for record-round --input \'{"state":{"rounds":[{"round":1,"round_key":"r1"}]}}\' --json',
|
|
54
89
|
"$ gjc deep-interview check --json",
|
|
55
90
|
"$ gjc deep-interview apply --json",
|
|
91
|
+
"$ gjc deep-interview approve-execution --json",
|
|
56
92
|
"$ gjc deep-interview --write --stage final --slug my-feature --spec ./final-spec.md",
|
|
93
|
+
"$ gjc deep-interview --write --stage final --slug my-feature --spec ./final-spec.md --force",
|
|
57
94
|
"$ gjc deep-interview --write --stage final --slug my-feature --spec ./final-spec.md --deliberate",
|
|
95
|
+
'$ gjc deep-interview --crystallize --input \'{"snapshot":{"revision":1,"start":0,"end":0,"digest":"<64-hex-sha256>","messages":[{"index":0,"role":"user","content":"Build audit reports"}]},"current_revision":1,"items":[{"id":"goal:reports","kind":"goal","classification":"confirmed","statement":"Build audit reports","anchor":{"message_index":0,"quote":"Build audit reports"}}],"open_gaps":[],"conflicts":[]}\' --slug audit-reports --json',
|
|
96
|
+
"$ gjc deep-interview --crystallize --input @conversation.json --slug my-feature --json",
|
|
58
97
|
];
|
|
59
98
|
|
|
60
99
|
async run(): Promise<void> {
|
package/src/commands/sdk.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { CliParseError, Command } from "@gajae-code/utils/cli";
|
|
|
15
15
|
import type { Args as ParsedArgs } from "../cli/args";
|
|
16
16
|
import { isSafeSdkInternalAgentDir, scanPublicCommand } from "../cli/public-command-entry";
|
|
17
17
|
import { PublicCommandFailure } from "../cli/public-command-errors";
|
|
18
|
+
import { FileLockAcquireError } from "../config/file-lock";
|
|
18
19
|
import { parseModelString } from "../config/model-resolver";
|
|
19
20
|
import { Settings } from "../config/settings";
|
|
20
21
|
import { usePostmortemSignalExitAuthority } from "../lsp/client";
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
import { readBrokerDiscovery } from "../sdk/broker/discovery";
|
|
32
33
|
import { type EndpointFileRead, readEndpointFile } from "../sdk/broker/endpoint-authority";
|
|
33
34
|
import {
|
|
35
|
+
BROKER_DISCOVERY_BUDGET,
|
|
34
36
|
emitBrokerStartupTestSignal,
|
|
35
37
|
reconcileBrokerGenerationForStartup,
|
|
36
38
|
withBrokerStartupLock,
|
|
@@ -1760,7 +1762,7 @@ export default class Sdk extends Command {
|
|
|
1760
1762
|
let runningBroker: Broker | undefined;
|
|
1761
1763
|
let stopSweep: (() => void) | undefined;
|
|
1762
1764
|
let startupExitRequested = false;
|
|
1763
|
-
let startupExitReason: "
|
|
1765
|
+
let startupExitReason: BrokerStartupExitRecord["reason"] | undefined;
|
|
1764
1766
|
let startupExitLogged = false;
|
|
1765
1767
|
let pendingShutdownSignal: "SIGTERM" | "SIGINT" | undefined;
|
|
1766
1768
|
let startupExitTask: Promise<boolean> | undefined;
|
|
@@ -1781,10 +1783,11 @@ export default class Sdk extends Command {
|
|
|
1781
1783
|
};
|
|
1782
1784
|
const startupSignalExitCode = (signal: "SIGTERM" | "SIGINT"): 130 | 143 => (signal === "SIGINT" ? 130 : 143);
|
|
1783
1785
|
const makeStartupExitRecord = (
|
|
1784
|
-
reason: "
|
|
1786
|
+
reason: BrokerStartupExitRecord["reason"],
|
|
1785
1787
|
exitCode: 1 | 130 | 143,
|
|
1786
1788
|
signal: "SIGTERM" | "SIGINT" | null,
|
|
1787
1789
|
timeoutMs?: number,
|
|
1790
|
+
blockingLockPath?: string,
|
|
1788
1791
|
): BrokerStartupExitRecord & Record<string, unknown> => ({
|
|
1789
1792
|
version: 1,
|
|
1790
1793
|
reason,
|
|
@@ -1797,6 +1800,7 @@ export default class Sdk extends Command {
|
|
|
1797
1800
|
exitCode,
|
|
1798
1801
|
timeoutMs: timeoutMs ?? null,
|
|
1799
1802
|
writtenAt: Date.now(),
|
|
1803
|
+
...(blockingLockPath === undefined ? {} : { blockingLockPath }),
|
|
1800
1804
|
});
|
|
1801
1805
|
const beginStartupExitRecordWrite = (record: BrokerStartupExitRecord): Promise<BrokerStartupExitWriteStatus> => {
|
|
1802
1806
|
const testDelayMs = Number(process.env.GJC_SDK_TEST_BROKER_STARTUP_EXIT_RECORD_DELAY_MS ?? 0);
|
|
@@ -1831,21 +1835,24 @@ export default class Sdk extends Command {
|
|
|
1831
1835
|
process.stderr.write(`${JSON.stringify({ level, message, ...record })}\n`);
|
|
1832
1836
|
};
|
|
1833
1837
|
const exitDuringStartup = (
|
|
1834
|
-
reason: "
|
|
1838
|
+
reason: BrokerStartupExitRecord["reason"],
|
|
1835
1839
|
exitCode: 1 | 130 | 143,
|
|
1836
1840
|
signal: "SIGTERM" | "SIGINT" | null,
|
|
1837
1841
|
timeoutMs?: number,
|
|
1842
|
+
blockingLockPath?: string,
|
|
1838
1843
|
): Promise<boolean> => {
|
|
1839
1844
|
// The first startup exit cause owns both the persisted reason and the process exit code.
|
|
1840
1845
|
if (startupExitTask) return startupExitReason === reason ? startupExitTask : Promise.resolve(false);
|
|
1841
1846
|
if (startupExitRequested) return Promise.resolve(false);
|
|
1842
1847
|
startupExitRequested = true;
|
|
1843
1848
|
startupExitReason = reason;
|
|
1844
|
-
const exitRecord = makeStartupExitRecord(reason, exitCode, signal, timeoutMs);
|
|
1849
|
+
const exitRecord = makeStartupExitRecord(reason, exitCode, signal, timeoutMs, blockingLockPath);
|
|
1845
1850
|
const message =
|
|
1846
|
-
reason === "startup-
|
|
1847
|
-
? `SDK broker startup
|
|
1848
|
-
:
|
|
1851
|
+
reason === "startup-lock-blocked" && blockingLockPath
|
|
1852
|
+
? `SDK broker startup blocked by retained removal transition ${blockingLockPath}.`
|
|
1853
|
+
: reason === "startup-deadline"
|
|
1854
|
+
? `SDK broker startup exceeded its ${timeoutMs}ms fence deadline.`
|
|
1855
|
+
: `SDK broker startup interrupted by ${signal} before readiness.`;
|
|
1849
1856
|
writeStartupExitLog(exitRecord, message);
|
|
1850
1857
|
startupExitTask = (async () => {
|
|
1851
1858
|
const exitRecordWrite = await beginStartupExitRecordWrite(exitRecord);
|
|
@@ -1874,7 +1881,7 @@ export default class Sdk extends Command {
|
|
|
1874
1881
|
: pendingShutdownSignal;
|
|
1875
1882
|
if (!signal) return;
|
|
1876
1883
|
pendingShutdownSignal = signal;
|
|
1877
|
-
if (startupExitTask && startupExitReason
|
|
1884
|
+
if (startupExitTask && startupExitReason !== "startup-signal") {
|
|
1878
1885
|
await startupExitTask;
|
|
1879
1886
|
await waitForStartupAbortCleanup();
|
|
1880
1887
|
process.exit(1);
|
|
@@ -1907,6 +1914,7 @@ export default class Sdk extends Command {
|
|
|
1907
1914
|
Number.isSafeInteger(testWatchdogMs) && testWatchdogMs > 0 && testWatchdogMs <= remainingMs
|
|
1908
1915
|
? testWatchdogMs
|
|
1909
1916
|
: remainingMs;
|
|
1917
|
+
const startupCheckpointDeadline = performance.now() + watchdogMs - 1_000;
|
|
1910
1918
|
const startupWatchdog = setTimeout(() => {
|
|
1911
1919
|
startupAbortController.abort();
|
|
1912
1920
|
void exitDuringStartup("startup-deadline", 1, null, watchdogMs).then(async started => {
|
|
@@ -2004,6 +2012,7 @@ export default class Sdk extends Command {
|
|
|
2004
2012
|
const candidate = new Broker({
|
|
2005
2013
|
agentDir,
|
|
2006
2014
|
startupAbortSignal: startupAbortController.signal,
|
|
2015
|
+
startupCheckpointDeadline,
|
|
2007
2016
|
onStartupReady: () => clearTimeout(startupWatchdog),
|
|
2008
2017
|
masterOrphanGraceMs: (await Settings.loadForScope({ cwd: process.cwd(), agentDir })).get(
|
|
2009
2018
|
"sdk.masterOrphanGraceMs",
|
|
@@ -2047,6 +2056,17 @@ export default class Sdk extends Command {
|
|
|
2047
2056
|
await finishPendingStartupSignal();
|
|
2048
2057
|
return;
|
|
2049
2058
|
}
|
|
2059
|
+
// A retained removal transition is an explicit acquire failure, not only
|
|
2060
|
+
// an exhausted ordinary contention timeout.
|
|
2061
|
+
if (error instanceof FileLockAcquireError && error.orphanPath) {
|
|
2062
|
+
await exitDuringStartup(
|
|
2063
|
+
"startup-lock-blocked",
|
|
2064
|
+
1,
|
|
2065
|
+
null,
|
|
2066
|
+
BROKER_DISCOVERY_BUDGET.startupLockWaitMs,
|
|
2067
|
+
error.orphanPath,
|
|
2068
|
+
);
|
|
2069
|
+
}
|
|
2050
2070
|
if (broker) {
|
|
2051
2071
|
try {
|
|
2052
2072
|
await broker.stop({ kind: "startup-failure" });
|
|
@@ -77,16 +77,9 @@ export const CURATED_TIER_LABELS = {
|
|
|
77
77
|
|
|
78
78
|
/** Generated from packages/ai/src/models.json at feature land: 3936 in-scope baseline skips. */
|
|
79
79
|
export const TIER_MAP_SKIP_LIST = {
|
|
80
|
-
"amazon-bedrock/anthropic.claude-sonnet-5-5": { rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated" },
|
|
81
80
|
"amazon-bedrock/au.anthropic.claude-sonnet-5-5": {
|
|
82
81
|
rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated",
|
|
83
82
|
},
|
|
84
|
-
"amazon-bedrock/eu.anthropic.claude-sonnet-5-5": {
|
|
85
|
-
rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated",
|
|
86
|
-
},
|
|
87
|
-
"amazon-bedrock/global.anthropic.claude-sonnet-5-5": {
|
|
88
|
-
rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated",
|
|
89
|
-
},
|
|
90
83
|
"amazon-bedrock/jp.anthropic.claude-sonnet-5-5": {
|
|
91
84
|
rationale: "Sonnet 5.5 catalog addition (#6111); not yet curated",
|
|
92
85
|
},
|
|
@@ -6498,6 +6491,123 @@ export const TIER_MAP_SKIP_LIST = {
|
|
|
6498
6491
|
"kiro/minimax-m2.1": { rationale: "Kiro API-key catalog addition; not yet curated" },
|
|
6499
6492
|
"kiro/minimax-m2.5": { rationale: "Kiro API-key catalog addition; not yet curated" },
|
|
6500
6493
|
"kiro/qwen3-coder-next": { rationale: "Kiro API-key catalog addition; not yet curated" },
|
|
6494
|
+
// Models.dev refresh additions
|
|
6495
|
+
"amazon-bedrock/anthropic.claude-sonnet-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6496
|
+
"amazon-bedrock/eu.anthropic.claude-sonnet-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6497
|
+
"amazon-bedrock/global.anthropic.claude-sonnet-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6498
|
+
"amazon-bedrock/global.moonshotai.kimi-k3": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6499
|
+
"amazon-bedrock/global.openai.gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6500
|
+
"amazon-bedrock/global.openai.gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6501
|
+
"amazon-bedrock/global.openai.gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6502
|
+
"amazon-bedrock/global.xai.grok-4.7": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6503
|
+
"amazon-bedrock/openai.gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6504
|
+
"amazon-bedrock/openai.gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6505
|
+
"amazon-bedrock/openai.gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6506
|
+
"amazon-bedrock/us.moonshotai.kimi-k3": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6507
|
+
"amazon-bedrock/us.openai.gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6508
|
+
"amazon-bedrock/us.openai.gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6509
|
+
"amazon-bedrock/us.openai.gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6510
|
+
"amazon-bedrock/us.xai.grok-4.7": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6511
|
+
"cloudflare-ai-gateway/anthropic/claude-opus-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6512
|
+
"cloudflare-ai-gateway/openai/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6513
|
+
"cloudflare-ai-gateway/openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6514
|
+
"cloudflare-ai-gateway/xai/grok-4.7": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6515
|
+
"deepinfra/XiaomiMiMo/MiMo-V2.6-Flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6516
|
+
"deepinfra/XiaomiMiMo/MiMo-V2.6-Pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6517
|
+
"deepinfra/tencent/Hy4-preview": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6518
|
+
"github-copilot/claude-opus-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6519
|
+
"github-copilot/claude-sonnet-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6520
|
+
"github-copilot/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6521
|
+
"github-copilot/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6522
|
+
"github-copilot/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6523
|
+
"kilo/aion-labs/aion-3.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6524
|
+
"kilo/aion-labs/aion-3.5-mini": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6525
|
+
"kilo/anthropic/claude-sonnet-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6526
|
+
"kilo/cohere/command-a-plus": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6527
|
+
"kilo/fireworks/ember-1": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6528
|
+
"kilo/openai/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6529
|
+
"kilo/openai/gpt-6-luna-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6530
|
+
"kilo/openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6531
|
+
"kilo/openai/gpt-6-sol-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6532
|
+
"kilo/openai/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6533
|
+
"kilo/openai/gpt-6.1-sol-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6534
|
+
"kilo/perceptron/perceptron-mk1.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6535
|
+
"kilo/qwen/qwen3.8-max-prime": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6536
|
+
"kilo/qwen/qwen3.8-omni-flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6537
|
+
"kilo/stealth/space-bunny-alpha": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6538
|
+
"kilo/typesafe/jev-router": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6539
|
+
"kilo/upstage/solar-mini4": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6540
|
+
"kilo/z-ai/glm-5.3-prime": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6541
|
+
"minimax-code-cn/MiniMax-M3.1-Flash-Preview": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6542
|
+
"minimax-code/MiniMax-M3.1-Flash-Preview": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6543
|
+
"openai/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6544
|
+
"openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6545
|
+
"openai/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6546
|
+
"openai/gpt-daybreak-blue-latest": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6547
|
+
"openai/gpt-daybreak-red-latest": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6548
|
+
"opencode-go/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6549
|
+
"opencode-go/longcat-2.5-preview-free": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6550
|
+
"opencode-go/space-bunny-free": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6551
|
+
"opencode-zen/claude-opus-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6552
|
+
"opencode-zen/claude-sonnet-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6553
|
+
"opencode-zen/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6554
|
+
"opencode-zen/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6555
|
+
"opencode-zen/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6556
|
+
"opencode-zen/grok-4.7": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6557
|
+
"opencode-zen/longcat-2.5-preview-free": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6558
|
+
"opencode-zen/qwen3.8-max": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6559
|
+
"opencode-zen/space-bunny-free": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6560
|
+
"openrouter/aion-labs/aion-3.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6561
|
+
"openrouter/aion-labs/aion-3.5-mini": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6562
|
+
"openrouter/anthropic/claude-sonnet-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6563
|
+
"openrouter/anthropic/claude-sonnet-5.5:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6564
|
+
"openrouter/cohere/command-a-plus": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6565
|
+
"openrouter/fireworks/ember-1": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6566
|
+
"openrouter/openai/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6567
|
+
"openrouter/openai/gpt-6-luna-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6568
|
+
"openrouter/openai/gpt-6-luna-pro:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6569
|
+
"openrouter/openai/gpt-6-luna:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6570
|
+
"openrouter/openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6571
|
+
"openrouter/openai/gpt-6-sol:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6572
|
+
"openrouter/openai/gpt-6-sol-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6573
|
+
"openrouter/openai/gpt-6-sol-pro:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6574
|
+
"openrouter/openai/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6575
|
+
"openrouter/openai/gpt-6.1-sol-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6576
|
+
"openrouter/openai/gpt-oss-120b:batch": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6577
|
+
"openrouter/perceptron/perceptron-mk1.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6578
|
+
"openrouter/qwen/qwen3.8-max-prime": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6579
|
+
"openrouter/qwen/qwen3.8-omni-flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6580
|
+
"openrouter/stealth/space-bunny-alpha": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6581
|
+
"openrouter/typesafe/jev-router": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6582
|
+
"openrouter/upstage/solar-mini4": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6583
|
+
"openrouter/z-ai/glm-5.3-prime": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6584
|
+
"venice/aion-labs-aion-3-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6585
|
+
"venice/aion-labs-aion-3-5-mini": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6586
|
+
"venice/claude-opus-5-5-fast": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6587
|
+
"venice/claude-sonnet-5-5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6588
|
+
"venice/openai-gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6589
|
+
"venice/openai-gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6590
|
+
"venice/openai-gpt-61-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6591
|
+
"venice/xiaomi-mimo-v2-6-flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6592
|
+
"vercel-ai-gateway/alibaba/qwen3.8-max-prime": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6593
|
+
"vercel-ai-gateway/anthropic/claude-sonnet-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6594
|
+
"vercel-ai-gateway/fireworks/ember-1": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6595
|
+
"vercel-ai-gateway/inclusionai/ling-3.1-flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6596
|
+
"vercel-ai-gateway/inclusionai/ling-3.1-flash-free": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6597
|
+
"vercel-ai-gateway/meituan/longcat-2.5-preview": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6598
|
+
"vercel-ai-gateway/openai/gpt-6-luna": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6599
|
+
"vercel-ai-gateway/openai/gpt-6-luna-fast": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6600
|
+
"vercel-ai-gateway/openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6601
|
+
"vercel-ai-gateway/openai/gpt-6-sol-fast": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6602
|
+
"vercel-ai-gateway/openai/gpt-6.1-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6603
|
+
"vercel-ai-gateway/openai/gpt-6.1-sol-fast": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6604
|
+
"zenmux/anthropic/claude-fable-5.1": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6605
|
+
"zenmux/anthropic/claude-opus-5.5": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6606
|
+
"zenmux/deepseek/deepseek-v4.1-flash": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6607
|
+
"zenmux/moonshotai/kimi-k2.7-code-highspeed": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6608
|
+
"zenmux/openai/gpt-6-astra": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6609
|
+
"zenmux/openai/gpt-6-sol": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6610
|
+
"zenmux/xiaomi/mimo-v2.6-pro": { rationale: "models.dev refresh addition; not yet curated" },
|
|
6501
6611
|
} as const satisfies TierMapSkipList;
|
|
6502
6612
|
|
|
6503
6613
|
export const CURATED_TIER_MAP: AutoroutingCuratedTierMap = {
|