@gajae-code/coding-agent 0.18.6 → 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 +318 -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 +6 -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/settings.d.ts +4 -0
- 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 +8 -3
- 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/elicitation.d.ts +12 -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/lifecycle.d.ts +9 -0
- package/dist/types/sdk/broker/session-index.d.ts +12 -6
- package/dist/types/sdk/broker/task-artifact-owner-validation.d.ts +55 -0
- 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/bus/telegram-daemon.d.ts +3 -2
- package/dist/types/sdk/client/client.d.ts +2 -0
- package/dist/types/sdk/host/host.d.ts +6 -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 +9 -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 +36 -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 +19 -0
- package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +11 -0
- package/dist/types/session/session-manager.d.ts +31 -5
- package/dist/types/session/session-retirement.d.ts +71 -0
- package/dist/types/session/session-storage.d.ts +62 -48
- package/dist/types/session/session-transcript-header.d.ts +2 -0
- package/dist/types/session/task-artifact-owner-codec.d.ts +109 -0
- package/dist/types/session/task-artifact-owner-retirement.d.ts +7 -0
- package/dist/types/session/task-artifact-owner.d.ts +10 -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/resident-memory-bench.ts +174 -20
- package/scripts/verify-managed-empty-stop.ts +28 -0
- package/src/async/job-manager.ts +228 -122
- package/src/capability/index.ts +18 -0
- package/src/capability/mcp.ts +2 -0
- package/src/capability/skill.ts +2 -0
- package/src/capability/types.ts +6 -0
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/config-cli.ts +8 -18
- 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/cli-main.ts +7 -8
- package/src/commands/deep-interview.ts +47 -8
- package/src/commands/sdk.ts +140 -29
- 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/settings.ts +44 -4
- 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 +168 -23
- package/src/discovery/mcp-json.ts +6 -0
- package/src/discovery/ssh.ts +9 -4
- 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 -8
- 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/hindsight/config.ts +9 -3
- package/src/internal-urls/docs-index.generated.ts +19 -18
- 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 +163 -7
- 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/client.ts +13 -4
- package/src/runtime-mcp/config-writer.ts +10 -6
- package/src/runtime-mcp/config.ts +1 -0
- package/src/runtime-mcp/elicitation.ts +142 -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 +83 -7
- package/src/sdk/broker/ensure.ts +2 -0
- package/src/sdk/broker/lifecycle.ts +820 -73
- package/src/sdk/broker/session-index.ts +191 -81
- package/src/sdk/broker/task-artifact-owner-validation.ts +259 -0
- package/src/sdk/bus/chat-daemon-cli.ts +38 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/chat-daemon-runtime.ts +3 -0
- package/src/sdk/bus/index.ts +241 -46
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
- package/src/sdk/bus/telegram-daemon.ts +4 -2
- package/src/sdk/cli/session-cli.ts +17 -3
- package/src/sdk/client/client.ts +28 -8
- package/src/sdk/host/host.ts +6 -0
- package/src/sdk/host/query/handlers.ts +9 -1
- package/src/sdk/host/session-runtime.test.ts +2805 -411
- package/src/sdk/host/session-runtime.ts +428 -111
- 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/mcp/server.ts +15 -3
- 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 +94 -14
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +81 -38
- package/src/session/agent-session.ts +674 -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 +482 -61
- package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
- package/src/session/internal/task-artifact-owner-access.ts +245 -0
- package/src/session/internal/task-artifact-owner-transcript.ts +614 -0
- package/src/session/session-manager.ts +939 -133
- package/src/session/session-retirement.ts +714 -0
- package/src/session/session-storage.ts +418 -174
- package/src/session/session-transcript-header.ts +17 -0
- package/src/session/task-artifact-owner-codec.ts +641 -0
- package/src/session/task-artifact-owner-retirement.ts +477 -0
- package/src/session/task-artifact-owner.ts +289 -0
- 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,11 @@ 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
|
+
}),
|
|
439
|
+
bypassCache: ordinaryOptions.bypassCache,
|
|
432
440
|
};
|
|
433
441
|
const providers = filterProviders(capability, ordinaryOptions);
|
|
434
442
|
|
|
@@ -520,6 +528,16 @@ export async function loadCapabilityForHome<T>(
|
|
|
520
528
|
isolatedHome,
|
|
521
529
|
homeIdentity,
|
|
522
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
|
+
}),
|
|
523
541
|
};
|
|
524
542
|
|
|
525
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
|
@@ -40,8 +40,12 @@ export interface LoadContext {
|
|
|
40
40
|
repoRoot: string | null;
|
|
41
41
|
/** Whether discovery must remain isolated to the supplied home boundary. */
|
|
42
42
|
isolatedHome?: boolean;
|
|
43
|
+
/** Bypass lexical filesystem caches for this discovery operation. */
|
|
44
|
+
bypassCache?: boolean;
|
|
43
45
|
/** Owning session settings for provider policy decisions. */
|
|
44
46
|
settings?: Settings;
|
|
47
|
+
/** User-owned permission to follow skill links outside a user scan root. */
|
|
48
|
+
allowExternalUserSkillSymlinks?: boolean;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/**
|
|
@@ -112,6 +116,8 @@ export interface LoadOptions {
|
|
|
112
116
|
includeDisabledProviders?: boolean;
|
|
113
117
|
/** Explicit disabled extension IDs to apply instead of settings. */
|
|
114
118
|
disabledExtensions?: string[];
|
|
119
|
+
/** Bypass lexical filesystem caches for this discovery operation. */
|
|
120
|
+
bypassCache?: boolean;
|
|
115
121
|
/** Session settings whose provider policy applies to this load. */
|
|
116
122
|
settings?: Settings;
|
|
117
123
|
/** Internal: prevent explicit-home loads from consulting process-global policy. */
|
|
@@ -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) {
|
package/src/cli/config-cli.ts
CHANGED
|
@@ -63,29 +63,19 @@ type CliSettingDef = {
|
|
|
63
63
|
const ALL_SETTING_PATHS = Object.keys(SETTINGS_SCHEMA) as SettingPath[];
|
|
64
64
|
const REDACTED_SECRET_VALUE = "<redacted>";
|
|
65
65
|
const SECRET_SETTING_WORDS = new Set(["token", "secret", "password", "passwd", "pwd", "credential", "credentials"]);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"session",
|
|
73
|
-
"client",
|
|
74
|
-
"broker",
|
|
75
|
-
"bot",
|
|
76
|
-
"basic",
|
|
77
|
-
];
|
|
78
|
-
const SECRET_SETTING_COMPOUND_SUFFIXES = ["token", "secret", "password", "credential"];
|
|
66
|
+
/**
|
|
67
|
+
* camelCase segments (`appToken`, `basicPassword`) do not split on `-`/`_`, so any segment whose
|
|
68
|
+
* normalized form ends in a secret word is secret. Plural budget names (`maxTokens`) and words that
|
|
69
|
+
* merely contain one (`showTokenUsage`) stay visible.
|
|
70
|
+
*/
|
|
71
|
+
const SECRET_SETTING_SUFFIX = /(?:token|secret|password|passwd|pwd|credentials?)$/;
|
|
79
72
|
|
|
80
73
|
function isSecretSettingSegment(segment: string): boolean {
|
|
81
74
|
const normalized = segment.toLowerCase();
|
|
82
|
-
if (
|
|
75
|
+
if (SECRET_SETTING_SUFFIX.test(normalized)) return true;
|
|
83
76
|
if (/api[-_]?key/i.test(segment)) return true;
|
|
84
77
|
const words = normalized.split(/[-_]/).filter(Boolean);
|
|
85
|
-
|
|
86
|
-
return SECRET_SETTING_COMPOUND_PREFIXES.some(prefix =>
|
|
87
|
-
SECRET_SETTING_COMPOUND_SUFFIXES.some(suffix => normalized === `${prefix}${suffix}`),
|
|
88
|
-
);
|
|
78
|
+
return words.some(word => SECRET_SETTING_WORDS.has(word));
|
|
89
79
|
}
|
|
90
80
|
|
|
91
81
|
function isSecretSettingPath(path: string): boolean {
|
|
@@ -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({
|
package/src/cli-main.ts
CHANGED
|
@@ -8,19 +8,12 @@ import "@gajae-code/utils/postmortem";
|
|
|
8
8
|
import { Args, type CliConfig, Command, type CommandEntry, run } from "@gajae-code/utils/cli";
|
|
9
9
|
import { APP_NAME, formatBunRuntimeError, MIN_BUN_VERSION, VERSION } from "@gajae-code/utils/dirs";
|
|
10
10
|
import { time } from "@gajae-code/utils/logger";
|
|
11
|
-
import { runFixtureReport } from "./cli/fixture-report";
|
|
12
11
|
import { ROOT_LAUNCH_FLAGS } from "./cli/root-flags";
|
|
13
|
-
import QuickLane from "./commands/quick-lane";
|
|
14
|
-
import { runBashShellGuardian } from "./exec/bash-shell-guardian";
|
|
15
|
-
import { runBashShellSupervisor } from "./exec/bash-shell-supervisor";
|
|
16
|
-
import { runBashShellWorker } from "./exec/bash-shell-worker";
|
|
17
12
|
import {
|
|
18
13
|
BASH_SHELL_RUNTIME_ARG,
|
|
19
14
|
BASH_SHELL_SUPERVISOR_ARG,
|
|
20
15
|
BASH_SHELL_WORKER_ARG,
|
|
21
16
|
} from "./exec/bash-shell-worker-protocol";
|
|
22
|
-
import { smokeTestIsolatedShell } from "./exec/isolated-shell";
|
|
23
|
-
import { smokeTestTabWorker } from "./tools/browser/tab-worker-smoke";
|
|
24
17
|
|
|
25
18
|
if (Bun.semver.order(Bun.version, MIN_BUN_VERSION) < 0) {
|
|
26
19
|
process.stderr.write(
|
|
@@ -81,7 +74,7 @@ export const commands: CommandEntry[] = [
|
|
|
81
74
|
{ name: "plugin", load: () => import("./commands/plugin").then(m => m.default) },
|
|
82
75
|
{ name: "completion", load: () => import("./commands/completion").then(m => m.default) },
|
|
83
76
|
{ name: "launch", load: () => import("./commands/launch").then(m => m.default) },
|
|
84
|
-
{ name: "quick-lane", load:
|
|
77
|
+
{ name: "quick-lane", load: () => import("./commands/quick-lane").then(m => m.default) },
|
|
85
78
|
];
|
|
86
79
|
|
|
87
80
|
async function showHelp(config: CliConfig): Promise<void> {
|
|
@@ -346,6 +339,8 @@ async function runSmokeTest(): Promise<void> {
|
|
|
346
339
|
await smokeTestSyncWorker();
|
|
347
340
|
const { runNativeSmokeTest } = await import("./cli/native-smoke");
|
|
348
341
|
await runNativeSmokeTest();
|
|
342
|
+
const { smokeTestTabWorker } = await import("./tools/browser/tab-worker-smoke");
|
|
343
|
+
const { smokeTestIsolatedShell } = await import("./exec/isolated-shell");
|
|
349
344
|
await smokeTestTabWorker();
|
|
350
345
|
await smokeTestIsolatedShell();
|
|
351
346
|
process.stdout.write("smoke-test: ok\n");
|
|
@@ -401,14 +396,17 @@ export function routeRootArgv(argv: readonly string[]): string[] {
|
|
|
401
396
|
/** Run the CLI with the given argv (no `process.argv` prefix). */
|
|
402
397
|
export async function runCliAfterAdmission(argv: string[]): Promise<void> {
|
|
403
398
|
if (argv.length === 1 && argv[0] === BASH_SHELL_WORKER_ARG) {
|
|
399
|
+
const { runBashShellGuardian } = await import("./exec/bash-shell-guardian");
|
|
404
400
|
await runBashShellGuardian();
|
|
405
401
|
return;
|
|
406
402
|
}
|
|
407
403
|
if (argv.length === 1 && argv[0] === BASH_SHELL_SUPERVISOR_ARG) {
|
|
404
|
+
const { runBashShellSupervisor } = await import("./exec/bash-shell-supervisor");
|
|
408
405
|
await runBashShellSupervisor();
|
|
409
406
|
return;
|
|
410
407
|
}
|
|
411
408
|
if (argv.length === 1 && argv[0] === BASH_SHELL_RUNTIME_ARG) {
|
|
409
|
+
const { runBashShellWorker } = await import("./exec/bash-shell-worker");
|
|
412
410
|
await runBashShellWorker();
|
|
413
411
|
return;
|
|
414
412
|
}
|
|
@@ -478,6 +476,7 @@ export async function runCliAfterAdmission(argv: string[]): Promise<void> {
|
|
|
478
476
|
process.exitCode = 1;
|
|
479
477
|
return;
|
|
480
478
|
}
|
|
479
|
+
const { runFixtureReport } = await import("./cli/fixture-report");
|
|
481
480
|
process.exitCode = await runFixtureReport(id);
|
|
482
481
|
return;
|
|
483
482
|
}
|
|
@@ -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> {
|