@sleep2agi/agent-network 2.3.0-preview.136 → 2.3.0-preview.138
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/dist/bin/cli.d.ts +1 -1
- package/dist/bin/cli.js +2 -2
- package/dist/src/client.js +1 -1
- package/dist/src/codex-menu.d.ts +1 -1
- package/dist/src/codex-resume.d.ts +89 -0
- package/dist/src/node-server.js +8 -8
- package/dist/src/opencode-agent-node-pair.d.ts +6 -6
- package/dist/src/opencode-generation-record.d.ts +24 -0
- package/dist/src/opencode-package-binary.d.ts +15 -0
- package/dist/src/opencode-pin.d.ts +19 -2
- package/dist/src/opencode-versions.d.ts +32 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.
|
|
2
|
-
export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.
|
|
3
|
-
export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.
|
|
4
|
-
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.
|
|
5
|
-
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.
|
|
6
|
-
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.
|
|
1
|
+
export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.138";
|
|
2
|
+
export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.105";
|
|
3
|
+
export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.105";
|
|
4
|
+
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.138";
|
|
5
|
+
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.105";
|
|
6
|
+
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.105";
|
|
7
7
|
export type PairedAgentNodeResolution = {
|
|
8
8
|
spec: string;
|
|
9
9
|
args: string[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type OpencodeGeneration } from "./opencode-versions";
|
|
2
|
+
export declare const OPENCODE_GENERATION_FIELD = "opencodeGeneration";
|
|
3
|
+
/** Profile about to be serialised by saveProfile: add the generation when it
|
|
4
|
+
* is missing, otherwise return the very same object. */
|
|
5
|
+
export declare function stampOpencodeGeneration<T extends Record<string, any>>(profile: T, generation?: OpencodeGeneration): T;
|
|
6
|
+
/**
|
|
7
|
+
* Raw `config.json` text → the same text with `opencodeGeneration` appended,
|
|
8
|
+
* or null when nothing should be written:
|
|
9
|
+
* – the field is already present (whatever its value), or
|
|
10
|
+
* – the file is not valid JSON / not an object, or
|
|
11
|
+
* – the file is not in the canonical `JSON.stringify(_, null, 2) + "\n"`
|
|
12
|
+
* form saveProfile writes (hand-edited). Re-serialising such a file could
|
|
13
|
+
* touch bytes of other fields, and an absent field already means V1.
|
|
14
|
+
* In the canonical case the result differs from the input only by the one
|
|
15
|
+
* appended key, so every other field keeps its exact bytes.
|
|
16
|
+
*/
|
|
17
|
+
export declare function recordOpencodeGenerationInConfigText(raw: string, generation?: OpencodeGeneration): string | null;
|
|
18
|
+
/** Start-time backfill for a node created before #542. IO is injected so the
|
|
19
|
+
* caller keeps its own symlink-safe private-file reader/writer. Never throws:
|
|
20
|
+
* the record is advisory and an absent field already reads as V1. */
|
|
21
|
+
export declare function backfillOpencodeGeneration(io: {
|
|
22
|
+
read: () => string | undefined;
|
|
23
|
+
write: (body: string) => void;
|
|
24
|
+
}): boolean;
|
|
@@ -24,3 +24,18 @@ export declare function validateOpencodePackageBinary(rawBinary: string, options
|
|
|
24
24
|
export declare const OPENCODE_VERIFIER_PLATFORMS: ReadonlySet<NodeJS.Platform>;
|
|
25
25
|
export declare function opencodeVerifierSupportsPlatform(platform?: NodeJS.Platform): boolean;
|
|
26
26
|
export declare function resolveOpencodePackageBinaryFromPath(searchPath: string, options: ValidateOpencodePackageBinaryOptions, platform?: NodeJS.Platform): string;
|
|
27
|
+
/**
|
|
28
|
+
* Board #541 — resolve the first trusted package entrypoint matching any of
|
|
29
|
+
* `acceptedVersions`, trying each version across the whole PATH in order (the
|
|
30
|
+
* release pin first), and report which exact version was admitted. Every
|
|
31
|
+
* candidate still goes through the full `validateOpencodePackageBinary`
|
|
32
|
+
* identity gate; only the accepted version set is wider. When nothing matches,
|
|
33
|
+
* the error from the first (release-pin) attempt is rethrown so diagnostics
|
|
34
|
+
* keep naming the pin the operator should install.
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveAcceptedOpencodePackageBinaryFromPath(searchPath: string, options: Omit<ValidateOpencodePackageBinaryOptions, "expectedVersion"> & {
|
|
37
|
+
acceptedVersions: readonly string[];
|
|
38
|
+
}, platform?: NodeJS.Platform): {
|
|
39
|
+
binary: string;
|
|
40
|
+
version: string;
|
|
41
|
+
};
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Version this branch was validated against by the maintainers.
|
|
3
|
-
* Bumped when a new opencode-ai release passes the full Docker/E2E gate
|
|
3
|
+
* Bumped when a new opencode-ai release passes the full Docker/E2E gate —
|
|
4
|
+
* in the shared supported-versions table (`opencode-versions.ts`, #542),
|
|
5
|
+
* which agent-node's package gate reads from its byte-identical copy.
|
|
4
6
|
*/
|
|
5
|
-
export declare const OPENCODE_BUILTIN_PIN = "1.18.
|
|
7
|
+
export declare const OPENCODE_BUILTIN_PIN = "1.18.34";
|
|
8
|
+
/**
|
|
9
|
+
* Earlier release pins that remain accepted for one transition window so a
|
|
10
|
+
* host still holding the previous exact install keeps starting after an anet
|
|
11
|
+
* upgrade (board #541). Each entry passed the full Docker/E2E gate when it was
|
|
12
|
+
* the pin; start prints `opencodeLegacyPinNote()` so the operator upgrades.
|
|
13
|
+
* Derived from the shared supported-versions table (#542: v1 accepted
|
|
14
|
+
* versions minus the pin) — agent-node's gate reads the same table.
|
|
15
|
+
*/
|
|
16
|
+
export declare const OPENCODE_TRANSITION_VERSIONS: readonly string[];
|
|
17
|
+
/** Versions a start may accept, preferred first: the release pin, then the
|
|
18
|
+
* transition versions. The order matters — a PATH holding both resolves to
|
|
19
|
+
* the release pin. */
|
|
20
|
+
export declare function acceptedOpencodeVersions(pin?: string): string[];
|
|
21
|
+
/** One-line upgrade note when a start accepted a transition version, else null. */
|
|
22
|
+
export declare function opencodeLegacyPinNote(found: string, pin?: string): string | null;
|
|
6
23
|
/** Exact upstream remediation shared by every CLI failure path. */
|
|
7
24
|
export declare function opencodeExactInstallCommand(version?: string): string;
|
|
8
25
|
/** Preserve package-identity diagnostics while always leaving a missing or
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type OpencodeGeneration = "v1" | "v2";
|
|
2
|
+
export type OpencodeSupportStatus = "supported" | "preview" | "unsupported";
|
|
3
|
+
export interface OpencodeGenerationSupport {
|
|
4
|
+
readonly generation: OpencodeGeneration;
|
|
5
|
+
/** npm package that provides the `opencode` executable. */
|
|
6
|
+
readonly packageName: string;
|
|
7
|
+
/** Release pin: the exact version a fresh install is told to use.
|
|
8
|
+
* null when no version of this generation is vetted. */
|
|
9
|
+
readonly pin: string | null;
|
|
10
|
+
/** Every exact version a start may accept, preferred first (pin first).
|
|
11
|
+
* Empty when the generation is unsupported. */
|
|
12
|
+
readonly acceptedVersions: readonly string[];
|
|
13
|
+
readonly status: OpencodeSupportStatus;
|
|
14
|
+
}
|
|
15
|
+
/** The V1 release pin. Kept as its own literal line so shell suites can
|
|
16
|
+
* read it with a single anchored sed (tests/test1225…/run.sh). */
|
|
17
|
+
export declare const OPENCODE_V1_PIN = "1.18.34";
|
|
18
|
+
export declare const OPENCODE_SUPPORTED_VERSIONS: readonly OpencodeGenerationSupport[];
|
|
19
|
+
/** Generation assumed for every node record that does not name one. */
|
|
20
|
+
export declare const OPENCODE_DEFAULT_GENERATION: OpencodeGeneration;
|
|
21
|
+
export declare function isOpencodeGeneration(value: unknown): value is OpencodeGeneration;
|
|
22
|
+
export declare function opencodeGenerationSupport(generation: OpencodeGeneration): OpencodeGenerationSupport;
|
|
23
|
+
/** Exact versions a start may accept for `generation`, preferred first.
|
|
24
|
+
* Always empty for an unsupported generation. */
|
|
25
|
+
export declare function acceptedOpencodeVersionsFor(generation: OpencodeGeneration): readonly string[];
|
|
26
|
+
export declare function isAcceptedOpencodeVersionFor(generation: OpencodeGeneration, version: string): boolean;
|
|
27
|
+
/** Generation recorded on a node config; a config without one (every node
|
|
28
|
+
* created before #542) is V1. An unrecognised value is returned as
|
|
29
|
+
* undefined so callers can refuse it instead of guessing. */
|
|
30
|
+
export declare function opencodeGenerationOfConfig(config: {
|
|
31
|
+
opencodeGeneration?: unknown;
|
|
32
|
+
} | null | undefined): OpencodeGeneration | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleep2agi/agent-network",
|
|
3
|
-
"version": "2.3.0-preview.
|
|
3
|
+
"version": "2.3.0-preview.138",
|
|
4
4
|
"description": "AI Agent Network CLI — Local-first multi-agent orchestration across 6 runtimes (Claude Code CLI / Claude Agent SDK / Codex SDK / Codex app-server / Grok Build ACP / OpenCode CLI) and 8+ LLM providers. Apache 2.0.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/client.js",
|