deepclause-sdk 0.1.2 → 0.2.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.
Files changed (122) hide show
  1. package/README.md +45 -6
  2. package/dist/cli/config.d.ts +2 -2
  3. package/dist/cli/repl.d.ts +55 -4
  4. package/dist/cli/repl.d.ts.map +1 -1
  5. package/dist/cli/repl.js +675 -52
  6. package/dist/cli/repl.js.map +1 -1
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +3 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/prolog-src/deepclause_mi.pl +516 -2
  12. package/dist/repl/backend.d.ts +9 -0
  13. package/dist/repl/backend.d.ts.map +1 -1
  14. package/dist/repl/backend.js +62 -5
  15. package/dist/repl/backend.js.map +1 -1
  16. package/dist/repl/harness-tools.d.ts +36 -0
  17. package/dist/repl/harness-tools.d.ts.map +1 -1
  18. package/dist/repl/harness-tools.js +173 -0
  19. package/dist/repl/harness-tools.js.map +1 -1
  20. package/dist/repl/history.d.ts +29 -0
  21. package/dist/repl/history.d.ts.map +1 -1
  22. package/dist/repl/history.js +71 -0
  23. package/dist/repl/history.js.map +1 -1
  24. package/dist/repl/index.d.ts +6 -0
  25. package/dist/repl/index.d.ts.map +1 -1
  26. package/dist/repl/index.js +9 -1
  27. package/dist/repl/index.js.map +1 -1
  28. package/dist/repl/picker.d.ts +3 -0
  29. package/dist/repl/picker.d.ts.map +1 -1
  30. package/dist/repl/picker.js +132 -0
  31. package/dist/repl/picker.js.map +1 -1
  32. package/dist/repl/process-backend.d.ts +31 -0
  33. package/dist/repl/process-backend.d.ts.map +1 -0
  34. package/dist/repl/process-backend.js +10 -0
  35. package/dist/repl/process-backend.js.map +1 -0
  36. package/dist/repl/process-executor.d.ts +67 -0
  37. package/dist/repl/process-executor.d.ts.map +1 -0
  38. package/dist/repl/process-executor.js +371 -0
  39. package/dist/repl/process-executor.js.map +1 -0
  40. package/dist/repl/process-worker.d.ts +10 -0
  41. package/dist/repl/process-worker.d.ts.map +1 -0
  42. package/dist/repl/process-worker.js +210 -0
  43. package/dist/repl/process-worker.js.map +1 -0
  44. package/dist/repl/processes.d.ts +282 -0
  45. package/dist/repl/processes.d.ts.map +1 -0
  46. package/dist/repl/processes.js +557 -0
  47. package/dist/repl/processes.js.map +1 -0
  48. package/dist/repl/render.d.ts +52 -2
  49. package/dist/repl/render.d.ts.map +1 -1
  50. package/dist/repl/render.js +52 -17
  51. package/dist/repl/render.js.map +1 -1
  52. package/dist/repl/session.d.ts +135 -3
  53. package/dist/repl/session.d.ts.map +1 -1
  54. package/dist/repl/session.js +413 -4
  55. package/dist/repl/session.js.map +1 -1
  56. package/dist/repl/status.d.ts +3 -1
  57. package/dist/repl/status.d.ts.map +1 -1
  58. package/dist/repl/status.js +4 -0
  59. package/dist/repl/status.js.map +1 -1
  60. package/dist/repl/tui/autocomplete.d.ts +19 -0
  61. package/dist/repl/tui/autocomplete.d.ts.map +1 -0
  62. package/dist/repl/tui/autocomplete.js +48 -0
  63. package/dist/repl/tui/autocomplete.js.map +1 -0
  64. package/dist/repl/tui/document.d.ts +51 -0
  65. package/dist/repl/tui/document.d.ts.map +1 -0
  66. package/dist/repl/tui/document.js +160 -0
  67. package/dist/repl/tui/document.js.map +1 -0
  68. package/dist/repl/tui/harness-view.d.ts +102 -0
  69. package/dist/repl/tui/harness-view.d.ts.map +1 -0
  70. package/dist/repl/tui/harness-view.js +323 -0
  71. package/dist/repl/tui/harness-view.js.map +1 -0
  72. package/dist/repl/tui/picker.d.ts +31 -0
  73. package/dist/repl/tui/picker.d.ts.map +1 -0
  74. package/dist/repl/tui/picker.js +43 -0
  75. package/dist/repl/tui/picker.js.map +1 -0
  76. package/dist/repl/tui/renderer.d.ts +98 -0
  77. package/dist/repl/tui/renderer.d.ts.map +1 -0
  78. package/dist/repl/tui/renderer.js +289 -0
  79. package/dist/repl/tui/renderer.js.map +1 -0
  80. package/dist/repl/tui/services-panel.d.ts +35 -0
  81. package/dist/repl/tui/services-panel.d.ts.map +1 -0
  82. package/dist/repl/tui/services-panel.js +108 -0
  83. package/dist/repl/tui/services-panel.js.map +1 -0
  84. package/dist/repl/tui/status-bar.d.ts +6 -2
  85. package/dist/repl/tui/status-bar.d.ts.map +1 -1
  86. package/dist/repl/tui/status-bar.js +82 -24
  87. package/dist/repl/tui/status-bar.js.map +1 -1
  88. package/dist/repl/tui/terminal.d.ts +28 -0
  89. package/dist/repl/tui/terminal.d.ts.map +1 -0
  90. package/dist/repl/tui/terminal.js +94 -0
  91. package/dist/repl/tui/terminal.js.map +1 -0
  92. package/dist/repl/tui/theme.d.ts +60 -0
  93. package/dist/repl/tui/theme.d.ts.map +1 -1
  94. package/dist/repl/tui/theme.js +142 -0
  95. package/dist/repl/tui/theme.js.map +1 -1
  96. package/dist/repl/tui/tool-pane.d.ts +68 -0
  97. package/dist/repl/tui/tool-pane.d.ts.map +1 -0
  98. package/dist/repl/tui/tool-pane.js +261 -0
  99. package/dist/repl/tui/tool-pane.js.map +1 -0
  100. package/dist/repl/tui/working-line.d.ts +23 -0
  101. package/dist/repl/tui/working-line.d.ts.map +1 -0
  102. package/dist/repl/tui/working-line.js +58 -0
  103. package/dist/repl/tui/working-line.js.map +1 -0
  104. package/dist/repl/worker-host.d.ts +80 -0
  105. package/dist/repl/worker-host.d.ts.map +1 -0
  106. package/dist/repl/worker-host.js +305 -0
  107. package/dist/repl/worker-host.js.map +1 -0
  108. package/dist/repl/worker-protocol.d.ts +123 -0
  109. package/dist/repl/worker-protocol.d.ts.map +1 -0
  110. package/dist/repl/worker-protocol.js +9 -0
  111. package/dist/repl/worker-protocol.js.map +1 -0
  112. package/dist/runner.d.ts +24 -0
  113. package/dist/runner.d.ts.map +1 -1
  114. package/dist/runner.js +47 -0
  115. package/dist/runner.js.map +1 -1
  116. package/dist/system/assets/docs/AGENT_PROMPT.md +193 -0
  117. package/dist/system/assets/docs/DML_AUTHORING.md +21 -0
  118. package/dist/system/assets/docs/DML_REFERENCE.md +145 -0
  119. package/dist/types.d.ts +7 -0
  120. package/dist/types.d.ts.map +1 -1
  121. package/package.json +2 -1
  122. package/src/prolog-src/deepclause_mi.pl +516 -2
