@osovv/vv-opencode 2.0.0 → 2.1.0
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 +51 -0
- package/README.md +87 -85
- package/dist/commands/completion.js +0 -1
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/doctor.js +6 -9
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.js +7 -12
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.js +40 -37
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/launch.d.ts +2 -1
- package/dist/commands/launch.js +18 -14
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/patch-provider.d.ts +225 -307
- package/dist/commands/patch-provider.js +92 -296
- package/dist/commands/patch-provider.js.map +1 -1
- package/dist/commands/status.js +7 -10
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +4 -0
- package/dist/commands/sync.js +38 -35
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.d.ts +25 -5
- package/dist/index.js +73 -34
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-tool-catalog.d.ts +1 -1
- package/dist/lib/agent-tool-catalog.js +3 -6
- package/dist/lib/agent-tool-catalog.js.map +1 -1
- package/dist/lib/agent-tool-contract.d.ts +22 -13
- package/dist/lib/agent-tool-contract.js +20 -20
- package/dist/lib/agent-tool-contract.js.map +1 -1
- package/dist/lib/analytics/types.d.ts +7 -1
- package/dist/lib/analytics/types.js +2 -2
- package/dist/lib/analytics/types.js.map +1 -1
- package/dist/lib/config-layers.d.ts +28 -6
- package/dist/lib/config-layers.js +268 -73
- package/dist/lib/config-layers.js.map +1 -1
- package/dist/lib/managed-agents.d.ts +24 -2
- package/dist/lib/managed-agents.js +45 -15
- package/dist/lib/managed-agents.js.map +1 -1
- package/dist/lib/model-roles.d.ts +5 -0
- package/dist/lib/model-roles.js +22 -1
- package/dist/lib/model-roles.js.map +1 -1
- package/dist/lib/opencode/agent-registrations.d.ts +4 -4
- package/dist/lib/opencode/agent-registrations.js +386 -197
- package/dist/lib/opencode/agent-registrations.js.map +1 -1
- package/dist/lib/opencode/inspection.d.ts +13 -13
- package/dist/lib/opencode/inspection.js +69 -106
- package/dist/lib/opencode/inspection.js.map +1 -1
- package/dist/lib/opencode/model-overrides.d.ts +2 -2
- package/dist/lib/opencode/model-overrides.js +192 -47
- package/dist/lib/opencode/model-overrides.js.map +1 -1
- package/dist/lib/opencode/paths.d.ts +6 -2
- package/dist/lib/opencode/paths.js +12 -11
- package/dist/lib/opencode/paths.js.map +1 -1
- package/dist/lib/opencode/plugin-registration.d.ts +10 -11
- package/dist/lib/opencode/plugin-registration.js +76 -138
- package/dist/lib/opencode/plugin-registration.js.map +1 -1
- package/dist/lib/opencode/shared-utils.d.ts +47 -3
- package/dist/lib/opencode/shared-utils.js +346 -15
- package/dist/lib/opencode/shared-utils.js.map +1 -1
- package/dist/lib/opencode.d.ts +5 -6
- package/dist/lib/opencode.js +10 -10
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/vvoc-config.js +4 -4
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/lib/vvoc-paths.d.ts +7 -0
- package/dist/lib/vvoc-paths.js +15 -1
- package/dist/lib/vvoc-paths.js.map +1 -1
- package/dist/lib/vvoc-preset-registry.d.ts +38 -50
- package/dist/lib/vvoc-preset-registry.js +38 -48
- package/dist/lib/vvoc-preset-registry.js.map +1 -1
- package/dist/plugins/analytics/index.d.ts +20 -14
- package/dist/plugins/analytics/index.js +281 -133
- package/dist/plugins/analytics/index.js.map +1 -1
- package/dist/plugins/guardian/index.d.ts +63 -42
- package/dist/plugins/guardian/index.js +217 -759
- package/dist/plugins/guardian/index.js.map +1 -1
- package/dist/plugins/hashline-edit/index.d.ts +145 -31
- package/dist/plugins/hashline-edit/index.js +679 -244
- package/dist/plugins/hashline-edit/index.js.map +1 -1
- package/dist/plugins/hashline-edit/schemas.d.ts +1 -1
- package/dist/plugins/hashline-edit/schemas.js +3 -3
- package/dist/plugins/hashline-edit/schemas.js.map +1 -1
- package/dist/plugins/model-roles/index.d.ts +18 -4
- package/dist/plugins/model-roles/index.js +44 -181
- package/dist/plugins/model-roles/index.js.map +1 -1
- package/dist/plugins/peak-hours/index.d.ts +23 -22
- package/dist/plugins/peak-hours/index.js +210 -178
- package/dist/plugins/peak-hours/index.js.map +1 -1
- package/dist/plugins/secrets-redaction/deep.js +35 -51
- package/dist/plugins/secrets-redaction/deep.js.map +1 -1
- package/dist/plugins/secrets-redaction/index.d.ts +96 -8
- package/dist/plugins/secrets-redaction/index.js +290 -102
- package/dist/plugins/secrets-redaction/index.js.map +1 -1
- package/dist/plugins/secrets-redaction/session.d.ts +9 -0
- package/dist/plugins/secrets-redaction/session.js +21 -4
- package/dist/plugins/secrets-redaction/session.js.map +1 -1
- package/dist/plugins/secrets-redaction/stream.d.ts +92 -0
- package/dist/plugins/secrets-redaction/stream.js +772 -0
- package/dist/plugins/secrets-redaction/stream.js.map +1 -0
- package/dist/plugins/spec-guard/index.d.ts +49 -18
- package/dist/plugins/spec-guard/index.js +231 -129
- package/dist/plugins/spec-guard/index.js.map +1 -1
- package/dist/plugins/system-context-injection/index.d.ts +10 -4
- package/dist/plugins/system-context-injection/index.js +271 -78
- package/dist/plugins/system-context-injection/index.js.map +1 -1
- package/dist/plugins/tool-history-compaction/index.d.ts +26 -4
- package/dist/plugins/tool-history-compaction/index.js +170 -32
- package/dist/plugins/tool-history-compaction/index.js.map +1 -1
- package/dist/plugins/tool-history-compaction/transform.d.ts +47 -16
- package/dist/plugins/tool-history-compaction/transform.js +173 -55
- package/dist/plugins/tool-history-compaction/transform.js.map +1 -1
- package/dist/plugins/web-tools/fetch-service.d.ts +51 -13
- package/dist/plugins/web-tools/fetch-service.js +106 -75
- package/dist/plugins/web-tools/fetch-service.js.map +1 -1
- package/dist/plugins/web-tools/index.d.ts +58 -16
- package/dist/plugins/web-tools/index.js +202 -91
- package/dist/plugins/web-tools/index.js.map +1 -1
- package/dist/plugins/web-tools/media-loader.d.ts +3 -3
- package/dist/plugins/web-tools/media-loader.js +3 -3
- package/dist/plugins/web-tools/media-loader.js.map +1 -1
- package/dist/plugins/web-tools/providers/native-fetch.d.ts +2 -2
- package/dist/plugins/web-tools/providers/native-fetch.js +1 -1
- package/dist/plugins/web-tools/providers/native-fetch.js.map +1 -1
- package/dist/plugins/web-tools/providers/spider.d.ts +2 -2
- package/dist/plugins/web-tools/providers/spider.js +1 -1
- package/dist/plugins/web-tools/providers/spider.js.map +1 -1
- package/dist/plugins/web-tools/providers/zai.d.ts +2 -2
- package/dist/plugins/web-tools/providers/zai.js +1 -1
- package/dist/plugins/web-tools/providers/zai.js.map +1 -1
- package/dist/plugins/web-tools/schemas.d.ts +1 -1
- package/dist/plugins/web-tools/schemas.js +3 -3
- package/dist/plugins/web-tools/schemas.js.map +1 -1
- package/dist/plugins/web-tools/search-service.d.ts +81 -12
- package/dist/plugins/web-tools/search-service.js +104 -57
- package/dist/plugins/web-tools/search-service.js.map +1 -1
- package/dist/plugins/workflow/authorization.d.ts +44 -10
- package/dist/plugins/workflow/authorization.js +113 -73
- package/dist/plugins/workflow/authorization.js.map +1 -1
- package/dist/plugins/workflow/cancellation.d.ts +86 -0
- package/dist/plugins/workflow/cancellation.js +202 -0
- package/dist/plugins/workflow/cancellation.js.map +1 -0
- package/dist/plugins/workflow/checkpoints.d.ts +7 -1
- package/dist/plugins/workflow/checkpoints.js +141 -21
- package/dist/plugins/workflow/checkpoints.js.map +1 -1
- package/dist/plugins/workflow/delegated.d.ts +14 -0
- package/dist/plugins/workflow/delegated.js +6 -5
- package/dist/plugins/workflow/delegated.js.map +1 -1
- package/dist/plugins/workflow/host.d.ts +81 -0
- package/dist/plugins/workflow/host.js +189 -0
- package/dist/plugins/workflow/host.js.map +1 -0
- package/dist/plugins/workflow/index.d.ts +69 -4
- package/dist/plugins/workflow/index.js +1391 -1026
- package/dist/plugins/workflow/index.js.map +1 -1
- package/dist/plugins/workflow/recovery.d.ts +3 -5
- package/dist/plugins/workflow/recovery.js +18 -33
- package/dist/plugins/workflow/recovery.js.map +1 -1
- package/dist/plugins/workflow/repair.d.ts +31 -5
- package/dist/plugins/workflow/repair.js +116 -48
- package/dist/plugins/workflow/repair.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +31 -31
- package/dist/plugins/workflow/results.js +4 -4
- package/dist/plugins/workflow/results.js.map +1 -1
- package/dist/plugins/workflow/schemas.d.ts +3 -3
- package/dist/plugins/workflow/schemas.js +5 -5
- package/dist/plugins/workflow/schemas.js.map +1 -1
- package/dist/plugins/workflow/system-instruction.md +4 -0
- package/dist/plugins/workflow/tooling.d.ts +6 -0
- package/dist/plugins/workflow/tooling.js +3 -1
- package/dist/plugins/workflow/tooling.js.map +1 -1
- package/dist/runtime/auxiliary.d.ts +13 -0
- package/dist/runtime/auxiliary.js +108 -0
- package/dist/runtime/auxiliary.js.map +1 -0
- package/dist/runtime/client.d.ts +88 -0
- package/dist/runtime/client.js +174 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/context-inspection-contract.d.ts +397 -0
- package/dist/runtime/context-inspection-contract.js +622 -0
- package/dist/runtime/context-inspection-contract.js.map +1 -0
- package/dist/runtime/context-inspection.d.ts +52 -0
- package/dist/runtime/context-inspection.js +324 -0
- package/dist/runtime/context-inspection.js.map +1 -0
- package/dist/runtime/context.d.ts +192 -0
- package/dist/runtime/context.js +1246 -0
- package/dist/runtime/context.js.map +1 -0
- package/dist/runtime/coordination.d.ts +40 -0
- package/dist/runtime/coordination.js +87 -0
- package/dist/runtime/coordination.js.map +1 -0
- package/dist/runtime/model-registry.d.ts +34 -0
- package/dist/runtime/model-registry.js +227 -0
- package/dist/runtime/model-registry.js.map +1 -0
- package/dist/runtime/permissions.d.ts +20 -0
- package/dist/runtime/permissions.js +250 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/snapshot-config.d.ts +80 -0
- package/dist/runtime/snapshot-config.js +268 -0
- package/dist/runtime/snapshot-config.js.map +1 -0
- package/dist/runtime/snapshot-store.d.ts +25 -0
- package/dist/runtime/snapshot-store.js +519 -0
- package/dist/runtime/snapshot-store.js.map +1 -0
- package/dist/runtime/snapshots.d.ts +59 -0
- package/dist/runtime/snapshots.js +721 -0
- package/dist/runtime/snapshots.js.map +1 -0
- package/dist/runtime/types.d.ts +713 -0
- package/dist/runtime/types.js +190 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/tui/analytics/indicator.d.ts +25 -26
- package/dist/tui/analytics/indicator.js +66 -74
- package/dist/tui/analytics/indicator.js.map +1 -1
- package/dist/tui/branding/footer.d.ts +7 -12
- package/dist/tui/branding/footer.js +16 -24
- package/dist/tui/branding/footer.js.map +1 -1
- package/dist/tui/context/analyze.d.ts +20 -9
- package/dist/tui/context/analyze.js +295 -257
- package/dist/tui/context/analyze.js.map +1 -1
- package/dist/tui/context/collect.d.ts +29 -3
- package/dist/tui/context/collect.js +450 -66
- package/dist/tui/context/collect.js.map +1 -1
- package/dist/tui/context/plugin.d.ts +21 -7
- package/dist/tui/context/plugin.js +65 -70
- package/dist/tui/context/plugin.js.map +1 -1
- package/dist/tui/context/types.d.ts +174 -43
- package/dist/tui/context/types.js +25 -19
- package/dist/tui/context/types.js.map +1 -1
- package/dist/tui/context/view.d.ts +33 -7
- package/dist/tui/context/view.js +136 -81
- package/dist/tui/context/view.js.map +1 -1
- package/dist/tui/peak-hours/banner.d.ts +13 -11
- package/dist/tui/peak-hours/banner.js +48 -80
- package/dist/tui/peak-hours/banner.js.map +1 -1
- package/dist/tui/policy.d.ts +69 -0
- package/dist/tui/policy.js +169 -0
- package/dist/tui/policy.js.map +1 -0
- package/dist/tui.d.ts +3 -8
- package/dist/tui.js +72 -68
- package/dist/tui.js.map +1 -1
- package/package.json +19 -15
- package/schemas/vvoc/v3.json +1 -1
- package/server.js +3 -5
- package/templates/agents/enhancer.md +10 -5
- package/templates/agents/guardian.md +10 -4
- package/templates/agents/investigator.md +4 -2
- package/templates/agents/vv-code-reviewer.md +4 -2
- package/templates/agents/vv-spec-reviewer.md +4 -2
- package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
- package/tui.js +3 -5
- package/dist/plugins/analytics/v2.d.ts +0 -21
- package/dist/plugins/analytics/v2.js +0 -133
- package/dist/plugins/analytics/v2.js.map +0 -1
- package/dist/plugins/guardian/v2.d.ts +0 -13
- package/dist/plugins/guardian/v2.js +0 -161
- package/dist/plugins/guardian/v2.js.map +0 -1
- package/dist/plugins/hashline-edit/v2.d.ts +0 -12
- package/dist/plugins/hashline-edit/v2.js +0 -145
- package/dist/plugins/hashline-edit/v2.js.map +0 -1
- package/dist/plugins/model-roles/v2.d.ts +0 -24
- package/dist/plugins/model-roles/v2.js +0 -274
- package/dist/plugins/model-roles/v2.js.map +0 -1
- package/dist/plugins/peak-hours/v2.d.ts +0 -12
- package/dist/plugins/peak-hours/v2.js +0 -95
- package/dist/plugins/peak-hours/v2.js.map +0 -1
- package/dist/plugins/secrets-redaction/v2.d.ts +0 -14
- package/dist/plugins/secrets-redaction/v2.js +0 -100
- package/dist/plugins/secrets-redaction/v2.js.map +0 -1
- package/dist/plugins/spec-guard/v2.d.ts +0 -12
- package/dist/plugins/spec-guard/v2.js +0 -139
- package/dist/plugins/spec-guard/v2.js.map +0 -1
- package/dist/plugins/system-context-injection/agent-contexts.d.ts +0 -5
- package/dist/plugins/system-context-injection/agent-contexts.js +0 -164
- package/dist/plugins/system-context-injection/agent-contexts.js.map +0 -1
- package/dist/plugins/system-context-injection/v2.d.ts +0 -13
- package/dist/plugins/system-context-injection/v2.js +0 -60
- package/dist/plugins/system-context-injection/v2.js.map +0 -1
- package/dist/plugins/tool-history-compaction/v2.d.ts +0 -11
- package/dist/plugins/tool-history-compaction/v2.js +0 -56
- package/dist/plugins/tool-history-compaction/v2.js.map +0 -1
- package/dist/plugins/v2-runtime/config-watcher.d.ts +0 -26
- package/dist/plugins/v2-runtime/config-watcher.js +0 -111
- package/dist/plugins/v2-runtime/config-watcher.js.map +0 -1
- package/dist/plugins/v2-runtime/index.d.ts +0 -50
- package/dist/plugins/v2-runtime/index.js +0 -114
- package/dist/plugins/v2-runtime/index.js.map +0 -1
- package/dist/plugins/v2-runtime/location-config.d.ts +0 -51
- package/dist/plugins/v2-runtime/location-config.js +0 -91
- package/dist/plugins/v2-runtime/location-config.js.map +0 -1
- package/dist/plugins/v2-runtime/setup.d.ts +0 -48
- package/dist/plugins/v2-runtime/setup.js +0 -174
- package/dist/plugins/v2-runtime/setup.js.map +0 -1
- package/dist/plugins/web-tools/v2.d.ts +0 -11
- package/dist/plugins/web-tools/v2.js +0 -99
- package/dist/plugins/web-tools/v2.js.map +0 -1
- package/dist/plugins/workflow/v2.d.ts +0 -58
- package/dist/plugins/workflow/v2.js +0 -181
- package/dist/plugins/workflow/v2.js.map +0 -1
package/dist/commands/sync.js
CHANGED
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
//
|
|
12
12
|
// START_MODULE_MAP
|
|
13
13
|
// default - Sync command definition for vvoc-managed config files.
|
|
14
|
+
// runSync - Testable sync flow with injectable native host verification.
|
|
14
15
|
// END_MODULE_MAP
|
|
15
16
|
//
|
|
16
17
|
// START_CHANGE_SUMMARY
|
|
17
|
-
// LAST_CHANGE: [
|
|
18
|
+
// LAST_CHANGE: [C-OPENCODE-V2-NATIVE T-007 - Added a fail-closed native host window preflight and extracted an injectable runSync flow.]
|
|
18
19
|
// END_CHANGE_SUMMARY
|
|
19
20
|
import { defineCommand } from "citty";
|
|
20
|
-
import { describeWriteResult, ensureManagedSkillSymlink, ensurePackageInstalled,
|
|
21
|
+
import { assertSupportedOpenCodeRuntime, describeWriteResult, ensureManagedSkillSymlink, ensurePackageInstalled, resolvePaths, readVvocConfig, syncManagedAgentPrompts, syncManagedAgentRegistrations, syncVvocConfig, syncManagedSkillFiles, } from "../lib/opencode.js";
|
|
21
22
|
export default defineCommand({
|
|
22
23
|
meta: {
|
|
23
24
|
name: "sync",
|
|
@@ -40,39 +41,41 @@ export default defineCommand({
|
|
|
40
41
|
},
|
|
41
42
|
},
|
|
42
43
|
async run({ args }) {
|
|
43
|
-
|
|
44
|
-
const scope = args.scope === "project" ? "project" : "global";
|
|
45
|
-
const configDir = typeof args["config-dir"] === "string" ? args["config-dir"] : undefined;
|
|
46
|
-
const paths = await resolvePaths({
|
|
47
|
-
scope: scope,
|
|
48
|
-
cwd: process.cwd(),
|
|
49
|
-
configDir,
|
|
50
|
-
});
|
|
51
|
-
// Preflight: strictly validate any existing vvoc.json before mutating
|
|
52
|
-
// anything, so an invalid config fails loudly up front instead of after a
|
|
53
|
-
// partial sync.
|
|
54
|
-
await readVvocConfig(paths);
|
|
55
|
-
const opencode = await ensurePackageInstalled(paths);
|
|
56
|
-
const tui = await ensureTuiPackageInstalled(paths);
|
|
57
|
-
const managedAgents = await syncManagedAgentRegistrations(paths);
|
|
58
|
-
const managedPrompts = await syncManagedAgentPrompts(paths, { force: Boolean(args.force) });
|
|
59
|
-
const managedSkills = await syncManagedSkillFiles(paths, { force: Boolean(args.force) });
|
|
60
|
-
const vvocConfig = await syncVvocConfig(paths);
|
|
61
|
-
console.log(`${opencode.changed ? "Updated" : "Kept"} ${opencode.path}`);
|
|
62
|
-
console.log(describeWriteResult(tui));
|
|
63
|
-
console.log(`${managedAgents.changed ? "Updated" : "Kept"} ${managedAgents.path} (managed agents)`);
|
|
64
|
-
for (const result of managedPrompts) {
|
|
65
|
-
console.log(describeWriteResult(result));
|
|
66
|
-
}
|
|
67
|
-
for (const result of managedSkills) {
|
|
68
|
-
console.log(describeWriteResult(result));
|
|
69
|
-
}
|
|
70
|
-
console.log(describeWriteResult(vvocConfig));
|
|
71
|
-
if (paths.scope === "global") {
|
|
72
|
-
const symlinkResult = await ensureManagedSkillSymlink(configDir);
|
|
73
|
-
console.log(describeWriteResult(symlinkResult));
|
|
74
|
-
}
|
|
75
|
-
// END_BLOCK_APPLY_SYNC_COMMAND
|
|
44
|
+
await runSync(args);
|
|
76
45
|
},
|
|
77
46
|
});
|
|
47
|
+
export async function runSync(args, options = {}) {
|
|
48
|
+
// START_BLOCK_APPLY_SYNC_COMMAND
|
|
49
|
+
const scope = args.scope === "project" ? "project" : "global";
|
|
50
|
+
const configDir = typeof args["config-dir"] === "string" ? args["config-dir"] : undefined;
|
|
51
|
+
const paths = await resolvePaths({
|
|
52
|
+
scope: scope,
|
|
53
|
+
cwd: process.cwd(),
|
|
54
|
+
configDir,
|
|
55
|
+
});
|
|
56
|
+
// Preflight: fail closed on an unverifiable or out-of-window host, and
|
|
57
|
+
// strictly validate any existing vvoc.json, before mutating anything so the
|
|
58
|
+
// command fails loudly up front instead of after a partial sync.
|
|
59
|
+
await assertSupportedOpenCodeRuntime(options.inspectRuntime);
|
|
60
|
+
await readVvocConfig(paths);
|
|
61
|
+
const opencode = await ensurePackageInstalled(paths);
|
|
62
|
+
const managedAgents = await syncManagedAgentRegistrations(paths);
|
|
63
|
+
const managedPrompts = await syncManagedAgentPrompts(paths, { force: Boolean(args.force) });
|
|
64
|
+
const managedSkills = await syncManagedSkillFiles(paths, { force: Boolean(args.force) });
|
|
65
|
+
const vvocConfig = await syncVvocConfig(paths);
|
|
66
|
+
console.log(`${opencode.changed ? "Updated" : "Kept"} ${opencode.path}`);
|
|
67
|
+
console.log(`${managedAgents.changed ? "Updated" : "Kept"} ${managedAgents.path} (managed agents)`);
|
|
68
|
+
for (const result of managedPrompts) {
|
|
69
|
+
console.log(describeWriteResult(result));
|
|
70
|
+
}
|
|
71
|
+
for (const result of managedSkills) {
|
|
72
|
+
console.log(describeWriteResult(result));
|
|
73
|
+
}
|
|
74
|
+
console.log(describeWriteResult(vvocConfig));
|
|
75
|
+
if (paths.scope === "global") {
|
|
76
|
+
const symlinkResult = await ensureManagedSkillSymlink(configDir);
|
|
77
|
+
console.log(describeWriteResult(symlinkResult));
|
|
78
|
+
}
|
|
79
|
+
// END_BLOCK_APPLY_SYNC_COMMAND
|
|
80
|
+
}
|
|
78
81
|
//# sourceMappingURL=sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,iBAAiB;AACjB,wBAAwB;AACxB,iIAAiI;AACjI,mMAAmM;AACnM,0CAA0C;AAC1C,0CAA0C;AAC1C,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,qEAAqE;AACrE,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
import { Plugin } from "@opencode/plugin";
|
|
2
|
+
export { GuardianPlugin } from "./plugins/guardian/index.js";
|
|
3
|
+
export { HashlineEditPlugin } from "./plugins/hashline-edit/index.js";
|
|
4
|
+
export { ModelRolesPlugin } from "./plugins/model-roles/index.js";
|
|
5
|
+
export { SystemContextInjectionPlugin } from "./plugins/system-context-injection/index.js";
|
|
6
|
+
export { WorkflowPlugin } from "./plugins/workflow/index.js";
|
|
7
|
+
export { SecretsRedactionPlugin } from "./plugins/secrets-redaction.js";
|
|
8
|
+
export { WebToolsPlugin } from "./plugins/web-tools/index.js";
|
|
9
|
+
export { ToolHistoryCompactionPlugin } from "./plugins/tool-history-compaction/index.js";
|
|
10
|
+
export { AnalyticsPlugin } from "./plugins/analytics/index.js";
|
|
11
|
+
export { PeakHoursPlugin } from "./plugins/peak-hours/index.js";
|
|
12
|
+
export { SpecGuardPlugin } from "./plugins/spec-guard/index.js";
|
|
1
13
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
14
|
+
* The eleven native server plugins in deterministic setup order. Model roles is
|
|
15
|
+
* first so the shared snapshot runtime exists before every consumer acquires it;
|
|
16
|
+
* every plugin still tolerates being set up standalone.
|
|
4
17
|
*/
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
18
|
+
export declare const VVOC_SERVER_PLUGINS: readonly Plugin.Plugin[];
|
|
19
|
+
/**
|
|
20
|
+
* Native aggregate server plugin. Every plugin is set up against the exact same
|
|
21
|
+
* Context so the shared runtime is keyed once. A partial setup failure disposes
|
|
22
|
+
* the already-registered cleanups in reverse order before rethrowing the original
|
|
23
|
+
* error; a successful setup tears everything down in reverse order on cleanup.
|
|
24
|
+
*/
|
|
25
|
+
declare const VvocPlugin: Plugin.Plugin;
|
|
26
|
+
export { VvocPlugin };
|
|
27
|
+
export default VvocPlugin;
|
package/dist/index.js
CHANGED
|
@@ -1,63 +1,102 @@
|
|
|
1
1
|
// FILE: src/index.ts
|
|
2
|
-
// VERSION:
|
|
2
|
+
// VERSION: 1.1.0
|
|
3
3
|
// START_MODULE_CONTRACT
|
|
4
|
-
// PURPOSE:
|
|
5
|
-
// SCOPE: Package-root
|
|
6
|
-
// DEPENDS: [
|
|
7
|
-
// LINKS: [M-PLUGIN-
|
|
8
|
-
// ROLE:
|
|
9
|
-
// MAP_MODE:
|
|
4
|
+
// PURPOSE: Re-export the public vv-opencode plugin entrypoints from the package root and assemble them into one native aggregate server plugin.
|
|
5
|
+
// SCOPE: Package-root exports for GuardianPlugin, HashlineEditPlugin, ModelRolesPlugin, SystemContextInjectionPlugin, WorkflowPlugin, SecretsRedactionPlugin, WebToolsPlugin, ToolHistoryCompactionPlugin, AnalyticsPlugin, PeakHoursPlugin, and SpecGuardPlugin, plus the native default definition that sets all eleven up against one shared Context with complete reverse-order teardown and partial-setup rollback.
|
|
6
|
+
// DEPENDS: [@opencode/plugin, src/plugins/guardian/index.ts, src/plugins/hashline-edit/index.ts, src/plugins/model-roles/index.ts, src/plugins/system-context-injection/index.ts, src/plugins/workflow/index.ts, src/plugins/secrets-redaction.ts, src/plugins/web-tools/index.ts, src/plugins/tool-history-compaction/index.ts, src/plugins/analytics/index.ts, src/plugins/peak-hours/index.ts, src/plugins/spec-guard/index.ts]
|
|
7
|
+
// LINKS: [M-PLUGIN-GUARDIAN, M-PLUGIN-HASHLINE-EDIT, M-PLUGIN-MODEL-ROLES, M-PLUGIN-SYSTEM-CONTEXT-INJECTION, M-PLUGIN-WORKFLOW, M-PLUGIN-SECRETS-REDACTION, M-PLUGIN-WEB-TOOLS, M-PLUGIN-TOOL-HISTORY-COMPACTION, M-PLUGIN-ANALYTICS, M-PLUGIN-PEAK-HOURS, M-PLUGIN-SPEC-GUARD]
|
|
8
|
+
// ROLE: BARREL
|
|
9
|
+
// MAP_MODE: SUMMARY
|
|
10
10
|
// END_MODULE_CONTRACT
|
|
11
11
|
//
|
|
12
12
|
// START_MODULE_MAP
|
|
13
|
-
//
|
|
14
|
-
//
|
|
13
|
+
// GuardianPlugin, HashlineEditPlugin, ModelRolesPlugin, SystemContextInjectionPlugin, WorkflowPlugin, SecretsRedactionPlugin, WebToolsPlugin, ToolHistoryCompactionPlugin, AnalyticsPlugin, PeakHoursPlugin, SpecGuardPlugin - Public plugin exports available from @osovv/vv-opencode.
|
|
14
|
+
// VVOC_SERVER_PLUGINS - The eleven native server plugins in deterministic setup order (model roles first so the shared snapshot runtime exists before consumers).
|
|
15
|
+
// VvocPlugin - Native aggregate server plugin that sets up all eleven plugins on one Context and tears them down in reverse order.
|
|
16
|
+
// default - Native default server plugin definition loaded by OpenCode from the package or a local directory.
|
|
15
17
|
// END_MODULE_MAP
|
|
16
18
|
//
|
|
17
19
|
// START_CHANGE_SUMMARY
|
|
18
|
-
// LAST_CHANGE: [C-OPENCODE-V2-
|
|
20
|
+
// LAST_CHANGE: [C-OPENCODE-V2-NATIVE T-009 - Added the native aggregate default that sets up all eleven plugins on one shared Context with reverse-order teardown and partial-setup rollback.]
|
|
21
|
+
// PREVIOUS: [C-SPEC-IDENTITY-LINT - Added SpecGuardPlugin to the package-root exports.]
|
|
19
22
|
// END_CHANGE_SUMMARY
|
|
20
|
-
import {
|
|
23
|
+
import { Plugin } from "@opencode/plugin";
|
|
24
|
+
import { AnalyticsPlugin } from "./plugins/analytics/index.js";
|
|
21
25
|
import { GuardianPlugin } from "./plugins/guardian/index.js";
|
|
22
26
|
import { HashlineEditPlugin } from "./plugins/hashline-edit/index.js";
|
|
23
27
|
import { ModelRolesPlugin } from "./plugins/model-roles/index.js";
|
|
24
|
-
import { SystemContextInjectionPlugin } from "./plugins/system-context-injection/index.js";
|
|
25
|
-
import { WorkflowPlugin } from "./plugins/workflow/index.js";
|
|
26
|
-
import { SecretsRedactionPlugin } from "./plugins/secrets-redaction/index.js";
|
|
27
|
-
import { WebToolsPlugin } from "./plugins/web-tools/index.js";
|
|
28
|
-
import { ToolHistoryCompactionPlugin } from "./plugins/tool-history-compaction/index.js";
|
|
29
|
-
import { AnalyticsPlugin } from "./plugins/analytics/index.js";
|
|
30
28
|
import { PeakHoursPlugin } from "./plugins/peak-hours/index.js";
|
|
29
|
+
import { SecretsRedactionPlugin } from "./plugins/secrets-redaction.js";
|
|
31
30
|
import { SpecGuardPlugin } from "./plugins/spec-guard/index.js";
|
|
32
|
-
import {
|
|
33
|
-
|
|
31
|
+
import { SystemContextInjectionPlugin } from "./plugins/system-context-injection/index.js";
|
|
32
|
+
import { ToolHistoryCompactionPlugin } from "./plugins/tool-history-compaction/index.js";
|
|
33
|
+
import { WebToolsPlugin } from "./plugins/web-tools/index.js";
|
|
34
|
+
import { WorkflowPlugin } from "./plugins/workflow/index.js";
|
|
35
|
+
export { GuardianPlugin } from "./plugins/guardian/index.js";
|
|
36
|
+
export { HashlineEditPlugin } from "./plugins/hashline-edit/index.js";
|
|
37
|
+
export { ModelRolesPlugin } from "./plugins/model-roles/index.js";
|
|
38
|
+
export { SystemContextInjectionPlugin } from "./plugins/system-context-injection/index.js";
|
|
39
|
+
export { WorkflowPlugin } from "./plugins/workflow/index.js";
|
|
40
|
+
export { SecretsRedactionPlugin } from "./plugins/secrets-redaction.js";
|
|
41
|
+
export { WebToolsPlugin } from "./plugins/web-tools/index.js";
|
|
42
|
+
export { ToolHistoryCompactionPlugin } from "./plugins/tool-history-compaction/index.js";
|
|
43
|
+
export { AnalyticsPlugin } from "./plugins/analytics/index.js";
|
|
44
|
+
export { PeakHoursPlugin } from "./plugins/peak-hours/index.js";
|
|
45
|
+
export { SpecGuardPlugin } from "./plugins/spec-guard/index.js";
|
|
46
|
+
// START_BLOCK_AGGREGATE
|
|
34
47
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
48
|
+
* The eleven native server plugins in deterministic setup order. Model roles is
|
|
49
|
+
* first so the shared snapshot runtime exists before every consumer acquires it;
|
|
50
|
+
* every plugin still tolerates being set up standalone.
|
|
37
51
|
*/
|
|
38
|
-
export const
|
|
52
|
+
export const VVOC_SERVER_PLUGINS = [
|
|
53
|
+
ModelRolesPlugin,
|
|
54
|
+
SecretsRedactionPlugin,
|
|
39
55
|
GuardianPlugin,
|
|
40
56
|
HashlineEditPlugin,
|
|
41
|
-
|
|
57
|
+
WebToolsPlugin,
|
|
42
58
|
SystemContextInjectionPlugin,
|
|
43
59
|
WorkflowPlugin,
|
|
44
|
-
SecretsRedactionPlugin,
|
|
45
|
-
WebToolsPlugin,
|
|
46
60
|
ToolHistoryCompactionPlugin,
|
|
47
61
|
AnalyticsPlugin,
|
|
48
62
|
PeakHoursPlugin,
|
|
49
63
|
SpecGuardPlugin,
|
|
50
64
|
];
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Native aggregate server plugin. Every plugin is set up against the exact same
|
|
67
|
+
* Context so the shared runtime is keyed once. A partial setup failure disposes
|
|
68
|
+
* the already-registered cleanups in reverse order before rethrowing the original
|
|
69
|
+
* error; a successful setup tears everything down in reverse order on cleanup.
|
|
70
|
+
*/
|
|
71
|
+
const VvocPlugin = Plugin.define({
|
|
54
72
|
id: "vvoc",
|
|
55
|
-
async
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
73
|
+
async setup(ctx) {
|
|
74
|
+
const cleanups = [];
|
|
75
|
+
for (const plugin of VVOC_SERVER_PLUGINS) {
|
|
76
|
+
try {
|
|
77
|
+
const cleanup = await plugin.setup(ctx);
|
|
78
|
+
if (typeof cleanup === "function")
|
|
79
|
+
cleanups.push(cleanup);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
for (const cleanup of cleanups.reverse()) {
|
|
83
|
+
try {
|
|
84
|
+
await cleanup();
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Preserve the original setup failure; every cleanup is still attempted.
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return async () => {
|
|
94
|
+
for (const cleanup of cleanups.reverse())
|
|
95
|
+
await cleanup();
|
|
96
|
+
};
|
|
59
97
|
},
|
|
60
|
-
v2: setupV2Plugins,
|
|
61
98
|
});
|
|
62
|
-
|
|
99
|
+
export { VvocPlugin };
|
|
100
|
+
export default VvocPlugin;
|
|
101
|
+
// END_BLOCK_AGGREGATE
|
|
63
102
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,iBAAiB;AACjB,wBAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ZodRawShape, type ZodType } from "zod";
|
|
2
2
|
import { type ContractIssue, type OwnedToolContract } from "./agent-tool-contract.js";
|
|
3
3
|
/** One checked positive/negative input fixture with independent coverage metadata. */
|
|
4
4
|
export interface CatalogOperation {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// START_MODULE_CONTRACT
|
|
4
4
|
// PURPOSE: Own the pure nine-tool agent-tool catalog: one entry per vvoc-owned registered tool aggregating its descriptor contract, model-facing vocabularies, checked positive/negative operation fixtures, execute-time defaults, state/host prerequisites, conditional requirements, path kinds, result variants, representative errors, a deterministic generated reference renderer, a fixture runner over the actual exported validators/result schemas, and the recorded contract-size baseline.
|
|
5
5
|
// SCOPE: Catalog aggregation and reference generation only. Imports descriptor modules (workflow input-validation/results, edit schemas, web schemas) and shared contract primitives; never imports plugin factories, config, stores, filesystem, network, or workflow state, so no catalog-to-runtime cycle exists. Fixtures are pure synthetic data validated through the owning runtime validators; the catalog grants no permission, state eligibility, or acceptance.
|
|
6
|
-
// DEPENDS: [
|
|
6
|
+
// DEPENDS: [src/lib/agent-tool-contract.ts, src/plugins/workflow/input-validation.ts, src/plugins/workflow/results.ts, src/plugins/hashline-edit/schemas.ts, src/plugins/web-tools/schemas.ts, zod (types)]
|
|
7
7
|
// LINKS: [M-AGENT-TOOL-CONTRACT, M-WORKFLOW-TOOLING, M-PLUGIN-HASHLINE-EDIT, M-PLUGIN-WEB-TOOLS]
|
|
8
8
|
// ROLE: RUNTIME
|
|
9
9
|
// MAP_MODE: EXPORTS
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
// START_CHANGE_SUMMARY
|
|
38
38
|
// LAST_CHANGE: [C-AGENT-TOOL-CONTRACTS T-008 correction r2 - Array-element traversal with finite-primitive (boolean/number) literal discriminators so batch item and nested provider families are coverage-checked; added the batch-failure fixture and the per-operation/branch negative fixtures for review_only, generic open paths, request_changes/rework, verify/review/bind/amend/record_approval/revoke_authority, delete/rename/replace/prepend, and every freshness/format branch. Prior: honest hashline text+metadata aggregate, nested provider coverage, closed-schema scanning, outcome-validated reference examples.]
|
|
39
39
|
// END_CHANGE_SUMMARY
|
|
40
|
-
import {
|
|
40
|
+
import { z } from "zod";
|
|
41
41
|
import { AGENT_TOOL_CONTRACT_REVISION, PACKAGE_NAME, PACKAGE_VERSION, } from "./agent-tool-contract.js";
|
|
42
42
|
import { validateWorkflowToolInput, workflowToolContracts, } from "../plugins/workflow/input-validation.js";
|
|
43
43
|
import { workflowToolResultSchemas } from "../plugins/workflow/results.js";
|
|
@@ -1298,10 +1298,7 @@ const workflowEntries = [
|
|
|
1298
1298
|
* The metadata object is never presented as the registered return value. Composed
|
|
1299
1299
|
* here from the existing descriptor schemas so no runtime producer changes.
|
|
1300
1300
|
*/
|
|
1301
|
-
const hashlineEditResultSchema =
|
|
1302
|
-
tool.schema.string(),
|
|
1303
|
-
hashlineEditMetadataSchema,
|
|
1304
|
-
]);
|
|
1301
|
+
const hashlineEditResultSchema = z.union([z.string(), hashlineEditMetadataSchema]);
|
|
1305
1302
|
const editEntries = [
|
|
1306
1303
|
{
|
|
1307
1304
|
toolId: HASHLINE_EDIT_TOOL_ID,
|