@deksden-com/dd-flow-cli 0.9.0-beta.134 → 0.9.0-beta.136
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 +12 -0
- package/README.md +33 -0
- package/dist/build-info.json +7 -7
- package/dist/cli/command-inputs.js +1 -0
- package/dist/cli/command-metadata.js +144 -0
- package/dist/cli/command-option-descriptions.js +186 -0
- package/dist/cli/completion-cli.js +70 -0
- package/dist/cli/completion.js +57 -0
- package/dist/cli/error-output.js +52 -0
- package/dist/cli/executor-onboarding.js +71 -0
- package/dist/cli/harnesses.js +84 -0
- package/dist/cli/models.js +39 -0
- package/dist/cli/operator-profiles.js +61 -0
- package/dist/cli/output-options.js +35 -0
- package/dist/cli/response-file.js +69 -0
- package/dist/cli/run-cli.js +5 -0
- package/dist/cli/setup.js +147 -0
- package/dist/harness-runtime/OPENCODE-LICENSE.txt +24 -0
- package/dist/harness-runtime/bin/dd-opencode.mjs +1 -1
- package/dist/harness-runtime/lib/codex-capacity-policy.mjs +13 -0
- package/dist/harness-runtime/lib/dd-opencode-daemon.mjs +193 -39
- package/dist/harness-runtime/lib/dd-opencode.mjs +295 -100
- package/dist/harness-runtime/lib/delegation-instructions.mjs +3 -3
- package/dist/harness-runtime/lib/managed-daemon.mjs +1 -1
- package/dist/harness-runtime/lib/native-hook-command.d.mts +2 -2
- package/dist/harness-runtime/lib/native-hook-command.mjs +4 -4
- package/dist/harness-runtime/lib/opencode-plugin.mjs +60 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-1y4a697q.js +81 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-2ny4vxct.js +92 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-6mptkzbc.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-7x67cf1q.js +52 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-9rqn6x4v.js +16 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-9vdz0zwn.js +1661 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ecs5ftka.js +1466 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-frbwqjmf.js +145 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-gne7h7mq.js +50 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-gx9wnkzr.js +105 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-m2eywc8w.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-nwcpakzx.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-q4g3afnw.js +623 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-qav6mfdz.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-sxt88q69.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-t1xa31vm.js +39 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ve4aws36.js +103 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vmytr4q8.js +4 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vt9jbch8.js +36 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vyas3vgt.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-wjyeq25y.js +30 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-xgnj2w4v.js +20 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-y2etg5bs.js +9 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ydhz1zrh.js +238 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-z6qdwcsf.js +62 -0
- package/dist/harness-runtime/vendor/opencode-client/contract.d.ts +1 -0
- package/dist/harness-runtime/vendor/opencode-client/contract.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api/api.d.ts +2806 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api.d.ts +4 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/client.d.ts +2530 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/client.js +15 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client-error.d.ts +7 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client-error.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client.d.ts +2529 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client.js +8 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/index.d.ts +2 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/index.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/index.d.ts +35 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/index.js +75 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/rpc.d.ts +20 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/rpc.js +11 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/service.d.ts +90 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/service.js +187 -0
- package/dist/harness-runtime/vendor/opencode-client/package.json +84 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/api.d.ts +21 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/client.d.ts +252 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/client.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client-error.d.ts +8 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client-error.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client.d.ts +259 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client.js +7 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/index.d.ts +3 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/index.js +79 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/types.d.ts +8932 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/types.js +70 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/index.d.ts +6 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/index.js +83 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/rpc.d.ts +32 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/rpc.js +7 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/service.d.ts +24 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/service.js +187 -0
- package/dist/harness-runtime/vendor/opencode-client/pty-handoff.d.ts +12 -0
- package/dist/harness-runtime/vendor/opencode-client/pty-handoff.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/rpc-runtime.d.ts +20 -0
- package/dist/harness-runtime/vendor/opencode-client/rpc-runtime.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/service-contender.d.ts +37 -0
- package/dist/harness-runtime/vendor/opencode-client/service-contender.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/service-probe.d.ts +70 -0
- package/dist/harness-runtime/vendor/opencode-client/service-probe.js +16 -0
- package/dist/harness-runtime/vendor/opencode-client/service-timing.d.ts +12 -0
- package/dist/harness-runtime/vendor/opencode-client/service-timing.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/service-version.d.ts +2 -0
- package/dist/harness-runtime/vendor/opencode-client/service-version.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/service.d.ts +52 -0
- package/dist/harness-runtime/vendor/opencode-client/service.js +1 -0
- package/dist/harness-runtime/vendor/opencode-client/shared-events.d.ts +11 -0
- package/dist/harness-runtime/vendor/opencode-client/shared-events.js +8 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/connection.d.ts +37 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/connection.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/data.d.ts +211 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/data.js +18 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/index.d.ts +3 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/index.js +32 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/pty.d.ts +22 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/pty.js +8 -0
- package/dist/harness-runtime/vendor/opencode-plugin.mjs +3 -0
- package/dist/services/cli-operation-classifier.js +4 -0
- package/dist/services/cli-upgrade-allowlist.js +27 -0
- package/dist/services/discovery/agy-discovery.js +2 -0
- package/dist/services/discovery/codex-discovery.js +2 -0
- package/dist/services/discovery/droid-discovery.js +2 -0
- package/dist/services/discovery/grok-discovery.js +2 -0
- package/dist/services/discovery/opencode-discovery.js +2 -0
- package/dist/services/discovery/static.js +31 -0
- package/dist/services/discovery/zcode-discovery.js +2 -0
- package/dist/services/engines.js +23 -25
- package/dist/services/eval-snapshots.js +1 -1
- package/dist/services/executor-onboarding.js +56 -0
- package/dist/services/external-work-launch.js +1 -1
- package/dist/services/harness-discovery.js +29 -0
- package/dist/services/harness-doctor.js +75 -0
- package/dist/services/harness-probe-effects.js +51 -0
- package/dist/services/harness-version-probe.js +100 -0
- package/dist/services/hooks.js +1 -1
- package/dist/services/hybrid-contracts.js +455 -0
- package/dist/services/installation-lock.js +92 -0
- package/dist/services/managed-processes.js +30 -0
- package/dist/services/merge-server.js +1 -1
- package/dist/services/model-catalog.js +109 -0
- package/dist/services/model-discovery.js +46 -0
- package/dist/services/operator-profiles.js +236 -0
- package/dist/services/release-archive-producer.js +52 -0
- package/dist/services/release-archive.js +143 -0
- package/dist/services/release-cache.js +142 -0
- package/dist/services/release-compatibility.js +18 -0
- package/dist/services/release-download.js +67 -0
- package/dist/services/release-envelope.js +104 -0
- package/dist/services/release-manifest.js +45 -0
- package/dist/services/release-payload.js +114 -0
- package/dist/services/release-producer.js +63 -0
- package/dist/services/release-provenance.js +160 -0
- package/dist/services/release-registry.js +66 -0
- package/dist/services/release-source.js +194 -0
- package/dist/services/run-controller-recovery.js +2 -2
- package/dist/services/run-controller.js +3 -2
- package/dist/services/run-health.js +149 -0
- package/dist/services/runs.js +61 -13
- package/dist/services/setup.js +377 -0
- package/dist/storage/database.js +18 -3
- package/dist/storage/writer-contract.js +8 -0
- package/package.json +4 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Connection details for a local OpenCode service. */
|
|
2
|
+
export type Endpoint = {
|
|
3
|
+
/** Base URL of the service. */
|
|
4
|
+
readonly url: string;
|
|
5
|
+
/** Authentication required by the service, when configured. */
|
|
6
|
+
readonly auth?: {
|
|
7
|
+
/** HTTP authentication scheme. */
|
|
8
|
+
readonly type: "basic";
|
|
9
|
+
/** Basic authentication username. */
|
|
10
|
+
readonly username: string;
|
|
11
|
+
/** Basic authentication password. */
|
|
12
|
+
readonly password: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** Options used to discover the local OpenCode service. */
|
|
16
|
+
export type DiscoverOptions = {
|
|
17
|
+
/** Absolute registration file path. Defaults to the XDG state directory. */
|
|
18
|
+
readonly file?: string;
|
|
19
|
+
/** Required exact service version or compatibility predicate. */
|
|
20
|
+
readonly version?: string | ((version: string) => boolean);
|
|
21
|
+
};
|
|
22
|
+
/** Reason ensuring the service requires a new process. */
|
|
23
|
+
export type EnsureReason = "missing" | "version-mismatch";
|
|
24
|
+
/** Options used to ensure the local OpenCode service is running. */
|
|
25
|
+
export type EnsureOptions = DiscoverOptions & {
|
|
26
|
+
/** Service command and arguments. Defaults to `opencode serve --service`. */
|
|
27
|
+
readonly command?: ReadonlyArray<string>;
|
|
28
|
+
/** Environment variables added to the inherited service process environment. */
|
|
29
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
30
|
+
/** Called once before spawning a new service process. */
|
|
31
|
+
readonly onStart?: (reason: EnsureReason, previousVersion?: string) => void;
|
|
32
|
+
};
|
|
33
|
+
/** Options used to stop the local OpenCode service. */
|
|
34
|
+
export type StopOptions = {
|
|
35
|
+
/** Absolute registration file path. Defaults to the XDG state directory. */
|
|
36
|
+
readonly file?: string;
|
|
37
|
+
/** How to handle persistent terminals before stopping the service. */
|
|
38
|
+
readonly pty?: "clear" | "handoff";
|
|
39
|
+
};
|
|
40
|
+
/** Contents of the local service registration file. */
|
|
41
|
+
export type Info = {
|
|
42
|
+
/** Unique service instance identifier. */
|
|
43
|
+
readonly id?: string;
|
|
44
|
+
/** OpenCode version served by the process. */
|
|
45
|
+
readonly version?: string;
|
|
46
|
+
/** Base URL advertised by the service. */
|
|
47
|
+
readonly url: string;
|
|
48
|
+
/** Operating system process identifier. */
|
|
49
|
+
readonly pid: number;
|
|
50
|
+
/** Private service password, when authentication is enabled. */
|
|
51
|
+
readonly password?: string;
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunks/service-probe-qav6mfdz.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * as SharedEvents from "./shared-events.js";
|
|
2
|
+
export type SubscribeOptions = {
|
|
3
|
+
readonly signal?: AbortSignal;
|
|
4
|
+
/** Reports transport activity on the shared stream, including keepalive frames that carry no event. */
|
|
5
|
+
readonly onActivity?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function make<A extends {
|
|
8
|
+
readonly type: string;
|
|
9
|
+
}>(connect: (signal: AbortSignal, onActivity: () => void) => AsyncIterable<A>): {
|
|
10
|
+
subscribe(options?: SubscribeOptions): AsyncIterable<A>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { OpenCodeClient, OpenCodeEvent } from "../promise";
|
|
2
|
+
export type ClientConnectionStatus = "connected" | "connecting" | "reconnecting";
|
|
3
|
+
export type ClientConnectionEvent = {
|
|
4
|
+
readonly type: "client.connection";
|
|
5
|
+
readonly created: number;
|
|
6
|
+
readonly data: {
|
|
7
|
+
readonly status: "connecting" | "connected" | "disconnected" | "reconnecting";
|
|
8
|
+
readonly attempt: number;
|
|
9
|
+
readonly error?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type ClientConnectionOptions = {
|
|
13
|
+
readonly reconnect?: (signal: AbortSignal) => Promise<OpenCodeClient>;
|
|
14
|
+
readonly onEvent: (event: OpenCodeEvent) => void;
|
|
15
|
+
readonly flushInterval?: number;
|
|
16
|
+
readonly pageLifecycle?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Abort and reconnect a stream that receives no bytes for this long. The server writes a keepalive
|
|
19
|
+
* comment every 15 seconds, so a quiet but healthy stream never trips this.
|
|
20
|
+
*/
|
|
21
|
+
readonly idleTimeout?: number;
|
|
22
|
+
readonly log?: {
|
|
23
|
+
readonly debug?: (message: string, data?: Readonly<Record<string, unknown>>) => void;
|
|
24
|
+
readonly info?: (message: string, data?: Readonly<Record<string, unknown>>) => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const defaultIdleTimeout = 45000;
|
|
28
|
+
export declare const foregroundIdleThreshold = 20000;
|
|
29
|
+
export declare function createClientConnection(initialApi: OpenCodeClient, options: ClientConnectionOptions): {
|
|
30
|
+
status: () => ClientConnectionStatus;
|
|
31
|
+
attempt: () => number;
|
|
32
|
+
error: () => string | undefined;
|
|
33
|
+
internal: {
|
|
34
|
+
history: () => ClientConnectionEvent[];
|
|
35
|
+
resync: (reason: string) => void;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultIdleTimeout2,
|
|
3
|
+
foregroundIdleThreshold2,
|
|
4
|
+
createClientConnection2
|
|
5
|
+
} from "../chunks/service-probe-ydhz1zrh.js";
|
|
6
|
+
export {
|
|
7
|
+
createClientConnection2 as createClientConnection,
|
|
8
|
+
defaultIdleTimeout2 as defaultIdleTimeout,
|
|
9
|
+
foregroundIdleThreshold2 as foregroundIdleThreshold
|
|
10
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import type { AgentInfo, CommandInfo, ConfigEntry, SessionFormCancelInput, FormInfo, SessionFormReplyInput, IntegrationInfo, LocationRef, McpResource, McpServer, ModelInfo, ModelRef, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, SessionInboxCompaction, ShellInfo, SkillInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise";
|
|
2
|
+
import { type SessionPromptInput } from "../promise";
|
|
3
|
+
export type DataSessionStatus = "idle" | "running";
|
|
4
|
+
/**
|
|
5
|
+
* Where a pending user prompt stands relative to the runner: `starting` is promoted at the next idle boundary,
|
|
6
|
+
* `steering` waits for the next step boundary of an execution that already delivered input, `stranded` outlived an
|
|
7
|
+
* execution that ended without delivering it, and `queued` waits for every steer to drain.
|
|
8
|
+
*/
|
|
9
|
+
export type DataPendingStatus = "starting" | "steering" | "stranded" | "queued";
|
|
10
|
+
type OpenCodeEventMap = {
|
|
11
|
+
[Type in OpenCodeEvent["type"]]: Extract<OpenCodeEvent, {
|
|
12
|
+
type: Type;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type CreateDataInput = {
|
|
16
|
+
readonly api: () => OpenCodeClient;
|
|
17
|
+
readonly directory: string;
|
|
18
|
+
/** Raw-message window used for an initial transcript read. Older pages retain their normal size. */
|
|
19
|
+
readonly initialMessageLimit?: () => number;
|
|
20
|
+
readonly event: {
|
|
21
|
+
readonly on: <Type extends OpenCodeEvent["type"]>(type: Type, handler: (event: OpenCodeEventMap[Type]) => void) => () => void;
|
|
22
|
+
readonly listen: (handler: (event: {
|
|
23
|
+
name: OpenCodeEvent["type"];
|
|
24
|
+
details: OpenCodeEvent;
|
|
25
|
+
}) => void) => () => void;
|
|
26
|
+
};
|
|
27
|
+
readonly connection?: {
|
|
28
|
+
readonly status: () => "connected" | "connecting" | "reconnecting";
|
|
29
|
+
};
|
|
30
|
+
/** Receives failed event-driven reads. Explicit reads still reject to their caller. */
|
|
31
|
+
readonly onError?: (error: unknown) => void;
|
|
32
|
+
};
|
|
33
|
+
export declare const settleMs = 150;
|
|
34
|
+
export type FormWithLocation = FormInfo & {
|
|
35
|
+
readonly location?: LocationRef;
|
|
36
|
+
};
|
|
37
|
+
type ShellWithLocation = ShellInfo & {
|
|
38
|
+
readonly location: LocationRef;
|
|
39
|
+
};
|
|
40
|
+
export declare function locationKey(location: LocationRef): string;
|
|
41
|
+
export declare function createData(config: CreateDataInput): {
|
|
42
|
+
on: <Type extends OpenCodeEvent["type"]>(type: Type, handler: (event: OpenCodeEventMap[Type]) => void) => () => void;
|
|
43
|
+
listen: (handler: (event: {
|
|
44
|
+
name: OpenCodeEvent["type"];
|
|
45
|
+
details: OpenCodeEvent;
|
|
46
|
+
}) => void) => () => void;
|
|
47
|
+
session: {
|
|
48
|
+
list(): SessionInfo[];
|
|
49
|
+
get(sessionID: string): SessionInfo;
|
|
50
|
+
creating(sessionID: string): boolean;
|
|
51
|
+
remember(info: SessionInfo): void;
|
|
52
|
+
setStatus(sessionID: string, status: DataSessionStatus): void;
|
|
53
|
+
root(sessionID: string): string;
|
|
54
|
+
family(sessionID: string): string[];
|
|
55
|
+
/** Clear heavy cached data for the root and all known descendants. */
|
|
56
|
+
evict(sessionID: string): void;
|
|
57
|
+
cost(sessionID: string): number;
|
|
58
|
+
status(sessionID: string): DataSessionStatus;
|
|
59
|
+
active(): string[];
|
|
60
|
+
input: {
|
|
61
|
+
list(sessionID: string): string[];
|
|
62
|
+
has(sessionID: string, inboxID: string): boolean;
|
|
63
|
+
};
|
|
64
|
+
pending: {
|
|
65
|
+
list(sessionID: string): SessionInboxInfo[];
|
|
66
|
+
status(sessionID: string, inboxID: string): DataPendingStatus | undefined;
|
|
67
|
+
sync(sessionID: string): Promise<void>;
|
|
68
|
+
invalidate(sessionID: string): void;
|
|
69
|
+
};
|
|
70
|
+
create(input: {
|
|
71
|
+
id?: string;
|
|
72
|
+
title?: string;
|
|
73
|
+
agent?: string;
|
|
74
|
+
model?: ModelRef;
|
|
75
|
+
location?: LocationRef;
|
|
76
|
+
projectID?: string;
|
|
77
|
+
}): {
|
|
78
|
+
id: string;
|
|
79
|
+
request: Promise<SessionInfo>;
|
|
80
|
+
};
|
|
81
|
+
compact(input: {
|
|
82
|
+
sessionID: string;
|
|
83
|
+
model?: ModelRef;
|
|
84
|
+
}): Promise<SessionInboxCompaction>;
|
|
85
|
+
prompt(input: SessionPromptInput & {
|
|
86
|
+
gate?: Promise<unknown>;
|
|
87
|
+
prepare?: () => Promise<unknown>;
|
|
88
|
+
}): Promise<import("../promise").SessionInboxUser>;
|
|
89
|
+
sync(sessionID: string, options?: {
|
|
90
|
+
children?: boolean;
|
|
91
|
+
}): Promise<void>;
|
|
92
|
+
invalidate(sessionID: string): void;
|
|
93
|
+
message: {
|
|
94
|
+
list(sessionID: string): SessionMessageInfo[];
|
|
95
|
+
get(sessionID: string, messageID: string): SessionMessageInfo | undefined;
|
|
96
|
+
sync(sessionID: string): Promise<void>;
|
|
97
|
+
more(sessionID: string): boolean;
|
|
98
|
+
loading(sessionID: string): boolean;
|
|
99
|
+
loadMore(sessionID: string, options?: {
|
|
100
|
+
all?: boolean;
|
|
101
|
+
signal?: AbortSignal;
|
|
102
|
+
/** Runs synchronously inside the store-publication batch. */
|
|
103
|
+
beforePublish?: () => void;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
invalidate(sessionID: string): void;
|
|
106
|
+
};
|
|
107
|
+
permission: {
|
|
108
|
+
list(sessionID: string): PermissionRequest[];
|
|
109
|
+
sessions(): string[];
|
|
110
|
+
sync(sessionID: string): Promise<void>;
|
|
111
|
+
invalidate(sessionID: string): void;
|
|
112
|
+
reply(input: PermissionReplyInput): Promise<void>;
|
|
113
|
+
};
|
|
114
|
+
form: {
|
|
115
|
+
list(sessionID: string, ref?: LocationRef): FormWithLocation[] | undefined;
|
|
116
|
+
sessions(): string[];
|
|
117
|
+
sync(sessionID: string, ref?: LocationRef): Promise<void>;
|
|
118
|
+
invalidate(sessionID: string, ref?: LocationRef): void;
|
|
119
|
+
reply(input: SessionFormReplyInput, ref?: LocationRef): Promise<void>;
|
|
120
|
+
cancel(input: SessionFormCancelInput, ref?: LocationRef): Promise<void>;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
project: {
|
|
124
|
+
list(): Project[];
|
|
125
|
+
get(projectID: string): Project;
|
|
126
|
+
sync(): Promise<void>;
|
|
127
|
+
invalidate(): void;
|
|
128
|
+
permission: {
|
|
129
|
+
list(projectID: string): PermissionSavedInfo[];
|
|
130
|
+
sync(projectID: string): Promise<void>;
|
|
131
|
+
invalidate(projectID: string): void;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
shell: {
|
|
135
|
+
list(location?: LocationRef): ShellWithLocation[];
|
|
136
|
+
listBySession(sessionID: string): ShellWithLocation[];
|
|
137
|
+
get(id: string): ShellWithLocation | undefined;
|
|
138
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
139
|
+
invalidate: (ref?: LocationRef) => void;
|
|
140
|
+
};
|
|
141
|
+
location: {
|
|
142
|
+
info(ref?: LocationRef): import("../promise").LocationPublicInfo | undefined;
|
|
143
|
+
default(): LocationRef;
|
|
144
|
+
syncInfo(ref?: LocationRef): Promise<void>;
|
|
145
|
+
sync(ref?: LocationRef): Promise<void>;
|
|
146
|
+
invalidate(ref?: LocationRef): void;
|
|
147
|
+
vcs: {
|
|
148
|
+
info: (ref?: LocationRef) => VcsInfo | undefined;
|
|
149
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
150
|
+
invalidate: (ref?: LocationRef) => void;
|
|
151
|
+
};
|
|
152
|
+
agent: {
|
|
153
|
+
list: (ref?: LocationRef) => AgentInfo[] | undefined;
|
|
154
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
155
|
+
invalidate: (ref?: LocationRef) => void;
|
|
156
|
+
};
|
|
157
|
+
command: {
|
|
158
|
+
list: (ref?: LocationRef) => CommandInfo[] | undefined;
|
|
159
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
160
|
+
invalidate: (ref?: LocationRef) => void;
|
|
161
|
+
};
|
|
162
|
+
config: {
|
|
163
|
+
list: (ref?: LocationRef) => ConfigEntry[] | undefined;
|
|
164
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
165
|
+
invalidate: (ref?: LocationRef) => void;
|
|
166
|
+
};
|
|
167
|
+
integration: {
|
|
168
|
+
list: (ref?: LocationRef) => IntegrationInfo[] | undefined;
|
|
169
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
170
|
+
invalidate: (ref?: LocationRef) => void;
|
|
171
|
+
};
|
|
172
|
+
mcp: {
|
|
173
|
+
server: {
|
|
174
|
+
list: (ref?: LocationRef) => McpServer[] | undefined;
|
|
175
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
176
|
+
invalidate: (ref?: LocationRef) => void;
|
|
177
|
+
};
|
|
178
|
+
resource: {
|
|
179
|
+
list: (ref?: LocationRef) => McpResource[] | undefined;
|
|
180
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
181
|
+
invalidate: (ref?: LocationRef) => void;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
model: {
|
|
185
|
+
list: (ref?: LocationRef) => ModelInfo[] | undefined;
|
|
186
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
187
|
+
invalidate: (ref?: LocationRef) => void;
|
|
188
|
+
};
|
|
189
|
+
provider: {
|
|
190
|
+
list: (ref?: LocationRef) => ProviderInfo[] | undefined;
|
|
191
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
192
|
+
invalidate: (ref?: LocationRef) => void;
|
|
193
|
+
};
|
|
194
|
+
reference: {
|
|
195
|
+
list: (ref?: LocationRef) => ReferenceInfo[] | undefined;
|
|
196
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
197
|
+
invalidate: (ref?: LocationRef) => void;
|
|
198
|
+
};
|
|
199
|
+
websearch: {
|
|
200
|
+
list(location?: LocationRef): WebSearchProvider[] | undefined;
|
|
201
|
+
refresh(ref?: LocationRef): Promise<void>;
|
|
202
|
+
};
|
|
203
|
+
skill: {
|
|
204
|
+
list: (ref?: LocationRef) => SkillInfo[] | undefined;
|
|
205
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
206
|
+
invalidate: (ref?: LocationRef) => void;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
export type Data = ReturnType<typeof createData>;
|
|
211
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
settleMs2,
|
|
3
|
+
locationKey2,
|
|
4
|
+
createData2
|
|
5
|
+
} from "../chunks/service-probe-9vdz0zwn.js";
|
|
6
|
+
import"../chunks/service-probe-m2eywc8w.js";
|
|
7
|
+
import"../chunks/service-probe-wjyeq25y.js";
|
|
8
|
+
import"../chunks/service-probe-vyas3vgt.js";
|
|
9
|
+
import"../chunks/service-probe-ecs5ftka.js";
|
|
10
|
+
import"../chunks/service-probe-1y4a697q.js";
|
|
11
|
+
import"../chunks/service-probe-nwcpakzx.js";
|
|
12
|
+
import"../chunks/service-probe-vt9jbch8.js";
|
|
13
|
+
import"../chunks/service-probe-frbwqjmf.js";
|
|
14
|
+
export {
|
|
15
|
+
createData2 as createData,
|
|
16
|
+
locationKey2 as locationKey,
|
|
17
|
+
settleMs2 as settleMs
|
|
18
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import"../chunks/service-probe-nwcpakzx.js";
|
|
2
|
+
import"../chunks/service-probe-ecs5ftka.js";
|
|
3
|
+
import"../chunks/service-probe-vt9jbch8.js";
|
|
4
|
+
import"../chunks/service-probe-vyas3vgt.js";
|
|
5
|
+
import"../chunks/service-probe-frbwqjmf.js";
|
|
6
|
+
import"../chunks/service-probe-1y4a697q.js";
|
|
7
|
+
import"../chunks/service-probe-wjyeq25y.js";
|
|
8
|
+
import"../chunks/service-probe-m2eywc8w.js";
|
|
9
|
+
import {
|
|
10
|
+
settleMs2,
|
|
11
|
+
locationKey2,
|
|
12
|
+
createData2
|
|
13
|
+
} from "../chunks/service-probe-9vdz0zwn.js";
|
|
14
|
+
import {
|
|
15
|
+
defaultIdleTimeout2,
|
|
16
|
+
foregroundIdleThreshold2,
|
|
17
|
+
createClientConnection2
|
|
18
|
+
} from "../chunks/service-probe-ydhz1zrh.js";
|
|
19
|
+
import {
|
|
20
|
+
createPtyClient2,
|
|
21
|
+
createPersistentPtyClient2
|
|
22
|
+
} from "../chunks/service-probe-gne7h7mq.js";
|
|
23
|
+
export {
|
|
24
|
+
createClientConnection2 as createClientConnection,
|
|
25
|
+
createData2 as createData,
|
|
26
|
+
createPersistentPtyClient2 as createPersistentPtyClient,
|
|
27
|
+
createPtyClient2 as createPtyClient,
|
|
28
|
+
defaultIdleTimeout2 as defaultIdleTimeout,
|
|
29
|
+
foregroundIdleThreshold2 as foregroundIdleThreshold,
|
|
30
|
+
locationKey2 as locationKey,
|
|
31
|
+
settleMs2 as settleMs
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExperimentalPersistentPtyConnectTokenInput, OpenCodeClient, PtyConnectTokenInput } from "../promise";
|
|
2
|
+
export type PtyClientOptions = {
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly openSocket?: (url: URL) => WebSocket;
|
|
5
|
+
};
|
|
6
|
+
export type PtyConnectInput = {
|
|
7
|
+
readonly ptyID: PtyConnectTokenInput["ptyID"];
|
|
8
|
+
readonly location?: PtyConnectTokenInput["location"];
|
|
9
|
+
readonly cursor?: number;
|
|
10
|
+
};
|
|
11
|
+
export type PersistentPtyConnectInput = {
|
|
12
|
+
readonly ptyID: ExperimentalPersistentPtyConnectTokenInput["ptyID"];
|
|
13
|
+
readonly cursor: number;
|
|
14
|
+
readonly attachmentID: string;
|
|
15
|
+
readonly takeover?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function createPtyClient(api: OpenCodeClient, options: PtyClientOptions): {
|
|
18
|
+
connect(input: PtyConnectInput): Promise<WebSocket>;
|
|
19
|
+
};
|
|
20
|
+
export declare function createPersistentPtyClient(api: OpenCodeClient, options: PtyClientOptions): {
|
|
21
|
+
connect(input: PersistentPtyConnectInput): Promise<WebSocket>;
|
|
22
|
+
};
|
|
@@ -6,6 +6,8 @@ export function classifyCliOperation(args, env = process.env) {
|
|
|
6
6
|
if (isMbUpgradeMode(args, env)) {
|
|
7
7
|
return { mode: "mb_upgrade", operation, family, command, action };
|
|
8
8
|
}
|
|
9
|
+
if (family === "run" && command === "reconcile" && !args.includes("--apply"))
|
|
10
|
+
return { mode: "read_only_diagnostics", operation, family, command, action };
|
|
9
11
|
if (isRouterNative(args)) {
|
|
10
12
|
return { mode: "router_native", operation, family, command, action };
|
|
11
13
|
}
|
|
@@ -85,6 +87,8 @@ function isRouterNative(args) {
|
|
|
85
87
|
return true;
|
|
86
88
|
if (["engine", "version", "schema"].includes(first))
|
|
87
89
|
return true;
|
|
90
|
+
if (first === "run" && args[1] === "reconcile")
|
|
91
|
+
return true;
|
|
88
92
|
if (first === "storage" && args[1] === "migrate-writer")
|
|
89
93
|
return true;
|
|
90
94
|
return (first === "codex" && args[1] === "hook" && args[2] === "handle")
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { parseCommandArgs } from "./lifecycle-command.js";
|
|
2
|
+
/** Syntax eligibility only. Storage/project/RUN authority is checked separately. */
|
|
3
|
+
export function isUpgradeAllowlisted(args) {
|
|
4
|
+
const parsed = parseCommandArgs(args), [family, command] = parsed.positional;
|
|
5
|
+
const option = (name) => {
|
|
6
|
+
const value = parsed.options.get(name)?.at(-1);
|
|
7
|
+
return value && value !== "__dd_flow_flag__" ? value : null;
|
|
8
|
+
};
|
|
9
|
+
if (family === "status")
|
|
10
|
+
return true;
|
|
11
|
+
if (family === "engine" && command === "resolve")
|
|
12
|
+
return true;
|
|
13
|
+
if (family === "migration" && ["impact", "plan", "report", "verify", "apply"].includes(command ?? ""))
|
|
14
|
+
return true;
|
|
15
|
+
if (family === "memory" && command === "permissions" && parsed.positional[2] === "preflight")
|
|
16
|
+
return true;
|
|
17
|
+
if (family === "run" && command === "start")
|
|
18
|
+
return option("flow-kind") === "mb-upgrade";
|
|
19
|
+
const bound = Boolean(option("run") || parsed.positional.some(value => value.startsWith("RUN-")));
|
|
20
|
+
if (family === "stage" && ["start", "pause", "resume", "finish"].includes(command ?? ""))
|
|
21
|
+
return bound;
|
|
22
|
+
if (family === "session" && ["status", "register", "stop", "usage"].includes(command ?? ""))
|
|
23
|
+
return bound;
|
|
24
|
+
if (family === "dashboard" && ["data", "render", "refresh", "open"].includes(command ?? ""))
|
|
25
|
+
return true;
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { AppError } from "../../shared/errors.js";
|
|
4
|
+
/** Presence only: no child process, config/credential read, network or generative probe. */
|
|
5
|
+
export function discoverExecutable(harness, names, input) {
|
|
6
|
+
const platform = input.platform ?? process.platform;
|
|
7
|
+
if (input.executable && !path.isAbsolute(input.executable))
|
|
8
|
+
throw new AppError("usage", "Explicit executable must be an absolute path", 2, { effect: "no_effect" });
|
|
9
|
+
const suffixes = platform === "win32" ? (input.env.PATHEXT ?? ".EXE;.CMD;.BAT;.COM").split(";").filter(suffix => /^\.[A-Za-z0-9]+$/.test(suffix)) : [""];
|
|
10
|
+
const paths = input.executable ? [input.executable] : (input.env.PATH ?? "").split(platform === "win32" ? ";" : path.delimiter)
|
|
11
|
+
.filter(directory => path.isAbsolute(directory)).flatMap(directory => names.flatMap(name => suffixes.map(suffix => path.join(directory, `${name}${suffix}`))));
|
|
12
|
+
const candidates = new Map();
|
|
13
|
+
let unreadable = false;
|
|
14
|
+
for (const file of paths) {
|
|
15
|
+
try {
|
|
16
|
+
if (!fs.statSync(file).isFile())
|
|
17
|
+
continue;
|
|
18
|
+
fs.accessSync(file, platform === "win32" ? fs.constants.F_OK : fs.constants.X_OK);
|
|
19
|
+
candidates.set(fs.realpathSync(file), file);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
if (!["ENOENT", "ENOTDIR"].includes(error.code ?? ""))
|
|
23
|
+
unreadable = true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const selected = candidates.size === 1;
|
|
27
|
+
return { harness, candidates: [...candidates.keys()].map(file => ({ path: file, version: null, selected })),
|
|
28
|
+
installed: selected ? "yes" : candidates.size > 1 || unreadable ? "unknown" : "no",
|
|
29
|
+
compatible: "unknown", protocol: "unknown", auth: "unknown", qualified: "unknown", evidence: [],
|
|
30
|
+
reason: selected ? "executable_present_no_qualification_probe" : candidates.size > 1 ? "multiple_installations_require_explicit_selection" : unreadable ? "filesystem_observation_incomplete" : "executable_not_found" };
|
|
31
|
+
}
|
package/dist/services/engines.js
CHANGED
|
@@ -19,7 +19,6 @@ import { allRunEngineBindings, locateRunRoot, readRunEngineBinding, runEngineBin
|
|
|
19
19
|
export const engineManifestSchemaId = "dd-flow/engine-manifest@1";
|
|
20
20
|
const routerNativeFamilies = new Set(["engine", "version", "schema"]);
|
|
21
21
|
const sourceFile = fileURLToPath(import.meta.url);
|
|
22
|
-
const packageRequire = createRequire(sourceFile);
|
|
23
22
|
export function isEngineMode(env) {
|
|
24
23
|
return env.DD_FLOW_ENGINE_MODE === "1";
|
|
25
24
|
}
|
|
@@ -31,7 +30,7 @@ export function isRouterNativeCommand(args) {
|
|
|
31
30
|
return true;
|
|
32
31
|
if (args.includes("--help") || args.includes("-h"))
|
|
33
32
|
return true;
|
|
34
|
-
return routerNativeFamilies.has(first) || first === "codex" && args[1] === "hook" && args[2] === "handle";
|
|
33
|
+
return first === "run" && args[1] === "reconcile" || routerNativeFamilies.has(first) || first === "codex" && args[1] === "hook" && args[2] === "handle";
|
|
35
34
|
}
|
|
36
35
|
export function installCurrentEngine(context, input = {}) {
|
|
37
36
|
const installation = prepareInstallation(context, input);
|
|
@@ -716,7 +715,7 @@ function copyPackageSnapshot(packageRoot, target) {
|
|
|
716
715
|
}
|
|
717
716
|
}
|
|
718
717
|
/** The same source inventory drives validation and copying; no staging writes. */
|
|
719
|
-
function packageSnapshotFiles(packageRoot) {
|
|
718
|
+
export function packageSnapshotFiles(packageRoot) {
|
|
720
719
|
const files = new Map();
|
|
721
720
|
const collect = (source, relative, skipNodeModules = false) => {
|
|
722
721
|
if (!fs.statSync(source).isDirectory()) {
|
|
@@ -739,8 +738,9 @@ function packageSnapshotFiles(packageRoot) {
|
|
|
739
738
|
continue;
|
|
740
739
|
collect(from, item);
|
|
741
740
|
}
|
|
742
|
-
const queue = [{ sourceRoot: packageRoot, targetRoot: ""
|
|
743
|
-
const
|
|
741
|
+
const queue = [{ sourceRoot: packageRoot, targetRoot: "" }];
|
|
742
|
+
const placed = new Map();
|
|
743
|
+
const virtualRoot = path.resolve(path.sep, "dd-flow-snapshot");
|
|
744
744
|
while (queue.length > 0) {
|
|
745
745
|
const current = queue.shift();
|
|
746
746
|
if (!current)
|
|
@@ -749,15 +749,19 @@ function packageSnapshotFiles(packageRoot) {
|
|
|
749
749
|
const sourceRoot = resolvePackageRoot(dependency, current.sourceRoot);
|
|
750
750
|
if (!sourceRoot)
|
|
751
751
|
throw new AppError("engine_install_failed", `Cannot resolve runtime dependency: ${dependency}`, 1);
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
752
|
+
// Standard Node lookup permits hoisting identical selected packages.
|
|
753
|
+
// Copying a shared DAG under every parent makes SDK snapshots grow
|
|
754
|
+
// exponentially; conflicting versions still need their own local slot.
|
|
755
|
+
const search = createRequire(path.join(virtualRoot, current.targetRoot, "package.json")).resolve.paths(dependency) ?? [];
|
|
756
|
+
const candidates = search.filter(directory => directory.startsWith(`${virtualRoot}${path.sep}`))
|
|
757
|
+
.map(directory => path.relative(virtualRoot, path.join(directory, dependency)));
|
|
758
|
+
const existing = candidates.find(candidate => placed.has(candidate));
|
|
759
|
+
if (existing && placed.get(existing) === sourceRoot)
|
|
755
760
|
continue;
|
|
756
|
-
|
|
761
|
+
const targetRoot = existing ? path.join(current.targetRoot, "node_modules", dependency) : path.join("node_modules", dependency);
|
|
762
|
+
placed.set(targetRoot, sourceRoot);
|
|
757
763
|
collect(sourceRoot, targetRoot, true);
|
|
758
|
-
|
|
759
|
-
continue;
|
|
760
|
-
queue.push({ sourceRoot, targetRoot, ancestors: new Set([...current.ancestors, sourceRoot]) });
|
|
764
|
+
queue.push({ sourceRoot, targetRoot });
|
|
761
765
|
}
|
|
762
766
|
}
|
|
763
767
|
return files;
|
|
@@ -806,20 +810,14 @@ function readProductionDependencies(packageRoot) {
|
|
|
806
810
|
}
|
|
807
811
|
}
|
|
808
812
|
function resolvePackageRoot(name, from) {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
if (parent === current)
|
|
816
|
-
return null;
|
|
817
|
-
current = parent;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
catch {
|
|
821
|
-
return null;
|
|
813
|
+
// Inspect package roots through Node's lookup paths, not the require entry:
|
|
814
|
+
// production dependencies can expose only an ESM import condition.
|
|
815
|
+
for (const directory of createRequire(path.join(from, "package.json")).resolve.paths(name) ?? []) {
|
|
816
|
+
const candidate = path.join(directory, name);
|
|
817
|
+
if (fs.existsSync(path.join(candidate, "package.json")))
|
|
818
|
+
return fs.realpathSync(candidate);
|
|
822
819
|
}
|
|
820
|
+
return null;
|
|
823
821
|
}
|
|
824
822
|
function inferInstallSource(packageRoot, ddFlowHome) {
|
|
825
823
|
const normalized = path.resolve(packageRoot);
|
|
@@ -998,7 +998,7 @@ function nativeDaemonFile(file) {
|
|
|
998
998
|
return false;
|
|
999
999
|
try {
|
|
1000
1000
|
const state = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
1001
|
-
return typeof state.daemon_id === "string" && /^dd-(codex|zcode|grok|agy|opencode|droid)\/daemon-state@1$/.test(String(state.schema_id));
|
|
1001
|
+
return typeof state.daemon_id === "string" && (/^dd-(codex|zcode|grok|agy|opencode|droid)\/daemon-state@1$/.test(String(state.schema_id)) || state.schema_id === "dd-opencode/daemon-state@2");
|
|
1002
1002
|
}
|
|
1003
1003
|
catch {
|
|
1004
1004
|
return false;
|