@gajae-code/coding-agent 0.6.3 → 0.6.5

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +73 -1
  3. package/dist/types/cli/migrate-cli.d.ts +20 -0
  4. package/dist/types/commands/migrate.d.ts +33 -0
  5. package/dist/types/config/keybindings.d.ts +4 -0
  6. package/dist/types/config/settings-schema.d.ts +27 -0
  7. package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +2 -0
  8. package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +2 -2
  9. package/dist/types/gjc-runtime/goal-mode-request.d.ts +1 -1
  10. package/dist/types/gjc-runtime/session-layout.d.ts +59 -0
  11. package/dist/types/gjc-runtime/session-resolution.d.ts +47 -0
  12. package/dist/types/gjc-runtime/state-graph.d.ts +1 -1
  13. package/dist/types/gjc-runtime/state-runtime.d.ts +5 -4
  14. package/dist/types/gjc-runtime/state-schema.d.ts +2 -0
  15. package/dist/types/gjc-runtime/state-writer.d.ts +36 -7
  16. package/dist/types/gjc-runtime/tmux-sessions.d.ts +2 -0
  17. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +7 -4
  18. package/dist/types/gjc-runtime/workflow-command-ref.d.ts +1 -1
  19. package/dist/types/gjc-runtime/workflow-manifest.d.ts +1 -1
  20. package/dist/types/harness-control-plane/storage.d.ts +2 -1
  21. package/dist/types/hooks/skill-state.d.ts +12 -4
  22. package/dist/types/migrate/action-planner.d.ts +11 -0
  23. package/dist/types/migrate/adapters/claude-code.d.ts +2 -0
  24. package/dist/types/migrate/adapters/codex.d.ts +5 -0
  25. package/dist/types/migrate/adapters/index.d.ts +45 -0
  26. package/dist/types/migrate/adapters/opencode.d.ts +2 -0
  27. package/dist/types/migrate/executor.d.ts +2 -0
  28. package/dist/types/migrate/mcp-mapper.d.ts +20 -0
  29. package/dist/types/migrate/report.d.ts +18 -0
  30. package/dist/types/migrate/skill-normalizer.d.ts +27 -0
  31. package/dist/types/migrate/types.d.ts +126 -0
  32. package/dist/types/modes/components/custom-editor.d.ts +1 -1
  33. package/dist/types/modes/components/welcome.d.ts +3 -1
  34. package/dist/types/modes/interactive-mode.d.ts +3 -0
  35. package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -0
  36. package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +1 -1
  37. package/dist/types/research-plan/index.d.ts +1 -0
  38. package/dist/types/research-plan/ledger.d.ts +33 -0
  39. package/dist/types/rlm/artifacts.d.ts +1 -1
  40. package/dist/types/runtime-mcp/config-writer.d.ts +26 -0
  41. package/dist/types/skill-state/active-state.d.ts +6 -11
  42. package/dist/types/skill-state/canonical-skills.d.ts +3 -0
  43. package/dist/types/skill-state/workflow-hud.d.ts +2 -0
  44. package/dist/types/task/spawn-gate.d.ts +1 -10
  45. package/package.json +7 -7
  46. package/src/cli/migrate-cli.ts +106 -0
  47. package/src/cli/setup-cli.ts +14 -1
  48. package/src/cli.ts +1 -0
  49. package/src/commands/deep-interview.ts +2 -2
  50. package/src/commands/launch.ts +1 -1
  51. package/src/commands/migrate.ts +46 -0
  52. package/src/commands/state.ts +2 -1
  53. package/src/commands/team.ts +7 -3
  54. package/src/config/model-registry.ts +9 -2
  55. package/src/config/model-resolver.ts +13 -2
  56. package/src/config/settings-schema.ts +17 -0
  57. package/src/coordinator-mcp/policy.ts +10 -2
  58. package/src/defaults/gjc/extensions/grok-cli-vendor/biome.json +0 -1
  59. package/src/defaults/gjc/skills/deep-interview/SKILL.md +28 -24
  60. package/src/defaults/gjc/skills/ralplan/SKILL.md +8 -4
  61. package/src/defaults/gjc/skills/team/SKILL.md +51 -47
  62. package/src/defaults/gjc/skills/ultragoal/SKILL.md +17 -13
  63. package/src/exec/bash-executor.ts +3 -1
  64. package/src/extensibility/custom-commands/loader.ts +0 -7
  65. package/src/extensibility/gjc-plugins/injection.ts +23 -4
  66. package/src/extensibility/gjc-plugins/state.ts +16 -1
  67. package/src/gjc-runtime/deep-interview-recorder.ts +43 -18
  68. package/src/gjc-runtime/deep-interview-runtime.ts +49 -23
  69. package/src/gjc-runtime/goal-mode-request.ts +26 -11
  70. package/src/gjc-runtime/launch-tmux.ts +68 -15
  71. package/src/gjc-runtime/ralplan-runtime.ts +79 -50
  72. package/src/gjc-runtime/session-layout.ts +180 -0
  73. package/src/gjc-runtime/session-resolution.ts +217 -0
  74. package/src/gjc-runtime/state-graph.ts +1 -2
  75. package/src/gjc-runtime/state-migrations.ts +1 -0
  76. package/src/gjc-runtime/state-runtime.ts +230 -121
  77. package/src/gjc-runtime/state-schema.ts +2 -0
  78. package/src/gjc-runtime/state-writer.ts +289 -41
  79. package/src/gjc-runtime/team-runtime.ts +43 -19
  80. package/src/gjc-runtime/tmux-sessions.ts +43 -2
  81. package/src/gjc-runtime/ultragoal-guard.ts +45 -2
  82. package/src/gjc-runtime/ultragoal-runtime.ts +121 -41
  83. package/src/gjc-runtime/workflow-command-ref.ts +1 -2
  84. package/src/gjc-runtime/workflow-manifest.ts +1 -2
  85. package/src/harness-control-plane/storage.ts +14 -4
  86. package/src/hooks/native-skill-hook.ts +38 -12
  87. package/src/hooks/skill-state.ts +178 -83
  88. package/src/internal-urls/docs-index.generated.ts +9 -6
  89. package/src/migrate/action-planner.ts +318 -0
  90. package/src/migrate/adapters/claude-code.ts +39 -0
  91. package/src/migrate/adapters/codex.ts +70 -0
  92. package/src/migrate/adapters/index.ts +277 -0
  93. package/src/migrate/adapters/opencode.ts +52 -0
  94. package/src/migrate/executor.ts +81 -0
  95. package/src/migrate/mcp-mapper.ts +152 -0
  96. package/src/migrate/report.ts +104 -0
  97. package/src/migrate/skill-normalizer.ts +80 -0
  98. package/src/migrate/types.ts +163 -0
  99. package/src/modes/bridge/bridge-mode.ts +2 -2
  100. package/src/modes/components/custom-editor.ts +30 -20
  101. package/src/modes/components/welcome.ts +42 -9
  102. package/src/modes/controllers/input-controller.ts +21 -3
  103. package/src/modes/interactive-mode.ts +22 -1
  104. package/src/modes/prompt-action-autocomplete.ts +11 -1
  105. package/src/modes/rpc/rpc-mode.ts +2 -2
  106. package/src/modes/shared/agent-wire/unattended-audit.ts +3 -2
  107. package/src/prompts/agents/init.md +1 -1
  108. package/src/prompts/system/plan-mode-active.md +1 -1
  109. package/src/prompts/tools/ast-grep.md +1 -1
  110. package/src/prompts/tools/search.md +1 -1
  111. package/src/prompts/tools/task.md +1 -2
  112. package/src/research-plan/index.ts +1 -0
  113. package/src/research-plan/ledger.ts +177 -0
  114. package/src/rlm/artifacts.ts +12 -3
  115. package/src/rlm/index.ts +7 -0
  116. package/src/runtime-mcp/config-writer.ts +46 -0
  117. package/src/session/agent-session.ts +15 -21
  118. package/src/session/session-manager.ts +19 -2
  119. package/src/setup/hermes/templates/operator-instructions.v1.md +8 -0
  120. package/src/setup/hermes-setup.ts +1 -1
  121. package/src/skill-state/active-state.ts +72 -108
  122. package/src/skill-state/canonical-skills.ts +4 -0
  123. package/src/skill-state/deep-interview-mutation-guard.ts +28 -109
  124. package/src/skill-state/workflow-hud.ts +4 -2
  125. package/src/skill-state/workflow-state-contract.ts +3 -3
  126. package/src/slash-commands/builtin-registry.ts +8 -4
  127. package/src/system-prompt.ts +11 -9
  128. package/src/task/agents.ts +1 -22
  129. package/src/task/index.ts +1 -41
  130. package/src/task/spawn-gate.ts +1 -38
  131. package/src/task/types.ts +1 -1
  132. package/src/tools/ask.ts +34 -12
  133. package/src/tools/computer.ts +58 -4
  134. package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +0 -10
  135. package/src/extensibility/custom-commands/bundled/review/index.ts +0 -456
  136. package/src/prompts/agents/explore.md +0 -58
  137. package/src/prompts/agents/plan.md +0 -49
  138. package/src/prompts/agents/reviewer.md +0 -141
  139. package/src/prompts/agents/task.md +0 -16
  140. package/src/prompts/review-request.md +0 -70
