@agentshouse/mdruntime 0.1.0-c10ba07fdc247 → 0.1.0-c1107a5a4f7d8
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/README.md +1 -1
- package/dist/acceptance.d.ts.map +1 -1
- package/dist/acceptance.js +30 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +25 -5
- package/dist/adapter.d.ts +83 -18
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +2 -2
- package/dist/{binary.d.ts → attachment.d.ts} +8 -4
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +15 -0
- package/dist/authored.d.ts.map +1 -1
- package/dist/authored.js +2 -0
- package/dist/chain.d.ts +1 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +5 -2
- package/dist/change.d.ts +2 -2
- package/dist/chat-types.js +2 -2
- package/dist/client.d.ts +16 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -15
- package/dist/collection.d.ts +1 -0
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +7 -1
- package/dist/compile.d.ts +2 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +71 -39
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2 -0
- package/dist/conversation-live.d.ts +1 -3
- package/dist/conversation-live.d.ts.map +1 -1
- package/dist/conversation-live.js +2 -3
- package/dist/conversation-row.d.ts +12 -0
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +10 -0
- package/dist/conversation.d.ts +14 -8
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +63 -49
- package/dist/declaration.js +3 -3
- package/dist/download.d.ts +2 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/entry.d.ts +13 -3
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +72 -24
- package/dist/figures.d.ts +1 -1
- package/dist/figures.d.ts.map +1 -1
- package/dist/figures.js +2 -2
- package/dist/host.d.ts +1 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +30 -18
- package/dist/house-query.d.ts +11 -2
- package/dist/house-query.d.ts.map +1 -1
- package/dist/house-query.js +66 -7
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/index.d.ts +16 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +2 -0
- package/dist/live.d.ts +14 -0
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +29 -12
- package/dist/loaded.d.ts +5 -3
- package/dist/loaded.d.ts.map +1 -1
- package/dist/loaded.js +12 -6
- package/dist/media.d.ts +5 -6
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +94 -25
- package/dist/memory.d.ts +2 -2
- package/dist/memory.js +9 -9
- package/dist/messages.d.ts +10 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +19 -3
- package/dist/model.d.ts +6 -5
- package/dist/model.d.ts.map +1 -1
- package/dist/name.d.ts +0 -1
- package/dist/name.d.ts.map +1 -1
- package/dist/name.js +3 -7
- package/dist/opened.d.ts +5 -5
- package/dist/opened.d.ts.map +1 -1
- package/dist/opened.js +2 -2
- package/dist/opening.d.ts.map +1 -1
- package/dist/opening.js +2 -0
- package/dist/outcome.d.ts +21 -13
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +5 -5
- package/dist/overlay.d.ts +19 -8
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +108 -37
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/preparation.d.ts +1 -0
- package/dist/preparation.d.ts.map +1 -1
- package/dist/preparation.js +15 -6
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +56 -13
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/questions.d.ts.map +1 -1
- package/dist/questions.js +2 -1
- package/dist/reach.d.ts +3 -2
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +46 -17
- package/dist/react.d.ts +6 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +7 -0
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +8 -0
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +15 -4
- package/dist/reference-forms.d.ts +4 -0
- package/dist/reference-forms.d.ts.map +1 -0
- package/dist/reference-forms.js +74 -0
- package/dist/refresh.d.ts +1 -1
- package/dist/refresh.js +4 -4
- package/dist/replica.d.ts +3 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +3 -3
- package/dist/room-draft.d.ts +1 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +9 -6
- package/dist/room-drafts.d.ts.map +1 -1
- package/dist/room-drafts.js +8 -6
- package/dist/room-list.d.ts.map +1 -1
- package/dist/room-list.js +2 -0
- package/dist/rows.d.ts +9 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +18 -4
- package/dist/run-tables.d.ts +25 -0
- package/dist/run-tables.d.ts.map +1 -0
- package/dist/run-tables.js +98 -0
- package/dist/runs.d.ts +27 -0
- package/dist/runs.d.ts.map +1 -0
- package/dist/runs.js +92 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/save.d.ts +1 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +6 -6
- package/dist/saves.d.ts +5 -5
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +71 -45
- package/dist/selector.d.ts +3 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +22 -0
- package/dist/socket.d.ts +3 -1
- package/dist/socket.d.ts.map +1 -1
- package/dist/socket.js +7 -0
- package/dist/source.d.ts +13 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +23 -0
- package/dist/store/records.d.ts +12 -5
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +10 -4
- package/dist/store.d.ts +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/stored.d.ts +9 -2
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +33 -11
- package/dist/surface.d.ts +11 -5
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +9 -6
- package/dist/sync.js +1 -1
- package/dist/tables.d.ts +27 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +25 -3
- package/dist/tallies.js +2 -2
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +49 -3
- package/dist/wire.d.ts +7 -6
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +7 -6
- package/package.json +4 -4
- package/dist/binary.d.ts.map +0 -1
- package/dist/binary.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-row.d.ts","sourceRoot":"","sources":["../src/conversation-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAY,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,WAAW,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,CAAC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAA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AC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAChD,CAAC;AAsEF,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,GAAG,SAAS,EACzB,MAAM,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACrE,gBAAgB,CAWlB"}
|
package/dist/conversation-row.js
CHANGED
|
@@ -53,6 +53,15 @@ function asksOf(asking, started, waiting) {
|
|
|
53
53
|
}
|
|
54
54
|
: null;
|
|
55
55
|
}
|
|
56
|
+
function proposesOf(proposing) {
|
|
57
|
+
if (proposing?.at == null)
|
|
58
|
+
return null;
|
|
59
|
+
const source = sourceOf(proposing.source, null);
|
|
60
|
+
if (source?.kind !== 'instructions_proposal' || !source.waiting)
|
|
61
|
+
return null;
|
|
62
|
+
const { proposal, room, text, baseVersion } = source;
|
|
63
|
+
return { proposal, room, text, baseVersion, at: proposing.at };
|
|
64
|
+
}
|
|
56
65
|
export function heldFacts(held, listed) {
|
|
57
66
|
const startedBy = startOf(held?.opened ?? null);
|
|
58
67
|
return {
|
|
@@ -62,5 +71,6 @@ export function heldFacts(held, listed) {
|
|
|
62
71
|
failure: listed.outcome === 'failed' ? (held?.failure ?? null) : null,
|
|
63
72
|
startedBy,
|
|
64
73
|
asks: asksOf(held?.asking ?? null, startedBy, listed.waiting),
|
|
74
|
+
proposes: proposesOf(held?.proposing ?? null),
|
|
65
75
|
};
|
|
66
76
|
}
|
package/dist/conversation.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type ChangeSet } from './change-set.js';
|
|
|
4
4
|
import { type LiveConversations } from './conversation-live.js';
|
|
5
5
|
import { type ConversationHeld } from './conversation-row.js';
|
|
6
6
|
import type { Open } from './open.js';
|
|
7
|
-
import { type
|
|
7
|
+
import { type AttachmentLinkAnswer, type CallResult, type ConversationAttachAnswer, type Offline } from './outcome.js';
|
|
8
8
|
import type { ChatRequest } from './source.js';
|
|
9
9
|
import type { CycleProgress } from './status.js';
|
|
10
10
|
import type { RuntimeStore } from './store.js';
|
|
@@ -18,22 +18,27 @@ export type ConversationEntry = ConversationHeld & {
|
|
|
18
18
|
};
|
|
19
19
|
name: string;
|
|
20
20
|
created: string;
|
|
21
|
-
finished: string | null;
|
|
22
21
|
outcome: string | null;
|
|
23
22
|
waiting: boolean;
|
|
24
23
|
subject: string | null;
|
|
24
|
+
room: string | null;
|
|
25
|
+
model: string | null;
|
|
26
|
+
effort: string | null;
|
|
25
27
|
state: ConversationState;
|
|
26
28
|
started: string | null;
|
|
27
29
|
line: string | null;
|
|
28
30
|
question: string | null;
|
|
29
31
|
asked: string | null;
|
|
32
|
+
jobs: SessionState['running'];
|
|
33
|
+
deliveryWaiting: readonly string[];
|
|
30
34
|
};
|
|
31
35
|
export type ConversationAgent = {
|
|
32
36
|
identity: string;
|
|
33
37
|
name: string;
|
|
34
38
|
cli: string;
|
|
35
|
-
model: string
|
|
39
|
+
model: string;
|
|
36
40
|
effort: string | null;
|
|
41
|
+
model_fixed: boolean;
|
|
37
42
|
environment: AgentEnvironment;
|
|
38
43
|
};
|
|
39
44
|
export type RunningTurn = {
|
|
@@ -67,9 +72,6 @@ export type ConversationView = {
|
|
|
67
72
|
options: readonly SessionOption[];
|
|
68
73
|
starting: string | null;
|
|
69
74
|
state: SessionState | null;
|
|
70
|
-
link: {
|
|
71
|
-
connected: boolean;
|
|
72
|
-
} | null;
|
|
73
75
|
deliveryWaiting: readonly string[];
|
|
74
76
|
deliveryUnknown: readonly string[];
|
|
75
77
|
chatDraft: (ChatDraft & {
|
|
@@ -91,19 +93,23 @@ export type ConversationSurface = {
|
|
|
91
93
|
takeOut(conversation: string, message: string, operation: string): Promise<CallResult>;
|
|
92
94
|
decide(request: ChatRequest, decision: RequestDecision, operation: string): Promise<CallResult>;
|
|
93
95
|
rename(conversation: string, name: string, operation: string): Promise<CallResult>;
|
|
94
|
-
|
|
96
|
+
set(conversation: string, settings: ConversationSettings, operation: string): Promise<CallResult>;
|
|
95
97
|
retry(conversation: string, message: string, operation: string): Promise<CallResult>;
|
|
96
98
|
pin(figures: readonly string[]): Promise<void>;
|
|
97
99
|
openTurn(conversation: string, turn: string): Promise<void>;
|
|
98
100
|
dismissSuggestion(conversation: string, suggestion: string): Promise<void>;
|
|
99
101
|
attach(file: File): Promise<ConversationAttachAnswer>;
|
|
100
|
-
attachment(link: string): Promise<
|
|
102
|
+
attachment(link: string): Promise<AttachmentLinkAnswer>;
|
|
101
103
|
};
|
|
102
104
|
export type ConversationFiles = Pick<ConversationSurface, 'attach' | 'attachment'>;
|
|
103
105
|
export type ConversationAnswer = {
|
|
104
106
|
interaction_id: string;
|
|
105
107
|
response: unknown;
|
|
106
108
|
};
|
|
109
|
+
export type ConversationSettings = {
|
|
110
|
+
readonly model?: string;
|
|
111
|
+
readonly effort?: string;
|
|
112
|
+
};
|
|
107
113
|
export type ChatDraftSurface = {
|
|
108
114
|
write(conversation: string, draft: ChatDraft, revision?: string): Promise<void>;
|
|
109
115
|
prepend(conversation: string, draft: ChatDraft): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/conversation.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,YAAY,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAEV,gBAAgB,EAEhB,iBAAiB,EAEjB,mBAAmB,EACnB,WAAW,EAEX,cAAc,EACd,aAAa,EAEd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/conversation.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,YAAY,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAEV,gBAAgB,EAEhB,iBAAiB,EAEjB,mBAAmB,EACnB,WAAW,EAEX,cAAc,EACd,aAAa,EAEd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACb,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAKV,YAAY,EACb,MAAM,YAA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
|
|
26
26
|
starting: null,
|
|
27
27
|
state: null,
|
|
28
|
-
link: null,
|
|
29
28
|
deliveryWaiting: [],
|
|
30
29
|
deliveryUnknown: [],
|
|
31
30
|
chatDraft: null,
|
|
@@ -228,7 +227,6 @@ function viewOf(alive, conversation, held, frame, { draft, ended, dismissed, pin
|
|
|
228
227
|
options: structuredClone(facts.options),
|
|
229
228
|
starting: facts.starting,
|
|
230
229
|
state: sessionOf(facts, held, ended),
|
|
231
|
-
link: facts.link === null ? null : { ...facts.link },
|
|
232
230
|
deliveryWaiting: [...facts.deliveryWaiting],
|
|
233
231
|
deliveryUnknown: [...facts.deliveryUnknown],
|
|
234
232
|
chatDraft: draft === null || unwritten(draft) ? null : { text: draft.text, revision: draft.revision },
|
|
@@ -236,18 +234,23 @@ function viewOf(alive, conversation, held, frame, { draft, ended, dismissed, pin
|
|
|
236
234
|
pins: [...pins],
|
|
237
235
|
};
|
|
238
236
|
}
|
|
239
|
-
function
|
|
237
|
+
function standing(facts, saved, ended) {
|
|
240
238
|
if (facts.state !== null)
|
|
241
239
|
return structuredClone(facts.state);
|
|
240
|
+
if (saved === null)
|
|
241
|
+
return null;
|
|
242
|
+
const down = facts.process?.running === false;
|
|
243
|
+
return structuredClone(standingState(saved.state, saved.at, down ? saved.at : ended));
|
|
244
|
+
}
|
|
245
|
+
function sessionOf(facts, held, ended) {
|
|
242
246
|
const saved = [...held]
|
|
243
247
|
.reverse()
|
|
244
248
|
.map(({ message }) => record(message))
|
|
245
249
|
.find(({ content }) => isTurn(content));
|
|
246
250
|
const at = saved === undefined ? null : text(saved, 'accepted_at');
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return structuredClone(standingState(saved.content.state, at, down ? at : ended));
|
|
251
|
+
return standing(facts, saved === undefined || !isTurn(saved.content) || at === null
|
|
252
|
+
? null
|
|
253
|
+
: { state: saved.content.state, at }, ended);
|
|
251
254
|
}
|
|
252
255
|
function emit(alive, conversation) {
|
|
253
256
|
if (alive.deps.closed())
|
|
@@ -290,20 +293,21 @@ async function slide(alive, local, conversation, arriving) {
|
|
|
290
293
|
}
|
|
291
294
|
}
|
|
292
295
|
}
|
|
293
|
-
function stateOf(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
+
function stateOf({ activity }) {
|
|
297
|
+
if (activity === null)
|
|
298
|
+
return 'idle';
|
|
299
|
+
if (activity.turn === 'asking')
|
|
296
300
|
return 'asking';
|
|
297
|
-
return
|
|
301
|
+
return activity.turn === 'running' || activity.background !== false ? 'working' : 'idle';
|
|
298
302
|
}
|
|
299
303
|
function rowOf(alive, conversation) {
|
|
300
|
-
const { turn, questions } = alive.liveOf(conversation);
|
|
304
|
+
const { turn, questions, deliveryWaiting } = alive.liveOf(conversation);
|
|
301
305
|
return {
|
|
302
|
-
state: stateOf(alive, conversation),
|
|
303
306
|
started: turn?.started ?? null,
|
|
304
307
|
line: turn === null ? null : runningLine(turn.parts),
|
|
305
308
|
question: openQuestion(questions),
|
|
306
309
|
asked: questionAsked(questions),
|
|
310
|
+
deliveryWaiting: [...deliveryWaiting],
|
|
307
311
|
};
|
|
308
312
|
}
|
|
309
313
|
async function entries(alive) {
|
|
@@ -325,12 +329,16 @@ async function entries(alive) {
|
|
|
325
329
|
agent: { identity: agent.id, name: agent.name, retired: agent.retired_at !== null },
|
|
326
330
|
name: entry.name,
|
|
327
331
|
created: entry.created,
|
|
328
|
-
finished: entry.finished,
|
|
329
332
|
outcome: entry.outcome,
|
|
330
333
|
waiting: entry.waiting,
|
|
331
334
|
subject: entry.subject,
|
|
335
|
+
room: entry.room,
|
|
336
|
+
model: entry.model,
|
|
337
|
+
effort: entry.effort,
|
|
338
|
+
state: stateOf(entry),
|
|
332
339
|
...rowOf(alive, entry.conversation),
|
|
333
340
|
...heldFacts(rows.get(entry.conversation), entry),
|
|
341
|
+
jobs: standing(alive.liveOf(entry.conversation), rows.get(entry.conversation)?.saved ?? null, entry.processEnded)?.running ?? [],
|
|
334
342
|
};
|
|
335
343
|
});
|
|
336
344
|
}
|
|
@@ -353,35 +361,39 @@ function upserted(kept, set, key) {
|
|
|
353
361
|
held.set(key(one), { ...one });
|
|
354
362
|
return held;
|
|
355
363
|
}
|
|
364
|
+
async function listStored(alive, local, change) {
|
|
365
|
+
const { conversationList, agentList, conversationCursor, readUntil } = await local.facts();
|
|
366
|
+
if (readUntil === null)
|
|
367
|
+
await local.fact('readUntil', new Date().toISOString());
|
|
368
|
+
const held = upserted(change.replacing ? [] : (conversationList ?? []), change.set, (entry) => entry.conversation);
|
|
369
|
+
for (const entry of change.set)
|
|
370
|
+
alive.created(entry.conversation);
|
|
371
|
+
if (change.gone !== null)
|
|
372
|
+
held.delete(change.gone);
|
|
373
|
+
const list = [...held.values()];
|
|
374
|
+
const agents = [
|
|
375
|
+
...upserted(change.replacing ? [] : (agentList ?? []), change.agents, (agent) => agent.id).values(),
|
|
376
|
+
];
|
|
377
|
+
if (JSON.stringify(list) !== JSON.stringify(conversationList)) {
|
|
378
|
+
await local.fact('conversationList', list);
|
|
379
|
+
}
|
|
380
|
+
if (JSON.stringify(agents) !== JSON.stringify(agentList)) {
|
|
381
|
+
await local.fact('agentList', agents);
|
|
382
|
+
}
|
|
383
|
+
if (change.cursor !== undefined && !alive.held.now().listRefused) {
|
|
384
|
+
if (change.cursor !== conversationCursor) {
|
|
385
|
+
await local.fact('conversationCursor', change.cursor);
|
|
386
|
+
}
|
|
387
|
+
alive.deps.stream()?.hold(change.cursor);
|
|
388
|
+
}
|
|
389
|
+
return { conversations: list, agents };
|
|
390
|
+
}
|
|
356
391
|
function listChanged(alive, change) {
|
|
357
392
|
void alive.deps
|
|
358
|
-
.durably(
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
const held = upserted(change.replacing ? [] : (conversationList ?? []), change.set, (entry) => entry.conversation);
|
|
363
|
-
for (const entry of change.set)
|
|
364
|
-
alive.created(entry.conversation);
|
|
365
|
-
if (change.gone !== null)
|
|
366
|
-
held.delete(change.gone);
|
|
367
|
-
const list = [...held.values()];
|
|
368
|
-
const agents = [
|
|
369
|
-
...upserted(change.replacing ? [] : (agentList ?? []), change.agents, (agent) => agent.id).values(),
|
|
370
|
-
];
|
|
371
|
-
if (JSON.stringify(list) !== JSON.stringify(conversationList)) {
|
|
372
|
-
await local.fact('conversationList', list);
|
|
373
|
-
}
|
|
374
|
-
if (JSON.stringify(agents) !== JSON.stringify(agentList)) {
|
|
375
|
-
await local.fact('agentList', agents);
|
|
376
|
-
}
|
|
377
|
-
if (change.cursor !== undefined) {
|
|
378
|
-
if (change.cursor !== conversationCursor) {
|
|
379
|
-
await local.fact('conversationCursor', change.cursor);
|
|
380
|
-
}
|
|
381
|
-
alive.deps.stream()?.hold(change.cursor);
|
|
382
|
-
}
|
|
383
|
-
return { conversations: list, agents };
|
|
384
|
-
})
|
|
393
|
+
.durably((local) => listStored(alive, local, change).catch((error) => {
|
|
394
|
+
alive.held.set({ listRefused: true });
|
|
395
|
+
throw error;
|
|
396
|
+
}))
|
|
385
397
|
.catch(async () => {
|
|
386
398
|
const { conversationList, agentList } = await (await alive.deps.local()).facts();
|
|
387
399
|
return { conversations: conversationList ?? [], agents: agentList ?? [] };
|
|
@@ -491,6 +503,7 @@ function agentsOf(listing) {
|
|
|
491
503
|
cli: agent.cli,
|
|
492
504
|
model: agent.model,
|
|
493
505
|
effort: agent.effort,
|
|
506
|
+
model_fixed: agent.model_fixed,
|
|
494
507
|
environment: {
|
|
495
508
|
identity: agent.environment,
|
|
496
509
|
name: agent.environment_name,
|
|
@@ -519,11 +532,17 @@ function emitAgents(alive) {
|
|
|
519
532
|
}
|
|
520
533
|
});
|
|
521
534
|
}
|
|
535
|
+
function ran({ state, process }) {
|
|
536
|
+
return JSON.stringify([state?.running ?? null, process?.running ?? null]);
|
|
537
|
+
}
|
|
522
538
|
function setLive(alive, conversation, next) {
|
|
539
|
+
const was = ran(alive.liveOf(conversation));
|
|
523
540
|
const before = rowOf(alive, conversation);
|
|
524
541
|
alive.holdLive(conversation, next);
|
|
525
542
|
const after = rowOf(alive, conversation);
|
|
526
|
-
if (after.
|
|
543
|
+
if (after.started !== before.started ||
|
|
544
|
+
ran(alive.liveOf(conversation)) !== was ||
|
|
545
|
+
after.deliveryWaiting.join() !== before.deliveryWaiting.join())
|
|
527
546
|
emitList(alive);
|
|
528
547
|
else if (after.line !== before.line ||
|
|
529
548
|
after.question !== before.question ||
|
|
@@ -554,7 +573,6 @@ function openingEnded(alive) {
|
|
|
554
573
|
options: facts.has('options') ? QUIET.options : held.options,
|
|
555
574
|
starting: facts.has('starting') ? QUIET.starting : held.starting,
|
|
556
575
|
state: facts.has('state') ? QUIET.state : held.state,
|
|
557
|
-
link: facts.has('link') ? QUIET.link : held.link,
|
|
558
576
|
deliveryWaiting: facts.has('deliveryWaiting') ? QUIET.deliveryWaiting : held.deliveryWaiting,
|
|
559
577
|
deliveryUnknown: facts.has('deliveryUnknown') ? QUIET.deliveryUnknown : held.deliveryUnknown,
|
|
560
578
|
});
|
|
@@ -786,10 +804,6 @@ function heard(alive, event) {
|
|
|
786
804
|
live(alive, conversation, { state: structuredClone(event.state) });
|
|
787
805
|
return;
|
|
788
806
|
}
|
|
789
|
-
if (event.kind === 'link') {
|
|
790
|
-
live(alive, conversation, { link: { connected: event.connected } });
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
807
|
if (event.kind === 'deliveries') {
|
|
794
808
|
live(alive, conversation, {
|
|
795
809
|
deliveryWaiting: [...event.waiting],
|
|
@@ -1027,8 +1041,8 @@ export function conversationSurface(alive, files) {
|
|
|
1027
1041
|
rename(conversation, name, operation) {
|
|
1028
1042
|
return invoke(alive, 'conversations/rename', conversation, operation, { name });
|
|
1029
1043
|
},
|
|
1030
|
-
|
|
1031
|
-
return invoke(alive, 'conversations/
|
|
1044
|
+
set(conversation, settings, operation) {
|
|
1045
|
+
return invoke(alive, 'conversations/set', conversation, operation, settings);
|
|
1032
1046
|
},
|
|
1033
1047
|
retry(conversation, message, operation) {
|
|
1034
1048
|
return invoke(alive, 'conversations/retry', conversation, operation, {
|
package/dist/declaration.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { equalValue } from '@agentshouse/mdmodel';
|
|
2
|
-
import {
|
|
2
|
+
import { documentAt, covered, normalize } from './paths.js';
|
|
3
3
|
export function declared({ locator: _locator, roomVersion: _roomVersion, ...declaration }) {
|
|
4
4
|
return declaration;
|
|
5
5
|
}
|
|
@@ -8,10 +8,10 @@ export function sameDeclaration(left, right) {
|
|
|
8
8
|
}
|
|
9
9
|
export function writeRule({ operations, providerOwnedPaths, authoredPaths, }, pathRule, local) {
|
|
10
10
|
return (path, needs) => {
|
|
11
|
-
const normalized = normalize(path);
|
|
11
|
+
const normalized = normalize(path.normalize('NFC'));
|
|
12
12
|
if (normalized === null || normalized === '')
|
|
13
13
|
return { code: 'room-root', path };
|
|
14
|
-
if (covered(providerOwnedPaths, normalized) || !
|
|
14
|
+
if (covered(providerOwnedPaths, normalized) || !documentAt(authoredPaths, normalized)) {
|
|
15
15
|
return { code: 'provider-owned-path', path: normalized };
|
|
16
16
|
}
|
|
17
17
|
if (!pathRule(normalized))
|
package/dist/download.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MdRuntimeClient } from './client.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AttachmentLinkAnswer, DownloadAnswer } from './outcome.js';
|
|
3
3
|
export declare function handedCopy(copy: Blob, name: string): DownloadAnswer;
|
|
4
|
-
export declare function handedLink(path: string, link: () => Promise<
|
|
4
|
+
export declare function handedLink(path: string, link: () => Promise<AttachmentLinkAnswer>): Promise<DownloadAnswer>;
|
|
5
5
|
export declare function downloadAttachment(client: MdRuntimeClient, link: string): Promise<DownloadAnswer>;
|
|
6
6
|
//# sourceMappingURL=download.d.ts.map
|
package/dist/download.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../src/download.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../src/download.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAuBzE,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAKnE;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,cAAc,CAAC,CAazB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAEjG"}
|
package/dist/entry.d.ts
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { type VerifiedModel } from '@agentshouse/mdmodel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Attachment, HeadChange } from './adapter.js';
|
|
3
|
+
import type { ChangeBatch } from './change.js';
|
|
4
|
+
import { type Written } from './overlay.js';
|
|
3
5
|
import { type QueryRows } from './query.js';
|
|
4
6
|
import { type ValuedEntry } from './stored.js';
|
|
5
7
|
import type { Connection } from './tables.js';
|
|
6
8
|
export { QueryError } from '@agentshouse/mdmodel';
|
|
7
9
|
export { documentKey, pathOfKey } from './rows.js';
|
|
8
10
|
export type { ValuedEntry } from './stored.js';
|
|
11
|
+
export type EntryArea = {
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly open: readonly string[];
|
|
14
|
+
};
|
|
9
15
|
export type EntryRoom = {
|
|
10
16
|
locator: string;
|
|
17
|
+
handle?: string;
|
|
18
|
+
readable?: readonly string[];
|
|
19
|
+
areas?: readonly EntryArea[];
|
|
11
20
|
schema: string | null;
|
|
12
21
|
documents: Readonly<Record<string, string>>;
|
|
13
22
|
revisions?: Readonly<Record<string, string>>;
|
|
14
23
|
fileIds?: Readonly<Record<string, string>>;
|
|
15
24
|
created?: Readonly<Record<string, string>>;
|
|
16
25
|
changes?: Readonly<Record<string, HeadChange>>;
|
|
17
|
-
|
|
26
|
+
attachments?: Readonly<Record<string, Attachment>>;
|
|
18
27
|
};
|
|
19
28
|
export type EntryArguments = Readonly<Record<string, string>>;
|
|
20
29
|
export type EntryParameterKind = 'string' | 'integer' | 'number' | 'boolean';
|
|
@@ -29,6 +38,7 @@ export type CountedRoom = {
|
|
|
29
38
|
schema: string | null;
|
|
30
39
|
documents: readonly ValuedEntry[];
|
|
31
40
|
};
|
|
32
|
-
export declare function
|
|
41
|
+
export declare function writtenIn(room: EntryRoom, roomTypes: VerifiedModel, batch: ChangeBatch): Written;
|
|
42
|
+
export declare function entryScope(rooms: readonly EntryRoom[], roomTypes: VerifiedModel, connection: Connection, followed?: readonly EntryRoom[]): EntryScope;
|
|
33
43
|
export declare function countScope(room: CountedRoom, roomTypes: VerifiedModel, connection: Connection): EntryScope;
|
|
34
44
|
//# sourceMappingURL=entry.d.ts.map
|
package/dist/entry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,KAAK,EAAE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B,UAAU,CAaZ"}
|
package/dist/entry.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { invalid, plain, QueryError, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { attachedModel } from './attached-model.js';
|
|
3
|
+
import { writtenDocuments } from './overlay.js';
|
|
3
4
|
import { answerQuery } from './compile.js';
|
|
4
5
|
import { planWithin } from './query.js';
|
|
5
|
-
import { writtenFacts } from './rows.js';
|
|
6
|
+
import { documentKey, writtenFacts } from './rows.js';
|
|
6
7
|
import { entered, enteredValues, REPLICA_TABLES, } from './stored.js';
|
|
7
8
|
export { QueryError } from '@agentshouse/mdmodel';
|
|
8
9
|
export { documentKey, pathOfKey } from './rows.js';
|
|
@@ -101,8 +102,8 @@ function sampled(template, key) {
|
|
|
101
102
|
}
|
|
102
103
|
return template;
|
|
103
104
|
}
|
|
104
|
-
function entryPlan(query, facts) {
|
|
105
|
-
const plan = planWithin(query, facts);
|
|
105
|
+
function entryPlan(query, facts, reach = null) {
|
|
106
|
+
const plan = planWithin(query, facts, reach);
|
|
106
107
|
if (plan.fileIds !== null)
|
|
107
108
|
invalid('fileIds', 'an entry Room holds no file IDs');
|
|
108
109
|
return plan;
|
|
@@ -118,38 +119,82 @@ export function entryRefusal(template) {
|
|
|
118
119
|
throw error;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
function composedRoom(room, roomTypes) {
|
|
123
|
+
const model = attachedModel({
|
|
124
|
+
kind: 'model',
|
|
125
|
+
snapshot: { identity: room.locator, version: '', schema: room.schema, revision: null },
|
|
126
|
+
}, roomTypes);
|
|
127
|
+
return { model, selection: null, typedPaths: [] };
|
|
128
|
+
}
|
|
129
|
+
export function writtenIn(room, roomTypes, batch) {
|
|
130
|
+
const written = writtenDocuments({
|
|
131
|
+
documents: room.documents,
|
|
132
|
+
binaries: {},
|
|
133
|
+
revisions: room.revisions ?? {},
|
|
134
|
+
fileIds: {},
|
|
135
|
+
created: {},
|
|
136
|
+
changes: {},
|
|
137
|
+
}, batch, composedRoom(room, roomTypes));
|
|
138
|
+
for (;;) {
|
|
139
|
+
const step = written.next();
|
|
140
|
+
if (step.done === true)
|
|
141
|
+
return step.value;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function enteredRoom(room, roomTypes, connection) {
|
|
145
|
+
const composition = composedRoom(room, roomTypes);
|
|
146
|
+
const { model } = composition;
|
|
147
|
+
const key = room.enter(composition);
|
|
148
|
+
if (room.handle !== undefined)
|
|
149
|
+
connection.run("INSERT INTO replica_rooms (locator, key, record) VALUES (?, ?, json_object('declaration', json_object('handle', ?)))", [room.locator, key, room.handle]);
|
|
150
|
+
return {
|
|
151
|
+
locator: room.locator,
|
|
152
|
+
key,
|
|
153
|
+
composition,
|
|
154
|
+
...(room.handle === undefined ? {} : { handle: room.handle }),
|
|
155
|
+
facts: {
|
|
131
156
|
locator: room.locator,
|
|
132
157
|
available: model.status !== 'unavailable',
|
|
133
158
|
types: model.status === 'unavailable' ? [] : Object.values(model.types),
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function reachOf(rooms, followed) {
|
|
163
|
+
if (followed.every(({ readable, areas }) => readable === undefined && areas === undefined))
|
|
164
|
+
return null;
|
|
165
|
+
return {
|
|
166
|
+
rooms: [...rooms, ...followed.filter(({ readable }) => readable === undefined)].map(({ locator }) => locator),
|
|
167
|
+
documents: followed.flatMap(({ locator, readable }) => (readable ?? []).map((path) => documentKey(locator, path))),
|
|
168
|
+
areas: followed.flatMap(({ locator, areas }) => (areas ?? []).map(({ path, open }) => ({ room: locator, path, open }))),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function scope(rooms, roomTypes, connection, followed = []) {
|
|
172
|
+
for (const table of REPLICA_TABLES)
|
|
173
|
+
connection.run(table);
|
|
174
|
+
const keys = rooms.map((room) => enteredRoom(room, roomTypes, connection));
|
|
175
|
+
const follows = [
|
|
176
|
+
...keys,
|
|
177
|
+
...followed.map((room) => enteredRoom(room, roomTypes, connection)),
|
|
178
|
+
].filter(({ handle }) => handle !== undefined);
|
|
179
|
+
const planned = { listed: true, rooms: keys.map(({ facts }) => facts) };
|
|
180
|
+
const reach = reachOf(rooms, followed);
|
|
139
181
|
return {
|
|
140
182
|
async results(queries) {
|
|
141
183
|
const results = {};
|
|
142
184
|
for (const [name, query] of Object.entries(queries)) {
|
|
143
|
-
const plan = entryPlan(query, planned);
|
|
144
|
-
results[name] = answerQuery(connection, plan, keys.filter(({ locator }) => plan.rooms === null || plan.rooms.includes(locator)));
|
|
185
|
+
const plan = entryPlan(query, planned, reach);
|
|
186
|
+
results[name] = answerQuery(connection, plan, keys.filter(({ locator }) => plan.rooms === null || plan.rooms.includes(locator)), null, follows);
|
|
145
187
|
}
|
|
146
188
|
return results;
|
|
147
189
|
},
|
|
148
190
|
};
|
|
149
191
|
}
|
|
150
|
-
|
|
151
|
-
return
|
|
192
|
+
function scopedRoom(room, connection) {
|
|
193
|
+
return {
|
|
152
194
|
locator: room.locator,
|
|
195
|
+
...(room.handle === undefined ? {} : { handle: room.handle }),
|
|
196
|
+
...(room.readable === undefined ? {} : { readable: room.readable }),
|
|
197
|
+
...(room.areas === undefined ? {} : { areas: room.areas }),
|
|
153
198
|
schema: room.schema,
|
|
154
199
|
enter(composition) {
|
|
155
200
|
const heads = (path) => ({
|
|
@@ -167,7 +212,7 @@ export function entryScope(rooms, roomTypes, connection) {
|
|
|
167
212
|
binary: null,
|
|
168
213
|
...heads(path),
|
|
169
214
|
})),
|
|
170
|
-
...Object.entries(room.
|
|
215
|
+
...Object.entries(room.attachments ?? {}).map(([path, binary]) => ({
|
|
171
216
|
path,
|
|
172
217
|
content: null,
|
|
173
218
|
facts: null,
|
|
@@ -177,7 +222,10 @@ export function entryScope(rooms, roomTypes, connection) {
|
|
|
177
222
|
];
|
|
178
223
|
return entered(connection, room.locator, composition, entries.sort((left, right) => (left.path < right.path ? -1 : 1)));
|
|
179
224
|
},
|
|
180
|
-
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export function entryScope(rooms, roomTypes, connection, followed = []) {
|
|
228
|
+
return scope(rooms.map((room) => scopedRoom(room, connection)), roomTypes, connection, followed.map((room) => scopedRoom(room, connection)));
|
|
181
229
|
}
|
|
182
230
|
export function countScope(room, roomTypes, connection) {
|
|
183
231
|
return scope([
|
package/dist/figures.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { GroupTotal, PendingResult } from './query.js';
|
|
|
3
3
|
import type { Deliver, Fail } from './reach.js';
|
|
4
4
|
import type { ConversationTally, RoomTally } from './tallies.js';
|
|
5
5
|
import type { QueryRoom } from './tables.js';
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const HOUSE_FOLDER = "house";
|
|
7
7
|
export declare const ROOM_TOTALS: {
|
|
8
8
|
readonly outside: readonly ["house"];
|
|
9
9
|
readonly groupBy: readonly ["room"];
|
package/dist/figures.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../src/figures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"figures.d.ts","sourceRoot":"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,EAAE,CAAA;CAAE,CAAC;AAEpF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,KAAK,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;IACjF,aAAa,CACX,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,EACvC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,IAAI,CAAC;IAChD,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B,OAAO,IAAI,IAAI,CAAC;IAChB,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAgDF,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,CAwIlE"}
|
package/dist/figures.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { instantKey } from '@agentshouse/mdmodel';
|
|
2
|
-
export const
|
|
2
|
+
export const HOUSE_FOLDER = 'house';
|
|
3
3
|
export const ROOM_TOTALS = {
|
|
4
|
-
outside: [
|
|
4
|
+
outside: [HOUSE_FOLDER],
|
|
5
5
|
groupBy: ['room'],
|
|
6
6
|
select: { size: true },
|
|
7
7
|
};
|
package/dist/host.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { type CallResult } from './outcome.js';
|
|
|
6
6
|
import { type RuntimePort } from './wire.js';
|
|
7
7
|
export type MdRuntimeHostOptions = MdRuntimeOptions & {
|
|
8
8
|
deploymentFacts?: unknown;
|
|
9
|
+
saveMessages?: Readonly<Record<string, string>>;
|
|
9
10
|
};
|
|
10
11
|
export type Admitted = {
|
|
11
12
|
readonly admitted: unknown;
|