@te-river/opencode-team-mode 1.6.1 → 1.7.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/README.md +117 -118
- package/README.zh-CN.md +98 -100
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +89 -79
- package/dist/agents.js.map +1 -1
- package/dist/approval-gate.d.ts +8 -9
- package/dist/approval-gate.d.ts.map +1 -1
- package/dist/approval-gate.js +13 -14
- package/dist/approval-gate.js.map +1 -1
- package/dist/capabilities.d.ts +11 -37
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +11 -141
- package/dist/capabilities.js.map +1 -1
- package/dist/commands.js +1 -1
- package/dist/envprotect/hook.d.ts +12 -31
- package/dist/envprotect/hook.d.ts.map +1 -1
- package/dist/envprotect/hook.js +13 -91
- package/dist/envprotect/hook.js.map +1 -1
- package/dist/envprotect/patterns.d.ts +6 -4
- package/dist/envprotect/patterns.d.ts.map +1 -1
- package/dist/envprotect/patterns.js +6 -4
- package/dist/envprotect/patterns.js.map +1 -1
- package/dist/envprotect.d.ts +1 -1
- package/dist/envprotect.d.ts.map +1 -1
- package/dist/envprotect.js +1 -1
- package/dist/envprotect.js.map +1 -1
- package/dist/host/note.d.ts.map +1 -1
- package/dist/host/note.js +8 -5
- package/dist/host/note.js.map +1 -1
- package/dist/host/v2-browser-gate.d.ts +19 -1
- package/dist/host/v2-browser-gate.d.ts.map +1 -1
- package/dist/host/v2-browser-gate.js +47 -6
- package/dist/host/v2-browser-gate.js.map +1 -1
- package/dist/host/v2-capabilities.d.ts +43 -0
- package/dist/host/v2-capabilities.d.ts.map +1 -1
- package/dist/host/v2-capabilities.js +77 -1
- package/dist/host/v2-capabilities.js.map +1 -1
- package/dist/host/v2-compaction.d.ts +129 -0
- package/dist/host/v2-compaction.d.ts.map +1 -0
- package/dist/host/v2-compaction.js +346 -0
- package/dist/host/v2-compaction.js.map +1 -0
- package/dist/host/v2-default-agent.d.ts +37 -0
- package/dist/host/v2-default-agent.d.ts.map +1 -0
- package/dist/host/v2-default-agent.js +128 -0
- package/dist/host/v2-default-agent.js.map +1 -0
- package/dist/host/v2-events.d.ts +2 -0
- package/dist/host/v2-events.d.ts.map +1 -1
- package/dist/host/v2-events.js +27 -0
- package/dist/host/v2-events.js.map +1 -1
- package/dist/host/v2-guard.d.ts +178 -0
- package/dist/host/v2-guard.d.ts.map +1 -1
- package/dist/host/v2-guard.js +324 -8
- package/dist/host/v2-guard.js.map +1 -1
- package/dist/host/v2-offload.d.ts +1 -1
- package/dist/host/v2-offload.js +2 -2
- package/dist/host/v2-permissions.d.ts +45 -44
- package/dist/host/v2-permissions.d.ts.map +1 -1
- package/dist/host/v2-permissions.js +48 -49
- package/dist/host/v2-permissions.js.map +1 -1
- package/dist/host/v2-probe-chain.d.ts +93 -0
- package/dist/host/v2-probe-chain.d.ts.map +1 -0
- package/dist/host/v2-probe-chain.js +146 -0
- package/dist/host/v2-probe-chain.js.map +1 -0
- package/dist/host/v2-prune.d.ts +157 -0
- package/dist/host/v2-prune.d.ts.map +1 -0
- package/dist/host/v2-prune.js +507 -0
- package/dist/host/v2-prune.js.map +1 -0
- package/dist/host/v2-retry.d.ts +143 -0
- package/dist/host/v2-retry.d.ts.map +1 -0
- package/dist/host/v2-retry.js +315 -0
- package/dist/host/v2-retry.js.map +1 -0
- package/dist/host/v2-scope.d.ts.map +1 -1
- package/dist/host/v2-scope.js +14 -7
- package/dist/host/v2-scope.js.map +1 -1
- package/dist/host/v2-session-client.d.ts +62 -7
- package/dist/host/v2-session-client.d.ts.map +1 -1
- package/dist/host/v2-session-client.js +485 -26
- package/dist/host/v2-session-client.js.map +1 -1
- package/dist/host/v2-session.d.ts +72 -1
- package/dist/host/v2-session.d.ts.map +1 -1
- package/dist/host/v2-session.js +154 -10
- package/dist/host/v2-session.js.map +1 -1
- package/dist/host/v2-tool.d.ts +2 -3
- package/dist/host/v2-tool.d.ts.map +1 -1
- package/dist/host/v2-tool.js +2 -3
- package/dist/host/v2-tool.js.map +1 -1
- package/dist/host/v2-types.d.ts +25 -0
- package/dist/host/v2-types.d.ts.map +1 -1
- package/dist/host/v2.d.ts +14 -12
- package/dist/host/v2.d.ts.map +1 -1
- package/dist/host/v2.js +648 -74
- package/dist/host/v2.js.map +1 -1
- package/dist/identity.d.ts +27 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +34 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +9 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -27
- package/dist/index.js.map +1 -1
- package/dist/prompts/lead.d.ts +1 -1
- package/dist/prompts/lead.d.ts.map +1 -1
- package/dist/prompts/lead.js +44 -27
- package/dist/prompts/lead.js.map +1 -1
- package/dist/prompts/shared.d.ts +2 -2
- package/dist/prompts/shared.d.ts.map +1 -1
- package/dist/prompts/shared.js +74 -57
- package/dist/prompts/shared.js.map +1 -1
- package/dist/prompts/specialists.d.ts +2 -2
- package/dist/prompts/specialists.d.ts.map +1 -1
- package/dist/prompts/specialists.js +53 -83
- package/dist/prompts/specialists.js.map +1 -1
- package/dist/tm/args-schema.d.ts +7 -32
- package/dist/tm/args-schema.d.ts.map +1 -1
- package/dist/tm/args-schema.js +12 -153
- package/dist/tm/args-schema.js.map +1 -1
- package/dist/tm/board.d.ts +10 -9
- package/dist/tm/board.d.ts.map +1 -1
- package/dist/tm/board.js +11 -10
- package/dist/tm/board.js.map +1 -1
- package/dist/tm/config-files.d.ts +81 -0
- package/dist/tm/config-files.d.ts.map +1 -0
- package/dist/tm/config-files.js +209 -0
- package/dist/tm/config-files.js.map +1 -0
- package/dist/tm/config-layers.d.ts +117 -0
- package/dist/tm/config-layers.d.ts.map +1 -0
- package/dist/tm/config-layers.js +320 -0
- package/dist/tm/config-layers.js.map +1 -0
- package/dist/tm/config.d.ts +10 -101
- package/dist/tm/config.d.ts.map +1 -1
- package/dist/tm/config.js +17 -71
- package/dist/tm/config.js.map +1 -1
- package/dist/tm/dispatch.d.ts +154 -22
- package/dist/tm/dispatch.d.ts.map +1 -1
- package/dist/tm/dispatch.js +559 -80
- package/dist/tm/dispatch.js.map +1 -1
- package/dist/tm/egress.d.ts +19 -7
- package/dist/tm/egress.d.ts.map +1 -1
- package/dist/tm/egress.js +21 -9
- package/dist/tm/egress.js.map +1 -1
- package/dist/tm/index.d.ts +23 -20
- package/dist/tm/index.d.ts.map +1 -1
- package/dist/tm/index.js +117 -116
- package/dist/tm/index.js.map +1 -1
- package/dist/tm/ledger.d.ts +9 -2
- package/dist/tm/ledger.d.ts.map +1 -1
- package/dist/tm/ledger.js +4 -1
- package/dist/tm/ledger.js.map +1 -1
- package/dist/tm/perm-ask.d.ts +3 -3
- package/dist/tm/perm-ask.d.ts.map +1 -1
- package/dist/tm/perm-ask.js +3 -3
- package/dist/tm/perm-ask.js.map +1 -1
- package/dist/tm/pipelines.d.ts +12 -11
- package/dist/tm/pipelines.d.ts.map +1 -1
- package/dist/tm/pipelines.js +40 -207
- package/dist/tm/pipelines.js.map +1 -1
- package/dist/tm/preview.d.ts +1 -1
- package/dist/tm/preview.js +3 -3
- package/dist/tm/preview.js.map +1 -1
- package/dist/tm/refs.d.ts +31 -4
- package/dist/tm/refs.d.ts.map +1 -1
- package/dist/tm/refs.js +48 -4
- package/dist/tm/refs.js.map +1 -1
- package/dist/tm/result.d.ts +1 -1
- package/dist/tm/result.d.ts.map +1 -1
- package/dist/tm/result.js +4 -3
- package/dist/tm/result.js.map +1 -1
- package/dist/tm/search.d.ts +2 -2
- package/dist/tm/search.js +7 -7
- package/dist/tm/search.js.map +1 -1
- package/dist/tm/serp-loop.d.ts +19 -7
- package/dist/tm/serp-loop.d.ts.map +1 -1
- package/dist/tm/serp-loop.js +24 -9
- package/dist/tm/serp-loop.js.map +1 -1
- package/dist/tm/stats.d.ts +31 -27
- package/dist/tm/stats.d.ts.map +1 -1
- package/dist/tm/stats.js +170 -58
- package/dist/tm/stats.js.map +1 -1
- package/dist/tm/store.d.ts +18 -5
- package/dist/tm/store.d.ts.map +1 -1
- package/dist/tm/store.js +39 -9
- package/dist/tm/store.js.map +1 -1
- package/dist/tm/tools.d.ts +7 -5
- package/dist/tm/tools.d.ts.map +1 -1
- package/dist/tm/tools.js +10 -41
- package/dist/tm/tools.js.map +1 -1
- package/dist/tm/webfetch.d.ts +1 -1
- package/dist/tm/webfetch.d.ts.map +1 -1
- package/dist/tm/webfetch.js +38 -23
- package/dist/tm/webfetch.js.map +1 -1
- package/dist/types.d.ts +40 -123
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +7 -21
- package/dist/types.js.map +1 -1
- package/docs/installation-v2.md +124 -39
- package/docs/installation.md +9 -0
- package/docs/research/browser-pane.md +5 -0
- package/docs/v2-port-notes.md +500 -315
- package/package.json +1 -1
- package/scripts/gen-v2-config.mjs +246 -94
- package/scripts/lib/fake-ctx.mjs +244 -146
package/dist/types.d.ts
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Shared type definitions for the v2-only package.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* hooks.push(await plugin.server(input, load.options)); // ← only server()
|
|
11
|
-
* return;
|
|
12
|
-
* }
|
|
13
|
-
* // legacy: bare function default export also works
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* Facts encoded here:
|
|
17
|
-
* - `setup` is NEVER called on this loader version (v1.1-v1.3 died here).
|
|
18
|
-
* - default export MUST be an object with a `server(input, options)`
|
|
19
|
-
* function; `id` on the object controls the Desktop plugin display name.
|
|
20
|
-
* - server() returns v1 Hooks; the `config(cfg)` hook receives the merged
|
|
21
|
-
* opencode config and is the working mechanism to inject agents/commands.
|
|
22
|
-
* - Agent/command entries inside cfg use the v1 config shape:
|
|
23
|
-
* prompt (string) + permission (object keyed by tool).
|
|
4
|
+
* This file used to carry the OpenCode 1.18.x loader contract (`server()`,
|
|
5
|
+
* `Hooks`, `OpenCodePlugin`, the `tool.execute.before` payloads). v1 support
|
|
6
|
+
* was removed in 1.7.0, so those types are gone; what remains is the internal
|
|
7
|
+
* contract the tm_* tools and the v2 adapters share — the tool result /
|
|
8
|
+
* definition shapes, the host event shape, and the agent/command config
|
|
9
|
+
* shapes the v2 config generator reads.
|
|
24
10
|
*/
|
|
25
11
|
/**
|
|
26
|
-
*
|
|
12
|
+
* The permission block — doubles as the agent tool whitelist (Phase 2 /
|
|
27
13
|
* T2.1, T0.4③-verified): a "deny" entry removes the built-in tool from the
|
|
28
14
|
* model's tool surface entirely, so a whitelist is expressed as
|
|
29
15
|
* deny-everything-excluded + "allow" for the kept set (built-in names plus
|
|
@@ -35,7 +21,7 @@ export interface AgentPermission {
|
|
|
35
21
|
export interface AgentConfig {
|
|
36
22
|
description?: string;
|
|
37
23
|
mode?: "primary" | "subagent" | "all";
|
|
38
|
-
/**
|
|
24
|
+
/** The config field for the system prompt (NOT `system`). */
|
|
39
25
|
prompt?: string;
|
|
40
26
|
model?: string;
|
|
41
27
|
color?: string;
|
|
@@ -51,33 +37,16 @@ export interface CommandConfig {
|
|
|
51
37
|
agent?: string;
|
|
52
38
|
[key: string]: unknown;
|
|
53
39
|
}
|
|
54
|
-
export interface OpenCodeConfig {
|
|
55
|
-
agent?: Record<string, AgentConfig>;
|
|
56
|
-
command?: Record<string, CommandConfig>;
|
|
57
|
-
[key: string]: unknown;
|
|
58
|
-
}
|
|
59
|
-
/** Input to the `tool.execute.before` hook (official 1.x docs shape). */
|
|
60
|
-
export interface ToolExecuteBeforeInput {
|
|
61
|
-
tool?: string;
|
|
62
|
-
sessionID?: string;
|
|
63
|
-
callID?: string;
|
|
64
|
-
[key: string]: unknown;
|
|
65
|
-
}
|
|
66
|
-
/** Mutable output of the `tool.execute.before` hook; `args` are the tool args. */
|
|
67
|
-
export interface ToolExecuteBeforeOutput {
|
|
68
|
-
args?: Record<string, unknown>;
|
|
69
|
-
[key: string]: unknown;
|
|
70
|
-
}
|
|
71
40
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
41
|
+
* The tool result contract: execute() resolves to a plain string OR an object
|
|
42
|
+
* whose `output` string is what the model sees. Anything else (bare handles,
|
|
43
|
+
* structured error objects) breaks the host's result pipeline — real-session
|
|
44
|
+
* crash `c.split` on a non-string — so every return path must ride inside
|
|
45
|
+
* `output`.
|
|
77
46
|
*
|
|
78
|
-
* `attachments` is the SAME contract (
|
|
47
|
+
* `attachments` is the SAME contract (`ToolAttachment`): a
|
|
79
48
|
* `{type:"file", mime, url}` entry the host turns into a FilePart on the tool
|
|
80
|
-
* result, which is how
|
|
49
|
+
* result, which is how a screenshot's PIXELS reach a vision
|
|
81
50
|
* model instead of only a path. It is opt-in per call (token economy) and
|
|
82
51
|
* every attachment-producing path still writes the file and prints its path,
|
|
83
52
|
* so a host that ignores `attachments` degrades to the old path-only
|
|
@@ -96,6 +65,21 @@ export interface ToolResultObject {
|
|
|
96
65
|
[key: string]: unknown;
|
|
97
66
|
}
|
|
98
67
|
export type ToolResult = string | ToolResultObject;
|
|
68
|
+
/**
|
|
69
|
+
* A single statically-registered plugin tool (T0.4 live-probe shape:
|
|
70
|
+
* `{ tool: { <name>: { description, args, execute(args, ctx) } } }`).
|
|
71
|
+
* `args` is a ZodRawShape ({key: validator}) when the host resolves zod —
|
|
72
|
+
* NOT a z.object(): the host serializes the raw shape into the LLM parameter
|
|
73
|
+
* spec, and a z.object wrapper produced `{def:{command:...}}` garbage args
|
|
74
|
+
* in real sessions. Plain arg descriptors are tolerated when zod is absent;
|
|
75
|
+
* execute() must be defensive either way.
|
|
76
|
+
*/
|
|
77
|
+
export interface ToolDefinition {
|
|
78
|
+
description?: string;
|
|
79
|
+
args?: unknown;
|
|
80
|
+
execute?: (args: Record<string, unknown>, ctx?: unknown) => ToolResult | Promise<ToolResult>;
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
99
83
|
/**
|
|
100
84
|
* A pending host permission request as observed LIVE on 1.18.29
|
|
101
85
|
* (`permission.asked` properties via SSE):
|
|
@@ -134,18 +118,6 @@ export interface PendingPermission {
|
|
|
134
118
|
created?: number;
|
|
135
119
|
};
|
|
136
120
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Any event bus payload. The plugin's `event` hook receives EVERY host
|
|
139
|
-
* event (live-proven on 1.18.29: session.*, message.*, permission.asked,
|
|
140
|
-
* permission.replied, …); index.ts narrows and routes permission events to
|
|
141
|
-
* the approval gate and `message.updated` (UserMessage carries
|
|
142
|
-
* { sessionID, role:"user", agent }) to the gate's exec-role session
|
|
143
|
-
* registry BEFORE forwarding.
|
|
144
|
-
*/
|
|
145
|
-
export interface HostEvent {
|
|
146
|
-
type?: string;
|
|
147
|
-
properties?: Record<string, unknown>;
|
|
148
|
-
}
|
|
149
121
|
/**
|
|
150
122
|
* The subset of the host `Event` union the approval gate consumes
|
|
151
123
|
* (live-host names, with the d.ts spellings kept as accepted aliases):
|
|
@@ -168,68 +140,17 @@ export interface PermissionEvent {
|
|
|
168
140
|
};
|
|
169
141
|
}
|
|
170
142
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* spec, and a z.object wrapper produced `{def:{command:...}}` garbage args
|
|
176
|
-
* in real sessions. Plain arg descriptors are tolerated when zod is absent;
|
|
177
|
-
* execute() must be defensive either way.
|
|
143
|
+
* Any event bus payload. The v2 event feed forwards only whitelisted type
|
|
144
|
+
* names (see `src/host/v2-events.ts`), and the approval gate reads the
|
|
145
|
+
* permission spellings above; every consumer narrows defensively because the
|
|
146
|
+
* host makes no stability promise about this shape.
|
|
178
147
|
*/
|
|
179
|
-
export interface
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
execute?: (args: Record<string, unknown>, ctx?: unknown) => ToolResult | Promise<ToolResult>;
|
|
183
|
-
[key: string]: unknown;
|
|
184
|
-
}
|
|
185
|
-
export interface Hooks {
|
|
186
|
-
config?: (cfg: OpenCodeConfig) => void | Promise<void>;
|
|
187
|
-
/**
|
|
188
|
-
* Event channel (official 1.18.x plugin contract, index.d.ts:175). The
|
|
189
|
-
* approval gate watches `permission.asked`/`permission.updated` (register
|
|
190
|
-
* a pending timeout + env-face session registration) and
|
|
191
|
-
* `permission.replied` (cancel the session's whole pending set);
|
|
192
|
-
* `message.updated` routes exec-role user prompts into the gate's session
|
|
193
|
-
* registry — the R6 env face and the R2 danger face share this ONE timer.
|
|
194
|
-
*/
|
|
195
|
-
event?: (input: {
|
|
196
|
-
event: HostEvent;
|
|
197
|
-
}) => void | Promise<void>;
|
|
198
|
-
/**
|
|
199
|
-
* Called when a new user message enters a session (plugin d.ts:187 — the
|
|
200
|
-
* input carries { sessionID, agent? }). Secondary pre-tool registration
|
|
201
|
-
* channel for the approval gate's deferral whitelist (the primary one is
|
|
202
|
-
* the `message.updated` event, proven live even where this hook may be
|
|
203
|
-
* absent — cf. `permission.ask` which is d.ts-listed yet never fires on
|
|
204
|
-
* 1.18.29).
|
|
205
|
-
*/
|
|
206
|
-
"chat.message"?: (input: {
|
|
207
|
-
sessionID?: string;
|
|
208
|
-
agent?: string;
|
|
209
|
-
[key: string]: unknown;
|
|
210
|
-
}, output?: {
|
|
211
|
-
message?: {
|
|
212
|
-
role?: unknown;
|
|
213
|
-
[key: string]: unknown;
|
|
214
|
-
};
|
|
215
|
-
parts?: Array<Record<string, unknown>>;
|
|
216
|
-
}) => void | Promise<void>;
|
|
217
|
-
/** Process teardown (clear the gate's poll interval + pending timers). */
|
|
218
|
-
dispose?: () => void | Promise<void>;
|
|
219
|
-
/**
|
|
220
|
-
* Runs before every tool call; throwing inside it turns the call into a
|
|
221
|
-
* failed tool result whose error text is returned to the model (verified
|
|
222
|
-
* live on 1.18.29) — the mechanism behind R6 env protection.
|
|
223
|
-
*/
|
|
224
|
-
"tool.execute.before"?: (input: ToolExecuteBeforeInput, output: ToolExecuteBeforeOutput) => void | Promise<void>;
|
|
225
|
-
/**
|
|
226
|
-
* Static tool registration segment (T0.4-verified): plugin-owned tools
|
|
227
|
-
* appear on the tool surface next to the built-ins. TeamMode registers
|
|
228
|
-
* tm_read / tm_grep / tm_bash / tm_fetch here.
|
|
229
|
-
*/
|
|
230
|
-
tool?: Record<string, ToolDefinition>;
|
|
231
|
-
[hook: string]: unknown;
|
|
148
|
+
export interface HostEvent {
|
|
149
|
+
type?: string;
|
|
150
|
+
properties?: Record<string, unknown>;
|
|
232
151
|
}
|
|
152
|
+
/** The host-input shape the tm runtime is built with (v2 assembles one from
|
|
153
|
+
* the plugin ctx; see `src/host/v2.ts`). */
|
|
233
154
|
export interface PluginInput {
|
|
234
155
|
client: unknown;
|
|
235
156
|
project: string;
|
|
@@ -239,8 +160,4 @@ export interface PluginInput {
|
|
|
239
160
|
serverUrl?: URL;
|
|
240
161
|
[key: string]: unknown;
|
|
241
162
|
}
|
|
242
|
-
export interface OpenCodePlugin {
|
|
243
|
-
readonly id: string;
|
|
244
|
-
readonly server: (input: PluginInput, options?: Record<string, unknown>) => Promise<Hooks>;
|
|
245
|
-
}
|
|
246
163
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChD;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,UAA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AM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,OAAO,CAAA;IACX,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB"}
|
package/dist/types.js
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Shared type definitions for the v2-only package.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* hooks.push(await plugin.server(input, load.options)); // ← only server()
|
|
11
|
-
* return;
|
|
12
|
-
* }
|
|
13
|
-
* // legacy: bare function default export also works
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* Facts encoded here:
|
|
17
|
-
* - `setup` is NEVER called on this loader version (v1.1-v1.3 died here).
|
|
18
|
-
* - default export MUST be an object with a `server(input, options)`
|
|
19
|
-
* function; `id` on the object controls the Desktop plugin display name.
|
|
20
|
-
* - server() returns v1 Hooks; the `config(cfg)` hook receives the merged
|
|
21
|
-
* opencode config and is the working mechanism to inject agents/commands.
|
|
22
|
-
* - Agent/command entries inside cfg use the v1 config shape:
|
|
23
|
-
* prompt (string) + permission (object keyed by tool).
|
|
4
|
+
* This file used to carry the OpenCode 1.18.x loader contract (`server()`,
|
|
5
|
+
* `Hooks`, `OpenCodePlugin`, the `tool.execute.before` payloads). v1 support
|
|
6
|
+
* was removed in 1.7.0, so those types are gone; what remains is the internal
|
|
7
|
+
* contract the tm_* tools and the v2 adapters share — the tool result /
|
|
8
|
+
* definition shapes, the host event shape, and the agent/command config
|
|
9
|
+
* shapes the v2 config generator reads.
|
|
24
10
|
*/
|
|
25
11
|
export {};
|
|
26
12
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|