@gajae-code/coding-agent 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/types/config/autorouting-contract.d.ts +4 -4
  3. package/dist/types/config/autorouting-tier-map.d.ts +1 -1
  4. package/dist/types/config/keybindings.d.ts +1 -5
  5. package/dist/types/config/model-profile-activation.d.ts +30 -3
  6. package/dist/types/config/model-registry.d.ts +2 -0
  7. package/dist/types/config/models-config-schema.d.ts +8 -0
  8. package/dist/types/config/settings-schema.d.ts +7 -3
  9. package/dist/types/coordinator-mcp/canonical-json.d.ts +7 -0
  10. package/dist/types/extensibility/gjc-plugins/metadata.d.ts +1 -1
  11. package/dist/types/harness-control-plane/receipts.d.ts +1 -1
  12. package/dist/types/modes/components/settings-selector.d.ts +5 -2
  13. package/dist/types/modes/controllers/command-controller.d.ts +1 -1
  14. package/dist/types/modes/controllers/input-controller.d.ts +12 -0
  15. package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
  16. package/dist/types/modes/interactive-mode.d.ts +1 -1
  17. package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +1 -1
  18. package/dist/types/modes/types.d.ts +1 -1
  19. package/dist/types/session/agent-session.d.ts +101 -6
  20. package/dist/types/session/session-manager.d.ts +124 -9
  21. package/dist/types/setup/provider-onboarding.d.ts +55 -2
  22. package/dist/types/slash-commands/builtin-registry.d.ts +11 -0
  23. package/dist/types/utils/clipboard.d.ts +18 -0
  24. package/dist/types/utils/pasted-image-path.d.ts +2 -0
  25. package/dist/types/web/search/providers/keenable.d.ts +30 -0
  26. package/dist/types/web/search/types.d.ts +2 -2
  27. package/package.json +7 -7
  28. package/scripts/generate-sdk-operation-inventory.ts +28 -0
  29. package/src/cli/doctor/config-repairs.ts +1 -4
  30. package/src/cli/local-provider-smoke.ts +1 -4
  31. package/src/cli/public-command-help.ts +1 -1
  32. package/src/config/autorouting-contract.ts +5 -8
  33. package/src/config/autorouting-tier-map.ts +1 -1
  34. package/src/config/keybindings.ts +1 -2
  35. package/src/config/model-profile-activation.ts +332 -28
  36. package/src/config/model-registry.ts +156 -8
  37. package/src/config/models-config-schema.ts +27 -0
  38. package/src/config/settings-schema.ts +6 -0
  39. package/src/coordinator-mcp/canonical-json.ts +15 -0
  40. package/src/coordinator-mcp/policy.ts +1 -0
  41. package/src/coordinator-mcp/question-gate-codec.ts +1 -2
  42. package/src/coordinator-mcp/question-state.ts +2 -12
  43. package/src/coordinator-mcp/server.ts +1 -10
  44. package/src/customization/import.ts +1 -5
  45. package/src/discovery/mcp-compat.ts +1 -5
  46. package/src/discovery/mcp-json.ts +1 -4
  47. package/src/edit/notebook.ts +1 -5
  48. package/src/extensibility/gjc-plugins/lifecycle.ts +1 -3
  49. package/src/extensibility/gjc-plugins/metadata.ts +2 -5
  50. package/src/extensibility/gjc-plugins/schema.ts +1 -4
  51. package/src/gjc-runtime/deep-interview-crystallize.ts +1 -4
  52. package/src/gjc-runtime/deep-interview-runtime.ts +1 -4
  53. package/src/gjc-runtime/state-renderer.ts +1 -5
  54. package/src/gjc-runtime/tmux-owner-isolation.ts +1 -3
  55. package/src/gjc-runtime/ultragoal-owner-loss-recovery.ts +1 -4
  56. package/src/gjc-runtime/ultragoal-succession.ts +1 -4
  57. package/src/goals/continuation-timeout-guard.ts +1 -4
  58. package/src/harness-control-plane/receipts.ts +1 -1
  59. package/src/internal-urls/docs-index.generated.ts +4 -4
  60. package/src/migrate/mcp-mapper.ts +2 -4
  61. package/src/modes/components/hook-editor.ts +4 -8
  62. package/src/modes/components/hook-selector.ts +3 -1
  63. package/src/modes/components/settings-selector.ts +26 -2
  64. package/src/modes/controllers/command-controller.ts +4 -98
  65. package/src/modes/controllers/extension-ui-controller.ts +6 -14
  66. package/src/modes/controllers/goal-mode-controller.ts +4 -4
  67. package/src/modes/controllers/input-controller.ts +110 -46
  68. package/src/modes/controllers/plan-mode-controller.ts +6 -10
  69. package/src/modes/controllers/selector-controller.ts +66 -23
  70. package/src/modes/controllers/todo-command-controller.ts +2 -2
  71. package/src/modes/interactive-mode.ts +2 -2
  72. package/src/modes/prompt-action-autocomplete.ts +1 -1
  73. package/src/modes/runtime-init.ts +4 -4
  74. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +1 -1
  75. package/src/modes/types.ts +1 -1
  76. package/src/modes/utils/hotkeys-markdown.ts +1 -1
  77. package/src/runtime-mcp/client.ts +1 -4
  78. package/src/runtime-mcp/elicitation.ts +1 -5
  79. package/src/runtime-mcp/protocol.ts +2 -4
  80. package/src/sdk/broker/lifecycle-ledger.ts +1 -0
  81. package/src/sdk/broker/lifecycle.ts +1 -0
  82. package/src/sdk/cli/rows.ts +2 -3
  83. package/src/sdk/cli/session-cli.ts +2 -8
  84. package/src/sdk/host/query/cursor.ts +1 -0
  85. package/src/sdk/host/reverse-leases.ts +1 -0
  86. package/src/sdk/lifecycle/service.ts +1 -0
  87. package/src/sdk/protocol/operation-inventory.generated.json +154 -0
  88. package/src/session/agent-session.ts +1877 -224
  89. package/src/session/btw-prefix-ledger.ts +1 -4
  90. package/src/session/internal/managed-gc-retirement-codec.ts +1 -4
  91. package/src/session/session-manager.ts +732 -224
  92. package/src/session/task-artifact-owner-codec.ts +1 -4
  93. package/src/session-import/claude.ts +1 -4
  94. package/src/session-import/detect.ts +1 -6
  95. package/src/session-import/provider-codex.ts +1 -6
  96. package/src/session-import/provider-service.ts +4 -0
  97. package/src/setup/hermes-setup.ts +1 -4
  98. package/src/setup/provider-onboarding.ts +514 -26
  99. package/src/slash-commands/builtin-registry.ts +26 -13
  100. package/src/slash-commands/helpers/todo.ts +3 -1
  101. package/src/task/delegation-hint.ts +1 -4
  102. package/src/task/executor.ts +4 -2
  103. package/src/task/provider-retry-status.ts +1 -4
  104. package/src/tools/json-tree.ts +1 -4
  105. package/src/tools/recipe/runners/pkg.ts +1 -5
  106. package/src/utils/clipboard.ts +155 -2
  107. package/src/utils/mac-file-urls.applescript +37 -0
  108. package/src/utils/pasted-image-path.ts +5 -0
  109. package/src/web/search/provider.ts +6 -0
  110. package/src/web/search/providers/keenable.ts +207 -0
  111. package/src/web/search/types.ts +2 -0
