@plurnk/plurnk-service 1.2.0 → 1.3.0
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/.env.defaults +7 -5
- package/README.md +16 -13
- package/SPEC.md +72 -130
- package/dist/build-info.d.ts +11 -0
- package/dist/build-info.d.ts.map +1 -0
- package/dist/build-info.js +45 -0
- package/dist/build-info.js.map +1 -0
- package/dist/build-info.json +1 -0
- package/dist/content/index.js +1 -1
- package/dist/content/index.js.map +1 -1
- package/dist/content/line-marker.js +1 -1
- package/dist/content/line-marker.js.map +1 -1
- package/dist/content/matcher.js +4 -4
- package/dist/content/matcher.js.map +1 -1
- package/dist/content/mimetype-binary.js +1 -1
- package/dist/content/mimetype-binary.js.map +1 -1
- package/dist/content/path-mimetype.js +1 -1
- package/dist/content/path-mimetype.js.map +1 -1
- package/dist/core/ChannelWrite.d.ts +2 -1
- package/dist/core/ChannelWrite.d.ts.map +1 -1
- package/dist/core/ChannelWrite.js +6 -19
- package/dist/core/ChannelWrite.js.map +1 -1
- package/dist/core/ChannelWrite.sql +2 -7
- package/dist/core/Dispatcher.d.ts.map +1 -1
- package/dist/core/Dispatcher.js +92 -23
- package/dist/core/Dispatcher.js.map +1 -1
- package/dist/core/Engine.d.ts +9 -0
- package/dist/core/Engine.d.ts.map +1 -1
- package/dist/core/Engine.js +126 -30
- package/dist/core/Engine.js.map +1 -1
- package/dist/core/Engine.sql +8 -6
- package/dist/core/PacketBuilder.js +1 -1
- package/dist/core/PacketBuilder.js.map +1 -1
- package/dist/core/PluginLoader.d.ts +1 -0
- package/dist/core/PluginLoader.d.ts.map +1 -1
- package/dist/core/PluginLoader.js +22 -11
- package/dist/core/PluginLoader.js.map +1 -1
- package/dist/core/ProposalLifecycle.d.ts.map +1 -1
- package/dist/core/ProposalLifecycle.js +11 -6
- package/dist/core/ProposalLifecycle.js.map +1 -1
- package/dist/core/ProviderInstantiate.d.ts +1 -0
- package/dist/core/ProviderInstantiate.d.ts.map +1 -1
- package/dist/core/ProviderInstantiate.js +8 -0
- package/dist/core/ProviderInstantiate.js.map +1 -1
- package/dist/core/SchemeRegistry.d.ts +3 -1
- package/dist/core/SchemeRegistry.d.ts.map +1 -1
- package/dist/core/SchemeRegistry.js +18 -11
- package/dist/core/SchemeRegistry.js.map +1 -1
- package/dist/core/caps/DbEntryCaps.d.ts +6 -5
- package/dist/core/caps/DbEntryCaps.d.ts.map +1 -1
- package/dist/core/caps/DbEntryCaps.js +36 -14
- package/dist/core/caps/DbEntryCaps.js.map +1 -1
- package/dist/core/caps/DbProjectionCaps.d.ts +11 -0
- package/dist/core/caps/DbProjectionCaps.d.ts.map +1 -0
- package/dist/core/caps/DbProjectionCaps.js +19 -0
- package/dist/core/caps/DbProjectionCaps.js.map +1 -0
- package/dist/core/caps/DbSubscriptionCaps.d.ts +3 -1
- package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
- package/dist/core/caps/DbSubscriptionCaps.js +12 -3
- package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
- package/dist/core/caps/SchemeCtxImpl.d.ts +18 -4
- package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
- package/dist/core/caps/SchemeCtxImpl.js +26 -12
- package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
- package/dist/core/fork.sql +4 -4
- package/dist/core/git-membership.d.ts.map +1 -1
- package/dist/core/git-membership.js +23 -0
- package/dist/core/git-membership.js.map +1 -1
- package/dist/core/packet-wire.d.ts.map +1 -1
- package/dist/core/packet-wire.js +3 -2
- package/dist/core/packet-wire.js.map +1 -1
- package/dist/core/path-decode.d.ts +1 -0
- package/dist/core/path-decode.d.ts.map +1 -1
- package/dist/core/path-decode.js +1 -0
- package/dist/core/path-decode.js.map +1 -1
- package/dist/core/plurnk-uri.d.ts.map +1 -1
- package/dist/core/plurnk-uri.js +5 -3
- package/dist/core/plurnk-uri.js.map +1 -1
- package/dist/core/resolveForLoop.js +1 -1
- package/dist/core/resolveForLoop.js.map +1 -1
- package/dist/core/results.js +2 -2
- package/dist/core/results.js.map +1 -1
- package/dist/core/scheme-types.d.ts.map +1 -1
- package/dist/core/scheme-types.js +1 -1
- package/dist/core/scheme-types.js.map +1 -1
- package/dist/core/search-gate.js +2 -2
- package/dist/core/search-gate.js.map +1 -1
- package/dist/digest/Digest.d.ts.map +1 -1
- package/dist/digest/Digest.js +79 -8
- package/dist/digest/Digest.js.map +1 -1
- package/dist/digest/digest.sql +1 -1
- package/dist/schemes/Exec.d.ts +2 -4
- package/dist/schemes/Exec.d.ts.map +1 -1
- package/dist/schemes/Exec.js +41 -11
- package/dist/schemes/Exec.js.map +1 -1
- package/dist/schemes/File.d.ts.map +1 -1
- package/dist/schemes/File.js +1 -0
- package/dist/schemes/File.js.map +1 -1
- package/dist/schemes/Log.d.ts.map +1 -1
- package/dist/schemes/Log.js +20 -0
- package/dist/schemes/Log.js.map +1 -1
- package/dist/schemes/Prompt.d.ts +6 -7
- package/dist/schemes/Prompt.d.ts.map +1 -1
- package/dist/schemes/Prompt.js +4 -5
- package/dist/schemes/Prompt.js.map +1 -1
- package/dist/schemes/Skill.d.ts +7 -9
- package/dist/schemes/Skill.d.ts.map +1 -1
- package/dist/schemes/Skill.js +5 -7
- package/dist/schemes/Skill.js.map +1 -1
- package/dist/schemes/Worker.d.ts.map +1 -1
- package/dist/schemes/Worker.js +1 -0
- package/dist/schemes/Worker.js.map +1 -1
- package/dist/schemes/_entry-chunk.d.ts +4 -1
- package/dist/schemes/_entry-chunk.d.ts.map +1 -1
- package/dist/schemes/_entry-chunk.js +76 -22
- package/dist/schemes/_entry-chunk.js.map +1 -1
- package/dist/schemes/_entry-crud.d.ts.map +1 -1
- package/dist/schemes/_entry-crud.js +0 -10
- package/dist/schemes/_entry-crud.js.map +1 -1
- package/dist/schemes/_entry-find.d.ts.map +1 -1
- package/dist/schemes/_entry-find.js +9 -8
- package/dist/schemes/_entry-find.js.map +1 -1
- package/dist/schemes/_entry-find.sql +1 -1
- package/dist/schemes/_entry-graph.d.ts +1 -1
- package/dist/schemes/_entry-graph.d.ts.map +1 -1
- package/dist/schemes/_entry-graph.js +13 -12
- package/dist/schemes/_entry-graph.js.map +1 -1
- package/dist/schemes/_entry-graph.sql +49 -13
- package/dist/schemes/_entry-manifest.d.ts +5 -2
- package/dist/schemes/_entry-manifest.d.ts.map +1 -1
- package/dist/schemes/_entry-manifest.js +135 -123
- package/dist/schemes/_entry-manifest.js.map +1 -1
- package/dist/schemes/_entry-ops.d.ts.map +1 -1
- package/dist/schemes/_entry-ops.js +0 -4
- package/dist/schemes/_entry-ops.js.map +1 -1
- package/dist/schemes/_entry-semantic.d.ts +12 -5
- package/dist/schemes/_entry-semantic.d.ts.map +1 -1
- package/dist/schemes/_entry-semantic.js +57 -70
- package/dist/schemes/_entry-semantic.js.map +1 -1
- package/dist/schemes/_entry-semantic.sql +22 -53
- package/dist/server/Daemon.d.ts +4 -3
- package/dist/server/Daemon.d.ts.map +1 -1
- package/dist/server/Daemon.js +109 -44
- package/dist/server/Daemon.js.map +1 -1
- package/dist/server/auto.d.ts +6 -0
- package/dist/server/auto.d.ts.map +1 -0
- package/dist/server/{yolo.js → auto.js} +15 -16
- package/dist/server/auto.js.map +1 -0
- package/dist/server/client-input.d.ts +1 -1
- package/dist/server/client-input.d.ts.map +1 -1
- package/dist/server/client-input.js +11 -4
- package/dist/server/client-input.js.map +1 -1
- package/dist/server/drain.sql +6 -3
- package/dist/server/loopDocs.d.ts.map +1 -1
- package/dist/server/loopDocs.js +2 -2
- package/dist/server/loopDocs.js.map +1 -1
- package/dist/server/noProposals.js +5 -5
- package/dist/server/noProposals.js.map +1 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +18 -5
- package/dist/service.js.map +1 -1
- package/migrations/0000-00-00.01_schema.sql +55 -48
- package/migrations/0004_loop-provider.sql +3 -0
- package/migrations/0005_subscription-published-channel.sql +3 -0
- package/package.json +27 -22
- package/dist/server/yolo.d.ts +0 -6
- package/dist/server/yolo.d.ts.map +0 -1
- package/dist/server/yolo.js.map +0 -1
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
--
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
|
|
5
|
-
--
|
|
6
|
-
-- v3: file-class pathnames are bare git-pathspec keys — the leading slash retired ({§fs-canonical-name}, #546).
|
|
7
|
-
PRAGMA user_version = 3;
|
|
8
|
-
|
|
9
|
-
-- INIT: workspaces
|
|
1
|
+
-- MIGRATE: 1 baseline
|
|
2
|
+
-- The complete v3 schema baseline. SqlRite owns PRAGMA user_version: subsequent
|
|
3
|
+
-- MIGRATE blocks are both the evolution history and the external schema stamp.
|
|
4
|
+
|
|
5
|
+
-- workspaces
|
|
10
6
|
-- project_root: workspace pointer. NULL = headless (no disk side-effects);
|
|
11
7
|
-- non-null = absolute path to the client's source tree, supplied at
|
|
12
8
|
-- workspace.create or workspace.set_root.
|
|
@@ -25,7 +21,7 @@ CREATE TABLE IF NOT EXISTS workspaces (
|
|
|
25
21
|
|
|
26
22
|
CREATE INDEX IF NOT EXISTS sessions_created_at ON workspaces (created_at);
|
|
27
23
|
|
|
28
|
-
--
|
|
24
|
+
-- runs
|
|
29
25
|
CREATE TABLE IF NOT EXISTS workers (
|
|
30
26
|
id INTEGER NOT NULL PRIMARY KEY,
|
|
31
27
|
version INTEGER NOT NULL DEFAULT 0 CHECK (version >= 0),
|
|
@@ -48,8 +44,8 @@ CREATE INDEX IF NOT EXISTS workers_parent_worker_id ON workers (p
|
|
|
48
44
|
-- → worker_live_by_name → 409), never by this index. Indexed for the by-name resolve/spawn lookup.
|
|
49
45
|
CREATE INDEX IF NOT EXISTS workers_workspace_name ON workers (workspace_id, name);
|
|
50
46
|
|
|
51
|
-
--
|
|
52
|
-
-- flags: per-loop runtime flags (
|
|
47
|
+
-- loops
|
|
48
|
+
-- flags: per-loop runtime flags (auto, noProposals, noWeb, noInteraction,
|
|
53
49
|
-- mode). JSON column, merged over DEFAULT_LOOP_FLAGS in code so missing
|
|
54
50
|
-- keys read as their defaults. SchemeRegistry.resolveForLoop gates schemes
|
|
55
51
|
-- by manifest affinity (proposes / excludedInAsk / requiresWeb / etc).
|
|
@@ -96,7 +92,7 @@ BEGIN
|
|
|
96
92
|
UPDATE loops SET terminated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now') WHERE id = NEW.id;
|
|
97
93
|
END;
|
|
98
94
|
|
|
99
|
-
--
|
|
95
|
+
-- turns
|
|
100
96
|
-- finish_reason / model: provider-call metadata (plurnk-grammar Turn.json).
|
|
101
97
|
-- Properties of the call, not of the model's emission payload — kept on
|
|
102
98
|
-- the Turn row alongside usage rather than nested into packet.assistant.
|
|
@@ -130,7 +126,21 @@ CREATE TABLE IF NOT EXISTS turns (
|
|
|
130
126
|
CREATE UNIQUE INDEX IF NOT EXISTS turns_loop_id_sequence ON turns (loop_id, sequence);
|
|
131
127
|
CREATE INDEX IF NOT EXISTS turns_timestamp ON turns (timestamp);
|
|
132
128
|
|
|
133
|
-
--
|
|
129
|
+
-- derivations
|
|
130
|
+
-- Content-addressed deep projections. Entries point at a COMPLETE artifact by
|
|
131
|
+
-- deep_hash; graph, FTS, and vectors are stored once regardless of how many
|
|
132
|
+
-- workspace/worktree paths carry identical content under the same reader/config.
|
|
133
|
+
-- A building row is unattached and safely replaceable after interruption.
|
|
134
|
+
CREATE TABLE IF NOT EXISTS derivations (
|
|
135
|
+
id INTEGER NOT NULL PRIMARY KEY,
|
|
136
|
+
deep_hash TEXT NOT NULL UNIQUE CHECK (length(deep_hash) > 0),
|
|
137
|
+
state TEXT NOT NULL DEFAULT 'building' CHECK (state IN ('building', 'complete')),
|
|
138
|
+
disposition TEXT CHECK (disposition IN ('vector', 'lexical', 'excluded', 'nonsemantic', 'failed')),
|
|
139
|
+
reason TEXT,
|
|
140
|
+
CHECK ((state = 'building' AND disposition IS NULL) OR (state = 'complete' AND disposition IS NOT NULL))
|
|
141
|
+
) STRICT;
|
|
142
|
+
|
|
143
|
+
-- entries
|
|
134
144
|
-- The canonical addressable store. (workspace, owner, scheme, pathname) is the identity
|
|
135
145
|
-- tuple, and NO component may be NULL: NULLs are distinct under SQL UNIQUE, so a nullable
|
|
136
146
|
-- component voids the identity index — the #526 disease, re-run on this axis as run59/#545
|
|
@@ -175,7 +185,8 @@ CREATE TABLE IF NOT EXISTS entries (
|
|
|
175
185
|
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
176
186
|
CHECK (workspace_id IS NOT NULL),
|
|
177
187
|
FOREIGN KEY (workspace_id) REFERENCES workspaces(id) ON DELETE CASCADE,
|
|
178
|
-
FOREIGN KEY (owner_id) REFERENCES workers(id) ON DELETE CASCADE
|
|
188
|
+
FOREIGN KEY (owner_id) REFERENCES workers(id) ON DELETE CASCADE,
|
|
189
|
+
FOREIGN KEY (deep_hash) REFERENCES derivations(deep_hash)
|
|
179
190
|
) STRICT;
|
|
180
191
|
|
|
181
192
|
-- {§entry-owner} / {§stream-owner-scoped} — ONE identity: the owner is the axis (scope is dead).
|
|
@@ -183,14 +194,14 @@ CREATE TABLE IF NOT EXISTS entries (
|
|
|
183
194
|
-- loop is seq 1), so identity keys on the owner and identical coordinates are DISTINCT rows (#526).
|
|
184
195
|
CREATE UNIQUE INDEX IF NOT EXISTS entries_identity ON entries (workspace_id, owner_id, scheme, pathname);
|
|
185
196
|
|
|
186
|
-
--
|
|
197
|
+
-- entries_scheme_heal
|
|
187
198
|
-- v1→v2 in-place heal ({§entry-identity-no-null}): fold legacy NULL-scheme member rows onto
|
|
188
199
|
-- the reserved 'file' scheme. Idempotent — a second pass updates zero rows. A v1 db already
|
|
189
200
|
-- fragmented by the #545 duplicate class fails HERE on the identity index, loudly and by
|
|
190
201
|
-- design: a fragmented store has no safe automatic merge; recover via a fresh db.
|
|
191
202
|
UPDATE entries SET scheme = 'file' WHERE scheme IS NULL;
|
|
192
203
|
|
|
193
|
-
--
|
|
204
|
+
-- entries_pathname_heal
|
|
194
205
|
-- v2→v3 in-place heal ({§fs-canonical-name}): file-class keys migrate to the bare git-pathspec
|
|
195
206
|
-- form — the leading slash was the retired namespace-origin notation. Idempotent; a db holding
|
|
196
207
|
-- both spellings of one member fails HERE on the identity index, loudly (fresh-db recovery).
|
|
@@ -230,62 +241,58 @@ CREATE TABLE IF NOT EXISTS entry_tags (
|
|
|
230
241
|
|
|
231
242
|
CREATE INDEX IF NOT EXISTS entry_tags_tag ON entry_tags (tag);
|
|
232
243
|
|
|
233
|
-
--
|
|
244
|
+
-- symbol_defs
|
|
234
245
|
-- @graph NODES (plurnk-service#186). Code symbol definitions, populated
|
|
235
|
-
--
|
|
246
|
+
-- once per content-addressed derivation from mimetypes'
|
|
236
247
|
-- `symbols` channel. Qualified path = container ? container || '.' || name : name.
|
|
237
248
|
CREATE TABLE IF NOT EXISTS symbol_defs (
|
|
238
249
|
id INTEGER NOT NULL PRIMARY KEY,
|
|
239
|
-
|
|
240
|
-
entry_id INTEGER NOT NULL,
|
|
250
|
+
derivation_id INTEGER NOT NULL,
|
|
241
251
|
name TEXT NOT NULL CHECK (length(name) > 0),
|
|
242
252
|
kind TEXT NOT NULL,
|
|
243
253
|
container TEXT,
|
|
244
254
|
line INTEGER NOT NULL,
|
|
245
255
|
end_line INTEGER,
|
|
246
|
-
FOREIGN KEY (
|
|
256
|
+
FOREIGN KEY (derivation_id) REFERENCES derivations(id) ON DELETE CASCADE
|
|
247
257
|
) STRICT;
|
|
248
258
|
|
|
249
|
-
CREATE INDEX IF NOT EXISTS symbol_defs_name ON symbol_defs (
|
|
259
|
+
CREATE INDEX IF NOT EXISTS symbol_defs_name ON symbol_defs (name);
|
|
250
260
|
|
|
251
|
-
--
|
|
261
|
+
-- symbol_refs
|
|
252
262
|
-- @graph EDGES (plurnk-service#186), from mimetypes' `references` channel.
|
|
253
263
|
-- name = edge TARGET; container = the SOURCE def's full qualified path (the
|
|
254
264
|
-- @> join key; module-level → NULL); kind ∈ import|call|instantiate|inherit|
|
|
255
265
|
-- type|use (frozen, edge metadata only — traversal is kind-agnostic).
|
|
256
266
|
CREATE TABLE IF NOT EXISTS symbol_refs (
|
|
257
267
|
id INTEGER NOT NULL PRIMARY KEY,
|
|
258
|
-
|
|
259
|
-
entry_id INTEGER NOT NULL,
|
|
268
|
+
derivation_id INTEGER NOT NULL,
|
|
260
269
|
name TEXT NOT NULL CHECK (length(name) > 0),
|
|
261
270
|
kind TEXT NOT NULL,
|
|
262
271
|
container TEXT,
|
|
263
272
|
line INTEGER NOT NULL,
|
|
264
273
|
col INTEGER,
|
|
265
|
-
FOREIGN KEY (
|
|
274
|
+
FOREIGN KEY (derivation_id) REFERENCES derivations(id) ON DELETE CASCADE
|
|
266
275
|
) STRICT;
|
|
267
276
|
|
|
268
|
-
CREATE INDEX IF NOT EXISTS symbol_refs_name ON symbol_refs (
|
|
269
|
-
CREATE INDEX IF NOT EXISTS symbol_refs_source ON symbol_refs (
|
|
277
|
+
CREATE INDEX IF NOT EXISTS symbol_refs_name ON symbol_refs (name);
|
|
278
|
+
CREATE INDEX IF NOT EXISTS symbol_refs_source ON symbol_refs (derivation_id, container);
|
|
270
279
|
|
|
271
|
-
--
|
|
272
|
-
-- Keyword/content index over
|
|
273
|
-
--
|
|
274
|
-
--
|
|
275
|
-
-- precise rank, so no ANN/extension is needed. Populated at the gated manifest-add
|
|
276
|
-
-- hook alongside symbol_defs/refs: re-indexed only when body content changes.
|
|
280
|
+
-- entry_fts (~semantic FTS half — plurnk-service#186)
|
|
281
|
+
-- Keyword/content index over a derivation's readable content; rowid IS derivations.id.
|
|
282
|
+
-- Explicit keyword fallback when no embedder is installed. Vector search never
|
|
283
|
+
-- consults this table: semantic recall is exhaustive over complete vectors.
|
|
277
284
|
CREATE VIRTUAL TABLE IF NOT EXISTS entry_fts USING fts5(content);
|
|
278
285
|
|
|
279
|
-
--
|
|
280
|
-
-- Semantics chunking). One Float32 vector per CHUNK:
|
|
286
|
+
-- entry_embeddings (~semantic vector half — plurnk-service#186; Project
|
|
287
|
+
-- Semantics chunking). One Float32 vector per CHUNK: a derivation tiles into N chunks,
|
|
281
288
|
-- each addressed by its <L> line range (line_start..line_end) and embedded
|
|
282
289
|
-- separately, so a large body is fully searchable instead of truncated at the
|
|
283
290
|
-- embedder's window. line_start/line_end are stored for Project Findings to expose;
|
|
284
|
-
-- the rank currently max-pools
|
|
285
|
-
--
|
|
286
|
-
--
|
|
291
|
+
-- the rank currently max-pools a derivation's chunks, then projects every attached
|
|
292
|
+
-- pathname. semantic_rank exhaustively cosine-ranks these.
|
|
293
|
+
-- CASCADE-deleted with the derivation artifact.
|
|
287
294
|
CREATE TABLE IF NOT EXISTS entry_embeddings (
|
|
288
|
-
|
|
295
|
+
derivation_id INTEGER NOT NULL,
|
|
289
296
|
chunk_seq INTEGER NOT NULL,
|
|
290
297
|
line_start INTEGER NOT NULL,
|
|
291
298
|
line_end INTEGER NOT NULL,
|
|
@@ -294,11 +301,11 @@ CREATE TABLE IF NOT EXISTS entry_embeddings (
|
|
|
294
301
|
-- per row as the dimension/staleness guard: rank filters by the current model so
|
|
295
302
|
-- a swap never cosine-compares mismatched dimensions.
|
|
296
303
|
embedding_model TEXT NOT NULL,
|
|
297
|
-
PRIMARY KEY (
|
|
298
|
-
FOREIGN KEY (
|
|
304
|
+
PRIMARY KEY (derivation_id, chunk_seq),
|
|
305
|
+
FOREIGN KEY (derivation_id) REFERENCES derivations(id) ON DELETE CASCADE
|
|
299
306
|
) STRICT;
|
|
300
307
|
|
|
301
|
-
--
|
|
308
|
+
-- log_entries
|
|
302
309
|
-- Chronological event store. sequence is 1-based, scoped to the turn —
|
|
303
310
|
-- resets at each new turn. URI-bit columns are unprefixed (scheme,
|
|
304
311
|
-- pathname, …). state/outcome/attrs carry the proposal lifecycle —
|
|
@@ -398,7 +405,7 @@ BEGIN
|
|
|
398
405
|
SELECT RAISE(ABORT, 'log_entries core fields are immutable; only state/outcome/status_rx/rx/expanded may change');
|
|
399
406
|
END;
|
|
400
407
|
|
|
401
|
-
--
|
|
408
|
+
-- schemes_providers
|
|
402
409
|
-- Scheme/provider catalog. Schemes are static (registered at boot);
|
|
403
410
|
-- providers carry per-model metadata for cost accounting and selection.
|
|
404
411
|
CREATE TABLE IF NOT EXISTS schemes (
|
|
@@ -426,7 +433,7 @@ CREATE TABLE IF NOT EXISTS providers (
|
|
|
426
433
|
|
|
427
434
|
CREATE INDEX IF NOT EXISTS providers_created_at ON providers (created_at);
|
|
428
435
|
|
|
429
|
-
--
|
|
436
|
+
-- cost_rollups
|
|
430
437
|
-- Triggers maintaining denormalized cost_pico totals on runs and workspaces
|
|
431
438
|
-- as turns insert/update. Pure denormalization (textbook trigger use);
|
|
432
439
|
-- no branching state-machine logic lives here.
|
|
@@ -474,7 +481,7 @@ BEGIN
|
|
|
474
481
|
);
|
|
475
482
|
END;
|
|
476
483
|
|
|
477
|
-
--
|
|
484
|
+
-- subscriptions
|
|
478
485
|
-- Subscription registry per SPEC §subscriptions. Exists ONLY for cancellation
|
|
479
486
|
-- routing (SEND[499] → lookup → scheme teardown). Closed rows persist
|
|
480
487
|
-- for forensics; partial unique index enforces one active subscription
|
|
@@ -513,7 +520,7 @@ CREATE INDEX IF NOT EXISTS subscriptions_opened_at ON subscriptions (opened_at);
|
|
|
513
520
|
|
|
514
521
|
-- (worker_watermarks removed — §env-delta is now pull-from-log, no per-worker snapshot.)
|
|
515
522
|
|
|
516
|
-
--
|
|
523
|
+
-- workspace_constraints
|
|
517
524
|
-- SPEC §membership constraint overlay — the client's supersede over git membership.
|
|
518
525
|
-- Per (workspace, effect, glob/target): `pick` (members git misses, resolved by a
|
|
519
526
|
-- targeted client-dictated scan), `hide` (drop git-tracked matches), `view` (member
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-service",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-grammar contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"test:lint": "tsc --noEmit",
|
|
40
40
|
"test:unit": "node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-timeout=30000 src/**/*.test.ts",
|
|
41
41
|
"test:intg": "PLURNK_SERVICE_FILES_ITEMS=0 node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-concurrency=8 --test-timeout=30000 test/intg/*.test.ts",
|
|
42
|
-
"test:live": "PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
43
|
-
"test:live:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
44
|
-
"test:demo": "PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
45
|
-
"test:demo:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
42
|
+
"test:live": "PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
43
|
+
"test:live:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
44
|
+
"test:demo": "PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
45
|
+
"test:demo:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_EMBED_DISABLE=0 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
46
46
|
"test:all": "npm run test:lint && npm run test:unit && npm run test:intg && npm run test:demo",
|
|
47
47
|
"test:digest": "node --conditions=plurnk-dev bin/digest.ts",
|
|
48
48
|
"test:digest-failures": "node --conditions=plurnk-dev bin/digest-failures.ts",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"build:clean": "rm -rf dist",
|
|
52
52
|
"build:dist": "tsc -p tsconfig.build.json",
|
|
53
53
|
"build:sql": "node --conditions=plurnk-dev scripts/copy-sql.mjs",
|
|
54
|
-
"build": "
|
|
54
|
+
"build:info": "node scripts/write-build-info.mjs",
|
|
55
|
+
"build": "npm run build:clean && npm run build:dist && npm run build:sql && npm run build:info",
|
|
55
56
|
"build:global:install": "npm run build && npm install -g .",
|
|
56
57
|
"build:global:uninstall": "npm uninstall -g @plurnk/plurnk-service",
|
|
57
58
|
"build:local:install": "node --conditions=plurnk-dev scripts/install-sandbox.mjs install",
|
|
@@ -62,24 +63,28 @@
|
|
|
62
63
|
"prepack": "npm run build"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
|
-
"@plurnk/
|
|
66
|
-
"@plurnk/plurnk-
|
|
67
|
-
"@plurnk/plurnk-execs
|
|
68
|
-
"@plurnk/plurnk-execs-
|
|
69
|
-
"@plurnk/plurnk-execs-
|
|
70
|
-
"@plurnk/
|
|
71
|
-
"@plurnk/plurnk-grammar": "1.
|
|
72
|
-
"@plurnk/plurnk-
|
|
73
|
-
"@plurnk/plurnk-mimetypes
|
|
74
|
-
"@plurnk/plurnk-
|
|
75
|
-
"@plurnk/plurnk-
|
|
76
|
-
"@plurnk/plurnk-
|
|
77
|
-
"@
|
|
66
|
+
"@plurnk/gbnf": "1.3.0",
|
|
67
|
+
"@plurnk/plurnk-agui": "1.3.0",
|
|
68
|
+
"@plurnk/plurnk-execs": "1.3.0",
|
|
69
|
+
"@plurnk/plurnk-execs-common": "1.3.0",
|
|
70
|
+
"@plurnk/plurnk-execs-mcp": "1.3.0",
|
|
71
|
+
"@plurnk/plurnk-execs-search": "1.3.0",
|
|
72
|
+
"@plurnk/plurnk-grammar": "1.3.0",
|
|
73
|
+
"@plurnk/plurnk-meta": "1.3.0",
|
|
74
|
+
"@plurnk/plurnk-mimetypes": "1.3.0",
|
|
75
|
+
"@plurnk/plurnk-mimetypes-embeddings": "1.3.0",
|
|
76
|
+
"@plurnk/plurnk-mimetypes-text-html": "1.3.0",
|
|
77
|
+
"@plurnk/plurnk-providers": "1.3.0",
|
|
78
|
+
"@plurnk/plurnk-providers-cloudflare": "~1.2.0",
|
|
79
|
+
"@plurnk/plurnk-providers-google": "~1.2.0",
|
|
80
|
+
"@plurnk/plurnk-providers-openrouter": "~1.2.0",
|
|
81
|
+
"@plurnk/plurnk-providers-xai": "~1.2.0",
|
|
82
|
+
"@plurnk/plurnk-schemes": "1.3.0",
|
|
83
|
+
"@plurnk/plurnk-schemes-http": "1.3.0",
|
|
84
|
+
"@possumtech/sqlrite": "^6.5.0",
|
|
78
85
|
"diff": "^9.0.0",
|
|
79
86
|
"ignore": "7.0.6",
|
|
80
|
-
"isomorphic-git": "1.
|
|
81
|
-
"@plurnk/plurnk-mimetypes-embeddings": "1.2.0",
|
|
82
|
-
"@plurnk/plurnk-meta": "1.2.0"
|
|
87
|
+
"isomorphic-git": "1.40.0"
|
|
83
88
|
},
|
|
84
89
|
"devDependencies": {
|
|
85
90
|
"@types/diff": "^7.0.2"
|
package/dist/server/yolo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yolo.d.ts","sourceRoot":"","sources":["../../src/server/yolo.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI,CAuB/C;CACJ"}
|
package/dist/server/yolo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yolo.js","sourceRoot":"","sources":["../../src/server/yolo.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,8DAA8D;AAC9D,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,uEAAuE;AACvE,sBAAsB;AACtB,EAAE;AACF,iCAAiC;AACjC,yDAAyD;AACzD,qDAAqD;AACrD,0EAA0E;AAC1E,2EAA2E;AAC3E,oEAAoE;AACpE,yEAAyE;AACzE,wBAAwB;AACxB,2EAA2E;AAC3E,qEAAqE;AACrE,EAAE;AACF,2DAA2D;AAC3D,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,2BAA2B;AAC3B,sEAAsE;AACtE,+EAA+E;AAC/E,EAAE;AACF,kFAAkF;AAClF,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,yEAAyE;AACzE,+DAA+D;AAM/D,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,MAAM,CAAC,UAAU,CAAC,MAAc,EAAE,GAAO;QACrC,qCAAqC;QACrC,MAAM,CAAC,iBAAiB,CAAC,CAAC,KAA2B,EAAE,EAAE;YACrD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI;gBAAE,OAAO;YAC9B,kFAAkF;YAClF,mFAAmF;YACnF,+DAA+D;YAC/D,IAAI,KAAK,CAAC,EAAE,KAAK,MAAM,IAAK,KAAK,CAAC,KAA+B,CAAC,QAAQ,KAAK,SAAS;gBAAE,OAAO;YACjG,IAAI,CAAC;gBACD,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;oBACzB,uEAAuE;oBACvE,yEAAyE;oBACzE,wEAAwE;oBACxE,iEAAiE;oBACjE,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC;oBAChG,OAAO;gBACX,CAAC;gBACD,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;YACrE,CAAC;YAAC,MAAM,CAAC;gBACL,wDAAwD;gBACxD,uDAAuD;YAC3D,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|