opencode-swarm 7.170.2 → 7.171.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/delegation-lifecycle.d.ts +5 -0
- package/dist/cli/{coder-settlement-rrm3ngsa.js → coder-settlement-vxpmxk46.js} +7 -7
- package/dist/cli/{config-doctor-rnfyv55m.js → config-doctor-vwy3c9g9.js} +2 -2
- package/dist/cli/{core-b161yfjy.js → core-2znms60v.js} +1 -1
- package/dist/cli/{curation-policy-tg84dnnd.js → curation-policy-fakrpw5t.js} +4 -4
- package/dist/cli/{curator-drift-3ssjr0nx.js → curator-drift-r9r8gepb.js} +2 -2
- package/dist/cli/{curator-dfcpzqwr.js → curator-kc80aj6d.js} +32 -32
- package/dist/cli/{curator-llm-factory-cjrh0sa3.js → curator-llm-factory-exke3rag.js} +32 -32
- package/dist/cli/{evidence-summary-service-7jfq6dax.js → evidence-summary-service-g3gr1pfs.js} +13 -13
- package/dist/cli/{gate-evidence-0e70dqjg.js → gate-evidence-8mwsj2b7.js} +4 -4
- package/dist/cli/{guardrail-explain-a40pmzzc.js → guardrail-explain-pkbjswtd.js} +33 -33
- package/dist/cli/{guardrail-log-71wvwyd0.js → guardrail-log-qx1tpeda.js} +6 -6
- package/dist/cli/{guardrail-reset-znw5636e.js → guardrail-reset-v91p8ca6.js} +32 -32
- package/dist/cli/{hive-promoter-pznn5yfn.js → hive-promoter-02vxb018.js} +32 -32
- package/dist/cli/{index-zr6ev5kt.js → index-0caqxnby.js} +1 -1
- package/dist/cli/{index-7pgzjj3z.js → index-2j0pd6sj.js} +32 -32
- package/dist/cli/{index-4say55ww.js → index-3jcp3zb6.js} +1 -1
- package/dist/cli/{index-2q6qj0vw.js → index-3jwamrzw.js} +3 -3
- package/dist/cli/{index-j1tjd6aq.js → index-3zzyxs7q.js} +5 -5
- package/dist/cli/{index-9g3c0w22.js → index-4rq1d5k5.js} +2 -1
- package/dist/cli/{index-g2sc35qk.js → index-4sf357vj.js} +3 -3
- package/dist/cli/{index-x067zyvp.js → index-5134766r.js} +6 -6
- package/dist/cli/{index-we9jztxd.js → index-5vgd9st3.js} +6 -6
- package/dist/cli/{index-p6zt0qm1.js → index-6k5aq7b9.js} +2 -2
- package/dist/cli/{index-z4ewmn1h.js → index-6mjtptnb.js} +1 -1
- package/dist/cli/{index-dbg2g834.js → index-7pae558g.js} +6 -6
- package/dist/cli/{index-70avfxnw.js → index-7qqwx64h.js} +5 -5
- package/dist/cli/{index-45x6meqp.js → index-8nbzfbjg.js} +5 -5
- package/dist/cli/{index-g0q47r3r.js → index-95e3a9en.js} +1 -1
- package/dist/cli/{index-4m9hfbhe.js → index-9cp6bhx9.js} +3 -3
- package/dist/cli/{index-7sz2rkx3.js → index-9dz2ee2g.js} +74 -52
- package/dist/cli/{index-br3mvbsa.js → index-aa2eyfvr.js} +2 -2
- package/dist/cli/{index-1kt9xbrt.js → index-cdee25pp.js} +2 -2
- package/dist/cli/{index-efkxjmdb.js → index-d5pk5b95.js} +2 -2
- package/dist/cli/{index-d1sdve0x.js → index-d6bs0p6d.js} +7 -7
- package/dist/cli/{index-3q7bb7qz.js → index-dr1ym009.js} +9 -9
- package/dist/cli/{index-a0vggadp.js → index-er6sk4e6.js} +1 -1
- package/dist/cli/{index-sf32ny5w.js → index-evxd1art.js} +1 -1
- package/dist/cli/{index-bernkwgf.js → index-g6nen3gt.js} +1 -1
- package/dist/cli/{index-cgpwjctj.js → index-kb66he4e.js} +1 -1
- package/dist/cli/{index-29gnavqx.js → index-m1j1rth6.js} +1 -1
- package/dist/cli/{index-5y7kqjyt.js → index-nfs78aqj.js} +1 -1
- package/dist/cli/{index-9vxaf499.js → index-rdjmbeex.js} +1 -1
- package/dist/cli/{index-gs4m1dxw.js → index-rkj71ej6.js} +3 -3
- package/dist/cli/{index-24pamt0h.js → index-s7h6txsk.js} +2 -2
- package/dist/cli/{index-8v2k9xqv.js → index-vs7b2pqm.js} +4 -4
- package/dist/cli/{index-19xctk9g.js → index-wn9gf91x.js} +1 -1
- package/dist/cli/{index-7htmxmjp.js → index-xefajbqv.js} +2734 -1698
- package/dist/cli/{index-w79t20a6.js → index-xm0131fx.js} +5 -5
- package/dist/cli/{index-dvbf6fpn.js → index-yqbnsmmv.js} +39 -0
- package/dist/cli/{index-7a180w76.js → index-ztxh3nmf.js} +34 -34
- package/dist/cli/index.js +32 -32
- package/dist/cli/{knowledge-escalator-95gqgg8e.js → knowledge-escalator-4j6xgcvj.js} +10 -10
- package/dist/cli/{knowledge-events-hcx770h3.js → knowledge-events-5ax1g356.js} +8 -8
- package/dist/cli/{knowledge-link-twmzh8cf.js → knowledge-link-vh9pfnb9.js} +3 -3
- package/dist/cli/{knowledge-store-ppmrqs41.js → knowledge-store-2nrtfb5x.js} +4 -4
- package/dist/cli/{knowledge-validator-63rfvqmw.js → knowledge-validator-efcax8g9.js} +6 -6
- package/dist/cli/{pending-delegations-dqdetx92.js → pending-delegations-29qj2kya.js} +9 -9
- package/dist/cli/{pr-subscriptions-z9t7f7m0.js → pr-subscriptions-t51vcrvd.js} +9 -9
- package/dist/cli/{pr-workflow-gate-wqrcb5m8.js → pr-workflow-gate-03367gvd.js} +32 -32
- package/dist/cli/{runner-2r5j33tm.js → runner-8m8qhngm.js} +4 -4
- package/dist/cli/{scan-cursor-xzmmf7r4.js → scan-cursor-nhxpv6tj.js} +5 -5
- package/dist/cli/{schema-6bn7mj29.js → schema-ht5hmsce.js} +1 -1
- package/dist/cli/{scope-persistence-wyg0rb07.js → scope-persistence-6qebaksv.js} +13 -13
- package/dist/cli/{skill-generator-kwnwapfn.js → skill-generator-tfm4kawf.js} +12 -12
- package/dist/cli/{snapshot-coordination-init-ajvmd1z6.js → snapshot-coordination-init-zgfjjv9p.js} +32 -32
- package/dist/cli/{telemetry-yst95z2f.js → telemetry-0mz37v3h.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-dm6nq9yw.js → worktree-collision-ownership-6mgm8p9g.js} +9 -9
- package/dist/cli/{worktree-isolation-b10h20sv.js → worktree-isolation-02rr7t21.js} +32 -32
- package/dist/commands/dataset.d.ts +20 -0
- package/dist/commands/registry.d.ts +39 -0
- package/dist/db/observability-event-store.d.ts +17 -1
- package/dist/index.js +356 -338
- package/dist/observability/catalog.d.ts +3 -3
- package/dist/observability/index.d.ts +1 -1
- package/dist/observability/observe.d.ts +6 -0
- package/dist/pr-review/reducer.d.ts +18 -10
- package/dist/pr-review/types.d.ts +43 -47
- package/dist/telemetry.d.ts +23 -3
- package/dist/tools/repo-map.d.ts +5 -0
- package/dist/training/capture.d.ts +37 -0
- package/dist/training/consent.d.ts +96 -0
- package/dist/training/disk.d.ts +16 -0
- package/dist/training/exporter.d.ts +88 -0
- package/dist/training/paths.d.ts +20 -0
- package/dist/training/redact.d.ts +29 -0
- package/dist/training/vault.d.ts +177 -0
- package/package.json +2 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type TrainingConsent } from './consent';
|
|
3
|
+
import { type DiskFloorCheck } from './disk';
|
|
4
|
+
export declare const TRAINING_VAULT_SCHEMA_VERSION = 1;
|
|
5
|
+
/** Re-exported alias recorded on every vault record (see `./redact.ts`). */
|
|
6
|
+
export declare const REDACTION_VERSION = 1;
|
|
7
|
+
export declare const TrainingVaultKindSchema: z.ZodEnum<{
|
|
8
|
+
user_message: "user_message";
|
|
9
|
+
assistant_message: "assistant_message";
|
|
10
|
+
tool_call: "tool_call";
|
|
11
|
+
tool_result: "tool_result";
|
|
12
|
+
}>;
|
|
13
|
+
export type TrainingVaultKind = z.infer<typeof TrainingVaultKindSchema>;
|
|
14
|
+
export declare const TrainingVaultRecordSchema: z.ZodObject<{
|
|
15
|
+
record_id: z.ZodString;
|
|
16
|
+
schema_version: z.ZodLiteral<1>;
|
|
17
|
+
kind: z.ZodEnum<{
|
|
18
|
+
user_message: "user_message";
|
|
19
|
+
assistant_message: "assistant_message";
|
|
20
|
+
tool_call: "tool_call";
|
|
21
|
+
tool_result: "tool_result";
|
|
22
|
+
}>;
|
|
23
|
+
role: z.ZodString;
|
|
24
|
+
content: z.ZodString;
|
|
25
|
+
content_digest: z.ZodString;
|
|
26
|
+
lineage: z.ZodObject<{
|
|
27
|
+
session_id: z.ZodString;
|
|
28
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
trace_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
project_ref: z.ZodString;
|
|
31
|
+
captured_at: z.ZodString;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
value: z.ZodString;
|
|
36
|
+
provenance: z.ZodString;
|
|
37
|
+
confidence: z.ZodNumber;
|
|
38
|
+
}, z.core.$strict>>;
|
|
39
|
+
provenance: z.ZodObject<{
|
|
40
|
+
plugin_version: z.ZodString;
|
|
41
|
+
source: z.ZodEnum<{
|
|
42
|
+
tool: "tool";
|
|
43
|
+
chat: "chat";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
redaction: z.ZodObject<{
|
|
47
|
+
version: z.ZodLiteral<1>;
|
|
48
|
+
applied: z.ZodBoolean;
|
|
49
|
+
redactions: z.ZodNumber;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
consent: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
version: z.ZodNumber;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
retention: z.ZodObject<{
|
|
56
|
+
expires_at: z.ZodString;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
export type TrainingVaultRecord = z.infer<typeof TrainingVaultRecordSchema>;
|
|
60
|
+
export declare const TrainingWithdrawalTombstoneSchema: z.ZodObject<{
|
|
61
|
+
schema_version: z.ZodLiteral<1>;
|
|
62
|
+
tombstone_id: z.ZodString;
|
|
63
|
+
withdrawn_at: z.ZodString;
|
|
64
|
+
purged_records: z.ZodNumber;
|
|
65
|
+
purged_record_ids_digest: z.ZodString;
|
|
66
|
+
revoked_export_ids: z.ZodArray<z.ZodString>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
export type TrainingWithdrawalTombstone = z.infer<typeof TrainingWithdrawalTombstoneSchema>;
|
|
69
|
+
export type TrainingStopReason = 'quota_bytes' | 'quota_records' | 'disk_floor' | 'consent_missing';
|
|
70
|
+
export interface AppendResult {
|
|
71
|
+
appended: boolean;
|
|
72
|
+
stopReason?: TrainingStopReason;
|
|
73
|
+
}
|
|
74
|
+
export interface QuarantinedItem {
|
|
75
|
+
line: number;
|
|
76
|
+
reason: 'malformed_json' | 'schema_invalid';
|
|
77
|
+
}
|
|
78
|
+
export interface VaultRead {
|
|
79
|
+
records: TrainingVaultRecord[];
|
|
80
|
+
quarantined: QuarantinedItem[];
|
|
81
|
+
}
|
|
82
|
+
export interface VaultStatus {
|
|
83
|
+
recordCount: number;
|
|
84
|
+
vaultBytes: number;
|
|
85
|
+
consentState: 'granted' | 'withdrawn' | 'absent';
|
|
86
|
+
lastStopReason?: string;
|
|
87
|
+
tombstoneCount: number;
|
|
88
|
+
quarantinedCount: number;
|
|
89
|
+
}
|
|
90
|
+
export interface PurgeResult {
|
|
91
|
+
purgedRecords: number;
|
|
92
|
+
tombstone: TrainingWithdrawalTombstone;
|
|
93
|
+
revokedExports: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface LabelInput {
|
|
96
|
+
name: string;
|
|
97
|
+
value: string;
|
|
98
|
+
provenance: string;
|
|
99
|
+
confidence: number;
|
|
100
|
+
}
|
|
101
|
+
export interface BuildRecordInput {
|
|
102
|
+
directory: string;
|
|
103
|
+
kind: TrainingVaultKind;
|
|
104
|
+
role: string;
|
|
105
|
+
content: string;
|
|
106
|
+
sessionId: string;
|
|
107
|
+
taskId?: string;
|
|
108
|
+
traceId?: string;
|
|
109
|
+
pluginVersion: string;
|
|
110
|
+
source: 'chat' | 'tool';
|
|
111
|
+
consent: TrainingConsent;
|
|
112
|
+
labels?: LabelInput[];
|
|
113
|
+
now?: Date;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Build a vault record per the frozen contract: content is bounded FIRST
|
|
117
|
+
* (4096 chars) then redacted (redaction placeholders can outgrow the spans
|
|
118
|
+
* they replace; bounding after redaction would collapse distinct inputs onto
|
|
119
|
+
* one identity); `content_digest` hashes the final stored content;
|
|
120
|
+
* `record_id` binds projectRef + session + kind + role + digest so repeat
|
|
121
|
+
* observations of the same surface dedup to one record id; retention is the
|
|
122
|
+
* earlier of captured_at + retentionDays and the consent's own expiry.
|
|
123
|
+
*/
|
|
124
|
+
export declare function buildTrainingVaultRecord(input: BuildRecordInput): TrainingVaultRecord;
|
|
125
|
+
export declare const _internals: {
|
|
126
|
+
statfsCheck: (directory: string) => DiskFloorCheck;
|
|
127
|
+
appendFile: (target: string, data: string) => void | Promise<void>;
|
|
128
|
+
readFile: (target: string) => string;
|
|
129
|
+
now: () => Date;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* The ONLY vault write path. Gates, in order: active consent for THIS root
|
|
133
|
+
* (fail-closed, no file creation on refusal), disk floor, byte cap, record
|
|
134
|
+
* cap. A write is only accepted when it is synchronously confirmed durable
|
|
135
|
+
* (the vault file grew) — an async/unconfirmed seam result or a write error
|
|
136
|
+
* fails closed as `disk_floor`. Unexpired records are never evicted.
|
|
137
|
+
*/
|
|
138
|
+
export declare function appendTrainingVaultRecord(directory: string, record: TrainingVaultRecord): AppendResult;
|
|
139
|
+
/**
|
|
140
|
+
* Read the vault. Corrupt items are quarantined with a typed reason, journaled
|
|
141
|
+
* to `<root>/vault/quarantine.jsonl` (deduped in-process by line content), and
|
|
142
|
+
* excluded from `records`. Never throws on corrupt content.
|
|
143
|
+
*/
|
|
144
|
+
export declare function readTrainingVault(directory: string): VaultRead;
|
|
145
|
+
/** Current valid + quarantined counts without journaling (status surfaces). */
|
|
146
|
+
export declare function getTrainingVaultStatus(directory: string): VaultStatus;
|
|
147
|
+
/**
|
|
148
|
+
* Physically purge records past their retention expiry (honored retention —
|
|
149
|
+
* distinct from quota stops, which never delete). Tombstones are untouched.
|
|
150
|
+
*/
|
|
151
|
+
export declare function sweepTrainingVaultExpiry(directory: string, options?: {
|
|
152
|
+
now?: Date;
|
|
153
|
+
}): {
|
|
154
|
+
purged: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Physically delete ALL vault content, append a durable withdrawal tombstone,
|
|
158
|
+
* and revoke every export still under plugin control with a `REVOKED.json`
|
|
159
|
+
* revocation manifest. Tombstones from prior withdrawals are never touched.
|
|
160
|
+
*
|
|
161
|
+
* The export listing happens BEFORE any destruction: if the exports dir is
|
|
162
|
+
* unreadable (not merely absent), the purge refuses rather than truncating
|
|
163
|
+
* records and then silently writing a tombstone that under-reports the
|
|
164
|
+
* revocation set.
|
|
165
|
+
*/
|
|
166
|
+
export declare function purgeTrainingVaultContent(directory: string, options?: {
|
|
167
|
+
now?: Date;
|
|
168
|
+
}): PurgeResult;
|
|
169
|
+
/** All durable withdrawal tombstones (corrupt lines skipped). */
|
|
170
|
+
export declare function listTrainingTombstones(directory: string): TrainingWithdrawalTombstone[];
|
|
171
|
+
export interface TrainingExportRevocation {
|
|
172
|
+
exportId: string;
|
|
173
|
+
revokedAt: string;
|
|
174
|
+
tombstoneId: string;
|
|
175
|
+
}
|
|
176
|
+
/** Revocation manifests for exports still under plugin control. */
|
|
177
|
+
export declare function readTrainingExportRevocations(directory: string): TrainingExportRevocation[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.171.1",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"repro:704": "node scripts/repro-704.mjs",
|
|
114
114
|
"repro:1144": "bun scripts/repro-1144.mjs",
|
|
115
115
|
"repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs",
|
|
116
|
+
"repro:2487": "bun build scripts/repro-2487-parity-entry.ts --outdir dist-build-test/repro-2487 --target node --format esm && node scripts/repro-2487-parity.mjs",
|
|
116
117
|
"check:events": "bun run scripts/check-event-contract.ts",
|
|
117
118
|
"check:retention": "bun run scripts/check-retention-registry.ts",
|
|
118
119
|
"check:core-events": "bun run scripts/check-core-events-usage.ts",
|