@dsmm/dsmm 0.2.2 → 0.3.1
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 +26 -42
- package/cordis.patch.yml +1 -0
- package/docs/agent-presets.md +26 -14
- package/docs/compatibility.md +20 -79
- package/docs/deferred-native-approval-risk.md +8 -12
- package/docs/design.md +25 -254
- package/docs/lsp.md +2 -2
- package/docs/migration-from-ocmm.md +38 -51
- package/docs/model-routing.md +21 -21
- package/docs/native-permissions.md +17 -7
- package/docs/profiles.md +13 -9
- package/docs/releasing.md +34 -240
- package/docs/roadmap.md +23 -254
- package/docs/runtime-recovery.md +29 -91
- package/docs/safety-guards.md +19 -16
- package/docs/settings-status.md +23 -11
- package/docs/skill-sync.md +17 -17
- package/docs/web-fetch-fakeip.md +82 -0
- package/lib/child-capture.d.ts +16 -2
- package/lib/child-capture.js +29 -10
- package/lib/client/ChildrenPanel.d.ts +1 -4
- package/lib/client/ChildrenPanel.js +4 -16
- package/lib/client/DeploymentFields.d.ts +28 -0
- package/lib/client/DeploymentFields.js +68 -0
- package/lib/client/DeploymentPage.d.ts +17 -5
- package/lib/client/DeploymentPage.js +79 -112
- package/lib/client/NativeCommandEntries.d.ts +17 -0
- package/lib/client/NativeCommandEntries.js +68 -0
- package/lib/client/PermissionsPanel.d.ts +1 -1
- package/lib/client/PermissionsPanel.js +8 -8
- package/lib/client/ProfilesSection.js +7 -5
- package/lib/client/RoleToolView-data.d.ts +35 -0
- package/lib/client/RoleToolView-data.js +52 -0
- package/lib/client/RoleToolView-locales.d.ts +36 -0
- package/lib/client/RoleToolView-locales.js +20 -0
- package/lib/client/RoleToolView.d.ts +10 -0
- package/lib/client/RoleToolView.js +47 -0
- package/lib/client/SessionProfiles.js +39 -15
- package/lib/client/children-controller.d.ts +2 -8
- package/lib/client/children-controller.js +1 -26
- package/lib/client/children-locales.d.ts +26 -51
- package/lib/client/children-locales.js +8 -12
- package/lib/client/configuration-display.d.ts +5 -0
- package/lib/client/configuration-display.js +11 -0
- package/lib/client/controller.d.ts +1 -0
- package/lib/client/controller.js +20 -13
- package/lib/client/deployment-controller.d.ts +13 -1
- package/lib/client/deployment-controller.js +85 -25
- package/lib/client/deployment-data.d.ts +1 -0
- package/lib/client/deployment-data.js +4 -1
- package/lib/client/deployment-locales.d.ts +43 -0
- package/lib/client/deployment-locales.js +35 -9
- package/lib/client/deployment-modules.d.ts +9 -0
- package/lib/client/deployment-modules.js +24 -0
- package/lib/client/deployment-workspace.d.ts +48 -0
- package/lib/client/deployment-workspace.js +123 -0
- package/lib/client/index.js +11 -74
- package/lib/client/locales.d.ts +7 -0
- package/lib/client/locales.js +12 -6
- package/lib/client/permission-controller.d.ts +1 -0
- package/lib/client/permission-controller.js +3 -2
- package/lib/client/permission-locales.d.ts +25 -0
- package/lib/client/permission-locales.js +24 -4
- package/lib/client/session-labels.js +4 -3
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +9 -8
- package/lib/client.js +2716 -2364
- package/lib/commands.js +2 -0
- package/lib/config-file-store.d.ts +3 -0
- package/lib/config-file-store.js +4 -2
- package/lib/config-revision.d.ts +5 -0
- package/lib/config-revision.js +11 -0
- package/lib/core-permission-authority.js +11 -41
- package/lib/deployment-config.d.ts +9 -2
- package/lib/deployment-config.js +35 -8
- package/lib/deployment-permission-rules.js +19 -7
- package/lib/dsh-types.d.ts +1 -1
- package/lib/host-llm-startup.js +3 -3
- package/lib/host-llm.d.ts +9 -3
- package/lib/host-llm.js +48 -8
- package/lib/index.d.ts +17 -21
- package/lib/index.js +131 -430
- package/lib/lifetime.d.ts +4 -0
- package/lib/lifetime.js +22 -0
- package/lib/live-pi-ai-owner.d.ts +1 -0
- package/lib/live-pi-ai-owner.js +8 -4
- package/lib/mode.d.ts +3 -2
- package/lib/mode.js +28 -41
- package/lib/model-routing.d.ts +2 -8
- package/lib/model-routing.js +59 -175
- package/lib/native-admission.d.ts +56 -0
- package/lib/native-admission.js +313 -0
- package/lib/native-pi-ai-wire.d.ts +3 -1
- package/lib/native-pi-ai-wire.js +47 -13
- package/lib/permission-control.d.ts +0 -3
- package/lib/permission-rpc.js +3 -3
- package/lib/preset-registry.js +3 -2
- package/lib/preset-skills.d.ts +3 -12
- package/lib/preset-skills.js +28 -58
- package/lib/profile-diagnostics.d.ts +1 -1
- package/lib/profile-diagnostics.js +2 -2
- package/lib/profile-remote.js +61 -22
- package/lib/profile-rpc.d.ts +4 -3
- package/lib/profile-rpc.js +39 -41
- package/lib/profile-runtime.d.ts +31 -74
- package/lib/profile-runtime.js +224 -639
- package/lib/profile-store.d.ts +18 -6
- package/lib/profile-store.js +106 -64
- package/lib/profile-types.d.ts +18 -4
- package/lib/profiles.d.ts +3 -1
- package/lib/profiles.js +9 -7
- package/lib/prompt-content.d.ts +1 -0
- package/lib/prompt-content.js +4 -1
- package/lib/prompts.d.ts +2 -12
- package/lib/prompts.js +11 -66
- package/lib/role-control-remote.d.ts +1 -4
- package/lib/role-control-remote.js +8 -36
- package/lib/role-control-rpc.d.ts +10 -36
- package/lib/role-control-rpc.js +112 -265
- package/lib/role-control-types.d.ts +3 -26
- package/lib/role-control-types.js +3 -4
- package/lib/role-identity.d.ts +5 -0
- package/lib/role-identity.js +10 -0
- package/lib/role-invocation.d.ts +2 -2
- package/lib/role-llm-runtime.js +5 -11
- package/lib/role-policy.d.ts +19 -53
- package/lib/role-policy.js +136 -525
- package/lib/role-providers.d.ts +5 -8
- package/lib/role-providers.js +20 -126
- package/lib/role-routing.d.ts +1 -3
- package/lib/role-routing.js +24 -34
- package/lib/role-subagents.d.ts +5 -14
- package/lib/role-subagents.js +149 -97
- package/lib/runtime-integration.d.ts +5 -109
- package/lib/runtime-integration.js +11 -779
- package/lib/session-metadata.d.ts +13 -12
- package/lib/session-metadata.js +6 -31
- package/lib/session-scope.js +6 -2
- package/lib/settings.d.ts +5 -18
- package/lib/settings.js +19 -43
- package/lib/state.d.ts +3 -2
- package/lib/state.js +26 -10
- package/lib/status.d.ts +1 -9
- package/lib/status.js +3 -55
- package/lib/web-fetch-address-policy.d.ts +24 -0
- package/lib/web-fetch-address-policy.js +189 -0
- package/lib/web-fetch-fakeip.d.ts +25 -0
- package/lib/web-fetch-fakeip.js +107 -0
- package/package.json +133 -113
- package/docs/research/deepseek-v4-pro.md +0 -74
- package/docs/research/oh-dsh.md +0 -96
- package/lib/child-admission.d.ts +0 -42
- package/lib/child-admission.js +0 -162
- package/lib/delivery-authority.d.ts +0 -68
- package/lib/delivery-authority.js +0 -260
- package/lib/legacy-child-policy.d.ts +0 -51
- package/lib/legacy-child-policy.js +0 -123
- package/lib/legacy-read-composition.d.ts +0 -20
- package/lib/legacy-read-composition.js +0 -144
- package/lib/legacy-read-contracts.d.ts +0 -157
- package/lib/legacy-read-contracts.js +0 -39
- package/lib/legacy-read-host.d.ts +0 -19
- package/lib/legacy-read-host.js +0 -67
- package/lib/legacy-read-integration.d.ts +0 -121
- package/lib/legacy-read-integration.js +0 -522
- package/lib/legacy-read-proxy.d.ts +0 -26
- package/lib/legacy-read-proxy.js +0 -237
- package/lib/native-child-evidence.d.ts +0 -42
- package/lib/native-child-evidence.js +0 -133
- package/lib/role-runs.d.ts +0 -135
- package/lib/role-runs.js +0 -304
- package/lib/session-persistence.d.ts +0 -35
- package/lib/session-persistence.js +0 -304
- package/lib/subagent-runtime.d.ts +0 -45
- package/lib/subagent-runtime.js +0 -131
- package/prompts/deepseek-flash.md +0 -11
- package/prompts/deepseek-v4-pro.md +0 -14
- package/scripts/cold-profile-composition.mjs +0 -329
- package/scripts/cold-profile-sources.mjs +0 -238
- package/scripts/migrate-cold-profile.mjs +0 -315
- package/scripts/repair-session-log.mjs +0 -476
- package/scripts/session-repair-native-verifier.mjs +0 -367
package/lib/profile-runtime.d.ts
CHANGED
|
@@ -1,131 +1,88 @@
|
|
|
1
1
|
import type { DshAgent, DshContext } from "./dsh-types.js";
|
|
2
|
-
import type { LoadedProfileSelection, LoadedSessionProfileSelection, SessionProfileCommit } from "./profile-store.js";
|
|
3
|
-
import type { ProfileReadResult, ProfileSaveRequest, ProfileSelectRequest, ProfileSelectionState, ProfileSnapshot, SessionModeSelectRequest, SessionProfileSelectRequest, SessionProfileSnapshot } from "./profile-types.js";
|
|
2
|
+
import type { LoadedProfileSelection, LoadedSessionProfileSelection, ProfileCommit, SessionProfileCommit } from "./profile-store.js";
|
|
3
|
+
import type { ProfileReadResult, ProfileSaveRequest, ProfileSelectRequest, ProfileSelectionState, ProfileSnapshot, SessionModeSelectRequest, SessionProfileSelectRequest, SessionProfileSnapshot, DeploymentAdmissionView, SubagentRuntimeAdmissionView } from "./profile-types.js";
|
|
4
4
|
import type { DsmmProfileDocument } from "./profiles.js";
|
|
5
|
-
import type { DsmmProfileAdmission, DsmmSettings, DsmmSettingsGetter } from "./settings.js";
|
|
5
|
+
import type { DsmmProfileAdmission, DsmmSettings, DsmmSettingsGetter, DsmmDeploymentSnapshot } from "./settings.js";
|
|
6
6
|
import { DeepworkModeController } from "./state.js";
|
|
7
|
-
import type { DsmmDeploymentSnapshot } from "./settings.js";
|
|
8
7
|
import type { DsmmMountedPermissionGetter } from "./modules.js";
|
|
9
|
-
import type { DeploymentAdmissionView } from "./profile-types.js";
|
|
10
|
-
import type { ChildAdmissionCompletion, DsmmChildAdmissionAuthority, LegacyChildEvidenceReader, ParentAdmissionTicket } from "./child-admission-contract.js";
|
|
11
|
-
import type { ChildAdmissionCapture, ChildAdmissionEvidence, PreparedChildAdmission } from "./child-capture.js";
|
|
12
8
|
export interface DsmmProfileRuntimeStore {
|
|
13
|
-
createChildAdmission?(capture: ChildAdmissionCapture, assertCurrent?: () => void): Promise<ChildAdmissionCapture>;
|
|
14
|
-
readChildAdmission?(childId: string, parentId: string): Promise<ChildAdmissionCapture | null>;
|
|
15
|
-
deleteChildAdmission?(childId: string, parentId: string): Promise<void>;
|
|
16
9
|
readonly readOnly?: boolean;
|
|
17
10
|
readonly origin?: "central" | "legacy" | "explicit";
|
|
18
11
|
readonly writeRestriction?: string;
|
|
19
12
|
loadSelection(): Promise<LoadedProfileSelection>;
|
|
20
13
|
describe(): Promise<ProfileSnapshot>;
|
|
21
14
|
read(id: string): Promise<ProfileReadResult>;
|
|
22
|
-
save(request: ProfileSaveRequest): Promise<ProfileReadResult>;
|
|
23
|
-
select<T>(request: ProfileSelectRequest,
|
|
15
|
+
save(request: ProfileSaveRequest, assertCurrent?: () => void): Promise<ProfileReadResult>;
|
|
16
|
+
select<T>(request: ProfileSelectRequest, validate: (document: DsmmProfileDocument | null) => T | Promise<T>, commit?: ProfileCommit<T>, assertCurrent?: () => void): Promise<{
|
|
24
17
|
selection: ProfileSelectionState;
|
|
25
18
|
prepared: T;
|
|
26
19
|
}>;
|
|
27
|
-
loadSessionSelection(
|
|
28
|
-
selectSession<T>(request: SessionProfileSelectRequest, epoch: string,
|
|
20
|
+
loadSessionSelection(id: string): Promise<LoadedSessionProfileSelection>;
|
|
21
|
+
selectSession<T>(request: SessionProfileSelectRequest, epoch: string, validate: (document: DsmmProfileDocument | null) => T | Promise<T>, commit: SessionProfileCommit<T>): Promise<{
|
|
29
22
|
selection: LoadedSessionProfileSelection;
|
|
30
23
|
prepared: T;
|
|
31
24
|
}>;
|
|
32
25
|
}
|
|
33
26
|
export interface DsmmProfileRuntimeOptions {
|
|
34
|
-
|
|
35
|
-
childCaptureStore?: Pick<DsmmProfileRuntimeStore, "createChildAdmission" | "readChildAdmission" | "deleteChildAdmission">;
|
|
36
|
-
childAuthority?: DsmmChildAdmissionAuthority;
|
|
37
|
-
/** Exact entry identity bound by the stable Host authority; never wire input. */
|
|
38
|
-
childAuthorityOwner?: object;
|
|
39
|
-
childAdmission?: ChildAdmissionCompletion;
|
|
40
|
-
/** Pure role/ceiling validation before awaited candidate checks and before commit; never publishes identity or authority. */
|
|
41
|
-
validateRootRole?: (agent: DshAgent, admission: DsmmProfileAdmission) => void;
|
|
42
|
-
/** Host session substrate decides this; resident mode makes no restart claim. */
|
|
43
|
-
childCapturePersistence?: "durable" | "resident";
|
|
44
|
-
/** Parent composition may enable its bound policy after guards exist, before retained Agents are admitted. */
|
|
45
|
-
onAdmissionGuardsInstalled?: (runtime: DsmmProfileRuntime) => void | Promise<void>;
|
|
46
|
-
/** Core startup admits roots first; the Host DW continuation completes retained controlled children. */
|
|
47
|
-
deferRetainedChildren?: boolean;
|
|
48
|
-
/** Trusted test/integration seam, never a wire-supplied path or callback. */
|
|
27
|
+
runtimeView?: () => SubagentRuntimeAdmissionView;
|
|
49
28
|
validateCandidate?: (settings: DsmmSettings) => void | Promise<void>;
|
|
50
29
|
modeController?: DeepworkModeController;
|
|
51
|
-
/** Awaited once per new ordinary root; never used by children or idle switches. */
|
|
52
30
|
readDesired?: () => Promise<DsmmDeploymentSnapshot>;
|
|
53
31
|
startup?: DsmmDeploymentSnapshot;
|
|
54
|
-
/** Read the current live Host controller's mounted status; unknown/retired is null. */
|
|
55
32
|
getMountedPermission?: DsmmMountedPermissionGetter;
|
|
56
|
-
/** Frozen actual native startup substrate; omission is the trusted legacy seam. */
|
|
57
|
-
subagentCapabilities?: {
|
|
58
|
-
backgroundJobs: boolean;
|
|
59
|
-
continuable: boolean;
|
|
60
|
-
};
|
|
61
33
|
}
|
|
34
|
+
export type DsmmSessionActionUnavailableReason = import("./profile-types.js").SessionActionUnavailableReason;
|
|
35
|
+
export type DsmmSessionProfileSnapshot = SessionProfileSnapshot;
|
|
62
36
|
interface AdmittedProfile extends ProfileSelectionState, DsmmProfileAdmission {
|
|
63
37
|
baseline: DsmmSettings;
|
|
64
38
|
}
|
|
65
|
-
/**
|
|
39
|
+
/** Configuration transactions and immutable snapshots; native admission owns Agent binding. */
|
|
66
40
|
export declare class DsmmProfileRuntime {
|
|
67
41
|
private readonly ctx;
|
|
68
42
|
private readonly store;
|
|
69
43
|
private readonly options;
|
|
70
|
-
readonly childCaptureStore: Pick<DsmmProfileRuntimeStore, "createChildAdmission" | "readChildAdmission" | "deleteChildAdmission">;
|
|
71
44
|
readonly getSettings: DsmmSettingsGetter;
|
|
72
|
-
private current;
|
|
73
|
-
private currentDocument;
|
|
74
45
|
private readonly baseline;
|
|
46
|
+
private current;
|
|
47
|
+
private document;
|
|
75
48
|
private readonly bound;
|
|
76
|
-
private readonly
|
|
77
|
-
private readonly disposedAgents;
|
|
78
|
-
private readonly switching;
|
|
79
|
-
private readonly admissionObservers;
|
|
49
|
+
private readonly observations;
|
|
80
50
|
private disposed;
|
|
81
|
-
private
|
|
51
|
+
private queue;
|
|
82
52
|
private readonly mode;
|
|
83
53
|
constructor(ctx: DshContext, baseline: DsmmSettings, store: DsmmProfileRuntimeStore, options?: DsmmProfileRuntimeOptions);
|
|
84
54
|
initialize(): Promise<void>;
|
|
55
|
+
private assertCurrent;
|
|
85
56
|
admission(agent?: DshAgent): AdmittedProfile;
|
|
86
|
-
/** Host enrollment observes completed exact admissions, never an entered but unpublished policy. */
|
|
87
57
|
hasAdmission(agent: DshAgent): boolean;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
58
|
+
/** Called only by the awaited native creation owner after all Agent-scoped installation. */
|
|
59
|
+
publish(agent: DshAgent, admission: DsmmProfileAdmission): void;
|
|
60
|
+
release(agent: DshAgent): void;
|
|
61
|
+
prepareRoot(agent: DshAgent, signal: AbortSignal): Promise<AdmittedProfile>;
|
|
62
|
+
getSession(agent: DshAgent): Promise<DsmmSessionProfileSnapshot>;
|
|
63
|
+
selectMode(request: SessionModeSelectRequest, agent: DshAgent, signal?: AbortSignal, authority?: () => void): Promise<DsmmSessionProfileSnapshot>;
|
|
64
|
+
selectSession(_request: SessionProfileSelectRequest, agent: DshAgent, _signal?: AbortSignal, _authority?: () => void): Promise<SessionProfileSnapshot>;
|
|
65
|
+
private assertRoot;
|
|
94
66
|
describe(): Promise<ProfileSnapshot>;
|
|
95
67
|
read(id: string): Promise<ProfileReadResult>;
|
|
96
|
-
save(request: ProfileSaveRequest): Promise<ProfileReadResult>;
|
|
68
|
+
save(request: ProfileSaveRequest, authority?: () => void): Promise<ProfileReadResult>;
|
|
97
69
|
getStartupSettings(): DsmmSettings;
|
|
98
|
-
/** Preview uses the admission path but neither binds nor creates an Agent. */
|
|
99
70
|
previewDeployment(desired: DsmmDeploymentSnapshot): DeploymentAdmissionView;
|
|
100
71
|
describeDeployment(agent?: DshAgent): Promise<{
|
|
101
72
|
startup: DsmmDeploymentSnapshot | null;
|
|
102
73
|
desired: DsmmDeploymentSnapshot | null;
|
|
103
|
-
admission:
|
|
74
|
+
admission: AdmittedProfile | null;
|
|
104
75
|
}>;
|
|
105
|
-
select(request: ProfileSelectRequest): Promise<ProfileSnapshot>;
|
|
76
|
+
select(request: ProfileSelectRequest, authority?: () => void): Promise<ProfileSnapshot>;
|
|
106
77
|
private prepare;
|
|
107
78
|
private profileAdmission;
|
|
108
|
-
private declaredProfileModel;
|
|
109
|
-
private agents;
|
|
110
|
-
private bind;
|
|
111
|
-
private owner;
|
|
112
|
-
private assertRoot;
|
|
113
|
-
/** Host-only awaited completion for fresh, retained and cold exact Agents; no execution occurs here. */
|
|
114
|
-
completeAdmission(agent: DshAgent, signal?: AbortSignal, startup?: DsmmDeploymentSnapshot): Promise<DsmmProfileAdmission>;
|
|
115
|
-
private admit;
|
|
116
|
-
/** Awaited native creation completion: evidence + persistence + role identity + exact-parent authority. */
|
|
117
|
-
completeChildAdmission(agent: DshAgent, parent: DshAgent, prepared: PreparedChildAdmission, signal?: AbortSignal): Promise<void>;
|
|
118
|
-
/** C's scoped resolver callback: original resident/durable evidence, then explicit trusted legacy folds. */
|
|
119
|
-
resolveOriginalChildEvidence(ticket: ParentAdmissionTicket, childId: string, signal: AbortSignal, readLegacy?: LegacyChildEvidenceReader): Promise<ChildAdmissionEvidence>;
|
|
120
|
-
private assertOwnedParentTicket;
|
|
121
|
-
private subagentRuntimeView;
|
|
122
|
-
private assertDeliveryFence;
|
|
123
|
-
private assertRootRole;
|
|
124
|
-
private validateRootRole;
|
|
125
79
|
private roleAvailability;
|
|
80
|
+
private editorRoles;
|
|
81
|
+
private sessionActions;
|
|
126
82
|
private validate;
|
|
83
|
+
private observedSelection;
|
|
84
|
+
private runtimeView;
|
|
127
85
|
}
|
|
128
|
-
/** No guessed home fallback: native deployment context owns this directory. */
|
|
129
86
|
export declare function createProfileRuntime(ctx: DshContext, baseline: DsmmSettings, options?: DsmmProfileRuntimeOptions): Promise<DsmmProfileRuntime>;
|
|
130
87
|
export {};
|
|
131
88
|
//# sourceMappingURL=profile-runtime.d.ts.map
|