@dsmm/dsmm 0.3.22 → 0.3.24
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/agent-presets/dsmm-builder/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-code-search/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-coding/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-complex/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-creative/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-deep/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-documenting/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-frontend/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-oracle/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-planner/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-quick/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-research/agent.cordis.yml +1 -17
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +1 -17
- package/cordis.patch.yml +3 -0
- package/docs/agent-presets.md +1 -1
- package/docs/compatibility.md +13 -1
- package/docs/maintenance.md +48 -10
- package/docs/model-routing.md +25 -3
- package/docs/native-permissions.md +20 -4
- package/docs/releasing.md +3 -3
- package/docs/roadmap.md +33 -11
- package/docs/runtime-recovery.md +5 -3
- package/docs/settings-status.md +2 -2
- package/docs/testing.md +10 -0
- package/docs/web-fetch-fakeip.md +8 -2
- package/dsh-plugin.json +1 -1
- package/lib/agent-prompt-scope.d.ts +6 -0
- package/lib/agent-prompt-scope.js +66 -0
- package/lib/child-capture.d.ts +1 -1
- package/lib/child-capture.js +3 -1
- package/lib/client/DeploymentFields.js +1 -1
- package/lib/client/RoleToolView-data.d.ts +4 -2
- package/lib/client/RoleToolView-data.js +18 -4
- package/lib/client/RoleToolView-locales.d.ts +9 -0
- package/lib/client/RoleToolView-locales.js +4 -0
- package/lib/client/RoleToolView.d.ts +9 -3
- package/lib/client/RoleToolView.js +29 -8
- package/lib/client/children-locales.d.ts +4 -4
- package/lib/client/deployment-locales.d.ts +1 -0
- package/lib/client/deployment-locales.js +3 -1
- package/lib/client/index.js +36 -1
- package/lib/client/role-call-observations.d.ts +33 -0
- package/lib/client/role-call-observations.js +207 -0
- package/lib/client.js +501 -96
- package/lib/dsh-types.d.ts +15 -0
- package/lib/index.js +4 -1
- package/lib/live-pi-ai-owner.d.ts +1 -2
- package/lib/live-pi-ai-owner.js +10 -7
- package/lib/locale-guidance.d.ts +3 -0
- package/lib/locale-guidance.js +12 -0
- package/lib/model-family.d.ts +16 -0
- package/lib/model-family.js +156 -35
- package/lib/model-routing.d.ts +23 -2
- package/lib/model-routing.js +145 -7
- package/lib/native-admission.d.ts +36 -1
- package/lib/native-admission.js +408 -24
- package/lib/native-pi-ai-wire.js +17 -4
- package/lib/profile-diagnostics.js +1 -1
- package/lib/profile-remote.d.ts +2 -0
- package/lib/profile-remote.js +12 -3
- package/lib/profile-types.d.ts +5 -0
- package/lib/prompt-content.js +1 -1
- package/lib/prompts.d.ts +3 -2
- package/lib/prompts.js +32 -45
- package/lib/role-control-remote.d.ts +5 -2
- package/lib/role-control-remote.js +84 -4
- package/lib/role-control-rpc.d.ts +8 -1
- package/lib/role-control-rpc.js +122 -50
- package/lib/role-control-types.d.ts +62 -1
- package/lib/role-control-types.js +3 -0
- package/lib/role-invocation.js +1 -1
- package/lib/role-llm-runtime.js +2 -2
- package/lib/role-routing.d.ts +27 -7
- package/lib/role-routing.js +129 -16
- package/lib/role-subagents.js +13 -26
- package/lib/runtime-recovery.js +23 -6
- package/lib/session-metadata.d.ts +13 -1
- package/lib/session-metadata.js +21 -1
- package/lib/settings.d.ts +1 -0
- package/lib/settings.js +2 -1
- package/lib/web-fetch-address-policy.d.ts +6 -2
- package/lib/web-fetch-fakeip.d.ts +6 -0
- package/lib/web-fetch-fakeip.js +29 -2
- package/package.json +2 -2
- package/prompts/deepwork.md +3 -25
- package/prompts/source/deepwork/claude-opus-5.md +2 -8
- package/prompts/source/deepwork/codex.md +2 -8
- package/prompts/source/deepwork/default.md +3 -14
- package/prompts/source/deepwork/gemini-4.md +1 -7
- package/prompts/source/deepwork/gemini.md +3 -19
- package/prompts/source/deepwork/glm.md +6 -23
- package/prompts/source/deepwork/gpt.md +7 -15
- package/prompts/source/deepwork/kimi-k3-1.md +65 -0
- package/prompts/source/deepwork/kimi.md +1 -7
- package/prompts/source/deepwork/planner.md +0 -4
- package/prompts/source/deepwork/swe-2.md +2 -8
- package/prompts/source/shared/locale.md +1 -6
- package/skills/avoid-ai-slop/SKILL.md +2 -0
- package/skills/frontend/references/design/interaction-skill.md +14 -0
- package/skills/remove-ai-slops/SKILL.md +4 -4
- package/skills/report-fidelity/SKILL.md +3 -0
- package/prompts/source/shared/dsh-host-contract.md +0 -8
package/lib/role-subagents.js
CHANGED
|
@@ -4,7 +4,6 @@ import { pathToFileURL } from "node:url";
|
|
|
4
4
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
5
5
|
import { SubagentError } from "@deepseek-ai/dsh-subagent";
|
|
6
6
|
import { DSMM_ROLES } from "./roles.js";
|
|
7
|
-
import { registerRoleHarnessIdentity } from "./role-identity.js";
|
|
8
7
|
import { isDsmmRoleId } from "./roles.js";
|
|
9
8
|
import { DsmmRolePolicy, roleToolName } from "./role-policy.js";
|
|
10
9
|
import { roleProviderName } from "./role-providers.js";
|
|
@@ -13,10 +12,10 @@ import { childOwnedSessionEvents } from "./session-scope.js";
|
|
|
13
12
|
import { agentForScope, nativeAgentContext, scopeParentOf } from "./native-scope.js";
|
|
14
13
|
import { roleRouteRuntimeState } from "./role-routing.js";
|
|
15
14
|
import { modelRouteFromCall } from "./role-llm.js";
|
|
16
|
-
import {
|
|
15
|
+
import { buildDsmmDelegationGuidance } from "./prompts.js";
|
|
17
16
|
const hostControls = ["send_message", "interrupt_agent", "exit_plan_mode", "ask_user_question", "todo_write", "job_output", "job_list", "job_kill"];
|
|
18
17
|
// Agent-owned policy realms survive a bundle reinstall; do not register another
|
|
19
|
-
//
|
|
18
|
+
// delegation/tools layer on the same retained live Agent.
|
|
20
19
|
const admittedRealms = new WeakMap();
|
|
21
20
|
const callableDefinitions = new WeakMap();
|
|
22
21
|
/** Keep native controls on the frozen startup substrate, not desired-save reconciliation. */
|
|
@@ -136,11 +135,13 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ad
|
|
|
136
135
|
const subagents = agentCtx.get("subagents");
|
|
137
136
|
if (subagents === undefined)
|
|
138
137
|
throw new Error("DSMM role tools require native subagents");
|
|
139
|
-
const
|
|
138
|
+
const forcedBackground = settings.subagents.forceBackground;
|
|
139
|
+
const background = settings.subagents.enableRunInBackground || forcedBackground;
|
|
140
140
|
const admittedProviders = new Map(entry.targets.map(target => [target, subagents.getProvider(roleProviderName(target))]));
|
|
141
141
|
const incomplete = new Map();
|
|
142
142
|
const definition = defineTool({
|
|
143
|
-
name: entry.name, description: `Delegate a bounded ${entry.kind} task through native activation. Waits for the useful result by default.${background ? " Set run_in_background to receive an accepted child/message receipt; native completion notifies the parent." : " Background execution is disabled."}`,
|
|
143
|
+
name: entry.name, description: `Delegate a bounded ${entry.kind} task through native activation.${forcedBackground ? " Deployment forces background parent delivery even when run_in_background is omitted or false. Returns an accepted child/message receipt; native completion notifies the parent." : ` Waits for the useful result by default.${background ? " Set run_in_background to receive an accepted child/message receipt; native completion notifies the parent." : " Background execution is disabled."}`}`,
|
|
144
|
+
isConcurrencySafe: () => true,
|
|
144
145
|
parameters: { description: { type: "string", required: true }, prompt: { type: "string", required: true },
|
|
145
146
|
...(entry.targetParameter === undefined ? {} : { [entry.targetParameter]: { type: "string", enum: entry.targets, required: true } }),
|
|
146
147
|
level: { type: "string", enum: ["normal", "low", "high", "max"] },
|
|
@@ -198,9 +199,9 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ad
|
|
|
198
199
|
throw new SubagentError("DSMM exact provider changed before delegation", "NO_PROVIDER");
|
|
199
200
|
};
|
|
200
201
|
signal.throwIfAborted();
|
|
201
|
-
const requestedBackground =
|
|
202
|
+
const requestedBackground = forcedBackground || settings.subagents.enableRunInBackground && args.run_in_background === true;
|
|
202
203
|
assertCurrent();
|
|
203
|
-
const pending = await admission.reserve(exec, invocation, provider, request.maxDepth);
|
|
204
|
+
const pending = await admission.reserve(exec, invocation, provider, args.description, requestedBackground ? "parent" : "caller", request.maxDepth);
|
|
204
205
|
let activation;
|
|
205
206
|
let cancellation;
|
|
206
207
|
const cancel = () => { if (activation) {
|
|
@@ -216,9 +217,8 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ad
|
|
|
216
217
|
await cancellation;
|
|
217
218
|
pending.signal.throwIfAborted();
|
|
218
219
|
}
|
|
219
|
-
const view = invocationView(invocation, args.description, "continuable", { childId: activation.childId });
|
|
220
220
|
if (requestedBackground)
|
|
221
|
-
return { kind: "continuable", subagentId: activation.childId, messageId: activation.messageId ?? null, invocation: { ...view } };
|
|
221
|
+
return { kind: "continuable", subagentId: activation.childId, messageId: activation.messageId ?? null, invocation: { ...pending.view() } };
|
|
222
222
|
const result = await activation.result;
|
|
223
223
|
if (result.stopReason !== "completed")
|
|
224
224
|
incomplete.set(exec.token, result);
|
|
@@ -228,7 +228,7 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ad
|
|
|
228
228
|
if (result.stopReason !== "completed")
|
|
229
229
|
throw new SubagentError(`Role activation ended: ${result.stopReason}`, "DSMM_INCOMPLETE");
|
|
230
230
|
return { kind: "foreground", output: result.output,
|
|
231
|
-
...(result.structured === undefined ? {} : { structured: result.structured }), invocation: { ...view } };
|
|
231
|
+
...(result.structured === undefined ? {} : { structured: result.structured }), invocation: { ...pending.view() } };
|
|
232
232
|
}
|
|
233
233
|
finally {
|
|
234
234
|
pending.signal.removeEventListener("abort", cancel);
|
|
@@ -250,15 +250,6 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
|
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
252
|
const states = new WeakMap();
|
|
253
|
-
const reconcileIdentity = (agent, identity = policy.identity(agent)) => {
|
|
254
|
-
const role = identity.role;
|
|
255
|
-
const state = states.get(agent);
|
|
256
|
-
if (state === undefined || state.identityRole === role)
|
|
257
|
-
return;
|
|
258
|
-
state.identityPrompt?.();
|
|
259
|
-
state.identityPrompt = role === undefined ? undefined : registerRoleHarnessIdentity(agent, role, identity.child);
|
|
260
|
-
state.identityRole = role;
|
|
261
|
-
};
|
|
262
253
|
const reconcile = (agent) => {
|
|
263
254
|
const state = states.get(agent);
|
|
264
255
|
if (state === undefined)
|
|
@@ -273,16 +264,14 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
|
|
|
273
264
|
const promptRealm = Reflect.get(prompt, symbols.original) ?? prompt;
|
|
274
265
|
if (state.promptRealm !== promptRealm) {
|
|
275
266
|
state.guidance?.();
|
|
276
|
-
state.
|
|
277
|
-
state.identityRole = undefined;
|
|
278
|
-
state.guidance = getTraceable(agentCtx, prompt).section({ name: "dsmm:delegation-identity", order: 49, text(context) {
|
|
267
|
+
state.guidance = getTraceable(agentCtx, prompt).section({ name: "dsmm:delegation", order: 49, text(context) {
|
|
279
268
|
if (context.scope !== agent && agentForScope(ctx, context.scope) !== agent)
|
|
280
269
|
return "";
|
|
281
270
|
const identity = policy.identity(agent), tools = states.get(agent)?.tools, settings = getSettings(agent);
|
|
282
271
|
if (identity.role === undefined)
|
|
283
|
-
return
|
|
272
|
+
return "";
|
|
284
273
|
const captured = capturedRoleInvocation(agent);
|
|
285
|
-
return
|
|
274
|
+
return buildDsmmDelegationGuidance(settings, { scope: identity.child ? "child" : "root", tools: tools?.schemas(agent) ?? [],
|
|
286
275
|
delegation: tools === undefined ? [] : admittedCallableRoleInventory(agent, settings, policy, tools),
|
|
287
276
|
...(captured === undefined ? {} : { invocation: roleInvocationObservation(captured, DSMM_ROLES.find(role => role.id === captured.target).name, "continuable", getSettings, agent, { childId: agent.id }) }),
|
|
288
277
|
runtimeAdmission: getSettings.subagentRuntime?.(), capabilities: { continuable: true, nativeChildDelivery: true,
|
|
@@ -290,7 +279,6 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
|
|
|
290
279
|
} });
|
|
291
280
|
state.promptRealm = promptRealm;
|
|
292
281
|
}
|
|
293
|
-
reconcileIdentity(agent, identity);
|
|
294
282
|
const subagents = agentCtx.get("subagents");
|
|
295
283
|
const host = ctx.get?.("tools");
|
|
296
284
|
const names = [...hostControls, ...host?.schemas().map((row) => row.name).filter((name) => name.startsWith(`mcp__${settings.lsp.serverName}__`)) ?? []];
|
|
@@ -347,7 +335,6 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
|
|
|
347
335
|
const state = states.get(agent);
|
|
348
336
|
state?.restriction?.();
|
|
349
337
|
state?.guard?.();
|
|
350
|
-
state?.identityPrompt?.();
|
|
351
338
|
state?.guidance?.();
|
|
352
339
|
for (const dispose of state?.owned ?? [])
|
|
353
340
|
dispose();
|
package/lib/runtime-recovery.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createUserMessage, expandAssistantStream } from "@deepseek-ai/dsh-llm";
|
|
2
2
|
import { foldDurableRecoveryWork, isCurrentRecoveryStep } from "./recovery-policy.js";
|
|
3
3
|
import { isDsmmRoleId } from "./roles.js";
|
|
4
|
-
import { applyModelRoute, isUnavailableRouteFailure, latestNativeModelSelection, liveRolePolicyIdentity, recordAdmittedRecoveryRoute, roleRouteLock, sameExactModelRoute, selectInitialModelRouteChoice } from "./role-routing.js";
|
|
4
|
+
import { applyModelRoute, hostModelSelection, isUnavailableRouteFailure, latestNativeModelSelection, liveRolePolicyIdentity, recordAdmittedRecoveryRoute, roleRouteLock, sameExactModelRoute, sameModelRoute, selectInitialModelRouteChoice } from "./role-routing.js";
|
|
5
5
|
import { modelRouteFromCall, modelRouteFromHeader, projectModelRouteParameters } from "./role-llm.js";
|
|
6
6
|
import { childOwnedSessionEvents, resolveSelectedAgentPreset, sessionEvents } from "./session-scope.js";
|
|
7
7
|
import { resolveAdmittedDsmmRole as resolveEffectiveDsmmRole } from "./role-policy.js";
|
|
@@ -11,6 +11,7 @@ import { currentRequestRouting } from "./request-routing.js";
|
|
|
11
11
|
const installedContexts = new WeakSet();
|
|
12
12
|
const RECOVERY_WARNING = "dsmm runtime recovery refused an unproven or exhausted retry";
|
|
13
13
|
const CONTINUATION_WARNING = "dsmm runtime recovery continuation steering failed for turn";
|
|
14
|
+
const SWITCH_BLOCKED_WARNING = "dsmm runtime recovery cross-route fallback is unavailable on this Host version; retrying the current route";
|
|
14
15
|
function warnSafely(ctx, message) {
|
|
15
16
|
try {
|
|
16
17
|
ctx.logger?.warn(message);
|
|
@@ -68,6 +69,7 @@ export function registerRuntimeRecovery(ctx, controller, getSettings, bindReques
|
|
|
68
69
|
let pendingByAgent = new WeakMap();
|
|
69
70
|
let attemptsByAgent = new WeakMap();
|
|
70
71
|
let continuationsByAgent = new WeakMap();
|
|
72
|
+
const switchBlocked = new WeakSet();
|
|
71
73
|
const waits = new Set();
|
|
72
74
|
let active = true;
|
|
73
75
|
let disposeRequest;
|
|
@@ -248,8 +250,9 @@ export function registerRuntimeRecovery(ctx, controller, getSettings, bindReques
|
|
|
248
250
|
const decision = attempt?.decision;
|
|
249
251
|
decision?.assertCurrent();
|
|
250
252
|
const header = frame.agent.session.requestHeader?.();
|
|
251
|
-
|
|
252
|
-
|
|
253
|
+
const headerRoute = header === undefined ? undefined : modelRouteFromHeader(header);
|
|
254
|
+
if (!active || frame.signal.aborted || lock === undefined || headerRoute === undefined
|
|
255
|
+
|| headerRoute.provider !== frame.provider || !sameModelRoute(headerRoute, lock.route) || headerRoute.reasoningEffort !== lock.route.reasoningEffort
|
|
253
256
|
|| attempt === undefined || attempt.policy !== policy || attempt.generation !== lock.generation
|
|
254
257
|
|| !decision?.configuredRoot && latestNativeModelSelection(frame.agent)?.seq !== attempt.manualSelectionSeq
|
|
255
258
|
|| !isCurrentRecoveryStep(recoveryEvents(frame.agent), frame.turn, frame.step) || !positiveNoOutput(frame, attempt))
|
|
@@ -265,7 +268,7 @@ export function registerRuntimeRecovery(ctx, controller, getSettings, bindReques
|
|
|
265
268
|
attempt.consumed = true;
|
|
266
269
|
const resolved = resolveRoleRuntimePolicy(settings, role);
|
|
267
270
|
const bounds = resolved.rateLimit;
|
|
268
|
-
let route =
|
|
271
|
+
let route = attempt.route;
|
|
269
272
|
let candidateIndex = lock.candidateIndex;
|
|
270
273
|
let switching = false;
|
|
271
274
|
if (unavailable) {
|
|
@@ -281,6 +284,20 @@ export function registerRuntimeRecovery(ctx, controller, getSettings, bindReques
|
|
|
281
284
|
if (!switching && lock.retries >= bounds.maxRetries)
|
|
282
285
|
return undefined;
|
|
283
286
|
}
|
|
287
|
+
// A fixed step selection has no public same-step candidate-switch seam.
|
|
288
|
+
// Rate-limit switching degrades to a bounded current-route retry;
|
|
289
|
+
// unavailable routes stay final.
|
|
290
|
+
if (switching && hostModelSelection(frame.agent) !== undefined) {
|
|
291
|
+
if (unavailable)
|
|
292
|
+
return undefined;
|
|
293
|
+
if (!switchBlocked.has(frame.agent)) {
|
|
294
|
+
switchBlocked.add(frame.agent);
|
|
295
|
+
warnSafely(ctx, SWITCH_BLOCKED_WARNING);
|
|
296
|
+
}
|
|
297
|
+
switching = false;
|
|
298
|
+
if (lock.retries >= bounds.maxRetries)
|
|
299
|
+
return undefined;
|
|
300
|
+
}
|
|
284
301
|
if (switching) {
|
|
285
302
|
if (!unavailable && lock.switches >= bounds.maxSwitches)
|
|
286
303
|
return undefined;
|
|
@@ -294,8 +311,8 @@ export function registerRuntimeRecovery(ctx, controller, getSettings, bindReques
|
|
|
294
311
|
const selected = await selectInitialModelRouteChoice(llm ?? {}, candidates, frame.signal, parameterPolicy.mode === "passthrough" ? ctx.get?.("dsmmLlmRoutes") : undefined, decision?.configuredRoot && parameterPolicy.mode === "native-defaults" ? route => modelRouteFromCall(projectModelRouteParameters(route, "dsmm-config", false)) : undefined, assertRouteCurrent);
|
|
295
312
|
assertRouteCurrent();
|
|
296
313
|
route = parameterPolicy.mode === "native-defaults"
|
|
297
|
-
? modelRouteFromCall(projectModelRouteParameters(selected.
|
|
298
|
-
: selected.
|
|
314
|
+
? modelRouteFromCall(projectModelRouteParameters(selected.proposal, decision?.configuredRoot || selected.requestedRoute.reasoningEffort === undefined ? "dsmm-config" : "native", false))
|
|
315
|
+
: selected.proposal;
|
|
299
316
|
candidateIndex = index + 1 + candidates.findIndex(candidate => sameExactModelRoute(candidate, selected.requestedRoute));
|
|
300
317
|
}
|
|
301
318
|
const serverMinimum = frame.failure.providerRetryAfterMs;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import type { DshSession } from "./dsh-types.js";
|
|
1
|
+
import type { DshSession, DshSessionEvent } from "./dsh-types.js";
|
|
2
2
|
import type { DsmmRolePolicyEventData } from "./dsh-events.js";
|
|
3
|
+
import type { DsmmModelRoute } from "./settings.js";
|
|
4
|
+
export interface DsmmModelSelectionRecordData {
|
|
5
|
+
readonly version: 1;
|
|
6
|
+
readonly source: "dsmm-selection" | "activation-setup";
|
|
7
|
+
readonly selectionSeq: number;
|
|
8
|
+
readonly route: Readonly<Pick<DsmmModelRoute, "provider" | "model" | "reasoningEffort">>;
|
|
9
|
+
}
|
|
3
10
|
declare module "@deepseek-ai/dsh-session/types" {
|
|
4
11
|
interface PluginRecordMap {
|
|
5
12
|
"plugin:dsmm/mode": {
|
|
6
13
|
active: boolean;
|
|
7
14
|
};
|
|
8
15
|
"plugin:dsmm/role-policy": DsmmRolePolicyEventData;
|
|
16
|
+
"plugin:dsmm/model-selection": DsmmModelSelectionRecordData;
|
|
9
17
|
}
|
|
10
18
|
}
|
|
11
19
|
/** Model-hidden observations use the official ignorable record boundary, never authorization. */
|
|
12
20
|
export declare function appendModeRecord(session: DshSession, active: boolean): void;
|
|
13
21
|
export declare function appendRolePolicyRecord(session: DshSession, data: DsmmRolePolicyEventData): void;
|
|
22
|
+
export declare function appendModelSelectionRecord(session: DshSession, data: DsmmModelSelectionRecordData): void;
|
|
23
|
+
export declare function readModelSelectionRecord(event: DshSessionEvent): (DsmmModelSelectionRecordData & {
|
|
24
|
+
recordSeq: number;
|
|
25
|
+
}) | undefined;
|
|
14
26
|
//# sourceMappingURL=session-metadata.d.ts.map
|
package/lib/session-metadata.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { appendPluginRecord } from "@deepseek-ai/dsh-session";
|
|
1
|
+
import { appendPluginRecord, pluginRecordOf } from "@deepseek-ai/dsh-session";
|
|
2
2
|
/** Model-hidden observations use the official ignorable record boundary, never authorization. */
|
|
3
3
|
export function appendModeRecord(session, active) {
|
|
4
4
|
appendPluginRecord(session, "plugin:dsmm/mode", { active });
|
|
@@ -6,4 +6,24 @@ export function appendModeRecord(session, active) {
|
|
|
6
6
|
export function appendRolePolicyRecord(session, data) {
|
|
7
7
|
appendPluginRecord(session, "plugin:dsmm/role-policy", data);
|
|
8
8
|
}
|
|
9
|
+
export function appendModelSelectionRecord(session, data) {
|
|
10
|
+
appendPluginRecord(session, "plugin:dsmm/model-selection", data);
|
|
11
|
+
}
|
|
12
|
+
export function readModelSelectionRecord(event) {
|
|
13
|
+
const record = pluginRecordOf(event);
|
|
14
|
+
if (record?.type !== "plugin:dsmm/model-selection" || !isRecord(record.data))
|
|
15
|
+
return undefined;
|
|
16
|
+
const { version, source, selectionSeq, route } = record.data;
|
|
17
|
+
if (version !== 1 || source !== "dsmm-selection" && source !== "activation-setup"
|
|
18
|
+
|| !Number.isSafeInteger(selectionSeq) || typeof selectionSeq !== "number" || selectionSeq < 0 || !isRecord(route)
|
|
19
|
+
|| Object.keys(route).some(key => !["provider", "model", "reasoningEffort"].includes(key))
|
|
20
|
+
|| typeof route.provider !== "string" || route.provider.trim() === "" || typeof route.model !== "string" || route.model.trim() === ""
|
|
21
|
+
|| route.reasoningEffort !== undefined && (typeof route.reasoningEffort !== "string" || route.reasoningEffort.trim() === ""))
|
|
22
|
+
return undefined;
|
|
23
|
+
return { version, source, selectionSeq, route: { provider: route.provider, model: route.model,
|
|
24
|
+
...(route.reasoningEffort === undefined ? {} : { reasoningEffort: route.reasoningEffort }) }, recordSeq: Number(record.seq) };
|
|
25
|
+
}
|
|
26
|
+
function isRecord(value) {
|
|
27
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28
|
+
}
|
|
9
29
|
//# sourceMappingURL=session-metadata.js.map
|
package/lib/settings.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface DsmmSubagentSettings {
|
|
|
44
44
|
toolTopology: DsmmToolTopology;
|
|
45
45
|
allowRouteOverride: boolean;
|
|
46
46
|
enableRunInBackground: boolean;
|
|
47
|
+
forceBackground: boolean;
|
|
47
48
|
backgroundMode: "one-shot" | "continuable";
|
|
48
49
|
/** Omitted delegates to the native host limit (rc.2 default 1). */
|
|
49
50
|
maxDepth?: number;
|
package/lib/settings.js
CHANGED
|
@@ -26,7 +26,7 @@ export const DEFAULT_DSMM_SETTINGS = {
|
|
|
26
26
|
presets: {
|
|
27
27
|
materialize: false
|
|
28
28
|
},
|
|
29
|
-
subagents: { enableRunInBackground: false, backgroundMode: "one-shot", toolTopology: "per-role", allowRouteOverride: false },
|
|
29
|
+
subagents: { enableRunInBackground: false, forceBackground: false, backgroundMode: "one-shot", toolTopology: "per-role", allowRouteOverride: false },
|
|
30
30
|
workflow: {
|
|
31
31
|
policy: "risk-based",
|
|
32
32
|
strictGates: true,
|
|
@@ -129,6 +129,7 @@ const SUBAGENTS_SCHEMA = Schema.object({
|
|
|
129
129
|
toolTopology: Schema.union([Schema.const("per-role"), Schema.const("parameterized")]).default("per-role"),
|
|
130
130
|
allowRouteOverride: Schema.boolean().default(false),
|
|
131
131
|
enableRunInBackground: Schema.boolean().default(false),
|
|
132
|
+
forceBackground: Schema.boolean().default(false),
|
|
132
133
|
backgroundMode: Schema.union([Schema.const("one-shot"), Schema.const("continuable")]).default("one-shot"),
|
|
133
134
|
maxDepth: Schema.number().step(1).min(0).max(Number.MAX_SAFE_INTEGER)
|
|
134
135
|
});
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { LookupAddress } from "node:dns";
|
|
2
|
-
|
|
2
|
+
/** The 0.2.1 injected-resolver contract, kept locally: 0.2.2 removed the seam and the export. */
|
|
3
|
+
export type AddressResolver = (hostname: string, signal: AbortSignal) => Promise<{
|
|
4
|
+
address: string;
|
|
5
|
+
family: 4 | 6;
|
|
6
|
+
}[]>;
|
|
3
7
|
export type AddressLookup = (hostname: string, options: {
|
|
4
8
|
all: true;
|
|
5
9
|
order: "verbatim";
|
|
@@ -20,5 +24,5 @@ export declare class FakeIpAddressPolicy {
|
|
|
20
24
|
allowsTranslatedIpv4(input: string): boolean;
|
|
21
25
|
}
|
|
22
26
|
/** Resolve once; the native provider pins exactly this validated, nonempty set. */
|
|
23
|
-
export declare function createFakeIpResolver(policy?: FakeIpAddressPolicy, lookup?: AddressLookup):
|
|
27
|
+
export declare function createFakeIpResolver(policy?: FakeIpAddressPolicy, lookup?: AddressLookup): AddressResolver;
|
|
24
28
|
//# sourceMappingURL=web-fetch-address-policy.d.ts.map
|
|
@@ -16,6 +16,12 @@ export declare class FakeIpHttpFetchProvider implements WebFetchProvider {
|
|
|
16
16
|
private readonly limits;
|
|
17
17
|
private readonly policy;
|
|
18
18
|
private readonly resolver;
|
|
19
|
+
/**
|
|
20
|
+
* 0.2.1 accepted an injected address resolver; 0.2.2 removed that seam and
|
|
21
|
+
* routes every request through the process-wide dispatcher. The owner of the
|
|
22
|
+
* process transport policy stays the Host — this adapter never installs one.
|
|
23
|
+
*/
|
|
24
|
+
private readonly resolverAccepted;
|
|
19
25
|
constructor(config?: Config, lookup?: AddressLookup);
|
|
20
26
|
available(): boolean;
|
|
21
27
|
fetch(request: WebFetchRequest, signal?: AbortSignal): Promise<WebFetchResult>;
|
package/lib/web-fetch-fakeip.js
CHANGED
|
@@ -4,6 +4,7 @@ import { HttpFetchProvider, DEFAULT_USER_AGENT } from "@deepseek-ai/dsh-web-fetc
|
|
|
4
4
|
import { proxyRouteFor } from "@deepseek-ai/dsh-http-proxy";
|
|
5
5
|
import { isIP } from "node:net";
|
|
6
6
|
import { FakeIpAddressPolicy, createFakeIpResolver, isFakeIpAddress, stripIpv6Brackets, } from "./web-fetch-address-policy.js";
|
|
7
|
+
const dualHttpFetchProvider = HttpFetchProvider;
|
|
7
8
|
export const name = "dsmm-http-fakeip";
|
|
8
9
|
export const FETCH_PROVIDER_ID = "dsmm-http-fakeip";
|
|
9
10
|
export const inject = ["web"];
|
|
@@ -59,13 +60,22 @@ export class FakeIpHttpFetchProvider {
|
|
|
59
60
|
limits;
|
|
60
61
|
policy;
|
|
61
62
|
resolver;
|
|
63
|
+
/**
|
|
64
|
+
* 0.2.1 accepted an injected address resolver; 0.2.2 removed that seam and
|
|
65
|
+
* routes every request through the process-wide dispatcher. The owner of the
|
|
66
|
+
* process transport policy stays the Host — this adapter never installs one.
|
|
67
|
+
*/
|
|
68
|
+
resolverAccepted;
|
|
62
69
|
constructor(config = {}, lookup) {
|
|
63
70
|
this.limits = resolveLimits(config);
|
|
64
71
|
this.policy = new FakeIpAddressPolicy(config);
|
|
65
72
|
this.resolver = createFakeIpResolver(this.policy, lookup);
|
|
73
|
+
this.resolverAccepted = Object.hasOwn(new HttpFetchProvider(this.limits), "resolveAddresses");
|
|
66
74
|
}
|
|
67
75
|
available() {
|
|
68
|
-
return
|
|
76
|
+
return this.resolverAccepted
|
|
77
|
+
? new dualHttpFetchProvider(this.limits, this.resolver).available()
|
|
78
|
+
: new dualHttpFetchProvider(this.limits).available();
|
|
69
79
|
}
|
|
70
80
|
fetch(request, signal) {
|
|
71
81
|
if (signal?.aborted)
|
|
@@ -83,6 +93,23 @@ export class FakeIpHttpFetchProvider {
|
|
|
83
93
|
catch (error) {
|
|
84
94
|
return Promise.reject(error);
|
|
85
95
|
}
|
|
96
|
+
if (!this.resolverAccepted) {
|
|
97
|
+
// 0.2.2 neither resolves nor pins addresses: the native provider sends the
|
|
98
|
+
// request through the installed dispatcher. Answer-level enforcement this
|
|
99
|
+
// adapter owned on 0.2.1 has no public seam back, so a configured local
|
|
100
|
+
// deny fails closed for direct hostnames and native IPv6 literals whose
|
|
101
|
+
// translated destination cannot be checked. IPv4/mapped literals retain
|
|
102
|
+
// their entry checks above.
|
|
103
|
+
const host = stripIpv6Brackets(url.hostname);
|
|
104
|
+
const literal = isIP(host) !== 0;
|
|
105
|
+
const nativeIpv6Literal = isIP(host) === 6 && !host.toLowerCase().startsWith("::ffff:");
|
|
106
|
+
const route = proxyRouteFor(url);
|
|
107
|
+
if (this.policy.requiresLocalDeny && (!literal || nativeIpv6Literal) && !route.proxied) {
|
|
108
|
+
return Promise.reject(new WebError("direct destinations cannot enforce local address denies on this Host version", "WEB_FAKEIP_PROXY_UNSUPPORTED"));
|
|
109
|
+
}
|
|
110
|
+
const limits = nativeIpv6Literal ? { ...this.limits, maxRedirects: 0 } : this.limits;
|
|
111
|
+
return new HttpFetchProvider(limits).fetch(request, signal);
|
|
112
|
+
}
|
|
86
113
|
// Same-origin redirects preserve the full routing key. Recheck inside the
|
|
87
114
|
// resolver as well: rc.2 otherwise sends proxied Fake-IP literals direct.
|
|
88
115
|
const resolve = (hostname, innerSignal) => {
|
|
@@ -97,7 +124,7 @@ export class FakeIpHttpFetchProvider {
|
|
|
97
124
|
const limits = this.policy.requiresLocalDeny || nativeIpv6Literal
|
|
98
125
|
? { ...this.limits, maxRedirects: 0 }
|
|
99
126
|
: this.limits;
|
|
100
|
-
return new
|
|
127
|
+
return new dualHttpFetchProvider(limits, resolve).fetch(request, signal);
|
|
101
128
|
}
|
|
102
129
|
}
|
|
103
130
|
/** Mount only when the operator has explicitly selected this adapter. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsmm/dsmm",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"description": "Native Deepwork roles, routing, profiles, and permission controls for DeepSeek Harness.",
|
|
5
5
|
"author": "Hugefiver",
|
|
6
6
|
"license": "LicenseRef-AAAPL",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
],
|
|
115
115
|
"engines": {
|
|
116
116
|
"node": ">=22",
|
|
117
|
-
"dsh": ">=0.2.1-rc.2 <0.3.0"
|
|
117
|
+
"dsh": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0"
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@deepseek-ai/dsh-web-fetch-http": "0.2.1-rc.2",
|
package/prompts/deepwork.md
CHANGED
|
@@ -13,7 +13,7 @@ Understand the requested outcome and relevant facts first. Load the full `brains
|
|
|
13
13
|
|
|
14
14
|
# Deepwork Workflow Prompt - default
|
|
15
15
|
|
|
16
|
-
You are running the skill-driven deepwork workflow. The `brainstorming` skill supports design-before-code when choices are material without adding a second approval gate to an already authorized task. Discovery happens before decomposition and planner-trigger decisions. Complex implementation of product business logic or behavior defaults to `planner` → `plan-critic` → implementation. Skip that sequence only for a limited, simple, low-risk, clearly bounded change or an explicit user request, and state the applicable exception in conversation; clear requirements, strong capability, sufficient evidence, or a direct path do not exempt that product work. When the requirement is materially ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Deepwork skills are discoverable as native metadata — load their bodies on demand when the trigger matches.
|
|
16
|
+
You are running the skill-driven deepwork workflow. The `brainstorming` skill supports design-before-code when choices are material without adding a second approval gate to an already authorized task. Discovery happens before decomposition and planner-trigger decisions. Complex implementation of product business logic or behavior defaults to `planner` → `plan-critic` → implementation. Skip that sequence only for a limited, simple, low-risk, clearly bounded change or an explicit user request, and state the applicable exception in conversation; clear requirements, strong capability, sufficient evidence, or a direct path do not exempt that product work. When the requirement is materially ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Deepwork skills are discoverable as native metadata — load their bodies on demand when the trigger matches.
|
|
17
17
|
|
|
18
18
|
## Local Agent Structure
|
|
19
19
|
|
|
@@ -55,19 +55,7 @@ Load skills on demand when their phase applies:
|
|
|
55
55
|
|
|
56
56
|
For a limited, simple, low-risk, clearly bounded change, skip unnecessary planning ceremony and state the applicable exception in conversation while keeping the same evidence standard.
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
| Skill | When to load | Command |
|
|
61
|
-
|---|---|---|
|
|
62
|
-
| brainstorming | material design choices or ambiguity; strict approval only when explicitly requested or justified by scoped concrete risk | native skill load when triggered |
|
|
63
|
-
| writing-plans | complex product behavior implementation, explicit planning request, or concrete major risk requiring a plan | writing-plans |
|
|
64
|
-
| subagent-driven-development | executing an implementation plan with independent tasks | subagent-driven-development |
|
|
65
|
-
| requesting-code-review | explicit review requirement or concrete implementation risk needing independent evidence | requesting-code-review |
|
|
66
|
-
| receiving-code-review | receiving code review feedback, before implementing suggestions | receiving-code-review |
|
|
67
|
-
| dispatching-parallel-agents | 2+ independent tasks with no shared state or sequential dependencies | dispatching-parallel-agents |
|
|
68
|
-
| remove-ai-slops | user asks to "remove slop", "clean AI code", "deslop", or wants systematic AI-slop cleanup | remove-ai-slops |
|
|
69
|
-
|
|
70
|
-
Do NOT load a skill unless its trigger matches. Loading unnecessary skills wastes context.
|
|
58
|
+
For parallel work on independent tasks with no shared state or sequential dependencies, load `dispatching-parallel-agents` when available. Use the current skill catalog to discover other skills and load them only when their triggers match.
|
|
71
59
|
|
|
72
60
|
## Execution Rules
|
|
73
61
|
|
|
@@ -84,6 +72,7 @@ Do NOT load a skill unless its trigger matches. Loading unnecessary skills waste
|
|
|
84
72
|
- Surface current constraints, unresolved facts or authorization, material risks, and missing acceptance evidence, not a ruling or assumption history. Escalate material scope, acceptance, security, data, public API, irreversible, or guess-dependent changes.
|
|
85
73
|
- An acknowledgment is not evidence, but optional or redundant children do not block a result already proved through the relevant interfaces. Preserve applicable background-work cleanup behavior.
|
|
86
74
|
- A blocker stops only work and completion claims that depend on it. Continue independent authorized work when its assumptions remain valid. Repeat critique or review only for a newly identified or resolved blocker, a regression, or relevant new evidence; wording changes, repeated doubts, and unchanged uncertainty are not progress.
|
|
75
|
+
- A user refusal cannot be bypassed with another tool, path, command, or agent. For a permission denial, follow only the host's expressly permitted approval path; otherwise stop that operation.
|
|
87
76
|
- Git writes require specific authorization expressed as a clear semantic request. Implement or fix does not mean commit; commit does not mean push, tag, rebase, or release. Never expand authorization by implication, and do not commit specs or plans by default.
|
|
88
77
|
- Never suppress type errors with `as any`, `@ts-ignore`, or `@ts-expect-error`.
|
|
89
78
|
- Never delete or weaken tests to pass.
|
|
@@ -171,17 +160,6 @@ Final answers must name what changed, what was verified, and any remaining risk
|
|
|
171
160
|
|
|
172
161
|
---
|
|
173
162
|
|
|
174
|
-
<dsmm-host-contract>
|
|
175
|
-
Use the current DSH 0.2.1-rc.2 catalog: read/glob/grep for files, web_search/web_fetch for external facts, write/edit and the actual bash/pwsh for authorized edits and execution, and native skill invocation for triggered skills. Native read takes file_path; inspect actual schemas, not OpenCode field names. Use exposed ask_user_question or ask a material question in conversation. Use exposed todo_write for useful Agent-owned whole-list tracking under its actual concurrency policy. Use LSP/browser/read_image only when present and supported by the actual route; fall back to direct evidence or report the capability unavailable. No Task/todowrite/compress/Context7 MCP API is assumed; host compaction is not a model-facing compression tool.
|
|
176
|
-
Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
|
|
177
|
-
One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
|
|
178
|
-
The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
|
|
179
|
-
Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
|
|
180
|
-
Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
|
|
181
|
-
</dsmm-host-contract>
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
163
|
<avoid-ai-slop-guidance>
|
|
186
164
|
Before continuing code, test, or documentation work with a concrete risk of speculative abstractions, redundant defenses or fallbacks, filler explanations, or checks that prove no required behavior, load `avoid-ai-slop` through the host's native skill mechanism. Also load it when the user explicitly asks to avoid AI slop. Reuse an already-loaded skill in the current context; do not load it for every message or ordinary factual question. Respect the actual skill catalog, disabled settings, role permissions, and applicable Deepwork gating; do not bypass an unavailable or disabled skill. Apply it only to the current authorized work, not an automatic `remove-ai-slops` cleanup.
|
|
187
165
|
</avoid-ai-slop-guidance>
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# CLAUDE OPUS 5 EXECUTION CALIBRATION
|
|
4
|
-
|
|
5
|
-
Apply this additive layer only to a Claude Opus 5 or 5.5 orchestrator (including valid dated or named snapshots). The role prompt, workflow rules, explicit user configuration/authorization, verification requirements including required evidence/review, applicable loaded skills, and effective terminal policies remain authoritative and override this additive calibration.
|
|
1
|
+
# Bounded Execution
|
|
6
2
|
|
|
7
3
|
## Scope fidelity
|
|
8
4
|
|
|
@@ -21,10 +17,8 @@ Apply this additive layer only to a Claude Opus 5 or 5.5 orchestrator (including
|
|
|
21
17
|
- Reuse passing evidence while it still covers the claim and no change materially affects tested behavior or interfaces; rerun only affected or missing checks.
|
|
22
18
|
- Preserve every required final review and required evidence; efficiency never removes them.
|
|
23
19
|
- Prefer a path, a commit, or the uncommitted working-tree change over an invented hash, checksum, or revision stamp. Treat RED/GREEN as evidence at a real deterministic seam rather than a universal gate.
|
|
24
|
-
-
|
|
20
|
+
- Scale process to the request rather than defaulting upward, and recheck only what the current step depends on when runtime or path state drifts.
|
|
25
21
|
|
|
26
22
|
## Communication
|
|
27
23
|
|
|
28
24
|
- Start with one sentence stating the intended outcome, stay quiet between tool calls, and finish with a short outcome-first report.
|
|
29
|
-
|
|
30
|
-
</deepwork-mode>
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
# Native Tool Compatibility
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This is a host-compatibility base, not a second GPT behavioral calibration. Detected GPT/Codex-family models receive the shared `gpt.md` calibration once, subordinate to their role.
|
|
6
|
-
|
|
7
|
-
Use the currently observed DSH per-role or parameterized role/category tools for permitted delegation, an available native tracking surface or authorized plan for coordination, and exposed editing/LSP tools rather than Codex-only names. Level/route/background and same-ID continuation depend on captured admission and actual schemas, never on templates. Do not send task_id or invent a control RPC. Load matching skills through native skill invocation.
|
|
8
|
-
|
|
9
|
-
</deepwork-mode>
|
|
3
|
+
Use the currently observed DSH per-role or parameterized role/category tools for permitted delegation, an available native tracking surface or authorized plan for coordination, and exposed editing/LSP tools rather than names from another host. Level/route/background and same-ID continuation depend on captured admission and actual schemas, never on templates. Do not send task_id or invent a control RPC. Load matching skills through native skill invocation.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Deepwork Workflow Prompt - default
|
|
6
6
|
|
|
7
|
-
You are running the skill-driven deepwork workflow. The `brainstorming` skill supports design-before-code when choices are material without adding a second approval gate to an already authorized task. Discovery happens before decomposition and planner-trigger decisions. Complex implementation of product business logic or behavior defaults to `planner` → `plan-critic` → implementation. Skip that sequence only for a limited, simple, low-risk, clearly bounded change or an explicit user request, and state the applicable exception in conversation; clear requirements, strong capability, sufficient evidence, or a direct path do not exempt that product work. When the requirement is materially ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Deepwork skills are discoverable as native metadata — load their bodies on demand when the trigger matches.
|
|
7
|
+
You are running the skill-driven deepwork workflow. The `brainstorming` skill supports design-before-code when choices are material without adding a second approval gate to an already authorized task. Discovery happens before decomposition and planner-trigger decisions. Complex implementation of product business logic or behavior defaults to `planner` → `plan-critic` → implementation. Skip that sequence only for a limited, simple, low-risk, clearly bounded change or an explicit user request, and state the applicable exception in conversation; clear requirements, strong capability, sufficient evidence, or a direct path do not exempt that product work. When the requirement is materially ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Deepwork skills are discoverable as native metadata — load their bodies on demand when the trigger matches.
|
|
8
8
|
|
|
9
9
|
## Local Agent Structure
|
|
10
10
|
|
|
@@ -46,19 +46,7 @@ Load skills on demand when their phase applies:
|
|
|
46
46
|
|
|
47
47
|
For a limited, simple, low-risk, clearly bounded change, skip unnecessary planning ceremony and state the applicable exception in conversation while keeping the same evidence standard.
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| Skill | When to load | Command |
|
|
52
|
-
|---|---|---|
|
|
53
|
-
| brainstorming | material design choices or ambiguity; strict approval only when explicitly requested or justified by scoped concrete risk | native skill load when triggered |
|
|
54
|
-
| writing-plans | complex product behavior implementation, explicit planning request, or concrete major risk requiring a plan | writing-plans |
|
|
55
|
-
| subagent-driven-development | executing an implementation plan with independent tasks | subagent-driven-development |
|
|
56
|
-
| requesting-code-review | explicit review requirement or concrete implementation risk needing independent evidence | requesting-code-review |
|
|
57
|
-
| receiving-code-review | receiving code review feedback, before implementing suggestions | receiving-code-review |
|
|
58
|
-
| dispatching-parallel-agents | 2+ independent tasks with no shared state or sequential dependencies | dispatching-parallel-agents |
|
|
59
|
-
| remove-ai-slops | user asks to "remove slop", "clean AI code", "deslop", or wants systematic AI-slop cleanup | remove-ai-slops |
|
|
60
|
-
|
|
61
|
-
Do NOT load a skill unless its trigger matches. Loading unnecessary skills wastes context.
|
|
49
|
+
For parallel work on independent tasks with no shared state or sequential dependencies, load `dispatching-parallel-agents` when available. Use the current skill catalog to discover other skills and load them only when their triggers match.
|
|
62
50
|
|
|
63
51
|
## Execution Rules
|
|
64
52
|
|
|
@@ -75,6 +63,7 @@ Do NOT load a skill unless its trigger matches. Loading unnecessary skills waste
|
|
|
75
63
|
- Surface current constraints, unresolved facts or authorization, material risks, and missing acceptance evidence, not a ruling or assumption history. Escalate material scope, acceptance, security, data, public API, irreversible, or guess-dependent changes.
|
|
76
64
|
- An acknowledgment is not evidence, but optional or redundant children do not block a result already proved through the relevant interfaces. Preserve applicable background-work cleanup behavior.
|
|
77
65
|
- A blocker stops only work and completion claims that depend on it. Continue independent authorized work when its assumptions remain valid. Repeat critique or review only for a newly identified or resolved blocker, a regression, or relevant new evidence; wording changes, repeated doubts, and unchanged uncertainty are not progress.
|
|
66
|
+
- A user refusal cannot be bypassed with another tool, path, command, or agent. For a permission denial, follow only the host's expressly permitted approval path; otherwise stop that operation.
|
|
78
67
|
- Git writes require specific authorization expressed as a clear semantic request. Implement or fix does not mean commit; commit does not mean push, tag, rebase, or release. Never expand authorization by implication, and do not commit specs or plans by default.
|
|
79
68
|
- Never suppress type errors with `as any`, `@ts-ignore`, or `@ts-expect-error`.
|
|
80
69
|
- Never delete or weaken tests to pass.
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# GEMINI 4.x RELIABILITY CALIBRATION
|
|
4
|
-
|
|
5
|
-
Apply only to Gemini 4.x models, including Argon-named variants. This local additive adapts generic Gemini guidance; it is not an independently sourced Argon prompt or a claim of new capabilities. The role prompt, effective workflow, authorization, permissions, native tool inventory and verification requirements remain authoritative.
|
|
1
|
+
# Evidence-grounded Execution
|
|
6
2
|
|
|
7
3
|
- Distinguish a request to explain, investigate or review from authorization to implement. Take the next in-scope action when authorized; do not substitute confident reasoning or a promise for execution.
|
|
8
4
|
- Base file, configuration and runtime claims on inspected evidence rather than guessed contents. Reuse still-valid observations; retrieve again only for a concrete missing fact or relevant change, not a ritual reread.
|
|
9
5
|
- Use the actual admitted tools and schemas for execution and verification. A plausible patch or successful compilation alone does not prove the requested behavior; exercise the affected surface when available and disclose missing coverage.
|
|
10
6
|
- Keep specialist use within the role's delegation contract. Calibration does not turn a planner, reviewer or category worker into an orchestrator, grant file writes, or create tools or native task lifecycle handles.
|
|
11
7
|
- Preserve required content and scope. Do not add polish, abstractions, workflow gates or adjacent cleanup merely because they seem useful. Stop repeated checks or retries without new evidence; report unmet requirements instead of asserting success.
|
|
12
|
-
|
|
13
|
-
</gemini-4-calibration>
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
### Skill use
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Load the full `brainstorming` native skill when material uncertainty needs discovery or design, not merely because a request changes behavior. Clear, authorized work follows the applicable workflow directly. Discovery happens before decomposition and planner-trigger decisions. Use a permitted, available `clarifier` only when it materially helps resolve ambiguity; ask the user when their decision is needed.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Load the full `brainstorming` native skill when material uncertainty needs discovery or design, not merely because a request changes behavior. Clear, authorized work follows the applicable workflow directly. Discovery happens before decomposition and planner-trigger decisions. Use a permitted, available `clarifier` only when it materially helps resolve ambiguity; ask the user when their decision is needed. Other skills are on-demand native skills:
|
|
8
|
-
|
|
9
|
-
| Skill | When to load | Command |
|
|
10
|
-
|---|---|---|
|
|
11
|
-
| brainstorming | material uncertainty needing discovery or design | native skill load when triggered |
|
|
12
|
-
| writing-plans | complex product behavior implementation, explicit planning request, or concrete major risk requiring a plan | writing-plans |
|
|
13
|
-
| subagent-driven-development | executing a plan with independent tasks | subagent-driven-development |
|
|
14
|
-
| requesting-code-review | focused implementation review when the user requires it or a concrete risk makes it useful | requesting-code-review |
|
|
15
|
-
| receiving-code-review | receiving code review feedback | receiving-code-review |
|
|
16
|
-
| dispatching-parallel-agents | 2+ independent tasks, no shared state | dispatching-parallel-agents |
|
|
17
|
-
| remove-ai-slops | user asks to "remove slop", "deslop", clean AI code | remove-ai-slops |
|
|
18
|
-
|
|
19
|
-
Do NOT load a skill unless its trigger matches. Loading unnecessary skills wastes context.
|
|
5
|
+
Discover skills through the current runtime catalog and load them only when their triggers match.
|
|
20
6
|
|
|
21
7
|
<scope_constraints>
|
|
22
8
|
- Implement EXACTLY and ONLY what the user requested.
|
|
@@ -192,5 +178,3 @@ Git writes require authorization for the exact action. A semantically clear requ
|
|
|
192
178
|
- **NO LOCK SCAFFOLDING**: Don't build tooling, scripts, manifests, or harnesses that pin, freeze, or re-assert the state of unrelated files, the environment, or prior work. Don't re-confirm the working directory or unrelated file state you already observed when runtime or path state drifts benignly.
|
|
193
179
|
|
|
194
180
|
THE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.
|
|
195
|
-
|
|
196
|
-
</deepwork-mode>
|