@@ -2,6 +2,7 @@ import { createHash, randomBytes } from "node:crypto";
2
2
  import type { Stats } from "node:fs";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path from "node:path";
5
+ import { isRecord } from "@gajae-code/utils";
5
6
  import { isSettingsInitialized, Settings } from "../config/settings";
6
7
  import { listManagedSessionCandidates, resolveManagedSessionScope } from "../sdk/session-directory";
7
8
  import {
@@ -57,10 +58,6 @@ import {
57
58
  import { anchorInputFileArgs, assertSafePathComponent, CommandError, flagValue, hasFlag } from "./workflow-cli-common";
58
59
  import { resolveWorkflowSetting } from "./workflow-settings";
59
60
 
60
- function isRecord(value: unknown): value is Record<string, unknown> {
61
- return value !== null && typeof value === "object" && !Array.isArray(value);
62
- }
63
-
64
61
  function assertNoFutureDeepInterviewEnvelope(value: Record<string, unknown>, surface: string): void {
65
62
  if (
66
63
  value.version !== undefined &&
@@ -1,4 +1,4 @@
1
- import { sanitizeDisplayLine, sanitizeText } from "@gajae-code/utils";
1
+ import { isRecord, sanitizeDisplayLine, sanitizeText } from "@gajae-code/utils";
2
2
  import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
3
3
  import type { SkillManifest } from "./workflow-manifest";
4
4
 
@@ -18,10 +18,6 @@ function scalar(value: unknown): string | undefined {
18
18
  return undefined;
19
19
  }
20
20
 
21
- function isRecord(value: unknown): value is Record<string, unknown> {
22
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
23
- }
24
-
25
21
  function stateObject(stateJson: Record<string, unknown>): Record<string, unknown> {
26
22
  const nested = stateJson.state;
27
23
  return isRecord(nested) ? nested : stateJson;
@@ -19,6 +19,7 @@ import {
19
19
  readOwnerOnlyFile,
20
20
  verifyOwnerOnlyPathSecurity,
21
21
  } from "@gajae-code/natives";
22
+ import { isRecord } from "@gajae-code/utils";
22
23
  import { isCompiledBinary } from "@gajae-code/utils/env";
23
24
  import { observeProcessIncarnation, type ProcessIncarnationObservation } from "../sdk/broker/process-incarnation";
24
25
  import { parseLinuxProcStartTime } from "./linux-proc";
@@ -3083,9 +3084,6 @@ function hasOnlyKeys(record: Record<string, unknown>, allowed: string[]): boolea
3083
3084
  function nonEmpty(value: unknown): value is string {
3084
3085
  return typeof value === "string" && value.length > 0;
3085
3086
  }
3086
- function isRecord(value: unknown): value is Record<string, unknown> {
3087
- return typeof value === "object" && value !== null && !Array.isArray(value);
3088
- }
3089
3087
  function isCode(error: unknown, code: string): boolean {
3090
3088
  return isRecord(error) && error.code === code;
3091
3089
  }
@@ -1,6 +1,7 @@
1
1
  import { createHash } from "node:crypto";
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as path from "node:path";
4
+ import { isRecord } from "@gajae-code/utils";
4
5
  import type { ManagedOwnerSigabrtReceipt } from "./managed-owner-binding";
5
6
  import { sessionStateDir, sessionUltragoalDir } from "./session-layout";
6
7
  import { appendJsonlIdempotent, writeJsonAtomic } from "./state-writer";
@@ -68,10 +69,6 @@ function nonEmpty(value: unknown): value is string {
68
69
  return typeof value === "string" && value.trim().length > 0;
69
70
  }
70
71
 
71
- function isRecord(value: unknown): value is Record<string, unknown> {
72
- return value !== null && typeof value === "object" && !Array.isArray(value);
73
- }
74
-
75
72
  function exactChild(
76
73
  entry: Record<string, unknown>,
77
74
  parentId: string | null,
@@ -56,6 +56,7 @@
56
56
  import { createHash } from "node:crypto";
57
57
  import * as fs from "node:fs/promises";
58
58
  import * as path from "node:path";
59
+ import { isRecord } from "@gajae-code/utils";
59
60
  import { renderCliWriteReceipt } from "./cli-write-receipt";
60
61
  import { DEFAULT_ULTRAGOAL_OBJECTIVE } from "./goal-mode-request";
61
62
  import {
@@ -325,10 +326,6 @@ export function ultragoalSuccessionClaimPath(cwd: string, operationId: string):
325
326
 
326
327
  // ---- small helpers -----------------------------------------------------
327
328
 
328
- function isRecord(value: unknown): value is Record<string, unknown> {
329
- return typeof value === "object" && value !== null && !Array.isArray(value);
330
- }
331
-
332
329
  function nonEmpty(value: unknown): string | null {
333
330
  return typeof value === "string" && value.trim() !== "" ? value : null;
334
331
  }
@@ -1,3 +1,4 @@
1
+ import { isRecord } from "@gajae-code/utils";
1
2
  export type ToolOutcomeKind = "timeout" | "success" | "other-error";
2
3
 
3
4
  export interface TimeoutToolOutcome {
@@ -12,10 +13,6 @@ export interface TimeoutHoldState {
12
13
  streak: number;
13
14
  }
14
15
 
15
- function isRecord(value: unknown): value is Record<string, unknown> {
16
- return typeof value === "object" && value !== null && !Array.isArray(value);
17
- }
18
-
19
16
  function canonicalizeArgs(value: unknown): unknown {
20
17
  if (Array.isArray(value)) {
21
18
  return value.map(item => canonicalizeArgs(item));
@@ -45,7 +45,7 @@ export interface ReceiptEnvelope<E = Record<string, unknown>> {
45
45
 
46
46
  export const RECEIPT_SCHEMA_VERSION = 1 as const;
47
47
 
48
- /** Deterministic stringify with sorted keys (stable hash basis). */
48
+ /** Deterministic stringify with sorted keys (stable hash basis). Byte-identical to modes/shared/agent-wire/workflow-gate-schema.ts; kept local so this plane does not depend on agent-wire. */
49
49
  export function canonicalJson(value: unknown): string {
50
50
  if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
51
51
  if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;