@noodleseed/one 0.149.0 → 0.150.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/commands/assistant-surface-ops.d.ts +3 -0
- package/dist/commands/assistant-surface-ops.d.ts.map +1 -1
- package/dist/commands/assistant-surface-ops.js +6 -1
- package/dist/commands/assistant-surface-ops.js.map +1 -1
- package/dist/commands/intents-ops.js +1 -1
- package/dist/commands/intents-ops.js.map +1 -1
- package/node_modules/@noodle-borg/admission-limits/dist/envelope.js +12 -6
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/app-tool-call.d.ts +42 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/app-tool-call.js +45 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.d.ts +2 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.js +17 -3
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-context.d.ts +13 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-context.js +53 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/embed-operator-view.d.ts +8 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/embed-operator-view.js +9 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/embed-store.d.ts +11 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/embed-store.js +2 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/in-memory-embed-store.js +6 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/portable.d.ts +1 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/portable.js +1 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/surface-budget.d.ts +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/surface-budget.js +10 -0
- package/node_modules/@noodle-borg/assistant-gateway/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +31 -3
- package/node_modules/@noodle-borg/authoring/dist/assistant.js +3 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-assistant.js +14 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-hosted-observability.js +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +12 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +8 -3
- package/node_modules/@noodle-borg/observability/dist/assistant-app-tool-usage.js +25 -0
- package/node_modules/@noodle-borg/observability/dist/index.js +1 -0
- package/node_modules/@noodle-borg/service/dist/invocation-context.js +1 -53
- package/node_modules/@noodle-borg/service/dist/observability-runtime.js +4 -6
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-resolution.js +1 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-configuration.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-suggestions.js +1 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +50 -41
- package/node_modules/@noodle-borg/service/dist/routes/intent-capture.js +0 -12
- package/node_modules/@noodle-borg/service/dist/service.js +2 -3
- package/node_modules/@noodle-borg/service/package.json +1 -1
- package/node_modules/@noodleseed/assistant/package.json +1 -1
- package/package.json +2 -2
|
@@ -13,9 +13,12 @@ export interface AssistantEmbedView {
|
|
|
13
13
|
readonly capabilities: readonly string[];
|
|
14
14
|
readonly turnsPerDay: number;
|
|
15
15
|
readonly mintsPerDay: number;
|
|
16
|
+
readonly bridgeCallsPerSession: number;
|
|
17
|
+
readonly bridgeCallsPerDay: number;
|
|
16
18
|
readonly budgetIsDefault: boolean;
|
|
17
19
|
readonly turnsToday: number;
|
|
18
20
|
readonly mintsToday: number;
|
|
21
|
+
readonly bridgeCallsToday: number;
|
|
19
22
|
/** Present only on a surface Noodle is funding; absent means the caps above are the whole story. */
|
|
20
23
|
readonly managedSpend?: {
|
|
21
24
|
readonly state: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-surface-ops.d.ts","sourceRoot":"","sources":["../../src/commands/assistant-surface-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD;;;;;;GAMG;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oGAAoG;IACpG,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"assistant-surface-ops.d.ts","sourceRoot":"","sources":["../../src/commands/assistant-surface-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD;;;;;;GAMG;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IA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sB,kBAAkB,CACtC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,CAAC,CAgEjB"}
|
|
@@ -12,6 +12,9 @@ export function formatEmbedLines(embed) {
|
|
|
12
12
|
// operator opens this command to answer.
|
|
13
13
|
` Turns today ${embed.turnsToday} / ${embed.turnsPerDay}${source}`,
|
|
14
14
|
` Mints today ${embed.mintsToday} / ${embed.mintsPerDay}${source}`,
|
|
15
|
+
// A bridge call spends neither a turn nor a mint, so an operator watching only the two lines
|
|
16
|
+
// above would read browser-agent traffic as a quiet day.
|
|
17
|
+
` Bridge today ${embed.bridgeCallsToday} / ${embed.bridgeCallsPerDay}${source} (${embed.bridgeCallsPerSession} per session)`,
|
|
15
18
|
...managedSpendLines(embed),
|
|
16
19
|
...statusLine(embed),
|
|
17
20
|
];
|
|
@@ -70,6 +73,8 @@ export function parseBudgetFlags(rest) {
|
|
|
70
73
|
['--mints-per-day', 'mintsPerDay'],
|
|
71
74
|
['--mints-per-address-hour', 'mintsPerAddressHour'],
|
|
72
75
|
['--turns-per-address-hour', 'turnsPerAddressHour'],
|
|
76
|
+
['--bridge-calls-per-session', 'bridgeToolCallsPerSession'],
|
|
77
|
+
['--bridge-calls-per-day', 'bridgeToolCallsPerDay'],
|
|
73
78
|
]) {
|
|
74
79
|
const at = rest.indexOf(flag);
|
|
75
80
|
if (at === -1)
|
|
@@ -84,7 +89,7 @@ export function parseBudgetFlags(rest) {
|
|
|
84
89
|
if (Object.keys(body).length === 0) {
|
|
85
90
|
return {
|
|
86
91
|
ok: false,
|
|
87
|
-
error: 'set at least one of --turns-per-day, --mints-per-day, --mints-per-address-hour
|
|
92
|
+
error: 'set at least one of --turns-per-day, --mints-per-day, --mints-per-address-hour, --turns-per-address-hour, --bridge-calls-per-session or --bridge-calls-per-day',
|
|
88
93
|
};
|
|
89
94
|
}
|
|
90
95
|
return { ok: true, body };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-surface-ops.js","sourceRoot":"","sources":["../../src/commands/assistant-surface-ops.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,cAAc,GACf,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"assistant-surface-ops.js","sourceRoot":"","sources":["../../src/commands/assistant-surface-ops.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,cAAc,GACf,MAAM,aAAa,CAAC;AA+BrB,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,OAAO;QACL,GAAG,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,WAAW,EAAE;QACxC,mBAAmB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,mCAAmC,EAAE;QACpF,mBAAmB,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE;QAC9D,2FAA2F;QAC3F,yCAAyC;QACzC,mBAAmB,KAAK,CAAC,UAAU,MAAM,KAAK,CAAC,WAAW,GAAG,MAAM,EAAE;QACrE,mBAAmB,KAAK,CAAC,UAAU,MAAM,KAA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AAM,WAAW,CAC5B,GAAG,QAAQ,CAAC,IAAI,qBAAqB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EACjE,QAAQ,CAAC,KAAK,EACd;YACE,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;SAClC,CACF,CAAC;QACF,IAAI,IAAI,CAAC,IAAI;YAAE,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;YAC7C,KAAK,MAAM,IAAI,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;gBAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,eAAe,CACpB,WAAW,EACX,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,6BAA6B,CAAC,EACjE,IAAI,CAAC,IAAI,CACV,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -75,7 +75,7 @@ async function list(rest, env, home) {
|
|
|
75
75
|
return printCliFailure('intents', {
|
|
76
76
|
code: 'invalid_window',
|
|
77
77
|
message: '--window must be one of 24h, 7d, 14d',
|
|
78
|
-
cause: 'Intent retention is fixed at 14 days
|
|
78
|
+
cause: 'Intent retention is fixed at 14 days.',
|
|
79
79
|
fix: 'Choose a supported retention-bounded window.',
|
|
80
80
|
next: 'noodle intents list --window 7d',
|
|
81
81
|
exitCode: EXIT.USAGE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intents-ops.js","sourceRoot":"","sources":["../../src/commands/intents-ops.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD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ze({
|
|
|
60
60
|
// Fairness, and generous on purpose: thirty conversations an hour is far past ordinary use, and a
|
|
61
61
|
// visitor who somehow reaches it is still bounded by everything above.
|
|
62
62
|
mintsPerVisitorHour: 30,
|
|
63
|
-
// A browser agent works in bursts of reads
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
// A browser agent works in bursts of reads. The web-scale raise above deliberately left these at
|
|
64
|
+
// ADR 0220's sizing, on the reasoning that agent traffic is a different question from visitor
|
|
65
|
+
// traffic and an unmeasured bound should not be re-tuned in passing. That reasoning holds; what it
|
|
66
|
+
// left behind does not. 32 per session sits beside an assistant path that already spends
|
|
67
|
+
// `turnsPerSession` x `toolCallsPerTurn` = 320 tool calls against the same connectors, and a bridge
|
|
68
|
+
// call is the cheaper of the two because it runs no model — so the tighter bound was on the
|
|
69
|
+
// cheaper caller, by an order of magnitude. These bring it back to the same order: a session's
|
|
70
|
+
// bridge allowance is a little under a third of its tool calls, and its day matches `turnsPerDay`.
|
|
71
|
+
// Proportionate, not measured. Both remain guesses, which is the actual argument for the operator
|
|
72
|
+
// overrides that now exist: the number stops needing a release to change.
|
|
73
|
+
bridgeToolCallsPerSession: 100,
|
|
74
|
+
bridgeToolCallsPerDay: 20_000,
|
|
69
75
|
});
|
|
70
76
|
/**
|
|
71
77
|
* Build an envelope from an operator request. Every field is clamped to {@link ADMISSION_MAXIMUM};
|
|
@@ -168,7 +168,7 @@ export function renderEmbeddedAssistantReference() {
|
|
|
168
168
|
'',
|
|
169
169
|
'Omitted UI fields retain the complete managed baseline: a bottom-center frosted prompt pill, 970px outer desktop shell with 20px side padding, 85vh/1025px height bounds, 24px panel with built-in `#F8F8F8` light and `#0C0A09` dark surfaces, bottom prompt chips and pill composer, plain assistant messages, 85%-wide user bubbles, Noodle Seed attribution, and mobile fullscreen. The pill morphs into an input before opening; `launcher.style: "bubble"` opens directly, while `panel.surface: "glass"` remains an explicit translucent alternative. `theme: "auto"` follows the host page and `"invert"` selects its opposite. `suggestedPrompts` is the exact initial set only: pass `[]` for no initial chips, or omit it so the active model generates context-aware initial prompts. After the first message, follow-up prompts are always regenerated from the complete authorized conversation context and are never copied into transcript history. The only attribution is the Noodle Seed row, removed by `behavior.showPoweredBy: false`; the baseline carries no third-party promotion. For exact application-owned color roles, pass the typed React `appearance={{ light: { panel: { surface, text, border }, composer: {...}, confirmation: {...}, primaryButton: {...} }, dark: {...} }}` prop or assign the same object to `element.appearance`. CSS custom properties inherit through the assistant host, so those values may reuse existing application tokens such as `surface: "var(--app-surface)"` without copying literals. The appearance surface covers canvas, panel, header, messages, composer, suggestions, confirmation, buttons, launcher, code, and the MCP App frame; the package README publishes the complete role-to-`--ns-assistant-*` map. Exact parseable literal colors are preserved and low contrast emits `assistant-appearance-warning`; contrast for unresolved CSS references remains host-owned. Precedence is host appearance object, host slots/public variables, saved environment operator override, deployed semantic presentation, then defaults. Prefer reusable `server.ts` defaults; use the Console Assistant tab or `noodle assistant appearance show|apply|reset` for environment-owned changes that should reach existing embeds without a redeploy.',
|
|
170
170
|
'',
|
|
171
|
-
"Set `webmcp: { enabled: true }` on the assistant,
|
|
171
|
+
"Set `webmcp: { enabled: true }` on the assistant to let a browser agent reach this session's tools through the page's WebMCP API, and set it on an individual access surface to override that default in either direction — a marketing surface can opt in while a signed-in one opts out, or the reverse. Off unless set, and inert in browsers without `document.modelContext`. It governs discovery: whether the embed registers the tools this session already projects, narrowed to those that are both app-callable and model-visible. Every call executes over the same apps-bridge path the assistant's own calls take, so a browser agent gets the session's authority and nothing more, and a `confirm: true` tool still stops for a human in the panel rather than being accepted on the agent's behalf. It is not a second authorization boundary — the session is the only one. Bridge calls spend their own per-session and per-day budgets instead of model turns, and the surface's daily kill switch stops them too. Prefer this over hand-registering page-local tools that borrow the visitor's session: those carry no scoped authority, policy, or audit trail.",
|
|
172
172
|
'',
|
|
173
173
|
'Give every business action a portable `tool(..., { title: "Complete task", description: "This will mark the task complete for everyone.", input: z.object({ task: z.string().meta({ title: "Task" }) }) })` title. The standard confirmation uses the tool title/description plus schema field `title`, `description`, and `format`; it shows Confirm and Don\'t proceed and keeps technical action details secondary. `behavior.showConfirmationDetails` defaults to `true`; set it to `false` to remove only the built-in card\'s Additional details disclosure and connector mechanics. The business review and decisions remain, `confirm: true` still suspends until acceptance, and headless/BYO `data-confirmation` stays unchanged. Do not put JSON or implementation names in business-facing copy.',
|
|
174
174
|
'',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { RuntimeArtifact } from '@noodle-borg/compiler';
|
|
2
|
+
import type { ExecuteDeps } from '@noodle-borg/runtime';
|
|
3
|
+
import { dispatchAssistantTool } from './assistant-interactive.js';
|
|
4
|
+
import type { AssistantSessionRecord } from './assistant-store.js';
|
|
5
|
+
/**
|
|
6
|
+
* What one apps-bridge tool call decided, before anything turns it into an HTTP answer.
|
|
7
|
+
*
|
|
8
|
+
* Projection, authorization, argument validation, and dispatch are all this package's already —
|
|
9
|
+
* `dispatchAssistantTool` lives beside this — so the decision belongs here and only the status code
|
|
10
|
+
* belongs to the route. Keeping them apart is also what lets every outcome be recorded in one
|
|
11
|
+
* place: the call used to leave no trace at all, which made `webmcp` a surface label with nothing
|
|
12
|
+
* to put it on.
|
|
13
|
+
*/
|
|
14
|
+
export type AssistantAppToolCallResult = {
|
|
15
|
+
readonly kind: 'not-found';
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'forbidden';
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'invalid-arguments';
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'interaction';
|
|
22
|
+
readonly event: string;
|
|
23
|
+
readonly data: Readonly<Record<string, unknown>>;
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: 'error';
|
|
26
|
+
readonly code: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: 'output';
|
|
29
|
+
readonly output: unknown;
|
|
30
|
+
};
|
|
31
|
+
export interface AssistantAppToolCallInput {
|
|
32
|
+
readonly artifact: RuntimeArtifact;
|
|
33
|
+
readonly deps: ExecuteDeps;
|
|
34
|
+
readonly session: AssistantSessionRecord;
|
|
35
|
+
readonly toolName: string;
|
|
36
|
+
readonly arguments?: unknown;
|
|
37
|
+
readonly now: () => Date;
|
|
38
|
+
readonly store: Parameters<typeof dispatchAssistantTool>[0]['store'];
|
|
39
|
+
readonly audit: Parameters<typeof dispatchAssistantTool>[0]['audit'];
|
|
40
|
+
}
|
|
41
|
+
export declare function executeAssistantAppToolCall(input: AssistantAppToolCallInput): Promise<AssistantAppToolCallResult>;
|
|
42
|
+
//# sourceMappingURL=app-tool-call.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { validateJsonSchemaWithDefaults } from '@noodle-borg/compiler';
|
|
2
|
+
import { evaluateToolAuthorization } from '@noodle-borg/protocol';
|
|
3
|
+
import { resolveInvocationContextSnapshot } from './assistant-context.js';
|
|
4
|
+
import { withAssistantSessionExecutionAuthority } from './assistant-customer-routing.js';
|
|
5
|
+
import { dispatchAssistantTool } from './assistant-interactive.js';
|
|
6
|
+
export async function executeAssistantAppToolCall(input) {
|
|
7
|
+
const { artifact, session } = input;
|
|
8
|
+
const tool = artifact.tools.find((candidate) => candidate.name === input.toolName);
|
|
9
|
+
// The same gate `tools/list` projected with: a tool an app may not see is a tool it may not call.
|
|
10
|
+
if (!tool || tool._meta?.ui?.visibility?.includes('app') === false)
|
|
11
|
+
return { kind: 'not-found' };
|
|
12
|
+
if (!evaluateToolAuthorization(tool.authorization, session.caller).allow) {
|
|
13
|
+
return { kind: 'forbidden' };
|
|
14
|
+
}
|
|
15
|
+
const executeDeps = withAssistantSessionExecutionAuthority(input.deps, artifact, session);
|
|
16
|
+
const context = await resolveInvocationContextSnapshot({
|
|
17
|
+
artifact,
|
|
18
|
+
executeDeps,
|
|
19
|
+
caller: session.caller,
|
|
20
|
+
instant: input.now(),
|
|
21
|
+
...(session.preferences ? { applicationPreference: session.preferences } : {}),
|
|
22
|
+
});
|
|
23
|
+
const validated = validateJsonSchemaWithDefaults(tool.inputSchema, input.arguments ?? {});
|
|
24
|
+
if (validated.issues.length > 0)
|
|
25
|
+
return { kind: 'invalid-arguments' };
|
|
26
|
+
const dispatched = await dispatchAssistantTool({
|
|
27
|
+
artifact,
|
|
28
|
+
tool,
|
|
29
|
+
arguments: validated.value,
|
|
30
|
+
executeDeps,
|
|
31
|
+
caller: session.caller,
|
|
32
|
+
context,
|
|
33
|
+
session,
|
|
34
|
+
store: input.store,
|
|
35
|
+
audit: input.audit,
|
|
36
|
+
now: input.now,
|
|
37
|
+
});
|
|
38
|
+
if (dispatched.kind !== 'event')
|
|
39
|
+
return { kind: 'output', output: dispatched.output };
|
|
40
|
+
if (dispatched.event === 'tool_proposed' || dispatched.event === 'input_requested') {
|
|
41
|
+
return { kind: 'interaction', event: dispatched.event, data: dispatched.data };
|
|
42
|
+
}
|
|
43
|
+
return { kind: 'error', code: String(dispatched.data.code ?? dispatched.event) };
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=app-tool-call.js.map
|
|
@@ -16,9 +16,9 @@ import type { TenantRef } from './tenant-ref.js';
|
|
|
16
16
|
* manifest cannot silently grow the browser payload. That list is owned by the gateway, beside the
|
|
17
17
|
* record type it produces, so this projection and the type it satisfies cannot disagree.
|
|
18
18
|
*/
|
|
19
|
-
export declare function assistantBrowserConfiguration(server: ArtifactServer): AssistantAppearanceOverride | undefined;
|
|
19
|
+
export declare function assistantBrowserConfiguration(server: ArtifactServer, boundSurface?: 'public' | 'authenticated'): AssistantAppearanceOverride | undefined;
|
|
20
20
|
/** Resolve environment operator state above the immutable deployment projection. */
|
|
21
|
-
export declare function effectiveAssistantBrowserConfiguration(server: ArtifactServer, tenant: TenantRef, store: AssistantAppearanceSettingsStore | undefined): Promise<{
|
|
21
|
+
export declare function effectiveAssistantBrowserConfiguration(server: ArtifactServer, tenant: TenantRef, store: AssistantAppearanceSettingsStore | undefined, boundSurface?: 'public' | 'authenticated'): Promise<{
|
|
22
22
|
effective: AssistantAppearanceOverride | undefined;
|
|
23
23
|
fallback: "halo";
|
|
24
24
|
provenance: import("./assistant-appearance.js").AssistantAppearanceProvenance;
|
|
@@ -13,7 +13,7 @@ import { ASSISTANT_BROWSER_UI_FIELDS } from './assistant-store.js';
|
|
|
13
13
|
* manifest cannot silently grow the browser payload. That list is owned by the gateway, beside the
|
|
14
14
|
* record type it produces, so this projection and the type it satisfies cannot disagree.
|
|
15
15
|
*/
|
|
16
|
-
export function assistantBrowserConfiguration(server) {
|
|
16
|
+
export function assistantBrowserConfiguration(server, boundSurface) {
|
|
17
17
|
const assistant = server.assistant;
|
|
18
18
|
const ui = {};
|
|
19
19
|
for (const field of ASSISTANT_BROWSER_UI_FIELDS) {
|
|
@@ -21,6 +21,15 @@ export function assistantBrowserConfiguration(server) {
|
|
|
21
21
|
if (value !== undefined)
|
|
22
22
|
ui[field] = value;
|
|
23
23
|
}
|
|
24
|
+
// `webmcp` is the one field the session's own surface may answer differently (ADR 0220, amended):
|
|
25
|
+
// it decides whether this embed registers its tools with `document.modelContext`, and a deployment
|
|
26
|
+
// serving a marketing page and a signed-in app has two honest answers to that. Read from the bound
|
|
27
|
+
// surface only — a caller that cannot name one, including a pre-surfaces deployment, gets the
|
|
28
|
+
// assistant's own value rather than an arbitrary surface's. Nothing else is read here, so
|
|
29
|
+
// consulting the surface cannot widen what crosses to the browser.
|
|
30
|
+
const surfaceWebmcp = surfaceOfMode(assistant, boundSurface)?.webmcp;
|
|
31
|
+
if (surfaceWebmcp !== undefined)
|
|
32
|
+
ui.webmcp = surfaceWebmcp;
|
|
24
33
|
const configuration = {
|
|
25
34
|
...(server.branding ? { branding: server.branding } : {}),
|
|
26
35
|
...(Object.keys(ui).length > 0 ? { assistant: ui } : {}),
|
|
@@ -29,9 +38,14 @@ export function assistantBrowserConfiguration(server) {
|
|
|
29
38
|
? configuration
|
|
30
39
|
: undefined;
|
|
31
40
|
}
|
|
41
|
+
function surfaceOfMode(assistant, mode) {
|
|
42
|
+
if (mode === undefined || !Array.isArray(assistant?.surfaces))
|
|
43
|
+
return undefined;
|
|
44
|
+
return assistant.surfaces.find((surface) => surface.mode === mode);
|
|
45
|
+
}
|
|
32
46
|
/** Resolve environment operator state above the immutable deployment projection. */
|
|
33
|
-
export async function effectiveAssistantBrowserConfiguration(server, tenant, store) {
|
|
34
|
-
const developer = assistantBrowserConfiguration(server);
|
|
47
|
+
export async function effectiveAssistantBrowserConfiguration(server, tenant, store, boundSurface) {
|
|
48
|
+
const developer = assistantBrowserConfiguration(server, boundSurface);
|
|
35
49
|
const record = await store?.get(tenant);
|
|
36
50
|
return {
|
|
37
51
|
developer,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RuntimeArtifact } from '@noodle-borg/compiler';
|
|
2
|
+
import { type CallerIdentity, type ExecuteDeps, type InvocationContext, type InvocationLocationContext } from '@noodle-borg/runtime';
|
|
2
3
|
export interface AssistantContextPreferences {
|
|
3
4
|
readonly locale?: string | undefined;
|
|
4
5
|
readonly timeZone?: string | undefined;
|
|
@@ -23,5 +24,16 @@ export declare function invocationContextSystemMessage(context: InvocationContex
|
|
|
23
24
|
export declare function parseAssistantContextPreferences(value: unknown): AssistantContextPreferencesResult;
|
|
24
25
|
export declare function isAssistantVerifiedClaims(value: unknown): value is Readonly<Record<string, string | number | boolean | null>>;
|
|
25
26
|
export declare function isAssistantPageContext(value: unknown): value is Readonly<Record<string, string | number | boolean | null>>;
|
|
27
|
+
interface ResolveAssistantInvocationContextInput {
|
|
28
|
+
readonly artifact: RuntimeArtifact;
|
|
29
|
+
readonly executeDeps: ExecuteDeps;
|
|
30
|
+
readonly caller?: CallerIdentity;
|
|
31
|
+
readonly instant: Date;
|
|
32
|
+
readonly applicationPreference?: AssistantContextPreferences;
|
|
33
|
+
readonly clientHint?: AssistantContextPreferences;
|
|
34
|
+
readonly clientLocationHint?: Omit<InvocationLocationContext, 'source'>;
|
|
35
|
+
}
|
|
36
|
+
/** Resolve one immutable snapshot, including a schema-validated read-only ambient provider. */
|
|
37
|
+
export declare function resolveInvocationContextSnapshot(input: ResolveAssistantInvocationContextInput): Promise<InvocationContext>;
|
|
26
38
|
export {};
|
|
27
39
|
//# sourceMappingURL=assistant-context.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { executeAmbientContext, } from '@noodle-borg/runtime';
|
|
2
|
+
import { toolTouchesDelegatedAuth } from './assistant-delegated-projection.js';
|
|
1
3
|
const PLATFORM_DEFAULTS = { locale: 'en-US', timeZone: 'UTC' };
|
|
2
4
|
/** Resolve presentation preferences independently from server-authoritative time. */
|
|
3
5
|
export function resolveInvocationContext(input) {
|
|
@@ -144,4 +146,55 @@ function offsetFromPart(value) {
|
|
|
144
146
|
throw new RangeError(`unsupported timezone offset ${value ?? 'unknown'}`);
|
|
145
147
|
return match[1];
|
|
146
148
|
}
|
|
149
|
+
/** Resolve one immutable snapshot, including a schema-validated read-only ambient provider. */
|
|
150
|
+
export async function resolveInvocationContextSnapshot(input) {
|
|
151
|
+
const callerPreference = {
|
|
152
|
+
...(input.caller?.locale ? { locale: input.caller.locale } : {}),
|
|
153
|
+
...(input.caller?.timeZone ? { timeZone: input.caller.timeZone } : {}),
|
|
154
|
+
...(input.applicationPreference ?? {}),
|
|
155
|
+
};
|
|
156
|
+
const clientHint = {
|
|
157
|
+
...(input.clientLocationHint?.timeZone === undefined
|
|
158
|
+
? {}
|
|
159
|
+
: { timeZone: input.clientLocationHint.timeZone }),
|
|
160
|
+
...(input.clientHint ?? {}),
|
|
161
|
+
};
|
|
162
|
+
const temporal = resolveInvocationContext({
|
|
163
|
+
instant: input.instant,
|
|
164
|
+
...(Object.keys(callerPreference).length > 0
|
|
165
|
+
? { applicationPreference: callerPreference }
|
|
166
|
+
: {}),
|
|
167
|
+
...(Object.keys(clientHint).length === 0 ? {} : { clientHint }),
|
|
168
|
+
...(input.artifact.server.context?.defaults
|
|
169
|
+
? { defaults: input.artifact.server.context.defaults }
|
|
170
|
+
: {}),
|
|
171
|
+
});
|
|
172
|
+
const context = {
|
|
173
|
+
...temporal,
|
|
174
|
+
...(input.clientLocationHint === undefined
|
|
175
|
+
? {}
|
|
176
|
+
: { location: { ...input.clientLocationHint, source: 'client-hint' } }),
|
|
177
|
+
};
|
|
178
|
+
const ambient = input.artifact.server.context?.ambient;
|
|
179
|
+
if (!ambient)
|
|
180
|
+
return context;
|
|
181
|
+
// An anonymous principal can never satisfy a delegated-auth fulfilment: the broker exchange
|
|
182
|
+
// is guaranteed to fail, so skip the doomed round trip instead of paying it every turn.
|
|
183
|
+
if (input.caller?.identityKind === 'anonymous') {
|
|
184
|
+
const delegatedKeys = input.executeDeps.broker.assistantDelegatedAuthKeys?.();
|
|
185
|
+
if (delegatedKeys !== undefined &&
|
|
186
|
+
delegatedKeys.size > 0 &&
|
|
187
|
+
toolTouchesDelegatedAuth(ambient, delegatedKeys)) {
|
|
188
|
+
return { ...context, ambientStatus: 'unavailable' };
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const result = await executeAmbientContext(input.artifact, {
|
|
192
|
+
...input.executeDeps,
|
|
193
|
+
...(input.caller ? { caller: input.caller } : {}),
|
|
194
|
+
context,
|
|
195
|
+
});
|
|
196
|
+
if (!result.ok)
|
|
197
|
+
return { ...context, ambientStatus: 'unavailable' };
|
|
198
|
+
return { ...context, ambientStatus: 'available', ambient: result.output };
|
|
199
|
+
}
|
|
147
200
|
//# sourceMappingURL=assistant-context.js.map
|
|
@@ -15,10 +15,18 @@ export interface AssistantEmbedOperatorView {
|
|
|
15
15
|
readonly capabilities: readonly string[];
|
|
16
16
|
readonly turnsPerDay: number;
|
|
17
17
|
readonly mintsPerDay: number;
|
|
18
|
+
/**
|
|
19
|
+
* What a browser agent may spend on this surface through the WebMCP bridge. Reported beside the
|
|
20
|
+
* turn caps because "is my budget about to run out" is the same question, and a bridge call spends
|
|
21
|
+
* neither a turn nor a mint — an operator reading only those two would see a quiet day.
|
|
22
|
+
*/
|
|
23
|
+
readonly bridgeCallsPerSession: number;
|
|
24
|
+
readonly bridgeCallsPerDay: number;
|
|
18
25
|
/** True when the caps are the deployment defaults rather than something an operator chose. */
|
|
19
26
|
readonly budgetIsDefault: boolean;
|
|
20
27
|
readonly turnsToday: number;
|
|
21
28
|
readonly mintsToday: number;
|
|
29
|
+
readonly bridgeCallsToday: number;
|
|
22
30
|
readonly createdAt: string;
|
|
23
31
|
/**
|
|
24
32
|
* Present only when Noodle is funding this surface's model. It exists so an operator can tell
|
|
@@ -42,9 +42,17 @@ export async function assistantEmbedOperatorView(input) {
|
|
|
42
42
|
capabilities: surface?.capabilities.map((entry) => entry.name) ?? [],
|
|
43
43
|
turnsPerDay: envelope.turnsPerDay,
|
|
44
44
|
mintsPerDay: envelope.mintsPerDay,
|
|
45
|
-
|
|
45
|
+
bridgeCallsPerSession: envelope.bridgeToolCallsPerSession,
|
|
46
|
+
bridgeCallsPerDay: envelope.bridgeToolCallsPerDay,
|
|
47
|
+
budgetIsDefault: record.turnsPerDay === undefined &&
|
|
48
|
+
record.mintsPerDay === undefined &&
|
|
49
|
+
record.bridgeToolCallsPerSession === undefined &&
|
|
50
|
+
record.bridgeToolCallsPerDay === undefined,
|
|
46
51
|
turnsToday: await input.peek(`turns:${record.embedId}`),
|
|
47
52
|
mintsToday: await input.peek(`mints:${record.embedId}`),
|
|
53
|
+
// Keyed as `admitBridgeToolCall` writes it, so the number an operator reads is the one the
|
|
54
|
+
// gate consumed rather than a parallel count that can drift from it.
|
|
55
|
+
bridgeCallsToday: await input.peek(`bridge:${record.embedId}`),
|
|
48
56
|
createdAt: record.createdAt.toISOString(),
|
|
49
57
|
...(spend === undefined
|
|
50
58
|
? {}
|
|
@@ -38,6 +38,14 @@ export interface PublicEmbedRecord {
|
|
|
38
38
|
*/
|
|
39
39
|
readonly mintsPerAddressHour?: number;
|
|
40
40
|
readonly turnsPerAddressHour?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Operator overrides for this surface's WebMCP bridge budgets. The shipped defaults are
|
|
43
|
+
* proportionate rather than measured (ADR 0220), so an operator who can see their own agent
|
|
44
|
+
* traffic needs to move them without waiting for a release. `0` is the kill switch here too,
|
|
45
|
+
* though zeroing `turnsPerDay` already stops bridge calls with it.
|
|
46
|
+
*/
|
|
47
|
+
readonly bridgeToolCallsPerSession?: number;
|
|
48
|
+
readonly bridgeToolCallsPerDay?: number;
|
|
41
49
|
}
|
|
42
50
|
/** Project the non-secret embed coordinate onto the shared assistant tenant shape. */
|
|
43
51
|
export declare function publicEmbedTenant(embed: PublicEmbedRecord): TenantRef;
|
|
@@ -47,6 +55,8 @@ export interface PublicEmbedBudget {
|
|
|
47
55
|
readonly mintsPerDay?: number;
|
|
48
56
|
readonly mintsPerAddressHour?: number;
|
|
49
57
|
readonly turnsPerAddressHour?: number;
|
|
58
|
+
readonly bridgeToolCallsPerSession?: number;
|
|
59
|
+
readonly bridgeToolCallsPerDay?: number;
|
|
50
60
|
}
|
|
51
61
|
export interface PublicEmbedStore {
|
|
52
62
|
/**
|
|
@@ -89,7 +99,7 @@ import type { TenantRef } from './tenant-ref.js';
|
|
|
89
99
|
* cap may be, not about HTTP, and a second caller must not be able to reach the store with a shape
|
|
90
100
|
* this would have rejected.
|
|
91
101
|
*/
|
|
92
|
-
export type BudgetField = 'turnsPerDay' | 'mintsPerDay' | 'mintsPerAddressHour' | 'turnsPerAddressHour';
|
|
102
|
+
export type BudgetField = 'turnsPerDay' | 'mintsPerDay' | 'mintsPerAddressHour' | 'turnsPerAddressHour' | 'bridgeToolCallsPerSession' | 'bridgeToolCallsPerDay';
|
|
93
103
|
type BudgetValue = Partial<Record<BudgetField, number>>;
|
|
94
104
|
type ParsedBudget = {
|
|
95
105
|
readonly ok: true;
|
|
@@ -28,6 +28,8 @@ const BUDGET_FIELDS = [
|
|
|
28
28
|
'mintsPerDay',
|
|
29
29
|
'mintsPerAddressHour',
|
|
30
30
|
'turnsPerAddressHour',
|
|
31
|
+
'bridgeToolCallsPerSession',
|
|
32
|
+
'bridgeToolCallsPerDay',
|
|
31
33
|
];
|
|
32
34
|
export function parsePublicEmbedBudget(body) {
|
|
33
35
|
// A JSON body of `null` is an object to `typeof` and reads as a crash to a property access, so it
|
|
@@ -45,6 +45,12 @@ export class InMemoryPublicEmbedStore {
|
|
|
45
45
|
...(budget.turnsPerAddressHour !== undefined
|
|
46
46
|
? { turnsPerAddressHour: budget.turnsPerAddressHour }
|
|
47
47
|
: {}),
|
|
48
|
+
...(budget.bridgeToolCallsPerSession !== undefined
|
|
49
|
+
? { bridgeToolCallsPerSession: budget.bridgeToolCallsPerSession }
|
|
50
|
+
: {}),
|
|
51
|
+
...(budget.bridgeToolCallsPerDay !== undefined
|
|
52
|
+
? { bridgeToolCallsPerDay: budget.bridgeToolCallsPerDay }
|
|
53
|
+
: {}),
|
|
48
54
|
};
|
|
49
55
|
this.#byId.set(embedId, updated);
|
|
50
56
|
return updated;
|
|
@@ -31,5 +31,5 @@ export interface SurfaceBudgetBounds {
|
|
|
31
31
|
* operator any more than by app code, so an over-eager `--turns-per-day 999999999` degrades to the
|
|
32
32
|
* ceiling instead of becoming the ceiling. Zero survives clamping and is the kill switch.
|
|
33
33
|
*/
|
|
34
|
-
export declare function surfaceEnvelope(base: AdmissionEnvelope, embed: Pick<PublicEmbedRecord, 'turnsPerDay' | 'mintsPerDay' | 'mintsPerAddressHour' | 'turnsPerAddressHour'>, bounds?: SurfaceBudgetBounds): AdmissionEnvelope;
|
|
34
|
+
export declare function surfaceEnvelope(base: AdmissionEnvelope, embed: Pick<PublicEmbedRecord, 'turnsPerDay' | 'mintsPerDay' | 'mintsPerAddressHour' | 'turnsPerAddressHour' | 'bridgeToolCallsPerSession' | 'bridgeToolCallsPerDay'>, bounds?: SurfaceBudgetBounds): AdmissionEnvelope;
|
|
35
35
|
//# sourceMappingURL=surface-budget.d.ts.map
|
|
@@ -31,6 +31,16 @@ export function surfaceEnvelope(base, embed, bounds) {
|
|
|
31
31
|
turnsPerAddressHour: Math.min(embed.turnsPerAddressHour, effectiveBase.turnsPerAddressHour),
|
|
32
32
|
}
|
|
33
33
|
: {}),
|
|
34
|
+
// The bridge bounds are the operator's to spend in either direction, like the daily caps and
|
|
35
|
+
// unlike the per-address ones: they govern this surface's own agent traffic against its own
|
|
36
|
+
// connectors, not a bound shared with everyone behind one address. `clamp` still holds them
|
|
37
|
+
// under the structural maximum.
|
|
38
|
+
...(embed.bridgeToolCallsPerSession !== undefined
|
|
39
|
+
? { bridgeToolCallsPerSession: embed.bridgeToolCallsPerSession }
|
|
40
|
+
: {}),
|
|
41
|
+
...(embed.bridgeToolCallsPerDay !== undefined
|
|
42
|
+
? { bridgeToolCallsPerDay: embed.bridgeToolCallsPerDay }
|
|
43
|
+
: {}),
|
|
34
44
|
});
|
|
35
45
|
if (bounds === undefined)
|
|
36
46
|
return requested;
|