@plurnk/plurnk-service 1.6.1 → 1.7.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/SPEC.md +84 -21
- package/dist/build-info.json +1 -1
- package/dist/core/ClientInteractions.d.ts +19 -0
- package/dist/core/ClientInteractions.d.ts.map +1 -0
- package/dist/core/ClientInteractions.js +124 -0
- package/dist/core/ClientInteractions.js.map +1 -0
- package/dist/core/ClientInteractions.sql +34 -0
- package/dist/core/CoreSchemeServices.d.ts +8 -2
- package/dist/core/CoreSchemeServices.d.ts.map +1 -1
- package/dist/core/CoreSchemeServices.js +7 -1
- package/dist/core/CoreSchemeServices.js.map +1 -1
- package/dist/core/Dispatcher.d.ts +3 -1
- package/dist/core/Dispatcher.d.ts.map +1 -1
- package/dist/core/Dispatcher.js +41 -38
- package/dist/core/Dispatcher.js.map +1 -1
- package/dist/core/Engine.d.ts +15 -1
- package/dist/core/Engine.d.ts.map +1 -1
- package/dist/core/Engine.js +80 -17
- package/dist/core/Engine.js.map +1 -1
- package/dist/core/ExecutableTools.d.ts +1 -0
- package/dist/core/ExecutableTools.d.ts.map +1 -1
- package/dist/core/ExecutableTools.js +17 -9
- package/dist/core/ExecutableTools.js.map +1 -1
- package/dist/core/ExecutorRegistry.d.ts +11 -3
- package/dist/core/ExecutorRegistry.d.ts.map +1 -1
- package/dist/core/ExecutorRegistry.js +139 -16
- package/dist/core/ExecutorRegistry.js.map +1 -1
- package/dist/core/PacketBuilder.d.ts.map +1 -1
- package/dist/core/PacketBuilder.js +24 -12
- package/dist/core/PacketBuilder.js.map +1 -1
- package/dist/core/ProposalLifecycle.d.ts +3 -1
- package/dist/core/ProposalLifecycle.d.ts.map +1 -1
- package/dist/core/ProposalLifecycle.js +6 -3
- package/dist/core/ProposalLifecycle.js.map +1 -1
- package/dist/core/ResourceMutations.d.ts +2 -2
- package/dist/core/ResourceMutations.d.ts.map +1 -1
- package/dist/core/ResourceMutations.js +8 -8
- package/dist/core/ResourceMutations.js.map +1 -1
- package/dist/core/SchemeRegistry.d.ts +18 -10
- package/dist/core/SchemeRegistry.d.ts.map +1 -1
- package/dist/core/SchemeRegistry.js +194 -42
- package/dist/core/SchemeRegistry.js.map +1 -1
- package/dist/core/TurnRunner.d.ts +3 -1
- package/dist/core/TurnRunner.d.ts.map +1 -1
- package/dist/core/TurnRunner.js +8 -5
- package/dist/core/TurnRunner.js.map +1 -1
- package/dist/core/WorkspaceGate.d.ts +1 -0
- package/dist/core/WorkspaceGate.d.ts.map +1 -1
- package/dist/core/WorkspaceGate.js +39 -0
- package/dist/core/WorkspaceGate.js.map +1 -1
- package/dist/core/caps/CoreInteractionCaps.d.ts +9 -0
- package/dist/core/caps/CoreInteractionCaps.d.ts.map +1 -0
- package/dist/core/caps/CoreInteractionCaps.js +14 -0
- package/dist/core/caps/CoreInteractionCaps.js.map +1 -0
- package/dist/core/caps/SchemeCtxImpl.d.ts +2 -1
- package/dist/core/caps/SchemeCtxImpl.d.ts.map +1 -1
- package/dist/core/caps/SchemeCtxImpl.js +3 -0
- package/dist/core/caps/SchemeCtxImpl.js.map +1 -1
- package/dist/core/scheme-types.d.ts +2 -1
- package/dist/core/scheme-types.d.ts.map +1 -1
- package/dist/core/scheme-types.js.map +1 -1
- package/dist/schemes/Exec.d.ts.map +1 -1
- package/dist/schemes/Exec.js +27 -5
- package/dist/schemes/Exec.js.map +1 -1
- package/dist/server/Daemon.d.ts +13 -7
- package/dist/server/Daemon.d.ts.map +1 -1
- package/dist/server/Daemon.js +187 -21
- package/dist/server/Daemon.js.map +1 -1
- package/dist/server/DaemonModule.d.ts +31 -3
- package/dist/server/DaemonModule.d.ts.map +1 -1
- package/dist/server/client-input.d.ts +2 -0
- package/dist/server/client-input.d.ts.map +1 -1
- package/dist/server/client-input.js +12 -0
- package/dist/server/client-input.js.map +1 -1
- package/dist/server/lifecycle-recovery.sql +6 -0
- package/dist/server/loopDocs.d.ts +1 -0
- package/dist/server/loopDocs.d.ts.map +1 -1
- package/dist/server/loopDocs.js +37 -8
- package/dist/server/loopDocs.js.map +1 -1
- package/dist/server/loopDocs.sql +10 -0
- package/dist/server/workspace-capabilities.sql +19 -0
- package/migrations/001_schema.sql +31 -0
- package/package.json +34 -33
|
@@ -19,6 +19,17 @@ CREATE TABLE IF NOT EXISTS workspaces (
|
|
|
19
19
|
|
|
20
20
|
CREATE INDEX IF NOT EXISTS workspaces_created_at ON workspaces (created_at);
|
|
21
21
|
|
|
22
|
+
-- {§module-workspace-state}: one opaque, provider-validated JSON snapshot per
|
|
23
|
+
-- module owner and workspace. Core owns isolation and lifecycle only.
|
|
24
|
+
CREATE TABLE IF NOT EXISTS workspace_module_state (
|
|
25
|
+
workspace_id INTEGER NOT NULL,
|
|
26
|
+
namespace_owner TEXT NOT NULL CHECK (length(namespace_owner) > 0),
|
|
27
|
+
state TEXT NOT NULL CHECK (json_valid(state)),
|
|
28
|
+
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
29
|
+
PRIMARY KEY (workspace_id, namespace_owner),
|
|
30
|
+
FOREIGN KEY (workspace_id) REFERENCES workspaces(id) ON DELETE CASCADE
|
|
31
|
+
) STRICT;
|
|
32
|
+
|
|
22
33
|
-- workers
|
|
23
34
|
CREATE TABLE IF NOT EXISTS workers (
|
|
24
35
|
id INTEGER NOT NULL PRIMARY KEY,
|
|
@@ -1258,6 +1269,26 @@ BEGIN
|
|
|
1258
1269
|
UPDATE log_entries SET ambient_event_id = last_insert_rowid() WHERE id = NEW.id;
|
|
1259
1270
|
END;
|
|
1260
1271
|
|
|
1272
|
+
-- {§client-interactions}: the durable discoverable half of a client-owned
|
|
1273
|
+
-- interaction. The process-local lifecycle owner holds the awaiting callable;
|
|
1274
|
+
-- this row holds only presentation and routing facts. Settlement deletes the
|
|
1275
|
+
-- row, so client response payloads and owner-private continuation state are
|
|
1276
|
+
-- never copied into persistence.
|
|
1277
|
+
CREATE TABLE IF NOT EXISTS client_interactions (
|
|
1278
|
+
id INTEGER NOT NULL PRIMARY KEY,
|
|
1279
|
+
worker_id INTEGER NOT NULL,
|
|
1280
|
+
loop_id INTEGER NOT NULL,
|
|
1281
|
+
turn_id INTEGER NOT NULL,
|
|
1282
|
+
request TEXT NOT NULL CHECK (json_valid(request) AND json_type(request) = 'object'),
|
|
1283
|
+
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
1284
|
+
FOREIGN KEY (worker_id) REFERENCES workers(id) ON DELETE CASCADE,
|
|
1285
|
+
FOREIGN KEY (loop_id) REFERENCES loops(id) ON DELETE CASCADE,
|
|
1286
|
+
FOREIGN KEY (turn_id) REFERENCES turns(id) ON DELETE CASCADE
|
|
1287
|
+
) STRICT;
|
|
1288
|
+
|
|
1289
|
+
CREATE INDEX IF NOT EXISTS client_interactions_worker_id_id
|
|
1290
|
+
ON client_interactions (worker_id, id);
|
|
1291
|
+
|
|
1261
1292
|
-- subscriptions
|
|
1262
1293
|
-- Durable subscription lifecycle per SPEC {§subscriptions}. The row records what
|
|
1263
1294
|
-- the worker holds and routes cancellation to a separate process-local callable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-service",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-contracts contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"test:lint": "npm run types:sqlrite:check && tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
44
44
|
"test:unit": "node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-timeout=30000 scripts/*.test.mjs src/**/*.test.ts",
|
|
45
45
|
"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",
|
|
46
|
+
"test:mcp:dogfood": "PLURNK_MCP_DOGFOOD=1 node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-concurrency=1 --test-timeout=120000 test/intg/mcp-agui-composition.test.ts",
|
|
46
47
|
"build:rail": "npm run build:gbnf -w @plurnk/plurnk-contracts",
|
|
47
48
|
"pretest:live": "npm run build:rail",
|
|
48
49
|
"test:live": "bash ../scripts/operator-environment.sh node --conditions=plurnk-dev scripts/live.mjs",
|
|
@@ -82,38 +83,38 @@
|
|
|
82
83
|
"@opentelemetry/resources": "^2.10.0",
|
|
83
84
|
"@opentelemetry/sdk-metrics": "^2.10.0",
|
|
84
85
|
"@opentelemetry/sdk-trace-base": "^2.10.0",
|
|
85
|
-
"@plurnk/gbnf": "1.
|
|
86
|
-
"@plurnk/plurnk-agui": "1.
|
|
87
|
-
"@plurnk/plurnk-contracts": "1.
|
|
88
|
-
"@plurnk/plurnk-execs": "1.
|
|
89
|
-
"@plurnk/plurnk-execs-common": "1.
|
|
90
|
-
"@plurnk/plurnk-execs-git": "1.
|
|
91
|
-
"@plurnk/plurnk-execs-jq": "1.
|
|
92
|
-
"@plurnk/plurnk-execs-search": "1.
|
|
93
|
-
"@plurnk/plurnk-execs-sqlite": "1.
|
|
94
|
-
"@plurnk/plurnk-execs-wasm": "1.
|
|
95
|
-
"@plurnk/plurnk-hooks": "1.
|
|
96
|
-
"@plurnk/plurnk-mcp": "1.
|
|
97
|
-
"@plurnk/plurnk-meta": "1.
|
|
98
|
-
"@plurnk/plurnk-mimetypes": "1.
|
|
99
|
-
"@plurnk/plurnk-mimetypes-application-ipynb": "1.
|
|
100
|
-
"@plurnk/plurnk-mimetypes-application-json": "1.
|
|
101
|
-
"@plurnk/plurnk-mimetypes-application-jsonl": "1.
|
|
102
|
-
"@plurnk/plurnk-mimetypes-application-pdf": "1.
|
|
103
|
-
"@plurnk/plurnk-mimetypes-application-xml": "1.
|
|
104
|
-
"@plurnk/plurnk-mimetypes-embeddings": "1.
|
|
105
|
-
"@plurnk/plurnk-mimetypes-text-csv": "1.
|
|
106
|
-
"@plurnk/plurnk-mimetypes-text-diff": "1.
|
|
107
|
-
"@plurnk/plurnk-mimetypes-text-dotenv": "1.
|
|
108
|
-
"@plurnk/plurnk-mimetypes-text-html": "1.
|
|
109
|
-
"@plurnk/plurnk-mimetypes-text-ini": "1.
|
|
110
|
-
"@plurnk/plurnk-mimetypes-text-markdown": "1.
|
|
111
|
-
"@plurnk/plurnk-mimetypes-text-plain": "1.
|
|
112
|
-
"@plurnk/plurnk-mimetypes-tokenizers": "1.
|
|
113
|
-
"@plurnk/plurnk-models": "1.
|
|
114
|
-
"@plurnk/plurnk-providers": "1.
|
|
115
|
-
"@plurnk/plurnk-schemes": "1.
|
|
116
|
-
"@plurnk/plurnk-schemes-http": "1.
|
|
86
|
+
"@plurnk/gbnf": "1.7.0",
|
|
87
|
+
"@plurnk/plurnk-agui": "1.7.0",
|
|
88
|
+
"@plurnk/plurnk-contracts": "1.7.0",
|
|
89
|
+
"@plurnk/plurnk-execs": "1.7.0",
|
|
90
|
+
"@plurnk/plurnk-execs-common": "1.7.0",
|
|
91
|
+
"@plurnk/plurnk-execs-git": "1.7.0",
|
|
92
|
+
"@plurnk/plurnk-execs-jq": "1.7.0",
|
|
93
|
+
"@plurnk/plurnk-execs-search": "1.7.0",
|
|
94
|
+
"@plurnk/plurnk-execs-sqlite": "1.7.0",
|
|
95
|
+
"@plurnk/plurnk-execs-wasm": "1.7.0",
|
|
96
|
+
"@plurnk/plurnk-hooks": "1.7.0",
|
|
97
|
+
"@plurnk/plurnk-mcp": "1.7.0",
|
|
98
|
+
"@plurnk/plurnk-meta": "1.7.0",
|
|
99
|
+
"@plurnk/plurnk-mimetypes": "1.7.0",
|
|
100
|
+
"@plurnk/plurnk-mimetypes-application-ipynb": "1.7.0",
|
|
101
|
+
"@plurnk/plurnk-mimetypes-application-json": "1.7.0",
|
|
102
|
+
"@plurnk/plurnk-mimetypes-application-jsonl": "1.7.0",
|
|
103
|
+
"@plurnk/plurnk-mimetypes-application-pdf": "1.7.0",
|
|
104
|
+
"@plurnk/plurnk-mimetypes-application-xml": "1.7.0",
|
|
105
|
+
"@plurnk/plurnk-mimetypes-embeddings": "1.7.0",
|
|
106
|
+
"@plurnk/plurnk-mimetypes-text-csv": "1.7.0",
|
|
107
|
+
"@plurnk/plurnk-mimetypes-text-diff": "1.7.0",
|
|
108
|
+
"@plurnk/plurnk-mimetypes-text-dotenv": "1.7.0",
|
|
109
|
+
"@plurnk/plurnk-mimetypes-text-html": "1.7.0",
|
|
110
|
+
"@plurnk/plurnk-mimetypes-text-ini": "1.7.0",
|
|
111
|
+
"@plurnk/plurnk-mimetypes-text-markdown": "1.7.0",
|
|
112
|
+
"@plurnk/plurnk-mimetypes-text-plain": "1.7.0",
|
|
113
|
+
"@plurnk/plurnk-mimetypes-tokenizers": "1.7.0",
|
|
114
|
+
"@plurnk/plurnk-models": "1.7.0",
|
|
115
|
+
"@plurnk/plurnk-providers": "1.7.0",
|
|
116
|
+
"@plurnk/plurnk-schemes": "1.7.0",
|
|
117
|
+
"@plurnk/plurnk-schemes-http": "1.7.0",
|
|
117
118
|
"@possumtech/sqlrite": "^6.5.2",
|
|
118
119
|
"diff": "^9.0.0",
|
|
119
120
|
"ignore": "7.0.6",
|