@niscorp/moss 0.5.0 → 0.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/CHANGELOG.md +111 -0
- package/DESIGN.md +77 -40
- package/DOCS.md +639 -81
- package/README.md +2 -2
- package/dist/{chunk-JYBHJDT7.cjs → chunk-C2DNDIQX.cjs} +5 -4
- package/dist/chunk-C2DNDIQX.cjs.map +1 -0
- package/dist/{chunk-BZK37HR3.cjs → chunk-DSTHFSTO.cjs} +1996 -1336
- package/dist/chunk-DSTHFSTO.cjs.map +1 -0
- package/dist/chunk-F45SFR7W.cjs +903 -0
- package/dist/chunk-F45SFR7W.cjs.map +1 -0
- package/dist/{chunk-PCPQMC7A.js → chunk-IMZZB4JE.js} +5 -4
- package/dist/chunk-IMZZB4JE.js.map +1 -0
- package/dist/{chunk-BQRPR2F7.js → chunk-MTC46PGQ.js} +1979 -1317
- package/dist/chunk-MTC46PGQ.js.map +1 -0
- package/dist/chunk-MYGVHWS5.js +870 -0
- package/dist/chunk-MYGVHWS5.js.map +1 -0
- package/dist/{chunk-FTZ6NFKZ.js → chunk-X2Q546EB.js} +3 -3
- package/dist/{chunk-FTZ6NFKZ.js.map → chunk-X2Q546EB.js.map} +1 -1
- package/dist/{chunk-5U2ZZUI5.cjs → chunk-Z2VA6AOE.cjs} +5 -5
- package/dist/{chunk-5U2ZZUI5.cjs.map → chunk-Z2VA6AOE.cjs.map} +1 -1
- package/dist/document-AbQUbQaP.d.ts +381 -0
- package/dist/document-wHHxIXJz.d.cts +381 -0
- package/dist/{index-BuDuOSyx.d.cts → index-Dml1klpZ.d.cts} +5 -1
- package/dist/{index-BuDuOSyx.d.ts → index-Dml1klpZ.d.ts} +5 -1
- package/dist/index.cjs +17 -17
- package/dist/index.d.cts +7 -9
- package/dist/index.d.ts +7 -9
- package/dist/index.js +3 -3
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.cts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.js +1 -1
- package/dist/node.cjs +8 -8
- package/dist/node.d.cts +3 -4
- package/dist/node.d.ts +3 -4
- package/dist/node.js +4 -4
- package/dist/tide.d.cts +1 -1
- package/dist/tide.d.ts +1 -1
- package/dist/unverified.cjs +3 -3
- package/dist/unverified.js +2 -2
- package/dist/vite.cjs +9 -9
- package/dist/vite.d.cts +6 -1
- package/dist/vite.d.ts +6 -1
- package/dist/vite.js +4 -4
- package/package.json +13 -13
- package/dist/app-BoVB0_0j.d.ts +0 -143
- package/dist/app-Cc8VnOz8.d.cts +0 -143
- package/dist/chunk-BQRPR2F7.js.map +0 -1
- package/dist/chunk-BZK37HR3.cjs.map +0 -1
- package/dist/chunk-FTFME3HS.cjs +0 -383
- package/dist/chunk-FTFME3HS.cjs.map +0 -1
- package/dist/chunk-JYBHJDT7.cjs.map +0 -1
- package/dist/chunk-PCPQMC7A.js.map +0 -1
- package/dist/chunk-ZWB6QDGF.js +0 -374
- package/dist/chunk-ZWB6QDGF.js.map +0 -1
- package/dist/document-CU3muGbz.d.cts +0 -169
- package/dist/document-UFbAd-Ka.d.ts +0 -169
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { Charter, VerifyReport } from '@niscorp/charter';
|
|
3
|
+
import { FunctionHandler, Shell, FetchFn, LayoutNode, ActionDefinition, CanvasConfig, ActionFragment, RenderNode } from '@niscorp/nova';
|
|
4
|
+
import { GenerateDsl, MapToShape, QueryResponse, ScopeBehaviors, SeedEntry, SeedMutation, ScopePolicy } from '@niscorp/vex';
|
|
5
|
+
import { Sequence } from '@niscorp/strata';
|
|
6
|
+
import { Phrasebook, PhraseKeys } from '@niscorp/nova/i18n';
|
|
7
|
+
import { F as Feature } from './index-Dml1klpZ.cjs';
|
|
8
|
+
import { S as SocketAccept } from './socket-D90h1xSV.cjs';
|
|
9
|
+
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
|
+
|
|
11
|
+
type IdentityReport = {
|
|
12
|
+
principal: string;
|
|
13
|
+
since: number;
|
|
14
|
+
lastSeen: number;
|
|
15
|
+
};
|
|
16
|
+
type IdentityRecord = {
|
|
17
|
+
roles: readonly string[];
|
|
18
|
+
scope: Record<string, unknown>;
|
|
19
|
+
installed?: readonly string[];
|
|
20
|
+
tag?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type ResolvedIdentity = {
|
|
24
|
+
roles: readonly string[];
|
|
25
|
+
scope: Record<string, unknown>;
|
|
26
|
+
installed: readonly string[] | undefined;
|
|
27
|
+
memoKey: string;
|
|
28
|
+
record?: IdentityRecord;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type LayoutVariant = {
|
|
32
|
+
action: string;
|
|
33
|
+
layout: LayoutNode;
|
|
34
|
+
};
|
|
35
|
+
type FunctionDefinition = {
|
|
36
|
+
id: string;
|
|
37
|
+
description: string;
|
|
38
|
+
execute: FunctionHandler;
|
|
39
|
+
};
|
|
40
|
+
type WrittenFunctions = readonly FunctionDefinition[] | Record<string, FunctionHandler>;
|
|
41
|
+
type NiscApp = {
|
|
42
|
+
charter: Charter;
|
|
43
|
+
assignments?: Record<string, readonly string[]>;
|
|
44
|
+
wearable?: readonly (readonly string[])[];
|
|
45
|
+
actions: Record<string, ActionDefinition>;
|
|
46
|
+
layouts?: Record<string, LayoutVariant>;
|
|
47
|
+
behaviors?: ScopeBehaviors;
|
|
48
|
+
scope?: (principal: string | null, identity?: IdentityRecord) => Record<string, unknown>;
|
|
49
|
+
identity?: {
|
|
50
|
+
as?: string;
|
|
51
|
+
resolve: (principal: string, read: (fingerprint: string, scope: Record<string, unknown>) => Promise<unknown>) => Promise<IdentityRecord>;
|
|
52
|
+
};
|
|
53
|
+
phrases?: (session: {
|
|
54
|
+
principal: string | null;
|
|
55
|
+
identity: Record<string, unknown>;
|
|
56
|
+
wire: FetchFn;
|
|
57
|
+
}) => Phrasebook | undefined | Promise<Phrasebook | undefined>;
|
|
58
|
+
phraseKeys?: PhraseKeys;
|
|
59
|
+
features?: readonly Feature[];
|
|
60
|
+
entries?: readonly (SeedEntry | SeedMutation)[];
|
|
61
|
+
resources?: Record<string, readonly string[] | {
|
|
62
|
+
entities: readonly string[];
|
|
63
|
+
}>;
|
|
64
|
+
shell?: ShellManifest;
|
|
65
|
+
pages?: Record<string, PageManifest>;
|
|
66
|
+
grammars?: readonly Sequence[];
|
|
67
|
+
functions?: (session: FunctionSession) => WrittenFunctions;
|
|
68
|
+
onSession?: (session: FunctionSession) => void;
|
|
69
|
+
runs?: RunSink;
|
|
70
|
+
reactions?: readonly {
|
|
71
|
+
table: string;
|
|
72
|
+
op?: 'insert' | 'update' | 'delete';
|
|
73
|
+
run: (event: {
|
|
74
|
+
fingerprint: string;
|
|
75
|
+
table: string;
|
|
76
|
+
op: 'insert' | 'update' | 'delete';
|
|
77
|
+
count: number;
|
|
78
|
+
scope: Record<string, unknown>;
|
|
79
|
+
}, tools: {
|
|
80
|
+
deliver: (principal: string, channel: string, payload?: unknown) => boolean;
|
|
81
|
+
}) => void;
|
|
82
|
+
}[];
|
|
83
|
+
};
|
|
84
|
+
type RunTurn = {
|
|
85
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
86
|
+
content: string;
|
|
87
|
+
calls?: ReadonlyArray<{
|
|
88
|
+
name: string;
|
|
89
|
+
args: string;
|
|
90
|
+
}>;
|
|
91
|
+
name?: string;
|
|
92
|
+
};
|
|
93
|
+
type RunRecord = {
|
|
94
|
+
at: number;
|
|
95
|
+
principal: string | null;
|
|
96
|
+
shellId: string;
|
|
97
|
+
agentId: string;
|
|
98
|
+
agentPath: readonly string[];
|
|
99
|
+
label: string;
|
|
100
|
+
provider: string;
|
|
101
|
+
model: string;
|
|
102
|
+
inputTokens: number;
|
|
103
|
+
outputTokens: number;
|
|
104
|
+
totalTokens: number;
|
|
105
|
+
reported: boolean;
|
|
106
|
+
steps: number;
|
|
107
|
+
elapsedMs: number;
|
|
108
|
+
turns?: readonly RunTurn[];
|
|
109
|
+
response?: string;
|
|
110
|
+
outcome: 'ok' | 'failed';
|
|
111
|
+
};
|
|
112
|
+
type RunSink = (record: RunRecord, session: FunctionSession) => void;
|
|
113
|
+
type ArtifactKind = 'layout' | 'action' | 'fragment' | 'read';
|
|
114
|
+
type ArtifactVersion = {
|
|
115
|
+
kind: ArtifactKind;
|
|
116
|
+
id: string;
|
|
117
|
+
save: string;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
copiedFrom: string | null;
|
|
120
|
+
body: unknown;
|
|
121
|
+
};
|
|
122
|
+
type SessionArtifacts = {
|
|
123
|
+
save: (artifacts: readonly {
|
|
124
|
+
kind: ArtifactKind;
|
|
125
|
+
id?: string;
|
|
126
|
+
body: unknown;
|
|
127
|
+
}[]) => Promise<{
|
|
128
|
+
save: string;
|
|
129
|
+
artifacts: readonly {
|
|
130
|
+
kind: ArtifactKind;
|
|
131
|
+
id: string;
|
|
132
|
+
}[];
|
|
133
|
+
}>;
|
|
134
|
+
list: (kind?: ArtifactKind) => Promise<readonly ArtifactVersion[]>;
|
|
135
|
+
history: (kind: ArtifactKind, id: string) => Promise<readonly ArtifactVersion[]>;
|
|
136
|
+
restore: (kind: ArtifactKind, id: string, save: string) => Promise<{
|
|
137
|
+
save: string;
|
|
138
|
+
}>;
|
|
139
|
+
reset: (kind: ArtifactKind, id: string) => Promise<{
|
|
140
|
+
save: string;
|
|
141
|
+
}>;
|
|
142
|
+
};
|
|
143
|
+
type DraftArtifact = {
|
|
144
|
+
kind: ArtifactKind;
|
|
145
|
+
id: string;
|
|
146
|
+
body: unknown;
|
|
147
|
+
};
|
|
148
|
+
type SessionDraft = {
|
|
149
|
+
put: (artifacts: readonly {
|
|
150
|
+
kind: ArtifactKind;
|
|
151
|
+
id?: string;
|
|
152
|
+
body: unknown;
|
|
153
|
+
}[]) => Promise<{
|
|
154
|
+
step: number;
|
|
155
|
+
artifacts: readonly {
|
|
156
|
+
kind: ArtifactKind;
|
|
157
|
+
id: string;
|
|
158
|
+
}[];
|
|
159
|
+
}>;
|
|
160
|
+
list: () => readonly DraftArtifact[];
|
|
161
|
+
remove: (kind: ArtifactKind, id: string) => Promise<{
|
|
162
|
+
step: number;
|
|
163
|
+
}>;
|
|
164
|
+
show: (step: number) => Promise<void>;
|
|
165
|
+
discard: () => Promise<void>;
|
|
166
|
+
save: () => Promise<{
|
|
167
|
+
save: string;
|
|
168
|
+
artifacts: readonly {
|
|
169
|
+
kind: ArtifactKind;
|
|
170
|
+
id: string;
|
|
171
|
+
}[];
|
|
172
|
+
}>;
|
|
173
|
+
};
|
|
174
|
+
type FunctionSession = {
|
|
175
|
+
shell: Shell;
|
|
176
|
+
artifacts: SessionArtifacts;
|
|
177
|
+
draft: SessionDraft;
|
|
178
|
+
principal: string | null;
|
|
179
|
+
roles: readonly string[];
|
|
180
|
+
identity: Record<string, unknown>;
|
|
181
|
+
actions: readonly string[];
|
|
182
|
+
wire: FetchFn;
|
|
183
|
+
grant: (token: string) => void;
|
|
184
|
+
revoke: () => Promise<void>;
|
|
185
|
+
answerIntent: (writers: {
|
|
186
|
+
generateDsl: GenerateDsl;
|
|
187
|
+
mapToShape: MapToShape;
|
|
188
|
+
}, asked: {
|
|
189
|
+
intent: string;
|
|
190
|
+
shape: unknown;
|
|
191
|
+
context?: Record<string, unknown>;
|
|
192
|
+
}) => Promise<QueryResponse>;
|
|
193
|
+
recordRun: (run: Omit<RunRecord, 'at' | 'principal' | 'shellId'>) => void;
|
|
194
|
+
functions: () => readonly {
|
|
195
|
+
id: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
}[];
|
|
198
|
+
};
|
|
199
|
+
type CanvasSeed = string | {
|
|
200
|
+
action: string;
|
|
201
|
+
input?: Record<string, unknown>;
|
|
202
|
+
with?: string[];
|
|
203
|
+
};
|
|
204
|
+
type ShellCanvas = Omit<CanvasConfig, 'initial'> & {
|
|
205
|
+
initial?: CanvasSeed | CanvasSeed[];
|
|
206
|
+
};
|
|
207
|
+
type ShellManifest = {
|
|
208
|
+
canvases: ShellCanvas[];
|
|
209
|
+
layout?: LayoutNode;
|
|
210
|
+
layoutStore?: Record<string, LayoutNode>;
|
|
211
|
+
fragments?: Record<string, ActionFragment>;
|
|
212
|
+
seeds?: (session: {
|
|
213
|
+
principal: string | null;
|
|
214
|
+
actions: readonly string[];
|
|
215
|
+
roles: readonly string[];
|
|
216
|
+
wire: FetchFn;
|
|
217
|
+
}) => Promise<Record<string, CanvasSeed[]>> | Record<string, CanvasSeed[]>;
|
|
218
|
+
components?: Record<string, {
|
|
219
|
+
meta?: {
|
|
220
|
+
description?: string;
|
|
221
|
+
propsSchema?: unknown;
|
|
222
|
+
};
|
|
223
|
+
}>;
|
|
224
|
+
inputs?: (session: {
|
|
225
|
+
principal: string | null;
|
|
226
|
+
actions: readonly string[];
|
|
227
|
+
roles: readonly string[];
|
|
228
|
+
identity: Record<string, unknown>;
|
|
229
|
+
wire: FetchFn;
|
|
230
|
+
}) => Record<string, Record<string, unknown>> | Promise<Record<string, Record<string, unknown>>>;
|
|
231
|
+
};
|
|
232
|
+
type PageManifest = ShellManifest & {
|
|
233
|
+
path: string;
|
|
234
|
+
params?: string;
|
|
235
|
+
};
|
|
236
|
+
declare const defineApp: (app: NiscApp) => NiscApp;
|
|
237
|
+
|
|
238
|
+
type ExecuteAs = (role: string, fingerprint: string, context: Record<string, unknown>, scope?: Record<string, unknown>) => Promise<unknown>;
|
|
239
|
+
|
|
240
|
+
type Catalog = {
|
|
241
|
+
ids: readonly string[];
|
|
242
|
+
hash: string;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
type ShellConnection = {
|
|
246
|
+
send: (text: string) => void;
|
|
247
|
+
close: (code?: number, reason?: string) => void;
|
|
248
|
+
seal?: (token: string) => Promise<string>;
|
|
249
|
+
};
|
|
250
|
+
type ShellSession = {
|
|
251
|
+
readonly shell: Shell;
|
|
252
|
+
attach: (connection: ShellConnection, options?: {
|
|
253
|
+
delta?: boolean;
|
|
254
|
+
}) => void;
|
|
255
|
+
detach: (connection: ShellConnection) => void;
|
|
256
|
+
resync: (connection: ShellConnection) => void;
|
|
257
|
+
dispatch: (canvas: string, event: Record<string, unknown>) => void;
|
|
258
|
+
publish: (channel: string, payload?: unknown) => void;
|
|
259
|
+
back: () => boolean;
|
|
260
|
+
popTo: (canvas: string, instance: string) => void;
|
|
261
|
+
reset: () => void;
|
|
262
|
+
};
|
|
263
|
+
type ShellReport = {
|
|
264
|
+
principal: string;
|
|
265
|
+
connections: number;
|
|
266
|
+
since: number;
|
|
267
|
+
idleSince: number | null;
|
|
268
|
+
canvases: {
|
|
269
|
+
id: string;
|
|
270
|
+
actions: readonly string[];
|
|
271
|
+
}[];
|
|
272
|
+
};
|
|
273
|
+
type ShellSnapshot = {
|
|
274
|
+
frame: RenderNode[];
|
|
275
|
+
trees: Record<string, RenderNode[]>;
|
|
276
|
+
seed?: string;
|
|
277
|
+
settled: boolean;
|
|
278
|
+
live: boolean;
|
|
279
|
+
why: string[];
|
|
280
|
+
drawnWith: string[];
|
|
281
|
+
};
|
|
282
|
+
type ShellOpening = {
|
|
283
|
+
seed?: string;
|
|
284
|
+
inputs?: Record<string, Record<string, unknown>>;
|
|
285
|
+
};
|
|
286
|
+
type ShellHost = {
|
|
287
|
+
session: (token: string | null, principal: string | null, options?: ShellOpening) => Promise<ShellSession>;
|
|
288
|
+
snapshot: (token: string | null, principal: string | null, options?: {
|
|
289
|
+
waitMs?: number;
|
|
290
|
+
inputs?: ShellOpening['inputs'];
|
|
291
|
+
}) => Promise<ShellSnapshot>;
|
|
292
|
+
deliver: (principal: string, channel: string, payload?: unknown) => boolean;
|
|
293
|
+
list: () => ShellReport[];
|
|
294
|
+
reset: (principal: string) => boolean;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
type Env = {
|
|
298
|
+
Variables: {
|
|
299
|
+
principal: string | null;
|
|
300
|
+
resolved: ResolvedIdentity;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
type MossServer = Hono<Env> & {
|
|
304
|
+
socket: SocketAccept;
|
|
305
|
+
shells?: ShellHost;
|
|
306
|
+
principalOf: (token: string) => Promise<string | null>;
|
|
307
|
+
page: (path: string) => {
|
|
308
|
+
name: string;
|
|
309
|
+
host: ShellHost;
|
|
310
|
+
inputs: Record<string, Record<string, unknown>>;
|
|
311
|
+
} | undefined;
|
|
312
|
+
pages: readonly {
|
|
313
|
+
name: string;
|
|
314
|
+
path: string;
|
|
315
|
+
}[];
|
|
316
|
+
refresh: () => void;
|
|
317
|
+
replaceActions: (source: string, actions: Record<string, ActionDefinition>) => void;
|
|
318
|
+
replaceEntries: (source: string, entries: readonly (SeedEntry | SeedMutation)[]) => Promise<void>;
|
|
319
|
+
actions: () => Readonly<Record<string, ActionDefinition>>;
|
|
320
|
+
defaults: (publisher: string) => SessionArtifacts;
|
|
321
|
+
catalogOf: (principal: string | null) => Promise<Catalog>;
|
|
322
|
+
policyForRoles: (roles: readonly string[]) => ScopePolicy;
|
|
323
|
+
charterReport: () => VerifyReport;
|
|
324
|
+
invalidateIdentity: (principal: string) => boolean;
|
|
325
|
+
identity: (principal: string | null) => Promise<IdentityRecord>;
|
|
326
|
+
executeAs: ExecuteAs;
|
|
327
|
+
invalidateTag: (tag: string) => number;
|
|
328
|
+
nudge: (principal: string, channel: string) => void;
|
|
329
|
+
close: () => void;
|
|
330
|
+
identities?: {
|
|
331
|
+
list: () => IdentityReport[];
|
|
332
|
+
meter: () => {
|
|
333
|
+
size: number;
|
|
334
|
+
max: number;
|
|
335
|
+
resolved: number;
|
|
336
|
+
evicted: number;
|
|
337
|
+
expired: number;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
type DocumentHost = Pick<ShellHost, 'snapshot'>;
|
|
343
|
+
type DocumentSource = {
|
|
344
|
+
principalOf: (token: string) => Promise<string | null>;
|
|
345
|
+
page: (path: string) => {
|
|
346
|
+
name: string;
|
|
347
|
+
host: DocumentHost;
|
|
348
|
+
inputs: Record<string, Record<string, unknown>>;
|
|
349
|
+
} | undefined;
|
|
350
|
+
shells?: DocumentHost;
|
|
351
|
+
};
|
|
352
|
+
type DocumentConfig = {
|
|
353
|
+
server: DocumentSource;
|
|
354
|
+
template: string;
|
|
355
|
+
request: {
|
|
356
|
+
path: string;
|
|
357
|
+
cookie?: string | null;
|
|
358
|
+
host?: string | null;
|
|
359
|
+
};
|
|
360
|
+
draw: (snapshot: ShellSnapshot) => string | Promise<string>;
|
|
361
|
+
htmlAttributes?: (snapshot: ShellSnapshot) => Record<string, string>;
|
|
362
|
+
site?: string;
|
|
363
|
+
tokenKey?: string;
|
|
364
|
+
waitMs?: number;
|
|
365
|
+
root?: string;
|
|
366
|
+
};
|
|
367
|
+
type DrawnDocument = {
|
|
368
|
+
html: string;
|
|
369
|
+
headers: Record<string, string>;
|
|
370
|
+
drawn: boolean;
|
|
371
|
+
principal: string | null;
|
|
372
|
+
page?: string;
|
|
373
|
+
head?: ScreenHead;
|
|
374
|
+
live?: boolean;
|
|
375
|
+
why?: string[];
|
|
376
|
+
drawnWith?: string[];
|
|
377
|
+
settled?: boolean;
|
|
378
|
+
};
|
|
379
|
+
declare const renderDocument: (config: DocumentConfig) => Promise<DrawnDocument>;
|
|
380
|
+
|
|
381
|
+
export { type DocumentConfig as D, type ExecuteAs as E, type FunctionDefinition as F, type IdentityRecord as I, type LayoutVariant as L, type MossServer as M, type NiscApp as N, type PageManifest as P, type RunRecord as R, type ShellHost as S, type DrawnDocument as a, type FunctionSession as b, type RunSink as c, type RunTurn as d, type ShellManifest as e, type ShellSnapshot as f, defineApp as g, renderDocument as r };
|
|
@@ -49,13 +49,17 @@ declare const FabricMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
49
49
|
principal: z.ZodString;
|
|
50
50
|
}, z.core.$strict>, z.ZodObject<{
|
|
51
51
|
origin: z.ZodString;
|
|
52
|
-
kind: z.ZodLiteral<"invalidate-
|
|
52
|
+
kind: z.ZodLiteral<"invalidate-tag">;
|
|
53
53
|
tag: z.ZodString;
|
|
54
54
|
}, z.core.$strict>, z.ZodObject<{
|
|
55
55
|
origin: z.ZodString;
|
|
56
56
|
kind: z.ZodLiteral<"nudge">;
|
|
57
57
|
principal: z.ZodString;
|
|
58
58
|
channel: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
origin: z.ZodString;
|
|
61
|
+
kind: z.ZodLiteral<"adopt">;
|
|
62
|
+
principal: z.ZodString;
|
|
59
63
|
}, z.core.$strict>], "kind">;
|
|
60
64
|
type FabricMessage = z.infer<typeof FabricMessageSchema>;
|
|
61
65
|
type Fabric = {
|
|
@@ -49,13 +49,17 @@ declare const FabricMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
49
49
|
principal: z.ZodString;
|
|
50
50
|
}, z.core.$strict>, z.ZodObject<{
|
|
51
51
|
origin: z.ZodString;
|
|
52
|
-
kind: z.ZodLiteral<"invalidate-
|
|
52
|
+
kind: z.ZodLiteral<"invalidate-tag">;
|
|
53
53
|
tag: z.ZodString;
|
|
54
54
|
}, z.core.$strict>, z.ZodObject<{
|
|
55
55
|
origin: z.ZodString;
|
|
56
56
|
kind: z.ZodLiteral<"nudge">;
|
|
57
57
|
principal: z.ZodString;
|
|
58
58
|
channel: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
origin: z.ZodString;
|
|
61
|
+
kind: z.ZodLiteral<"adopt">;
|
|
62
|
+
principal: z.ZodString;
|
|
59
63
|
}, z.core.$strict>], "kind">;
|
|
60
64
|
type FabricMessage = z.infer<typeof FabricMessageSchema>;
|
|
61
65
|
type Fabric = {
|
package/dist/index.cjs
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkDSTHFSTO_cjs = require('./chunk-DSTHFSTO.cjs');
|
|
4
|
+
var chunkF45SFR7W_cjs = require('./chunk-F45SFR7W.cjs');
|
|
5
|
+
require('./chunk-C2DNDIQX.cjs');
|
|
6
6
|
require('./chunk-3RIWTXGI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MOSS_SEQUENCE", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkDSTHFSTO_cjs.MOSS_SEQUENCE; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "createServer", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "defineApp", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return chunkBZK37HR3_cjs.defineApp; }
|
|
16
|
+
get: function () { return chunkDSTHFSTO_cjs.createServer; }
|
|
21
17
|
});
|
|
22
18
|
Object.defineProperty(exports, "exportDocuments", {
|
|
23
19
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkDSTHFSTO_cjs.exportDocuments; }
|
|
25
21
|
});
|
|
26
22
|
Object.defineProperty(exports, "migrateTables", {
|
|
27
23
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkDSTHFSTO_cjs.migrateTables; }
|
|
29
25
|
});
|
|
30
26
|
Object.defineProperty(exports, "mintDevToken", {
|
|
31
27
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkDSTHFSTO_cjs.mintDevToken; }
|
|
33
29
|
});
|
|
34
30
|
Object.defineProperty(exports, "mintSession", {
|
|
35
31
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkDSTHFSTO_cjs.mintSession; }
|
|
37
33
|
});
|
|
38
34
|
Object.defineProperty(exports, "renderDocument", {
|
|
39
35
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkDSTHFSTO_cjs.renderDocument; }
|
|
41
37
|
});
|
|
42
38
|
Object.defineProperty(exports, "revokeAllFor", {
|
|
43
39
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkDSTHFSTO_cjs.revokeAllFor; }
|
|
45
41
|
});
|
|
46
42
|
Object.defineProperty(exports, "sessionCookies", {
|
|
47
43
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkDSTHFSTO_cjs.sessionCookies; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "defineApp", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkF45SFR7W_cjs.defineApp; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "verifyApp", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkF45SFR7W_cjs.verifyApp; }
|
|
53
53
|
});
|
|
54
54
|
//# sourceMappingURL=index.cjs.map
|
|
55
55
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { N as NiscApp } from './
|
|
2
|
-
export { F as FunctionSession, L as LayoutVariant, P as PageManifest, R as RunRecord,
|
|
1
|
+
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-wHHxIXJz.cjs';
|
|
2
|
+
export { a as DrawnDocument, E as ExecuteAs, F as FunctionDefinition, b as FunctionSession, I as IdentityRecord, L as LayoutVariant, P as PageManifest, R as RunRecord, c as RunSink, d as RunTurn, S as ShellHost, e as ShellManifest, f as ShellSnapshot, g as defineApp, r as renderDocument } from './document-wHHxIXJz.cjs';
|
|
3
3
|
import { VerifyReport } from '@niscorp/charter';
|
|
4
|
-
import { M as MossServer, D as DocumentConfig } from './document-CU3muGbz.cjs';
|
|
5
|
-
export { a as DrawnDocument, E as ExecuteAs, I as IdentityRecord, S as ShellHost, b as ShellSnapshot, r as renderDocument } from './document-CU3muGbz.cjs';
|
|
6
4
|
import { PgPool } from '@niscorp/vex';
|
|
7
|
-
import { N as NiscRuntime } from './index-
|
|
8
|
-
export { T as Telemetry, a as TelemetrySpan } from './index-
|
|
5
|
+
import { N as NiscRuntime } from './index-Dml1klpZ.cjs';
|
|
6
|
+
export { T as Telemetry, a as TelemetrySpan } from './index-Dml1klpZ.cjs';
|
|
9
7
|
import { MigrateReport } from '@niscorp/strata/postgres';
|
|
10
8
|
import { Sequence } from '@niscorp/strata';
|
|
11
9
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
|
+
import 'hono';
|
|
12
11
|
import '@niscorp/nova';
|
|
13
12
|
import '@niscorp/nova/i18n';
|
|
14
|
-
import 'hono';
|
|
15
13
|
import './socket-D90h1xSV.cjs';
|
|
16
14
|
import 'zod';
|
|
17
15
|
|
|
@@ -24,8 +22,8 @@ declare const mintSession: (pool: PgPool, principal: string, ttlMs: number) => P
|
|
|
24
22
|
declare const revokeAllFor: (pool: PgPool, principal: string) => Promise<void>;
|
|
25
23
|
declare const mintDevToken: (sub: string, claims?: Record<string, unknown>) => string;
|
|
26
24
|
|
|
27
|
-
type ShippedManifest = Pick<NiscApp, 'charter' | 'actions' | 'layouts' | 'wearable' | 'assignments' | 'entries' | 'behaviors'>;
|
|
28
|
-
type ManifestCheck = 'actions' | 'charter' | 'reach' | 'variants';
|
|
25
|
+
type ShippedManifest = Pick<NiscApp, 'charter' | 'actions' | 'layouts' | 'wearable' | 'assignments' | 'entries' | 'behaviors' | 'shell' | 'pages'>;
|
|
26
|
+
type ManifestCheck = 'actions' | 'charter' | 'functions' | 'reach' | 'variants';
|
|
29
27
|
type ManifestReport = {
|
|
30
28
|
errors: readonly {
|
|
31
29
|
check: ManifestCheck;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { N as NiscApp } from './
|
|
2
|
-
export { F as FunctionSession, L as LayoutVariant, P as PageManifest, R as RunRecord,
|
|
1
|
+
import { N as NiscApp, M as MossServer, D as DocumentConfig } from './document-AbQUbQaP.js';
|
|
2
|
+
export { a as DrawnDocument, E as ExecuteAs, F as FunctionDefinition, b as FunctionSession, I as IdentityRecord, L as LayoutVariant, P as PageManifest, R as RunRecord, c as RunSink, d as RunTurn, S as ShellHost, e as ShellManifest, f as ShellSnapshot, g as defineApp, r as renderDocument } from './document-AbQUbQaP.js';
|
|
3
3
|
import { VerifyReport } from '@niscorp/charter';
|
|
4
|
-
import { M as MossServer, D as DocumentConfig } from './document-UFbAd-Ka.js';
|
|
5
|
-
export { a as DrawnDocument, E as ExecuteAs, I as IdentityRecord, S as ShellHost, b as ShellSnapshot, r as renderDocument } from './document-UFbAd-Ka.js';
|
|
6
4
|
import { PgPool } from '@niscorp/vex';
|
|
7
|
-
import { N as NiscRuntime } from './index-
|
|
8
|
-
export { T as Telemetry, a as TelemetrySpan } from './index-
|
|
5
|
+
import { N as NiscRuntime } from './index-Dml1klpZ.js';
|
|
6
|
+
export { T as Telemetry, a as TelemetrySpan } from './index-Dml1klpZ.js';
|
|
9
7
|
import { MigrateReport } from '@niscorp/strata/postgres';
|
|
10
8
|
import { Sequence } from '@niscorp/strata';
|
|
11
9
|
import { ScreenHead } from '@niscorp/nova/document';
|
|
10
|
+
import 'hono';
|
|
12
11
|
import '@niscorp/nova';
|
|
13
12
|
import '@niscorp/nova/i18n';
|
|
14
|
-
import 'hono';
|
|
15
13
|
import './socket-D90h1xSV.js';
|
|
16
14
|
import 'zod';
|
|
17
15
|
|
|
@@ -24,8 +22,8 @@ declare const mintSession: (pool: PgPool, principal: string, ttlMs: number) => P
|
|
|
24
22
|
declare const revokeAllFor: (pool: PgPool, principal: string) => Promise<void>;
|
|
25
23
|
declare const mintDevToken: (sub: string, claims?: Record<string, unknown>) => string;
|
|
26
24
|
|
|
27
|
-
type ShippedManifest = Pick<NiscApp, 'charter' | 'actions' | 'layouts' | 'wearable' | 'assignments' | 'entries' | 'behaviors'>;
|
|
28
|
-
type ManifestCheck = 'actions' | 'charter' | 'reach' | 'variants';
|
|
25
|
+
type ShippedManifest = Pick<NiscApp, 'charter' | 'actions' | 'layouts' | 'wearable' | 'assignments' | 'entries' | 'behaviors' | 'shell' | 'pages'>;
|
|
26
|
+
type ManifestCheck = 'actions' | 'charter' | 'functions' | 'reach' | 'variants';
|
|
29
27
|
type ManifestReport = {
|
|
30
28
|
errors: readonly {
|
|
31
29
|
check: ManifestCheck;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MOSS_SEQUENCE, createServer,
|
|
2
|
-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { MOSS_SEQUENCE, createServer, exportDocuments, migrateTables, mintDevToken, mintSession, renderDocument, revokeAllFor, sessionCookies } from './chunk-MTC46PGQ.js';
|
|
2
|
+
export { defineApp, verifyApp } from './chunk-MYGVHWS5.js';
|
|
3
|
+
import './chunk-IMZZB4JE.js';
|
|
4
4
|
import './chunk-4ZGAFZGS.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/integrations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC2DNDIQX_cjs = require('./chunk-C2DNDIQX.cjs');
|
|
4
4
|
var crypto = require('crypto');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var hono = require('hono');
|
|
@@ -331,9 +331,9 @@ var proxyRoutes = (deps) => {
|
|
|
331
331
|
return routes;
|
|
332
332
|
};
|
|
333
333
|
var callIntegrationWith = (deps) => {
|
|
334
|
-
const emit =
|
|
334
|
+
const emit = chunkC2DNDIQX_cjs.emitterOf(deps.telemetry);
|
|
335
335
|
return async (id, path, init) => {
|
|
336
|
-
const clock = emit === void 0 ? void 0 :
|
|
336
|
+
const clock = emit === void 0 ? void 0 : chunkC2DNDIQX_cjs.spanClock();
|
|
337
337
|
const done = (status, httpStatus) => {
|
|
338
338
|
if (emit === void 0 || clock === void 0) return;
|
|
339
339
|
emit({
|
package/dist/integrations.d.cts
CHANGED
package/dist/integrations.d.ts
CHANGED
package/dist/integrations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { emitterOf, spanClock } from './chunk-
|
|
1
|
+
import { emitterOf, spanClock } from './chunk-IMZZB4JE.js';
|
|
2
2
|
import { generateKeyPairSync, sign, createPrivateKey, createPublicKey, createHash, randomBytes } from 'crypto';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Hono } from 'hono';
|
package/dist/node.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkZ2VA6AOE_cjs = require('./chunk-Z2VA6AOE.cjs');
|
|
4
|
+
require('./chunk-DSTHFSTO.cjs');
|
|
5
|
+
require('./chunk-F45SFR7W.cjs');
|
|
6
|
+
require('./chunk-C2DNDIQX.cjs');
|
|
7
7
|
require('./chunk-3RIWTXGI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "MOSS_PATHS", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkZ2VA6AOE_cjs.MOSS_PATHS; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "attachSocket", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkZ2VA6AOE_cjs.attachSocket; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "mountSite", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkZ2VA6AOE_cjs.mountSite; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "serve", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkZ2VA6AOE_cjs.serve; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=node.cjs.map
|
|
28
28
|
//# sourceMappingURL=node.cjs.map
|
package/dist/node.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { D as DocumentConfig, M as MossServer } from './document-
|
|
2
|
-
import { N as
|
|
3
|
-
import { N as NiscRuntime } from './index-BuDuOSyx.cjs';
|
|
1
|
+
import { D as DocumentConfig, M as MossServer, N as NiscApp } from './document-wHHxIXJz.cjs';
|
|
2
|
+
import { N as NiscRuntime } from './index-Dml1klpZ.cjs';
|
|
4
3
|
import { S as SocketAccept, T as TransportSettings } from './socket-D90h1xSV.cjs';
|
|
5
4
|
import { IncomingMessage } from 'node:http';
|
|
6
5
|
import { Duplex } from 'node:stream';
|
|
@@ -8,9 +7,9 @@ import 'hono';
|
|
|
8
7
|
import '@niscorp/charter';
|
|
9
8
|
import '@niscorp/nova';
|
|
10
9
|
import '@niscorp/vex';
|
|
11
|
-
import '@niscorp/nova/document';
|
|
12
10
|
import '@niscorp/strata';
|
|
13
11
|
import '@niscorp/nova/i18n';
|
|
12
|
+
import '@niscorp/nova/document';
|
|
14
13
|
import '@niscorp/strata/postgres';
|
|
15
14
|
import 'zod';
|
|
16
15
|
|