@minion-stack/shared 0.4.0 → 0.6.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.
@@ -0,0 +1,22 @@
1
+ export type CacheInvalidateSource = 'hub' | 'gateway' | 'paperclip' | 'browser' | 'site';
2
+ export interface CacheInvalidatePayload {
3
+ /** Tag names whose entries should be busted. Always present (may be empty if `keys` covers the bust). */
4
+ tags: string[];
5
+ /** Optional surgical key list — busted in addition to tag-matched keys. */
6
+ keys?: string[];
7
+ /** Runtime that originated the mutation. */
8
+ source: CacheInvalidateSource;
9
+ /** Per-process unique id so emitters can dedupe their own busts. */
10
+ sourceId: string;
11
+ /** Tenant scope — subscribers may gate on this. Empty string means global/no-tenant. */
12
+ tenantId: string;
13
+ /** Emission timestamp, ms since epoch. */
14
+ ts: number;
15
+ }
16
+ export interface CacheInvalidateEvent {
17
+ type: 'event';
18
+ event: 'cache.invalidate';
19
+ payload: CacheInvalidatePayload;
20
+ }
21
+ export declare function isCacheInvalidateEvent(value: unknown): value is CacheInvalidateEvent;
22
+ //# sourceMappingURL=cache-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-events.d.ts","sourceRoot":"","sources":["../../src/gateway/cache-events.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzF,MAAM,WAAW,sBAAsB;IACrC,yGAAyG;IACzG,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,4CAA4C;IAC5C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAapF"}
@@ -0,0 +1,21 @@
1
+ // Cache invalidation gateway event frame.
2
+ //
3
+ // Convention follows existing EventFrame in ./types.ts:
4
+ // { type: 'event', event: '<name>', payload: {...} }
5
+ // (No `v: 3` discriminator — the gateway WS protocol does not version frames.)
6
+ export function isCacheInvalidateEvent(value) {
7
+ if (typeof value !== 'object' || value === null)
8
+ return false;
9
+ const v = value;
10
+ if (v.type !== 'event' || v.event !== 'cache.invalidate')
11
+ return false;
12
+ if (typeof v.payload !== 'object' || v.payload === null)
13
+ return false;
14
+ const p = v.payload;
15
+ return (Array.isArray(p.tags) &&
16
+ typeof p.source === 'string' &&
17
+ typeof p.sourceId === 'string' &&
18
+ typeof p.tenantId === 'string' &&
19
+ typeof p.ts === 'number');
20
+ }
21
+ //# sourceMappingURL=cache-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-events.js","sourceRoot":"","sources":["../../src/gateway/cache-events.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,wDAAwD;AACxD,uDAAuD;AACvD,+EAA+E;AAyB/E,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,KAAK,KAAK,kBAAkB;QAAE,OAAO,KAAK,CAAC;IACvE,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAkC,CAAC;IAC/C,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QACrB,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ;QAC5B,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ;QAC9B,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ;QAC9B,OAAO,CAAC,CAAC,EAAE,KAAK,QAAQ,CACzB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cache-events.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-events.test.d.ts","sourceRoot":"","sources":["../../src/gateway/cache-events.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { isCacheInvalidateEvent } from './cache-events.js';
3
+ describe('CacheInvalidateEvent', () => {
4
+ it('isCacheInvalidateEvent returns true for a valid event', () => {
5
+ const evt = {
6
+ type: 'event',
7
+ event: 'cache.invalidate',
8
+ payload: {
9
+ tags: ['t:abc:agent-groups'],
10
+ keys: [],
11
+ source: 'hub',
12
+ sourceId: 'vercel-fn-1',
13
+ tenantId: 'ten_abc',
14
+ ts: 1715500000000,
15
+ },
16
+ };
17
+ expect(isCacheInvalidateEvent(evt)).toBe(true);
18
+ });
19
+ it('isCacheInvalidateEvent returns false for the wrong name', () => {
20
+ const evt = {
21
+ type: 'event',
22
+ event: 'chat.message',
23
+ payload: { tags: [], keys: [], source: 'hub', sourceId: 'x', tenantId: 't', ts: 0 },
24
+ };
25
+ expect(isCacheInvalidateEvent(evt)).toBe(false);
26
+ });
27
+ it('isCacheInvalidateEvent returns false for non-objects', () => {
28
+ expect(isCacheInvalidateEvent(null)).toBe(false);
29
+ expect(isCacheInvalidateEvent('event')).toBe(false);
30
+ expect(isCacheInvalidateEvent({})).toBe(false);
31
+ });
32
+ it('isCacheInvalidateEvent allows missing optional keys', () => {
33
+ const evt = {
34
+ type: 'event',
35
+ event: 'cache.invalidate',
36
+ payload: {
37
+ tags: ['t:abc'],
38
+ source: 'gateway',
39
+ sourceId: 'gw-1',
40
+ tenantId: 'ten_abc',
41
+ ts: 0,
42
+ },
43
+ };
44
+ expect(isCacheInvalidateEvent(evt)).toBe(true);
45
+ });
46
+ });
47
+ //# sourceMappingURL=cache-events.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-events.test.js","sourceRoot":"","sources":["../../src/gateway/cache-events.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAA6B,MAAM,mBAAmB,CAAC;AAEtF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,GAAG,GAAyB;YAChC,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE;gBACP,IAAI,EAAE,CAAC,oBAAoB,CAAC;gBAC5B,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,aAAa;gBACvB,QAAQ,EAAE,SAAS;gBACnB,EAAE,EAAE,aAAa;aAClB;SACF,CAAC;QACF,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;SACpF,CAAC;QACF,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpD,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,GAAG,GAAG;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE;gBACP,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,MAAM,EAAE,SAAS;gBACjB,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,SAAS;gBACnB,EAAE,EAAE,CAAC;aACN;SACF,CAAC;QACF,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -2,4 +2,5 @@ export * from './types.js';
2
2
  export * from './protocol.js';
