opencode-agent-orchestration-kit 1.1.0 → 1.1.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/README.md +2 -2
- package/docs/models.md +1 -1
- package/docs/releases/v1.1.1.md +54 -0
- package/docs/supply-chain.md +6 -1
- package/opencode/scripts/collect-session-evidence.mjs +4 -6
- package/opencode/scripts/session-sources.d.mts +1 -1
- package/opencode/scripts/session-sources.mjs +6 -6
- package/opencode/scripts/session-sources.test.mjs +41 -0
- package/package.json +1 -1
- package/scripts/benchmark-tool-paths.mjs +1 -1
- package/scripts/package-smoke.test.mjs +3 -3
- package/scripts/version.test.mjs +2 -2
package/README.md
CHANGED
|
@@ -425,7 +425,7 @@ After a tagged release is published, you can install the same CLI directly
|
|
|
425
425
|
from GitHub without keeping a checkout:
|
|
426
426
|
|
|
427
427
|
```bash
|
|
428
|
-
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.
|
|
428
|
+
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.1"
|
|
429
429
|
oc-switch
|
|
430
430
|
```
|
|
431
431
|
|
|
@@ -842,7 +842,7 @@ Validate only the canonical identity and current release note with:
|
|
|
842
842
|
|
|
843
843
|
```bash
|
|
844
844
|
npm run check:version
|
|
845
|
-
node scripts/version.mjs --check-tag v1.1.
|
|
845
|
+
node scripts/version.mjs --check-tag v1.1.1
|
|
846
846
|
```
|
|
847
847
|
|
|
848
848
|
Tag validation compares an explicitly supplied tag with the package identity.
|
package/docs/models.md
CHANGED
|
@@ -34,7 +34,7 @@ oc-switch
|
|
|
34
34
|
Once a release tag exists, a checkout is optional:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.
|
|
37
|
+
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.1"
|
|
38
38
|
oc-switch
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# v1.1.1 - Safe lifecycle and canonical release identity
|
|
2
|
+
|
|
3
|
+
This patch release makes the session evidence collector work on large
|
|
4
|
+
OpenCode databases. It loaded every stored part and, in full-rescan mode,
|
|
5
|
+
every message body, although it only reads message roles and text parts. Tool
|
|
6
|
+
output is most of a real database, so on large databases the export alone
|
|
7
|
+
passed the collector's 300-second sqlite3 limit, and exact-root collection and
|
|
8
|
+
`collect-session-evidence --run` always failed there.
|
|
9
|
+
|
|
10
|
+
## Highlights
|
|
11
|
+
|
|
12
|
+
- The collector queries select only message roles and text parts, on both
|
|
13
|
+
OpenCode 1 and OpenCode 2 databases. On a database with 410 MB of part data,
|
|
14
|
+
collecting one execution tree went from a timeout to about ten seconds, and
|
|
15
|
+
the resulting trees are identical to the previous collector's output.
|
|
16
|
+
- The documented publish command uses `./dist/<name>.tgz`: without the leading
|
|
17
|
+
`./`, npm reads the path as a GitHub `owner/repo` shorthand.
|
|
18
|
+
|
|
19
|
+
## Installation or upgrade
|
|
20
|
+
|
|
21
|
+
Install or upgrade the published CLI package:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install --global opencode-agent-orchestration-kit@1.1.1
|
|
25
|
+
oak version
|
|
26
|
+
oak upgrade --dry-run
|
|
27
|
+
oak upgrade
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The npm installation exposes the CLIs but does not mutate OpenCode
|
|
31
|
+
configuration. `oak install` and `oak upgrade` remain separate, explicit
|
|
32
|
+
operations.
|
|
33
|
+
|
|
34
|
+
## Migration
|
|
35
|
+
|
|
36
|
+
No migration is required. Existing harness configuration remains compatible.
|
|
37
|
+
|
|
38
|
+
## Validation performed
|
|
39
|
+
|
|
40
|
+
The public contract check, unit and script suite, typechecks for OpenCode 1
|
|
41
|
+
and OpenCode 2, compatibility and supply-chain checks, installation smoke and
|
|
42
|
+
package smoke passed. GitHub Actions Check was green on the merged pull
|
|
43
|
+
request before the release tag.
|
|
44
|
+
|
|
45
|
+
## Public safety boundary
|
|
46
|
+
|
|
47
|
+
The public release excludes private OpenCode and Pi configuration, local
|
|
48
|
+
providers and MCP wiring, credentials, authentication files, provider URLs,
|
|
49
|
+
raw transcripts, private evidence, absolute machine-local paths, and runtime
|
|
50
|
+
state. The database measurements behind this change stayed private: no model
|
|
51
|
+
names, session identifiers, or local database paths reached this repository.
|
|
52
|
+
|
|
53
|
+
Boundary statement: no private config, no credentials, no provider URLs, no
|
|
54
|
+
raw transcripts, no machine-local paths.
|
package/docs/supply-chain.md
CHANGED
|
@@ -103,9 +103,14 @@ git diff --check
|
|
|
103
103
|
test -z "$(git status --porcelain)"
|
|
104
104
|
TAG="$(git describe --tags --exact-match)"
|
|
105
105
|
node scripts/version.mjs --check-tag "$TAG"
|
|
106
|
-
npm publish "dist/opencode-agent-orchestration-kit-${VERSION}.tgz"
|
|
106
|
+
npm publish "./dist/opencode-agent-orchestration-kit-${VERSION}.tgz"
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
Keep the leading `./`: npm reads `dist/<name>.tgz` as a GitHub `owner/repo`
|
|
110
|
+
shorthand and fails with a git error. With two-factor authentication, npm asks
|
|
111
|
+
the maintainer for a one-time password or a browser confirmation; publication
|
|
112
|
+
stays a human step.
|
|
113
|
+
|
|
109
114
|
The Node checksum command is canonical on macOS and Linux; neither `shasum`
|
|
110
115
|
nor `sha256sum` is required. `dist/` is ignored, so its artifacts do not make
|
|
111
116
|
the tracked checkout dirty. The clean-state check still rejects tracked or
|
|
@@ -331,7 +331,7 @@ async function summarizeSqlite(dbPath, previousCursor, fullRescan) {
|
|
|
331
331
|
|
|
332
332
|
const schemas = pickSessionSchemas(await streamSqliteJson(dbPath, SESSION_TABLES_SQL, 300_000)).map((schema) => ({
|
|
333
333
|
schema,
|
|
334
|
-
queries: sessionQueries(schema, {
|
|
334
|
+
queries: sessionQueries(schema, { cutoffFilter }),
|
|
335
335
|
}));
|
|
336
336
|
|
|
337
337
|
// Session query: always full (lightweight, needed for parent resolution)
|
|
@@ -361,7 +361,7 @@ async function summarizeSqlite(dbPath, previousCursor, fullRescan) {
|
|
|
361
361
|
// Apply time cutoff when not in full-rescan mode
|
|
362
362
|
for (const row of await streamSqliteJson(dbPath, queries.messages, 300_000)) if (owned(row)) messages.push(row);
|
|
363
363
|
|
|
364
|
-
// Part query:
|
|
364
|
+
// Part query: text parts only, with the time cutoff when not in full-rescan mode
|
|
365
365
|
for (const row of await streamSqliteJson(dbPath, queries.parts, 300_000)) if (owned(row)) parts.push(row);
|
|
366
366
|
}
|
|
367
367
|
|
|
@@ -401,10 +401,8 @@ async function summarizeSqlite(dbPath, previousCursor, fullRescan) {
|
|
|
401
401
|
const userMessages = [];
|
|
402
402
|
const assistantMessages = [];
|
|
403
403
|
for (const message of sessionMessages) {
|
|
404
|
-
//
|
|
405
|
-
|
|
406
|
-
const parsedData = parseJson(message.data);
|
|
407
|
-
const role = message.role || (parsedData.ok ? parsedData.value?.role : null);
|
|
404
|
+
// The message query extracts the role in SQL.
|
|
405
|
+
const role = message.role;
|
|
408
406
|
if (role === "user") userMessages.push(message);
|
|
409
407
|
if (role === "assistant") assistantMessages.push(message);
|
|
410
408
|
}
|
|
@@ -2,5 +2,5 @@ export const SESSION_TABLES_SQL: string;
|
|
|
2
2
|
export function pickSessionSchemas(rows: ReadonlyArray<{ name: string }>): Array<"v1" | "v2">;
|
|
3
3
|
export function sessionQueries(
|
|
4
4
|
schema: "v1" | "v2",
|
|
5
|
-
options: {
|
|
5
|
+
options: { cutoffFilter: string },
|
|
6
6
|
): { sessions: string; messages: string; parts: string };
|
|
@@ -21,21 +21,21 @@ export function pickSessionSchemas(rows) {
|
|
|
21
21
|
return schemas;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
// summarizeSqlite reads only message roles and text parts. Tool output makes up
|
|
25
|
+
// most of a real database, so the queries never load message data or other parts.
|
|
26
|
+
export function sessionQueries(schema, { cutoffFilter }) {
|
|
25
27
|
// oak:v1-only — start
|
|
26
28
|
if (schema === "v1") {
|
|
27
29
|
return {
|
|
28
30
|
sessions: `select ${SESSION_COLUMNS} from session order by time_updated desc, id desc;`,
|
|
29
|
-
messages:
|
|
30
|
-
|
|
31
|
-
: `select id, session_id, time_created, time_updated, json_extract(data, '$.role') as role from message where 1=1 ${cutoffFilter} order by session_id, time_created, id;`,
|
|
32
|
-
parts: `select id, message_id, session_id, time_created, time_updated, data from part where 1=1 ${cutoffFilter} order by session_id, time_created, id;`,
|
|
31
|
+
messages: `select id, session_id, time_created, time_updated, json_extract(data, '$.role') as role from message where 1=1 ${cutoffFilter} order by session_id, time_created, id;`,
|
|
32
|
+
parts: `select id, message_id, session_id, time_created, time_updated, data from part where json_extract(data, '$.type') = 'text' ${cutoffFilter} order by session_id, time_created, id;`,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
// oak:v1-only — end
|
|
36
36
|
return {
|
|
37
37
|
sessions: `select ${SESSION_COLUMNS} from session_v2 order by time_updated desc, id desc;`,
|
|
38
|
-
messages: `select id, session_id, time_created, time_updated, type as role
|
|
38
|
+
messages: `select id, session_id, time_created, time_updated, type as role from session_message where type in ('user', 'assistant') ${cutoffFilter} order by session_id, time_created, id;`,
|
|
39
39
|
parts: `
|
|
40
40
|
select id, id as message_id, session_id, time_created, time_updated,
|
|
41
41
|
json_object('type', 'text', 'text', json_extract(data, '$.text')) as data
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import test from "node:test";
|
|
7
|
+
import { sessionQueries } from "./session-sources.mjs";
|
|
8
|
+
|
|
9
|
+
function query(dbPath, sql) {
|
|
10
|
+
const result = spawnSync("sqlite3", ["-json", dbPath, sql], { encoding: "utf8" });
|
|
11
|
+
assert.equal(result.status, 0, result.stderr);
|
|
12
|
+
return result.stdout.trim() ? JSON.parse(result.stdout) : [];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Tool output makes up most of a real OpenCode 1 database, and the collector
|
|
16
|
+
// only reads message roles and text parts, so the queries must not load the rest.
|
|
17
|
+
test("OpenCode 1 queries load only message roles and text parts", (t) => {
|
|
18
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "session-sources-"));
|
|
19
|
+
t.after(() => fs.rmSync(tmp, { recursive: true, force: true }));
|
|
20
|
+
const dbPath = path.join(tmp, "opencode.db");
|
|
21
|
+
const sql = `
|
|
22
|
+
create table message (id text, session_id text, time_created integer, time_updated integer, data text);
|
|
23
|
+
create table part (id text, message_id text, session_id text, time_created integer, time_updated integer, data text);
|
|
24
|
+
insert into message values ('m1', 's1', 1, 1, '{"role":"assistant","big":"${"x".repeat(1000)}"}');
|
|
25
|
+
insert into part values
|
|
26
|
+
('p1', 'm1', 's1', 1, 1, '{"type":"tool","output":"${"y".repeat(1000)}"}'),
|
|
27
|
+
('p2', 'm1', 's1', 1, 1, '{"type":"text","text":"summary"}'),
|
|
28
|
+
('p3', 'm1', 's1', 1, 1, '{"type":"reasoning","text":"hidden"}');
|
|
29
|
+
`;
|
|
30
|
+
assert.equal(spawnSync("sqlite3", [dbPath, sql]).status, 0);
|
|
31
|
+
|
|
32
|
+
const queries = sessionQueries("v1", { cutoffFilter: "" });
|
|
33
|
+
assert.deepEqual(query(dbPath, queries.messages), [
|
|
34
|
+
{ id: "m1", session_id: "s1", time_created: 1, time_updated: 1, role: "assistant" },
|
|
35
|
+
]);
|
|
36
|
+
assert.deepEqual(query(dbPath, queries.parts).map((row) => row.id), ["p2"]);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("OpenCode 2 message queries never load message data", () => {
|
|
40
|
+
assert.doesNotMatch(sessionQueries("v2", { cutoffFilter: "" }).messages, /\bdata\b/);
|
|
41
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agent-orchestration-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open-source multi-agent orchestration harness for OpenCode with specialized agents, durable workflows, review gates, and reproducible software-engineering processes.",
|
|
6
6
|
"keywords": [
|
|
@@ -143,7 +143,7 @@ async function benchmarkFixture(fixture, iterations, temporaryRoot) {
|
|
|
143
143
|
const result = await createInstallationManager({
|
|
144
144
|
sourceRoot: fixture.sourceRoot,
|
|
145
145
|
repositoryRoot: fixture.root,
|
|
146
|
-
versionProvider: () => "1.1.
|
|
146
|
+
versionProvider: () => "1.1.1",
|
|
147
147
|
}).run("install", { targetRoot });
|
|
148
148
|
if (result.exitCode !== 0) throw invalid(`installation benchmark failed for ${fixture.id}`);
|
|
149
149
|
} finally {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
|
|
19
19
|
const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
|
20
20
|
const HASH = "a".repeat(64);
|
|
21
|
-
const BASENAME = "opencode-agent-orchestration-kit-1.1.
|
|
21
|
+
const BASENAME = "opencode-agent-orchestration-kit-1.1.1.tgz";
|
|
22
22
|
const REQUIRED = [
|
|
23
23
|
"package/package.json",
|
|
24
24
|
"package/supply-chain.json",
|
|
@@ -228,7 +228,7 @@ test("smokeTarball checks the tracked set before extraction", async () => {
|
|
|
228
228
|
await assert.rejects(
|
|
229
229
|
smokeTarball({
|
|
230
230
|
repositoryRoot: ROOT,
|
|
231
|
-
tarball: "/public/opencode-agent-orchestration-kit-1.1.
|
|
231
|
+
tarball: "/public/opencode-agent-orchestration-kit-1.1.1.tgz",
|
|
232
232
|
captureTarball(_source, destination) {
|
|
233
233
|
fs.writeFileSync(destination, "fixture");
|
|
234
234
|
return { size: 1 };
|
|
@@ -253,7 +253,7 @@ test("smokeTarball validates both archive listings before extraction", async ()
|
|
|
253
253
|
await assert.rejects(
|
|
254
254
|
smokeTarball({
|
|
255
255
|
repositoryRoot: ROOT,
|
|
256
|
-
tarball: "/public/opencode-agent-orchestration-kit-1.1.
|
|
256
|
+
tarball: "/public/opencode-agent-orchestration-kit-1.1.1.tgz",
|
|
257
257
|
captureTarball(_source, destination) {
|
|
258
258
|
fs.writeFileSync(destination, "fixture");
|
|
259
259
|
return { size: 1 };
|
package/scripts/version.test.mjs
CHANGED
|
@@ -109,7 +109,7 @@ test("[V004] direct version entrypoints are exact and mutation-free", (t) => {
|
|
|
109
109
|
for (const args of [["scripts/version.mjs"], ["scripts/manage-installation.mjs", "--version"]]) {
|
|
110
110
|
const result = run(process.execPath, args, { HOME: home });
|
|
111
111
|
assert.equal(result.status, 0, result.stderr);
|
|
112
|
-
assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.
|
|
112
|
+
assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.1\n");
|
|
113
113
|
assert.equal(fs.existsSync(target), false);
|
|
114
114
|
}
|
|
115
115
|
});
|
|
@@ -118,7 +118,7 @@ test("[V005] all lifecycle wrappers expose the canonical version", () => {
|
|
|
118
118
|
for (const wrapper of ["install.sh", "upgrade.sh", "doctor.sh", "uninstall.sh", "rollback.sh"]) {
|
|
119
119
|
const result = run(path.join(REPOSITORY_ROOT, wrapper), ["--version"]);
|
|
120
120
|
assert.equal(result.status, 0, `${wrapper}: ${result.stderr}`);
|
|
121
|
-
assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.
|
|
121
|
+
assert.equal(result.stdout, "opencode-agent-orchestration-kit 1.1.1\n", wrapper);
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
|