@osovv/vv-opencode 2.4.0 → 2.5.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 +17 -0
- package/README.md +10 -7
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/plugin-toggle.d.ts +0 -16
- package/dist/commands/plugin-toggle.js +2 -34
- package/dist/commands/plugin-toggle.js.map +1 -1
- package/dist/commands/preset.d.ts +0 -8
- package/dist/commands/preset.js +3 -24
- package/dist/commands/preset.js.map +1 -1
- package/dist/commands/role.js +2 -30
- package/dist/commands/role.js.map +1 -1
- package/dist/commands/session.d.ts +50 -0
- package/dist/commands/session.js +354 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/lib/managed-agents.js +2 -2
- package/dist/lib/managed-agents.js.map +1 -1
- package/dist/plugins/analytics/index.js +8 -19
- package/dist/plugins/analytics/index.js.map +1 -1
- package/dist/plugins/guardian/index.js +7 -21
- package/dist/plugins/guardian/index.js.map +1 -1
- package/dist/plugins/hashline-edit/index.js +6 -20
- package/dist/plugins/hashline-edit/index.js.map +1 -1
- package/dist/plugins/model-roles/index.d.ts +3 -3
- package/dist/plugins/model-roles/index.js +8 -8
- package/dist/plugins/model-roles/index.js.map +1 -1
- package/dist/plugins/peak-hours/index.js +9 -20
- package/dist/plugins/peak-hours/index.js.map +1 -1
- package/dist/plugins/secrets-redaction/index.js +11 -24
- package/dist/plugins/secrets-redaction/index.js.map +1 -1
- package/dist/plugins/spec-guard/index.js +10 -22
- package/dist/plugins/spec-guard/index.js.map +1 -1
- package/dist/plugins/system-context-injection/guidance.d.ts +6 -0
- package/dist/plugins/system-context-injection/guidance.js +79 -0
- package/dist/plugins/system-context-injection/guidance.js.map +1 -0
- package/dist/plugins/system-context-injection/index.js +20 -121
- package/dist/plugins/system-context-injection/index.js.map +1 -1
- package/dist/plugins/tool-history-compaction/index.js +14 -25
- package/dist/plugins/tool-history-compaction/index.js.map +1 -1
- package/dist/plugins/web-tools/index.js +14 -25
- package/dist/plugins/web-tools/index.js.map +1 -1
- package/dist/plugins/workflow/index.d.ts +3 -2
- package/dist/plugins/workflow/index.js +6 -22
- package/dist/plugins/workflow/index.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +40 -40
- package/dist/runtime/auxiliary.d.ts +11 -6
- package/dist/runtime/auxiliary.js +43 -35
- package/dist/runtime/auxiliary.js.map +1 -1
- package/dist/runtime/context-inspection.d.ts +7 -6
- package/dist/runtime/context-inspection.js +37 -43
- package/dist/runtime/context-inspection.js.map +1 -1
- package/dist/runtime/context.d.ts +22 -45
- package/dist/runtime/context.js +348 -634
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/model-registry.d.ts +3 -34
- package/dist/runtime/model-registry.js +10 -190
- package/dist/runtime/model-registry.js.map +1 -1
- package/dist/runtime/session-settings.d.ts +204 -0
- package/dist/runtime/session-settings.js +445 -0
- package/dist/runtime/session-settings.js.map +1 -0
- package/dist/runtime/snapshot-config.d.ts +7 -70
- package/dist/runtime/snapshot-config.js +16 -198
- package/dist/runtime/snapshot-config.js.map +1 -1
- package/dist/runtime/types.d.ts +15 -256
- package/dist/runtime/types.js +9 -63
- package/dist/runtime/types.js.map +1 -1
- package/dist/tui/settings/plugin.d.ts +29 -0
- package/dist/tui/settings/plugin.js +134 -0
- package/dist/tui/settings/plugin.js.map +1 -0
- package/dist/tui.js +12 -12
- package/dist/tui.js.map +1 -1
- package/package.json +1 -1
- package/schemas/vvoc/v3.json +1 -1
- package/templates/agents/vv-controller.md +176 -151
- package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
- package/dist/lib/rebind-request.d.ts +0 -41
- package/dist/lib/rebind-request.js +0 -134
- package/dist/lib/rebind-request.js.map +0 -1
- package/dist/runtime/snapshot-store.d.ts +0 -63
- package/dist/runtime/snapshot-store.js +0 -668
- package/dist/runtime/snapshot-store.js.map +0 -1
- package/dist/runtime/snapshots.d.ts +0 -36
- package/dist/runtime/snapshots.js +0 -508
- package/dist/runtime/snapshots.js.map +0 -1
- package/dist/tui/rebind/plugin.d.ts +0 -22
- package/dist/tui/rebind/plugin.js +0 -101
- package/dist/tui/rebind/plugin.js.map +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// FILE: src/tui/rebind/plugin.ts
|
|
2
|
-
// VERSION: 1.0.0
|
|
3
|
-
// START_MODULE_CONTRACT
|
|
4
|
-
// PURPOSE: Register the native OpenCode /vv-rebind slash command that rebinds the current session family to the current effective vvoc configuration on its next workload.
|
|
5
|
-
// SCOPE: Keymap command registration through the native app slot, active-session gating, one bounded toast per outcome, and a single atomic rebind-marker write through the shared writer with lifecycle disposal. No configuration parsing, no credential values, and no other filesystem access.
|
|
6
|
-
// DEPENDS: [@opencode/plugin/tui, src/lib/rebind-request.ts, src/tui/context/plugin.ts]
|
|
7
|
-
// LINKS: [M-PLUGIN-CONTEXT-TUI, M-NATIVE-RUNTIME, V-M-PLUGIN-CONTEXT-TUI]
|
|
8
|
-
// ROLE: RUNTIME
|
|
9
|
-
// MAP_MODE: EXPORTS
|
|
10
|
-
// END_MODULE_CONTRACT
|
|
11
|
-
//
|
|
12
|
-
// START_MODULE_MAP
|
|
13
|
-
// REBIND_COMMAND_ID - Stable native keymap command id behind /vv-rebind.
|
|
14
|
-
// RebindTuiDependencies - Injectable marker writer and working-directory resolver for focused tests.
|
|
15
|
-
// registerRebindTuiCommand - Register /vv-rebind on the native keymap layer.
|
|
16
|
-
// END_MODULE_MAP
|
|
17
|
-
//
|
|
18
|
-
// START_CHANGE_SUMMARY
|
|
19
|
-
// LAST_CHANGE: [C-VV-REBIND-TUI-COMMAND T-001 - Added /vv-rebind as a thin TUI facade over the existing rebind request marker consumed on the family's next workload.]
|
|
20
|
-
// END_CHANGE_SUMMARY
|
|
21
|
-
import { writeRebindRequest } from "../../lib/rebind-request.js";
|
|
22
|
-
import { activeSessionID } from "../context/plugin.js";
|
|
23
|
-
/** Stable native keymap command id behind the /vv-rebind slash command. */
|
|
24
|
-
export const REBIND_COMMAND_ID = "vvoc.rebind.request";
|
|
25
|
-
/**
|
|
26
|
-
* Register /vv-rebind on the native keymap layer, mirroring the /context
|
|
27
|
-
* registration: the layer must be created inside a mounted slot render, so the
|
|
28
|
-
* command claims the always-present `app` slot. Running the command with an
|
|
29
|
-
* open session writes exactly one project-scoped rebind request marker naming
|
|
30
|
-
* the active session; the existing lazy consumer applies it on the family's
|
|
31
|
-
* next workload. The command reads nothing else and displays no configuration
|
|
32
|
-
* content, so a rebind is safe to request from any session state.
|
|
33
|
-
*/
|
|
34
|
-
export function registerRebindTuiCommand(ctx, dependencies = {
|
|
35
|
-
writeMarker: writeRebindRequest,
|
|
36
|
-
directory: () => process.cwd(),
|
|
37
|
-
}) {
|
|
38
|
-
return ctx.ui.slot({
|
|
39
|
-
append: "app",
|
|
40
|
-
render() {
|
|
41
|
-
ctx.keymap.layer(() => ({
|
|
42
|
-
// Global so the command stays reachable from the prompt input mode,
|
|
43
|
-
// like /context; the default base layer is not.
|
|
44
|
-
mode: "global",
|
|
45
|
-
commands: [
|
|
46
|
-
{
|
|
47
|
-
id: REBIND_COMMAND_ID,
|
|
48
|
-
title: "Rebind session policy",
|
|
49
|
-
description: "Re-resolve the vvoc configuration for this session family from the next message",
|
|
50
|
-
group: "VVOC",
|
|
51
|
-
palette: true,
|
|
52
|
-
slash: { name: "vv-rebind" },
|
|
53
|
-
enabled: () => activeSessionID(ctx) !== undefined,
|
|
54
|
-
run: async () => {
|
|
55
|
-
const sessionID = activeSessionID(ctx);
|
|
56
|
-
if (sessionID === undefined) {
|
|
57
|
-
// Reachable only through the palette when no session is open.
|
|
58
|
-
ctx.ui.toast.show({
|
|
59
|
-
variant: "warning",
|
|
60
|
-
title: "Rebind session",
|
|
61
|
-
message: "Open a session before running /vv-rebind.",
|
|
62
|
-
});
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
await dependencies.writeMarker({
|
|
67
|
-
directory: dependencies.directory(),
|
|
68
|
-
sessionId: sessionID,
|
|
69
|
-
});
|
|
70
|
-
// A user who switched tabs mid-write did not see the outcome.
|
|
71
|
-
if (activeSessionID(ctx) !== sessionID)
|
|
72
|
-
return;
|
|
73
|
-
ctx.ui.toast.show({
|
|
74
|
-
variant: "success",
|
|
75
|
-
title: "Rebind session",
|
|
76
|
-
message: "Re-resolving the configuration from the next message.",
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
if (activeSessionID(ctx) !== sessionID)
|
|
81
|
-
return;
|
|
82
|
-
ctx.ui.toast.show({
|
|
83
|
-
variant: "error",
|
|
84
|
-
title: "Rebind unavailable",
|
|
85
|
-
message: boundedError(error),
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
}));
|
|
92
|
-
// The slot exists only to host the keymap layer; it renders nothing.
|
|
93
|
-
return null;
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function boundedError(error) {
|
|
98
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
99
|
-
return message.length > 180 ? `${message.slice(0, 177)}...` : message;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/tui/rebind/plugin.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iBAAiB;AACjB,wBAAwB;AACxB,6KAA6K;AAC7K,qSAAqS;AACrS,0FAA0F;AAC1F,4EAA4E;AAC5E,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,2EAA2E;AAC3E,uGAAuG;AACvG,+EAA+E;AAC/E,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,yKAAyK;AACzK,qBAAqB;AAGrB,OAAO,EAAE,kBAAkB,EAAsB,M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