@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.
- package/CHANGELOG.md +60 -0
- package/dist/types/config/autorouting-contract.d.ts +4 -4
- package/dist/types/config/autorouting-tier-map.d.ts +1 -1
- package/dist/types/config/keybindings.d.ts +1 -5
- package/dist/types/config/model-profile-activation.d.ts +30 -3
- package/dist/types/config/model-registry.d.ts +2 -0
- package/dist/types/config/models-config-schema.d.ts +8 -0
- package/dist/types/config/settings-schema.d.ts +7 -3
- package/dist/types/coordinator-mcp/canonical-json.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/metadata.d.ts +1 -1
- package/dist/types/harness-control-plane/receipts.d.ts +1 -1
- package/dist/types/modes/components/settings-selector.d.ts +5 -2
- package/dist/types/modes/controllers/command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/input-controller.d.ts +12 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +1 -1
- package/dist/types/modes/types.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +101 -6
- package/dist/types/session/session-manager.d.ts +124 -9
- package/dist/types/setup/provider-onboarding.d.ts +55 -2
- package/dist/types/slash-commands/builtin-registry.d.ts +11 -0
- package/dist/types/utils/clipboard.d.ts +18 -0
- package/dist/types/utils/pasted-image-path.d.ts +2 -0
- package/dist/types/web/search/providers/keenable.d.ts +30 -0
- package/dist/types/web/search/types.d.ts +2 -2
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +28 -0
- package/src/cli/doctor/config-repairs.ts +1 -4
- package/src/cli/local-provider-smoke.ts +1 -4
- package/src/cli/public-command-help.ts +1 -1
- package/src/config/autorouting-contract.ts +5 -8
- package/src/config/autorouting-tier-map.ts +1 -1
- package/src/config/keybindings.ts +1 -2
- package/src/config/model-profile-activation.ts +332 -28
- package/src/config/model-registry.ts +156 -8
- package/src/config/models-config-schema.ts +27 -0
- package/src/config/settings-schema.ts +6 -0
- package/src/coordinator-mcp/canonical-json.ts +15 -0
- package/src/coordinator-mcp/policy.ts +1 -0
- package/src/coordinator-mcp/question-gate-codec.ts +1 -2
- package/src/coordinator-mcp/question-state.ts +2 -12
- package/src/coordinator-mcp/server.ts +1 -10
- package/src/customization/import.ts +1 -5
- package/src/discovery/mcp-compat.ts +1 -5
- package/src/discovery/mcp-json.ts +1 -4
- package/src/edit/notebook.ts +1 -5
- package/src/extensibility/gjc-plugins/lifecycle.ts +1 -3
- package/src/extensibility/gjc-plugins/metadata.ts +2 -5
- package/src/extensibility/gjc-plugins/schema.ts +1 -4
- package/src/gjc-runtime/deep-interview-crystallize.ts +1 -4
- package/src/gjc-runtime/deep-interview-runtime.ts +1 -4
- package/src/gjc-runtime/state-renderer.ts +1 -5
- package/src/gjc-runtime/tmux-owner-isolation.ts +1 -3
- package/src/gjc-runtime/ultragoal-owner-loss-recovery.ts +1 -4
- package/src/gjc-runtime/ultragoal-succession.ts +1 -4
- package/src/goals/continuation-timeout-guard.ts +1 -4
- package/src/harness-control-plane/receipts.ts +1 -1
- package/src/internal-urls/docs-index.generated.ts +4 -4
- package/src/migrate/mcp-mapper.ts +2 -4
- package/src/modes/components/hook-editor.ts +4 -8
- package/src/modes/components/hook-selector.ts +3 -1
- package/src/modes/components/settings-selector.ts +26 -2
- package/src/modes/controllers/command-controller.ts +4 -98
- package/src/modes/controllers/extension-ui-controller.ts +6 -14
- package/src/modes/controllers/goal-mode-controller.ts +4 -4
- package/src/modes/controllers/input-controller.ts +110 -46
- package/src/modes/controllers/plan-mode-controller.ts +6 -10
- package/src/modes/controllers/selector-controller.ts +66 -23
- package/src/modes/controllers/todo-command-controller.ts +2 -2
- package/src/modes/interactive-mode.ts +2 -2
- package/src/modes/prompt-action-autocomplete.ts +1 -1
- package/src/modes/runtime-init.ts +4 -4
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +1 -1
- package/src/modes/types.ts +1 -1
- package/src/modes/utils/hotkeys-markdown.ts +1 -1
- package/src/runtime-mcp/client.ts +1 -4
- package/src/runtime-mcp/elicitation.ts +1 -5
- package/src/runtime-mcp/protocol.ts +2 -4
- package/src/sdk/broker/lifecycle-ledger.ts +1 -0
- package/src/sdk/broker/lifecycle.ts +1 -0
- package/src/sdk/cli/rows.ts +2 -3
- package/src/sdk/cli/session-cli.ts +2 -8
- package/src/sdk/host/query/cursor.ts +1 -0
- package/src/sdk/host/reverse-leases.ts +1 -0
- package/src/sdk/lifecycle/service.ts +1 -0
- package/src/sdk/protocol/operation-inventory.generated.json +154 -0
- package/src/session/agent-session.ts +1877 -224
- package/src/session/btw-prefix-ledger.ts +1 -4
- package/src/session/internal/managed-gc-retirement-codec.ts +1 -4
- package/src/session/session-manager.ts +732 -224
- package/src/session/task-artifact-owner-codec.ts +1 -4
- package/src/session-import/claude.ts +1 -4
- package/src/session-import/detect.ts +1 -6
- package/src/session-import/provider-codex.ts +1 -6
- package/src/session-import/provider-service.ts +4 -0
- package/src/setup/hermes-setup.ts +1 -4
- package/src/setup/provider-onboarding.ts +514 -26
- package/src/slash-commands/builtin-registry.ts +26 -13
- package/src/slash-commands/helpers/todo.ts +3 -1
- package/src/task/delegation-hint.ts +1 -4
- package/src/task/executor.ts +4 -2
- package/src/task/provider-retry-status.ts +1 -4
- package/src/tools/json-tree.ts +1 -4
- package/src/tools/recipe/runners/pkg.ts +1 -5
- package/src/utils/clipboard.ts +155 -2
- package/src/utils/mac-file-urls.applescript +37 -0
- package/src/utils/pasted-image-path.ts +5 -0
- package/src/web/search/provider.ts +6 -0
- package/src/web/search/providers/keenable.ts +207 -0
- 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;
|