@plurnk/plurnk-service 0.25.0 → 0.27.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 +66 -46
- package/dist/Paths.d.ts +0 -1
- package/dist/Paths.d.ts.map +1 -1
- package/dist/Paths.js +3 -6
- package/dist/Paths.js.map +1 -1
- package/dist/content/path-mimetype.js +2 -2
- package/dist/content/path-mimetype.js.map +1 -1
- package/dist/core/ChannelWrite.d.ts +17 -2
- package/dist/core/ChannelWrite.d.ts.map +1 -1
- package/dist/core/ChannelWrite.js +11 -5
- package/dist/core/ChannelWrite.js.map +1 -1
- package/dist/core/Engine.d.ts +4 -5
- package/dist/core/Engine.d.ts.map +1 -1
- package/dist/core/Engine.js +149 -49
- package/dist/core/Engine.js.map +1 -1
- package/dist/core/ExecutorRegistry.d.ts +3 -0
- package/dist/core/ExecutorRegistry.d.ts.map +1 -1
- package/dist/core/ExecutorRegistry.js +8 -1
- package/dist/core/ExecutorRegistry.js.map +1 -1
- package/dist/core/SchemeRegistry.d.ts.map +1 -1
- package/dist/core/SchemeRegistry.js +39 -15
- package/dist/core/SchemeRegistry.js.map +1 -1
- package/dist/core/caps/DbNotifyCaps.d.ts.map +1 -1
- package/dist/core/caps/DbNotifyCaps.js +4 -1
- package/dist/core/caps/DbNotifyCaps.js.map +1 -1
- package/dist/core/caps/DbSubscriptionCaps.d.ts +1 -1
- package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
- package/dist/core/caps/DbSubscriptionCaps.js +2 -2
- package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
- package/dist/core/fork.js +1 -1
- package/dist/core/fork.js.map +1 -1
- package/dist/core/git-membership.d.ts.map +1 -1
- package/dist/core/git-membership.js +107 -46
- package/dist/core/git-membership.js.map +1 -1
- package/dist/core/git-state.js +2 -2
- package/dist/core/packet-wire.js +5 -5
- package/dist/core/packet-wire.js.map +1 -1
- package/dist/core/plugin-trust.d.ts +4 -0
- package/dist/core/plugin-trust.d.ts.map +1 -0
- package/dist/core/plugin-trust.js +23 -0
- package/dist/core/plugin-trust.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/schemes/Exec.d.ts.map +1 -1
- package/dist/schemes/Exec.js +78 -20
- package/dist/schemes/Exec.js.map +1 -1
- package/dist/schemes/File.d.ts.map +1 -1
- package/dist/schemes/File.js +17 -14
- package/dist/schemes/File.js.map +1 -1
- package/dist/schemes/Log.js +6 -6
- package/dist/schemes/Log.js.map +1 -1
- package/dist/schemes/Plurnk.js +4 -4
- package/dist/schemes/Plurnk.js.map +1 -1
- package/dist/schemes/_entry-chunk.d.ts +11 -0
- package/dist/schemes/_entry-chunk.d.ts.map +1 -0
- package/dist/schemes/_entry-chunk.js +100 -0
- package/dist/schemes/_entry-chunk.js.map +1 -0
- package/dist/schemes/_entry-find.d.ts.map +1 -1
- package/dist/schemes/_entry-find.js +6 -2
- package/dist/schemes/_entry-find.js.map +1 -1
- package/dist/schemes/_entry-graph.js +1 -1
- package/dist/schemes/_entry-graph.js.map +1 -1
- package/dist/schemes/_entry-manifest.d.ts.map +1 -1
- package/dist/schemes/_entry-manifest.js +14 -6
- package/dist/schemes/_entry-manifest.js.map +1 -1
- package/dist/schemes/_entry-ops.js +2 -2
- package/dist/schemes/_entry-ops.js.map +1 -1
- package/dist/schemes/_entry-semantic.d.ts +22 -2
- package/dist/schemes/_entry-semantic.d.ts.map +1 -1
- package/dist/schemes/_entry-semantic.js +96 -9
- package/dist/schemes/_entry-semantic.js.map +1 -1
- package/dist/schemes/exec-env.d.ts +5 -0
- package/dist/schemes/exec-env.d.ts.map +1 -0
- package/dist/schemes/exec-env.js +29 -0
- package/dist/schemes/exec-env.js.map +1 -0
- package/dist/server/Daemon.d.ts +1 -1
- package/dist/server/Daemon.d.ts.map +1 -1
- package/dist/server/Daemon.js +11 -1
- package/dist/server/Daemon.js.map +1 -1
- package/dist/server/dsl.d.ts +2 -2
- package/dist/server/dsl.js +2 -2
- package/dist/server/envelope.d.ts +1 -0
- package/dist/server/envelope.d.ts.map +1 -1
- package/dist/server/envelope.js +5 -5
- package/dist/server/envelope.js.map +1 -1
- package/dist/server/methods/entry_read.d.ts.map +1 -1
- package/dist/server/methods/entry_read.js +29 -7
- package/dist/server/methods/entry_read.js.map +1 -1
- package/dist/server/methods/log_read.d.ts.map +1 -1
- package/dist/server/methods/log_read.js +14 -1
- package/dist/server/methods/log_read.js.map +1 -1
- package/dist/server/methods/loop_inject.d.ts +5 -0
- package/dist/server/methods/loop_inject.d.ts.map +1 -0
- package/dist/server/methods/loop_inject.js +58 -0
- package/dist/server/methods/loop_inject.js.map +1 -0
- package/dist/server/methods/loop_run.d.ts.map +1 -1
- package/dist/server/methods/loop_run.js +6 -3
- package/dist/server/methods/loop_run.js.map +1 -1
- package/dist/server/methods/op_edit.js +1 -1
- package/dist/server/methods/op_edit.js.map +1 -1
- package/dist/server/methods/op_find.js +1 -1
- package/dist/server/methods/op_find.js.map +1 -1
- package/dist/server/methods/op_fold.js +1 -1
- package/dist/server/methods/op_open.js +1 -1
- package/dist/server/methods/run_fork.d.ts +5 -0
- package/dist/server/methods/run_fork.d.ts.map +1 -0
- package/dist/server/methods/run_fork.js +42 -0
- package/dist/server/methods/run_fork.js.map +1 -0
- package/dist/server/methods/session_constraints.js +6 -6
- package/dist/server/methods/session_constraints.js.map +1 -1
- package/dist/server/methods/session_create.d.ts +1 -0
- package/dist/server/methods/session_create.d.ts.map +1 -1
- package/dist/server/methods/session_create.js +32 -0
- package/dist/server/methods/session_create.js.map +1 -1
- package/migrations/0000-00-00.01_schema.sql +29 -15
- package/package.json +108 -111
- package/requirements.md +1 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// run.fork — branch a run's log into a new run in the same session (#228). Wraps
|
|
2
|
+
// Fork.fork: deep-copies loops/turns/entries (fold-state + attribution intact)
|
|
3
|
+
// into a parent_run_id-lineaged branch that SHARES the session's world (entries +
|
|
4
|
+
// overlay), copying nothing of it. Defaults to the session's model run (the
|
|
5
|
+
// conversation); the conversation client (e.g. :AI????) forks it, then reads the
|
|
6
|
+
// branch via log.read({runId}).
|
|
7
|
+
import Fork from "../../core/fork.js";
|
|
8
|
+
export default class RunForkMethod {
|
|
9
|
+
static register(registry) {
|
|
10
|
+
registry.registerMethod("run.fork", {
|
|
11
|
+
handler: async (params, ctx) => {
|
|
12
|
+
if (ctx.session === null)
|
|
13
|
+
throw new Error("run.fork requires an attached session");
|
|
14
|
+
const p = params;
|
|
15
|
+
let runId = p.runId;
|
|
16
|
+
if (runId === undefined) {
|
|
17
|
+
if (ctx.session.modelRunId === null)
|
|
18
|
+
throw new Error("run.fork: no model run to fork — start one with loop.run, or pass runId");
|
|
19
|
+
runId = ctx.session.modelRunId;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
if (typeof runId !== "number" || !Number.isInteger(runId))
|
|
23
|
+
throw new Error("run.fork: runId must be an integer");
|
|
24
|
+
const owner = await ctx.db.envelope_get_run_by_id.get({ id: runId });
|
|
25
|
+
if (owner === undefined)
|
|
26
|
+
throw new Error(`run.fork: run ${runId} not found`);
|
|
27
|
+
if (owner.session_id !== ctx.session.sessionId)
|
|
28
|
+
throw new Error(`run.fork: run ${runId} is not in this session`);
|
|
29
|
+
}
|
|
30
|
+
const branchRunId = await Fork.fork(ctx.db, runId);
|
|
31
|
+
const branch = await ctx.db.envelope_get_run_by_id.get({ id: branchRunId });
|
|
32
|
+
return { runId: branchRunId, runName: branch?.name ?? null, parentRunId: runId };
|
|
33
|
+
},
|
|
34
|
+
description: "Fork a run — branch its log into a new run in the same session (parent_run_id lineage), sharing the session's world (entries + overlay), copying nothing of it. Defaults to the session's model run (the conversation); an explicit runId forks any run in the session (ownership-checked). Returns the new run's {runId, runName}; a conversation client reads it via log.read({runId}). §machine-processes / #228.",
|
|
35
|
+
params: {
|
|
36
|
+
runId: "number? — the run to fork; defaults to the session's current model run (the conversation)",
|
|
37
|
+
},
|
|
38
|
+
requiresInit: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=run_fork.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_fork.js","sourceRoot":"","sources":["../../../src/server/methods/run_fork.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+EAA+E;AAC/E,kFAAkF;AAClF,4EAA4E;AAC5E,iFAAiF;AACjF,gCAAgC;AAIhC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAMtC,MAAM,CAAC,OAAO,OAAO,aAAa;IAC9B,MAAM,CAAC,QAAQ,CAAC,QAAwB;QACpC,QAAQ,CAAC,cAAc,CAAC,UAAU,EAAE;YAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;gBAC3B,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;gBACnF,MAAM,CAAC,GAAG,MAAgB,CAAC;gBAC3B,IAAI,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;gBACpB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACtB,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,KAAK,IAAI;wBAAE,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;oBAChI,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACJ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;wBAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;oBACjH,MAAM,KAAK,GAAG,MAAO,GAAG,CAAC,EAAE,CAAC,sBAAqC,CAAC,GAAG,CAAyB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;oBAC7G,IAAI,KAAK,KAAK,SAAS;wBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,YAAY,CAAC,CAAC;oBAC7E,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,CAAC,OAAO,CAAC,SAAS;wBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,yBAAyB,CAAC,CAAC;gBACrH,CAAC;gBACD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBACnD,MAAM,MAAM,GAAG,MAAO,GAAG,CAAC,EAAE,CAAC,sBAAqC,CAAC,GAAG,CAAmB,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBAC9G,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,IAAI,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;YACrF,CAAC;YACD,WAAW,EAAE,sZAAsZ;YACna,MAAM,EAAE;gBACJ,KAAK,EAAE,2FAA2F;aACrG;YACD,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -2,7 +2,7 @@ import GitMembership from "../../core/git-membership.js";
|
|
|
2
2
|
// Client tooling for the SPEC §membership constraint overlay — the supersede over git
|
|
3
3
|
// membership. `constrain`/`unconstrain` mutate session_constraints then re-resolve
|
|
4
4
|
// membership so the change lands now, not next turn; `constraints` lists them.
|
|
5
|
-
const EFFECTS = new Set(["
|
|
5
|
+
const EFFECTS = new Set(["pick", "hide", "view"]);
|
|
6
6
|
export default class SessionConstraintsMethod {
|
|
7
7
|
static register(registry) {
|
|
8
8
|
registry.registerMethod("session.constrain", {
|
|
@@ -14,9 +14,9 @@ export default class SessionConstraintsMethod {
|
|
|
14
14
|
await GitMembership.resolveGitMembership(ctx.db, ctx.session.sessionId, undefined);
|
|
15
15
|
return { effect, glob };
|
|
16
16
|
},
|
|
17
|
-
description: "Add a workspace membership constraint (SPEC §membership overlay): `
|
|
17
|
+
description: "Add a workspace membership constraint (SPEC §membership overlay): `pick` admits files git misses (the sole source when git is absent), `hide` drops tracked matches, `view` admits a member for read but refuses edits. Takes effect immediately.",
|
|
18
18
|
params: {
|
|
19
|
-
effect: "string — one of:
|
|
19
|
+
effect: "string — one of: pick | hide | view",
|
|
20
20
|
glob: "string — node:path glob matched against workspace-relative paths",
|
|
21
21
|
},
|
|
22
22
|
requiresInit: true,
|
|
@@ -30,9 +30,9 @@ export default class SessionConstraintsMethod {
|
|
|
30
30
|
await GitMembership.resolveGitMembership(ctx.db, ctx.session.sessionId, undefined);
|
|
31
31
|
return { effect, glob };
|
|
32
32
|
},
|
|
33
|
-
description: "Remove a workspace membership constraint — the inverse of session.constrain (the `
|
|
33
|
+
description: "Remove a workspace membership constraint — the inverse of session.constrain (the `drop` verb is deleting the constraint row). Takes effect immediately.",
|
|
34
34
|
params: {
|
|
35
|
-
effect: "string — one of:
|
|
35
|
+
effect: "string — one of: pick | hide | view",
|
|
36
36
|
glob: "string — the glob to remove",
|
|
37
37
|
},
|
|
38
38
|
requiresInit: true,
|
|
@@ -52,7 +52,7 @@ export default class SessionConstraintsMethod {
|
|
|
52
52
|
static #parse(params, method) {
|
|
53
53
|
const p = params;
|
|
54
54
|
if (typeof p.effect !== "string" || !EFFECTS.has(p.effect)) {
|
|
55
|
-
throw new Error(`${method}: effect must be one of
|
|
55
|
+
throw new Error(`${method}: effect must be one of pick | hide | view`);
|
|
56
56
|
}
|
|
57
57
|
if (typeof p.glob !== "string" || p.glob.length === 0) {
|
|
58
58
|
throw new Error(`${method}: glob must be a non-empty string`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_constraints.js","sourceRoot":"","sources":["../../../src/server/methods/session_constraints.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,sFAAsF;AACtF,mFAAmF;AACnF,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E,IAAI;SACrB,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAe,EAAE,MAAc;QACzC,MAAM,CAAC,GAAG,MAA8C,CAAC;QACzD,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,4CAA4C,CAAC,CAAC;QAC3E,CAAC;QACD,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,mCAAmC,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_create.d.ts","sourceRoot":"","sources":["../../../src/server/methods/session_create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"session_create.d.ts","sourceRoot":"","sources":["../../../src/server/methods/session_create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAUvD,MAAM,CAAC,OAAO,OAAO,mBAAmB;;IACpC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;CA2ElD"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { isAbsolute } from "node:path";
|
|
2
2
|
import Envelope from "../envelope.js";
|
|
3
|
+
import GitMembership from "../../core/git-membership.js";
|
|
4
|
+
// #200 — membership-overlay effects, mirroring session.constrain (pick admits a
|
|
5
|
+
// file git misses / the sole source when headless; hide drops a tracked match;
|
|
6
|
+
// view admits a member read-only).
|
|
7
|
+
const CONSTRAINT_EFFECTS = new Set(["pick", "hide", "view"]);
|
|
3
8
|
export default class SessionCreateMethod {
|
|
4
9
|
static register(registry) {
|
|
5
10
|
registry.registerMethod("session.create", {
|
|
@@ -18,7 +23,17 @@ export default class SessionCreateMethod {
|
|
|
18
23
|
if (persona !== null && typeof persona !== "string") {
|
|
19
24
|
throw new Error("session.create: persona must be a string or null");
|
|
20
25
|
}
|
|
26
|
+
// #200 — seed the membership overlay atomically with the session so
|
|
27
|
+
// turn-1's manifest already reflects it (no follow-up session.constrain
|
|
28
|
+
// RPC race). Same effects/semantics as session.constrain.
|
|
29
|
+
const constraints = SessionCreateMethod.#parseConstraints(p.constraints);
|
|
21
30
|
const envelope = await Envelope.createClientEnvelope(ctx.db, { name: p.name, projectRoot, persona });
|
|
31
|
+
if (constraints.length > 0) {
|
|
32
|
+
for (const { effect, glob } of constraints) {
|
|
33
|
+
await ctx.db.crud_insert_session_constraint.run({ session_id: envelope.sessionId, effect, glob });
|
|
34
|
+
}
|
|
35
|
+
await GitMembership.resolveGitMembership(ctx.db, envelope.sessionId, undefined);
|
|
36
|
+
}
|
|
22
37
|
ctx.attachSession(envelope);
|
|
23
38
|
ctx.notify("all", "session/created", {
|
|
24
39
|
id: envelope.sessionId,
|
|
@@ -37,6 +52,7 @@ export default class SessionCreateMethod {
|
|
|
37
52
|
name: "string? — session name (auto-generated if omitted)",
|
|
38
53
|
projectRoot: "string? — absolute path to the client's workspace; null/omitted = headless mode (no disk side-effects on file ops)",
|
|
39
54
|
persona: "string? — session-level persona (text/markdown); cascades as: loops.persona > runs.persona > sessions.persona > PLURNK_PERSONA file",
|
|
55
|
+
constraints: "array? — [{effect, glob}] membership overlay seeded atomically at creation so turn-1's manifest is right with no follow-up RPC. effect: pick (admit a file git misses / the sole source when headless) | hide (drop a tracked match) | view (read-only). glob: node:path glob vs workspace-relative paths.",
|
|
40
56
|
},
|
|
41
57
|
});
|
|
42
58
|
registry.registerNotification("session/created", {
|
|
@@ -49,5 +65,21 @@ export default class SessionCreateMethod {
|
|
|
49
65
|
},
|
|
50
66
|
});
|
|
51
67
|
}
|
|
68
|
+
static #parseConstraints(raw) {
|
|
69
|
+
if (raw === undefined || raw === null)
|
|
70
|
+
return [];
|
|
71
|
+
if (!Array.isArray(raw))
|
|
72
|
+
throw new Error("session.create: constraints must be an array");
|
|
73
|
+
return raw.map((c, i) => {
|
|
74
|
+
const e = c;
|
|
75
|
+
if (typeof e.effect !== "string" || !CONSTRAINT_EFFECTS.has(e.effect)) {
|
|
76
|
+
throw new Error(`session.create: constraints[${i}].effect must be one of pick | hide | view`);
|
|
77
|
+
}
|
|
78
|
+
if (typeof e.glob !== "string" || e.glob.length === 0) {
|
|
79
|
+
throw new Error(`session.create: constraints[${i}].glob must be a non-empty string`);
|
|
80
|
+
}
|
|
81
|
+
return { effect: e.effect, glob: e.glob };
|
|
82
|
+
});
|
|
83
|
+
}
|
|
52
84
|
}
|
|
53
85
|
//# sourceMappingURL=session_create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_create.js","sourceRoot":"","sources":["../../../src/server/methods/session_create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"session_create.js","sourceRoot":"","sources":["../../../src/server/methods/session_create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,gFAAgF;AAChF,+EAA+E;AAC/E,mCAAmC;AACnC,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACpC,MAAM,CAAC,QAAQ,CAAC,QAAwB;QACpC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AS,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QACzF,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,CAAC,GAAG,CAAyC,CAAC;YACpD,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,4CAA4C,CAAC,CAAC;YAClG,CAAC;YACD,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,mCAAmC,CAAC,CAAC;YACzF,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -29,6 +29,7 @@ CREATE TABLE IF NOT EXISTS runs (
|
|
|
29
29
|
parent_run_id INTEGER CHECK (parent_run_id IS NULL OR parent_run_id != id),
|
|
30
30
|
cost_pico INTEGER NOT NULL DEFAULT 0 CHECK (cost_pico >= 0),
|
|
31
31
|
persona TEXT,
|
|
32
|
+
origin TEXT NOT NULL DEFAULT 'client' CHECK (origin IN ('model', 'client', 'plurnk')),
|
|
32
33
|
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE,
|
|
33
34
|
FOREIGN KEY (parent_run_id) REFERENCES runs(id) ON DELETE CASCADE
|
|
34
35
|
) STRICT;
|
|
@@ -108,6 +109,11 @@ CREATE TABLE IF NOT EXISTS entries (
|
|
|
108
109
|
-- embeddings, later) ONLY when this differs from the current body hash — an
|
|
109
110
|
-- unchanged entry is skipped, never re-metadatafied every turn.
|
|
110
111
|
deep_hash TEXT,
|
|
112
|
+
-- SPEC §membership-change-gated-sync — the per-member sync stat-detect:
|
|
113
|
+
-- "<mtimeMs>:<size>" of the disk file at its last materialization. The pre-turn
|
|
114
|
+
-- sync stat()s every member but re-reads/re-tokenizes/rewrites only one whose
|
|
115
|
+
-- signature changed; an unchanged member is a no-op. NULL = never synced.
|
|
116
|
+
synced_sig TEXT,
|
|
111
117
|
CHECK ((scope = 'agent' AND session_id IS NULL)
|
|
112
118
|
OR (scope = 'session' AND session_id IS NOT NULL)),
|
|
113
119
|
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE
|
|
@@ -184,18 +190,25 @@ CREATE INDEX IF NOT EXISTS symbol_refs_source ON symbol_refs (session_id, entry_
|
|
|
184
190
|
-- hook alongside symbol_defs/refs: re-indexed only when body content changes.
|
|
185
191
|
CREATE VIRTUAL TABLE IF NOT EXISTS entry_fts USING fts5(content);
|
|
186
192
|
|
|
187
|
-
-- INIT: entry_embeddings (~semantic vector half — plurnk-service#186
|
|
188
|
-
-- One Float32 vector per
|
|
189
|
-
--
|
|
190
|
-
--
|
|
191
|
-
--
|
|
193
|
+
-- INIT: entry_embeddings (~semantic vector half — plurnk-service#186; Project
|
|
194
|
+
-- Semantics chunking). One Float32 vector per CHUNK: an entry tiles into N chunks,
|
|
195
|
+
-- each addressed by its <L> line range (line_start..line_end) and embedded
|
|
196
|
+
-- separately, so a large body is fully searchable instead of truncated at the
|
|
197
|
+
-- embedder's window. line_start/line_end are stored for Project Findings to expose;
|
|
198
|
+
-- the rank currently max-pools an entry's chunks to its pathname. Supplied at the
|
|
199
|
+
-- gated manifest-add hook; the fusion (semantic_rank) FTS-narrows then cosine-ranks
|
|
200
|
+
-- these. CASCADE-deleted with the entry.
|
|
192
201
|
CREATE TABLE IF NOT EXISTS entry_embeddings (
|
|
193
|
-
entry_id INTEGER NOT NULL
|
|
202
|
+
entry_id INTEGER NOT NULL,
|
|
203
|
+
chunk_seq INTEGER NOT NULL,
|
|
204
|
+
line_start INTEGER NOT NULL,
|
|
205
|
+
line_end INTEGER NOT NULL,
|
|
194
206
|
vector BLOB NOT NULL,
|
|
195
|
-
-- The model id that produced this vector (mimetypes' `embeddingModel
|
|
196
|
-
--
|
|
197
|
-
-- a
|
|
207
|
+
-- The model id that produced this vector (mimetypes' `embeddingModel`). Stored
|
|
208
|
+
-- per row as the dimension/staleness guard: rank filters by the current model so
|
|
209
|
+
-- a swap never cosine-compares mismatched dimensions.
|
|
198
210
|
embedding_model TEXT NOT NULL,
|
|
211
|
+
PRIMARY KEY (entry_id, chunk_seq),
|
|
199
212
|
FOREIGN KEY (entry_id) REFERENCES entries(id) ON DELETE CASCADE
|
|
200
213
|
) STRICT;
|
|
201
214
|
|
|
@@ -206,7 +219,7 @@ CREATE TABLE IF NOT EXISTS entry_embeddings (
|
|
|
206
219
|
-- status⊥state: status is the HTTP outcome, state is where in the
|
|
207
220
|
-- lifecycle the entry sits. Most rows write 'resolved' directly;
|
|
208
221
|
-- proposing schemes transition 'proposed' → resolved/failed/cancelled.
|
|
209
|
-
-- indexed: per-row visibility for OPEN/FOLD via the log
|
|
222
|
+
-- indexed: per-row visibility for OPEN/FOLD via the log:/// scheme.
|
|
210
223
|
CREATE TABLE IF NOT EXISTS log_entries (
|
|
211
224
|
id INTEGER NOT NULL PRIMARY KEY,
|
|
212
225
|
version INTEGER NOT NULL DEFAULT 0 CHECK (version >= 0),
|
|
@@ -388,13 +401,14 @@ CREATE INDEX IF NOT EXISTS subscriptions_opened_at ON subscriptions (opened_at);
|
|
|
388
401
|
|
|
389
402
|
-- INIT: session_constraints
|
|
390
403
|
-- SPEC §membership constraint overlay — the client's supersede over git membership.
|
|
391
|
-
-- Per (session, effect, glob): `
|
|
392
|
-
-- client-dictated scan), `
|
|
393
|
-
-- for read; File.edit rejects the write)
|
|
394
|
-
-- membership
|
|
404
|
+
-- Per (session, effect, glob/target): `pick` (members git misses, resolved by a
|
|
405
|
+
-- targeted client-dictated scan), `hide` (drop git-tracked matches), `view` (member
|
|
406
|
+
-- for read; File.edit rejects the write), `repo` (declare a git repo whose ls-files
|
|
407
|
+
-- join membership, path-prefixed). git-absent, `pick` rows are the sole substrate
|
|
408
|
+
-- source. Composed at membership resolution; node:path.matchesGlob.
|
|
395
409
|
CREATE TABLE IF NOT EXISTS session_constraints (
|
|
396
410
|
session_id INTEGER NOT NULL,
|
|
397
|
-
effect TEXT NOT NULL CHECK (effect IN ('
|
|
411
|
+
effect TEXT NOT NULL CHECK (effect IN ('pick', 'hide', 'view', 'repo')),
|
|
398
412
|
glob TEXT NOT NULL,
|
|
399
413
|
PRIMARY KEY (session_id, effect, glob),
|
|
400
414
|
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE
|
package/package.json
CHANGED
|
@@ -1,114 +1,111 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"default": "./dist/index.js"
|
|
2
|
+
"name": "@plurnk/plurnk-service",
|
|
3
|
+
"version": "0.27.0",
|
|
4
|
+
"description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-grammar contract.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=25"
|
|
14
9
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"plurnk-service": "./bin/plurnk-service.ts"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/plurnk-service.ts",
|
|
22
|
+
"dist/**/*",
|
|
23
|
+
"migrations/**/*.sql",
|
|
24
|
+
"persona.md",
|
|
25
|
+
"requirements.md",
|
|
26
|
+
"README.md",
|
|
27
|
+
"SPEC.md"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"start": "node bin/plurnk-service.ts",
|
|
34
|
+
"test:lint": "tsc --noEmit",
|
|
35
|
+
"test:unit": "node --env-file-if-exists=.env.example --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-timeout=30000 src/**/*.test.ts",
|
|
36
|
+
"test:intg": "npm run test:clean-tmp && node --env-file-if-exists=.env.example --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-timeout=30000 test/intg/*.test.ts",
|
|
37
|
+
"test:live": "npm run test:clean-tmp && node --env-file-if-exists=.env.example --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
38
|
+
"test:demo": "npm run test:clean-tmp && node --env-file-if-exists=.env.example --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
39
|
+
"test:all": "npm run test:lint && npm run test:unit && npm run test:intg && npm run test:demo",
|
|
40
|
+
"test:digest": "node bin/digest.ts",
|
|
41
|
+
"test:clean-tmp": "rm -rf test/intg/.tmp",
|
|
42
|
+
"dev:digest": "node bin/digest.ts",
|
|
43
|
+
"build:dist": "tsc -p tsconfig.build.json",
|
|
44
|
+
"build": "npm run build:dist",
|
|
45
|
+
"prepare": "npm run build"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@plurnk/plurnk-execs": "0.4.6",
|
|
49
|
+
"@plurnk/plurnk-execs-all": "0.1.5",
|
|
50
|
+
"@plurnk/plurnk-grammar": "0.41.0",
|
|
51
|
+
"@plurnk/plurnk-mimetypes": "0.15.14",
|
|
52
|
+
"@plurnk/plurnk-mimetypes-embeddings": "0.2.0",
|
|
53
|
+
"@plurnk/plurnk-providers": "0.3.0",
|
|
54
|
+
"@plurnk/plurnk-providers-all": "0.1.0",
|
|
55
|
+
"@plurnk/plurnk-schemes": "0.7.0",
|
|
56
|
+
"@plurnk/plurnk-schemes-http": "0.2.0",
|
|
57
|
+
"@possumtech/sqlrite": "5.1.1",
|
|
58
|
+
"diff": "^9.0.0",
|
|
59
|
+
"ws": "^8.20.1"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@plurnk/plurnk-mimetypes-application-pdf": "0.6.2",
|
|
63
|
+
"@plurnk/plurnk-mimetypes-text-clojure": "0.2.2",
|
|
64
|
+
"@plurnk/plurnk-mimetypes-text-cmake": "0.2.2",
|
|
65
|
+
"@plurnk/plurnk-mimetypes-text-common-lisp": "0.2.2",
|
|
66
|
+
"@plurnk/plurnk-mimetypes-text-csharp": "0.2.3",
|
|
67
|
+
"@plurnk/plurnk-mimetypes-text-datalog": "0.3.2",
|
|
68
|
+
"@plurnk/plurnk-mimetypes-text-erlang": "0.2.2",
|
|
69
|
+
"@plurnk/plurnk-mimetypes-text-graphql": "0.2.2",
|
|
70
|
+
"@plurnk/plurnk-mimetypes-text-mariadb": "0.3.3",
|
|
71
|
+
"@plurnk/plurnk-mimetypes-text-plsql": "0.2.3",
|
|
72
|
+
"@plurnk/plurnk-mimetypes-text-postgresql": "0.3.3",
|
|
73
|
+
"@plurnk/plurnk-mimetypes-text-prolog": "0.2.2",
|
|
74
|
+
"@plurnk/plurnk-mimetypes-text-protobuf": "0.3.2",
|
|
75
|
+
"@plurnk/plurnk-mimetypes-text-redis": "0.3.2",
|
|
76
|
+
"@plurnk/plurnk-mimetypes-text-sparql": "0.2.2",
|
|
77
|
+
"@plurnk/plurnk-mimetypes-text-sqlite": "0.3.3",
|
|
78
|
+
"@plurnk/plurnk-mimetypes-text-swift": "0.1.2",
|
|
79
|
+
"@plurnk/plurnk-mimetypes-text-terraform": "1.0.3",
|
|
80
|
+
"@plurnk/plurnk-mimetypes-text-tsql": "0.2.3",
|
|
81
|
+
"@tree-sitter-grammars/tree-sitter-kotlin": "^1.1.0",
|
|
82
|
+
"@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
|
|
83
|
+
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
|
84
|
+
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
|
85
|
+
"@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
|
|
86
|
+
"@types/diff": "^7.0.2",
|
|
87
|
+
"@types/node": "^25.8.0",
|
|
88
|
+
"@types/ws": "^8.18.1",
|
|
89
|
+
"tree-sitter-bash": "^0.25.1",
|
|
90
|
+
"tree-sitter-c": "^0.24.1",
|
|
91
|
+
"tree-sitter-cpp": "^0.23.4",
|
|
92
|
+
"tree-sitter-dart": "^1.0.0",
|
|
93
|
+
"tree-sitter-elixir": "^0.3.5",
|
|
94
|
+
"tree-sitter-fsharp": "^0.1.0",
|
|
95
|
+
"tree-sitter-go": "^0.25.0",
|
|
96
|
+
"tree-sitter-haskell": "^0.23.1",
|
|
97
|
+
"tree-sitter-java": "^0.23.5",
|
|
98
|
+
"tree-sitter-javascript": "^0.25.0",
|
|
99
|
+
"tree-sitter-julia": "^0.23.1",
|
|
100
|
+
"tree-sitter-make": "^1.1.1",
|
|
101
|
+
"tree-sitter-ocaml": "^0.24.2",
|
|
102
|
+
"tree-sitter-odin": "^1.3.0",
|
|
103
|
+
"tree-sitter-php": "^0.24.2",
|
|
104
|
+
"tree-sitter-python": "^0.25.0",
|
|
105
|
+
"tree-sitter-ruby": "^0.23.1",
|
|
106
|
+
"tree-sitter-rust": "^0.24.0",
|
|
107
|
+
"tree-sitter-scala": "^0.24.0",
|
|
108
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
109
|
+
"typescript": "^6.0.3"
|
|
110
|
+
}
|
|
114
111
|
}
|
package/requirements.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Syntax: <<OPsuffix[signal]?(target)?<Line/Result>?:body?:OPsuffix
|
|
2
2
|
|
|
3
|
-
YOU MUST NOT use EXEC for actions that can be performed with
|
|
3
|
+
YOU MUST NOT use EXEC commands for actions that can be performed with Extended HEREDOC Plurnk Operations.
|
|
4
4
|
YOU MUST ONLY communicate with SEND, not with free text between operations.
|
|
5
5
|
YOU MUST document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown entries.
|
|
6
6
|
YOU MUST ONLY populate known entries with source entry information, never with model training.
|
|
7
|
-
YOU SHOULD prefer deterministic calculations and retrievals over model training or speculation.
|
|
8
7
|
YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degrade reasoning.
|
|
9
8
|
YOU SHOULD leverage folksonomic path names, tags, and bulk pattern operations to optimize for context relevance.
|
|
10
9
|
YOU MUST use OPEN and FOLD to keep your context budget healthy, optimized, and topical, below the `tokensFree` limit.
|