@skillstate/opencode 2.2.1 → 3.0.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 +86 -91
- package/dist/index.d.ts +28 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/opencode-adapter.d.ts +9 -46
- package/dist/opencode-adapter.d.ts.map +1 -1
- package/dist/opencode-adapter.js +1 -64
- package/dist/opencode-adapter.js.map +1 -1
- package/dist/plugin.d.ts +82 -72
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +138 -201
- package/dist/plugin.js.map +1 -1
- package/dist/session-registry.d.ts +148 -0
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/session-registry.js +236 -0
- package/dist/session-registry.js.map +1 -0
- package/dist/state-store.d.ts +126 -0
- package/dist/state-store.d.ts.map +1 -0
- package/dist/state-store.js +186 -0
- package/dist/state-store.js.map +1 -0
- package/dist/system-hint.d.ts +62 -0
- package/dist/system-hint.d.ts.map +1 -0
- package/dist/system-hint.js +87 -0
- package/dist/system-hint.js.map +1 -0
- package/dist/tools.d.ts +114 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +334 -0
- package/dist/tools.js.map +1 -0
- package/package.json +3 -2
- package/dist/plugin-types.d.ts +0 -64
- package/dist/plugin-types.d.ts.map +0 -1
- package/dist/plugin-types.js +0 -8
- package/dist/plugin-types.js.map +0 -1
package/dist/tools.js
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native OpenCode tools for skillstate.
|
|
3
|
+
*
|
|
4
|
+
* These are the NATIVE tools: the fast path when the host is opencode v2.
|
|
5
|
+
* They carry a real JSON Schema and structured output, where the MCP server
|
|
6
|
+
* (`@skillstate/mcp`, still shipped and still registered) can only offer a
|
|
7
|
+
* JSON-RPC round-trip and untyped text. Both read the same state file, so
|
|
8
|
+
* the choice between them is about speed and typing on one side and reach
|
|
9
|
+
* on the other -- never about which one is correct.
|
|
10
|
+
*
|
|
11
|
+
* The MCP server was once the ONLY option: an opencode v1 plugin could not
|
|
12
|
+
* contribute first-class tools at all.
|
|
13
|
+
*
|
|
14
|
+
* Three tools, deliberately:
|
|
15
|
+
*
|
|
16
|
+
* - `skillstate_read` - what this session has already saved.
|
|
17
|
+
* - `skillstate_update` - merge a patch (the only write path).
|
|
18
|
+
* - `skillstate_merge` - fold sub-agent notes back into the root session.
|
|
19
|
+
*
|
|
20
|
+
* A fourth "delete everything" tool is intentionally absent: `null` in a
|
|
21
|
+
* patch already deletes a key, and a tool whose only job is to erase state
|
|
22
|
+
* is a foot-gun with no upside.
|
|
23
|
+
*
|
|
24
|
+
* ── Result shape ──────────────────────────────────────────────────────────
|
|
25
|
+
*
|
|
26
|
+
* Every tool returns a DISCRIMINATED result: `{ ok: true, ... }` or
|
|
27
|
+
* `{ ok: false, error }`. This is not a stylistic choice. A tool that
|
|
28
|
+
* declares an `output` schema must return a value matching it, so a failure
|
|
29
|
+
* path that returned only text was rejected by the host with "tool did not
|
|
30
|
+
* return its declared output" — a rejected tool call is worse for the agent
|
|
31
|
+
* than a failed one, because it loses the reason. A validation failure is a
|
|
32
|
+
* normal outcome here, and it is modelled as one.
|
|
33
|
+
*
|
|
34
|
+
* SCOPING is automatic. The current session's scope comes from
|
|
35
|
+
* `ToolContext.sessionID` plus the {@link SessionRegistry}, so the model
|
|
36
|
+
* never passes a session id and can never write another agent's file by
|
|
37
|
+
* guessing one.
|
|
38
|
+
*/
|
|
39
|
+
import { stateScopeFor } from './session-registry.js';
|
|
40
|
+
/**
|
|
41
|
+
* Largest serialized patch a single `skillstate_update` accepts. The state
|
|
42
|
+
* file is a side channel for a human to read; a model that tries to dump a
|
|
43
|
+
* whole file into it should be told, not silently accommodated.
|
|
44
|
+
*/
|
|
45
|
+
export const MAX_PATCH_BYTES = 64 * 1024;
|
|
46
|
+
/* ------------------------------------------------------------------ */
|
|
47
|
+
/* Result plumbing */
|
|
48
|
+
/* ------------------------------------------------------------------ */
|
|
49
|
+
/** Wrap a successful payload in the tool result envelope. */
|
|
50
|
+
function ok(value) {
|
|
51
|
+
return { ok: true, value };
|
|
52
|
+
}
|
|
53
|
+
/** Wrap a refusal in the tool result envelope. */
|
|
54
|
+
function refuse(error) {
|
|
55
|
+
return { ok: false, error };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Render a result as the host-facing tool result.
|
|
59
|
+
*
|
|
60
|
+
* `content` carries the same JSON so the model reads a stable shape whether
|
|
61
|
+
* or not the host surfaces `output` — and a refusal states its reason in
|
|
62
|
+
* plain text rather than burying it in a shape the model must parse.
|
|
63
|
+
*/
|
|
64
|
+
function render(result) {
|
|
65
|
+
if (result.ok) {
|
|
66
|
+
return { output: result, content: JSON.stringify(result.value, null, 2) };
|
|
67
|
+
}
|
|
68
|
+
return { output: result, content: result.error };
|
|
69
|
+
}
|
|
70
|
+
/* ------------------------------------------------------------------ */
|
|
71
|
+
/* Schemas */
|
|
72
|
+
/* ------------------------------------------------------------------ */
|
|
73
|
+
function object(properties, required = []) {
|
|
74
|
+
return {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties,
|
|
77
|
+
required: [...required],
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** The state document: a free-form JSON object. */
|
|
82
|
+
const STATE = { type: 'object', additionalProperties: true };
|
|
83
|
+
const STRING_ARRAY = { type: 'array', items: { type: 'string' } };
|
|
84
|
+
/** The change sets a patch or merge reports. */
|
|
85
|
+
const CHANGES = object({ added: STRING_ARRAY, updated: STRING_ARRAY, deleted: STRING_ARRAY }, ['added', 'updated', 'deleted']);
|
|
86
|
+
/**
|
|
87
|
+
* Build an `output` schema for a result whose success payload is `value`.
|
|
88
|
+
*
|
|
89
|
+
* The `ok` discriminator is the only required key, so a refusal validates
|
|
90
|
+
* exactly as well as a success does — the shape the host checks is the
|
|
91
|
+
* shape every call actually returns.
|
|
92
|
+
*/
|
|
93
|
+
function outputSchema(value) {
|
|
94
|
+
return object({
|
|
95
|
+
ok: { type: 'boolean' },
|
|
96
|
+
value: value,
|
|
97
|
+
error: { type: 'string' },
|
|
98
|
+
}, ['ok']);
|
|
99
|
+
}
|
|
100
|
+
const READ_OUTPUT = outputSchema(object({ state: STATE, path: { type: 'string' }, scope: { type: 'string' }, empty: { type: 'boolean' } }, [
|
|
101
|
+
'state',
|
|
102
|
+
'path',
|
|
103
|
+
'scope',
|
|
104
|
+
'empty',
|
|
105
|
+
]));
|
|
106
|
+
const UPDATE_OUTPUT = outputSchema(object({ state: STATE, changes: CHANGES, path: { type: 'string' }, scope: { type: 'string' } }, ['state', 'changes', 'path', 'scope']));
|
|
107
|
+
const MERGE_OUTPUT = outputSchema(object({
|
|
108
|
+
state: STATE,
|
|
109
|
+
changes: CHANGES,
|
|
110
|
+
merged: STRING_ARRAY,
|
|
111
|
+
skipped: STRING_ARRAY,
|
|
112
|
+
}, ['state', 'changes', 'merged', 'skipped']));
|
|
113
|
+
/* ------------------------------------------------------------------ */
|
|
114
|
+
/* Input handling */
|
|
115
|
+
/* ------------------------------------------------------------------ */
|
|
116
|
+
/** JSON guard: a usable top-level object value. */
|
|
117
|
+
function isPlainObject(value) {
|
|
118
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Narrow a tool's `input`.
|
|
122
|
+
*
|
|
123
|
+
* A tool declared with a JSON Schema is validated by the host before
|
|
124
|
+
* `execute` runs, so the parameter arrives typed `unknown` and narrowing it
|
|
125
|
+
* here is the honest boundary rather than a cast. Unknown keys are dropped
|
|
126
|
+
* instead of forwarded, so a model that invents a field cannot smuggle it
|
|
127
|
+
* into the patch. The host check is not sufficient on its own: it cannot
|
|
128
|
+
* see a byte budget, and JSON Schema does not describe "no undefined".
|
|
129
|
+
*/
|
|
130
|
+
function readInput(input, guard) {
|
|
131
|
+
if (!isPlainObject(input))
|
|
132
|
+
return guard({});
|
|
133
|
+
return guard(input);
|
|
134
|
+
}
|
|
135
|
+
/** Reader for `skillstate_read`: an optional sub-agent scope. */
|
|
136
|
+
function readReadInput(input) {
|
|
137
|
+
return readInput(input, (raw) => {
|
|
138
|
+
const scope = typeof raw['scope'] === 'string' ? raw['scope'].trim() : '';
|
|
139
|
+
return scope.length > 0 ? { scope } : {};
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/** Reader for `skillstate_update`: the required patch. */
|
|
143
|
+
function readUpdateInput(input) {
|
|
144
|
+
return readInput(input, (raw) => ({ patch: raw['patch'] }));
|
|
145
|
+
}
|
|
146
|
+
/** Reader for `skillstate_merge`: optional scope and keep policy. */
|
|
147
|
+
function readMergeInput(input) {
|
|
148
|
+
return readInput(input, (raw) => {
|
|
149
|
+
const scope = typeof raw['scope'] === 'string' ? raw['scope'].trim() : '';
|
|
150
|
+
return {
|
|
151
|
+
...(scope.length > 0 ? { scope } : {}),
|
|
152
|
+
keep: raw['keep'] === 'source' ? 'source' : 'existing',
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Validate and normalize an incoming patch.
|
|
158
|
+
*
|
|
159
|
+
* Returns either the patch or a human-readable reason it was rejected. The
|
|
160
|
+
* checks protect the file; they do not dictate the model's schema. A state
|
|
161
|
+
* note is free-form by design, so the only hard rules are "must be an
|
|
162
|
+
* object", "must be JSON-serializable", and "must fit".
|
|
163
|
+
*/
|
|
164
|
+
export function normalizePatch(raw) {
|
|
165
|
+
if (!isPlainObject(raw)) {
|
|
166
|
+
return {
|
|
167
|
+
ok: false,
|
|
168
|
+
reason: '`patch` must be a JSON object, for example {"decisions": ["..."]}.',
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
172
|
+
if (key.length === 0) {
|
|
173
|
+
return { ok: false, reason: '`patch` contains an empty key.' };
|
|
174
|
+
}
|
|
175
|
+
if (value === undefined) {
|
|
176
|
+
return {
|
|
177
|
+
ok: false,
|
|
178
|
+
reason: `\`${key}\` is undefined - omit the key instead, or set it to null to delete it.`,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
let serialized;
|
|
183
|
+
try {
|
|
184
|
+
serialized = JSON.stringify(raw);
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
return {
|
|
188
|
+
ok: false,
|
|
189
|
+
reason: '`patch` is not JSON-serializable - use plain objects, arrays, strings, numbers, booleans and null.',
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
const bytes = Buffer.byteLength(serialized, 'utf-8');
|
|
193
|
+
if (bytes > MAX_PATCH_BYTES) {
|
|
194
|
+
return {
|
|
195
|
+
ok: false,
|
|
196
|
+
reason: `\`patch\` is ${bytes} bytes, over the ${MAX_PATCH_BYTES}-byte limit. Keep file contents in the repository instead and save only the path.`,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
return { ok: true, patch: raw };
|
|
200
|
+
}
|
|
201
|
+
/** Best-effort error text; never leaks a stack into the model context. */
|
|
202
|
+
function errorMessage(error) {
|
|
203
|
+
return error instanceof Error ? error.message : String(error);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* The scope a call addresses: an explicit override when the model passed
|
|
207
|
+
* one (only ever a sub-agent scope name it learned from the system fragment
|
|
208
|
+
* or from `skillstate_merge`), otherwise this session's own scope.
|
|
209
|
+
*/
|
|
210
|
+
function resolveScope(scope, context, deps) {
|
|
211
|
+
return scope !== undefined && scope.length > 0 ? scope : deps.scopeFor(context.sessionID);
|
|
212
|
+
}
|
|
213
|
+
/* ------------------------------------------------------------------ */
|
|
214
|
+
/* Registration */
|
|
215
|
+
/* ------------------------------------------------------------------ */
|
|
216
|
+
/**
|
|
217
|
+
* Register the skillstate tools on an editor.
|
|
218
|
+
*
|
|
219
|
+
* The callback is synchronous, side-effect-free and replayable: OpenCode
|
|
220
|
+
* re-runs it on every registry rebuild, so it must not do I/O at
|
|
221
|
+
* registration time. All filesystem work happens inside `execute`.
|
|
222
|
+
*/
|
|
223
|
+
export function registerTools(editor, deps) {
|
|
224
|
+
editor.namespace({
|
|
225
|
+
name: 'skillstate',
|
|
226
|
+
description: 'Persist project notes across context resets and compaction.',
|
|
227
|
+
});
|
|
228
|
+
/* -- skillstate_read ---------------------------------------------- */
|
|
229
|
+
editor.add({
|
|
230
|
+
name: 'skillstate_read',
|
|
231
|
+
description: 'Read the notes this session has saved for the current project (file: .skillstate/skillstate.json). Use after a context reset or compaction to recover earlier decisions, file paths, and remaining work. Returns the stored document, or an empty object when nothing is saved yet.',
|
|
232
|
+
input: object({
|
|
233
|
+
scope: {
|
|
234
|
+
type: 'string',
|
|
235
|
+
description: 'Optional sub-agent scope to read instead of this session. Omit to read this session own notes.',
|
|
236
|
+
},
|
|
237
|
+
}),
|
|
238
|
+
output: READ_OUTPUT,
|
|
239
|
+
async execute(input, context) {
|
|
240
|
+
const scope = resolveScope(readReadInput(input).scope, context, deps);
|
|
241
|
+
const state = deps.store.read(scope);
|
|
242
|
+
return render(ok({
|
|
243
|
+
state,
|
|
244
|
+
path: deps.store.pathFor(scope),
|
|
245
|
+
scope,
|
|
246
|
+
empty: Object.keys(state).length === 0,
|
|
247
|
+
}));
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
/* -- skillstate_update -------------------------------------------- */
|
|
251
|
+
editor.add({
|
|
252
|
+
name: 'skillstate_update',
|
|
253
|
+
description: 'Merge a patch into the notes this session has saved for the project. Keys merge shallowly, nested objects merge recursively, and a null value deletes that key. Use it to record a decision already made, a file path already located, or what is still outstanding - not to log the conversation. Returns the merged document and which keys changed.',
|
|
254
|
+
input: object({
|
|
255
|
+
patch: {
|
|
256
|
+
type: 'object',
|
|
257
|
+
description: 'Sparse patch to merge, e.g. {"decisions":["..."],"todo":["..."]}. Set a key to null to delete it.',
|
|
258
|
+
},
|
|
259
|
+
}, ['patch']),
|
|
260
|
+
output: UPDATE_OUTPUT,
|
|
261
|
+
async execute(input, context) {
|
|
262
|
+
const checked = normalizePatch(readUpdateInput(input).patch);
|
|
263
|
+
if (!checked.ok)
|
|
264
|
+
return render(refuse(checked.reason));
|
|
265
|
+
const scope = resolveScope(undefined, context, deps);
|
|
266
|
+
try {
|
|
267
|
+
const { state, changes } = await deps.store.patch(scope, checked.patch);
|
|
268
|
+
return render(ok({ state, changes, path: deps.store.pathFor(scope), scope }));
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
return render(refuse(`Could not save the notes: ${errorMessage(error)}`));
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
/* -- skillstate_merge --------------------------------------------- */
|
|
276
|
+
editor.add({
|
|
277
|
+
name: 'skillstate_merge',
|
|
278
|
+
description: 'Fold a sub-agent saved notes into this session notes. Call it with no arguments from a root session to fold in every sub-agent of this session, or pass a sub-agent scope to fold just that one. Nested objects merge; conflicting values keep the existing one unless you pass keep: "source".',
|
|
279
|
+
input: object({
|
|
280
|
+
scope: {
|
|
281
|
+
type: 'string',
|
|
282
|
+
description: 'Sub-agent scope to fold in. Omit to fold in every sub-agent of this session.',
|
|
283
|
+
},
|
|
284
|
+
keep: {
|
|
285
|
+
type: 'string',
|
|
286
|
+
enum: ['existing', 'source'],
|
|
287
|
+
description: 'Which side wins a conflict. Defaults to "existing", this session value.',
|
|
288
|
+
},
|
|
289
|
+
}),
|
|
290
|
+
output: MERGE_OUTPUT,
|
|
291
|
+
async execute(input, context) {
|
|
292
|
+
if (context.signal.aborted)
|
|
293
|
+
return render(refuse('Cancelled.'));
|
|
294
|
+
if (deps.scopeFor(context.sessionID) !== '') {
|
|
295
|
+
return render(refuse('skillstate_merge is only available to the root session. Write your findings with skillstate_update instead - the main session folds them in.'));
|
|
296
|
+
}
|
|
297
|
+
const { scope, keep } = readMergeInput(input);
|
|
298
|
+
// A bulk fold enumerates SESSION ids from the registry, so each one has
|
|
299
|
+
// to be translated to the scope name it writes under. An explicit
|
|
300
|
+
// `scope` is already a scope name (the model read it from the system
|
|
301
|
+
// fragment) and must be passed through untouched.
|
|
302
|
+
const targets = scope !== undefined
|
|
303
|
+
? [{ scope, label: scope }]
|
|
304
|
+
: deps.sessions
|
|
305
|
+
.descendantsOf(context.sessionID)
|
|
306
|
+
.map((sessionID) => ({ scope: deps.scopeFor(sessionID), label: sessionID }));
|
|
307
|
+
if (targets.length === 0) {
|
|
308
|
+
return render(ok({ state: deps.store.read(''), changes: emptyChanges(), merged: [], skipped: [] }));
|
|
309
|
+
}
|
|
310
|
+
const merged = [];
|
|
311
|
+
const skipped = [];
|
|
312
|
+
let state = {};
|
|
313
|
+
let changes = emptyChanges();
|
|
314
|
+
for (const target of targets) {
|
|
315
|
+
try {
|
|
316
|
+
const result = await deps.store.merge('', target.scope, keep);
|
|
317
|
+
state = result.state;
|
|
318
|
+
changes = result.changes;
|
|
319
|
+
merged.push(target.label);
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
skipped.push(target.label);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return render(ok({ state, changes, merged, skipped }));
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/** A change set with nothing in it. */
|
|
330
|
+
function emptyChanges() {
|
|
331
|
+
return { added: [], updated: [], deleted: [] };
|
|
332
|
+
}
|
|
333
|
+
export { stateScopeFor };
|
|
334
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,CAAC;AAiDzC,wEAAwE;AACxE,y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
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "OpenCode platform adapter for the skillstate runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@
|
|
28
|
+
"@opencode/plugin": "2.0.19",
|
|
29
|
+
"@skillstate/core": "^3.0.0"
|
|
29
30
|
}
|
|
30
31
|
}
|
package/dist/plugin-types.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal local types for OpenCode plugin hooks — the `@opencode-ai/plugin`
|
|
3
|
-
* shape, verified against opencode 1.17 (PluginInput/Hooks). Declared locally
|
|
4
|
-
* to keep `@skillstate/opencode` zero-dep; the host supplies the real types
|
|
5
|
-
* at runtime.
|
|
6
|
-
*/
|
|
7
|
-
/** Message roles seen by `experimental.chat.messages.transform`. */
|
|
8
|
-
export type OpenCodeMessageRole = 'user' | 'assistant' | 'system';
|
|
9
|
-
/**
|
|
10
|
-
* Message envelope: the transform pipeline hands each message as
|
|
11
|
-
* `{ info, parts }` — the role lives on `info.role`.
|
|
12
|
-
*/
|
|
13
|
-
export interface OpenCodeMessage {
|
|
14
|
-
info: {
|
|
15
|
-
role: OpenCodeMessageRole | string;
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
};
|
|
18
|
-
parts: Array<{
|
|
19
|
-
type: string;
|
|
20
|
-
text?: string;
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
}>;
|
|
23
|
-
}
|
|
24
|
-
/** Output payload of `experimental.chat.messages.transform`. */
|
|
25
|
-
export interface MessagesTransformOutput {
|
|
26
|
-
/** Mutated IN PLACE — the pipeline keeps the original array reference. */
|
|
27
|
-
messages: OpenCodeMessage[];
|
|
28
|
-
}
|
|
29
|
-
/** Output payload of `experimental.session.compacting`. */
|
|
30
|
-
export interface SessionCompactingOutput {
|
|
31
|
-
context: string[];
|
|
32
|
-
prompt?: string;
|
|
33
|
-
}
|
|
34
|
-
/** Output payload of `tool.execute.after`. */
|
|
35
|
-
export interface ToolExecuteAfterOutput {
|
|
36
|
-
title?: string;
|
|
37
|
-
/** The tool's string response (state_patch extraction source). */
|
|
38
|
-
output: unknown;
|
|
39
|
-
metadata?: unknown;
|
|
40
|
-
}
|
|
41
|
-
/** OpenCode hooks used by the skillstate plugin. */
|
|
42
|
-
export interface SkillStateHooks {
|
|
43
|
-
'experimental.chat.messages.transform'?: (input: Record<string, never>, output: MessagesTransformOutput) => Promise<void>;
|
|
44
|
-
'experimental.session.compacting'?: (input: {
|
|
45
|
-
sessionID: string;
|
|
46
|
-
}, output: SessionCompactingOutput) => Promise<void>;
|
|
47
|
-
'tool.execute.after'?: (input: {
|
|
48
|
-
tool: string;
|
|
49
|
-
sessionID: string;
|
|
50
|
-
callID: string;
|
|
51
|
-
args: unknown;
|
|
52
|
-
}, output: ToolExecuteAfterOutput) => Promise<void>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* OpenCode plugin: an async factory receiving the host input and returning
|
|
56
|
-
* the hooks object (`Plugin` from `@opencode-ai/plugin`).
|
|
57
|
-
*/
|
|
58
|
-
export type SkillStatePlugin = (input: {
|
|
59
|
-
project?: unknown;
|
|
60
|
-
client?: unknown;
|
|
61
|
-
$?: unknown;
|
|
62
|
-
[key: string]: unknown;
|
|
63
|
-
}) => Promise<SkillStateHooks>;
|
|
64
|
-
//# sourceMappingURL=plugin-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-types.d.ts","sourceRoot":"","sources":["../src/plugin-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,E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AED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/plugin-types.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal local types for OpenCode plugin hooks — the `@opencode-ai/plugin`
|
|
3
|
-
* shape, verified against opencode 1.17 (PluginInput/Hooks). Declared locally
|
|
4
|
-
* to keep `@skillstate/opencode` zero-dep; the host supplies the real types
|
|
5
|
-
* at runtime.
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=plugin-types.js.map
|
package/dist/plugin-types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-types.js","sourceRoot":"","sources":["../src/plugin-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|