3
3
  export * from './connection.js';
4
4
  export * from './client.js';
5
+ export * from './cache-events.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gateway/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gateway/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
@@ -2,4 +2,5 @@ export * from './types.js';
2
2
  export * from './protocol.js';
3
3
  export * from './connection.js';
4
4
  export * from './client.js';
5
+ export * from './cache-events.js';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gateway/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gateway/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './gateway/index.js';
2
2
  export * from './utils/index.js';
3
+ export * from './prompt-sections.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './gateway/index.js';
2
2
  export * from './utils/index.js';
3
+ export * from './prompt-sections.js';
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Prompt Sections protocol types.
3
+ *
4
+ * Source of truth for `prompt.sections.*` WS gateway RPC request/response shapes.
5
+ * Consumed by the minion gateway server handlers and by `minion_hub` / `minion_site`
6
+ * UI that drives the prompt engineering surface.
7
+ *
8
+ * Pure protocol types only — runtime validation (Zod) stays in `minion/` where the
9
+ * gateway handlers live. Keep this file import-free so both Node and browser bundles
10
+ * can consume it without pulling in server-only dependencies.
11
+ *
12
+ * Extracted from `minion/src/agents/sections/custom/types.ts` +
13
+ * `minion/src/gateway/server-methods/prompt-sections.ts` in Phase 20-01.
14
+ */
15
+ /** Assembly layer a section belongs to. Determines ordering + caching strategy. */
16
+ export type SectionLayer = "platform" | "agent-type" | "identity" | "user" | "session";
17
+ /** Prompt assembly mode. Sections declare which modes include them. */
18
+ export type PromptMode = "full" | "minimal" | "none";
19
+ /** Whether a section is code-defined (`builtin`) or operator-authored YAML (`custom`). */
20
+ export type SectionSource = "builtin" | "custom";
21
+ /**
22
+ * Input shape for `prompt.sections.upsert` and the custom-section YAML schema.
23
+ * `enabled` is optional on input (defaults to `true` server-side) so pre-0.5.0
24
+ * YAML files that omit the field continue to load unchanged.
25
+ */
26
+ export interface SectionInput {
27
+ id: string;
28
+ layer: SectionLayer;
29
+ order: number;
30
+ modes: PromptMode[];
31
+ cacheable: boolean;
32
+ /** Introduced in @minion-stack/shared 0.5.0. Defaults to `true` when omitted. */
33
+ enabled?: boolean;
34
+ /** YAML body / rendered template string. */
35
+ render: string;
36
+ }
37
+ /**
38
+ * Metadata for `prompt.sections.list` rows. Lacks the rendered body — callers
39
+ * fetch that separately with `prompt.sections.get` to keep list responses small.
40
+ */
41
+ export interface SectionMeta {
42
+ id: string;
43
+ layer: SectionLayer;
44
+ order: number;
45
+ modes: PromptMode[];
46
+ cacheable: boolean;
47
+ /** Introduced in @minion-stack/shared 0.5.0. Always present on responses. */
48
+ enabled: boolean;
49
+ source: SectionSource;
50
+ agentId?: string;
51
+ }
52
+ /** Full section shape for `prompt.sections.get`. Adds the rendered body. */
53
+ export interface SectionFull extends SectionMeta {
54
+ render: string;
55
+ }
56
+ /** Per-section entry in the preview breakdown. */
57
+ export interface SectionBreakdown {
58
+ id: string;
59
+ layer: SectionLayer;
60
+ order: number;
61
+ bytes: number;
62
+ tokens: number;
63
+ cacheable: boolean;
64
+ source: SectionSource;
65
+ rendered: string;
66
+ }
67
+ /** A single violation raised by the content safety scanner during upsert/preview. */
68
+ export interface SectionViolation {
69
+ rule: string;
70
+ match?: string;
71
+ severity: "block" | "warn";
72
+ }
73
+ /** Structured payload attached to `SECTION_VALIDATION_FAILED` errors. */
74
+ export interface SectionValidationErrorPayload {
75
+ code: "SECTION_VALIDATION_FAILED";
76
+ message: string;
77
+ violations: SectionViolation[];
78
+ }
79
+ /** Response shape for `prompt.sections.preview`. */
80
+ export interface PreviewResponse {
81
+ assembled: string;
82
+ breakdown: SectionBreakdown[];
83
+ totalBytes: number;
84
+ totalTokens: number;
85
+ tokenizer: string;
86
+ }
87
+ /** Request params for `prompt.sections.list`. */
88
+ export interface ListParams {
89
+ agentId: string;
90
+ }
91
+ /** Request params for `prompt.sections.get`. */
92
+ export interface GetParams {
93
+ agentId: string;
94
+ sectionId: string;
95
+ }
96
+ /** Request params for `prompt.sections.upsert`. */
97
+ export interface UpsertParams {
98
+ agentId: string;
99
+ section: SectionInput;
100
+ }
101
+ /** Request params for `prompt.sections.delete`. */
102
+ export interface DeleteParams {
103
+ agentId: string;
104
+ sectionId: string;
105
+ }
106
+ /**
107
+ * Request params for `prompt.sections.preview`.
108
+ *
109
+ * Extended in @minion-stack/shared 0.5.0 with `draftOverride`. When present,
110
+ * the server substitutes the given body for the section whose id matches
111
+ * during in-memory assembly (on-disk YAML is NEVER modified). Use this to
112
+ * drive live preview of unsaved editor state in the hub.
113
+ *
114
+ * If `draftOverride.id` doesn't match any visible section (e.g. the operator
115
+ * just toggled it off), the server ignores it silently.
116
+ */
117
+ export interface PreviewParams {
118
+ agentId: string;
119
+ mode: PromptMode;
120
+ draftOverride?: {
121
+ id: string;
122
+ body: string;
123
+ };
124
+ }
125
+ /** Request params for `prompt.sections.overrides.get`. New in 0.5.0. */
126
+ export interface OverridesGetParams {
127
+ agentId: string;
128
+ }
129
+ /** Response shape for `prompt.sections.overrides.get`. New in 0.5.0. */
130
+ export interface OverridesGetResponse {
131
+ disabled: string[];
132
+ }
133
+ /**
134
+ * Request params for `prompt.sections.overrides.set`. New in 0.5.0.
135
+ * `disabled` is the complete replacement list (not a delta). Admin-only.
136
+ * Server caps list length at 256 entries (T-20-04).
137
+ */
138
+ export interface OverridesSetParams {
139
+ agentId: string;
140
+ disabled: string[];
141
+ }
142
+ /** Response shape for `prompt.sections.overrides.set`. New in 0.5.0. */
143
+ export interface OverridesSetResponse {
144
+ disabled: string[];
145
+ }
146
+ //# sourceMappingURL=prompt-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-sections.d.ts","sourceRoot":"","sources":["../src/prompt-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,mFAAmF;AACnF,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,YAAY,GACZ,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,uEAAuE;AACvE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAErD,0FAA0F;AAC1F,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD;;;;GAIG;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.
3
+ *
4
+ * Source of truth for `prompt.sections.*` WS gateway RPC request/response shapes.
5
+ * Consumed by the minion gateway server handlers and by `minion_hub` / `minion_site`
6
+ * UI that drives the prompt engineering surface.
7
+ *
8
+ * Pure protocol types only — runtime validation (Zod) stays in `minion/` where the
9
+ * gateway handlers live. Keep this file import-free so both Node and browser bundles
10
+ * can consume it without pulling in server-only dependencies.
11
+ *
12
+ * Extracted from `minion/src/agents/sections/custom/types.ts` +
13
+ * `minion/src/gateway/server-methods/prompt-sections.ts` in Phase 20-01.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=prompt-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-sections.js","sourceRoot":"","sources":["../src/prompt-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minion-stack/shared",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Shared gateway protocol types and utilities for the Minion platform.",
5
5
  "license": "MIT",
6
6
  "repository": {