@agentshouse/mdruntime 0.1.0-c45e2d0d978ee → 0.1.0-c4677fe3b9ecf
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 +31 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +39 -15
- package/dist/adapter.d.ts +109 -17
- 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} +4 -4
- package/dist/attachment.d.ts.map +1 -0
- package/dist/{binary.js → attachment.js} +2 -2
- 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 +8 -2
- package/dist/conversation-live.d.ts +1 -0
- package/dist/conversation-live.d.ts.map +1 -1
- package/dist/conversation-live.js +2 -1
- package/dist/conversation-row.d.ts +16 -1
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +17 -1
- package/dist/conversation.d.ts +13 -5
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +45 -37
- package/dist/declaration.js +3 -3
- package/dist/download.d.ts +2 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/download.js +2 -2
- package/dist/entry.d.ts +14 -3
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +87 -26
- 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 +28 -17
- 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/linked-file.d.ts +7 -0
- package/dist/linked-file.d.ts.map +1 -0
- package/dist/linked-file.js +16 -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 +75 -18
- package/dist/memory.d.ts +2 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +13 -12
- package/dist/messages.d.ts +5 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +14 -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/parts.d.ts +1 -0
- package/dist/parts.d.ts.map +1 -1
- package/dist/parts.js +1 -1
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- 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/queue.d.ts +1 -1
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +4 -2
- package/dist/reach.d.ts +1 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +30 -14
- package/dist/react.d.ts +6 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +4 -1
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +2 -1
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +15 -4
- 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 -2
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +19 -5
- 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 +4 -1
- 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 +21 -17
- package/dist/saves.d.ts +5 -5
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +74 -47
- package/dist/selector.d.ts +3 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +22 -0
- package/dist/shown.d.ts +1 -1
- package/dist/shown.d.ts.map +1 -1
- package/dist/shown.js +13 -12
- 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 +37 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +63 -7
- 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 +8 -5
- package/dist/sync.js +1 -1
- package/dist/tables.d.ts +26 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +24 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeldRow } from './messages.js';
|
|
2
|
-
import { type HouseSource, type RequestAnswer } from './source.js';
|
|
2
|
+
import { type HouseSource, type RequestAnswer, type RequestDocument, type RequestTrigger } from './source.js';
|
|
3
3
|
export type ConversationLast = {
|
|
4
4
|
readonly text: string;
|
|
5
5
|
readonly by: 'owner' | 'agent' | 'house';
|
|
@@ -21,10 +21,24 @@ export type ConversationAsk = {
|
|
|
21
21
|
readonly agentFunction: string | null;
|
|
22
22
|
readonly answer: RequestAnswer | null;
|
|
23
23
|
readonly instruction: string | null;
|
|
24
|
+
readonly trigger: RequestTrigger | null;
|
|
25
|
+
readonly document: RequestDocument | null;
|
|
26
|
+
readonly brief: string | null;
|
|
24
27
|
readonly at: string;
|
|
25
28
|
readonly request: string;
|
|
26
29
|
readonly message?: string;
|
|
27
30
|
};
|
|
31
|
+
export type ConversationProposal = {
|
|
32
|
+
readonly proposal: string;
|
|
33
|
+
readonly room: {
|
|
34
|
+
readonly ref: string;
|
|
35
|
+
readonly handle: string;
|
|
36
|
+
readonly name: string;
|
|
37
|
+
};
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly baseVersion: number | null;
|
|
40
|
+
readonly at: string;
|
|
41
|
+
};
|
|
28
42
|
export type ConversationHeld = {
|
|
29
43
|
readonly last: ConversationLast | null;
|
|
30
44
|
readonly answered: string | null;
|
|
@@ -32,6 +46,7 @@ export type ConversationHeld = {
|
|
|
32
46
|
readonly failure: string | null;
|
|
33
47
|
readonly startedBy: ConversationStart | null;
|
|
34
48
|
readonly asks: ConversationAsk | null;
|
|
49
|
+
readonly proposes: ConversationProposal | null;
|
|
35
50
|
};
|
|
36
51
|
export declare function heldFacts(held: HeldRow | undefined, listed: {
|
|
37
52
|
readonly outcome: string | null;
|
|
@@ -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,
|
|
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,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAErB,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,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AC;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;AA4EF,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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sourceOf } from './source.js';
|
|
1
|
+
import { sourceOf, } from './source.js';
|
|
2
2
|
const SPEAKERS = {
|
|
3
3
|
user: 'owner',
|
|
4
4
|
assistant: 'agent',
|
|
@@ -29,6 +29,9 @@ function asksOf(asking, started, waiting) {
|
|
|
29
29
|
agentFunction: agentFunction?.name ?? null,
|
|
30
30
|
answer,
|
|
31
31
|
instruction,
|
|
32
|
+
trigger: source.trigger,
|
|
33
|
+
document: source.document,
|
|
34
|
+
brief: source.brief,
|
|
32
35
|
at,
|
|
33
36
|
request,
|
|
34
37
|
}
|
|
@@ -47,12 +50,24 @@ function asksOf(asking, started, waiting) {
|
|
|
47
50
|
agentFunction: null,
|
|
48
51
|
answer: null,
|
|
49
52
|
instruction: null,
|
|
53
|
+
trigger: null,
|
|
54
|
+
document: null,
|
|
55
|
+
brief: null,
|
|
50
56
|
at,
|
|
51
57
|
request,
|
|
52
58
|
message: identity,
|
|
53
59
|
}
|
|
54
60
|
: null;
|
|
55
61
|
}
|
|
62
|
+
function proposesOf(proposing) {
|
|
63
|
+
if (proposing?.at == null)
|
|
64
|
+
return null;
|
|
65
|
+
const source = sourceOf(proposing.source, null);
|
|
66
|
+
if (source?.kind !== 'instructions_proposal' || source.state !== 'waiting')
|
|
67
|
+
return null;
|
|
68
|
+
const { proposal, room, text, baseVersion } = source;
|
|
69
|
+
return { proposal, room, text, baseVersion, at: proposing.at };
|
|
70
|
+
}
|
|
56
71
|
export function heldFacts(held, listed) {
|
|
57
72
|
const startedBy = startOf(held?.opened ?? null);
|
|
58
73
|
return {
|
|
@@ -62,5 +77,6 @@ export function heldFacts(held, listed) {
|
|
|
62
77
|
failure: listed.outcome === 'failed' ? (held?.failure ?? null) : null,
|
|
63
78
|
startedBy,
|
|
64
79
|
asks: asksOf(held?.asking ?? null, startedBy, listed.waiting),
|
|
80
|
+
proposes: proposesOf(held?.proposing ?? null),
|
|
65
81
|
};
|
|
66
82
|
}
|
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';
|
|
@@ -17,11 +17,14 @@ export type ConversationEntry = ConversationHeld & {
|
|
|
17
17
|
retired: boolean;
|
|
18
18
|
};
|
|
19
19
|
name: string;
|
|
20
|
+
conversation_name: string;
|
|
20
21
|
created: string;
|
|
21
|
-
finished: string | null;
|
|
22
22
|
outcome: string | null;
|
|
23
23
|
waiting: boolean;
|
|
24
24
|
subject: string | null;
|
|
25
|
+
room: string | null;
|
|
26
|
+
model: string | null;
|
|
27
|
+
effort: string | null;
|
|
25
28
|
state: ConversationState;
|
|
26
29
|
started: string | null;
|
|
27
30
|
line: string | null;
|
|
@@ -34,8 +37,9 @@ export type ConversationAgent = {
|
|
|
34
37
|
identity: string;
|
|
35
38
|
name: string;
|
|
36
39
|
cli: string;
|
|
37
|
-
model: string
|
|
40
|
+
model: string;
|
|
38
41
|
effort: string | null;
|
|
42
|
+
model_fixed: boolean;
|
|
39
43
|
environment: AgentEnvironment;
|
|
40
44
|
};
|
|
41
45
|
export type RunningTurn = {
|
|
@@ -90,19 +94,23 @@ export type ConversationSurface = {
|
|
|
90
94
|
takeOut(conversation: string, message: string, operation: string): Promise<CallResult>;
|
|
91
95
|
decide(request: ChatRequest, decision: RequestDecision, operation: string): Promise<CallResult>;
|
|
92
96
|
rename(conversation: string, name: string, operation: string): Promise<CallResult>;
|
|
93
|
-
|
|
97
|
+
set(conversation: string, settings: ConversationSettings, operation: string): Promise<CallResult>;
|
|
94
98
|
retry(conversation: string, message: string, operation: string): Promise<CallResult>;
|
|
95
99
|
pin(figures: readonly string[]): Promise<void>;
|
|
96
100
|
openTurn(conversation: string, turn: string): Promise<void>;
|
|
97
101
|
dismissSuggestion(conversation: string, suggestion: string): Promise<void>;
|
|
98
102
|
attach(file: File): Promise<ConversationAttachAnswer>;
|
|
99
|
-
attachment(link: string): Promise<
|
|
103
|
+
attachment(link: string): Promise<AttachmentLinkAnswer>;
|
|
100
104
|
};
|
|
101
105
|
export type ConversationFiles = Pick<ConversationSurface, 'attach' | 'attachment'>;
|
|
102
106
|
export type ConversationAnswer = {
|
|
103
107
|
interaction_id: string;
|
|
104
108
|
response: unknown;
|
|
105
109
|
};
|
|
110
|
+
export type ConversationSettings = {
|
|
111
|
+
readonly model?: string;
|
|
112
|
+
readonly effort?: string;
|
|
113
|
+
};
|
|
106
114
|
export type ChatDraftSurface = {
|
|
107
115
|
write(conversation: string, draft: ChatDraft, revision?: string): Promise<void>;
|
|
108
116
|
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;AAKzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAEL,KAAK,
|
|
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,K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IAAI,CAIZ;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAEnF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAgCjG"}
|
package/dist/conversation.js
CHANGED
|
@@ -293,16 +293,16 @@ async function slide(alive, local, conversation, arriving) {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
function stateOf(
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
function stateOf({ activity }) {
|
|
297
|
+
if (activity === null)
|
|
298
|
+
return 'idle';
|
|
299
|
+
if (activity.turn === 'asking')
|
|
299
300
|
return 'asking';
|
|
300
|
-
return
|
|
301
|
+
return activity.turn === 'running' || activity.background !== false ? 'working' : 'idle';
|
|
301
302
|
}
|
|
302
303
|
function rowOf(alive, conversation) {
|
|
303
304
|
const { turn, questions, deliveryWaiting } = alive.liveOf(conversation);
|
|
304
305
|
return {
|
|
305
|
-
state: stateOf(alive, conversation),
|
|
306
306
|
started: turn?.started ?? null,
|
|
307
307
|
line: turn === null ? null : runningLine(turn.parts),
|
|
308
308
|
question: openQuestion(questions),
|
|
@@ -328,11 +328,15 @@ async function entries(alive) {
|
|
|
328
328
|
conversation: entry.conversation,
|
|
329
329
|
agent: { identity: agent.id, name: agent.name, retired: agent.retired_at !== null },
|
|
330
330
|
name: entry.name,
|
|
331
|
+
conversation_name: entry.conversationName,
|
|
331
332
|
created: entry.created,
|
|
332
|
-
finished: entry.finished,
|
|
333
333
|
outcome: entry.outcome,
|
|
334
334
|
waiting: entry.waiting,
|
|
335
335
|
subject: entry.subject,
|
|
336
|
+
room: entry.room,
|
|
337
|
+
model: entry.model,
|
|
338
|
+
effort: entry.effort,
|
|
339
|
+
state: stateOf(entry),
|
|
336
340
|
...rowOf(alive, entry.conversation),
|
|
337
341
|
...heldFacts(rows.get(entry.conversation), entry),
|
|
338
342
|
jobs: standing(alive.liveOf(entry.conversation), rows.get(entry.conversation)?.saved ?? null, entry.processEnded)?.running ?? [],
|
|
@@ -358,35 +362,39 @@ function upserted(kept, set, key) {
|
|
|
358
362
|
held.set(key(one), { ...one });
|
|
359
363
|
return held;
|
|
360
364
|
}
|
|
365
|
+
async function listStored(alive, local, change) {
|
|
366
|
+
const { conversationList, agentList, conversationCursor, readUntil } = await local.facts();
|
|
367
|
+
if (readUntil === null)
|
|
368
|
+
await local.fact('readUntil', new Date().toISOString());
|
|
369
|
+
const held = upserted(change.replacing ? [] : (conversationList ?? []), change.set, (entry) => entry.conversation);
|
|
370
|
+
for (const entry of change.set)
|
|
371
|
+
alive.created(entry.conversation);
|
|
372
|
+
if (change.gone !== null)
|
|
373
|
+
held.delete(change.gone);
|
|
374
|
+
const list = [...held.values()];
|
|
375
|
+
const agents = [
|
|
376
|
+
...upserted(change.replacing ? [] : (agentList ?? []), change.agents, (agent) => agent.id).values(),
|
|
377
|
+
];
|
|
378
|
+
if (JSON.stringify(list) !== JSON.stringify(conversationList)) {
|
|
379
|
+
await local.fact('conversationList', list);
|
|
380
|
+
}
|
|
381
|
+
if (JSON.stringify(agents) !== JSON.stringify(agentList)) {
|
|
382
|
+
await local.fact('agentList', agents);
|
|
383
|
+
}
|
|
384
|
+
if (change.cursor !== undefined && !alive.held.now().listRefused) {
|
|
385
|
+
if (change.cursor !== conversationCursor) {
|
|
386
|
+
await local.fact('conversationCursor', change.cursor);
|
|
387
|
+
}
|
|
388
|
+
alive.deps.stream()?.hold(change.cursor);
|
|
389
|
+
}
|
|
390
|
+
return { conversations: list, agents };
|
|
391
|
+
}
|
|
361
392
|
function listChanged(alive, change) {
|
|
362
393
|
void alive.deps
|
|
363
|
-
.durably(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const held = upserted(change.replacing ? [] : (conversationList ?? []), change.set, (entry) => entry.conversation);
|
|
368
|
-
for (const entry of change.set)
|
|
369
|
-
alive.created(entry.conversation);
|
|
370
|
-
if (change.gone !== null)
|
|
371
|
-
held.delete(change.gone);
|
|
372
|
-
const list = [...held.values()];
|
|
373
|
-
const agents = [
|
|
374
|
-
...upserted(change.replacing ? [] : (agentList ?? []), change.agents, (agent) => agent.id).values(),
|
|
375
|
-
];
|
|
376
|
-
if (JSON.stringify(list) !== JSON.stringify(conversationList)) {
|
|
377
|
-
await local.fact('conversationList', list);
|
|
378
|
-
}
|
|
379
|
-
if (JSON.stringify(agents) !== JSON.stringify(agentList)) {
|
|
380
|
-
await local.fact('agentList', agents);
|
|
381
|
-
}
|
|
382
|
-
if (change.cursor !== undefined) {
|
|
383
|
-
if (change.cursor !== conversationCursor) {
|
|
384
|
-
await local.fact('conversationCursor', change.cursor);
|
|
385
|
-
}
|
|
386
|
-
alive.deps.stream()?.hold(change.cursor);
|
|
387
|
-
}
|
|
388
|
-
return { conversations: list, agents };
|
|
389
|
-
})
|
|
394
|
+
.durably((local) => listStored(alive, local, change).catch((error) => {
|
|
395
|
+
alive.held.set({ listRefused: true });
|
|
396
|
+
throw error;
|
|
397
|
+
}))
|
|
390
398
|
.catch(async () => {
|
|
391
399
|
const { conversationList, agentList } = await (await alive.deps.local()).facts();
|
|
392
400
|
return { conversations: conversationList ?? [], agents: agentList ?? [] };
|
|
@@ -496,6 +504,7 @@ function agentsOf(listing) {
|
|
|
496
504
|
cli: agent.cli,
|
|
497
505
|
model: agent.model,
|
|
498
506
|
effort: agent.effort,
|
|
507
|
+
model_fixed: agent.model_fixed,
|
|
499
508
|
environment: {
|
|
500
509
|
identity: agent.environment,
|
|
501
510
|
name: agent.environment_name,
|
|
@@ -532,8 +541,7 @@ function setLive(alive, conversation, next) {
|
|
|
532
541
|
const before = rowOf(alive, conversation);
|
|
533
542
|
alive.holdLive(conversation, next);
|
|
534
543
|
const after = rowOf(alive, conversation);
|
|
535
|
-
if (after.
|
|
536
|
-
after.started !== before.started ||
|
|
544
|
+
if (after.started !== before.started ||
|
|
537
545
|
ran(alive.liveOf(conversation)) !== was ||
|
|
538
546
|
after.deliveryWaiting.join() !== before.deliveryWaiting.join())
|
|
539
547
|
emitList(alive);
|
|
@@ -1034,8 +1042,8 @@ export function conversationSurface(alive, files) {
|
|
|
1034
1042
|
rename(conversation, name, operation) {
|
|
1035
1043
|
return invoke(alive, 'conversations/rename', conversation, operation, { name });
|
|
1036
1044
|
},
|
|
1037
|
-
|
|
1038
|
-
return invoke(alive, 'conversations/
|
|
1045
|
+
set(conversation, settings, operation) {
|
|
1046
|
+
return invoke(alive, 'conversations/set', conversation, operation, settings);
|
|
1039
1047
|
},
|
|
1040
1048
|
retry(conversation, message, operation) {
|
|
1041
1049
|
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":"
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../src/download.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,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/download.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { linkedFile } from './linked-file.js';
|
|
2
2
|
// A browser reads a download's address only after the click that hands it returns, so a copy's address is released a minute later.
|
|
3
3
|
const HANDED_COPY_MS = 60_000;
|
|
4
4
|
const PAGE = /\.html?$/iu;
|
|
@@ -38,5 +38,5 @@ export async function handedLink(path, link) {
|
|
|
38
38
|
return STARTED;
|
|
39
39
|
}
|
|
40
40
|
export function downloadAttachment(client, link) {
|
|
41
|
-
return handedLink(
|
|
41
|
+
return handedLink(linkedFile(link)?.path ?? link, () => client.conversation.attachment(link));
|
|
42
42
|
}
|
package/dist/entry.d.ts
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
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';
|
|
21
30
|
export declare function boundQuery(template: unknown, args: EntryArguments): unknown;
|
|
22
31
|
export declare function entryParameters(template: unknown): readonly string[];
|
|
32
|
+
export declare function localQueryRefusal(template: unknown): string | null;
|
|
23
33
|
export declare function entryRefusal(template: unknown): string | null;
|
|
24
34
|
export type EntryScope = {
|
|
25
35
|
results(queries: Readonly<Record<string, unknown>>): Promise<Record<string, QueryRows>>;
|
|
@@ -29,6 +39,7 @@ export type CountedRoom = {
|
|
|
29
39
|
schema: string | null;
|
|
30
40
|
documents: readonly ValuedEntry[];
|
|
31
41
|
};
|
|
32
|
-
export declare function
|
|
42
|
+
export declare function writtenIn(room: EntryRoom, roomTypes: VerifiedModel, batch: ChangeBatch): Written;
|
|
43
|
+
export declare function entryScope(rooms: readonly EntryRoom[], roomTypes: VerifiedModel, connection: Connection, followed?: readonly EntryRoom[]): EntryScope;
|
|
33
44
|
export declare function countScope(room: CountedRoom, roomTypes: VerifiedModel, connection: Connection): EntryScope;
|
|
34
45
|
//# 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,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnF,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,U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|
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';
|
|
@@ -71,6 +72,12 @@ export function entryParameters(template) {
|
|
|
71
72
|
return [];
|
|
72
73
|
}
|
|
73
74
|
const SAMPLED = {
|
|
75
|
+
rooms: 'entry',
|
|
76
|
+
folder: 'entry',
|
|
77
|
+
outside: 'entry',
|
|
78
|
+
paths: 'entry',
|
|
79
|
+
fileIds: 'entry',
|
|
80
|
+
text: 'entry',
|
|
74
81
|
direction: 'asc',
|
|
75
82
|
nulls: 'last',
|
|
76
83
|
stringSort: 'lexical',
|
|
@@ -101,15 +108,16 @@ function sampled(template, key) {
|
|
|
101
108
|
}
|
|
102
109
|
return template;
|
|
103
110
|
}
|
|
104
|
-
function entryPlan(query, facts) {
|
|
105
|
-
const plan = planWithin(query, facts);
|
|
111
|
+
function entryPlan(query, facts, reach = null) {
|
|
112
|
+
const plan = planWithin(query, facts, reach);
|
|
106
113
|
if (plan.fileIds !== null)
|
|
107
114
|
invalid('fileIds', 'an entry Room holds no file IDs');
|
|
108
115
|
return plan;
|
|
109
116
|
}
|
|
110
|
-
|
|
117
|
+
const UNHELD = { listed: false, rooms: [] };
|
|
118
|
+
function refusalOf(plan) {
|
|
111
119
|
try {
|
|
112
|
-
|
|
120
|
+
plan();
|
|
113
121
|
return null;
|
|
114
122
|
}
|
|
115
123
|
catch (error) {
|
|
@@ -118,38 +126,88 @@ export function entryRefusal(template) {
|
|
|
118
126
|
throw error;
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
export function localQueryRefusal(template) {
|
|
130
|
+
return refusalOf(() => planWithin(sampled(template, ''), UNHELD));
|
|
131
|
+
}
|
|
132
|
+
export function entryRefusal(template) {
|
|
133
|
+
return refusalOf(() => entryPlan(sampled(template, ''), UNHELD));
|
|
134
|
+
}
|
|
135
|
+
function composedRoom(room, roomTypes) {
|
|
136
|
+
const model = attachedModel({
|
|
137
|
+
kind: 'model',
|
|
138
|
+
snapshot: { identity: room.locator, version: '', schema: room.schema, revision: null },
|
|
139
|
+
}, roomTypes);
|
|
140
|
+
return { model, selection: null, typedPaths: [] };
|
|
141
|
+
}
|
|
142
|
+
export function writtenIn(room, roomTypes, batch) {
|
|
143
|
+
const written = writtenDocuments({
|
|
144
|
+
documents: room.documents,
|
|
145
|
+
binaries: {},
|
|
146
|
+
revisions: room.revisions ?? {},
|
|
147
|
+
fileIds: {},
|
|
148
|
+
created: {},
|
|
149
|
+
changes: {},
|
|
150
|
+
}, batch, composedRoom(room, roomTypes));
|
|
151
|
+
for (;;) {
|
|
152
|
+
const step = written.next();
|
|
153
|
+
if (step.done === true)
|
|
154
|
+
return step.value;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function enteredRoom(room, roomTypes, connection) {
|
|
158
|
+
const composition = composedRoom(room, roomTypes);
|
|
159
|
+
const { model } = composition;
|
|
160
|
+
const key = room.enter(composition);
|
|
161
|
+
if (room.handle !== undefined)
|
|
162
|
+
connection.run("INSERT INTO replica_rooms (locator, key, record) VALUES (?, ?, json_object('declaration', json_object('handle', ?)))", [room.locator, key, room.handle]);
|
|
163
|
+
return {
|
|
164
|
+
locator: room.locator,
|
|
165
|
+
key,
|
|
166
|
+
composition,
|
|
167
|
+
...(room.handle === undefined ? {} : { handle: room.handle }),
|
|
168
|
+
facts: {
|
|
131
169
|
locator: room.locator,
|
|
132
170
|
available: model.status !== 'unavailable',
|
|
133
171
|
types: model.status === 'unavailable' ? [] : Object.values(model.types),
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function reachOf(rooms, followed) {
|
|
176
|
+
if (followed.every(({ readable, areas }) => readable === undefined && areas === undefined))
|
|
177
|
+
return null;
|
|
178
|
+
return {
|
|
179
|
+
rooms: [...rooms, ...followed.filter(({ readable }) => readable === undefined)].map(({ locator }) => locator),
|
|
180
|
+
documents: followed.flatMap(({ locator, readable }) => (readable ?? []).map((path) => documentKey(locator, path))),
|
|
181
|
+
areas: followed.flatMap(({ locator, areas }) => (areas ?? []).map(({ path, open }) => ({ room: locator, path, open }))),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function scope(rooms, roomTypes, connection, followed = []) {
|
|
185
|
+
for (const table of REPLICA_TABLES)
|
|
186
|
+
connection.run(table);
|
|
187
|
+
const keys = rooms.map((room) => enteredRoom(room, roomTypes, connection));
|
|
188
|
+
const follows = [
|
|
189
|
+
...keys,
|
|
190
|
+
...followed.map((room) => enteredRoom(room, roomTypes, connection)),
|
|
191
|
+
].filter(({ handle }) => handle !== undefined);
|
|
192
|
+
const planned = { listed: true, rooms: keys.map(({ facts }) => facts) };
|
|
193
|
+
const reach = reachOf(rooms, followed);
|
|
139
194
|
return {
|
|
140
195
|
async results(queries) {
|
|
141
196
|
const results = {};
|
|
142
197
|
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)));
|
|
198
|
+
const plan = entryPlan(query, planned, reach);
|
|
199
|
+
results[name] = answerQuery(connection, plan, keys.filter(({ locator }) => plan.rooms === null || plan.rooms.includes(locator)), null, follows);
|
|
145
200
|
}
|
|
146
201
|
return results;
|
|
147
202
|
},
|
|
148
203
|
};
|
|
149
204
|
}
|
|
150
|
-
|
|
151
|
-
return
|
|
205
|
+
function scopedRoom(room, connection) {
|
|
206
|
+
return {
|
|
152
207
|
locator: room.locator,
|
|
208
|
+
...(room.handle === undefined ? {} : { handle: room.handle }),
|
|
209
|
+
...(room.readable === undefined ? {} : { readable: room.readable }),
|
|
210
|
+
...(room.areas === undefined ? {} : { areas: room.areas }),
|
|
153
211
|
schema: room.schema,
|
|
154
212
|
enter(composition) {
|
|
155
213
|
const heads = (path) => ({
|
|
@@ -167,7 +225,7 @@ export function entryScope(rooms, roomTypes, connection) {
|
|
|
167
225
|
binary: null,
|
|
168
226
|
...heads(path),
|
|
169
227
|
})),
|
|
170
|
-
...Object.entries(room.
|
|
228
|
+
...Object.entries(room.attachments ?? {}).map(([path, binary]) => ({
|
|
171
229
|
path,
|
|
172
230
|
content: null,
|
|
173
231
|
facts: null,
|
|
@@ -177,7 +235,10 @@ export function entryScope(rooms, roomTypes, connection) {
|
|
|
177
235
|
];
|
|
178
236
|
return entered(connection, room.locator, composition, entries.sort((left, right) => (left.path < right.path ? -1 : 1)));
|
|
179
237
|
},
|
|
180
|
-
}
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
export function entryScope(rooms, roomTypes, connection, followed = []) {
|
|
241
|
+
return scope(rooms.map((room) => scopedRoom(room, connection)), roomTypes, connection, followed.map((room) => scopedRoom(room, connection)));
|
|
181
242
|
}
|
|
182
243
|
export function countScope(room, roomTypes, connection) {
|
|
183
244
|
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":"","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,YAAY,UAAU,CAAC;AAEpC,eAAO,MAAM,WAAW;;;;iBAGZ,IAAI;;CACe,CAAC;AAGhC,eAAO,MAAM,cAAc,WAAa,CAAC;AAQzC,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM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ED
|
@@ -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
|
};
|