@sigrun/shared 0.4.2 → 0.5.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/CHANGELOG.md +3 -1
- package/dist/access.d.ts +3 -0
- package/dist/access.js +8 -0
- package/dist/session-meta.d.ts +15 -4
- package/dist/settings.d.ts +7 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,9 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [0.5.0] - 2026-11-02
|
|
9
9
|
|
|
10
|
+
Version-companion release for sigrun 0.5.0 (no shared changes).
|
|
10
11
|
## [0.4.2] - 2026-10-31
|
|
11
12
|
|
|
12
13
|
### Fixed
|
|
@@ -60,3 +61,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
60
61
|
conversation/turn shaping, the channel wire types, session-meta,
|
|
61
62
|
commands, interactions, ambient records, access, settings, views,
|
|
62
63
|
view-delta, and jobs — the surfaces the webui, TUI, and server share.
|
|
64
|
+
|
package/dist/access.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* The rules, in order (first match wins):
|
|
11
11
|
*
|
|
12
|
+
* 0. internal resource → none (curator P5: a conversation created for
|
|
13
|
+
* curator work is invisible to EVERY caller — the superuser included);
|
|
12
14
|
* 1. superuser → write;
|
|
13
15
|
* 2. ownerless resource → household write (everyone);
|
|
14
16
|
* 3. user === owner → write;
|
|
@@ -48,6 +50,7 @@ export interface AccessPrincipal {
|
|
|
48
50
|
export declare function accessOf(p: AccessPrincipal, r: {
|
|
49
51
|
readonly owner?: string;
|
|
50
52
|
readonly sharing?: Sharing;
|
|
53
|
+
readonly internal?: true;
|
|
51
54
|
}): Access;
|
|
52
55
|
/**
|
|
53
56
|
* Type guard for the wire value: every scope shape checked strictly
|
package/dist/access.js
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* The rules, in order (first match wins):
|
|
11
11
|
*
|
|
12
|
+
* 0. internal resource → none (curator P5: a conversation created for
|
|
13
|
+
* curator work is invisible to EVERY caller — the superuser included);
|
|
12
14
|
* 1. superuser → write;
|
|
13
15
|
* 2. ownerless resource → household write (everyone);
|
|
14
16
|
* 3. user === owner → write;
|
|
@@ -26,6 +28,12 @@
|
|
|
26
28
|
* module doc; the first matching rule wins.
|
|
27
29
|
*/
|
|
28
30
|
export function accessOf(p, r) {
|
|
31
|
+
// 0. Internal (curator P5): invisible to everyone, the superuser
|
|
32
|
+
// included — BEFORE any other rule can widen access. The marker is
|
|
33
|
+
// server-owned (written once in the creating commit), so no caller,
|
|
34
|
+
// share, or role can ever open an internal resource.
|
|
35
|
+
if (r.internal === true)
|
|
36
|
+
return "none";
|
|
29
37
|
// 1. The superuser always writes.
|
|
30
38
|
if (p.superuser === true)
|
|
31
39
|
return "write";
|
package/dist/session-meta.d.ts
CHANGED
|
@@ -25,10 +25,10 @@ export type { Sharing } from "./access.js";
|
|
|
25
25
|
* `invalid_field`.
|
|
26
26
|
*
|
|
27
27
|
* Server-owned fields (`autoName`, `autoNameAttempts`,
|
|
28
|
-
* `lastActivityAt`, `jobId`, `deliver`) are written by host
|
|
29
|
-
* (activity.ts, the A2 auto-namer, fire.ts's job stamp
|
|
30
|
-
* patch surface — the strict
|
|
31
|
-
* `invalid_field`.
|
|
28
|
+
* `lastActivityAt`, `jobId`, `deliver`, `internal`) are written by host
|
|
29
|
+
* code only (activity.ts, the A2 auto-namer, fire.ts's job stamp, the
|
|
30
|
+
* curator's creating commit); they are NOT patch surface — the strict
|
|
31
|
+
* validator keeps rejecting them as `invalid_field`.
|
|
32
32
|
*/
|
|
33
33
|
/** The per-conversation session metadata (spec §5). */
|
|
34
34
|
export type SessionMeta = {
|
|
@@ -85,6 +85,17 @@ export type SessionMeta = {
|
|
|
85
85
|
* strict validator rejects the key as `invalid_field`.
|
|
86
86
|
*/
|
|
87
87
|
deliver?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* Server-owned internal-run marker (curator P5, spec §6.1): true on a
|
|
90
|
+
* conversation created for curator work — hidden from every list and
|
|
91
|
+
* view, 404 on every `:id` route for every caller (superuser
|
|
92
|
+
* included), never named, never notified, never idle-clocked, and
|
|
93
|
+
* absent from every event surface. Written ONCE by the curator's
|
|
94
|
+
* creating commit (`markInternal`); the flag never changes after
|
|
95
|
+
* creation. Never patchable — the strict validator rejects the key
|
|
96
|
+
* as `invalid_field`.
|
|
97
|
+
*/
|
|
98
|
+
internal?: true;
|
|
88
99
|
/**
|
|
89
100
|
* The §5.9 per-resource sharing state; absent = private (owner and
|
|
90
101
|
* superuser only). Patchable by the OWNER or a superuser (403
|
package/dist/settings.d.ts
CHANGED
|
@@ -303,11 +303,11 @@ export interface NotificationsSettings {
|
|
|
303
303
|
readonly runSettled?: "unwatched" | "cron" | "always" | "never";
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
|
-
* The built-in extensions toggles: codemode, MCP, tool search
|
|
307
|
-
* ship WITH core. Each key defaults to
|
|
308
|
-
* removes the built-in entirely (absent from
|
|
309
|
-
* ignored with one log line).
|
|
310
|
-
* at boot, like `extensions`.
|
|
306
|
+
* The built-in extensions toggles: codemode, MCP, tool search, the
|
|
307
|
+
* gateway, OAuth and the curator ship WITH core. Each key defaults to
|
|
308
|
+
* `true`; `false` removes the built-in entirely (absent from
|
|
309
|
+
* `/v1/extensions`, its config ignored with one log line).
|
|
310
|
+
* RESTART-REQUIRED: the built-in set resolves at boot, like `extensions`.
|
|
311
311
|
*/
|
|
312
312
|
export interface BuiltinExtensionsSettings {
|
|
313
313
|
readonly codemode?: boolean;
|
|
@@ -317,6 +317,8 @@ export interface BuiltinExtensionsSettings {
|
|
|
317
317
|
readonly gateway?: boolean;
|
|
318
318
|
/** OAuth login providers (multi-user M3b), default true. */
|
|
319
319
|
readonly oauth?: boolean;
|
|
320
|
+
/** Curator (Task B1): the per-user curation loops, default true. */
|
|
321
|
+
readonly curator?: boolean;
|
|
320
322
|
}
|
|
321
323
|
/**
|
|
322
324
|
* The persisted shape: HarnessSettings pass-throughs + sigrun fields.
|
package/package.json
CHANGED