@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
@@ -1,6 +1,7 @@
1
1
  import * as crypto from "node:crypto";
2
2
  import * as path from "node:path";
3
3
  import type { NativeExactUnlinkResult } from "@gajae-code/natives";
4
+ import { isRecord } from "@gajae-code/utils";
4
5
  import type { ManagedDirectoryRoot, ManagedSessionSecurityPolicy } from "./internal/managed-session-storage";
5
6
  import type { NativeDirectoryTreeSnapshot } from "./session-storage";
6
7
 
@@ -123,10 +124,6 @@ export type TaskArtifactOwnerRetirementOutcome =
123
124
  readonly nativeOutcome?: NativeExactUnlinkResult;
124
125
  };
125
126
 
126
- function isRecord(value: unknown): value is Record<string, unknown> {
127
- return typeof value === "object" && value !== null && !Array.isArray(value);
128
- }
129
-
130
127
  /** True only for canonical unsigned decimal strings within the native u64 range. */
131
128
  export function isCanonicalDecimal(value: unknown): value is string {
132
129
  return typeof value === "string" && /^(0|[1-9][0-9]*)$/u.test(value);
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import { createHash } from "node:crypto";
18
+ import { isRecord } from "@gajae-code/utils";
18
19
  import { redactImportedText } from "./redact";
19
20
  import type { ImportedConversation, ImportedMessage, ImportQuarantineRecord, SessionImportCounts } from "./types";
20
21
 
@@ -31,10 +32,6 @@ const MAX_EVIDENCE_LINE_CHARS = 400;
31
32
  const MAX_EVIDENCE_LINES = 100;
32
33
  const MAX_EVIDENCE_BYTES = 8 * 1024;
33
34
 
34
- function isRecord(value: unknown): value is JsonRecord {
35
- return typeof value === "object" && value !== null && !Array.isArray(value);
36
- }
37
-
38
35
  function sha256Hex(text: string): string {
39
36
  return createHash("sha256").update(text, "utf8").digest("hex");
40
37
  }
@@ -9,17 +9,12 @@
9
9
  * `unsupported_format` rather than falling back to a speculative parse.
10
10
  */
11
11
 
12
+ import { isRecord } from "@gajae-code/utils";
12
13
  import { SessionImportError, type SessionImportFormatId, type SessionImportProviderId } from "./types";
13
14
 
14
15
  /** Leading bytes consulted for envelope sniffing. */
15
16
  const DETECTION_SAMPLE_BYTES = 256 * 1024;
16
17
 
17
- type JsonRecord = Record<string, unknown>;
18
-
19
- function isRecord(value: unknown): value is JsonRecord {
20
- return typeof value === "object" && value !== null && !Array.isArray(value);
21
- }
22
-
23
18
  export interface SessionImportDetection {
24
19
  provider: SessionImportProviderId;
25
20
  format: SessionImportFormatId;
@@ -13,11 +13,10 @@
13
13
  */
14
14
 
15
15
  import { createHash } from "node:crypto";
16
+ import { isRecord } from "@gajae-code/utils";
16
17
  import { redactImportedText } from "./redact";
17
18
  import type { ImportedConversation, ImportedMessage, ImportQuarantineRecord, SessionImportCounts } from "./types";
18
19
 
19
- type JsonRecord = Record<string, unknown>;
20
-
21
20
  export interface CodexParseResult {
22
21
  conversation: ImportedConversation;
23
22
  quarantine: ImportQuarantineRecord[];
@@ -27,10 +26,6 @@ export interface CodexParseResult {
27
26
 
28
27
  const MAX_EVIDENCE_LINE_CHARS = 400;
29
28
 
30
- function isRecord(value: unknown): value is JsonRecord {
31
- return typeof value === "object" && value !== null && !Array.isArray(value);
32
- }
33
-
34
29
  function textFromContentBlocks(content: unknown): string {
35
30
  if (typeof content === "string") return content;
36
31
  if (!Array.isArray(content)) return "";
@@ -392,6 +392,10 @@ export async function materializeExternalSessionImport(
392
392
  importedAt,
393
393
  };
394
394
  manager.appendCustomEntry(EXTERNAL_IMPORT_PROVENANCE_CUSTOM_TYPE, provenance);
395
+ // Shared-append admission cannot be latched on this manager: it was created for a new
396
+ // session above and has never taken a shared publication, and the import publishes its
397
+ // whole resident graph through the title/ensureOnDisk path immediately after these
398
+ // appends. The legacy appends are therefore admitted by construction.
395
399
  manager.appendCustomMessageEntry(
396
400
  EXTERNAL_IMPORT_CONTEXT_CUSTOM_TYPE,
397
401
  prepared.contextText,
@@ -2,6 +2,7 @@ import * as crypto from "node:crypto";
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as os from "node:os";
4
4
  import * as path from "node:path";
5
+ import { isRecord } from "@gajae-code/utils";
5
6
  import { YAML } from "bun";
6
7
  import {
7
8
  COORDINATOR_MCP_PROTOCOL_VERSION,
@@ -122,10 +123,6 @@ const DEFAULT_CONNECT_TIMEOUT = 60;
122
123
  const MIN_TIMEOUT_SECONDS = 1;
123
124
  const MAX_TIMEOUT_SECONDS = 3600;
124
125
 
125
- function isRecord(value: unknown): value is Record<string, unknown> {
126
- return typeof value === "object" && value !== null && !Array.isArray(value);
127
- }
128
-
129
126
  function optionalTrim(value: string | undefined): string | undefined {
130
127
  const trimmed = value?.trim();
131
128
  return trimmed ? trimmed : undefined;