@@ -1,7 +1,9 @@
1
1
  import type { SkillDiscoverySettings } from "../config/skill-settings-defaults";
2
2
  import { type SkillActiveState } from "../skill-state/active-state";
3
+ import { initialPhaseForSkill } from "../skill-state/initial-phase";
4
+ export { initialPhaseForSkill };
3
5
  import { type GjcWorkflowSkill } from "./skill-keywords";
4
- export declare const GJC_STATE_DIR = ".gjc/state";
6
+ export declare const GJC_STATE_DIR = ".gjc";
5
7
  export declare const SKILL_ACTIVE_STATE_FILE = "skill-active-state.json";
6
8
  export interface EffectiveSkillConfigInput {
7
9
  skillsSettings?: SkillDiscoverySettings;
@@ -55,9 +57,15 @@ export interface UserPromptSubmitStateInput {
55
57
  export declare function detectSkillKeywords(text: string): SkillKeywordMatch[];
56
58
  export declare function detectPrimarySkillKeyword(text: string): SkillKeywordMatch | null;
57
59
  export declare function resolveGjcStateDir(cwd: string, stateDir?: string): string;
58
- import { initialPhaseForSkill } from "../skill-state/initial-phase";
59
- export { initialPhaseForSkill };
60
- export declare function readVisibleSkillActiveState(cwd: string, sessionId?: string, stateDir?: string): Promise<SkillActiveState | null>;
60
+ export interface StateRecoveryDiagnostic {
61
+ kind: "skill-active-state" | "mode-state";
62
+ statePath: string;
63
+ reason: "missing" | "corrupt" | "unreadable";
64
+ skill?: GjcWorkflowSkill;
65
+ }
66
+ export declare function buildStateRecoveryDiagnosticsContext(diagnostics: readonly StateRecoveryDiagnostic[]): string | null;
67
+ export declare function collectUserPromptStateRecoveryDiagnostics(input: UserPromptSubmitStateInput): Promise<StateRecoveryDiagnostic[]>;
68
+ export declare function readVisibleSkillActiveState(cwd: string, sessionId?: string, _stateDir?: string): Promise<SkillActiveState | null>;
61
69
  export declare function recordSkillActivation(input: RecordSkillActivationInput): Promise<SkillActiveState | null>;
62
70
  export interface EnsureWorkflowSkillActivationInput {
63
71
  cwd: string;
@@ -0,0 +1,11 @@
1
+ import type { AdapterResult, MigrateAction, MigrateDestinations, MigrateWarning } from "./types";
2
+ export interface PlanInput {
3
+ results: AdapterResult[];
4
+ destinations: MigrateDestinations;
5
+ force: boolean;
6
+ }
7
+ export interface PlanOutput {
8
+ actions: MigrateAction[];
9
+ warnings: MigrateWarning[];
10
+ }
11
+ export declare function planMigration(input: PlanInput): Promise<PlanOutput>;
@@ -0,0 +1,2 @@
1
+ import { type Adapter } from "./index";
2
+ export declare const claudeCodeAdapter: Adapter;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Codex adapter: reads `~/.codex/config.toml` ([mcp_servers]) and `~/.codex/prompts`.
3
+ */
4
+ import { type Adapter } from "./index";
5
+ export declare const codexAdapter: Adapter;
@@ -0,0 +1,45 @@
1
+ import type { AdapterResult, MigrateSource, SkillCandidate, SourceDiagnostic } from "../types";
2
+ export interface AdapterOptions {
3
+ /** Home directory root; overridable for tests. */
4
+ homeDir: string;
5
+ }
6
+ export interface Adapter {
7
+ source: MigrateSource;
8
+ collect(options: AdapterOptions): Promise<AdapterResult>;
9
+ }
10
+ export declare function getAdapter(source: MigrateSource): Adapter;
11
+ /** Read a text file, classifying absence/IO errors into source diagnostics. */
12
+ export declare function readSourceText(filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): Promise<{
13
+ text: string;
14
+ } | {
15
+ diagnostic: SourceDiagnostic;
16
+ }>;
17
+ /** Parse JSON text, classifying parse errors into a `failed_invalid_source` diagnostic. */
18
+ export declare function parseSourceJson(text: string, filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): {
19
+ data: Record<string, unknown>;
20
+ } | {
21
+ diagnostic: SourceDiagnostic;
22
+ };
23
+ /**
24
+ * Collect skill candidates from a directory of `<name>/SKILL.md` entries.
25
+ * A missing directory yields a `skipped_absent_source` diagnostic.
26
+ */
27
+ export declare function collectSkillDir(dir: string, source: MigrateSource): Promise<{
28
+ candidates: SkillCandidate[];
29
+ diagnostics: SourceDiagnostic[];
30
+ }>;
31
+ /**
32
+ * Collect skill candidates from a flat directory of `*.md` prompt/command files.
33
+ */
34
+ export declare function collectMarkdownPrompts(dir: string, source: MigrateSource): Promise<{
35
+ candidates: SkillCandidate[];
36
+ diagnostics: SourceDiagnostic[];
37
+ }>;
38
+ /**
39
+ * Recursively collect skill candidates from any `**​/SKILL.md` under `root`.
40
+ * The slug derives from the directory that directly contains the `SKILL.md`.
41
+ */
42
+ export declare function collectSkillTree(root: string, source: MigrateSource): Promise<{
43
+ candidates: SkillCandidate[];
44
+ diagnostics: SourceDiagnostic[];
45
+ }>;
@@ -0,0 +1,2 @@
1
+ import { type Adapter } from "./index";
2
+ export declare const opencodeAdapter: Adapter;
@@ -0,0 +1,2 @@
1
+ import type { MigrateAction } from "./types";
2
+ export declare function executeActions(actions: MigrateAction[]): Promise<MigrateAction[]>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Map raw source MCP server entries onto GJC `MCPServerConfig`.
3
+ *
4
+ * Implements the source-schema compatibility matrix from the consensus plan:
5
+ * preserved (P), transformed (T), omitted-with-warning (OW), skipped (S,
6
+ * `skipped_unmappable`), and failed (F, `failed_invalid_source`). Secret-indirection
7
+ * fields are always omitted-with-warning; their values are never read or emitted.
8
+ */
9
+ import type { MCPServerConfig } from "../runtime-mcp/types";
10
+ import type { MigrateSource } from "./types";
11
+ export type McpMapOutcome = {
12
+ ok: true;
13
+ config: MCPServerConfig;
14
+ warnings: string[];
15
+ } | {
16
+ ok: false;
17
+ status: "skipped_unmappable" | "failed_invalid_source";
18
+ reason: string;
19
+ };
20
+ export declare function mapMcpEntry(source: MigrateSource, name: string, raw: unknown): McpMapOutcome;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Build the human-readable and `--json` reports for `gjc migrate`.
3
+ *
4
+ * Secret values are never read upstream, so the report only ever contains field
5
+ * names in warnings — but rendering still treats action/warning text as opaque.
6
+ */
7
+ import { type MigrateAction, type MigrateDestinations, type MigrateReport, type MigrateSource, type MigrateWarning } from "./types";
8
+ export interface BuildReportInput {
9
+ actions: MigrateAction[];
10
+ warnings: MigrateWarning[];
11
+ sources: MigrateSource[];
12
+ destinations: MigrateDestinations;
13
+ dryRun: boolean;
14
+ project: boolean;
15
+ force: boolean;
16
+ }
17
+ export declare function buildReport(input: BuildReportInput): MigrateReport;
18
+ export declare function renderHuman(report: MigrateReport): string;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Normalize a skill from another agent into a native GJC `SKILL.md`.
3
+ *
4
+ * GJC derives a skill's loaded name from its directory (`<slug>/SKILL.md`) when no
5
+ * frontmatter `name` is present, and requires a `description`. To guarantee the
6
+ * effective loaded name equals the lowercase-hyphen slug, we drop any frontmatter
7
+ * `name` and place the file at `<slug>/SKILL.md`, synthesizing a `description`
8
+ * when the source lacks one.
9
+ */
10
+ export interface NormalizeSkillInput {
11
+ /** Raw name from the source (filename stem, frontmatter name, etc.). */
12
+ rawName: string;
13
+ /** Full source markdown (may or may not have frontmatter). */
14
+ content: string;
15
+ }
16
+ export interface NormalizedSkill {
17
+ slug: string;
18
+ content: string;
19
+ warnings: string[];
20
+ }
21
+ /** Convert an arbitrary name into a lowercase-hyphen slug. */
22
+ export declare function slugify(name: string): string;
23
+ /**
24
+ * Produce a `{ slug, content }` pair whose effective GJC-loaded name equals `slug`.
25
+ * Throws only on an unusable name (cannot produce a slug).
26
+ */
27
+ export declare function normalizeSkill(input: NormalizeSkillInput): NormalizedSkill;
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Shared types for `gjc migrate`.
3
+ *
4
+ * Imports MCP servers and skills from other coding agents (Claude Code, Codex,
5
+ * OpenCode) into native GJC config. See the consensus plan under
6
+ * `.gjc/plans/ralplan/` for the full taxonomy and force/collision semantics.
7
+ */
8
+ import type { MCPServerConfig } from "../runtime-mcp/types";
9
+ /** Supported migration sources. */
10
+ export type MigrateSource = "claude-code" | "codex" | "opencode";
11
+ export declare const MIGRATE_SOURCES: readonly MigrateSource[];
12
+ /** Canonical, deterministic ordering used when expanding `--from all` / repeated `--from`. */
13
+ export declare const CANONICAL_SOURCE_ORDER: readonly MigrateSource[];
14
+ /** What kind of thing an action/coverage row is about. */
15
+ export type MigrateItemType = "mcp" | "skill" | "source";
16
+ /**
17
+ * Per-item outcome taxonomy.
18
+ *
19
+ * `skipped_*` outcomes are non-fatal (exit 0). Any `failed_*` outcome sets
20
+ * `ok=false` and a non-zero process exit code.
21
+ */
22
+ export type MigrationStatus = "imported" | "updated" | "skipped_exists" | "skipped_absent_source" | "skipped_unmappable" | "failed_invalid_source" | "failed_invalid_destination" | "failed_io";
23
+ export declare const MIGRATION_STATUSES: readonly MigrationStatus[];
24
+ /** Statuses that represent a hard failure (drive `ok=false` + non-zero exit). */
25
+ export declare const FAILURE_STATUSES: ReadonlySet<MigrationStatus>;
26
+ export declare function isFailureStatus(status: MigrationStatus): boolean;
27
+ /** Operation the planner decided for an item. */
28
+ export type MigrateOperation = "create" | "update" | "skip" | "fail";
29
+ /** A raw MCP server candidate parsed from a source, before mapping/destination planning. */
30
+ export interface McpCandidate {
31
+ source: MigrateSource;
32
+ name: string;
33
+ /** The raw, unmapped server entry from the source config (mapped by the planner). */
34
+ raw: unknown;
35
+ }
36
+ /** A raw skill candidate parsed from a source, before normalization/destination planning. */
37
+ export interface SkillCandidate {
38
+ source: MigrateSource;
39
+ /** Slug used as the destination directory and effective loaded name. */
40
+ slug: string;
41
+ /** Full SKILL.md content (frontmatter already normalized so loaded name == slug). */
42
+ content: string;
43
+ warnings: string[];
44
+ }
45
+ /**
46
+ * Source-level diagnostic for a single source/type pair (e.g. "codex mcp config
47
+ * was malformed"). Distinct from per-item actions so absent/unreadable sources
48
+ * are reported once instead of per item.
49
+ */
50
+ export interface SourceDiagnostic {
51
+ source: MigrateSource;
52
+ type: Exclude<MigrateItemType, "source"> | "source";
53
+ status: Extract<MigrationStatus, "skipped_absent_source" | "failed_invalid_source" | "failed_io">;
54
+ message: string;
55
+ }
56
+ /** Normalized candidates + diagnostics returned by an adapter. */
57
+ export interface AdapterResult {
58
+ mcpCandidates: McpCandidate[];
59
+ skillCandidates: SkillCandidate[];
60
+ diagnostics: SourceDiagnostic[];
61
+ }
62
+ /** A single planned action consumed identically by dry-run and live execution. */
63
+ export interface MigrateAction {
64
+ source: MigrateSource;
65
+ type: MigrateItemType;
66
+ name?: string;
67
+ /** For skills: the effective GJC-loaded name (== slug). */
68
+ effectiveName?: string;
69
+ /** Absolute destination path (mcp.json for MCP, <skillsDir>/<slug>/SKILL.md for skills). */
70
+ destination?: string;
71
+ operation: MigrateOperation;
72
+ status: MigrationStatus;
73
+ reason?: string;
74
+ warnings?: string[];
75
+ /** Resolved payload the executor needs; never serialized to the report. */
76
+ mcp?: {
77
+ config: MCPServerConfig;
78
+ force: boolean;
79
+ };
80
+ skill?: {
81
+ content: string;
82
+ };
83
+ }
84
+ export interface MigrateWarning {
85
+ source: MigrateSource;
86
+ type: string;
87
+ name?: string;
88
+ message: string;
89
+ }
90
+ export type StatusCounts = Record<MigrationStatus, number>;
91
+ export interface MigrateDestinations {
92
+ mcpConfigPath: string;
93
+ skillsDir: string;
94
+ }
95
+ /** The full machine-readable report emitted with `--json`. */
96
+ export interface MigrateReport {
97
+ ok: boolean;
98
+ dryRun: boolean;
99
+ project: boolean;
100
+ force: boolean;
101
+ sources: MigrateSource[];
102
+ destinations: MigrateDestinations;
103
+ summary: {
104
+ total: StatusCounts;
105
+ byType: {
106
+ mcp: StatusCounts;
107
+ skill: StatusCounts;
108
+ source: StatusCounts;
109
+ };
110
+ bySource: Record<MigrateSource, StatusCounts>;
111
+ };
112
+ actions: Array<{
113
+ source: MigrateSource;
114
+ type: MigrateItemType;
115
+ name?: string;
116
+ effectiveName?: string;
117
+ destination?: string;
118
+ operation: MigrateOperation;
119
+ status: MigrationStatus;
120
+ reason?: string;
121
+ warnings?: string[];
122
+ }>;
123
+ warnings: MigrateWarning[];
124
+ }
125
+ /** Create a zeroed status-count record. */
126
+ export declare function emptyStatusCounts(): StatusCounts;
@@ -1,5 +1,5 @@
1
1
  import { Editor, type KeyId } from "@gajae-code/tui";
2
- import type { AppKeybinding } from "../../config/keybindings";
2
+ import { type AppKeybinding } from "../../config/keybindings";
3
3
  type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "app.model.cycleForward" | "app.model.cycleBackward" | "app.model.select" | "app.model.selectTemporary" | "app.tools.expand" | "app.thinking.toggle" | "app.editor.external" | "app.history.search" | "app.message.dequeue" | "app.message.queue" | "app.clipboard.pasteImage" | "app.clipboard.copyPrompt">;
4
4
  type PastePendingClearReason = "timeout" | "queue-limit";
5
5
  /**
@@ -8,6 +8,7 @@ export interface LspServerInfo {
8
8
  status: "ready" | "error" | "connecting";
9
9
  fileTypes: string[];
10
10
  }
11
+ export type WelcomeLogoMode = "unicode" | "square" | "ascii";
11
12
  /**
12
13
  * GJC-native launch surface with compact command affordances, project
13
14
  * signals, and a claw/talon mark without copying another agent shell.
@@ -19,7 +20,8 @@ export declare class WelcomeComponent implements Component {
19
20
  private providerName;
20
21
  private recentSessions;
21
22
  private lspServers;
22
- constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[]);
23
+ private readonly logoMode;
24
+ constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[], logoMode?: WelcomeLogoMode);
23
25
  invalidate(): void;
24
26
  /**
25
27
  * Play a one-shot intro that sweeps the gradient through every phase
@@ -23,9 +23,12 @@ import type { HookInputComponent } from "./components/hook-input";
23
23
  import type { HookSelectorComponent } from "./components/hook-selector";
24
24
  import { StatusLineComponent } from "./components/status-line";
25
25
  import type { ToolExecutionHandle } from "./components/tool-execution";
26
+ import { type WelcomeLogoMode } from "./components/welcome";
26
27
  import { OAuthManualInputManager } from "./oauth-manual-input";
27
28
  import type { Theme } from "./theme/theme";
28
29
  import type { CompactionQueuedMessage, InteractiveModeContext, SubmittedUserInput, TodoItem, TodoPhase } from "./types";
30
+ export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
31
+ export declare function resolveWelcomeLogoMode(mode: WelcomeBannerSettingMode, env?: Record<string, string | undefined>, platform?: NodeJS.Platform): WelcomeLogoMode;
29
32
  /** Options for creating an InteractiveMode instance (for future API use) */
30
33
  export interface InteractiveModeOptions {
31
34
  /** Providers that were migrated during startup */
@@ -13,6 +13,7 @@ interface PromptActionAutocompleteOptions {
13
13
  keybindings: KeybindingsManager;
14
14
  copyCurrentLine: () => void;
15
15
  copyPrompt: () => void;
16
+ pasteImage: () => void;
16
17
  undo: (prefix: string) => void;
17
18
  moveCursorToMessageEnd: () => void;
18
19
  moveCursorToMessageStart: () => void;
@@ -41,7 +41,7 @@ export interface AuditLogOptions {
41
41
  now?(): number;
42
42
  nextId?(): string;
43
43
  }
44
- export declare function defaultAuditPath(runId: string, root?: string): string;
44
+ export declare function defaultAuditPath(runId: string, root?: string, gjcSessionId?: string): string;
45
45
  /** Append-only audit log writer + reader for one unattended run. */
46
46
  export declare class UnattendedAuditLog {
47
47
  private readonly filePath;
@@ -0,0 +1 @@
1
+ export * from "./ledger";
@@ -0,0 +1,33 @@
1
+ export type ResearchPlanConfidence = "low" | "medium" | "high";
2
+ export type ResearchEvidenceVerdict = "support" | "contradict" | "uncertain";
3
+ export interface ResearchPlanItem {
4
+ claim: string;
5
+ confidence: ResearchPlanConfidence;
6
+ unknowns: string[];
7
+ evidenceNeeded: string[];
8
+ counterexampleQueries: string[];
9
+ sourceConflictPolicy: string;
10
+ dropCondition: string;
11
+ verifierChecks: string[];
12
+ }
13
+ export interface ResearchEvidenceEntry {
14
+ claim: string;
15
+ source: string;
16
+ confidence: ResearchPlanConfidence;
17
+ verdict: ResearchEvidenceVerdict;
18
+ notes?: string;
19
+ }
20
+ export interface ResearchLedgerVerdict {
21
+ claim: string;
22
+ finalVerdict: "accepted" | "rejected" | "uncertain";
23
+ survivingSources: ResearchEvidenceEntry[];
24
+ rejectReason?: string;
25
+ unresolvedUnknowns: string[];
26
+ }
27
+ export interface ResearchPlanValidationResult {
28
+ valid: boolean;
29
+ errors: string[];
30
+ }
31
+ export declare function validateResearchPlanItem(item: Partial<ResearchPlanItem>): ResearchPlanValidationResult;
32
+ export declare function validateResearchEvidenceEntry(entry: Partial<ResearchEvidenceEntry>): ResearchPlanValidationResult;
33
+ export declare function evaluateResearchLedger(item: ResearchPlanItem, evidence: readonly ResearchEvidenceEntry[]): ResearchLedgerVerdict;
@@ -1,5 +1,5 @@
1
1
  import type { RlmArtifactPaths } from "./types";
2
- export declare const RLM_DIR_SEGMENT: string;
2
+ export declare const RLM_DIR_SEGMENT = "rlm";
3
3
  export declare function isValidRlmSessionId(sessionId: string): boolean;
4
4
  /** Generate a filesystem-safe, sortable session id (timestamp + random suffix). */
5
5
  export declare function generateRlmSessionId(now?: Date): string;
@@ -28,6 +28,32 @@ export declare function addMCPServer(filePath: string, name: string, config: MCP
28
28
  * @throws Error if validation fails
29
29
  */
30
30
  export declare function updateMCPServer(filePath: string, name: string, config: MCPServerConfig): Promise<void>;
31
+ /**
32
+ * Result of an {@link upsertMCPServer} call.
33
+ * - `added`: server did not exist and was written.
34
+ * - `updated`: server existed and was overwritten because `force` was set.
35
+ * - `skipped`: server existed and `force` was not set, so nothing was written.
36
+ */
37
+ export type UpsertMCPServerResult = {
38
+ status: "added";
39
+ } | {
40
+ status: "updated";
41
+ } | {
42
+ status: "skipped";
43
+ reason: "exists";
44
+ };
45
+ /**
46
+ * Add an MCP server, or overwrite an existing one only when `force` is set.
47
+ *
48
+ * Collision-aware wrapper over {@link addMCPServer} / {@link updateMCPServer} used by
49
+ * `gjc migrate`. Never connects to the server. Reuses the underlying writers so the
50
+ * rest of the config file (including `disabledServers`) is preserved on update.
51
+ *
52
+ * @throws Error if the server name or config is invalid (validated before any write).
53
+ */
54
+ export declare function upsertMCPServer(filePath: string, name: string, config: MCPServerConfig, options?: {
55
+ force?: boolean;
56
+ }): Promise<UpsertMCPServerResult>;
31
57
  /**
32
58
  * Remove an MCP server from a config file.
33
59
  *
@@ -1,7 +1,7 @@
1
+ import { CANONICAL_GJC_WORKFLOW_SKILLS, type CanonicalGjcWorkflowSkill } from "./canonical-skills";
1
2
  import type { WorkflowStateReceipt } from "./workflow-state-contract";
2
3
  export declare const SKILL_ACTIVE_STATE_FILE = "skill-active-state.json";
3
- export declare const CANONICAL_GJC_WORKFLOW_SKILLS: readonly ["deep-interview", "ralplan", "ultragoal", "team"];
4
- export type CanonicalGjcWorkflowSkill = (typeof CANONICAL_GJC_WORKFLOW_SKILLS)[number];
4
+ export { CANONICAL_GJC_WORKFLOW_SKILLS, type CanonicalGjcWorkflowSkill };
5
5
  export type WorkflowHudSeverity = "info" | "warning" | "blocked" | "error" | "success";
6
6
  export interface WorkflowHudChip {
7
7
  label: string;
@@ -44,6 +44,7 @@ export interface SkillActiveEntry {
44
44
  handoff_to?: string;
45
45
  handoff_at?: string;
46
46
  active_subskills?: ActiveSubskillEntry[];
47
+ source_state_revision?: number;
47
48
  }
48
49
  export interface SkillActiveState {
49
50
  version?: number;
@@ -65,7 +66,7 @@ export interface SkillActiveState {
65
66
  }
66
67
  export interface SkillActiveStatePaths {
67
68
  rootPath: string;
68
- sessionPath?: string;
69
+ sessionPath: string;
69
70
  }
70
71
  export interface SyncSkillActiveStateOptions {
71
72
  cwd: string;
@@ -83,6 +84,7 @@ export interface SyncSkillActiveStateOptions {
83
84
  handoff_to?: string;
84
85
  handoff_at?: string;
85
86
  active_subskills?: ActiveSubskillEntry[];
87
+ sourceRevision?: number;
86
88
  }
87
89
  export declare function normalizeWorkflowHudSummary(raw: unknown): WorkflowHudSummary | undefined;
88
90
  export declare function isCanonicalGjcWorkflowSkill(skill: string): skill is CanonicalGjcWorkflowSkill;
@@ -102,13 +104,6 @@ export interface ApplyHandoffOptions {
102
104
  strict?: boolean;
103
105
  }
104
106
  /**
105
- * Atomically apply a workflow-skill handoff to both the session-scoped and
106
- * root `skill-active-state.json` files in a single write per file.
107
- *
108
- * Write order: **session first, root last**. The session file is the
109
- * source of truth for HUD; the root aggregate must never lead the session
110
- * during a handoff window. Each file is rewritten once with caller demoted
111
- * to `active:false` (preserving `handoff_to`/`handoff_at` lineage) and
112
- * callee promoted to `active:true` (with `handoff_from`/`handoff_at`).
107
+ * Atomically apply a workflow-skill handoff to the session-scoped active state.
113
108
  */
114
109
  export declare function applyHandoffToActiveState(options: ApplyHandoffOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ /** Native-free canonical GJC workflow skill identifiers. */
2
+ export declare const CANONICAL_GJC_WORKFLOW_SKILLS: readonly ["deep-interview", "ralplan", "ultragoal", "team"];
3
+ export type CanonicalGjcWorkflowSkill = (typeof CANONICAL_GJC_WORKFLOW_SKILLS)[number];
@@ -39,6 +39,8 @@ interface UltragoalHudState extends WorkflowGateHudState {
39
39
  event?: string;
40
40
  goalId?: string;
41
41
  timestamp?: string;
42
+ kind?: string;
43
+ evidence?: string;
42
44
  };
43
45
  updatedAt?: string;
44
46
  }
@@ -1,6 +1,6 @@
1
1
  /** The hard, locked batch threshold enforced by the runtime gate. */
2
2
  export declare const DEFAULT_SPAWN_THRESHOLD = 4;
3
- /** The justification a large batch or reviewer-spawned explorer must supply to pass the hard gate. */
3
+ /** The justification a large batch must supply to pass the hard gate. */
4
4
  export interface SpawnPlanReceipt {
5
5
  whyParallel: string;
6
6
  whyNotLocal: string;
@@ -14,14 +14,6 @@ export interface SpawnGateRequest {
14
14
  /** The spawn-plan receipt, when provided. */
15
15
  plan?: SpawnPlanReceipt;
16
16
  }
17
- export interface ReviewerExploreGateRequest {
18
- /** Agent type/name doing the spawning, when known. */
19
- spawningAgentType?: string | null;
20
- /** Target agent type/name requested by the task call. */
21
- targetAgent: string;
22
- /** The spawn-plan receipt, when provided. */
23
- plan?: SpawnPlanReceipt;
24
- }
25
17
  export type SpawnGateOutcome = "allowed" | "rejected";
26
18
  export interface SpawnGateDecision {
27
19
  outcome: SpawnGateOutcome;
@@ -35,4 +27,3 @@ export interface SpawnGateDecision {
35
27
  export declare function findMissingPlanFields(plan: SpawnPlanReceipt | undefined): string[];
36
28
  export declare function decide(childCount: number, threshold: number, plan: SpawnPlanReceipt | undefined): SpawnGateDecision;
37
29
  export declare function evaluateSpawnGate(request: SpawnGateRequest): SpawnGateDecision;
38
- export declare function evaluateReviewerExploreGate(request: ReviewerExploreGateRequest): SpawnGateDecision;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/coding-agent",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "Gajae Code CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://gaebal-gajae.dev",
7
7
  "author": "Yeachan-Heo",
@@ -51,12 +51,12 @@
51
51
  "@agentclientprotocol/sdk": "0.21.0",
52
52
  "@babel/parser": "^7.29.3",
53
53
  "@mozilla/readability": "^0.6.0",
54
- "@gajae-code/stats": "0.6.3",
55
- "@gajae-code/agent-core": "0.6.3",
56
- "@gajae-code/ai": "0.6.3",
57
- "@gajae-code/natives": "0.6.3",
58
- "@gajae-code/tui": "0.6.3",
59
- "@gajae-code/utils": "0.6.3",
54
+ "@gajae-code/stats": "0.6.5",
55
+ "@gajae-code/agent-core": "0.6.5",
56
+ "@gajae-code/ai": "0.6.5",
57
+ "@gajae-code/natives": "0.6.5",
58
+ "@gajae-code/tui": "0.6.5",
59
+ "@gajae-code/utils": "0.6.5",
60
60
  "@puppeteer/browsers": "^2.13.0",
61
61
  "@types/turndown": "5.0.6",
62
62
  "@xterm/headless": "^6.0.0",