@sema-agent/core 7.44.0 → 7.46.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 +418 -1
- package/dist/agents/extra-tool-names.d.ts +65 -0
- package/dist/agents/extra-tool-names.js +124 -0
- package/dist/agents/subagent.d.ts +17 -5
- package/dist/agents/subagent.js +65 -38
- package/dist/agents/tool-filter.d.ts +82 -5
- package/dist/agents/tool-filter.js +134 -4
- package/dist/core/agent-config-dir.d.ts +20 -0
- package/dist/core/agent-config-dir.js +49 -0
- package/dist/core/agent-definition.d.ts +2 -2
- package/dist/core/allow-entry.d.ts +30 -4
- package/dist/core/allow-entry.js +32 -5
- package/dist/core/ask-origin.d.ts +23 -4
- package/dist/core/ask-origin.js +11 -5
- package/dist/core/checkpoint-store.d.ts +41 -4
- package/dist/core/decision-receipt.js +1 -1
- package/dist/core/effective-path-target.d.ts +143 -10
- package/dist/core/effective-path-target.js +113 -9
- package/dist/core/engine-notice.d.ts +25 -3
- package/dist/core/engine-notice.js +12 -6
- package/dist/core/gate-fold.js +3 -0
- package/dist/core/gate-lanes.js +11 -3
- package/dist/core/gate-outcome.d.ts +5 -0
- package/dist/core/gate-outcome.js +2 -0
- package/dist/core/governance-codes.d.ts +3 -1
- package/dist/core/governance-codes.js +3 -0
- package/dist/core/hooks.d.ts +5 -0
- package/dist/core/memory-engine/content-origin.d.ts +0 -34
- package/dist/core/memory-engine/content-origin.js +9 -4
- package/dist/core/memory-engine/layout.d.ts +5 -1
- package/dist/core/memory-engine/layout.js +1 -0
- package/dist/core/path-rule-binding.d.ts +65 -0
- package/dist/core/path-rule-binding.js +99 -0
- package/dist/core/permission-rule-model.d.ts +47 -18
- package/dist/core/permission-rule-model.js +38 -42
- package/dist/core/permission-rule-provider.d.ts +7 -0
- package/dist/core/permission-rule-provider.js +10 -3
- package/dist/core/permission-rule-store.d.ts +8 -0
- package/dist/core/permission-rule-store.js +6 -2
- package/dist/core/permission-rule-sync.js +2 -2
- package/dist/core/permission-rules.d.ts +22 -36
- package/dist/core/permission-rules.js +50 -40
- package/dist/core/real-approval.d.ts +9 -6
- package/dist/core/real-approval.js +5 -5
- package/dist/core/runner/child-tree.d.ts +110 -0
- package/dist/core/runner/child-tree.js +107 -0
- package/dist/core/runner/construction-doors.d.ts +5 -0
- package/dist/core/runner/construction-doors.js +6 -0
- package/dist/core/runner/contracts.d.ts +54 -2
- package/dist/core/runner/permission-rule-lanes.d.ts +34 -25
- package/dist/core/runner/permission-rule-lanes.js +18 -12
- package/dist/core/runner/persisted-path-rows.d.ts +31 -7
- package/dist/core/runner/persisted-path-rows.js +31 -12
- package/dist/core/runner/prepare-ask-lane.d.ts +6 -0
- package/dist/core/runner/prepare-ask-lane.js +4 -2
- package/dist/core/runner/prepare-config-doors.js +3 -1
- package/dist/core/runner/prepare-execution-env.d.ts +5 -2
- package/dist/core/runner/prepare-execution-env.js +11 -3
- package/dist/core/runner/prepare-gate-stations.d.ts +6 -0
- package/dist/core/runner/prepare-gate-stations.js +3 -1
- package/dist/core/runner/prepare-hands-readface.d.ts +8 -4
- package/dist/core/runner/prepare-hands-readface.js +6 -6
- package/dist/core/runner/prepare-inherited-gate.d.ts +8 -1
- package/dist/core/runner/prepare-inherited-gate.js +8 -2
- package/dist/core/runner/prepare-listings.d.ts +4 -4
- package/dist/core/runner/prepare-listings.js +2 -22
- package/dist/core/runner/prepare-park-ask.d.ts +5 -0
- package/dist/core/runner/prepare-park-ask.js +6 -4
- package/dist/core/runner/prepare-policy-chain.d.ts +16 -2
- package/dist/core/runner/prepare-policy-chain.js +14 -5
- package/dist/core/runner/prepare-suspend-saga.d.ts +10 -0
- package/dist/core/runner/prepare-suspend-saga.js +7 -1
- package/dist/core/runner/prepare-task.js +41 -18
- package/dist/core/runner/prepare-turn-wiring.d.ts +2 -0
- package/dist/core/runner/prepare-turn-wiring.js +2 -1
- package/dist/core/runner/prepare-workspace-restore.d.ts +3 -0
- package/dist/core/runner/prepare-workspace-restore.js +1 -0
- package/dist/core/runner/resume-apply.js +17 -3
- package/dist/core/runner/resume-checkpoint-screen.js +13 -0
- package/dist/core/runner/resume-policy-outcome.js +2 -1
- package/dist/core/runner/run-leg.js +5 -1
- package/dist/core/runner/run-notification-lane.js +2 -2
- package/dist/core/runner/runtask.d.ts +2 -0
- package/dist/core/runner/runtask.js +4 -2
- package/dist/core/runner/stream-steer-verb.js +2 -2
- package/dist/core/runner/sub-agent-deny-lists.d.ts +32 -0
- package/dist/core/runner/sub-agent-deny-lists.js +121 -0
- package/dist/core/runner/synthetic-tools.d.ts +1 -1
- package/dist/core/runner/synthetic-tools.js +3 -2
- package/dist/core/runner/write-protection-station.d.ts +3 -2
- package/dist/core/runner/write-protection-station.js +1 -0
- package/dist/core/runner-deps.d.ts +14 -0
- package/dist/core/sensitive-path-policy.d.ts +8 -0
- package/dist/core/sensitive-path-policy.js +18 -2
- package/dist/core/session-policy-store.d.ts +6 -2
- package/dist/core/session-policy-store.js +2 -1
- package/dist/core/shell-wrapper-projection.d.ts +11 -0
- package/dist/core/shell-wrapper-projection.js +56 -0
- package/dist/core/shell-wrapper-table.d.ts +144 -34
- package/dist/core/shell-wrapper-table.js +40 -20
- package/dist/core/skill-grant.d.ts +10 -2
- package/dist/core/skill-grant.js +20 -4
- package/dist/core/synthetic-read-verdict.d.ts +3 -0
- package/dist/core/synthetic-read-verdict.js +3 -1
- package/dist/core/task-notification.d.ts +12 -1
- package/dist/core/task-notification.js +13 -1
- package/dist/core/task-spec.d.ts +5 -3
- package/dist/core/tool-catalog-entries.d.ts +21 -0
- package/dist/core/tool-catalog-entries.js +9 -0
- package/dist/core/tool-policy.d.ts +45 -12
- package/dist/core/tool-policy.js +18 -20
- package/dist/core/tool-spec.d.ts +23 -4
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +1 -1
- package/dist/core/write-protect.d.ts +4 -0
- package/dist/core/write-protect.js +30 -9
- package/dist/index.d.ts +10 -6
- package/dist/index.js +9 -5
- package/dist/orchestration/run-spec.js +8 -7
- package/dist/orchestration/workflow.js +3 -2
- package/dist/shell/lex.d.ts +7 -0
- package/dist/shell/lex.js +17 -0
- package/dist/tools/fs/bash-program-position.d.ts +8 -87
- package/dist/tools/fs/bash-program-position.js +33 -69
- package/dist/tools/fs/bash-readonly-classifier.d.ts +17 -444
- package/dist/tools/fs/bash-readonly-classifier.js +169 -1225
- package/dist/tools/fs/index.d.ts +3 -2
- package/dist/tools/fs/program-read-model.d.ts +694 -0
- package/dist/tools/fs/program-read-model.js +1252 -0
- package/dist/tools/fs/program-read-model.rows.d.ts +18 -0
- package/dist/tools/fs/program-read-model.rows.js +613 -0
- package/dist/tools/fs/read-deny-home.d.ts +19 -1
- package/dist/tools/fs/read-deny-home.js +62 -24
- package/dist/tools/fs/read-deny.d.ts +54 -14
- package/dist/tools/fs/read-deny.js +104 -50
- package/dist/tools/fs/removal-targets.d.ts +83 -0
- package/dist/tools/fs/removal-targets.js +236 -0
- package/dist/tools/fs/safety.d.ts +3 -0
- package/dist/tools/fs/safety.js +10 -3
- package/dist/tools/fs/shell-read-argv.d.ts +85 -0
- package/dist/tools/fs/shell-read-argv.js +386 -0
- package/dist/tools/fs/shell-read-bindings.d.ts +273 -0
- package/dist/tools/fs/shell-read-bindings.js +746 -0
- package/dist/tools/fs/shell-read-check.js +23 -15
- package/dist/tools/fs/shell-read-establish.js +79 -5
- package/dist/tools/fs/shell-read-judge.d.ts +11 -1
- package/dist/tools/fs/shell-read-judge.js +9 -1
- package/dist/tools/fs/shell-read-plan.d.ts +31 -7
- package/dist/tools/fs/shell-read-plan.js +299 -393
- package/dist/tools/fs/shell-read-word.d.ts +29 -26
- package/dist/tools/fs/shell-read-word.js +30 -38
- package/dist/tools/fs/shell-read-write-targets.d.ts +15 -37
- package/dist/tools/fs/shell-read-write-targets.js +83 -136
- package/dist/tools/fs/shell-reentry-text.d.ts +38 -6
- package/dist/tools/fs/shell-reentry-text.js +90 -53
- package/package.json +1 -1
- package/test/export-surface.snapshot.json +49 -3
- package/wire-changes/core@7.45.0.json +1084 -0
- package/wire-changes/core@7.46.0.json +1522 -0
package/dist/core/task-spec.d.ts
CHANGED
|
@@ -551,9 +551,11 @@ export interface TaskSpec {
|
|
|
551
551
|
* upstream): an `allowTools` entry naming a tool that does not exist is ITEM-FILTERED at spawn (the
|
|
552
552
|
* agent stays listed and delegable; the only host disclosure is a prepare-time HEURISTIC advisory
|
|
553
553
|
* via `RunnerDeps.onError` phase `"config"` for entries unknown to the parent's assembled roster —
|
|
554
|
-
* zero model-facing warning, the verified upstream shape); a `denyTools` entry
|
|
555
|
-
*
|
|
556
|
-
*
|
|
554
|
+
* zero model-facing warning, the verified upstream shape); a `denyTools` entry is read as the
|
|
555
|
+
* reference reads it (`Tool(content)` hides the whole `Tool`, with a host notice) and judged once, here and for the
|
|
556
|
+
* delegation tool's own lists alike: a spelling that names no tool, or a stale one (another case of a mounted tool, a
|
|
557
|
+
* retired name), is REJECTED at task start (`config.agent.unknown_tool`), any other name no tool carries is told to the
|
|
558
|
+
* host and hides nothing; and
|
|
557
559
|
* providing this field with NO delegation tool mounted is rejected too
|
|
558
560
|
* (`config.agents.no_delegation_tool`) — never a silent no-op. POLICY-NEUTRAL: a
|
|
559
561
|
* roster listing only; the 1.294 tighten-only parent-policy inheritance is applied at spawn time,
|
|
@@ -47,3 +47,24 @@ export declare const ENGINE_CARDS: Readonly<Record<string, string>>;
|
|
|
47
47
|
export declare function toolFace(id: string): ToolFaceDeclaration;
|
|
48
48
|
/** Definition-id → face, for the modules that spread one (`...TOOL_FACES.read`). Frozen: a face is data. */
|
|
49
49
|
export declare const TOOL_FACES: Readonly<Record<string, ToolFaceDeclaration>>;
|
|
50
|
+
/**
|
|
51
|
+
* The engine's own tool names, once each: every catalog entry the engine mounts itself (`source: "builtin"` — the hands,
|
|
52
|
+
* the scaffolds, the memory tools, the background-task tools), whatever face or contract it is mounted under. A host that
|
|
53
|
+
* must hand the engine a tool face with NO built-ins (`TaskSpec.excludeTools`, a shell's `--tools ""`) reads this set
|
|
54
|
+
* instead of keeping a list of its own: the catalog is the one source, and a name the engine adds later lands here with it.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ENGINE_BUILTIN_TOOL_NAMES: readonly string[];
|
|
57
|
+
/**
|
|
58
|
+
* The engine's HAND tools, once each, with the other spellings they answer to: the catalog rows mounted by `hands` — what a run
|
|
59
|
+
* mounts for itself over an execution environment (the file and shell band, the worktree pair, the band's background-shell
|
|
60
|
+
* pair). A delegated child's tool-name lists govern these beside the tools the delegation tool hands it, so the spawn reads
|
|
61
|
+
* this set rather than a list of its own.
|
|
62
|
+
*/
|
|
63
|
+
export declare const HAND_TOOLS: ReadonlyArray<{
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly aliases?: readonly string[];
|
|
66
|
+
}>;
|
|
67
|
+
/** The wire names of {@link HAND_TOOLS}. */
|
|
68
|
+
export declare const HAND_TOOL_NAMES: readonly string[];
|
|
69
|
+
/** Is this name one the engine mounts itself ({@link ENGINE_BUILTIN_TOOL_NAMES})? A caller tool, an MCP tool or a skill tool is not. */
|
|
70
|
+
export declare function isEngineBuiltinToolName(name: string): boolean;
|
|
@@ -180,3 +180,12 @@ function deepFreeze(value) {
|
|
|
180
180
|
}
|
|
181
181
|
deepFreeze(TOOL_CATALOG_ENTRIES);
|
|
182
182
|
export const TOOL_FACES = Object.freeze(Object.fromEntries(TOOL_CATALOG_ENTRIES.map((e) => [e.id, e.face])));
|
|
183
|
+
export const ENGINE_BUILTIN_TOOL_NAMES = Object.freeze([...new Set(TOOL_CATALOG_ENTRIES.filter((e) => e.source === "builtin").map((e) => e.name))]);
|
|
184
|
+
export const HAND_TOOLS = Object.freeze([...new Set(TOOL_CATALOG_ENTRIES.filter((e) => e.mountedBy.includes("hands")).map((e) => e.name))].map((name) => {
|
|
185
|
+
const aliases = [...new Set(TOOL_CATALOG_ENTRIES.filter((e) => e.name === name && e.mountedBy.includes("hands")).flatMap((e) => e.face.aliases ?? []))];
|
|
186
|
+
return Object.freeze(aliases.length > 0 ? { name, aliases: Object.freeze(aliases) } : { name });
|
|
187
|
+
}));
|
|
188
|
+
export const HAND_TOOL_NAMES = Object.freeze(HAND_TOOLS.map((t) => t.name));
|
|
189
|
+
export function isEngineBuiltinToolName(name) {
|
|
190
|
+
return ENGINE_BUILTIN_TOOL_NAMES.includes(name);
|
|
191
|
+
}
|
|
@@ -4,6 +4,7 @@ import { type Settlement } from "./gate-outcome.js";
|
|
|
4
4
|
export { policyCannotAnswer, rowDemandsAPerson } from "./real-approval.js";
|
|
5
5
|
import { type DecisionReason } from "./decision-receipt.js";
|
|
6
6
|
export { isEngineRefusal } from "./decision-receipt.js";
|
|
7
|
+
import { type RemovalGuardSeat } from "../tools/fs/removal-targets.js";
|
|
7
8
|
/** A tool call presented to a policy before it executes. */
|
|
8
9
|
/** design/388 B6 — the per-call face (see {@link ToolCallRequest.face}). */
|
|
9
10
|
export interface ToolCallFace {
|
|
@@ -69,6 +70,26 @@ export interface ToolCallRequest {
|
|
|
69
70
|
* window — at that declaration, not here.
|
|
70
71
|
*/
|
|
71
72
|
cwd?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The root this leg's tools resolve a ROOT-relative spelling against (a search tool's relative `path`, a
|
|
75
|
+
* pattern with no `path`), stamped beside {@link cwd} at every Runner adjudication seat — the same
|
|
76
|
+
* canonical spelling as `cwd` (the hands' own root, the value `cwd` starts at). Present whenever the leg
|
|
77
|
+
* mounts file hands, read-only hands included; absent on a hands-less leg and on a bare request. A path
|
|
78
|
+
* guard whose deployment supplied no base of its own resolves the call's target against `root` / `cwd`.
|
|
79
|
+
* Read-only, like `cwd`.
|
|
80
|
+
*/
|
|
81
|
+
root?: string;
|
|
82
|
+
/** The call's target reading (`readCallTarget`: lexical / canonical / hop views per reading of the path slot), stamped by the Runner on a
|
|
83
|
+
* leg whose lanes can hold a path rule; it describes only the `args` object it was taken for (`callTargetReadingOf`). Read-only. */
|
|
84
|
+
targetReading?: import("./effective-path-target.js").CallTargetReading;
|
|
85
|
+
/**
|
|
86
|
+
* An ENGINE-INTERNAL seat, not a fact of the call: the anchors of the policy now judging this request — the leg its
|
|
87
|
+
* path rules were installed on (`installPolicyAnchors`). Present only on the copy an installed policy hands its own
|
|
88
|
+
* inner `check` (where `createPermissionRulePolicy` reads it; an inner installation's anchors win over an outer one's);
|
|
89
|
+
* the request the gate holds, an `AskRequest`, a hook's input and a parked row never carry it. A host neither sets nor
|
|
90
|
+
* reads it.
|
|
91
|
+
*/
|
|
92
|
+
pathRuleAnchors?: import("./permission-rule-model.js").PathRuleBases;
|
|
72
93
|
/**
|
|
73
94
|
* The CANONICAL directories THIS RUN'S PROMPT ADVERTISES AS WRITABLE — the admitted list of the root
|
|
74
95
|
* fence's advertised-writable-directory seat (the memory engine's write home, the deployment's
|
|
@@ -397,12 +418,12 @@ export type PermissionResult = {
|
|
|
397
418
|
/** The ask's whole class set, in {@link import("./ask-origin.js").ASK_CLASSES} order (see
|
|
398
419
|
* {@link AskRequest.classes}). Stamped beside {@link askClass}, under the same rule. */
|
|
399
420
|
classes?: readonly import("./ask-origin.js").AskClass[];
|
|
400
|
-
/** WHICH integrity guard minted this ask —
|
|
401
|
-
* write. ENGINE-STAMPED by the
|
|
402
|
-
* ({@link import("./ask-origin.js").classifyAsk}) so the
|
|
421
|
+
/** WHICH integrity guard minted this ask — a removal of a protected location, an unverifiable recursive delete
|
|
422
|
+
* or the session-transcript write. ENGINE-STAMPED by the guard policies; a fold-internal fact the class
|
|
423
|
+
* derivation reads ({@link import("./ask-origin.js").classifyAsk}) so the guards, which mint the same
|
|
403
424
|
* `requiresRealApproval` ask, are told apart by a fact and not by their prose. Never copied onto the
|
|
404
425
|
* approval request or the park row. */
|
|
405
|
-
guard?: "unverifiable_delete" | "transcript_write" | "artifact_shared_read";
|
|
426
|
+
guard?: "dangerous_delete" | "unverifiable_delete" | "transcript_write" | "artifact_shared_read";
|
|
406
427
|
/** The call could not be READ against a rule that may reach it — a content-form deny row, a content-form
|
|
407
428
|
* ask row, or a persisted-rule row (the lexer's word). ENGINE-STAMPED at the three unreadable mint sites;
|
|
408
429
|
* the class derivation reads it as `rule_unreadable` (a mode may release it, a person may clear it, no
|
|
@@ -527,11 +548,14 @@ export interface ToolPolicy {
|
|
|
527
548
|
* describes the policy must read that bit, not the field's presence.
|
|
528
549
|
*/
|
|
529
550
|
readonly projection?: ToolPolicyProjection;
|
|
530
|
-
/** The policy's
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
|
|
551
|
+
/** The policy's PATH rules as a function of the ANCHORS of the leg they are installed on (`createPermissionRulePolicy`
|
|
552
|
+
* sets it; present exactly when the policy judges a path target): given the leg's root and home, every path rule
|
|
553
|
+
* bound there — the face-keyed deny rows the prepared leg joins to its read and write tables (so the shell's reads and
|
|
554
|
+
* writes and the traversals meet the rule, not only the tool it names), and the rows its own `check` judges at the
|
|
555
|
+
* gate. A policy the Runner already installed answers with its own installation's rows whatever it is given. Carried
|
|
556
|
+
* through {@link combinePolicies}; read with {@link toolPolicyPathRules}. Its presence also tells the Runner to read
|
|
557
|
+
* each call's target ({@link ToolCallRequest.targetReading}). */
|
|
558
|
+
readonly pathRules?: (anchors: import("./permission-rule-model.js").PathRuleBases) => readonly import("./path-rule-binding.js").BoundPathRule[];
|
|
535
559
|
/** Does this policy guard a write to this ABSOLUTE target — would it refuse the write if a write tool made it? The
|
|
536
560
|
* policy's answer for a writer it cannot see as a call (the shell's file commands), read by the shell station's
|
|
537
561
|
* `writesPlaced` fact alone: a guarded target is not placed, so no permission mode answers the command and its ask
|
|
@@ -548,9 +572,15 @@ export interface ToolPolicy {
|
|
|
548
572
|
* each by name off the wrapped policy, {@link combinePolicies} folds each. The fence makes a new {@link ToolPolicy} member
|
|
549
573
|
* a compile error until the table names it.
|
|
550
574
|
*/
|
|
551
|
-
declare const TOOL_POLICY_CARRIED_MEMBERS: readonly ["projection", "
|
|
575
|
+
declare const TOOL_POLICY_CARRIED_MEMBERS: readonly ["projection", "pathRules", "writeTargetGuard", "nameSets"];
|
|
552
576
|
type ToolPolicyCarriedMember = (typeof TOOL_POLICY_CARRIED_MEMBERS)[number];
|
|
553
577
|
export type ToolPolicyCarriesEveryMember = AssertAllKeysHandled<Exclude<Exclude<keyof ToolPolicy, "check">, ToolPolicyCarriedMember>>;
|
|
578
|
+
/** The carried members that are set on `p`, each read by name — an accessor or a non-enumerable member included. */
|
|
579
|
+
export declare function carriedMembersOf(p: {
|
|
580
|
+
readonly [K in ToolPolicyCarriedMember]?: ToolPolicy[K];
|
|
581
|
+
}): {
|
|
582
|
+
-readonly [K in ToolPolicyCarriedMember]?: ToolPolicy[K];
|
|
583
|
+
};
|
|
554
584
|
/**
|
|
555
585
|
* The ONE way to wrap a policy: the wrapper decides through `check`; every member {@link ToolPolicy} declares beside it
|
|
556
586
|
* (projection, name sets, path deny rows, write-target guard — the carried-member table) rides as `inner` holds it, read
|
|
@@ -560,8 +590,10 @@ export type ToolPolicyCarriesEveryMember = AssertAllKeysHandled<Exclude<Exclude<
|
|
|
560
590
|
* The ask-class brand is not carried: it attests the replaced `check`.
|
|
561
591
|
*/
|
|
562
592
|
export declare function wrapToolPolicy<P extends ToolPolicy>(inner: P, check: ToolPolicy["check"]): Pick<P, ToolPolicyCarriedMember> & ToolPolicy;
|
|
563
|
-
/** Every path
|
|
564
|
-
|
|
593
|
+
/** Every path rule the given policies carry (combined policies included), in order, bound at `anchors` — the anchors of
|
|
594
|
+
* the leg the policies are installed on (a policy already installed answers with its own installation's rows). The deny
|
|
595
|
+
* tables take the rows that guard a face (`faces` non-empty) of a deny rule. */
|
|
596
|
+
export declare function toolPolicyPathRules(policies: readonly (ToolPolicy | undefined)[], anchors: import("./permission-rule-model.js").PathRuleBases): readonly import("./path-rule-binding.js").BoundPathRule[];
|
|
565
597
|
/** The one write-target guard the given policies carry together (combined policies included): `true` when any member
|
|
566
598
|
* guards the target, a member that throws counting as guarding it. `undefined` when none carries one. */
|
|
567
599
|
export declare function toolPolicyWriteTargetGuard(policies: readonly (ToolPolicy | undefined)[]): ToolPolicy["writeTargetGuard"];
|
|
@@ -1082,6 +1114,7 @@ export declare function createUnverifiableDeletePolicy(opts?: {
|
|
|
1082
1114
|
safeVars?: readonly string[];
|
|
1083
1115
|
/** Override the shell tool names this gate parses (default `Bash`). */
|
|
1084
1116
|
tools?: string[];
|
|
1117
|
+
removalSeat?: RemovalGuardSeat;
|
|
1085
1118
|
}): ToolPolicy;
|
|
1086
1119
|
export declare function createTranscriptIntegrityPolicy(opts?: {
|
|
1087
1120
|
/** Transcript directories to protect. Default: `($AGENT_DATA_DIR ?? ~/.ai-agent)/sessions`. */
|
package/dist/core/tool-policy.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
|
+
import { withArgsReading } from "./effective-path-target.js";
|
|
3
4
|
import { brandPolicyAskClass } from "./ask-class.js";
|
|
4
5
|
import { decisionAskClassesOf, headlessDenialMessage } from "./ask-origin.js";
|
|
5
6
|
import { ownReadRootCandidate, readRootGrantSeat } from "./read-root-grant-screen.js";
|
|
@@ -21,6 +22,7 @@ import { isNamespacedCoveringRuleName, namespacedRuleNameCovers, parsePermission
|
|
|
21
22
|
import { protocolOf } from "./protocol-table.js";
|
|
22
23
|
import { isAbsoluteForFamily, isAbsolutePathForm, joinForFamily, normalizeAbsPathLexically, pathFamilyOf, writeTargetPath } from "../tools/fs/safety.js";
|
|
23
24
|
import { ASSIGNMENT_PREFIX, writtenAssignmentPrefix } from "../tools/fs/bash-program-position.js";
|
|
25
|
+
import { removalReadingOf } from "../tools/fs/removal-targets.js";
|
|
24
26
|
const nameListHolds = (set, req) => heldBy("policy.nameLists", set, req);
|
|
25
27
|
const shellToolsListHolds = (set, req) => heldBy("policy.shellToolsList", set, req);
|
|
26
28
|
export function advertisedWritableRootsSeat(seat) {
|
|
@@ -136,8 +138,8 @@ export const ASK_EVIDENCE_ABSENCE_VALUES = ["not_wired", "not_adjudicated", "una
|
|
|
136
138
|
export function decisionText(d) {
|
|
137
139
|
return d.message;
|
|
138
140
|
}
|
|
139
|
-
const TOOL_POLICY_CARRIED_MEMBERS = ["projection", "
|
|
140
|
-
function carriedMembersOf(p) {
|
|
141
|
+
const TOOL_POLICY_CARRIED_MEMBERS = ["projection", "pathRules", "writeTargetGuard", "nameSets"];
|
|
142
|
+
export function carriedMembersOf(p) {
|
|
141
143
|
const out = {};
|
|
142
144
|
const carry = (k) => {
|
|
143
145
|
const v = p[k];
|
|
@@ -151,8 +153,8 @@ function carriedMembersOf(p) {
|
|
|
151
153
|
export function wrapToolPolicy(inner, check) {
|
|
152
154
|
return { ...carriedMembersOf(inner), check };
|
|
153
155
|
}
|
|
154
|
-
export function
|
|
155
|
-
return policies.flatMap((p) => (
|
|
156
|
+
export function toolPolicyPathRules(policies, anchors) {
|
|
157
|
+
return policies.flatMap((p) => (typeof p?.pathRules === "function" ? p.pathRules(anchors) : []));
|
|
156
158
|
}
|
|
157
159
|
export function toolPolicyWriteTargetGuard(policies) {
|
|
158
160
|
const guards = policies.flatMap((p) => (typeof p?.writeTargetGuard === "function" ? [p.writeTargetGuard] : []));
|
|
@@ -513,7 +515,7 @@ export function createApprovalPolicy(opts) {
|
|
|
513
515
|
}
|
|
514
516
|
export function combinePolicies(...policies) {
|
|
515
517
|
const nameSets = policies.flatMap(toolPolicyNameSets);
|
|
516
|
-
const
|
|
518
|
+
const pathRuled = policies.filter((p) => typeof p?.pathRules === "function");
|
|
517
519
|
const writeTargetGuard = toolPolicyWriteTargetGuard(policies);
|
|
518
520
|
const childProjections = policies.map((p) => p.projection);
|
|
519
521
|
const projectedComponents = [];
|
|
@@ -535,7 +537,7 @@ export function combinePolicies(...policies) {
|
|
|
535
537
|
const folded = {
|
|
536
538
|
projection: combinedProjection,
|
|
537
539
|
nameSets: nameSets.length > 0 ? nameSets : undefined,
|
|
538
|
-
|
|
540
|
+
pathRules: pathRuled.length > 0 ? (anchors) => toolPolicyPathRules(pathRuled, anchors) : undefined,
|
|
539
541
|
writeTargetGuard,
|
|
540
542
|
};
|
|
541
543
|
return {
|
|
@@ -575,7 +577,8 @@ export function combinePolicies(...policies) {
|
|
|
575
577
|
continue;
|
|
576
578
|
}
|
|
577
579
|
if (d.updatedInput !== undefined) {
|
|
578
|
-
|
|
580
|
+
const reread = withArgsReading(current, d.updatedInput, signal);
|
|
581
|
+
current = reread !== undefined ? await reread : { ...current, args: d.updatedInput };
|
|
579
582
|
rewrite = d;
|
|
580
583
|
stated = d.action === "allow" ? d.decisionReason : undefined;
|
|
581
584
|
}
|
|
@@ -920,28 +923,23 @@ function hasRecursiveForce(argvTail) {
|
|
|
920
923
|
export function createUnverifiableDeletePolicy(opts) {
|
|
921
924
|
const safeVars = new Set([...UNVERIFIABLE_DELETE_SAFE_VARS, ...(opts?.safeVars ?? [])]);
|
|
922
925
|
const shellTools = canonicalToolNameSet(opts?.tools);
|
|
926
|
+
const unverifiable = (command, finding = findUnverifiableRecursiveDelete(command, safeVars)) => (finding === undefined ? ALLOW : removalAsk("unverifiable_delete", finding));
|
|
923
927
|
return brandPolicyAskClass({
|
|
924
|
-
check(req) {
|
|
928
|
+
check(req, signal) {
|
|
925
929
|
if (!shellToolsListHolds(shellTools, req))
|
|
926
930
|
return ALLOW;
|
|
927
931
|
const command = req.args?.command;
|
|
928
932
|
if (typeof command !== "string")
|
|
929
933
|
return ALLOW;
|
|
930
|
-
const
|
|
931
|
-
|
|
932
|
-
return ALLOW;
|
|
933
|
-
return {
|
|
934
|
-
action: "ask",
|
|
935
|
-
decisionReason: "safety",
|
|
936
|
-
requiresRealApproval: true,
|
|
937
|
-
guard: "unverifiable_delete",
|
|
938
|
-
message: `Unverifiable recursive delete (fail-closed unless cleared): ${finding}. ` +
|
|
939
|
-
`Re-run the delete with the resolved literal path written into the command itself ` +
|
|
940
|
-
`(or assign the variable in the same command, e.g. \`DIR=/exact/path; rm -rf "$DIR"\`) so the target can be verified.`,
|
|
941
|
-
};
|
|
934
|
+
const removal = removalReadingOf(command, req, opts?.removalSeat);
|
|
935
|
+
return removal === undefined ? unverifiable(command) : removal.judge(signal).then((found) => (found === undefined ? unverifiable(command) : removalAsk(found.guard, found.text)));
|
|
942
936
|
},
|
|
943
937
|
}, "external_authority");
|
|
944
938
|
}
|
|
939
|
+
function removalAsk(guard, text) {
|
|
940
|
+
const message = guard === "dangerous_delete" ? `Dangerous removal: ${text}. No permission mode, allow rule or classifier clears this — only a person confirming this call does.` : `Unverifiable recursive delete (fail-closed unless cleared): ${text}. Re-run the delete with the resolved literal path written into the command itself (or assign the variable a literal path in the same command, e.g. \`DIR=/exact/path; rm -rf "$DIR"\`) so the target can be verified.`;
|
|
941
|
+
return { action: "ask", decisionReason: "safety", requiresRealApproval: true, guard, message };
|
|
942
|
+
}
|
|
945
943
|
function pathSegments(p) {
|
|
946
944
|
return p.split(/[\\/]/).filter(Boolean);
|
|
947
945
|
}
|
package/dist/core/tool-spec.d.ts
CHANGED
|
@@ -175,18 +175,36 @@ export interface ToolSpec<TParams extends TSchema = TSchema> {
|
|
|
175
175
|
* offered pool a child of that type actually mounts. Filled by `createSubagentTool` beside
|
|
176
176
|
* `agentListing`; a type with neither list gets the whole offered pool.
|
|
177
177
|
*
|
|
178
|
-
* Read by
|
|
178
|
+
* Read by the memory content-origin face, which classifies a delegation RESULT by the
|
|
179
179
|
* child's tool face. A child that can reach a network or protocol tool returns content from outside
|
|
180
180
|
* the trust boundary just as surely as calling that tool here would, and the parent's transcript is
|
|
181
181
|
* where it lands. Static by construction — the child's face is known from its definition, so no
|
|
182
|
-
* runtime tracking of what the child actually did is involved (that is the v2 ticket).
|
|
182
|
+
* runtime tracking of what the child actually did is involved (that is the v2 ticket). `authored`
|
|
183
|
+
* marks the entries minted from a definition a caller wrote on a tool a deployment mounted (not the
|
|
184
|
+
* engine's built-ins, the general-purpose alias, fork, or the engine's nested copy of the tool for a
|
|
185
|
+
* delegated child); prepare's deny-name check judges only those.
|
|
183
186
|
*/
|
|
184
187
|
agentToolFaces?: ReadonlyArray<{
|
|
185
188
|
name: string;
|
|
186
189
|
allowTools?: readonly string[];
|
|
187
190
|
denyTools?: readonly string[];
|
|
188
191
|
canRedelegate?: boolean;
|
|
192
|
+
authored?: true;
|
|
189
193
|
}>;
|
|
194
|
+
/**
|
|
195
|
+
* The tool-level `denyTools` list of the delegation tool (`SubagentToolOptions.denyTools`, applied when no agent definition is
|
|
196
|
+
* selected), exactly as written, filled by `createSubagentTool` beside {@link agentToolFaces}; absent when none was written
|
|
197
|
+
* and on the engine's nested copy for a delegated child. Read by prepare's deny-name check, which judges it with
|
|
198
|
+
* the `authored` entries of the faces.
|
|
199
|
+
*/
|
|
200
|
+
agentToolLevelDenyTools?: readonly string[];
|
|
201
|
+
/**
|
|
202
|
+
* The tool-level `allowTools` list of the delegation tool (`SubagentToolOptions.allowTools`, applied when no agent definition is
|
|
203
|
+
* selected), as the tool copied it, filled by `createSubagentTool` beside {@link agentToolLevelDenyTools}; absent when none was
|
|
204
|
+
* written and on the engine's nested copy for a delegated child. Read by prepare's allowed-list judgment: a value that is not a
|
|
205
|
+
* list of strings is refused before the run.
|
|
206
|
+
*/
|
|
207
|
+
agentToolLevelAllowTools?: readonly string[];
|
|
190
208
|
/**
|
|
191
209
|
* design/178 §3 (ruled 2026-08-08) — the POOL a delegated child draws from, as the delegation tool
|
|
192
210
|
* captured it. Read together with {@link agentToolFaces} by the memory content-origin face: the face
|
|
@@ -194,8 +212,9 @@ export interface ToolSpec<TParams extends TSchema = TSchema> {
|
|
|
194
212
|
* carries its own tool set, and a parent that mounts nothing but the delegation tool can still hand
|
|
195
213
|
* its children a network tool, so the parent's roster is the wrong thing to look at.
|
|
196
214
|
*
|
|
197
|
-
* ABSENT ⇔ the pool is not statically knowable — a spawn-time tool factory
|
|
198
|
-
* identity does not exist until the call
|
|
215
|
+
* ABSENT ⇔ the pool is not statically knowable — a spawn-time tool factory with no declared roster
|
|
216
|
+
* (`SubagentToolOptions.extraToolNames`) can inject tools whose identity does not exist until the call
|
|
217
|
+
* happens — and the reader fails closed on that. A declared roster's tools are rows of the pool.
|
|
199
218
|
*/
|
|
200
219
|
agentToolPool?: ReadonlyArray<{
|
|
201
220
|
name: string;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export type { BackgroundChildEvent, DelegationLifecycleEvent } from "./delegatio
|
|
|
30
30
|
export { __resetMalformedDelegationSeatAnnouncement, deliverDelegationLifecycle } from "./delegation-frames.js";
|
|
31
31
|
export type { ProjectMemoryLoad, ResumePreflightInfo, ResumePreflightVerdict, RunnerDeps } from "./runner-deps.js";
|
|
32
32
|
export type { EngineNotice, OwedUserInputAccount, UserInputUndrainedCause } from "./engine-notice.js";
|
|
33
|
-
export { __resetMalformedNoticeSeatAnnouncement, deliverEngineNotice, owedUserInputCounts, parentLegIds, settleOwedUserInput, undrainedUserInputNotices, USER_INPUT_UNDRAINED_CAUSES } from "./engine-notice.js";
|
|
33
|
+
export { __resetMalformedNoticeSeatAnnouncement, deliverEngineNotice, owedUserInputCounts, parentLegIds, settleOwedUserInput, undrainedUserInputNotices, USER_INPUT_UNDRAINED_CAUSES, USER_INPUT_UNDRAINED_FAMILIES } from "./engine-notice.js";
|
|
34
34
|
export type { AgentTool, Model, StreamFn, ThinkingLevel, ToolInputValidationContext, ToolInputVerdict };
|
package/dist/core/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { MODEL_ROLES } from "./model-seat.js";
|
|
2
2
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource } from "./runtime-caps.js";
|
|
3
3
|
export { __resetMalformedDelegationSeatAnnouncement, deliverDelegationLifecycle } from "./delegation-frames.js";
|
|
4
|
-
export { __resetMalformedNoticeSeatAnnouncement, deliverEngineNotice, owedUserInputCounts, parentLegIds, settleOwedUserInput, undrainedUserInputNotices, USER_INPUT_UNDRAINED_CAUSES } from "./engine-notice.js";
|
|
4
|
+
export { __resetMalformedNoticeSeatAnnouncement, deliverEngineNotice, owedUserInputCounts, parentLegIds, settleOwedUserInput, undrainedUserInputNotices, USER_INPUT_UNDRAINED_CAUSES, USER_INPUT_UNDRAINED_FAMILIES } from "./engine-notice.js";
|
|
@@ -173,6 +173,10 @@ export interface WriteProtectionCompileOptions {
|
|
|
173
173
|
* path-family source when the call carries no cwd. Omitted ⇒ relative spellings resolve against the
|
|
174
174
|
* cwd, then the environment's own working directory. */
|
|
175
175
|
readonly rootPath?: string;
|
|
176
|
+
/** The host's configuration root when it keeps the agent's configuration directory somewhere other than the home's
|
|
177
|
+
* `.sema` (`RunnerDeps.agentConfigDir`, absolute, already screened): every row that names the `.sema` directory also
|
|
178
|
+
* names the same tail below this root, and a hit there cites the row. Omitted ⇒ the table is judged as it stands. */
|
|
179
|
+
readonly agentConfigDir?: string;
|
|
176
180
|
/**
|
|
177
181
|
* Called at most ONCE per judgment, at the moment the ENVIRONMENT half is found unable to contribute
|
|
178
182
|
* ({@link WriteProtectionViewAbsence}) — before the judgment returns, and on the hit arm as well as the
|
|
@@ -4,6 +4,7 @@ import { pathTargetBaseOf } from "./effective-path-target.js";
|
|
|
4
4
|
import { canonicalDataRootKeys, dataRootSpellings, relativeUnderRoot } from "./sensitive-path-policy.js";
|
|
5
5
|
import { symlinkChainHops } from "./path-identity.js";
|
|
6
6
|
import { readDenyPatternRun } from "../tools/fs/read-deny.js";
|
|
7
|
+
import { agentConfigDirSegments, agentConfigDirTail } from "./agent-config-dir.js";
|
|
7
8
|
import { thrownText } from "./thrown-value.js";
|
|
8
9
|
const freezeTable = (rows) => Object.freeze(rows.map((r) => Object.freeze(r)));
|
|
9
10
|
export const WRITE_PROTECTED_DEFAULT_TABLE = freezeTable([
|
|
@@ -196,6 +197,7 @@ export function compileWriteProtection(entries, opts) {
|
|
|
196
197
|
const basenames = new Map();
|
|
197
198
|
const segments = new Map();
|
|
198
199
|
const runs = [];
|
|
200
|
+
const configTails = [];
|
|
199
201
|
for (const row of rows) {
|
|
200
202
|
const folded = foldWriteProtectName(row.name);
|
|
201
203
|
if (row.kind === "basename") {
|
|
@@ -209,8 +211,23 @@ export function compileWriteProtection(entries, opts) {
|
|
|
209
211
|
else {
|
|
210
212
|
runs.push({ name: row.name, parts: folded.split("/").filter((s) => s.length > 0) });
|
|
211
213
|
}
|
|
214
|
+
const tail = row.kind === "basename" ? undefined : agentConfigDirTail(row.name);
|
|
215
|
+
if (tail !== undefined && opts?.agentConfigDir !== undefined)
|
|
216
|
+
configTails.push({ hit: { name: row.name, kind: row.kind }, tail: foldWriteProtectName(tail).split("/").filter((s) => s.length > 0) });
|
|
212
217
|
}
|
|
213
|
-
const
|
|
218
|
+
const configRootSpelled = opts?.agentConfigDir === undefined ? [] : [agentConfigDirSegments(opts.agentConfigDir)];
|
|
219
|
+
const judgeAtConfigRoots = (segs, roots) => {
|
|
220
|
+
for (const root of roots) {
|
|
221
|
+
const at = root.map(foldWriteProtectSegment);
|
|
222
|
+
if (segs.length < at.length || !at.every((a, i) => segs[i] === a))
|
|
223
|
+
continue;
|
|
224
|
+
for (const { hit, tail } of configTails)
|
|
225
|
+
if (segs.length >= at.length + tail.length && tail.every((t, i) => segs[at.length + i] === t))
|
|
226
|
+
return hit;
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
};
|
|
230
|
+
const judgeSegments = (raw, configRoots) => {
|
|
214
231
|
if (raw.length === 0)
|
|
215
232
|
return null;
|
|
216
233
|
const segs = raw.map(foldWriteProtectSegment);
|
|
@@ -229,23 +246,26 @@ export function compileWriteProtection(entries, opts) {
|
|
|
229
246
|
return { name: run.name, kind: "segment-run" };
|
|
230
247
|
}
|
|
231
248
|
}
|
|
232
|
-
return null;
|
|
249
|
+
return configTails.length === 0 ? null : judgeAtConfigRoots(segs, configRoots);
|
|
233
250
|
};
|
|
234
|
-
const judgeViews = (spelling) => {
|
|
235
|
-
const posix = judgeSegments(pathViewSegments(spelling, "literal", POSIX_SEPARATOR_FAMILY, uncAnchorSegments(spelling)));
|
|
251
|
+
const judgeViews = (spelling, configRoots = configRootSpelled) => {
|
|
252
|
+
const posix = judgeSegments(pathViewSegments(spelling, "literal", POSIX_SEPARATOR_FAMILY, uncAnchorSegments(spelling)), configRoots);
|
|
236
253
|
if (posix !== null)
|
|
237
254
|
return posix;
|
|
238
|
-
const bothSeparators = judgeSegments(pathViewSegments(spelling, "literal"));
|
|
255
|
+
const bothSeparators = judgeSegments(pathViewSegments(spelling, "literal"), configRoots);
|
|
239
256
|
if (bothSeparators !== null)
|
|
240
257
|
return bothSeparators;
|
|
241
258
|
for (const normalization of WIN32_NORMALIZATIONS) {
|
|
242
|
-
const hit = judgeSegments(pathViewSegments(spelling, normalization));
|
|
259
|
+
const hit = judgeSegments(pathViewSegments(spelling, normalization), configRoots);
|
|
243
260
|
if (hit !== null)
|
|
244
261
|
return hit;
|
|
245
262
|
}
|
|
246
263
|
return null;
|
|
247
264
|
};
|
|
248
|
-
const judgeSpelled = (spelled) =>
|
|
265
|
+
const judgeSpelled = (spelled) => {
|
|
266
|
+
const remainder = relativeUnderDataRoot(spelled, rootViews);
|
|
267
|
+
return remainder === null ? judgeViews(spelled) : judgeViews(remainder, []);
|
|
268
|
+
};
|
|
249
269
|
const judgeSpelling = (path, cwd) => {
|
|
250
270
|
const base = typeof cwd === "string" && cwd.length > 0 ? cwd : undefined;
|
|
251
271
|
const family = pathFamilyOf({ cwd: base });
|
|
@@ -291,7 +311,8 @@ export function compileWriteProtection(entries, opts) {
|
|
|
291
311
|
}
|
|
292
312
|
try {
|
|
293
313
|
if (canonKey !== undefined) {
|
|
294
|
-
const
|
|
314
|
+
const canonicalRoots = configTails.length === 0 || opts?.agentConfigDir === undefined ? [] : (await canonicalDataRootKeys(env, [opts.agentConfigDir], ctx.signal)).map(agentConfigDirSegments);
|
|
315
|
+
const byTarget = judgeViews(canonKey, [...configRootSpelled, ...canonicalRoots]);
|
|
295
316
|
if (byTarget !== null) {
|
|
296
317
|
for (const rootKey of await canonicalDataRootKeys(env, dataRootPaths, ctx.signal)) {
|
|
297
318
|
const relative = relativeUnderRoot(canonKey, rootKey);
|
|
@@ -299,7 +320,7 @@ export function compileWriteProtection(entries, opts) {
|
|
|
299
320
|
continue;
|
|
300
321
|
if (relative === "")
|
|
301
322
|
return { kind: "clear" };
|
|
302
|
-
const remainder = judgeViews(relative);
|
|
323
|
+
const remainder = judgeViews(relative, []);
|
|
303
324
|
return remainder === null ? { kind: "clear" } : { kind: "hit", hit: remainder, via: "target" };
|
|
304
325
|
}
|
|
305
326
|
return { kind: "hit", hit: byTarget, via: "target" };
|
package/dist/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export { MCP_FAILURE_KINDS, MCP_DELIVERY_VERDICTS, MCP_LIVENESS_STATES, classify
|
|
|
63
63
|
export { MCP_INJECTION_DROP_REASONS, MCP_INJECTION_DROP_TEXT, mcpInjectionDroppedNotice, type McpInjectionDropReason, type McpInjectionDropFacts } from "./core/mcp-injection-drop.js";
|
|
64
64
|
export { askUnresolvableNotice, type AskUnresolvableFacts } from "./core/ask-unresolvable-notice.js";
|
|
65
65
|
export { ASK_UNRESOLVABLE_CAUSES } from "./core/ask-unresolvable-notice.js";
|
|
66
|
-
export { USER_INPUT_UNDRAINED_CAUSES, type UserInputUndrainedCause } from "./core/engine-notice.js";
|
|
66
|
+
export { USER_INPUT_UNDRAINED_CAUSES, type UserInputUndrainedCause, USER_INPUT_UNDRAINED_FAMILIES } from "./core/engine-notice.js";
|
|
67
67
|
export { STEER_REPLAY_FACETS, type SteerReplayFacet } from "./core/steer-replay.js";
|
|
68
68
|
export { TOOL_TURN_INCOMPLETE_CAUSES, type ToolTurnIncompleteCause } from "./internal/llm.js";
|
|
69
69
|
export { DURABLE_MANDATE_SOURCES } from "./core/tool-policy.js";
|
|
@@ -146,12 +146,13 @@ export { judgeRuleToolName, RULE_TOOL_NAME_VERDICTS, type RuleToolNameVerdict }
|
|
|
146
146
|
export { DEFAULT_SUBAGENT_TOOL_NAME } from "./agents/subagent.js";
|
|
147
147
|
export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, SystemInjectionQueue, type TaskNotificationPayload, type TaskNotificationStatus, type ExternalNotificationInput, type SystemInjection, type SystemInjectionPriority, type NotificationInjectionOutcome, // the injector's outcome words (`parked_durably` = the session's durable box took the frame)
|
|
148
148
|
NOTIFICATION_INJECTION_OUTCOMES, // …and their value half + guard, so a host wiring its own uplink validates a reported outcome without duplicating the vocabulary
|
|
149
|
-
isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, AGENT_MESSAGE_TAG, renderAgentMessageFrame, type SemaProvenance, HANDBACK_STATES, type HandbackState, COMPACTION_KINDS, type CompactionKind, handbackStateOf, terminalFrameFacets, } from "./core/task-notification.js";
|
|
149
|
+
isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, type UserInputLane, AGENT_MESSAGE_TAG, renderAgentMessageFrame, type SemaProvenance, HANDBACK_STATES, type HandbackState, COMPACTION_KINDS, type CompactionKind, handbackStateOf, terminalFrameFacets, } from "./core/task-notification.js";
|
|
150
150
|
export { TOOL_FAMILIES, TOOL_MOUNT_TAGS, TOOL_APPROVAL_CARDS, TOOL_PATH_ACCESSES, TOOL_PATH_BASES, TOOL_PATH_ABSENCES, TOOL_WIRE_NAME_MAX_CHARS, TOOL_CONTRACT_MAX_CHARS, TOOL_CARD_ID_MAX_CHARS, TOOL_KEY_MAX_CHARS, TOOL_KEYS_MAX, RENDER_HINT_MAX_CHARS, RENDER_HINT_ACTIVITY_MAX_CHARS, RENDER_HINT_MAX_LIST, type ToolFamily, type ToolMountTag, type ToolApprovalCard, type ToolPathAccess, type ToolPathBase, type ToolPathAbsence, type ToolPathTarget, type ToolCallPathTarget, type ToolRosterPathTarget, pathTargetSlotOnly, type ToolRuleFace, type ToolRenderHints, type ToolFaceDeclaration, type ToolCatalogEntry, } from "./core/tool-face.js";
|
|
151
151
|
export { describeToolCatalog, catalogEntriesNamed, catalogToolNames, catalogRuleFaceOf, pathTargetOf, pathTargetValue, protectivePathTargetOf, declaredPathTargetOf, BARE_REQUEST_CODE, isProtectedWrite, isDeclaredWrite, fileOpAccessOf, type ToolCallLike, pathConfinableWriteToolNames, pathTargetingToolNames, compactableToolNames, budgetExemptToolNames, handBandEffects, engineCardTypes, predictMountedToolNames, HANDS_BAND_TAGS, MOUNT_TAG_IN_HANDS_BAND, } from "./core/tool-registry.js";
|
|
152
152
|
export { ToolRosterEntry, ToolRoster, ToolRosterDelta, ToolRosterRenderHints, ROSTER_SOURCES, type RosterSource, type ToolIdentity, toolIdentityOf, mintCapabilityId, diffToolRoster, judgeParkedToolIdentity, ruleFacesFromRoster, toolCallFaceOf, rosterToolName, ruleNamesOf, inputKeysOf, ruleFaceOfInstance, rosterMemberBoundProblem, type RosterBoundMembers, type RosterBoundCode, ToolRosterDeltaSeat, } from "./core/tool-roster.js";
|
|
153
153
|
export { type ToolCallFace } from "./core/tool-policy.js";
|
|
154
|
-
export { effectivePathTargetOf, pathTargetBaseOf, type ToolPathBases, type PathTargetReading } from "./core/effective-path-target.js";
|
|
154
|
+
export { effectivePathTargetOf, pathTargetBaseOf, type ToolPathBases, type PathTargetReading, type CallTargetReading, type CallTargetView } from "./core/effective-path-target.js";
|
|
155
|
+
export { type BoundPathRule, type PathRuleSpec } from "./core/path-rule-binding.js";
|
|
155
156
|
export { pathFamilyOf, isAbsoluteForFamily, pathIdentityOf, win32NamespaceScreen, WIN32_NAMESPACE_REFUSALS, type PathFamily, type PathIdentity, type PathIdentityReading, type Win32NamespaceRefusal } from "./tools/fs/safety.js";
|
|
156
157
|
export { judgeShellRead, type ShellReadJudgeInput, type ShellReadJudgment, type ShellReadVerdict, type ShellReadStationSeat, type ShellReadAdmission, } from "./tools/fs/shell-read-check.js";
|
|
157
158
|
export { SHELL_READ_FINDINGS, SHELL_READ_SEATS, SHELL_READ_DECISION, SHELL_READ_FINDING_RANK, type ShellReadFinding, type ShellReadSeat, type ShellReadDisposition, type ShellReadBoundary, type ReadEstablishment, type EstablishedRead, type ReadFinding, } from "./tools/fs/shell-read-judge.js";
|
|
@@ -193,7 +194,7 @@ export { createAllowDenyPolicy, createApprovalPolicy,
|
|
|
193
194
|
* members that seat has no lane for (`"unavailable"`, a routing answer; `updatedInput`, an operator edit a
|
|
194
195
|
* policy verdict cannot get re-adjudicated). Exported so a host can NAME it instead of deriving it through
|
|
195
196
|
* `Parameters<typeof createApprovalPolicy>[0]["approve"]`. */
|
|
196
|
-
type ApprovalSeatOutcome, COARSE_SHELL_TOOLS, createCoarseCommandNamePolicy, createTranscriptIntegrityPolicy, createUnverifiableDeletePolicy, findUnverifiableRecursiveDelete, combinePolicies, abortedSeatDeny, receiveHookResult, isEngineRefusal, wrapToolPolicy, decisionText, resolveAsk, toolPolicyNameSets,
|
|
197
|
+
type ApprovalSeatOutcome, COARSE_SHELL_TOOLS, createCoarseCommandNamePolicy, createTranscriptIntegrityPolicy, createUnverifiableDeletePolicy, findUnverifiableRecursiveDelete, combinePolicies, abortedSeatDeny, receiveHookResult, isEngineRefusal, wrapToolPolicy, decisionText, resolveAsk, toolPolicyNameSets, toolPolicyPathRules, type ToolPolicyNameSets, type NamedToolPolicy, type ToolPolicyProjection, type ToolPolicyProjectionComponent, type ConstraintChainEntry, checkToolPolicyProjection, constraintChainEntryOf, constraintChainDigest, type ToolPolicy, type ToolCallRequest, type PermissionResult, type DecisionReason, screenApproverAttribution, APPROVER_ATTRIBUTION_MAX_CHARS, type OnAsk, type AskOutcome, type ResolvedAsk, type AskRequest, type AskDelegationProvenance, type AskRuleEvidence, type AskEvidenceAbsence, ASK_EVIDENCE_ABSENCE_VALUES, } from "./core/tool-policy.js";
|
|
197
198
|
export { type ReadRootGrantScreen } from "./core/read-root-grant-screen.js";
|
|
198
199
|
export { type AskOrigin, ASK_ORIGINS, isAskOrigin, ORIGIN_IMPLIES_REAL_APPROVAL, PERSISTED_RULE_MANDATES, type PersistedRuleMandate, isPersistedRuleMandate, screenAskClassMembers } from "./core/ask-origin.js";
|
|
199
200
|
export { PERMISSION_MODES, type PermissionMode, isPermissionMode, PERMISSION_MODE_RANK, clampPermissionMode, ASK_CLASSES, type AskClass, isAskClass, MODE_ARBITRATION, type ModeArbitrationRow, RELEASABLE_ASK_CLASSES, MODE_RELEASE_REASONS, type ModeReleaseReason, isModeReleaseReason, RRA_EXPLAINERS, classifyAsk, foldArbitrationRow, type AskClassification, type AskClassFacts, type ToolMarkSource, arbitrateByMode, type Arbitration, fileCommandOptionsSentence } from "./core/ask-origin.js";
|
|
@@ -202,12 +203,14 @@ export type { PermissionSeatInputs, PermissionSeatReading } from "./core/mode-po
|
|
|
202
203
|
export type { SkillGateSeats, SkillGrantHit, SkillGrantLane, SkillGrantOrigin, SkillGrantRecord } from "./core/skill-grant.js";
|
|
203
204
|
export { SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
|
|
204
205
|
export type { BoundSkillGrants } from "./core/skill-grant-binding.js";
|
|
205
|
-
export { ALLOW_ENTRY_INERT_REASONS, compileAllowEntry, compileAllowList, type AllowEntryInertReason, type CompiledAllowEntry, type AllowEntryGateSeats, type AllowEntryLane, type AllowEntryHit } from "./core/allow-entry.js";
|
|
206
|
+
export { ALLOW_ENTRY_INERT_REASONS, compileAllowEntry, compileAllowList, renderListEntry, type AllowEntryInertReason, type CompiledAllowEntry, type AllowEntryGateSeats, type AllowEntryLane, type AllowEntryHit } from "./core/allow-entry.js";
|
|
206
207
|
export { ALLOW_RULE_MEMBERS, type AllowRuleMember, type AllowRuleShadow } from "./core/allow-rule-shadow.js";
|
|
207
208
|
export { mintNamespacePrefix } from "./core/protocol-naming.js";
|
|
208
209
|
export { readDenyClassifierRules, renderClassifierDenyRules, type DerivedDenyRule } from "./core/auto-mode-prompt.js";
|
|
209
210
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource, type AutoModeDenySource } from "./core/runtime-caps.js";
|
|
210
|
-
export { SETTLEMENT_KINDS, type SettlementKind, isSettlementKind, type Settlement, SETTLEMENT_PARTIES, type SettlementParty, isSettlementParty, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, type DeniedBy, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, type ClassifierDenyCause, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, type GateDisposition, type GateOutcome, type ModeRelease, type ModeRefusal, screenGateOutcome } from "./core/gate-outcome.js";
|
|
211
|
+
export { SETTLEMENT_KINDS, type SettlementKind, isSettlementKind, type Settlement, SETTLEMENT_PARTIES, type SettlementParty, isSettlementParty, HOST_DECIDERS, type HostDecider, isHostDecider, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, type DeniedBy, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, type ClassifierDenyCause, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, type GateDisposition, type GateOutcome, type ModeRelease, type ModeRefusal, screenGateOutcome } from "./core/gate-outcome.js";
|
|
212
|
+
export { ENGINE_BUILTIN_TOOL_NAMES, isEngineBuiltinToolName } from "./core/tool-catalog-entries.js";
|
|
213
|
+
export { policyCannotAnswer, type HeldQuestion } from "./core/real-approval.js";
|
|
211
214
|
export { type AskCarry } from "./core/hooks.js";
|
|
212
215
|
export { SWAPPABLE_DEP_SEATS, SWAP_SEAT_NOTICE, isSwappableDepSeat, screenSwappableDeps, type SwappableDepSeat, type SwappableDeps } from "./core/swappable-deps.js";
|
|
213
216
|
export { parseAutoModeResponse, createAutoModeDecider, AUTO_MODE_UNAVAILABLE_CAUSES, isAutoModeUnavailableCause, classifierUnavailableDenyMessage, classifierParseFailureDenyMessage, AUTO_MODE_PARSE_FAILURES, isAutoModeParseFailure, type AutoModeParseFailure, type AutoModeUnavailableCause, AUTO_MODE_CLASSIFIER_FALLBACKS, isAutoModeClassifierFallback, AUTO_MODE_FALLBACK_CAUSES, isAutoModeFallbackCause, type AutoModeClassifierFallback, type AutoModeFallbackCause, type AutoModeClassifierRound, type AutoModeLadderRung, type AutoModeVerdict, type AutoModeDecider, type AutoModeDeciderOptions, type AutoModeClassified, type AutoModeClassifyFn, type AutoModeClassifyInput, createAutoModeDenialTracker, denialLimitFallbackMessage, denialLimitSentence, unarmedWindow, type AutoModeDenialTracker, type AutoModeDenialLimitOptions, type DenialLimitCounts, type DenialLimitFallbackFace, type UnarmedDenialLimitFallback, type DenialLimitFallback, type DenialLimitVerdict, } from "./core/auto-mode.js";
|
|
@@ -253,6 +256,7 @@ export { formatHookFeedback, runToolGate, createHookEnvCapabilities, createPreTo
|
|
|
253
256
|
export { HOOK_FAMILIES, HOOKS_INVALID_CODE, type HookFamily, type WiringManifestHookEntry } from "./core/hook-seats.js";
|
|
254
257
|
export { InMemoryMemoryStore, composeMemoryBlock, composeLayeredMemoryBlock, normalizeMemorySpec, type NormalizedMemorySpec, type MemorySpecInput, supportsConsolidation, supportsPeriodicConsolidation, firstSentence, expandLexicalTerms, lexicalSearchMatch, type Embedder, classifyPromotable, enforcePromotableWriteGate, guardedMemoryStore, MemoryGateError, MemoryProjectionError, detectSecret, enforceSecretWriteGate, enforceStructuredNoteSecretGate, type UtilityGate, type MemoryStore, type MemoryVectorMode, type ScoredMemory, type MemoryNoteHeader, type MemoryNoteRecord, type MemoryNoteType, type StructuredNoteInput, MEMORY_PROJECT_KEY_ABSENT_REASONS, type MemoryProjectKeyAbsentReason, type MemoryProjectKey, } from "./core/memory.js";
|
|
255
258
|
export { MemoryEngine, FileMemoryEngineBackend, memoryBackendContract, assertMemoryBackendSearchEquivalence, type MemoryBackendContractHooks, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, type OriginClearanceRow, type OriginClearanceEvent, type OriginClearanceShadow, committedDistilledOf, distilledEquals, type MemoryEntryDistilled, type MemoryEntryDistilledInput, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote, readIntentCredentials, supersessionFuseCeiling, deriveShadowedSet, memoryConsolidationRecommendedNotice, memoryConsolidationCommittedNotice, memoryConsolidationConflictNotice, memoryConsolidationIncompleteNotice, memoryConsolidationRefusedNotice, memoryConsolidationWithheldNotice, type ConsolidationGateRead, type ConsolidationGateRow, type ConsolidationIntent, type ConsolidationIntentCredentialRow, type ConsolidationLeaseSeat, type ConsolidationProductProposal, type ConsolidationProposal, type MemoryConsolidationOptions, type ConsolidationCommitReceipt, type ConsolidationReconcileReport, type ConsolidationResolveReceipt, type ConsolidationPlanSummary, type ConsolidationPlanFoldEvidence, type SessionMemoryStatus, DISTILLER_DEFAULT_MAX_INPUTS_PER_PRODUCT, LLM_DISTILLER_CONTRACT, LLM_DISTILLER_CONTRACT_DL2, LLM_DISTILLER_CONTRACT_DL3, LLM_DISTILLER_CONTRACTS, MEMORY_DISTILLER_CONTRACT_V1, contractGroupingDiff, driveConsolidationToFixpoint, isAliasModelId, llmPlanDistiller, mintExposurePartitionedPlan, mintLlmConsolidationPlan, MEMORY_DISTILLER_PURITY_CONTRACT_V1, detectCleanArmVerbatimLeak, type CleanArmLeakFinding, type CleanArmLeakVerdict, type MemoryDistillerPurityContract, openAiCompatChatSeat, parseJsonAnswer, planParseRepairs, sanitizeLlmGroups, scheduleUnderFuse, type ConsolidationDistillFn, type ConsolidationDriveCycleRow, type ConsolidationDriveEngine, type ConsolidationDriveResult, type ConsolidationFoldState, type DistillerCandidate, type DistillerChatAnswer, type DistillerChatFn, type DistillerChatRequest, type FuseSchedule, type LlmConsolidationPlan, type LlmConsolidationPlanArm, type LlmConsolidationPlanProduct, type LlmDistillerContract, type MintLlmConsolidationPlanResult, type PlanParseRepairs, type SanitizedLlmGroups, CONSOLIDATION_DRIVER_PLANS_DIR, CONSOLIDATION_DRIVER_RUNS_FILE, CONSOLIDATION_RUN_STOP_REASONS, archiveDistillerPlan, readConsolidationDriverRun, runMemoryConsolidationDriver, type ConsolidationDriverEngine, type ConsolidationDriverRunRow, type ConsolidationRunReceipt, type ConsolidationRunStopReason, type RunMemoryConsolidationOptions, isInstructionEntry, type MemoryEntryOrigin, type MemoryOriginCause, MEMORY_INSTRUCTION_TEMPLATE, MEMORY_RECALL_DISCIPLINE, MEMORY_PREFERENCE_DISCIPLINE, MEMORY_READONLY_NOTICE, MEMORY_CAPTURE_OPTOUT_NOTICE, memoryCaptureOptedOutNotice, memoryCaptureOptOutUnpersistedNotice, SESSION_CAPTURE_OPTOUT_DIR, markSessionCaptureOptOut, readSessionCaptureOptOut, listSessionCaptureOptOut, fileSessionCaptureRecordStore, type SessionCaptureOptOutRecord, type SessionCaptureOptOutMarkOutcome, type SessionCaptureRecordStore, readV2HeaderHints, type V2HeaderHints, LINEAGE_FILE, CHALLENGES_FILE, CHALLENGED_HISTORY_FILE, CHALLENGE_LEDGER_MAX_EVENTS, rebuildStrictControlPlaneLedger, type ControlPlaneRebuildReceipt, type StrictControlPlaneLedger, type ChallengeAssignment, type ChallengeEvent, type ChallengedHistoryRow, type LineagePendingTxn, type LineagePromotion, MEMORY_INDEX_FILENAME, MEMORY_INDEX_MAX_LINES, MEMORY_INDEX_MAX_BYTES, MEMORY_SEARCH_TOOL_NAME, MEMORY_GET_TOOL_NAME, MEMORY_INDEX_TOOL_NAME, MEMORY_ENGINE_TOOL_NAMES, type MemorySearchDetails, type MemorySearchHit, type CleanMemorySearchHit, type ExposedMemorySearchHit, MEMORY_EXPOSURE_BANNER, MEMORY_EXPOSURE_HANDLE_TAG, memoryExposureIndexRow, type MemoryGetDetails, type MemoryIndexDetails, type MemoryIndexRow, type CleanMemoryIndexRow, type ExposedMemoryIndexRow, STUB_ARCHIVED_LINE, DEFAULT_MAX_MEMORY_FILES, DEFAULT_MAX_ENTRY_DEPTH, DEFAULT_HARVEST_DEADLINE_MS, DEFAULT_HARVEST_FILE_BUDGET, MASS_DELETION_FUSE_RATIO, scanMemoryWrite, scanMemoryFileName, scanRemediation, MEMORY_FILENAME_SEGMENT_RE, renderAnnouncements, enqueueMemoryAnnouncement, drainMemoryAnnouncements, peekMemoryAnnouncements, bumpScanFuse, scanFuseCount, clearScanFuse, ANNOUNCEMENTS_FILE, MEMORY_ANNOUNCEMENTS_MAX, SCAN_FUSE_FILE, SCAN_FUSE_THRESHOLD, type MemoryAnnouncement, type ScanFinding, type MemoryEngineOptions, type MemoryInjection, type EntryProvenanceAccount, type TransferEvidence, type CommittedBinding, type CommittedEntrySnapshot, type CommittedScopeSnapshots, type EntryCustodyReport, erasureSelectHash, type EraseMemoryEntriesInput, type ErasureSelect, type ErasedBinding, type MemoryErasureAttestation, computeMemoryBundleHash, type MemoryExportBundle, type MemoryImportReport, type MemoryExportSnapshot, type MemoryBundleImportPlan, type BundleChallengeRow, type BundleLineageRow, type BundlePollutedSession, type MemoryBackend, type MemoryEntry, type MemoryEntryFrontmatter, type MemoryEntryHeader, type MemoryScopeEnumeration, type ScoredMemoryEntry, type NotePatch, type PatchReport, type MaterializedFile, type MemorySessionHandle, type HarvestReport, type HarvestRejection, type HarvestRejectionCode, type ParsedEntryFile, type ScannedEntryFile, SCOPE_SEGMENT_MAX_ENCODED, PROJECT_MARKER_PATH, encodeScopeSegment, decodeScopeSegment, parseScopeKey, formatUserScope, formatOrgScope, formatProjScope, formatUserProjScope, isPersonalScope, assertScopeContractPlacement, formatProjectMarker, parseProjectMarker, resolveProjectId, PROJECT_ID_REGEX, type ParsedScopeKey, migrateScope, type MigrateScopeReport, materializeEntriesToFiles, harvestFilesToPatches, projectionsToWriteBack, screenInboundEntries, REMOTE_HARVEST_PER_FILE_BYTES, REMOTE_MASS_DELETION_FUSE_RATIO, type RemoteMemoryFile, type RemoteMemoryBaseline, type RemoteMaterialization, type RemoteHarvestResult, type InboundEntryFinding, deriveProjectMemoryDir, deriveProjectControlDir, recordProjectIdHint, lookupProjectIdHint, PROJECT_ID_HINTS_FILE, reconcileMemoryEntries, nextSyncBaseline, mergeRecallHits, type MemorySyncCursor, type MemorySyncConflict, type MemorySyncPlan, type RecallSource, syncMemoryScope, type MemorySyncTransport, type MemorySyncRequestBody, type MemorySyncResponseBody, type MemorySyncClientConflict, type SyncMemoryScopeOptions, type MemorySyncClientResult, } from "./core/memory-engine/index.js";
|
|
259
|
+
export { STORE_FORM_REFUSAL_CODES, TARGET_OUTSIDE_STORE, SCOPE_HOME_NOT_DIRECTORY, SCOPE_HOME_FORMS, type StoreFormRefusalCode, type StoreFormRefusalDetail, type StoreFormRefusal, type ScopeHomeForm } from "./core/memory-engine/layout.js";
|
|
256
260
|
export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, type SharedMemoryStoreProvider, type SharedMemoryStoreReader, type SharedMemoryPagedList, type SharedMemoryStoreInfo, type SharedMemoryDocumentEntry, type SharedMemorySnapshot, type SharedMemoryRequestContext, type MemoryListDetails, type MemoryReadDetails, } from "./core/shared-memory/types.js";
|
|
257
261
|
export { sharedMemoryStoreContract, type SharedMemoryFixture, type SharedMemoryStoreContractHooks, } from "./core/shared-memory/contract.js";
|
|
258
262
|
export { termSet, jaccardDistance, cosineDistance } from "./core/memory-vector.js";
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ export { MCP_FAILURE_KINDS, MCP_DELIVERY_VERDICTS, MCP_LIVENESS_STATES, classify
|
|
|
49
49
|
export { MCP_INJECTION_DROP_REASONS, MCP_INJECTION_DROP_TEXT, mcpInjectionDroppedNotice } from "./core/mcp-injection-drop.js";
|
|
50
50
|
export { askUnresolvableNotice } from "./core/ask-unresolvable-notice.js";
|
|
51
51
|
export { ASK_UNRESOLVABLE_CAUSES } from "./core/ask-unresolvable-notice.js";
|
|
52
|
-
export { USER_INPUT_UNDRAINED_CAUSES } from "./core/engine-notice.js";
|
|
52
|
+
export { USER_INPUT_UNDRAINED_CAUSES, USER_INPUT_UNDRAINED_FAMILIES } from "./core/engine-notice.js";
|
|
53
53
|
export { STEER_REPLAY_FACETS } from "./core/steer-replay.js";
|
|
54
54
|
export { TOOL_TURN_INCOMPLETE_CAUSES } from "./internal/llm.js";
|
|
55
55
|
export { DURABLE_MANDATE_SOURCES } from "./core/tool-policy.js";
|
|
@@ -118,12 +118,13 @@ export { createFsWriteGatePolicy, WRITE_EXEMPT_DIR_COVERS_ROOT_CODE } from "./co
|
|
|
118
118
|
export { RETIRED_TOOL_NAMES } from "./core/tool-name-aliases.js";
|
|
119
119
|
export { judgeRuleToolName, RULE_TOOL_NAME_VERDICTS } from "./core/tool-name-aliases.js";
|
|
120
120
|
export { DEFAULT_SUBAGENT_TOOL_NAME } from "./agents/subagent.js";
|
|
121
|
-
export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, SystemInjectionQueue, NOTIFICATION_INJECTION_OUTCOMES, isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, AGENT_MESSAGE_TAG, renderAgentMessageFrame, HANDBACK_STATES, COMPACTION_KINDS, handbackStateOf, terminalFrameFacets, } from "./core/task-notification.js";
|
|
121
|
+
export { renderTaskNotificationXml, RESUPPLIED_FRAME_PREAMBLE, taskNotificationDedupKey, isDelegatedAgentTerminal, isTerminalTaskNotification, SystemInjectionQueue, NOTIFICATION_INJECTION_OUTCOMES, isNotificationInjectionOutcome, SYSTEM_INJECTION_PRIORITIES, isSystemInjectionPriority, steerPriorityOf, injectionLaneOf, AGENT_MESSAGE_TAG, renderAgentMessageFrame, HANDBACK_STATES, COMPACTION_KINDS, handbackStateOf, terminalFrameFacets, } from "./core/task-notification.js";
|
|
122
122
|
export { TOOL_FAMILIES, TOOL_MOUNT_TAGS, TOOL_APPROVAL_CARDS, TOOL_PATH_ACCESSES, TOOL_PATH_BASES, TOOL_PATH_ABSENCES, TOOL_WIRE_NAME_MAX_CHARS, TOOL_CONTRACT_MAX_CHARS, TOOL_CARD_ID_MAX_CHARS, TOOL_KEY_MAX_CHARS, TOOL_KEYS_MAX, RENDER_HINT_MAX_CHARS, RENDER_HINT_ACTIVITY_MAX_CHARS, RENDER_HINT_MAX_LIST, pathTargetSlotOnly, } from "./core/tool-face.js";
|
|
123
123
|
export { describeToolCatalog, catalogEntriesNamed, catalogToolNames, catalogRuleFaceOf, pathTargetOf, pathTargetValue, protectivePathTargetOf, declaredPathTargetOf, BARE_REQUEST_CODE, isProtectedWrite, isDeclaredWrite, fileOpAccessOf, pathConfinableWriteToolNames, pathTargetingToolNames, compactableToolNames, budgetExemptToolNames, handBandEffects, engineCardTypes, predictMountedToolNames, HANDS_BAND_TAGS, MOUNT_TAG_IN_HANDS_BAND, } from "./core/tool-registry.js";
|
|
124
124
|
export { ToolRosterEntry, ToolRoster, ToolRosterDelta, ToolRosterRenderHints, ROSTER_SOURCES, toolIdentityOf, mintCapabilityId, diffToolRoster, judgeParkedToolIdentity, ruleFacesFromRoster, toolCallFaceOf, rosterToolName, ruleNamesOf, inputKeysOf, ruleFaceOfInstance, rosterMemberBoundProblem, ToolRosterDeltaSeat, } from "./core/tool-roster.js";
|
|
125
125
|
export {} from "./core/tool-policy.js";
|
|
126
126
|
export { effectivePathTargetOf, pathTargetBaseOf } from "./core/effective-path-target.js";
|
|
127
|
+
export {} from "./core/path-rule-binding.js";
|
|
127
128
|
export { pathFamilyOf, isAbsoluteForFamily, pathIdentityOf, win32NamespaceScreen, WIN32_NAMESPACE_REFUSALS } from "./tools/fs/safety.js";
|
|
128
129
|
export { judgeShellRead, } from "./tools/fs/shell-read-check.js";
|
|
129
130
|
export { SHELL_READ_FINDINGS, SHELL_READ_SEATS, SHELL_READ_DECISION, SHELL_READ_FINDING_RANK, } from "./tools/fs/shell-read-judge.js";
|
|
@@ -158,18 +159,20 @@ export { hasScheduler, isValidCronExpr, SchedulerError } from "./core/scheduler.
|
|
|
158
159
|
export { createSchedulerTools, SCHEDULE_WAKEUP_TOOL_NAME, AUTONOMOUS_LOOP_SENTINEL, AUTONOMOUS_LOOP_DYNAMIC_SENTINEL, } from "./tools/scheduler-tools.js";
|
|
159
160
|
export { resolveAutonomousLoopPrompt, AUTONOMOUS_LOOP_PREAMBLE, AUTONOMOUS_LOOP_PREAMBLE_PERSISTENT, } from "./tools/loop-tick.js";
|
|
160
161
|
export { tightenTaskSpec, TaskSpecTightenError } from "./core/tighten-task-spec.js";
|
|
161
|
-
export { createAllowDenyPolicy, createApprovalPolicy, COARSE_SHELL_TOOLS, createCoarseCommandNamePolicy, createTranscriptIntegrityPolicy, createUnverifiableDeletePolicy, findUnverifiableRecursiveDelete, combinePolicies, abortedSeatDeny, receiveHookResult, isEngineRefusal, wrapToolPolicy, decisionText, resolveAsk, toolPolicyNameSets,
|
|
162
|
+
export { createAllowDenyPolicy, createApprovalPolicy, COARSE_SHELL_TOOLS, createCoarseCommandNamePolicy, createTranscriptIntegrityPolicy, createUnverifiableDeletePolicy, findUnverifiableRecursiveDelete, combinePolicies, abortedSeatDeny, receiveHookResult, isEngineRefusal, wrapToolPolicy, decisionText, resolveAsk, toolPolicyNameSets, toolPolicyPathRules, checkToolPolicyProjection, constraintChainEntryOf, constraintChainDigest, screenApproverAttribution, APPROVER_ATTRIBUTION_MAX_CHARS, ASK_EVIDENCE_ABSENCE_VALUES, } from "./core/tool-policy.js";
|
|
162
163
|
export {} from "./core/read-root-grant-screen.js";
|
|
163
164
|
export { ASK_ORIGINS, isAskOrigin, ORIGIN_IMPLIES_REAL_APPROVAL, PERSISTED_RULE_MANDATES, isPersistedRuleMandate, screenAskClassMembers } from "./core/ask-origin.js";
|
|
164
165
|
export { PERMISSION_MODES, isPermissionMode, PERMISSION_MODE_RANK, clampPermissionMode, ASK_CLASSES, isAskClass, MODE_ARBITRATION, RELEASABLE_ASK_CLASSES, MODE_RELEASE_REASONS, isModeReleaseReason, RRA_EXPLAINERS, classifyAsk, foldArbitrationRow, arbitrateByMode, fileCommandOptionsSentence } from "./core/ask-origin.js";
|
|
165
166
|
export { modePolicyOf, PERMISSION_MODE_FOLD_REASONS, ACCEPT_EDITS_FILE_COMMANDS, modeAcceptsFileCommand } from "./core/mode-policy.js";
|
|
166
167
|
export { SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
|
|
167
|
-
export { ALLOW_ENTRY_INERT_REASONS, compileAllowEntry, compileAllowList } from "./core/allow-entry.js";
|
|
168
|
+
export { ALLOW_ENTRY_INERT_REASONS, compileAllowEntry, compileAllowList, renderListEntry } from "./core/allow-entry.js";
|
|
168
169
|
export { ALLOW_RULE_MEMBERS } from "./core/allow-rule-shadow.js";
|
|
169
170
|
export { mintNamespacePrefix } from "./core/protocol-naming.js";
|
|
170
171
|
export { readDenyClassifierRules, renderClassifierDenyRules } from "./core/auto-mode-prompt.js";
|
|
171
172
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource } from "./core/runtime-caps.js";
|
|
172
|
-
export { SETTLEMENT_KINDS, isSettlementKind, SETTLEMENT_PARTIES, isSettlementParty, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, screenGateOutcome } from "./core/gate-outcome.js";
|
|
173
|
+
export { SETTLEMENT_KINDS, isSettlementKind, SETTLEMENT_PARTIES, isSettlementParty, HOST_DECIDERS, isHostDecider, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, screenGateOutcome } from "./core/gate-outcome.js";
|
|
174
|
+
export { ENGINE_BUILTIN_TOOL_NAMES, isEngineBuiltinToolName } from "./core/tool-catalog-entries.js";
|
|
175
|
+
export { policyCannotAnswer } from "./core/real-approval.js";
|
|
173
176
|
export {} from "./core/hooks.js";
|
|
174
177
|
export { SWAPPABLE_DEP_SEATS, SWAP_SEAT_NOTICE, isSwappableDepSeat, screenSwappableDeps } from "./core/swappable-deps.js";
|
|
175
178
|
export { parseAutoModeResponse, createAutoModeDecider, AUTO_MODE_UNAVAILABLE_CAUSES, isAutoModeUnavailableCause, classifierUnavailableDenyMessage, classifierParseFailureDenyMessage, AUTO_MODE_PARSE_FAILURES, isAutoModeParseFailure, AUTO_MODE_CLASSIFIER_FALLBACKS, isAutoModeClassifierFallback, AUTO_MODE_FALLBACK_CAUSES, isAutoModeFallbackCause, createAutoModeDenialTracker, denialLimitFallbackMessage, denialLimitSentence, unarmedWindow, } from "./core/auto-mode.js";
|
|
@@ -199,6 +202,7 @@ export { formatHookFeedback, runToolGate, createHookEnvCapabilities, createPreTo
|
|
|
199
202
|
export { HOOK_FAMILIES, HOOKS_INVALID_CODE } from "./core/hook-seats.js";
|
|
200
203
|
export { InMemoryMemoryStore, composeMemoryBlock, composeLayeredMemoryBlock, normalizeMemorySpec, supportsConsolidation, supportsPeriodicConsolidation, firstSentence, expandLexicalTerms, lexicalSearchMatch, classifyPromotable, enforcePromotableWriteGate, guardedMemoryStore, MemoryGateError, MemoryProjectionError, detectSecret, enforceSecretWriteGate, enforceStructuredNoteSecretGate, MEMORY_PROJECT_KEY_ABSENT_REASONS, } from "./core/memory.js";
|
|
201
204
|
export { MemoryEngine, FileMemoryEngineBackend, memoryBackendContract, assertMemoryBackendSearchEquivalence, buildMemoryInstruction, writableRootOf, truncateIndex, scanEntryFiles, deriveRepoKey, deriveRepoMemoryDir, deriveControlPlaneDir, deriveRepoControlPlaneDir, resolveMemoryEngineRoot, scopeDirName, ControlPlaneCorruptError, parseEntryFile, serializeEntryFile, computeEntryRev, entryFromFile, MEMORY_ORIGIN_CAUSES, committedOriginOf, originEquals, consolidationExposedFrontmatter, ambiguousOriginRepresentation, committedDistilledOf, distilledEquals, CONSOLIDATION_DEFAULTS, ConsolidationRefusedError, MEMORY_SEARCH_SUPERSEDED_TAG, consolidationTypeEligible, deriveSupersededSet, memorySupersededNote, readIntentCredentials, supersessionFuseCeiling, deriveShadowedSet, memoryConsolidationRecommendedNotice, memoryConsolidationCommittedNotice, memoryConsolidationConflictNotice, memoryConsolidationIncompleteNotice, memoryConsolidationRefusedNotice, memoryConsolidationWithheldNotice, DISTILLER_DEFAULT_MAX_INPUTS_PER_PRODUCT, LLM_DISTILLER_CONTRACT, LLM_DISTILLER_CONTRACT_DL2, LLM_DISTILLER_CONTRACT_DL3, LLM_DISTILLER_CONTRACTS, MEMORY_DISTILLER_CONTRACT_V1, contractGroupingDiff, driveConsolidationToFixpoint, isAliasModelId, llmPlanDistiller, mintExposurePartitionedPlan, mintLlmConsolidationPlan, MEMORY_DISTILLER_PURITY_CONTRACT_V1, detectCleanArmVerbatimLeak, openAiCompatChatSeat, parseJsonAnswer, planParseRepairs, sanitizeLlmGroups, scheduleUnderFuse, CONSOLIDATION_DRIVER_PLANS_DIR, CONSOLIDATION_DRIVER_RUNS_FILE, CONSOLIDATION_RUN_STOP_REASONS, archiveDistillerPlan, readConsolidationDriverRun, runMemoryConsolidationDriver, isInstructionEntry, MEMORY_INSTRUCTION_TEMPLATE, MEMORY_RECALL_DISCIPLINE, MEMORY_PREFERENCE_DISCIPLINE, MEMORY_READONLY_NOTICE, MEMORY_CAPTURE_OPTOUT_NOTICE, memoryCaptureOptedOutNotice, memoryCaptureOptOutUnpersistedNotice, SESSION_CAPTURE_OPTOUT_DIR, markSessionCaptureOptOut, readSessionCaptureOptOut, listSessionCaptureOptOut, fileSessionCaptureRecordStore, readV2HeaderHints, LINEAGE_FILE, CHALLENGES_FILE, CHALLENGED_HISTORY_FILE, CHALLENGE_LEDGER_MAX_EVENTS, rebuildStrictControlPlaneLedger, MEMORY_INDEX_FILENAME, MEMORY_INDEX_MAX_LINES, MEMORY_INDEX_MAX_BYTES, MEMORY_SEARCH_TOOL_NAME, MEMORY_GET_TOOL_NAME, MEMORY_INDEX_TOOL_NAME, MEMORY_ENGINE_TOOL_NAMES, MEMORY_EXPOSURE_BANNER, MEMORY_EXPOSURE_HANDLE_TAG, memoryExposureIndexRow, STUB_ARCHIVED_LINE, DEFAULT_MAX_MEMORY_FILES, DEFAULT_MAX_ENTRY_DEPTH, DEFAULT_HARVEST_DEADLINE_MS, DEFAULT_HARVEST_FILE_BUDGET, MASS_DELETION_FUSE_RATIO, scanMemoryWrite, scanMemoryFileName, scanRemediation, MEMORY_FILENAME_SEGMENT_RE, renderAnnouncements, enqueueMemoryAnnouncement, drainMemoryAnnouncements, peekMemoryAnnouncements, bumpScanFuse, scanFuseCount, clearScanFuse, ANNOUNCEMENTS_FILE, MEMORY_ANNOUNCEMENTS_MAX, SCAN_FUSE_FILE, SCAN_FUSE_THRESHOLD, erasureSelectHash, computeMemoryBundleHash, SCOPE_SEGMENT_MAX_ENCODED, PROJECT_MARKER_PATH, encodeScopeSegment, decodeScopeSegment, parseScopeKey, formatUserScope, formatOrgScope, formatProjScope, formatUserProjScope, isPersonalScope, assertScopeContractPlacement, formatProjectMarker, parseProjectMarker, resolveProjectId, PROJECT_ID_REGEX, migrateScope, materializeEntriesToFiles, harvestFilesToPatches, projectionsToWriteBack, screenInboundEntries, REMOTE_HARVEST_PER_FILE_BYTES, REMOTE_MASS_DELETION_FUSE_RATIO, deriveProjectMemoryDir, deriveProjectControlDir, recordProjectIdHint, lookupProjectIdHint, PROJECT_ID_HINTS_FILE, reconcileMemoryEntries, nextSyncBaseline, mergeRecallHits, syncMemoryScope, } from "./core/memory-engine/index.js";
|
|
205
|
+
export { STORE_FORM_REFUSAL_CODES, TARGET_OUTSIDE_STORE, SCOPE_HOME_NOT_DIRECTORY, SCOPE_HOME_FORMS } from "./core/memory-engine/layout.js";
|
|
202
206
|
export { SHARED_MEMORY_READ_CAP_BYTES, SHARED_MEMORY_LIST_PAGE_SIZE, SharedMemoryStoreError, } from "./core/shared-memory/types.js";
|
|
203
207
|
export { sharedMemoryStoreContract, } from "./core/shared-memory/contract.js";
|
|
204
208
|
export { termSet, jaccardDistance, cosineDistance } from "./core/memory-vector.js";
|