pi-daddy 0.56.3 → 0.58.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/CHANGELOG.md +13 -0
- package/README.md +15 -1
- package/dist/governance/approval-prompt.d.ts +3 -1
- package/dist/governance/approval-prompt.d.ts.map +1 -1
- package/dist/governance/approval-prompt.js +7 -3
- package/dist/governance/approval-prompt.js.map +1 -1
- package/dist/governance/permission-question.d.ts.map +1 -1
- package/dist/governance/permission-question.js +15 -5
- package/dist/governance/permission-question.js.map +1 -1
- package/dist/kernel/child-tools.d.ts +17 -0
- package/dist/kernel/child-tools.d.ts.map +1 -0
- package/dist/kernel/child-tools.js +46 -0
- package/dist/kernel/child-tools.js.map +1 -0
- package/dist/kernel/dashboard-observation.d.ts +40 -0
- package/dist/kernel/dashboard-observation.d.ts.map +1 -1
- package/dist/kernel/dashboard-observation.js +42 -3
- package/dist/kernel/dashboard-observation.js.map +1 -1
- package/dist/kernel/definitions.d.ts +2 -0
- package/dist/kernel/definitions.d.ts.map +1 -1
- package/dist/kernel/definitions.js.map +1 -1
- package/dist/kernel/delegate-types.d.ts +2 -0
- package/dist/kernel/delegate-types.d.ts.map +1 -1
- package/dist/kernel/delegate-types.js.map +1 -1
- package/dist/kernel/delegate.d.ts.map +1 -1
- package/dist/kernel/delegate.js +12 -1
- package/dist/kernel/delegate.js.map +1 -1
- package/dist/kernel/principal-binding.d.ts.map +1 -1
- package/dist/kernel/principal-binding.js +11 -0
- package/dist/kernel/principal-binding.js.map +1 -1
- package/dist/kernel/selected-definitions.d.ts.map +1 -1
- package/dist/kernel/selected-definitions.js +10 -1
- package/dist/kernel/selected-definitions.js.map +1 -1
- package/dist/kernel/selected-resources.d.ts +21 -0
- package/dist/kernel/selected-resources.d.ts.map +1 -0
- package/dist/kernel/selected-resources.js +10 -0
- package/dist/kernel/selected-resources.js.map +1 -0
- package/dist/kernel/spawn.d.ts +2 -0
- package/dist/kernel/spawn.d.ts.map +1 -1
- package/dist/kernel/spawn.js +3 -1
- package/dist/kernel/spawn.js.map +1 -1
- package/dist/products/dashboard-cli.d.ts.map +1 -1
- package/dist/products/dashboard-cli.js +1 -1
- package/dist/products/dashboard-cli.js.map +1 -1
- package/dist/products/dashboard-components.d.ts.map +1 -1
- package/dist/products/dashboard-components.js +74 -9
- package/dist/products/dashboard-components.js.map +1 -1
- package/dist/products/dashboard-inventory-view.d.ts +9 -0
- package/dist/products/dashboard-inventory-view.d.ts.map +1 -0
- package/dist/products/dashboard-inventory-view.js +44 -0
- package/dist/products/dashboard-inventory-view.js.map +1 -0
- package/dist/products/dashboard-layout.js +4 -3
- package/dist/products/dashboard-layout.js.map +1 -1
- package/dist/products/dashboard-panels.d.ts.map +1 -1
- package/dist/products/dashboard-panels.js +7 -3
- package/dist/products/dashboard-panels.js.map +1 -1
- package/dist/products/dashboard-screen.d.ts +2 -0
- package/dist/products/dashboard-screen.d.ts.map +1 -1
- package/dist/products/dashboard-screen.js +10 -5
- package/dist/products/dashboard-screen.js.map +1 -1
- package/dist/products/dashboard-session-client.d.ts +4 -2
- package/dist/products/dashboard-session-client.d.ts.map +1 -1
- package/dist/products/dashboard-session-client.js +24 -7
- package/dist/products/dashboard-session-client.js.map +1 -1
- package/dist/products/dashboard-settings.d.ts +2 -1
- package/dist/products/dashboard-settings.d.ts.map +1 -1
- package/dist/products/dashboard-settings.js +10 -1
- package/dist/products/dashboard-settings.js.map +1 -1
- package/extensions/approvals.ts +52 -38
- package/extensions/chain-approval-facts.ts +20 -0
- package/extensions/dashboard-session-server.ts +4 -0
- package/extensions/dashboard-source-refresh.ts +95 -0
- package/extensions/dashboard-sources.ts +42 -4
- package/extensions/definition-describe.ts +1 -0
- package/extensions/delegate-chain.ts +35 -21
- package/extensions/grants.ts +2 -0
- package/extensions/runtime-snapshot.ts +1 -0
- package/extensions/session.ts +4 -0
- package/package.json +2 -2
- package/src/governance/approval-prompt.ts +10 -4
- package/src/governance/permission-question.ts +16 -5
- package/src/kernel/child-tools.ts +62 -0
- package/src/kernel/dashboard-observation.ts +86 -4
- package/src/kernel/definitions.ts +2 -0
- package/src/kernel/delegate-types.ts +2 -0
- package/src/kernel/delegate.ts +12 -1
- package/src/kernel/principal-binding.ts +11 -0
- package/src/kernel/selected-definitions.ts +11 -1
- package/src/kernel/selected-resources.ts +20 -0
- package/src/kernel/spawn.ts +4 -1
- package/src/products/dashboard-cli.ts +1 -0
- package/src/products/dashboard-components.ts +78 -10
- package/src/products/dashboard-inventory-view.ts +44 -0
- package/src/products/dashboard-layout.ts +6 -4
- package/src/products/dashboard-panels.ts +9 -3
- package/src/products/dashboard-screen.ts +12 -4
- package/src/products/dashboard-session-client.ts +31 -11
- package/src/products/dashboard-settings.ts +11 -0
|
@@ -44,7 +44,12 @@ import { runOneDelegation } from "./run-delegation.ts";
|
|
|
44
44
|
import { isCriticalAssuranceBlock } from "./execute-child.ts";
|
|
45
45
|
import type { GrantsSession } from "./session.ts";
|
|
46
46
|
import { GovernanceRefusal, refusal, type StructuredRefusal } from "../src/kernel/refusals.ts";
|
|
47
|
-
import {
|
|
47
|
+
import {
|
|
48
|
+
chainApprovalFacts,
|
|
49
|
+
newChainApprovalAudit,
|
|
50
|
+
rememberChainApproval,
|
|
51
|
+
retainedChainApproval,
|
|
52
|
+
} from "./chain-approval-facts.ts";
|
|
48
53
|
import { newExecutionId } from "../src/kernel/execution-id.ts";
|
|
49
54
|
import { planChain, type GateRequest } from "./chain-plan.ts";
|
|
50
55
|
import { contextShape } from "./context-shape.ts";
|
|
@@ -234,7 +239,7 @@ export function registerChainTool(pi: ExtensionAPI, session: GrantsSession): voi
|
|
|
234
239
|
throw new Error(message);
|
|
235
240
|
}
|
|
236
241
|
|
|
237
|
-
// One dialog per
|
|
242
|
+
// One dialog per exact permission set for an agent/step, all before the first step runs.
|
|
238
243
|
const preApproved: InheritableApproval[] = [];
|
|
239
244
|
const approvalAudit = newChainApprovalAudit();
|
|
240
245
|
const approvalStep = new Map<string, number>();
|
|
@@ -242,36 +247,45 @@ export function registerChainTool(pi: ExtensionAPI, session: GrantsSession): voi
|
|
|
242
247
|
[];
|
|
243
248
|
let declined: { request: GateRequest; outcome: Awaited<ReturnType<typeof obtainApprovals>> } | undefined;
|
|
244
249
|
|
|
250
|
+
const requestGroups = new Map<string, GateRequest[]>();
|
|
245
251
|
for (const request of chainPlan.requests) {
|
|
252
|
+
const key = JSON.stringify([request.subject, request.path, request.stepIndex]);
|
|
253
|
+
const group = requestGroups.get(key) ?? [];
|
|
254
|
+
group.push(request);
|
|
255
|
+
requestGroups.set(key, group);
|
|
256
|
+
}
|
|
257
|
+
for (const requests of requestGroups.values()) {
|
|
258
|
+
const request = requests[0]!;
|
|
246
259
|
const outcome = await obtainApprovals(
|
|
247
260
|
session,
|
|
248
|
-
|
|
261
|
+
requests.map((entry) => entry.capability),
|
|
249
262
|
request.subject,
|
|
250
263
|
request.path,
|
|
251
264
|
ctx,
|
|
252
265
|
request.task,
|
|
253
266
|
signal,
|
|
254
267
|
);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
|
|
259
|
-
declined = { request, outcome };
|
|
268
|
+
const missing = requests.find((entry) => !outcome.approved.includes(entry.capability));
|
|
269
|
+
if (missing) {
|
|
270
|
+
// Once the chain cannot run, ask nobody else and bank no further authority.
|
|
271
|
+
declined = { request: missing, outcome };
|
|
260
272
|
break;
|
|
261
273
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
for (const entry of requests) {
|
|
275
|
+
// Auto belongs to actual step admission, never to the upfront permission set.
|
|
276
|
+
if (outcome.sources[entry.capability] === "auto") continue;
|
|
277
|
+
preApproved.push({
|
|
278
|
+
capability: entry.capability,
|
|
279
|
+
subject: entry.subject,
|
|
280
|
+
scope: outcome.scopes[entry.capability] ?? ("once" as const),
|
|
281
|
+
bodySha256: snapshotOf(session, entry.subject)?.bodySha256,
|
|
282
|
+
});
|
|
283
|
+
rememberChainApproval(approvalAudit, entry.capability, entry.subject, outcome);
|
|
284
|
+
approvalStep.set(`${entry.capability}@${entry.subject}`, entry.stepIndex);
|
|
285
|
+
}
|
|
286
|
+
// Retain the group once, excluding provisional Auto facts that no step has admitted or consumed.
|
|
287
|
+
const retained = retainedChainApproval(outcome);
|
|
288
|
+
if (retained) approvedDecisions.push({ request, outcome: retained });
|
|
275
289
|
}
|
|
276
290
|
|
|
277
291
|
if (declined) {
|
package/extensions/grants.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { ENV_WORKSPACE_REGISTRY } from "../src/kernel/workspace.ts";
|
|
|
42
42
|
import { appendRecord, buildRecord } from "../src/governance/ledger.ts";
|
|
43
43
|
import { openPaneCount, reapOpenPanesAsync } from "../src/executors/pane-reaper.ts";
|
|
44
44
|
import { ENV_GRANT, deriveOwnGrant, observeToolNames } from "../src/kernel/propagation.ts";
|
|
45
|
+
import { snapshotChildTools } from "../src/kernel/child-tools.ts";
|
|
45
46
|
import { snapshotOf } from "./approvals.ts";
|
|
46
47
|
import { registerDelegationTools } from "./delegation.ts";
|
|
47
48
|
import { grantsCommand } from "./grants-command.ts";
|
|
@@ -89,6 +90,7 @@ export default function (pi: ExtensionAPI, trustedSession?: GrantsSession) {
|
|
|
89
90
|
})();
|
|
90
91
|
const observerExtensionPath = fileURLToPath(new URL("./activity-timeline.ts", import.meta.url));
|
|
91
92
|
const session = trustedSession ?? createGrantsSession(extensionPath, undefined, observerExtensionPath);
|
|
93
|
+
session.childToolSources = () => snapshotChildTools(pi.getAllTools());
|
|
92
94
|
bindEcosystemVersions(pi, session, fileURLToPath(new URL("../", import.meta.url)));
|
|
93
95
|
session.currentThinking = typeof pi.getThinkingLevel === "function" ? () => pi.getThinkingLevel() : undefined;
|
|
94
96
|
registerActivityTimeline(pi, session);
|
|
@@ -36,6 +36,7 @@ export function registerRuntimeSnapshot(
|
|
|
36
36
|
: undefined,
|
|
37
37
|
);
|
|
38
38
|
session.dashboardObservations = () => dashboardSources.snapshot();
|
|
39
|
+
session.dashboardRefreshSources = () => dashboardSources.requestRefresh();
|
|
39
40
|
session.dashboardChoices = dashboardSources.choices;
|
|
40
41
|
session.dashboardLive = registerDashboardLive(pi, () =>
|
|
41
42
|
bound?.lifecycle === session.reloadLifecycle && session.reloadLifecycle.runtimeSnapshotGeneration === generation
|
package/extensions/session.ts
CHANGED
|
@@ -156,6 +156,7 @@ export interface GrantsSession extends NativeSessionHost {
|
|
|
156
156
|
dashboardArtifacts?: DashboardSavedEvidence[];
|
|
157
157
|
dashboardChoices?: ReturnType<typeof import("./dashboard-choice-controls.ts").registerDashboardChoiceOwner>;
|
|
158
158
|
dashboardObservations?: () => Omit<DashboardOwnerObservation, "version" | "resources" | "capture"> | undefined;
|
|
159
|
+
dashboardRefreshSources?: () => boolean;
|
|
159
160
|
autoMode?: AutoModeReader;
|
|
160
161
|
autoModeFailure?: string;
|
|
161
162
|
/** Reconciled from the actual owner root on reload; captured call owners stay immutable. */
|
|
@@ -244,6 +245,8 @@ export interface GrantsSession extends NativeSessionHost {
|
|
|
244
245
|
ownGrant: Capability[];
|
|
245
246
|
observed: boolean;
|
|
246
247
|
observedTools: string[] | null;
|
|
248
|
+
/** Re-read public origins at admission; a parent's callable name does not prove child delivery. */
|
|
249
|
+
childToolSources?: () => readonly import("../src/kernel/child-tools.ts").ChildToolSource[];
|
|
247
250
|
/** ADR-0016: `SKILL.md` definitions, keyed by name. The format this package spawns from now. */
|
|
248
251
|
ensureDefinitions?: () => Promise<void>;
|
|
249
252
|
definitions: Map<string, SkillDefinition>;
|
|
@@ -687,6 +690,7 @@ export function createGrantsSession(
|
|
|
687
690
|
ledgerPath: session.ledgerPath,
|
|
688
691
|
extensionPath: session.extensionPath,
|
|
689
692
|
observerExtensionPath: session.observerExtensionPath,
|
|
693
|
+
childToolSources: session.childToolSources?.(),
|
|
690
694
|
childEnv: activityChildEnv(session.activity),
|
|
691
695
|
// ADR-0042: the pin this session holds, handed to the kernel so a delegated child inherits a narrowed
|
|
692
696
|
// one through the same builder `publishChildEnv` uses. Read here rather than in the kernel so there is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-daddy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "Capability governance for pi sub-agents: spawn Agent Skills (SKILL.md) definitions whose allowed-tools becomes a grant that can only narrow going down a delegation tree, enforced by pi's own --tools allowlist, with an append-only ledger.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typecheck": "tsc -p tsconfig.check.json",
|
|
54
54
|
"test": "node scripts/unit-tests.ts",
|
|
55
55
|
"test:integration": "node --test test-integration/*.it.ts",
|
|
56
|
-
"test:integration:ci": "node --test test-integration/approval.it.ts test-integration/governance.it.ts test-integration/activity.it.ts test-integration/auto-chain.it.ts test-integration/pi-sdk/automatic-start.it.ts test-integration/pi-sdk/dashboard-prompts.it.ts test-integration/pi-sdk/owned-pattern-cleanup.it.ts",
|
|
56
|
+
"test:integration:ci": "node --test test-integration/approval.it.ts test-integration/governance.it.ts test-integration/activity.it.ts test-integration/auto-chain.it.ts test-integration/pi-sdk/automatic-start.it.ts test-integration/pi-sdk/dashboard-prompts.it.ts test-integration/pi-sdk/owned-pattern-cleanup.it.ts test-integration/pi-sdk/child-tool-delivery.it.ts",
|
|
57
57
|
"contracts:generate": "node scripts/generate-ledger-record-contract.ts",
|
|
58
58
|
"prepack": "npm run build",
|
|
59
59
|
"test:smoke": "node scripts/smoke-installed.mjs",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
14
|
import type { AutoModeReader } from "../kernel/auto-mode.ts";
|
|
15
|
-
import {
|
|
15
|
+
import { offeredScopes, type ApprovalPath, type ApprovalScope } from "../kernel/approval.ts";
|
|
16
16
|
import type { Capability } from "../kernel/resolve.ts";
|
|
17
17
|
import { selectPermission } from "./permission-question.ts";
|
|
18
18
|
|
|
@@ -36,6 +36,8 @@ export const SCOPE_LABELS: Record<ApprovalScope, string> = {
|
|
|
36
36
|
|
|
37
37
|
export interface PromptRequest {
|
|
38
38
|
capability: Capability;
|
|
39
|
+
/** Exact set covered by this one decision. Omitted for legacy single-capability callers. */
|
|
40
|
+
capabilities?: Capability[];
|
|
39
41
|
/** Agent type name, or `DELEGATE_SUBJECT` on the delegate path. */
|
|
40
42
|
subject: string;
|
|
41
43
|
path: ApprovalPath;
|
|
@@ -159,7 +161,7 @@ async function selectApproval(
|
|
|
159
161
|
untrack = options.autoMode?.trackPending({
|
|
160
162
|
id: randomUUID(),
|
|
161
163
|
subject: request.subject,
|
|
162
|
-
capability: request.capability,
|
|
164
|
+
capability: (request.capabilities ?? [request.capability]).join(", "),
|
|
163
165
|
});
|
|
164
166
|
const selection = selectPermission(options.ui, request, labels, controller.signal).then((chosen) => {
|
|
165
167
|
settled = true;
|
|
@@ -211,7 +213,7 @@ async function joinApproval(pending: Promise<PromptOutcome>, request: PromptRequ
|
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
/**
|
|
214
|
-
* The single-flight queue: one dialog per
|
|
216
|
+
* The single-flight queue: one dialog per exact capability set, subject and binding at a time.
|
|
215
217
|
*
|
|
216
218
|
* `delegate` sets no `executionMode`, so an orchestrator can fan out several children at once and two can
|
|
217
219
|
* hit the same gate simultaneously — otherwise two stacked dialogs asking the identical question.
|
|
@@ -302,6 +304,10 @@ export function createApprovalGate(
|
|
|
302
304
|
|
|
303
305
|
return {
|
|
304
306
|
async request(request: PromptRequest): Promise<PromptOutcome> {
|
|
307
|
+
const capabilities = [...new Set(request.capabilities ?? [request.capability])].sort();
|
|
308
|
+
if (!capabilities.length || !capabilities.includes(request.capability))
|
|
309
|
+
return { scope: null, kind: "error", reason: "Invalid permission set; no permission was granted." };
|
|
310
|
+
request = { ...request, capabilities };
|
|
305
311
|
if (request.signal?.aborted) return interrupted(request, "aborted");
|
|
306
312
|
try {
|
|
307
313
|
if (options.autoMode && (await options.autoMode.read()).enabled) {
|
|
@@ -322,7 +328,7 @@ export function createApprovalGate(
|
|
|
322
328
|
};
|
|
323
329
|
}
|
|
324
330
|
|
|
325
|
-
const key =
|
|
331
|
+
const key = JSON.stringify([request.path, request.subject, capabilities, request.bindingKey ?? null]);
|
|
326
332
|
|
|
327
333
|
// R-29. Join an in-flight dialog, but only *keep* its answer if that answer was about more than one
|
|
328
334
|
// spawn. A `once` belongs to whichever caller the human was actually looking at — the title shows
|
|
@@ -24,16 +24,22 @@ function oneLine(value: string, limit: number): string {
|
|
|
24
24
|
.trimEnd() + "…";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function
|
|
27
|
+
function permissionAction(capability: string): string {
|
|
28
28
|
const actions: Record<string, string> = {
|
|
29
29
|
"tool:bash": "run shell commands",
|
|
30
30
|
"tool:write": "write files",
|
|
31
31
|
"tool:edit": "edit files",
|
|
32
32
|
"tool:delegate": "delegate work to another agent",
|
|
33
33
|
};
|
|
34
|
+
return actions[capability] ?? `use ${oneLine(clean(capability), 90)}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function headline(request: PromptRequest): string {
|
|
38
|
+
const capabilities = request.capabilities ?? [request.capability];
|
|
34
39
|
const subject = request.path === "delegate" ? "this delegated agent" : oneLine(clean(request.subject), 80);
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
return capabilities.length === 1
|
|
41
|
+
? `Allow ${subject} to ${permissionAction(capabilities[0]!)}?`
|
|
42
|
+
: `Allow ${subject} these ${capabilities.length} permissions?`;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
function scopeHint(request: PromptRequest): string {
|
|
@@ -46,7 +52,7 @@ function scopeHint(request: PromptRequest): string {
|
|
|
46
52
|
/** Render the full, untrusted brief in pages so choices stay reachable on a typical terminal. */
|
|
47
53
|
function detailLines(request: PromptRequest): string[] {
|
|
48
54
|
const rows = [
|
|
49
|
-
`Permission: ${clean(
|
|
55
|
+
...(request.capabilities ?? [request.capability]).map((capability) => `Permission: ${clean(capability)}`),
|
|
50
56
|
`Agent: ${clean(request.subject)}`,
|
|
51
57
|
...(request.project ? [`Permission project: ${clean(request.project)}`] : []),
|
|
52
58
|
...(request.workspace ? [`Requested workspace: ${clean(request.workspace)}`] : []),
|
|
@@ -77,11 +83,16 @@ export async function selectPermission(
|
|
|
77
83
|
.find((line) => line.trim());
|
|
78
84
|
const title = [
|
|
79
85
|
headline(request),
|
|
86
|
+
...((request.capabilities?.length ?? 1) > 1
|
|
87
|
+
? request.capabilities!.map((capability) => ` • ${permissionAction(capability)}`)
|
|
88
|
+
: []),
|
|
80
89
|
...(task ? [`Requested task: ${oneLine(task, 115)}`] : []),
|
|
81
90
|
...(request.project
|
|
82
91
|
? [`Permission project: ${oneLine(clean(basename(request.project) || request.project), 60)}`]
|
|
83
92
|
: []),
|
|
84
|
-
...(request.
|
|
93
|
+
...((request.capabilities ?? [request.capability]).includes("tool:bash")
|
|
94
|
+
? ["Shell access can change files and run other commands."]
|
|
95
|
+
: []),
|
|
85
96
|
...(request.recheckReason ? [request.recheckReason] : []),
|
|
86
97
|
scopeHint(request),
|
|
87
98
|
].join("\n");
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Child delivery is separate from a parent's catalog and from permission to grant a tool. */
|
|
2
|
+
import { toPiToolsAllowlist, type Capability } from "./resolve.ts";
|
|
3
|
+
import { refusal, type StructuredRefusal } from "./refusals.ts";
|
|
4
|
+
|
|
5
|
+
/** Native CLI tools shared by the qualified Pi 1.0.4 and 1.5.2 runtimes, not the display catalog. */
|
|
6
|
+
const nativeTools = new Set(["read", "bash", "powershell", "edit", "write", "grep", "find", "ls"]);
|
|
7
|
+
const governedTools = new Set(["delegate", "delegate_all", "delegate_chain", "delegate_describe"]);
|
|
8
|
+
export interface ChildToolSource {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly sourceInfo?: Readonly<{ path?: string; source?: string }>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Copy only public origin metadata. Provider schemas, credentials and runtime objects do not cross. */
|
|
14
|
+
export function snapshotChildTools(tools: readonly ChildToolSource[]): readonly ChildToolSource[] {
|
|
15
|
+
return Object.freeze(
|
|
16
|
+
tools.map((tool) =>
|
|
17
|
+
Object.freeze({
|
|
18
|
+
name: tool.name,
|
|
19
|
+
...(tool.sourceInfo
|
|
20
|
+
? {
|
|
21
|
+
sourceInfo: Object.freeze({
|
|
22
|
+
path: tool.sourceInfo.path,
|
|
23
|
+
source: tool.sourceInfo.source,
|
|
24
|
+
}),
|
|
25
|
+
}
|
|
26
|
+
: {}),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function childToolDeliveryRefusal(
|
|
33
|
+
requested: Capability[],
|
|
34
|
+
context: { childToolSources?: readonly ChildToolSource[]; extensionPath?: string },
|
|
35
|
+
): StructuredRefusal | undefined {
|
|
36
|
+
const unavailable: string[] = [];
|
|
37
|
+
for (const name of toPiToolsAllowlist(requested) ?? []) {
|
|
38
|
+
// The existing narrowing guard owns wildcard refusal, not delivery classification.
|
|
39
|
+
if (name === "*") continue;
|
|
40
|
+
const entries = context.childToolSources?.filter((tool) => tool.name === name);
|
|
41
|
+
const source = entries?.length === 1 ? entries[0].sourceInfo : undefined;
|
|
42
|
+
// Pure legacy callers may omit observations; real extension dispatch always supplies the live inventory.
|
|
43
|
+
const unobserved = context.childToolSources === undefined;
|
|
44
|
+
const builtin =
|
|
45
|
+
nativeTools.has(name) && (unobserved || (source?.source === "builtin" && source.path === `builtin:${name}`));
|
|
46
|
+
const governed =
|
|
47
|
+
governedTools.has(name) &&
|
|
48
|
+
requested.includes("tool:delegate") &&
|
|
49
|
+
!!context.extensionPath &&
|
|
50
|
+
(unobserved || source?.path === context.extensionPath);
|
|
51
|
+
if (!builtin && !governed) unavailable.push(name);
|
|
52
|
+
}
|
|
53
|
+
if (!unavailable.length) return undefined;
|
|
54
|
+
return refusal(
|
|
55
|
+
"UNKNOWN_TOOL",
|
|
56
|
+
`child tool unavailable: ${unavailable.join(", ")} — the parent catalog is not child delivery. ` +
|
|
57
|
+
"Governed children load native Pi tools and Daddy's explicit entrypoint only; external extensions, MCP and " +
|
|
58
|
+
"SDK-only tools have no qualified child provider here. Keep this work in the parent or choose a definition " +
|
|
59
|
+
"using supported child tools. Additional permission cannot install or qualify a provider.",
|
|
60
|
+
{ kind: "child-tool-unavailable", tools: unavailable.join(",") },
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
export const DASHBOARD_SOURCE_EVENT = "pi-daddy:dashboard-source:v1";
|
|
3
3
|
export const DASHBOARD_SOURCE_LIMIT = 8;
|
|
4
4
|
export const DASHBOARD_SOURCE_BYTES = 4096;
|
|
5
|
+
export const DASHBOARD_INVENTORY_BYTES = 8192;
|
|
6
|
+
export const DASHBOARD_INVENTORY_ENTRIES = 12;
|
|
7
|
+
export const DASHBOARD_RESPONSE_BYTES = 64 * 1024 + DASHBOARD_SOURCE_LIMIT * DASHBOARD_INVENTORY_BYTES;
|
|
5
8
|
export type DashboardContributionKind = "goal" | "next" | "work" | "review" | "evidence" | "status";
|
|
6
9
|
export type DashboardObservedState =
|
|
7
10
|
| "observed"
|
|
@@ -26,20 +29,58 @@ export interface DashboardContribution {
|
|
|
26
29
|
export const isBookieChoice = (producer: string, item: DashboardContribution) =>
|
|
27
30
|
producer === "bookie-memory" && item.id.startsWith("open-choice-");
|
|
28
31
|
|
|
32
|
+
export interface DashboardInventoryEntry {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
summary: string;
|
|
36
|
+
details?: string[];
|
|
37
|
+
/** Exact display reference only; opening inventory never dereferences it or grants access. */
|
|
38
|
+
reference?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DashboardInventory {
|
|
41
|
+
scope: string;
|
|
42
|
+
state: "available" | "empty" | "unavailable" | "unknown";
|
|
43
|
+
summary: string;
|
|
44
|
+
/** Exact visible total only when known. Omit it for an incomplete or unauthorized scan. */
|
|
45
|
+
count?: number;
|
|
46
|
+
/** The displayed/enumerated entries are a bounded selection; count may still be exact. */
|
|
47
|
+
limited: boolean;
|
|
48
|
+
entries: DashboardInventoryEntry[];
|
|
49
|
+
}
|
|
29
50
|
export interface DashboardSourceUpdate {
|
|
30
51
|
sequence: number;
|
|
31
52
|
items: DashboardContribution[];
|
|
53
|
+
/** Send only after the registration reply advertises capabilities.inventory === 1. */
|
|
54
|
+
inventory?: DashboardInventory;
|
|
55
|
+
}
|
|
56
|
+
export interface DashboardSourceRefresh {
|
|
57
|
+
state: "idle" | "checking" | "failed";
|
|
58
|
+
attemptedAt?: string;
|
|
59
|
+
nextAttemptAt?: string;
|
|
32
60
|
}
|
|
61
|
+
/** Return a fresh bounded observation; never publish from inside the refresh callback. */
|
|
62
|
+
export type DashboardSourceRefreshCallback = (request: {
|
|
63
|
+
signal: AbortSignal;
|
|
64
|
+
}) => DashboardSourceUpdate | undefined | Promise<DashboardSourceUpdate | undefined>;
|
|
33
65
|
/** Trusted in-process registration. Callbacks are never serialized to a model or terminal client. */
|
|
34
66
|
export type DashboardSourceRegistrationReply =
|
|
35
67
|
| { version: 1; ok: false; reason: string }
|
|
36
|
-
| {
|
|
68
|
+
| {
|
|
69
|
+
version: 1;
|
|
70
|
+
ok: true;
|
|
71
|
+
generation: string;
|
|
72
|
+
capabilities?: { inventory: 1; refresh: 1 };
|
|
73
|
+
publish(update: DashboardSourceUpdate): boolean;
|
|
74
|
+
close(): void;
|
|
75
|
+
};
|
|
37
76
|
export interface DashboardSourceRegistration {
|
|
38
77
|
version: 1;
|
|
39
78
|
sessionId: string;
|
|
40
79
|
cwd: string;
|
|
41
80
|
producer: string;
|
|
42
81
|
producerVersion: string;
|
|
82
|
+
/** Authorized metadata reads only, with cancellation; no automatic work or model calls. */
|
|
83
|
+
refresh?: DashboardSourceRefreshCallback;
|
|
43
84
|
reply(value: DashboardSourceRegistrationReply): void;
|
|
44
85
|
}
|
|
45
86
|
export interface DashboardSourceSnapshot extends DashboardSourceUpdate {
|
|
@@ -49,6 +90,7 @@ export interface DashboardSourceSnapshot extends DashboardSourceUpdate {
|
|
|
49
90
|
observedAt: string;
|
|
50
91
|
staleAfterMs: number;
|
|
51
92
|
availability: "observed" | "closed";
|
|
93
|
+
refresh?: DashboardSourceRefresh;
|
|
52
94
|
}
|
|
53
95
|
/** Session-local display metadata from the same elected child that published the reference. */
|
|
54
96
|
export interface DashboardResultDescription {
|
|
@@ -87,14 +129,53 @@ export interface DashboardOwnerObservation {
|
|
|
87
129
|
}
|
|
88
130
|
const object = (x: unknown): x is Record<string, unknown> => !!x && typeof x === "object" && !Array.isArray(x);
|
|
89
131
|
const bounded = (x: unknown, max: number): x is string => typeof x === "string" && x.length > 0 && x.length <= max;
|
|
132
|
+
export function validDashboardInventory(value: unknown): value is DashboardInventory {
|
|
133
|
+
if (
|
|
134
|
+
!object(value) ||
|
|
135
|
+
Object.keys(value).some((k) => !["scope", "state", "summary", "count", "limited", "entries"].includes(k)) ||
|
|
136
|
+
!bounded(value.scope, 160) ||
|
|
137
|
+
!bounded(value.summary, 480) ||
|
|
138
|
+
!["available", "empty", "unavailable", "unknown"].includes(String(value.state)) ||
|
|
139
|
+
typeof value.limited !== "boolean" ||
|
|
140
|
+
!Array.isArray(value.entries) ||
|
|
141
|
+
value.entries.length > DASHBOARD_INVENTORY_ENTRIES ||
|
|
142
|
+
(value.count !== undefined && (!Number.isSafeInteger(value.count) || Number(value.count) < value.entries.length)) ||
|
|
143
|
+
(value.state === "empty" && (value.entries.length > 0 || value.limited || value.count !== 0)) ||
|
|
144
|
+
(["unavailable", "unknown"].includes(String(value.state)) &&
|
|
145
|
+
(value.entries.length > 0 || value.count !== undefined))
|
|
146
|
+
)
|
|
147
|
+
return false;
|
|
148
|
+
const ids = new Set<string>();
|
|
149
|
+
for (const entry of value.entries) {
|
|
150
|
+
if (
|
|
151
|
+
!object(entry) ||
|
|
152
|
+
Object.keys(entry).some((k) => !["id", "title", "summary", "details", "reference"].includes(k)) ||
|
|
153
|
+
!bounded(entry.id, 160) ||
|
|
154
|
+
ids.has(entry.id) ||
|
|
155
|
+
!bounded(entry.title, 160) ||
|
|
156
|
+
!bounded(entry.summary, 480) ||
|
|
157
|
+
(entry.reference !== undefined && !bounded(entry.reference, 512)) ||
|
|
158
|
+
(entry.details !== undefined &&
|
|
159
|
+
(!Array.isArray(entry.details) || entry.details.length > 6 || !entry.details.every((x) => bounded(x, 480))))
|
|
160
|
+
)
|
|
161
|
+
return false;
|
|
162
|
+
ids.add(entry.id);
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
return Buffer.byteLength(JSON.stringify(value)) <= DASHBOARD_INVENTORY_BYTES;
|
|
166
|
+
} catch {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
90
170
|
export function validDashboardSourceUpdate(value: unknown): value is DashboardSourceUpdate {
|
|
91
171
|
if (
|
|
92
172
|
!object(value) ||
|
|
93
|
-
Object.keys(value).some((k) => !["sequence", "items"].includes(k)) ||
|
|
173
|
+
Object.keys(value).some((k) => !["sequence", "items", "inventory"].includes(k)) ||
|
|
94
174
|
!Number.isSafeInteger(value.sequence) ||
|
|
95
175
|
Number(value.sequence) < 0 ||
|
|
96
176
|
!Array.isArray(value.items) ||
|
|
97
|
-
value.items.length > 8
|
|
177
|
+
value.items.length > 8 ||
|
|
178
|
+
(value.inventory !== undefined && !validDashboardInventory(value.inventory))
|
|
98
179
|
)
|
|
99
180
|
return false;
|
|
100
181
|
const ids = new Set<string>();
|
|
@@ -125,7 +206,8 @@ export function validDashboardSourceUpdate(value: unknown): value is DashboardSo
|
|
|
125
206
|
ids.add(row.id);
|
|
126
207
|
}
|
|
127
208
|
try {
|
|
128
|
-
if (Buffer.byteLength(JSON.stringify(value)) > DASHBOARD_SOURCE_BYTES)
|
|
209
|
+
if (Buffer.byteLength(JSON.stringify({ sequence: value.sequence, items: value.items })) > DASHBOARD_SOURCE_BYTES)
|
|
210
|
+
return false;
|
|
129
211
|
} catch {
|
|
130
212
|
return false;
|
|
131
213
|
}
|
|
@@ -59,6 +59,8 @@ export function digestDefinition(definition: SkillDefinition): DefinitionDigest
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export interface SkillDefinition {
|
|
62
|
+
/** Trusted selected-source locations, frozen with the definition identity; never additional authority. */
|
|
63
|
+
selectedResources?: import("./selected-resources.ts").SelectedResources;
|
|
62
64
|
/** Present only for explicit local public-evidence capture; excluded from authority and identity. */
|
|
63
65
|
sourceSnapshot?: import("./definition-sources.ts").DefinitionSourceSnapshot;
|
|
64
66
|
/** Immutable selected-resource identity, independent of the model-authored name. */
|
|
@@ -80,6 +80,8 @@ export interface DelegationContext {
|
|
|
80
80
|
extensionPath?: string;
|
|
81
81
|
/** No-tool activity observer injected only for governed leaf children. */
|
|
82
82
|
observerExtensionPath?: string;
|
|
83
|
+
/** Public tool origins observed in the current host; names alone do not establish child delivery. */
|
|
84
|
+
childToolSources?: readonly import("./child-tools.ts").ChildToolSource[];
|
|
83
85
|
/**
|
|
84
86
|
* Extra per-child environment supplied by the composition layer (today: the activity timeline's local
|
|
85
87
|
* observation identity). Evaluated once the child's execution id is known. The kernel refuses any key in
|
package/src/kernel/delegate.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { planSpawn } from "./spawn.ts";
|
|
7
7
|
import { ceilingForDefinition, digestDefinition, type DefinitionDigest, type SkillDefinition } from "./definitions.ts";
|
|
8
|
-
import { assertNarrowing, type Capability, type ResolveResult, expandSubsumed } from "./resolve.ts";
|
|
8
|
+
import { assertNarrowing, type Capability, type ResolveResult, expandSubsumed, resolve } from "./resolve.ts";
|
|
9
|
+
import { childToolDeliveryRefusal } from "./child-tools.ts";
|
|
10
|
+
import { selectedResourcePrompt } from "./selected-resources.ts";
|
|
9
11
|
import { checkRoutingAuthority, checkWorkspaceWildcardRequest } from "./routing-authority.ts";
|
|
10
12
|
import { DELEGATE_CAPABILITY, agentCapability, maySpawnDefinition, normaliseCapability } from "./capabilities.ts";
|
|
11
13
|
|
|
@@ -296,6 +298,14 @@ export function planDelegation(request: DelegationRequest, ctx: DelegationContex
|
|
|
296
298
|
return denied({ ...empty, requested, reason: wildcardRequest.reason }, wildcardRequest.code);
|
|
297
299
|
}
|
|
298
300
|
|
|
301
|
+
// Refuse undeliverable tools before calculating a permission request. Preserve escalation precedence:
|
|
302
|
+
// a caller without authority still receives the ordinary denial and its exact denied capability set.
|
|
303
|
+
const authority = resolve({ requested, parentGrant: ctx.ownGrant });
|
|
304
|
+
if (authority.denied.length === 0 && authority.universal.length === 0) {
|
|
305
|
+
const unavailable = childToolDeliveryRefusal(requested, ctx);
|
|
306
|
+
if (unavailable) return { ...empty, requested, reason: unavailable.message, refusal: unavailable };
|
|
307
|
+
}
|
|
308
|
+
|
|
299
309
|
const { result, approvalBinding, bindingMismatch } = resolveDelegationApproval({
|
|
300
310
|
task: request.task,
|
|
301
311
|
agent: request.agent,
|
|
@@ -365,6 +375,7 @@ export function planDelegation(request: DelegationRequest, ctx: DelegationContex
|
|
|
365
375
|
skillPaths: ctx.skillPaths,
|
|
366
376
|
contextFiles: ctx.contextFiles,
|
|
367
377
|
systemPrompt,
|
|
378
|
+
selectedResourcePrompt: selectedResourcePrompt(spawned?.selectedResources),
|
|
368
379
|
// A fork replaces the session file rather than joining it: pi refuses `--fork` beside `--session`.
|
|
369
380
|
...(staged?.forkFrom ? { forkFrom: staged.forkFrom } : { sessionFile: ctx.sessionFile }),
|
|
370
381
|
...(staged?.contextPrompt ? { contextPrompt: staged.contextPrompt } : {}),
|
|
@@ -100,5 +100,16 @@ export async function principalBinding(
|
|
|
100
100
|
runtimePreferences: agent.runtimePreferences ?? inline.runtimePreferences,
|
|
101
101
|
...(typeof pkg.version === "string" ? { packageVersion: pkg.version } : {}),
|
|
102
102
|
binding: Object.freeze({ package: "principal-pi-skills", phase }),
|
|
103
|
+
selectedResources: Object.freeze({
|
|
104
|
+
version: 1 as const,
|
|
105
|
+
selectedSkill: Object.freeze({ path, sha256: hash(skillText) }),
|
|
106
|
+
definition: Object.freeze({ path: agentPath, sha256: hash(agentText) }),
|
|
107
|
+
resourceDirectory: dirname(path),
|
|
108
|
+
package: Object.freeze({
|
|
109
|
+
name: "principal-pi-skills" as const,
|
|
110
|
+
root,
|
|
111
|
+
...(typeof pkg.version === "string" ? { version: pkg.version } : {}),
|
|
112
|
+
}),
|
|
113
|
+
}),
|
|
103
114
|
};
|
|
104
115
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Selected Pi 1.0.4 resources, frozen once per extension instance. No independent resource scan. */
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { resolve as resolvePath } from "node:path";
|
|
3
|
+
import { dirname, resolve as resolvePath } from "node:path";
|
|
4
4
|
import { lstat } from "node:fs/promises";
|
|
5
5
|
import { BoundedReadCleanupError, readBoundedBytes } from "./bounded-read.ts";
|
|
6
6
|
import { parseSkillDefinition, type SkillDefinition } from "./definitions.ts";
|
|
@@ -50,6 +50,14 @@ export async function selectedDefinitions(
|
|
|
50
50
|
const parsed = parseSkillDefinition(path, text);
|
|
51
51
|
if (!parsed || parsed.name !== name) throw Error("selected name/path does not match definition");
|
|
52
52
|
const bound = await principalBinding(path, parsed, text, sources, read);
|
|
53
|
+
const selectedResources =
|
|
54
|
+
bound.selectedResources ??
|
|
55
|
+
Object.freeze({
|
|
56
|
+
version: 1 as const,
|
|
57
|
+
selectedSkill: Object.freeze({ path, sha256: hash(text) }),
|
|
58
|
+
definition: Object.freeze({ path: bound.source, sha256: bound.sourceHash! }),
|
|
59
|
+
resourceDirectory: dirname(path),
|
|
60
|
+
});
|
|
53
61
|
const definitionId = hash(
|
|
54
62
|
JSON.stringify({
|
|
55
63
|
name,
|
|
@@ -61,6 +69,7 @@ export async function selectedDefinitions(
|
|
|
61
69
|
runtimePreferences: bound.runtimePreferences,
|
|
62
70
|
binding: bound.binding,
|
|
63
71
|
packageVersion: bound.packageVersion,
|
|
72
|
+
selectedResources,
|
|
64
73
|
}),
|
|
65
74
|
);
|
|
66
75
|
if (bound.metadata) Object.freeze(bound.metadata);
|
|
@@ -68,6 +77,7 @@ export async function selectedDefinitions(
|
|
|
68
77
|
name,
|
|
69
78
|
Object.freeze({
|
|
70
79
|
...bound,
|
|
80
|
+
selectedResources,
|
|
71
81
|
definitionId,
|
|
72
82
|
...(sources
|
|
73
83
|
? { sourceSnapshot: Object.freeze({ resources: Object.freeze(sources), body: bound.body }) }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Locations of the selected definition, not permission to load additional resources. */
|
|
2
|
+
export interface SelectedResources {
|
|
3
|
+
readonly version: 1;
|
|
4
|
+
readonly selectedSkill: Readonly<{ path: string; sha256: string }>;
|
|
5
|
+
readonly definition: Readonly<{ path: string; sha256: string }>;
|
|
6
|
+
readonly resourceDirectory: string;
|
|
7
|
+
/** Present only after the selected Principal package's existing binding checks succeeded. */
|
|
8
|
+
readonly package?: Readonly<{ name: "principal-pi-skills"; root: string; version?: string }>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function selectedResourcePrompt(resources: SelectedResources | undefined): string | undefined {
|
|
12
|
+
if (!resources) return undefined;
|
|
13
|
+
return (
|
|
14
|
+
"Selected definition resource locations (pi-daddy, version 1):\n" +
|
|
15
|
+
JSON.stringify(resources) +
|
|
16
|
+
"\nThese locations identify the selected instruction source. Resolve its relative resource references here, " +
|
|
17
|
+
"using only tools already granted. Other resource contents and availability have not been verified or loaded. " +
|
|
18
|
+
"These locations grant no additional tools, runtime skills, permission, or task approval."
|
|
19
|
+
);
|
|
20
|
+
}
|
package/src/kernel/spawn.ts
CHANGED
|
@@ -55,6 +55,8 @@ export interface SpawnPlanInput {
|
|
|
55
55
|
* definition only has to describe its own job.
|
|
56
56
|
*/
|
|
57
57
|
systemPrompt?: string;
|
|
58
|
+
/** Trusted selected-definition locations, separate from the unchanged authored body. */
|
|
59
|
+
selectedResourcePrompt?: string;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
export interface SpawnPlan {
|
|
@@ -99,7 +101,7 @@ export function planSpawn(input: SpawnPlanInput): SpawnPlan {
|
|
|
99
101
|
else args.push("--no-session");
|
|
100
102
|
|
|
101
103
|
// Disable discovery so ambient user extensions cannot widen a governed child's surface. Explicit
|
|
102
|
-
// `-e` paths
|
|
104
|
+
// `-e` paths still load; the delegation planner adds only its qualified governance/observer entrypoint.
|
|
103
105
|
args.push("--no-extensions");
|
|
104
106
|
|
|
105
107
|
// R-32. `--no-extensions` governs EXTENSIONS ONLY — measured, not assumed: a child spawned with
|
|
@@ -143,6 +145,7 @@ export function planSpawn(input: SpawnPlanInput): SpawnPlan {
|
|
|
143
145
|
// picks WHICH definition, never its contents. That is what keeps it out of `neutralisePrompt`'s
|
|
144
146
|
// remit: the G1 hazard is a model-controlled string reaching a parser, and this is not one.
|
|
145
147
|
if (input.systemPrompt) args.push("--append-system-prompt", input.systemPrompt);
|
|
148
|
+
if (input.selectedResourcePrompt) args.push("--append-system-prompt", input.selectedResourcePrompt);
|
|
146
149
|
// After the definition body, so a child reads what it IS before what it was told (ADR-0078). Operator- and
|
|
147
150
|
// parent-authored text, never a model-chosen argv position, so `neutralisePrompt` has no remit here either.
|
|
148
151
|
if (input.contextPrompt) args.push("--append-system-prompt", input.contextPrompt);
|
|
@@ -382,6 +382,7 @@ export async function runDashboard(argv = process.argv.slice(2), env: NodeJS.Pro
|
|
|
382
382
|
["now", "work"].includes(display.screen.destination ?? "now");
|
|
383
383
|
await connection.refresh(
|
|
384
384
|
interactive && editingChoice ? "picker" : interactive && showsChoices ? "list" : undefined,
|
|
385
|
+
interactive,
|
|
385
386
|
);
|
|
386
387
|
const jev = connection.state.snapshot?.settings?.jev;
|
|
387
388
|
if (notice === JEV_CONSENT_NOTICE && jev && !jev.pending) notice = dashboardJevNotice(jev);
|