@dsmm/dsmm 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -66
- package/agent-presets/dsmm-builder/agent.cordis.yml +10 -2015
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +24 -343
- package/agent-presets/dsmm-code-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-coding/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-complex/agent.cordis.yml +23 -1009
- package/agent-presets/dsmm-creative/agent.cordis.yml +25 -442
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +29 -1013
- package/agent-presets/dsmm-deep/agent.cordis.yml +24 -1008
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-documenting/agent.cordis.yml +26 -439
- package/agent-presets/dsmm-frontend/agent.cordis.yml +21 -440
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +22 -441
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +19 -438
- package/agent-presets/dsmm-oracle/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +25 -340
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +29 -2025
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +24 -341
- package/agent-presets/dsmm-planner/agent.cordis.yml +14 -344
- package/agent-presets/dsmm-quick/agent.cordis.yml +19 -6
- package/agent-presets/dsmm-research/agent.cordis.yml +23 -8
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +25 -340
- package/docs/agent-presets.md +36 -52
- package/docs/compatibility.md +50 -108
- package/docs/deferred-native-approval-risk.md +19 -0
- package/docs/design.md +2 -2
- package/docs/lsp.md +11 -21
- package/docs/migration-from-ocmm.md +2 -2
- package/docs/model-routing.md +84 -59
- package/docs/native-permissions.md +35 -0
- package/docs/profiles.md +40 -87
- package/docs/releasing.md +83 -2
- package/docs/roadmap.md +71 -17
- package/docs/settings-status.md +34 -169
- package/docs/skill-sync.md +52 -15
- package/lib/child-admission-contract.d.ts +37 -0
- package/lib/child-admission-contract.js +2 -0
- package/lib/child-admission.d.ts +42 -0
- package/lib/child-admission.js +162 -0
- package/lib/child-capture.d.ts +81 -0
- package/lib/child-capture.js +203 -0
- package/lib/child-evidence.d.ts +17 -0
- package/lib/child-evidence.js +43 -0
- package/lib/client/ChildrenPanel.d.ts +43 -0
- package/lib/client/ChildrenPanel.js +82 -0
- package/lib/client/DeploymentPage.js +15 -8
- package/lib/client/EditableChoice.d.ts +17 -0
- package/lib/client/EditableChoice.js +49 -0
- package/lib/client/PermissionsPanel.d.ts +14 -0
- package/lib/client/PermissionsPanel.js +46 -0
- package/lib/client/ProfilesSection.js +30 -15
- package/lib/client/RoleAvailability.d.ts +7 -0
- package/lib/client/RoleAvailability.js +19 -0
- package/lib/client/SessionProfiles.js +27 -9
- package/lib/client/StructuredEditor.js +15 -7
- package/lib/client/children-controller.d.ts +98 -0
- package/lib/client/children-controller.js +296 -0
- package/lib/client/children-locales.d.ts +367 -0
- package/lib/client/children-locales.js +69 -0
- package/lib/client/controller.d.ts +6 -1
- package/lib/client/controller.js +14 -8
- package/lib/client/deployment-data.d.ts +2 -1
- package/lib/client/deployment-data.js +34 -5
- package/lib/client/deployment-locales.d.ts +4 -0
- package/lib/client/deployment-locales.js +11 -2
- package/lib/client/diagnostics.d.ts +14 -0
- package/lib/client/diagnostics.js +53 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +96 -2
- package/lib/client/locales.d.ts +54 -0
- package/lib/client/locales.js +34 -16
- package/lib/client/permission-client.d.ts +16 -0
- package/lib/client/permission-client.js +38 -0
- package/lib/client/permission-controller.d.ts +62 -0
- package/lib/client/permission-controller.js +149 -0
- package/lib/client/permission-locales.d.ts +114 -0
- package/lib/client/permission-locales.js +75 -0
- package/lib/client/session-labels.js +4 -4
- package/lib/client/structured.js +19 -5
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +20 -0
- package/lib/client.js +5780 -1679
- package/lib/core-permission-authority.d.ts +18 -0
- package/lib/core-permission-authority.js +255 -0
- package/lib/core-permissions.d.ts +8 -0
- package/lib/core-permissions.js +33 -0
- package/lib/delivery-authority.d.ts +68 -0
- package/lib/delivery-authority.js +260 -0
- package/lib/deployment-config.d.ts +23 -0
- package/lib/deployment-config.js +61 -40
- package/lib/deployment-permission-rules.d.ts +55 -0
- package/lib/deployment-permission-rules.js +306 -0
- package/lib/dsh-types.d.ts +10 -4
- package/lib/guards.d.ts +1 -1
- package/lib/guards.js +29 -8
- package/lib/host-llm-startup.d.ts +41 -0
- package/lib/host-llm-startup.js +65 -0
- package/lib/host-llm.d.ts +92 -0
- package/lib/host-llm.js +325 -0
- package/lib/index.d.ts +15 -4
- package/lib/index.js +300 -47
- package/lib/legacy-child-policy.d.ts +51 -0
- package/lib/legacy-child-policy.js +123 -0
- package/lib/legacy-read-composition.d.ts +20 -0
- package/lib/legacy-read-composition.js +144 -0
- package/lib/legacy-read-contracts.d.ts +157 -0
- package/lib/legacy-read-contracts.js +39 -0
- package/lib/legacy-read-host.d.ts +19 -0
- package/lib/legacy-read-host.js +67 -0
- package/lib/legacy-read-integration.d.ts +121 -0
- package/lib/legacy-read-integration.js +522 -0
- package/lib/legacy-read-proxy.d.ts +26 -0
- package/lib/legacy-read-proxy.js +237 -0
- package/lib/live-pi-ai-owner.d.ts +18 -0
- package/lib/live-pi-ai-owner.js +144 -0
- package/lib/llm-runtime.d.ts +11 -0
- package/lib/llm-runtime.js +21 -0
- package/lib/managed-settings.d.ts +5 -0
- package/lib/managed-settings.js +14 -0
- package/lib/model-parameter-policy.d.ts +11 -0
- package/lib/model-parameter-policy.js +27 -0
- package/lib/model-routing.js +28 -17
- package/lib/modules.d.ts +13 -5
- package/lib/modules.js +17 -1
- package/lib/native-child-evidence.d.ts +42 -0
- package/lib/native-child-evidence.js +133 -0
- package/lib/native-pi-ai-wire.d.ts +37 -0
- package/lib/native-pi-ai-wire.js +261 -0
- package/lib/native-scope.js +1 -1
- package/lib/permission-bash.d.ts +6 -0
- package/lib/permission-bash.js +7 -0
- package/lib/permission-control.d.ts +73 -0
- package/lib/permission-control.js +205 -0
- package/lib/permission-controller.d.ts +68 -0
- package/lib/permission-controller.js +317 -0
- package/lib/permission-errors.d.ts +7 -0
- package/lib/permission-errors.js +21 -0
- package/lib/permission-fs-search.d.ts +5 -0
- package/lib/permission-fs-search.js +7 -0
- package/lib/permission-fs.d.ts +5 -0
- package/lib/permission-fs.js +7 -0
- package/lib/permission-native-access.d.ts +11 -0
- package/lib/permission-native-access.js +6 -0
- package/lib/permission-native-command.d.ts +10 -0
- package/lib/permission-native-command.js +93 -0
- package/lib/permission-native-rules.d.ts +75 -0
- package/lib/permission-native-rules.js +278 -0
- package/lib/permission-pwsh.d.ts +6 -0
- package/lib/permission-pwsh.js +7 -0
- package/lib/permission-remote.d.ts +26 -0
- package/lib/permission-remote.js +53 -0
- package/lib/permission-rpc.d.ts +29 -0
- package/lib/permission-rpc.js +152 -0
- package/lib/permission-rules.d.ts +115 -0
- package/lib/permission-rules.js +256 -0
- package/lib/permission-settings.d.ts +45 -0
- package/lib/permission-settings.js +48 -0
- package/lib/permission-shell.d.ts +38 -0
- package/lib/permission-shell.js +150 -0
- package/lib/permission-web.d.ts +5 -0
- package/lib/permission-web.js +7 -0
- package/lib/preset-registry.js +36 -25
- package/lib/profile-diagnostics.d.ts +45 -0
- package/lib/profile-diagnostics.js +148 -0
- package/lib/profile-locale.d.ts +3 -0
- package/lib/profile-locale.js +2 -0
- package/lib/profile-remote.d.ts +8 -0
- package/lib/profile-remote.js +163 -39
- package/lib/profile-rpc.d.ts +4 -3
- package/lib/profile-rpc.js +14 -12
- package/lib/profile-runtime.d.ts +40 -1
- package/lib/profile-runtime.js +368 -93
- package/lib/profile-store.d.ts +11 -0
- package/lib/profile-store.js +143 -11
- package/lib/profile-types.d.ts +70 -1
- package/lib/profile-types.js +1 -0
- package/lib/profiles.d.ts +16 -2
- package/lib/profiles.js +156 -79
- package/lib/prompt-content.js +1 -1
- package/lib/prompts.d.ts +37 -2
- package/lib/prompts.js +111 -9
- package/lib/recovery-policy.js +20 -7
- package/lib/role-control-remote.d.ts +38 -0
- package/lib/role-control-remote.js +211 -0
- package/lib/role-control-rpc.d.ts +51 -0
- package/lib/role-control-rpc.js +377 -0
- package/lib/role-control-types.d.ts +92 -0
- package/lib/role-control-types.js +8 -0
- package/lib/role-invocation.d.ts +47 -0
- package/lib/role-invocation.js +135 -0
- package/lib/role-llm-runtime.d.ts +17 -0
- package/lib/role-llm-runtime.js +62 -0
- package/lib/role-llm.d.ts +31 -0
- package/lib/role-llm.js +66 -0
- package/lib/role-policy.d.ts +49 -8
- package/lib/role-policy.js +437 -60
- package/lib/role-providers.d.ts +1 -1
- package/lib/role-providers.js +30 -35
- package/lib/role-routing.d.ts +11 -2
- package/lib/role-routing.js +42 -25
- package/lib/role-runs.d.ts +135 -0
- package/lib/role-runs.js +304 -0
- package/lib/role-subagents.d.ts +58 -3
- package/lib/role-subagents.js +169 -56
- package/lib/roles.d.ts +5 -6
- package/lib/roles.js +10 -39
- package/lib/route-json.d.ts +19 -0
- package/lib/route-json.js +129 -0
- package/lib/routing-policy.d.ts +2 -0
- package/lib/routing-policy.js +12 -2
- package/lib/runtime-integration.d.ts +112 -0
- package/lib/runtime-integration.js +784 -0
- package/lib/runtime-recovery.js +18 -8
- package/lib/settings.d.ts +47 -13
- package/lib/settings.js +217 -82
- package/lib/skills.js +2 -2
- package/lib/status.d.ts +10 -1
- package/lib/status.js +11 -8
- package/lib/subagent-runtime.d.ts +45 -0
- package/lib/subagent-runtime.js +131 -0
- package/package.json +106 -56
- package/patches/subagent-runtime.yml +15 -0
- package/prompts/deepseek-flash.md +1 -1
- package/prompts/deepseek-v4-pro.md +2 -2
- package/prompts/deepwork.md +27 -18
- package/prompts/source/agents/clarifier.md +5 -3
- package/prompts/source/agents/orchestrator.md +18 -9
- package/prompts/source/agents/plan-critic.md +5 -1
- package/prompts/source/agents/planner.md +4 -2
- package/prompts/source/agents/reviewer.md +6 -0
- package/prompts/source/category/complex.md +4 -4
- package/prompts/source/category/creative.md +6 -4
- package/prompts/source/category/cross-cutting.md +10 -8
- package/prompts/source/category/deep.md +5 -3
- package/prompts/source/category/documenting.md +7 -1
- package/prompts/source/category/frontend.md +2 -2
- package/prompts/source/category/hard-reasoning.md +3 -3
- package/prompts/source/category/research.md +4 -2
- package/prompts/source/deepwork/claude-opus-5.md +2 -2
- package/prompts/source/deepwork/codex.md +1 -1
- package/prompts/source/deepwork/default.md +22 -15
- package/prompts/source/deepwork/gemini.md +23 -16
- package/prompts/source/deepwork/glm.md +21 -14
- package/prompts/source/deepwork/gpt.md +12 -6
- package/prompts/source/deepwork/planner.md +8 -5
- package/prompts/source/manifest.json +178 -63
- package/prompts/source/shared/dsh-host-contract.md +5 -3
- package/prompts/source/shared/locale.md +2 -2
- package/prompts/source/terminal/orchestrator.md +1 -1
- package/scripts/cold-profile-composition.mjs +329 -0
- package/scripts/cold-profile-sources.mjs +238 -0
- package/scripts/migrate-cold-profile.mjs +315 -0
- package/skills/ast-grep/SKILL.md +7 -4
- package/skills/brainstorming/SKILL.md +43 -22
- package/skills/coding-agent-sessions/SKILL.md +7 -4
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -46
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -130
- package/skills/debugging/SKILL.md +14 -9
- package/skills/debugging/references/methodology/00-setup.md +14 -62
- package/skills/debugging/references/methodology/02-investigate.md +4 -4
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -3
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +2 -14
- package/skills/debugging/references/methodology/06-fix.md +6 -6
- package/skills/debugging/references/methodology/08-qa.md +5 -5
- package/skills/debugging/references/methodology/09-cleanup.md +15 -153
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +3 -16
- package/skills/debugging/references/runtimes/bundled-js-binary.md +1 -16
- package/skills/debugging/references/runtimes/native-binary.md +9 -54
- package/skills/debugging/references/runtimes/node.md +4 -15
- package/skills/debugging/references/runtimes/python.md +3 -15
- package/skills/debugging/references/runtimes/rust.md +2 -18
- package/skills/debugging/references/tools/dap.md +1 -1
- package/skills/debugging/references/tools/ghidra.md +4 -15
- package/skills/debugging/references/tools/playwright-cli.md +3 -15
- package/skills/debugging/references/tools/pwntools.md +4 -16
- package/skills/dispatching-parallel-agents/SKILL.md +18 -16
- package/skills/frontend/SKILL.md +7 -4
- package/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
- package/skills/git-master/SKILL.md +7 -4
- package/skills/init-deep/SKILL.md +7 -4
- package/skills/receiving-code-review/SKILL.md +17 -12
- package/skills/remove-ai-slops/SKILL.md +39 -38
- package/skills/requesting-code-review/SKILL.md +19 -17
- package/skills/requesting-code-review/code-reviewer.md +13 -1
- package/skills/subagent-driven-development/SKILL.md +29 -26
- package/skills/subagent-driven-development/implementer-prompt.md +29 -11
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +6 -1
- package/skills/using-git-worktrees/SKILL.md +7 -4
- package/skills/writing-plans/SKILL.md +29 -24
- package/skills/writing-plans/plan-document-reviewer-prompt.md +10 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { parentAgentOptionsForDelegation, SubagentError } from "@deepseek-ai/dsh-subagent";
|
|
3
|
+
import { ReasoningEffortId } from "@deepseek-ai/dsh-llm";
|
|
4
|
+
import { isDsmmRoleId } from "./roles.js";
|
|
5
|
+
import { freezeSettings, normalizeLevelOverride } from "./settings.js";
|
|
6
|
+
import { resolveRoleRuntimePolicy } from "./routing-policy.js";
|
|
7
|
+
import { selectInitialModelRouteChoice, sameExactModelRoute } from "./role-routing.js";
|
|
8
|
+
import { modelRouteFromCall, modelRouteToCall, projectModelRouteParameters, withRouteEffort } from "./role-llm.js";
|
|
9
|
+
import { configuredModelParameterPolicy, resolvedModelParameterPolicy } from "./model-parameter-policy.js";
|
|
10
|
+
const scoped = new AsyncLocalStorage();
|
|
11
|
+
const captured = new WeakMap();
|
|
12
|
+
const originalCaptures = new WeakMap();
|
|
13
|
+
export function duringRoleInvocation(parent, invocation, operation) {
|
|
14
|
+
return scoped.run({ parent, invocation }, operation);
|
|
15
|
+
}
|
|
16
|
+
export function currentRoleInvocation(parent, target) {
|
|
17
|
+
const current = scoped.getStore();
|
|
18
|
+
return current?.parent === parent && current.invocation.target === target ? current.invocation : undefined;
|
|
19
|
+
}
|
|
20
|
+
export function bindRoleInvocation(agent, invocation, original) {
|
|
21
|
+
captured.set(agent, invocation);
|
|
22
|
+
if (original === undefined)
|
|
23
|
+
originalCaptures.delete(agent);
|
|
24
|
+
else
|
|
25
|
+
originalCaptures.set(agent, original);
|
|
26
|
+
}
|
|
27
|
+
export function capturedRoleInvocation(agent) { return captured.get(agent); }
|
|
28
|
+
export function capturedOriginalRoleInvocation(agent) { return originalCaptures.get(agent)?.invocation; }
|
|
29
|
+
/** Complete selections replace model and effort together; effort-only selections narrow candidates. */
|
|
30
|
+
export async function resolveRoleInvocation(parent, target, settings, signal, options = {}, nativeOptions) {
|
|
31
|
+
if (!isDsmmRoleId(target) || target === "dsmm-orchestrator")
|
|
32
|
+
throw new SubagentError("Unknown DSMM delegation target", "UNAUTHORIZED");
|
|
33
|
+
if (Object.keys(options).some(key => key !== "level" && key !== "route"))
|
|
34
|
+
throw new SubagentError("Unknown DSMM invocation parameter", "UNSUPPORTED_CAPABILITY");
|
|
35
|
+
const level = options.level ?? "normal";
|
|
36
|
+
if (!["normal", "low", "high", "max"].includes(level))
|
|
37
|
+
throw new SubagentError("Unsupported DSMM invocation level", "UNSUPPORTED_CAPABILITY");
|
|
38
|
+
if (options.route !== undefined && !settings.subagents.allowRouteOverride)
|
|
39
|
+
throw new SubagentError("DSMM invocation route override is not admitted", "UNAUTHORIZED");
|
|
40
|
+
const inherited = parentAgentOptionsForDelegation(parent);
|
|
41
|
+
if (inherited.provider === undefined || inherited.model === undefined)
|
|
42
|
+
throw new Error("DSMM role delegation requires an inherited provider/model");
|
|
43
|
+
let route = { provider: inherited.provider, model: inherited.model, ...(inherited.reasoningEffort === undefined ? {} : { reasoningEffort: inherited.reasoningEffort }) };
|
|
44
|
+
let source = "inherited";
|
|
45
|
+
let effortSource = "native";
|
|
46
|
+
const policy = resolveRoleRuntimePolicy(settings, target);
|
|
47
|
+
if (policy.primary !== undefined) {
|
|
48
|
+
route = { ...policy.primary };
|
|
49
|
+
source = "primary";
|
|
50
|
+
effortSource = "dsmm-config";
|
|
51
|
+
}
|
|
52
|
+
let exactEffort = false;
|
|
53
|
+
let fixed = false;
|
|
54
|
+
let candidateEffort;
|
|
55
|
+
const apply = (raw, nextSource) => {
|
|
56
|
+
const override = normalizeLevelOverride(raw);
|
|
57
|
+
if (override.provider !== undefined)
|
|
58
|
+
route = { ...override };
|
|
59
|
+
else {
|
|
60
|
+
route = withRouteEffort(route, override.reasoningEffort);
|
|
61
|
+
candidateEffort = override.reasoningEffort;
|
|
62
|
+
}
|
|
63
|
+
exactEffort = override.reasoningEffort !== undefined;
|
|
64
|
+
source = nextSource;
|
|
65
|
+
effortSource = "dsmm-config";
|
|
66
|
+
};
|
|
67
|
+
if (level !== "normal") {
|
|
68
|
+
const override = settings.roleRouting[target]?.levels?.[level];
|
|
69
|
+
if (override === undefined)
|
|
70
|
+
throw new SubagentError("DSMM invocation level has no configured route", "UNSUPPORTED_CAPABILITY");
|
|
71
|
+
apply(override, "level");
|
|
72
|
+
}
|
|
73
|
+
// Native host AgentOptions remain an explicit selection, not a model-facing permission grant.
|
|
74
|
+
if (nativeOptions?.provider !== undefined || nativeOptions?.model !== undefined) {
|
|
75
|
+
route = { provider: nativeOptions.provider ?? route.provider, model: nativeOptions.model ?? route.model,
|
|
76
|
+
...(nativeOptions.reasoningEffort === undefined ? {} : { reasoningEffort: nativeOptions.reasoningEffort }) };
|
|
77
|
+
fixed = true;
|
|
78
|
+
candidateEffort = undefined;
|
|
79
|
+
effortSource = "native";
|
|
80
|
+
}
|
|
81
|
+
else if (nativeOptions?.reasoningEffort !== undefined) {
|
|
82
|
+
route = withRouteEffort(route, nativeOptions.reasoningEffort);
|
|
83
|
+
candidateEffort = nativeOptions.reasoningEffort;
|
|
84
|
+
effortSource = "native";
|
|
85
|
+
}
|
|
86
|
+
if (options.route !== undefined) {
|
|
87
|
+
apply(options.route, "invocation-route");
|
|
88
|
+
fixed = options.route.provider !== undefined;
|
|
89
|
+
}
|
|
90
|
+
const initialFallbacks = policy.fallbackRoutes.map(fallback => candidateEffort === undefined ? { ...fallback } : withRouteEffort(fallback, candidateEffort));
|
|
91
|
+
const initialCandidates = [route, ...fixed ? [] : initialFallbacks];
|
|
92
|
+
const llm = parent.ctx.get("llm");
|
|
93
|
+
if (llm === undefined)
|
|
94
|
+
throw new Error("DSMM invocation requires the parent's native LLM service");
|
|
95
|
+
const admission = parent.ctx.get("dsmmProfileRuntime")?.admission(parent);
|
|
96
|
+
const modelParameterPolicy = capturedRoleInvocation(parent)?.modelParameterPolicy
|
|
97
|
+
?? (admission === undefined ? configuredModelParameterPolicy(settings) : resolvedModelParameterPolicy(admission));
|
|
98
|
+
const project = (candidate, source) => modelRouteFromCall(projectModelRouteParameters(candidate, source, modelParameterPolicy.mode !== "native-defaults"));
|
|
99
|
+
const projected = initialCandidates.map((candidate, index) => project(candidate, index === 0 || candidateEffort !== undefined ? effortSource : "dsmm-config"));
|
|
100
|
+
const rawResolver = modelParameterPolicy.mode === "passthrough" ? parent.ctx.get("dsmmLlmRoutes") : undefined;
|
|
101
|
+
const selected = await selectInitialModelRouteChoice(llm, projected, signal, rawResolver === undefined ? undefined : {
|
|
102
|
+
async resolveRoute(candidate, signal) {
|
|
103
|
+
const checked = await rawResolver.resolveRoute(candidate, signal);
|
|
104
|
+
const index = projected.findIndex(route => sameExactModelRoute(route, candidate));
|
|
105
|
+
if ((index === 0 || candidateEffort !== undefined) && effortSource === "native") {
|
|
106
|
+
const { customParameters: _parameters, ...native } = modelRouteToCall(candidate);
|
|
107
|
+
if (llm.resolveCallConfig === undefined)
|
|
108
|
+
throw new Error("Native model intent requires native metadata preparation");
|
|
109
|
+
await llm.resolveCallConfig(native, signal);
|
|
110
|
+
}
|
|
111
|
+
return checked;
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
const selectedIndex = projected.findIndex(candidate => sameExactModelRoute(candidate, selected.requestedRoute));
|
|
115
|
+
if (selectedIndex < 0)
|
|
116
|
+
throw new Error("DSMM selected route has no original candidate");
|
|
117
|
+
signal.throwIfAborted();
|
|
118
|
+
const fallbackRoutes = options.route?.provider !== undefined ? [] : level === "normal" && options.route === undefined ? policy.fallbackRoutes : initialFallbacks;
|
|
119
|
+
const effectiveFallbacks = fallbackRoutes.map(candidate => project(candidate, candidateEffort !== undefined ? effortSource : "dsmm-config"));
|
|
120
|
+
const candidates = [project(route, effortSource), ...effectiveFallbacks];
|
|
121
|
+
const selectedSource = selectedIndex === 0 || candidateEffort !== undefined ? effortSource : "dsmm-config";
|
|
122
|
+
return freezeSettings({ target, ...(options.level === undefined ? {} : { requestedLevel: options.level }), effectiveLevel: level,
|
|
123
|
+
routeSource: source, initialRoute: project(selected.route, selectedSource), selectedCandidate: selected.requestedRoute, requestedRoute: initialCandidates[selectedIndex], candidates, exactEffort,
|
|
124
|
+
effortSource: selectedSource, modelParameterPolicy,
|
|
125
|
+
requestedPolicy: { ...policy, primary: route, fallbackRoutes },
|
|
126
|
+
policy: { ...policy, primary: project(route, effortSource), fallbackRoutes: effectiveFallbacks } });
|
|
127
|
+
}
|
|
128
|
+
export function invocationAgentOptions(invocation, options) {
|
|
129
|
+
const route = invocation.initialRoute;
|
|
130
|
+
return { ...options, ...route, reasoningEffort: route.reasoningEffort === undefined ? undefined : ReasoningEffortId(route.reasoningEffort) };
|
|
131
|
+
}
|
|
132
|
+
export function invocationView(invocation, label, mode, ids = {}) {
|
|
133
|
+
return { role: invocation.target, label, level: invocation.effectiveLevel, routeSource: invocation.routeSource, route: { ...invocation.initialRoute }, mode, ...ids };
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=role-invocation.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { DsmmLlmHostOwner, DsmmLlmAdmission, DsmmLlmRequestFrame, DsmmLlmCallConfig } from "./host-llm.js";
|
|
3
|
+
import type { DsmmPiAiProviderOwner } from "./native-pi-ai-wire.js";
|
|
4
|
+
export interface DsmmCoreLlmOwner {
|
|
5
|
+
/** Undefined is only the physically owned ordinary-native child path. */
|
|
6
|
+
admit(frame: DsmmLlmRequestFrame): Promise<DsmmLlmAdmission | undefined>;
|
|
7
|
+
}
|
|
8
|
+
declare module "@deepseek-ai/cordis" {
|
|
9
|
+
interface Context {
|
|
10
|
+
dsmmCoreLlmOwner: DsmmCoreLlmOwner;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** Connect the cold Host LLM owner to the existing exact Agent/role admission authority. */
|
|
14
|
+
export declare function createDsmmRoleLlmOwner(ctx: Context, providers: Pick<DsmmPiAiProviderOwner, "generation"> & {
|
|
15
|
+
requiresRaw?(config: DsmmLlmCallConfig): boolean;
|
|
16
|
+
}): DsmmLlmHostOwner;
|
|
17
|
+
//# sourceMappingURL=role-llm-runtime.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LlmError } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
import { requiresDsmmCallAdmission, snapshotDsmmCall } from "./host-llm.js";
|
|
3
|
+
import { resolvedModelParameterPolicy } from "./model-parameter-policy.js";
|
|
4
|
+
import { modelRouteFromCall, projectModelRouteParameters } from "./role-llm.js";
|
|
5
|
+
import { capturedRoleInvocation } from "./role-invocation.js";
|
|
6
|
+
import { latestNativeModelSelection } from "./role-routing.js";
|
|
7
|
+
import { resolveSelectedAgentPreset } from "./session-scope.js";
|
|
8
|
+
/** Connect the cold Host LLM owner to the existing exact Agent/role admission authority. */
|
|
9
|
+
export function createDsmmRoleLlmOwner(ctx, providers) {
|
|
10
|
+
const nativeFallback = async (frame, proposal) => {
|
|
11
|
+
const config = snapshotDsmmCall(proposal);
|
|
12
|
+
if (requiresDsmmCallAdmission(config, providers, frame.agent))
|
|
13
|
+
throw new LlmError("Enhanced requests require exact Core admission", "DSMM_NOT_READY");
|
|
14
|
+
// Missing opaque fields do not prove native equivalence: standard options
|
|
15
|
+
// must still resolve using this request's complete frozen configuration.
|
|
16
|
+
await ctx.get("llm").resolveCallConfig(config, frame.signal);
|
|
17
|
+
frame.signal.throwIfAborted();
|
|
18
|
+
return { kind: "native" };
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
async preflight(frame, proposal) {
|
|
22
|
+
const core = ctx.get("dsmmCoreLlmOwner");
|
|
23
|
+
if (core === undefined) {
|
|
24
|
+
return nativeFallback(frame, proposal);
|
|
25
|
+
}
|
|
26
|
+
const admission = await core.admit(frame);
|
|
27
|
+
if (admission === undefined) {
|
|
28
|
+
return nativeFallback(frame, proposal);
|
|
29
|
+
}
|
|
30
|
+
const agent = frame.agent;
|
|
31
|
+
const original = ctx.get("dsmmProfileRuntime").admission(agent);
|
|
32
|
+
if (original !== admission.admission)
|
|
33
|
+
throw new Error("LLM policy does not own the exact admission");
|
|
34
|
+
const policy = resolvedModelParameterPolicy(original);
|
|
35
|
+
const invocation = capturedRoleInvocation(agent);
|
|
36
|
+
const effortSource = latestNativeModelSelection(agent) !== undefined
|
|
37
|
+
|| frame.agent.session.header.origin !== "subagent" && !resolveSelectedAgentPreset(agent.session)?.startsWith("dsmm-")
|
|
38
|
+
? "native" : invocation?.effortSource ?? (invocation?.routeSource === "inherited" ? "native" : "dsmm-config");
|
|
39
|
+
const config = snapshotDsmmCall(projectModelRouteParameters(modelRouteFromCall(proposal), effortSource, policy.mode !== "native-defaults"));
|
|
40
|
+
admission.assertCurrent();
|
|
41
|
+
if (policy.mode !== "passthrough") {
|
|
42
|
+
return { kind: "stock", admission, config };
|
|
43
|
+
}
|
|
44
|
+
if (!requiresDsmmCallAdmission(config, providers)) {
|
|
45
|
+
try {
|
|
46
|
+
await ctx.get("llm").resolveCallConfig(config, frame.signal);
|
|
47
|
+
admission.assertCurrent();
|
|
48
|
+
return { kind: "stock", admission, config };
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (!(error instanceof LlmError) || error.code !== "UNSUPPORTED_OPTION"
|
|
52
|
+
&& (error.code !== "UNSUPPORTED_REASONING_EFFORT" || effortSource === "native"))
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const generation = providers.generation(config.provider);
|
|
57
|
+
admission.assertCurrent();
|
|
58
|
+
return { kind: "dsmm", admission, config, generation };
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=role-llm-runtime.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LlmError } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
import type { DsmmLlmCallConfig } from "./host-llm.js";
|
|
3
|
+
import type { ModelRouteJson } from "./route-json.js";
|
|
4
|
+
/** Host-owned metadata admission; never a completion or a request authorization. */
|
|
5
|
+
export interface DsmmLlmRouteResolver {
|
|
6
|
+
resolveRoute(route: ModelRouteJson, signal?: AbortSignal): Promise<ModelRouteJson>;
|
|
7
|
+
}
|
|
8
|
+
/** Only a public provider-directory lookup can establish this absence. */
|
|
9
|
+
export declare class DsmmMissingProviderError extends LlmError {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
declare module "@deepseek-ai/cordis" {
|
|
13
|
+
interface Context {
|
|
14
|
+
dsmmLlmRoutes: DsmmLlmRouteResolver;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** Request projection only. The Host supplies provenance; this does not establish admission or ownership. */
|
|
18
|
+
export declare function projectModelRouteParameters(input: unknown, effortSource: "dsmm-config" | "native", passthrough?: boolean): DsmmLlmCallConfig;
|
|
19
|
+
/** An explicit effort-only choice replaces either spelling of the prior effort. */
|
|
20
|
+
export declare function withRouteEffort(route: ModelRouteJson, reasoningEffort: string): ModelRouteJson;
|
|
21
|
+
/** External route names remain body names; customParameters itself is ordinary user JSON. */
|
|
22
|
+
export declare function modelRouteToCall(input: unknown): DsmmLlmCallConfig;
|
|
23
|
+
/** Decode native header/config storage without treating the internal envelope as a user field. */
|
|
24
|
+
export declare function modelRouteFromCall(input: {
|
|
25
|
+
provider: string;
|
|
26
|
+
model: string;
|
|
27
|
+
customParameters?: unknown;
|
|
28
|
+
}): ModelRouteJson;
|
|
29
|
+
/** Adapter defaults are not explicit route intent. */
|
|
30
|
+
export declare function modelRouteFromHeader(header: unknown): ModelRouteJson;
|
|
31
|
+
//# sourceMappingURL=role-llm.d.ts.map
|
package/lib/role-llm.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LlmError, ReasoningEffortId } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
import { normalizeModelRouteJson } from "./route-json.js";
|
|
3
|
+
/** Only a public provider-directory lookup can establish this absence. */
|
|
4
|
+
export class DsmmMissingProviderError extends LlmError {
|
|
5
|
+
constructor() { super("The provider route has no registered adapter", "NO_ADAPTER"); }
|
|
6
|
+
}
|
|
7
|
+
const callFields = new Set(["provider", "model", "reasoningEffort", "temperature", "maxTokens", "stop"]);
|
|
8
|
+
/** Request projection only. The Host supplies provenance; this does not establish admission or ownership. */
|
|
9
|
+
export function projectModelRouteParameters(input, effortSource, passthrough = true) {
|
|
10
|
+
const route = normalizeModelRouteJson(input);
|
|
11
|
+
if (passthrough)
|
|
12
|
+
return modelRouteToCall(route);
|
|
13
|
+
return { provider: route.provider, model: route.model,
|
|
14
|
+
...(effortSource === "native" && route.reasoningEffort !== undefined ? { reasoningEffort: ReasoningEffortId(route.reasoningEffort) } : {}),
|
|
15
|
+
...(typeof route.temperature === "number" ? { temperature: route.temperature } : {}),
|
|
16
|
+
...(typeof route.maxTokens === "number" ? { maxTokens: route.maxTokens } : {}),
|
|
17
|
+
...(Array.isArray(route.stop) && route.stop.every(value => typeof value === "string") ? { stop: route.stop } : {}),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** An explicit effort-only choice replaces either spelling of the prior effort. */
|
|
21
|
+
export function withRouteEffort(route, reasoningEffort) {
|
|
22
|
+
const { reasoningEffort: _effort, reasoning_effort: _rawEffort, ...rest } = route;
|
|
23
|
+
return { ...rest, reasoningEffort };
|
|
24
|
+
}
|
|
25
|
+
/** External route names remain body names; customParameters itself is ordinary user JSON. */
|
|
26
|
+
export function modelRouteToCall(input) {
|
|
27
|
+
const route = normalizeModelRouteJson(input);
|
|
28
|
+
const customParameters = Object.fromEntries(Object.entries(route).filter(([key]) => !callFields.has(key)));
|
|
29
|
+
const stop = route.stop;
|
|
30
|
+
if (Array.isArray(stop) && stop.length === 0)
|
|
31
|
+
customParameters.stop = stop;
|
|
32
|
+
return { provider: route.provider, model: route.model,
|
|
33
|
+
...(route.reasoningEffort === undefined ? {} : { reasoningEffort: ReasoningEffortId(route.reasoningEffort) }),
|
|
34
|
+
...(typeof route.temperature === "number" ? { temperature: route.temperature } : {}),
|
|
35
|
+
...(typeof route.maxTokens === "number" ? { maxTokens: route.maxTokens } : {}),
|
|
36
|
+
...(Array.isArray(stop) && stop.length > 0 && stop.every(value => typeof value === "string") ? { stop } : {}),
|
|
37
|
+
...(Object.keys(customParameters).length === 0 ? {} : { customParameters }),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Decode native header/config storage without treating the internal envelope as a user field. */
|
|
41
|
+
export function modelRouteFromCall(input) {
|
|
42
|
+
const { customParameters, ...native } = input;
|
|
43
|
+
if (customParameters !== undefined && (customParameters === null || typeof customParameters !== "object" || Array.isArray(customParameters)))
|
|
44
|
+
throw new LlmError("Invalid raw parameter envelope", "INVALID_CONFIG");
|
|
45
|
+
for (const key of Object.keys(customParameters ?? {})) {
|
|
46
|
+
if (Object.hasOwn(native, key) || callFields.has(key) && key !== "stop")
|
|
47
|
+
throw new LlmError("Raw parameters conflict with native call fields", "INVALID_CONFIG");
|
|
48
|
+
}
|
|
49
|
+
return normalizeModelRouteJson({ ...native, ...customParameters });
|
|
50
|
+
}
|
|
51
|
+
/** Adapter defaults are not explicit route intent. */
|
|
52
|
+
export function modelRouteFromHeader(header) {
|
|
53
|
+
if (header === null || typeof header !== "object" || !("config" in header) || header.config === null || typeof header.config !== "object"
|
|
54
|
+
|| !("provider" in header.config) || typeof header.config.provider !== "string" || !("model" in header.config) || typeof header.config.model !== "string")
|
|
55
|
+
throw new LlmError("Native header has no model route", "INVALID_CONFIG");
|
|
56
|
+
const route = modelRouteFromCall({ ...header.config, provider: header.config.provider, model: header.config.model });
|
|
57
|
+
const defaults = "adapterDefaults" in header ? header.adapterDefaults : undefined;
|
|
58
|
+
if (defaults !== null && typeof defaults === "object") {
|
|
59
|
+
if ("maxTokens" in defaults && defaults.maxTokens === true)
|
|
60
|
+
delete route.maxTokens;
|
|
61
|
+
if ("reasoningEffort" in defaults && defaults.reasoningEffort === true)
|
|
62
|
+
delete route.reasoningEffort;
|
|
63
|
+
}
|
|
64
|
+
return route;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=role-llm.js.map
|
package/lib/role-policy.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type { ToolRestriction, ToolRuntime } from "@deepseek-ai/dsh-tools";
|
|
1
|
+
import type { ToolRestriction, ToolRuntime, ToolExecution } from "@deepseek-ai/dsh-tools";
|
|
2
2
|
import type { DshAgent, DshContext } from "./dsh-types.js";
|
|
3
|
+
export { allowedRoleChildren } from "./roles.js";
|
|
3
4
|
import type { DsmmRoleId } from "./roles.js";
|
|
4
|
-
import type { DsmmSettings, DsmmSettingsGetter } from "./settings.js";
|
|
5
|
+
import type { DsmmProfileAdmission, DsmmSettings, DsmmSettingsGetter } from "./settings.js";
|
|
6
|
+
import type { ChildAdmissionCompletion, ChildRoleAdmissionCandidate, ParentAdmissionTicket } from "./child-admission-contract.js";
|
|
7
|
+
import type { ChildAdmissionEvidence, PreparedChildAdmission } from "./child-capture.js";
|
|
8
|
+
import type { LegacyCapabilityCollaborators } from "./legacy-child-policy.js";
|
|
9
|
+
export { createConservativeLegacyAdmission as conservativeLegacyAdmission } from "./legacy-child-policy.js";
|
|
10
|
+
import type { ResolvedRoleInvocation } from "./role-invocation.js";
|
|
5
11
|
import type { DeepworkModeController } from "./state.js";
|
|
6
12
|
export interface DsmmRoleIdentity {
|
|
7
13
|
readonly role?: DsmmRoleId;
|
|
@@ -11,8 +17,9 @@ export interface DsmmRoleIdentity {
|
|
|
11
17
|
readonly readOnly?: boolean;
|
|
12
18
|
readonly toolFilter?: ToolRestriction;
|
|
13
19
|
}
|
|
20
|
+
export declare const READONLY_ROLE_DENIED_TOOLS: readonly ["write", "edit", "bash", "pwsh"];
|
|
21
|
+
export declare function inheritToolFilter(parent?: ToolRestriction, requested?: ToolRestriction): ToolRestriction | undefined;
|
|
14
22
|
export declare function resolveAdmittedDsmmRole(agent: DshAgent, settings: DsmmSettings, active: boolean): DsmmRoleId | undefined;
|
|
15
|
-
export declare function allowedRoleChildren(role: DsmmRoleId, child?: boolean): readonly DsmmRoleId[];
|
|
16
23
|
export declare function roleToolName(role: DsmmRoleId): string;
|
|
17
24
|
export declare function roleFromToolName(name: string): DsmmRoleId | undefined;
|
|
18
25
|
export declare function readonlyRoleTool(name: string, settings: DsmmSettings): boolean;
|
|
@@ -21,6 +28,15 @@ interface DelegationIdentity {
|
|
|
21
28
|
role: DsmmRoleId;
|
|
22
29
|
epoch: string;
|
|
23
30
|
toolFilter?: ToolRestriction;
|
|
31
|
+
maxDepth?: number;
|
|
32
|
+
admittedChild?(agent: DshAgent): void;
|
|
33
|
+
}
|
|
34
|
+
export interface RoleAdmissionCollaborators {
|
|
35
|
+
resolveOriginalEvidence(ticket: ParentAdmissionTicket, childId: string, signal: AbortSignal): Promise<ChildAdmissionEvidence>;
|
|
36
|
+
nativeSubstrate: DsmmSettings;
|
|
37
|
+
revokeParent(agent: DshAgent, reason: string): void;
|
|
38
|
+
/** Shared C2b native-capability audit; this does not grant parent tool permissions. */
|
|
39
|
+
classifyLegacyTool?: LegacyCapabilityCollaborators["classifyTool"];
|
|
24
40
|
}
|
|
25
41
|
/** Identity admission only: native services retain every run, inbox and retry lifecycle. */
|
|
26
42
|
export declare class DsmmRolePolicy {
|
|
@@ -28,24 +44,49 @@ export declare class DsmmRolePolicy {
|
|
|
28
44
|
private readonly getSettings;
|
|
29
45
|
private readonly mode;
|
|
30
46
|
private readonly calls;
|
|
47
|
+
private readonly executions;
|
|
48
|
+
private readonly toolCalls;
|
|
31
49
|
private readonly providers;
|
|
50
|
+
private readonly continuableCreations;
|
|
51
|
+
private readonly preparedInvocations;
|
|
52
|
+
private readonly preparedCaptures;
|
|
53
|
+
private collaborators?;
|
|
32
54
|
constructor(ctx: DshContext, getSettings: DsmmSettingsGetter, mode: DeepworkModeController);
|
|
33
55
|
captureProvider(provider: object): void;
|
|
56
|
+
ownsProvider(provider: object): boolean;
|
|
57
|
+
revokeResidency(agent: DshAgent): void;
|
|
58
|
+
configureAdmission(collaborators: RoleAdmissionCollaborators): ChildAdmissionCompletion;
|
|
59
|
+
validateRootRole(agent: DshAgent, admission: DsmmProfileAdmission): void;
|
|
60
|
+
recordContinuableCreation(childId: string, parent: DshAgent, role: DsmmRoleId, invocation: ResolvedRoleInvocation | undefined, expectedEpoch: string, signal: AbortSignal): void;
|
|
61
|
+
prepareChildAdmission(agent: DshAgent, parent: DshAgent, ticket: ParentAdmissionTicket, signal: AbortSignal): Promise<PreparedChildAdmission>;
|
|
62
|
+
/** Used at A's single awaited completion point; old original epochs remain valid facts. */
|
|
63
|
+
validatePreparedRole(agent: DshAgent, parent: DshAgent, candidate: ChildRoleAdmissionCandidate): void;
|
|
64
|
+
assertChildDelivery(ticket: ParentAdmissionTicket, childId: string, raw: ChildAdmissionEvidence): void;
|
|
65
|
+
private readOnly;
|
|
34
66
|
private agents;
|
|
35
67
|
assertLive(agent: DshAgent): void;
|
|
68
|
+
private isAdmittedChild;
|
|
69
|
+
private assertPlannerRootAdmission;
|
|
36
70
|
/** Core fence runs before native prompt/body assembly or provider execution. */
|
|
37
71
|
assertModuleAdmission(agent: DshAgent): void;
|
|
38
72
|
identity(agent: DshAgent): DsmmRoleIdentity;
|
|
39
73
|
targets(agent: DshAgent): readonly DsmmRoleId[];
|
|
40
74
|
assertDelegation(parent: DshAgent, role: DsmmRoleId): DelegationIdentity;
|
|
41
|
-
duringDelegation<T>(parent: DshAgent, role: DsmmRoleId, operation: () => T, toolFilter?: ToolRestriction): T;
|
|
42
|
-
prepareContinuable(parent: DshAgent, role: DsmmRoleId, signal: AbortSignal):
|
|
75
|
+
duringDelegation<T>(parent: DshAgent, role: DsmmRoleId, operation: () => T, toolFilter?: ToolRestriction, maxDepth?: number, admittedChild?: (agent: DshAgent) => void): T;
|
|
76
|
+
prepareContinuable(parent: DshAgent, role: DsmmRoleId, signal: AbortSignal): DelegationIdentity;
|
|
43
77
|
admit(agent: DshAgent): DsmmRoleIdentity;
|
|
44
|
-
private bindChild;
|
|
45
78
|
private captureIdentity;
|
|
46
79
|
captureTools(agent: DshAgent, tools: ToolRuntime, controlledNames?: readonly string[], reset?: boolean): void;
|
|
47
|
-
|
|
80
|
+
/** Existing exact role denials only; missing admission or capability proof is not a blacklist. */
|
|
81
|
+
toolBlacklistDenial(agent: DshAgent, name: string, execution?: Readonly<ToolExecution>): string | undefined;
|
|
82
|
+
private blacklistDenial;
|
|
83
|
+
captureToolExecution(execution: Readonly<ToolExecution>, full: boolean): void;
|
|
84
|
+
assertToolExecution(execution: Readonly<ToolExecution>): void;
|
|
85
|
+
beforeToolDecision<T>(operation: () => T): T;
|
|
86
|
+
duringToolExecution<T>(execution: Readonly<ToolExecution>, operation: () => Promise<T>): Promise<T>;
|
|
87
|
+
toolDenial(agent: DshAgent, name: string, tools?: ToolRuntime, execution?: Readonly<ToolExecution>): string | undefined;
|
|
88
|
+
preToolDenial(agent: DshAgent, name: string, tools?: ToolRuntime, execution?: Readonly<ToolExecution>): string | undefined;
|
|
89
|
+
private permissionDenial;
|
|
48
90
|
installDrain(agent: DshAgent): void;
|
|
49
91
|
}
|
|
50
|
-
export {};
|
|
51
92
|
//# sourceMappingURL=role-policy.d.ts.map
|