@dsmm/dsmm 0.3.7 → 0.3.8

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.
@@ -28,7 +28,7 @@ Configuration writes require the real native operator, exact entry/form or Root
28
28
 
29
29
  Use **Plugins → DSMM bundle config → Permissions**. The selected Global/native-profile scope edits its sparse deployment policy; a separate Root-rules transaction writes Global only under the existing live operator, exact open Root, registration and synchronized-policy authority. A child, stale connection, read-only Host or shadowing native policy doesn't acquire a fallback Global write. Named Profiles can't grant these permissions. No duplicate Settings permission page or Conversation permission tab is registered.
30
30
 
31
- A trusted, writable ordinary native Root can manage Global rules without DSMM role admission, including when it predates Core mounting. This does not grant it a DSMM role. Captured DSMM objects still require current admission and role checks; retired captures and unadmitted Roots currently composed with a `dsmm-` preset cannot fall back to ordinary native authority.
31
+ A trusted, writable native Root can manage Global rules without DSMM role admission, including when it predates Core mounting and currently uses the user-selectable `dsmm-orchestrator` composition. Qualification uses the current native composition, never a historical preset label; auxiliary, read-only and unknown `dsmm-` compositions remain ineligible without admission. Rule management does not grant DSMM role execution rights. Captured DSMM objects still require current admission and role checks, and retired captures cannot fall back to ordinary native authority.
32
32
 
33
33
  `permissionControl.nativeCommands` defaults off. Each entry stores exactly one match shape, `{ tool, workingDirectory, commandPattern }`. Legacy `executable`/`subcommand`/`args` entries are not migrated, converted or silently dropped: configuration, persistence, runtime and the form reject them, so an older configuration must be rewritten explicitly rather than widened in place.
34
34
 
@@ -1,7 +1,7 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import { scopeLifetime } from "./lifetime.js";
3
3
  import { PermissionRefusal, permissionOriginal } from "./permission-control.js";
4
- import { DSMM_ROLES } from "./roles.js";
4
+ import { DSMM_DISPATCHER_ROLE, DSMM_ROLES, isRootRole } from "./roles.js";
5
5
  import { capturedRoleInvocation } from "./role-invocation.js";
6
6
  function sameFacts(a, b) {
7
7
  return a.length === b.length && a.every((value, index) => value === b[index]);
@@ -220,8 +220,14 @@ export function createCorePermissionAuthority(ctx, options) {
220
220
  const structural = root, profiles = coreDomain(root), host = integration();
221
221
  const captured = host?.owns(root) === true || capturedRoleInvocation(structural) !== undefined;
222
222
  const native = !captured && !profiles.hasAdmission(structural);
223
- if (native && root.ctx.get("agentPresets")?.composedPreset(root.ctx)?.startsWith("dsmm-"))
224
- throw new PermissionRefusal("denied");
223
+ if (native) {
224
+ const preset = root.ctx.get("agentPresets")?.composedPreset(root.ctx);
225
+ if (preset?.startsWith("dsmm-")) {
226
+ const definition = DSMM_ROLES.find(role => role.id === preset);
227
+ if (preset !== DSMM_DISPATCHER_ROLE || definition === undefined || !isRootRole(definition) || definition.access !== "write")
228
+ throw new PermissionRefusal("denied");
229
+ }
230
+ }
225
231
  if (captured) {
226
232
  if (host === undefined)
227
233
  throw new PermissionRefusal("unavailable");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmm/dsmm",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "DeepSeek Harness deepwork mode bundle for ocmm-style agentic workflows.",
5
5
  "author": "Hugefiver",
6
6
  "license": "LicenseRef-AAAPL",