@@ -0,0 +1,282 @@
1
+ /**
2
+ * Session-scoped processes for the REPL (L1 core).
3
+ *
4
+ * This module is the host bookkeeping and the L1↔L2 seam from
5
+ * `docs/DML_REPL_PROCESSES_SPEC.md` §2. It owns process identity, mailboxes,
6
+ * links, monitors, naming, limits, and lifecycle events. It does **not** drive
7
+ * Prolog; a `ProcessBody` is an opaque async function, and the DML layer supplies
8
+ * bodies that step a runner frame.
9
+ *
10
+ * Keeping the bodies opaque is what makes L2 a mode switch: a worker-backed host
11
+ * implements the same interface with RPC bodies and node-qualified pids, and
12
+ * nothing above this module changes.
13
+ *
14
+ * Invariants enforced here (spec §6.2):
15
+ * - pids are node-qualified (`node: 'main'` in v1);
16
+ * - messages are copied (value semantics), never shared by reference;
17
+ * - process info and events are plain data;
18
+ * - there is no UI dependency.
19
+ */
20
+ import type { LLMUsage } from '../types.js';
21
+ export type NodeId = string;
22
+ /** A node-qualified, location-transparent process identifier. */
23
+ export interface Pid {
24
+ node: NodeId;
25
+ session: string;
26
+ id: string;
27
+ }
28
+ export declare function pidKey(pid: Pid): string;
29
+ /** Quote a string as a Prolog atom when it is not a plain lowercase atom. */
30
+ export declare function prologAtom(text: string): string;
31
+ /** The canonical Prolog term for a pid: `proc(Node,Session,Id)`. */
32
+ export declare function pidTermText(pid: Pid): string;
33
+ /** Parse `proc(Node,Session,Id)` back to a pid, or undefined. */
34
+ export declare function parsePidTerm(text: string): Pid | undefined;
35
+ export type ProcessPriority = 'foreground' | 'interactive' | 'background';
36
+ export type ProcessState = 'runnable' | 'running' | 'waiting' | 'input' | 'done' | 'crashed' | 'killed';
37
+ export interface ProcessInfo {
38
+ pid: Pid;
39
+ name: string;
40
+ goal: string;
41
+ state: ProcessState;
42
+ priority: ProcessPriority;
43
+ mailboxDepth: number;
44
+ links: Pid[];
45
+ monitors: Pid[];
46
+ usage: LLMUsage;
47
+ startedAt: number;
48
+ finishedAt?: number;
49
+ restarts: number;
50
+ currentActivity?: string;
51
+ parent?: Pid;
52
+ codeVersion?: string;
53
+ /**
54
+ * The version of the harness snapshot this process runs (see
55
+ * `SpawnOptions.snapshot`). Two processes with different versions run
56
+ * different code; compare against the current harness to spot a stale worker.
57
+ */
58
+ harnessVersion?: string;
59
+ result?: unknown;
60
+ error?: string;
61
+ exitReason?: unknown;
62
+ }
63
+ export interface SpawnOptions {
64
+ /** Human/model-readable label. Defaults to the goal's predicate name. */
65
+ name?: string;
66
+ priority?: ProcessPriority;
67
+ memory?: 'fresh' | 'parent';
68
+ /** Wall-clock budget in ms, enforced by the body's runtime. */
69
+ timeoutMs?: number;
70
+ /** Inference budget, enforced by the body's runtime. */
71
+ maxGas?: number;
72
+ /** Module version snapshot the process runs. */
73
+ codeVersion?: string;
74
+ /**
75
+ * The harness snapshot this process runs. Internal: the host stamps it at
76
+ * spawn time from `ProcessHostOptions.resolveSnapshot`, so every process
77
+ * carries the exact module it started with and a comparable version.
78
+ */
79
+ snapshot?: {
80
+ text: string;
81
+ version: string;
82
+ };
83
+ /** Link at spawn time (exit propagation). */
84
+ link?: Pid;
85
+ parent?: Pid;
86
+ }
87
+ export type ReceiveResult<T = unknown> = {
88
+ ok: true;
89
+ message: T;
90
+ } | {
91
+ ok: false;
92
+ reason: 'timeout' | 'stopped';
93
+ };
94
+ /** Thrown by `ProcessContext.exit` to terminate the current process. */
95
+ export declare class ProcessExit extends Error {
96
+ readonly reason: unknown;
97
+ constructor(reason: unknown);
98
+ }
99
+ /** Raised when sending to a process that is gone. */
100
+ export declare class NoProcError extends Error {
101
+ readonly pid: Pid;
102
+ readonly code = "noproc";
103
+ constructor(pid: Pid);
104
+ }
105
+ /** Raised when a mailbox is full (spec §13.3). */
106
+ export declare class MailboxFullError extends Error {
107
+ readonly pid: Pid;
108
+ readonly code = "mailbox_full";
109
+ constructor(pid: Pid);
110
+ }
111
+ /** Plain-data lifecycle event for the service sink (spec §8.4). */
112
+ export interface ProcessEvent {
113
+ type: 'started' | 'state' | 'activity' | 'output' | 'answer' | 'exited' | 'stream' | 'reasoning' | 'tool' | 'model';
114
+ at: number;
115
+ pid: Pid;
116
+ name: string;
117
+ state?: ProcessState;
118
+ activity?: string;
119
+ content?: string;
120
+ /** For 'stream'/'reasoning': the final chunk of a run. */
121
+ done?: boolean;
122
+ answer?: unknown;
123
+ reason?: unknown;
124
+ error?: string;
125
+ }
126
+ /** One line in the subagent log view (`/ps --watch --logs`). */
127
+ export interface ProcessLogEntry {
128
+ at: number;
129
+ pid: Pid;
130
+ name: string;
131
+ kind: ProcessEvent['type'];
132
+ text: string;
133
+ /** True once a streamed entry is complete (stops coalescing). */
134
+ done?: boolean;
135
+ }
136
+ export interface ProcessContext {
137
+ readonly pid: Pid;
138
+ readonly goal: string;
139
+ readonly options: SpawnOptions;
140
+ readonly signal: AbortSignal;
141
+ /** Pop the oldest message, or wait for one (spec §4.4). */
142
+ receive<T = unknown>(timeoutMs?: number): Promise<ReceiveResult<T>>;
143
+ /** Copy a message into another process's mailbox. */
144
+ send(to: Pid | string, message: unknown): void;
145
+ /** Start a child process running `goal`. */
146
+ spawn(goal: string, options?: SpawnOptions): Pid;
147
+ /** Terminate this process with `reason` (never returns). */
148
+ exit(reason?: unknown): never;
149
+ /** Snapshot this process's info. */
150
+ info(): ProcessInfo;
151
+ /** Update the activity string shown in the process panel. */
152
+ setActivity(activity?: string): void;
153
+ /** Emit a plain-data event to the service sink. */
154
+ emit(event: Omit<ProcessEvent, 'at' | 'pid' | 'name'>): void;
155
+ /** Record model usage against this process. */
156
+ recordUsage(usage: LLMUsage): void;
157
+ }
158
+ /** An opaque, async unit of work. The DML layer supplies bodies that step a runner. */
159
+ export type ProcessBody = (ctx: ProcessContext) => Promise<unknown>;
160
+ export interface ProcessHostOptions {
161
+ sessionId: string;
162
+ node?: NodeId;
163
+ /** Resolve a spawned goal to a body. */
164
+ resolveBody?: (goal: string) => ProcessBody | undefined;
165
+ /**
166
+ * The harness snapshot for a newly spawned process. A worker host returns the
167
+ * snapshot the main session sent; the main computes it from the live module.
168
+ */
169
+ resolveSnapshot?: () => {
170
+ text: string;
171
+ version: string;
172
+ };
173
+ onEvent?: (event: ProcessEvent) => void;
174
+ /** Called when a message is addressed to the synthetic host pid. */
175
+ onHostMessage?: (message: unknown) => void;
176
+ maxProcesses?: number;
177
+ maxMailbox?: number;
178
+ /** Terminal process records kept for `ps`/`wait` before the oldest are reaped. */
179
+ maxTerminalRecords?: number;
180
+ now?: () => number;
181
+ }
182
+ /** Default label for a goal: the predicate's functor, or the first token. */
183
+ export declare function labelForGoal(goal: string): string;
184
+ /**
185
+ * Copy a message so processes never share mutable terms (spec §4.2 / invariant A).
186
+ *
187
+ * `structuredClone` is the right tool for plain data. Values it cannot clone
188
+ * (functions, symbols) are rejected, which is the intended behavior: such a value
189
+ * could not cross an L2 worker boundary either.
190
+ */
191
+ export declare function copyMessage<T>(value: T): T;
192
+ /**
193
+ * The L1 process host: a process table, mailboxes, links, monitors, and naming,
194
+ * all in one JS realm.
195
+ *
196
+ * The DML runner drives process progress; this host owns identity and messaging.
197
+ */
198
+ export declare class LocalProcessHost {
199
+ private readonly sessionId;
200
+ private readonly node;
201
+ private readonly resolveBody?;
202
+ private readonly resolveSnapshot?;
203
+ private readonly onEvent?;
204
+ private readonly onHostMessage?;
205
+ private readonly maxProcesses;
206
+ private readonly maxMailbox;
207
+ private readonly maxTerminalRecords;
208
+ private readonly now;
209
+ private readonly records;
210
+ private readonly names;
211
+ private readonly watchersByRef;
212
+ private readonly replyInboxes;
213
+ private counter;
214
+ private refCounter;
215
+ private shutdownRequested;
216
+ /** Synthetic pid representing the host itself, for `call`/`request` replies. */
217
+ readonly hostPid: Pid;
218
+ constructor(options: ProcessHostOptions);
219
+ spawn(goal: string, options?: SpawnOptions, body?: ProcessBody): Pid;
220
+ private run;
221
+ private finish;
222
+ private contextFor;
223
+ send(to: Pid | string, message: unknown): void;
224
+ /**
225
+ * Pop the oldest message, or wait. `timeoutMs` of 0 or undefined waits forever
226
+ * (spec §4.4); the DML layer chooses a default.
227
+ */
228
+ receive<T = unknown>(pid: Pid, timeoutMs?: number): Promise<ReceiveResult<T>>;
229
+ /**
230
+ * Put a message back at the front of the mailbox (selective receive).
231
+ */
232
+ requeue(pid: Pid, message: unknown): void;
233
+ /**
234
+ * Send `{kind:'request', from, ref, value: message}` and await a
235
+ * `{kind:'reply', ref, value}` from the target (the `library(service)`
236
+ * protocol).
237
+ */
238
+ call(to: Pid | string, message: unknown, timeoutMs?: number): Promise<unknown>;
239
+ link(a: Pid, b: Pid): void;
240
+ unlink(a: Pid, b: Pid): void;
241
+ monitor(pid: Pid): {
242
+ ref: string;
243
+ down: Promise<unknown>;
244
+ };
245
+ /** Stop a process. Idempotent. `reason: 'kill'` is untrappable (same as any stop in v1). */
246
+ stop(pid: Pid, reason?: unknown): void;
247
+ shutdown(): Promise<void>;
248
+ register(name: string, pid: Pid): void;
249
+ whereis(name: string): Pid | undefined;
250
+ /** Resolve a process label (the goal functor) to a live pid. */
251
+ private pidByLabel;
252
+ info(pid: Pid): ProcessInfo | undefined;
253
+ /** The harness source a process is running (its spawn-time snapshot). */
254
+ codeOf(pid: Pid): string | undefined;
255
+ processes(): ProcessInfo[];
256
+ get size(): number;
257
+ /** Processes that have not reached a terminal state. */
258
+ private liveCount;
259
+ /** Drop the oldest terminal records beyond `maxTerminalRecords`. */
260
+ private reapTerminalRecords;
261
+ /** Resolve when `pid` reaches a terminal state (already terminal resolves now). */
262
+ wait(pid: Pid): Promise<ProcessInfo | undefined>;
263
+ private toInfo;
264
+ private pidFromKey;
265
+ private emit;
266
+ }
267
+ export interface CapabilityContext {
268
+ pid: Pid;
269
+ signal: AbortSignal;
270
+ }
271
+ /**
272
+ * Everything a process can do to the outside world (spec §2.3). At L1 the REPL
273
+ * implements this directly; at L2 a worker sends `need` messages and the main
274
+ * thread services them. A worker never holds credentials or policy.
275
+ */
276
+ export interface CapabilityBroker {
277
+ requestInput(prompt: string, ctx: CapabilityContext): Promise<string | undefined>;
278
+ emit(event: ProcessEvent, ctx: {
279
+ pid: Pid;
280
+ }): void;
281
+ }
282
+ //# sourceMappingURL=processes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processes.d.ts","sourceRoot":"","sources":["../../src/repl/processes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAM5C,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAE5B,iEAAiE;AACjE,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAEvC;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAE5C;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAS1D;AAED,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC;AAE1E,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,MAAM,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