@intentic/extension-api 1.337.0 → 1.338.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 +15 -4
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +2 -6
- package/dist/background.js.map +1 -1
- package/dist/diff.d.ts +2 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/engines.js +1 -1
- package/dist/engines.js.map +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +10 -10
- package/dist/runtime.js.map +1 -1
- package/dist/server.d.ts +26 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/stream.js +1 -1
- package/dist/stream.js.map +1 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +7 -0
- package/dist/testing.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +4 -4
- package/src/background.ts +3 -6
- package/src/diff.ts +2 -1
- package/src/engines.ts +1 -1
- package/src/runtime.ts +19 -12
- package/src/server.ts +44 -3
- package/src/stream.ts +1 -1
- package/src/surface.json +787 -0
- package/src/testing.ts +11 -0
- package/src/version.ts +20 -1
package/src/testing.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { type ExtensionEvent, extensionEventsUrl, extensionSettingsUrl } from "@
|
|
|
6
6
|
import { EXTENSION_TOKEN_HEADER } from "@intentic/sandbox-contract/headers";
|
|
7
7
|
import { activateServerModule, createServerApi, deactivateWithin, healthWithin } from "./runtime.js";
|
|
8
8
|
import type {
|
|
9
|
+
ApprovedAction,
|
|
10
|
+
ApprovedActionOutcome,
|
|
9
11
|
ExtensionHealth,
|
|
10
12
|
ExtensionServerApi,
|
|
11
13
|
ExtensionServerModule,
|
|
@@ -69,6 +71,8 @@ export interface FakeExtension {
|
|
|
69
71
|
// Answers whatever the tool's own `call` answers, as ToolDefinition declares it; the host turns that into what the
|
|
70
72
|
// model reads.
|
|
71
73
|
callTool(name: string, args?: ToolArguments, card?: ToolCard, context?: Partial<ToolCallContext>): ReturnType<ToolDefinition["call"]>;
|
|
74
|
+
// An approved action handed over as the daemon's approvals executor hands it, through the host's door.
|
|
75
|
+
perform(action: ApprovedAction, signal?: AbortSignal): Promise<ApprovedActionOutcome>;
|
|
72
76
|
// The owner changing its settings: stored, and told to the extension over its event stream as the daemon would.
|
|
73
77
|
setSettings(values: ExtensionSettingValues): void;
|
|
74
78
|
// A frame on its event stream, as the daemon sends it (`files`, `refs`, `repos`, `settings`).
|
|
@@ -211,6 +215,13 @@ export const fakeExtensionApi = async (options: FakeExtensionOptions): Promise<F
|
|
|
211
215
|
}
|
|
212
216
|
return tool.call(args, { signal: context.signal ?? new AbortController().signal, conversationId: context.conversationId });
|
|
213
217
|
},
|
|
218
|
+
perform: async (action, signal = new AbortController().signal) => {
|
|
219
|
+
const performer = slots.performer();
|
|
220
|
+
if (performer === undefined) {
|
|
221
|
+
throw new Error(`"${id}" carries out no approved actions`);
|
|
222
|
+
}
|
|
223
|
+
return performer(action, { signal });
|
|
224
|
+
},
|
|
214
225
|
setSettings: (values) => {
|
|
215
226
|
const keys = changedKeys(settings, values);
|
|
216
227
|
settings = { ...values };
|
package/src/version.ts
CHANGED
|
@@ -187,4 +187,23 @@
|
|
|
187
187
|
// bot (a mention, a reply, a direct message), as the Discord team assistant does. An older host's parse drops the key,
|
|
188
188
|
// so there the template answers every message on that event. No member or top-level key was added, so the manifest
|
|
189
189
|
// digest is the only grain that records it.
|
|
190
|
-
|
|
190
|
+
// 2.30.0 lets a cli capability card carry a delegated OAuth sign-in: `refreshToken` names the secret field the refresh
|
|
191
|
+
// token lives in and the fields it is bound to, so the extension's own CLI or process stores a new or rotated token
|
|
192
|
+
// through the daemon's oauth-token route instead of printing it for someone to paste, and `probe.oauth` trades that
|
|
193
|
+
// token for an access token before the card's connection test. An older host's parse drops both keys, so there the
|
|
194
|
+
// token is pasted by hand and the test runs without the trade. No member or top-level key was added, so the manifest
|
|
195
|
+
// digest is the only grain that records it.
|
|
196
|
+
// 2.31.0 versions the UI kit. `@intentic/extension-ui`'s exports are names a bundle links against as it links this
|
|
197
|
+
// package's, and nothing recorded them: `RepoRail` left the kit on 2026-10-12 with no version moving, and every
|
|
198
|
+
// installed extension still importing it failed to load with the browser's link error. The recorded surface grows a
|
|
199
|
+
// `uiKitExports` grain (the kit's names.mjs), and those names, with this package's `moduleExports`, are held to semver
|
|
200
|
+
// by the surface guard: a name joining is a minor, and a name leaving is a major, allowed only once names.mjs declares
|
|
201
|
+
// it deprecated and only at or past the floor it gives. Recorded here: `RepoPicker`, added on 2026-10-12 without a
|
|
202
|
+
// version, and `RepoRail`, back and deprecated until 3.0.0. Additive.
|
|
203
|
+
// 2.32.0 lets a backend carry out an approved action itself: `api.approvals.perform(handler)`. An approvals-queue action
|
|
204
|
+
// whose `performer` names the extension is handed to it by the daemon's approvals executor, through a backend-host door
|
|
205
|
+
// no /x route reaches, only after the daemon matched a person's recorded yes against the item and spent it. Until now an
|
|
206
|
+
// approved action ran as an agent turn following the item's instructions, and a connection's own command could only
|
|
207
|
+
// read the workspace file to decide whether it was approved, which any turn writes. Additive: a backend that never calls
|
|
208
|
+
// it is unchanged, and an action naming no performer still runs as a turn. The recorded surface grows the member.
|
|
209
|
+
export const extensionApiVersion = "2.32.0";
|