@ottimis/jack-provider-sdk 0.1.0 → 0.3.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/dist/backend.d.ts +38 -12
- package/dist/backend.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/usage.js +34 -0
- package/dist/cjs/usage.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +151 -55
- package/dist/provider.d.ts.map +1 -1
- package/dist/usage.d.ts +219 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +33 -0
- package/dist/usage.js.map +1 -0
- package/package.json +5 -3
- package/src/backend.ts +28 -12
- package/src/index.ts +1 -0
- package/src/provider.ts +161 -44
- package/src/usage.ts +228 -0
package/dist/backend.d.ts
CHANGED
|
@@ -48,10 +48,28 @@ export type AgentSystemPrompt = string | {
|
|
|
48
48
|
append?: string;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
-
* MCP server configuration
|
|
52
|
-
*
|
|
51
|
+
* MCP server configuration handed to the provider via
|
|
52
|
+
* {@link AgentQueryOptions.mcpServers}. Mirrors the official MCP wire
|
|
53
|
+
* format (the same shape Anthropic, OpenAI, and Google all consume).
|
|
54
|
+
*
|
|
55
|
+
* Replaces the legacy opaque `AgentMcpServerConfig = unknown` so the
|
|
56
|
+
* type system enforces the contract end-to-end and the host can inspect
|
|
57
|
+
* the bag for telemetry / preview without double-translating.
|
|
53
58
|
*/
|
|
54
|
-
export type
|
|
59
|
+
export type McpServerSpec = {
|
|
60
|
+
type: 'stdio';
|
|
61
|
+
command: string;
|
|
62
|
+
args?: string[];
|
|
63
|
+
env?: Record<string, string>;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'http';
|
|
66
|
+
url: string;
|
|
67
|
+
headers?: Record<string, string>;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'sse';
|
|
70
|
+
url: string;
|
|
71
|
+
headers?: Record<string, string>;
|
|
72
|
+
};
|
|
55
73
|
/** Reasoning-effort knob. Provider-validated; not all providers honor every value. */
|
|
56
74
|
export type AgentEffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
57
75
|
/**
|
|
@@ -132,7 +150,7 @@ export type AgentQueryOptions = {
|
|
|
132
150
|
* knowledge sources).
|
|
133
151
|
*/
|
|
134
152
|
additionalDirectories?: string[];
|
|
135
|
-
mcpServers?: Record<string,
|
|
153
|
+
mcpServers?: Record<string, McpServerSpec>;
|
|
136
154
|
resume?: string;
|
|
137
155
|
/**
|
|
138
156
|
* Initial model for the spawn. Live switches use
|
|
@@ -198,16 +216,24 @@ export interface AgentSession extends AsyncIterable<NormalizedMessage> {
|
|
|
198
216
|
*/
|
|
199
217
|
setModel(model?: string): Promise<void>;
|
|
200
218
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
219
|
+
* Switch the reasoning-effort tier live, without respawning the child
|
|
220
|
+
* process. Pass `undefined` to clear any override and let the provider
|
|
221
|
+
* fall back to its default. Gated by `CapabilityMatrix.liveEffortSwitch`
|
|
222
|
+
* — providers without live switching declare `false` and the renderer
|
|
223
|
+
* hides the inline Effort dropdown.
|
|
224
|
+
*
|
|
225
|
+
* Replaces the legacy `applyFlagSettings({ effortLevel })` bag — Claude
|
|
226
|
+
* was the only producer and Codex/Gemini both threw `UNSUPPORTED`. The
|
|
227
|
+
* host now calls this method by name and the type system tells the
|
|
228
|
+
* provider author exactly what to wire.
|
|
204
229
|
*/
|
|
205
|
-
|
|
230
|
+
setEffortLevel(effort: AgentEffortLevel | undefined): Promise<void>;
|
|
206
231
|
/**
|
|
207
|
-
* Read the effective
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
232
|
+
* Read the effective runtime settings the provider booted with. Today
|
|
233
|
+
* the host only consumes `effective.effortLevel` to populate the
|
|
234
|
+
* Effort dropdown's initial value; the rest of the bag is opaque so
|
|
235
|
+
* providers with richer settings layers can passthrough additional
|
|
236
|
+
* keys without an SDK bump.
|
|
211
237
|
*/
|
|
212
238
|
getSettings(): Promise<AgentSettingsResponse>;
|
|
213
239
|
}
|
package/dist/backend.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,yBAAyB,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAMhC,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,aAAa,GACb,MAAM,GACN,mBAAmB,CAAA;AAEvB,2DAA2D;AAC3D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAE7D;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,yBAAyB,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,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4C;IAC5C,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvF,gFAAgF;IAChF,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -39,4 +39,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
__exportStar(require("./backend"), exports);
|
|
40
40
|
__exportStar(require("./spawner"), exports);
|
|
41
41
|
__exportStar(require("./provider"), exports);
|
|
42
|
+
__exportStar(require("./usage"), exports);
|
|
42
43
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,4CAAyB;AACzB,4CAAyB;AACzB,6CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,4CAAyB;AACzB,4CAAyB;AACzB,6CAA0B;AAC1B,0CAAuB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Usage / billing capability — provider-owned data flow.
|
|
4
|
+
*
|
|
5
|
+
* Each provider knows how to talk to its own billing surface (Claude
|
|
6
|
+
* cookie API for Pro/Max, OpenAI usage endpoints for Codex, Gemini's
|
|
7
|
+
* Google Cloud quotas, …) and how to map its SDK's per-message token
|
|
8
|
+
* counts into a canonical shape. The host runs a generic poll loop and
|
|
9
|
+
* a generic chip — it never special-cases any provider.
|
|
10
|
+
*
|
|
11
|
+
* Two surfaces:
|
|
12
|
+
*
|
|
13
|
+
* - `fetch()` for **account-level** snapshots. Pulled by a host poller
|
|
14
|
+
* on `recommendedPollIntervalSec` cadence (clamped to host bounds).
|
|
15
|
+
* What "account" means is provider-defined: Claude → org, Codex →
|
|
16
|
+
* OpenAI project, Gemini → Cloud Billing project.
|
|
17
|
+
*
|
|
18
|
+
* - `formatSessionMetrics()` for **per-session** translation. The
|
|
19
|
+
* manager already calls `backend.getContextUsage()` after every
|
|
20
|
+
* `assistant` message; that returns a loose `AgentContextUsage`
|
|
21
|
+
* bag. This hook lets the provider lift it into canonical
|
|
22
|
+
* {@link UsageMetric}[] without the host trying to interpret
|
|
23
|
+
* provider-specific fields.
|
|
24
|
+
*
|
|
25
|
+
* Single source of truth: the provider. Host plumbs, never decodes.
|
|
26
|
+
*
|
|
27
|
+
* Optional everywhere — providers without billing visibility (Codex
|
|
28
|
+
* without admin keys, Gemini without OAuth) leave `fetch()` returning
|
|
29
|
+
* an empty `metrics: []`. The capability flag stays `true` if the
|
|
30
|
+
* provider can format per-session metrics, `false` if it has nothing
|
|
31
|
+
* to say at all.
|
|
32
|
+
*/
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/usage.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
export * from './backend';
|
|
24
24
|
export * from './spawner';
|
|
25
25
|
export * from './provider';
|
|
26
|
+
export * from './usage';
|
|
26
27
|
/**
|
|
27
28
|
* Re-export of `NormalizedMessage` from chat-core so consumers don't need
|
|
28
29
|
* to depend on it directly when their only entrypoint into the wire shape
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AAEvB;;;;;GAKG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -15,23 +15,56 @@
|
|
|
15
15
|
* This file is the boundary between Jack core and a provider package — keep
|
|
16
16
|
* it free of provider-specific imports.
|
|
17
17
|
*/
|
|
18
|
-
import type { AgentBackend, AgentQueryOptions } from './backend';
|
|
18
|
+
import type { AgentBackend, AgentQueryOptions, McpServerSpec } from './backend';
|
|
19
|
+
import type { UsageApi } from './usage';
|
|
20
|
+
import type { ZodType } from 'zod';
|
|
19
21
|
import type { ClientToolHandler, NormalizedMessage, NormalizedToolRef, ProviderUserContentPolicy, ToolShape } from '@ottimis/jack-chat-core';
|
|
20
22
|
export type ProviderId = string;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* Where the provider sourced a slash command from. Drives the
|
|
25
|
+
* {@link SlashCommandDef} discriminated union below — file-sourced
|
|
26
|
+
* commands carry `body` + `filePath`, builtin and wire-sourced ones
|
|
27
|
+
* don't (they don't *have* a markdown file behind them).
|
|
26
28
|
*/
|
|
27
|
-
export type
|
|
29
|
+
export type SlashCommandScope = 'builtin' | 'wire' | 'user' | 'project' | (string & {});
|
|
30
|
+
/**
|
|
31
|
+
* Common surface every slash command def carries regardless of source.
|
|
32
|
+
* The renderer uses these for autocomplete + chip rendering.
|
|
33
|
+
*/
|
|
34
|
+
type SlashCommandDefBase = {
|
|
28
35
|
name: string;
|
|
29
|
-
scope: 'user' | 'project' | 'builtin';
|
|
30
36
|
description?: string;
|
|
31
37
|
argumentHint?: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Slash-command definition surfaced by a provider. Three sources can
|
|
41
|
+
* coexist (see {@link SlashCommandSupport}):
|
|
42
|
+
*
|
|
43
|
+
* - `'builtin'` — static catalog the runtime intercepts. The renderer
|
|
44
|
+
* never opens the file (there is none); the executor is the agent.
|
|
45
|
+
* - `'wire'` — pushed live by the agent over the wire (Gemini ACP
|
|
46
|
+
* `available_commands_update`). Same render contract as builtin —
|
|
47
|
+
* no on-disk artifact.
|
|
48
|
+
* - `'user' | 'project'` — file-based commands the user authored
|
|
49
|
+
* (Claude `.claude/commands/foo.md`, future per-provider analogs).
|
|
50
|
+
* `filePath` + `body` are required so the renderer can offer "open
|
|
51
|
+
* in editor" affordances and the host can expand `$ARGUMENTS` /
|
|
52
|
+
* `$N` placeholders.
|
|
53
|
+
*
|
|
54
|
+
* Discriminated by `scope` so consumers narrow before reading the
|
|
55
|
+
* file-only fields. Replaces the legacy uniform shape that forced
|
|
56
|
+
* builtin/wire commands to ship synthetic empty `body: ''` /
|
|
57
|
+
* `filePath: ''`.
|
|
58
|
+
*/
|
|
59
|
+
export type SlashCommandDef = (SlashCommandDefBase & {
|
|
60
|
+
scope: 'builtin';
|
|
61
|
+
}) | (SlashCommandDefBase & {
|
|
62
|
+
scope: 'wire';
|
|
63
|
+
}) | (SlashCommandDefBase & {
|
|
64
|
+
scope: 'user' | 'project';
|
|
32
65
|
body: string;
|
|
33
66
|
filePath: string;
|
|
34
|
-
};
|
|
67
|
+
});
|
|
35
68
|
/**
|
|
36
69
|
* Parsed envelope a provider's CLI may wrap slash commands in when it logs
|
|
37
70
|
* them into the session transcript. Claude uses
|
|
@@ -193,6 +226,14 @@ export type CapabilityMatrix = {
|
|
|
193
226
|
resumeSession: boolean;
|
|
194
227
|
/** Switch model live without respawn (Claude control request `set_model`). */
|
|
195
228
|
liveModelSwitch: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Switch reasoning-effort tier live without respawn. Drives whether the
|
|
231
|
+
* inline Effort dropdown fires `setEffortLevel()` (true) or requires a
|
|
232
|
+
* spawn-time setting (false → dropdown hidden / annotated). Decoupled
|
|
233
|
+
* from `liveModelSwitch` because Codex has live model but spawn-time
|
|
234
|
+
* effort.
|
|
235
|
+
*/
|
|
236
|
+
liveEffortSwitch: boolean;
|
|
196
237
|
/** Switch permission mode live without respawn. */
|
|
197
238
|
livePermissionModeSwitch: boolean;
|
|
198
239
|
/**
|
|
@@ -209,6 +250,13 @@ export type CapabilityMatrix = {
|
|
|
209
250
|
* renderer hides it and only shows the post-fact audit log.
|
|
210
251
|
*/
|
|
211
252
|
permissionGranularity: 'callback' | 'sandbox-only';
|
|
253
|
+
/**
|
|
254
|
+
* Provider exposes a usage / billing surface (account-level snapshot
|
|
255
|
+
* via `provider.usage.fetch()` and/or per-session metric translation
|
|
256
|
+
* via `formatSessionMetrics()`). When `false`, the chip hides the
|
|
257
|
+
* usage bars and no Connect affordance is offered.
|
|
258
|
+
*/
|
|
259
|
+
usage: boolean;
|
|
212
260
|
};
|
|
213
261
|
/**
|
|
214
262
|
* Re-exports of canonical wire-shape types from chat-core so consumers of
|
|
@@ -315,27 +363,19 @@ export type PrepareSpawnContext = {
|
|
|
315
363
|
isPackaged: boolean;
|
|
316
364
|
};
|
|
317
365
|
/**
|
|
318
|
-
* MCP server registration in canonical
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* {@link
|
|
322
|
-
*
|
|
323
|
-
*
|
|
366
|
+
* MCP server registration in canonical wire-format shape. Same type
|
|
367
|
+
* used at both ends of the knowledge pipeline: as
|
|
368
|
+
* {@link KnowledgeContext.mcpServers} (input to the provider) and as
|
|
369
|
+
* {@link AgentQueryOptions.mcpServers} (output from
|
|
370
|
+
* {@link JackProvider.applyKnowledgeContext}). Each provider's
|
|
371
|
+
* applyKnowledgeContext translates the merged context into its native
|
|
372
|
+
* runtime layout (Claude SDK `mcpServers` map; Codex `mcp_servers.toml`;
|
|
373
|
+
* Gemini ACP `session/new { mcpServers }`).
|
|
374
|
+
*
|
|
375
|
+
* Re-exported as `McpServerSpec` from `./backend` — same type, two names
|
|
376
|
+
* for ergonomics in different code paths.
|
|
324
377
|
*/
|
|
325
|
-
export type KnowledgeMcpResolution =
|
|
326
|
-
type: 'stdio';
|
|
327
|
-
command: string;
|
|
328
|
-
args?: string[];
|
|
329
|
-
env?: Record<string, string>;
|
|
330
|
-
} | {
|
|
331
|
-
type: 'http';
|
|
332
|
-
url: string;
|
|
333
|
-
headers?: Record<string, string>;
|
|
334
|
-
} | {
|
|
335
|
-
type: 'sse';
|
|
336
|
-
url: string;
|
|
337
|
-
headers?: Record<string, string>;
|
|
338
|
-
};
|
|
378
|
+
export type KnowledgeMcpResolution = McpServerSpec;
|
|
339
379
|
/**
|
|
340
380
|
* Provider-neutral container for everything the host has computed about the
|
|
341
381
|
* agent's working context: the system prompt addendum (markdown), the extra
|
|
@@ -370,6 +410,14 @@ export type KnowledgeContext = {
|
|
|
370
410
|
* names the renderer maps to React components. Providers that don't
|
|
371
411
|
* declare branding fall back to neutral defaults.
|
|
372
412
|
*/
|
|
413
|
+
/**
|
|
414
|
+
* Curated icon catalog keys the renderer knows how to map to lucide React
|
|
415
|
+
* components. Hybrid closed/open: well-known values get autocomplete;
|
|
416
|
+
* arbitrary strings still type-check (the renderer falls back to a default
|
|
417
|
+
* icon for unknown keys, so a provider can ship a forward-looking key
|
|
418
|
+
* without breaking older hosts).
|
|
419
|
+
*/
|
|
420
|
+
export type ProviderIconKey = 'sparkles' | 'cpu' | 'gem' | 'bot' | 'brain' | 'star' | 'wand' | 'zap' | (string & {});
|
|
373
421
|
export type ProviderBranding = {
|
|
374
422
|
/**
|
|
375
423
|
* Primary accent color. Used as a subtle border on the chat composer +
|
|
@@ -382,12 +430,13 @@ export type ProviderBranding = {
|
|
|
382
430
|
*/
|
|
383
431
|
accentColor: string;
|
|
384
432
|
/**
|
|
385
|
-
* Curated icon key — one of
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
433
|
+
* Curated icon key — one of {@link ProviderIconKey}. Keeping this a
|
|
434
|
+
* closed/open enum (instead of free-form SVG/asset) means providers
|
|
435
|
+
* don't ship rendering assets and the host stays in control of what
|
|
436
|
+
* shapes can land in the UI. Unknown keys fall back to a default icon
|
|
437
|
+
* in the renderer.
|
|
389
438
|
*/
|
|
390
|
-
iconKey?:
|
|
439
|
+
iconKey?: ProviderIconKey;
|
|
391
440
|
};
|
|
392
441
|
export type JackProvider = {
|
|
393
442
|
id: ProviderId;
|
|
@@ -538,16 +587,8 @@ export type JackProvider = {
|
|
|
538
587
|
*
|
|
539
588
|
* Pattern A providers (Claude, Codex) leave this undefined; the host
|
|
540
589
|
* detects the pattern by absence and skips wiring.
|
|
541
|
-
*
|
|
542
|
-
* `ctx` carries the host's correlation ids the provider may want to
|
|
543
|
-
* bridge to wire-driven side channels (e.g. mapping
|
|
544
|
-
* `available_commands_update` notifications back to the renderer's
|
|
545
|
-
* slash command store via the host's session id). Optional for
|
|
546
|
-
* providers that don't need it.
|
|
547
590
|
*/
|
|
548
|
-
attachClientToolHandler?(handler: ClientToolHandler, ctx
|
|
549
|
-
jackSessionId?: string;
|
|
550
|
-
}): void;
|
|
591
|
+
attachClientToolHandler?(handler: ClientToolHandler, ctx: ClientToolHandlerAttachContext): void;
|
|
551
592
|
/**
|
|
552
593
|
* Persisted permission rules manager. The host's
|
|
553
594
|
* `permissions:{list,add,remove}` IPC dispatches through this — providers
|
|
@@ -555,6 +596,14 @@ export type JackProvider = {
|
|
|
555
596
|
* leave it undefined and the host returns empty snapshots.
|
|
556
597
|
*/
|
|
557
598
|
persistedPermissions?: PersistedPermissionsApi;
|
|
599
|
+
/**
|
|
600
|
+
* Usage / billing capability — provider-owned data flow. See
|
|
601
|
+
* {@link UsageApi}. Optional; when undefined the chip degrades to
|
|
602
|
+
* showing nothing (and `capabilities.usage` MUST be `false`). The
|
|
603
|
+
* provider stays the single source of truth: host plumbs, never
|
|
604
|
+
* decodes.
|
|
605
|
+
*/
|
|
606
|
+
usage?: UsageApi;
|
|
558
607
|
};
|
|
559
608
|
/**
|
|
560
609
|
* Provider-neutral spec for an in-process MCP server the host wants to
|
|
@@ -571,6 +620,33 @@ export type InProcessMcpServerSpec = {
|
|
|
571
620
|
version: string;
|
|
572
621
|
tools: InProcessMcpToolSpec[];
|
|
573
622
|
};
|
|
623
|
+
/**
|
|
624
|
+
* Context the host hands to {@link JackProvider.attachClientToolHandler}
|
|
625
|
+
* so the provider can bridge wire-driven side channels back to the host
|
|
626
|
+
* (e.g. mapping Gemini's `available_commands_update` notifications to
|
|
627
|
+
* the renderer's per-session slash command store).
|
|
628
|
+
*
|
|
629
|
+
* Today only `sessionId` is consumed. `actorId` is reserved for the
|
|
630
|
+
* future team-tier multi-user mode (north-star: every entity carries an
|
|
631
|
+
* actor id so coordination scales beyond single-user). Adding a new
|
|
632
|
+
* required field here would be a major bump; new optional fields ride
|
|
633
|
+
* on a minor.
|
|
634
|
+
*/
|
|
635
|
+
export type ClientToolHandlerAttachContext = {
|
|
636
|
+
/**
|
|
637
|
+
* Host correlation id for the session being spawned. Required —
|
|
638
|
+
* the provider stores it on its per-spawn slot so wire notifications
|
|
639
|
+
* can route back to the right host-side consumer.
|
|
640
|
+
*/
|
|
641
|
+
sessionId: string;
|
|
642
|
+
/**
|
|
643
|
+
* Actor identity placeholder for future multi-user / team-tier
|
|
644
|
+
* support. Today the host always passes `'self'` (or omits) since
|
|
645
|
+
* Jack runs single-user; future remote-agent flows will populate
|
|
646
|
+
* with `'user_xxx@team_yyy'` style strings.
|
|
647
|
+
*/
|
|
648
|
+
actorId?: string;
|
|
649
|
+
};
|
|
574
650
|
/**
|
|
575
651
|
* Behaviour token the provider persists alongside each rule. Mirror of
|
|
576
652
|
* Claude's `permissions.{allow,deny,ask}` arrays — providers with a
|
|
@@ -585,17 +661,32 @@ export type PermissionBehavior = 'allow' | 'deny' | 'ask';
|
|
|
585
661
|
*/
|
|
586
662
|
export type PermissionSource = 'user' | 'userLocal' | 'project' | 'projectLocal';
|
|
587
663
|
/**
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
* (
|
|
664
|
+
* Optional human-readable parse hint for {@link PermissionRule}. Providers
|
|
665
|
+
* whose rule grammar has a recognisable "tool" + "pattern" decomposition
|
|
666
|
+
* (Claude's `Bash(npm install)`, `Edit(*.ts)`) populate this so the UI can
|
|
667
|
+
* render two columns instead of a raw string. Providers with a different
|
|
668
|
+
* grammar (Codex `approval_policy` keyed by command prefix) leave it
|
|
669
|
+
* undefined; the UI falls back to displaying `raw`.
|
|
670
|
+
*/
|
|
671
|
+
export type PermissionRuleHumanReadable = {
|
|
672
|
+
/** Best-effort tool name extracted by the provider (e.g. `Bash`, `Edit`). */
|
|
673
|
+
tool?: string;
|
|
674
|
+
/** Best-effort pattern extracted by the provider (the bit inside the parens, etc.). */
|
|
675
|
+
pattern?: string;
|
|
676
|
+
};
|
|
677
|
+
/**
|
|
678
|
+
* One persisted rule as the provider stores it. `raw` is the only
|
|
679
|
+
* field guaranteed across providers — it's the source of truth for
|
|
680
|
+
* round-trip writes (remove/add use the raw string verbatim) and the
|
|
681
|
+
* fallback display when no parse hint is available. The
|
|
682
|
+
* `humanReadable` sidecar is a Claude-style ergonomic split that
|
|
683
|
+
* other providers may opt out of.
|
|
591
684
|
*/
|
|
592
685
|
export type PermissionRule = {
|
|
593
|
-
/**
|
|
594
|
-
tool: string;
|
|
595
|
-
/** Content inside the parens (the glob / pattern), or null if the rule has no parens. */
|
|
596
|
-
pattern: string | null;
|
|
597
|
-
/** Original string as stored in the settings file — source of truth for round-trip writes. */
|
|
686
|
+
/** Original string as stored by the provider — source of truth for round-trip writes. */
|
|
598
687
|
raw: string;
|
|
688
|
+
/** Optional parse hint for two-column UI rendering. */
|
|
689
|
+
humanReadable?: PermissionRuleHumanReadable;
|
|
599
690
|
};
|
|
600
691
|
export type PermissionsSourceBlock = {
|
|
601
692
|
source: PermissionSource;
|
|
@@ -634,12 +725,17 @@ export type InProcessMcpToolSpec = {
|
|
|
634
725
|
name: string;
|
|
635
726
|
description: string;
|
|
636
727
|
/**
|
|
637
|
-
* Zod schema for the tool arguments
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
* (
|
|
728
|
+
* Zod schema for the tool arguments — a `Record<fieldName, ZodType>`
|
|
729
|
+
* (zod's "shape" form, what `z.object(...)` accepts). Provider
|
|
730
|
+
* implementations consume it via the SDK helper of their choice
|
|
731
|
+
* (Claude wraps with `tool(name, desc, schema, handler)` from
|
|
732
|
+
* `@anthropic-ai/claude-agent-sdk`).
|
|
733
|
+
*
|
|
734
|
+
* `zod` is a peer dep of this SDK so consumer + provider type-check
|
|
735
|
+
* against the same instance. The host always produces zod; trying
|
|
736
|
+
* to stuff JSON Schema here would silently break Claude's wrapper.
|
|
641
737
|
*/
|
|
642
|
-
schema: Record<string,
|
|
738
|
+
schema: Record<string, ZodType>;
|
|
643
739
|
handler: (args: Record<string, unknown>) => Promise<{
|
|
644
740
|
content: Array<{
|
|
645
741
|
type: 'text';
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,SAAS,EACV,MAAM,yBAAyB,CAAA;AAEhC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEvF;;;GAGG;AACH,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,eAAe,GACvB,CAAC,mBAAmB,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC,GAC5C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