@agentshouse/mdruntime 0.1.0-ca9a5a0b81b98 → 0.1.0-cab56bd8fdcb7
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 +29 -14
- package/dist/acceptance.d.ts +3 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +299 -0
- package/dist/act-lanes.d.ts +30 -0
- package/dist/act-lanes.d.ts.map +1 -0
- package/dist/act-lanes.js +225 -0
- package/dist/actions.d.ts +26 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +346 -0
- package/dist/adapter.d.ts +301 -91
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +6 -10
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +35 -28
- package/dist/authored.d.ts +88 -0
- package/dist/authored.d.ts.map +1 -0
- package/dist/authored.js +347 -0
- package/dist/binary.d.ts +22 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +15 -0
- package/dist/bootstrap.d.ts +37 -5
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +324 -51
- package/dist/cell.d.ts +6 -0
- package/dist/cell.d.ts.map +1 -0
- package/dist/cell.js +9 -0
- package/dist/chain.d.ts +12 -0
- package/dist/chain.d.ts.map +1 -0
- package/dist/chain.js +67 -0
- package/dist/change-set.d.ts +13 -14
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +17 -56
- package/dist/change.d.ts +50 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +39 -0
- package/dist/chat-types.d.ts +3 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +11 -0
- package/dist/client.d.ts +65 -28
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +161 -35
- package/dist/collection.d.ts +36 -14
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +74 -54
- package/dist/column.d.ts +5 -0
- package/dist/column.d.ts.map +1 -0
- package/dist/column.js +9 -0
- package/dist/compile.d.ts +19 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +755 -0
- package/dist/connection.d.ts +8 -103
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +117 -2079
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +7 -0
- package/dist/conversation-live.d.ts +149 -0
- package/dist/conversation-live.d.ts.map +1 -0
- package/dist/conversation-live.js +259 -0
- package/dist/conversation-row.d.ts +40 -0
- package/dist/conversation-row.d.ts.map +1 -0
- package/dist/conversation-row.js +66 -0
- package/dist/conversation.d.ts +101 -48
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +1134 -547
- package/dist/declaration.d.ts +10 -0
- package/dist/declaration.d.ts.map +1 -0
- package/dist/declaration.js +24 -0
- package/dist/digest.d.ts +7 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +113 -0
- package/dist/discovery.d.ts +12 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +175 -0
- package/dist/download.d.ts +6 -0
- package/dist/download.d.ts.map +1 -0
- package/dist/download.js +42 -0
- package/dist/durability.d.ts +24 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +12 -0
- package/dist/entry.d.ts +35 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +206 -0
- package/dist/expectation.d.ts +34 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +123 -0
- package/dist/failure.d.ts +16 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +27 -0
- package/dist/figures.d.ts +49 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +199 -0
- package/dist/file.d.ts +2 -19
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +8 -122
- package/dist/holdings.d.ts +29 -0
- package/dist/holdings.d.ts.map +1 -0
- package/dist/holdings.js +95 -0
- package/dist/host.d.ts +33 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +221 -34
- package/dist/house-query.d.ts +24 -0
- package/dist/house-query.d.ts.map +1 -0
- package/dist/house-query.js +82 -0
- package/dist/identity.d.ts +3 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -1
- package/dist/index.d.ts +47 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -0
- package/dist/install.d.ts +60 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +537 -0
- package/dist/lifecycle.d.ts +7 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +290 -0
- package/dist/listing.d.ts +60 -0
- package/dist/listing.d.ts.map +1 -0
- package/dist/listing.js +168 -0
- package/dist/live.d.ts +39 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +223 -0
- package/dist/loaded.d.ts +7 -0
- package/dist/loaded.d.ts.map +1 -0
- package/dist/loaded.js +46 -0
- package/dist/locks.d.ts +7 -0
- package/dist/locks.d.ts.map +1 -0
- package/dist/locks.js +34 -0
- package/dist/lost.d.ts +5 -0
- package/dist/lost.d.ts.map +1 -0
- package/dist/lost.js +49 -0
- package/dist/media.d.ts +24 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +352 -0
- package/dist/memory.d.ts +29 -8
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +360 -98
- package/dist/messages.d.ts +63 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +169 -0
- package/dist/modal.d.ts +2 -0
- package/dist/modal.d.ts.map +1 -0
- package/dist/modal.js +11 -0
- package/dist/model.d.ts +20 -14
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +14 -13
- package/dist/models.d.ts +10 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +153 -0
- package/dist/name.d.ts +3 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +118 -0
- package/dist/observation.d.ts +44 -9
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +271 -33
- package/dist/online.d.ts +7 -0
- package/dist/online.d.ts.map +1 -0
- package/dist/online.js +29 -0
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/opened.d.ts +22 -0
- package/dist/opened.d.ts.map +1 -0
- package/dist/opened.js +107 -0
- package/dist/opening.d.ts +4 -0
- package/dist/opening.d.ts.map +1 -0
- package/dist/opening.js +69 -0
- package/dist/outcome.d.ts +95 -5
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +114 -1
- package/dist/overlay.d.ts +21 -6
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +170 -190
- package/dist/page-metadata.d.ts +8 -0
- package/dist/page-metadata.d.ts.map +1 -0
- package/dist/page-metadata.js +19 -0
- package/dist/parts.d.ts +6 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +36 -0
- package/dist/paths.d.ts +2 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +26 -16
- package/dist/preparation.d.ts +46 -0
- package/dist/preparation.d.ts.map +1 -0
- package/dist/preparation.js +344 -0
- package/dist/presence.d.ts +58 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +231 -0
- package/dist/queries.d.ts +16 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +330 -0
- package/dist/query.d.ts +51 -181
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -423
- package/dist/questions.d.ts +30 -0
- package/dist/questions.d.ts.map +1 -0
- package/dist/questions.js +117 -0
- package/dist/queue.d.ts +40 -0
- package/dist/queue.d.ts.map +1 -0
- package/dist/queue.js +480 -0
- package/dist/reach.d.ts +30 -5
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +459 -106
- package/dist/react.d.ts +49 -19
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +45 -21
- package/dist/read.d.ts +7 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +17 -0
- package/dist/readiness.d.ts +65 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +34 -0
- package/dist/reads.d.ts +39 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +178 -0
- package/dist/recovery.d.ts +29 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +255 -0
- 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 +20 -7
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +155 -59
- package/dist/refusal.d.ts +5 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +55 -0
- package/dist/replica.d.ts +53 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +362 -165
- package/dist/retried.d.ts +30 -0
- package/dist/retried.d.ts.map +1 -0
- package/dist/retried.js +72 -0
- package/dist/room-draft.d.ts +85 -14
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +502 -96
- package/dist/room-drafts.d.ts +24 -0
- package/dist/room-drafts.d.ts.map +1 -0
- package/dist/room-drafts.js +222 -0
- package/dist/room-list.d.ts +10 -0
- package/dist/room-list.d.ts.map +1 -0
- package/dist/room-list.js +45 -0
- package/dist/rows.d.ts +41 -34
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +80 -89
- package/dist/running.d.ts +5 -0
- package/dist/running.d.ts.map +1 -0
- package/dist/running.js +10 -0
- package/dist/runtime.d.ts +37 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/save.d.ts +48 -21
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +1031 -208
- package/dist/saves.d.ts +34 -0
- package/dist/saves.d.ts.map +1 -0
- package/dist/saves.js +463 -0
- package/dist/search.d.ts +15 -54
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +10 -121
- package/dist/seed.d.ts +25 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +145 -0
- package/dist/shared.d.ts +10 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +339 -0
- package/dist/shown.d.ts +35 -0
- package/dist/shown.d.ts.map +1 -0
- package/dist/shown.js +326 -0
- package/dist/socket/admission.d.ts +7 -0
- package/dist/socket/admission.d.ts.map +1 -0
- package/dist/socket/admission.js +39 -0
- package/dist/socket/answers.d.ts +6 -0
- package/dist/socket/answers.d.ts.map +1 -0
- package/dist/socket/answers.js +20 -0
- package/dist/socket/lanes.d.ts +28 -0
- package/dist/socket/lanes.d.ts.map +1 -0
- package/dist/socket/lanes.js +103 -0
- package/dist/socket/reads.d.ts +10 -0
- package/dist/socket/reads.d.ts.map +1 -0
- package/dist/socket/reads.js +31 -0
- package/dist/socket/session.d.ts +41 -0
- package/dist/socket/session.d.ts.map +1 -0
- package/dist/socket/session.js +26 -0
- package/dist/socket.d.ts +68 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +165 -0
- package/dist/source.d.ts +61 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +95 -0
- package/dist/status.d.ts +7 -4
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -15
- package/dist/store/installs.d.ts +30 -0
- package/dist/store/installs.d.ts.map +1 -0
- package/dist/store/installs.js +40 -0
- package/dist/store/readiness.d.ts +11 -0
- package/dist/store/readiness.d.ts.map +1 -0
- package/dist/store/readiness.js +68 -0
- package/dist/store/records.d.ts +229 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/store/records.js +474 -0
- package/dist/store/room-held.d.ts +8 -0
- package/dist/store/room-held.d.ts.map +1 -0
- package/dist/store/room-held.js +17 -0
- package/dist/store/rooms-shown.d.ts +8 -0
- package/dist/store/rooms-shown.d.ts.map +1 -0
- package/dist/store/rooms-shown.js +13 -0
- package/dist/store/space.d.ts +11 -0
- package/dist/store/space.d.ts.map +1 -0
- package/dist/store/space.js +41 -0
- package/dist/store/watchers.d.ts +17 -0
- package/dist/store/watchers.d.ts.map +1 -0
- package/dist/store/watchers.js +56 -0
- package/dist/store/writes.d.ts +24 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +125 -0
- package/dist/store.d.ts +115 -91
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +173 -384
- package/dist/stored.d.ts +181 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +807 -0
- package/dist/surface.d.ts +94 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +255 -0
- package/dist/sync.d.ts +21 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +557 -0
- package/dist/tables.d.ts +388 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +506 -0
- package/dist/tallies.d.ts +18 -0
- package/dist/tallies.d.ts.map +1 -0
- package/dist/tallies.js +128 -0
- package/dist/transfer.d.ts +0 -5
- package/dist/transfer.d.ts.map +1 -1
- package/dist/turn.d.ts +9 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +75 -0
- package/dist/validation.d.ts +31 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +144 -0
- package/dist/windows.d.ts +11 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +16 -0
- package/dist/wire.d.ts +248 -37
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +93 -33
- package/package.json +28 -16
- package/AGENTS.md +0 -231
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
- package/dist/log.d.ts +0 -5
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js +0 -14
- package/dist/read-side.d.ts +0 -18
- package/dist/read-side.d.ts.map +0 -1
- package/dist/read-side.js +0 -377
package/dist/adapter.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import type { SavedFacts, TypedPath, VerifiedModel } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { Operation, SessionState } from '@agentshouse/session-content';
|
|
1
3
|
import type { ModelResult } from './model.js';
|
|
4
|
+
export type { SavedFacts, TypedPath };
|
|
5
|
+
import type { Open } from './open.js';
|
|
2
6
|
import type { ChangeBatch } from './change.js';
|
|
7
|
+
import type { QueryDocument, QueryGroup } from './query.js';
|
|
3
8
|
export type Authorization = object;
|
|
4
9
|
export type MdModelIdentity = {
|
|
5
10
|
identity: string;
|
|
@@ -9,45 +14,45 @@ export type TypedSelection = {
|
|
|
9
14
|
roots: readonly string[];
|
|
10
15
|
};
|
|
11
16
|
export type OperationScopes = {
|
|
12
|
-
read: readonly string[];
|
|
13
|
-
sync: readonly string[];
|
|
14
17
|
write: readonly string[];
|
|
15
|
-
|
|
18
|
+
erase: readonly string[];
|
|
16
19
|
};
|
|
17
20
|
export type ReplicaAdmission = {
|
|
18
21
|
selection: string;
|
|
19
|
-
admission: 'admitted' | 'unavailable'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
operations: OperationScopes;
|
|
26
|
-
replica: ReplicaAdmission;
|
|
27
|
-
typedSelection
|
|
28
|
-
providerOwnedPaths: readonly string[];
|
|
22
|
+
admission: Open<'admitted' | 'unavailable'>;
|
|
23
|
+
offline: Open<'locked' | 'open'>;
|
|
24
|
+
};
|
|
25
|
+
export type RoomDeclaration = {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly handle: string;
|
|
28
|
+
readonly operations: OperationScopes;
|
|
29
|
+
readonly replica: ReplicaAdmission;
|
|
30
|
+
readonly typedSelection: TypedSelection | null;
|
|
31
|
+
readonly providerOwnedPaths: readonly string[];
|
|
32
|
+
readonly authoredPaths: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
export type DiscoveredRoom = RoomDeclaration & {
|
|
35
|
+
readonly locator: string;
|
|
36
|
+
readonly roomVersion: string;
|
|
29
37
|
};
|
|
30
38
|
export type Capability = {
|
|
31
39
|
name: string;
|
|
32
40
|
limits?: readonly ProviderLimit[];
|
|
33
41
|
actions?: readonly ActionDeclaration[];
|
|
34
|
-
conversationAgents?: ConversationAgents;
|
|
35
|
-
};
|
|
36
|
-
export type ConversationAgents = {
|
|
37
|
-
locator: string;
|
|
38
|
-
type: string;
|
|
39
|
-
identity: string;
|
|
40
|
-
name: string;
|
|
41
42
|
};
|
|
42
43
|
export type ListedConversation = {
|
|
43
44
|
conversation: string;
|
|
44
45
|
agent: string;
|
|
45
46
|
name: string;
|
|
46
47
|
created: string;
|
|
47
|
-
finished: string | null;
|
|
48
48
|
outcome: string | null;
|
|
49
|
+
waiting: boolean;
|
|
50
|
+
newest: string | null;
|
|
51
|
+
processEnded: string | null;
|
|
52
|
+
subject: string | null;
|
|
53
|
+
room: string | null;
|
|
49
54
|
};
|
|
50
|
-
export type ConversationAction = '
|
|
55
|
+
export type ConversationAction = 'conversations/create' | 'conversations/send' | 'conversations/interaction/answer' | 'conversations/interrupt' | 'conversations/kill' | 'conversations/delete' | 'conversations/take-out' | 'conversations/rename' | 'conversations/set' | 'conversations/retry' | 'agent-functions/decide';
|
|
51
56
|
export type ConversationMessage = {
|
|
52
57
|
identity: string;
|
|
53
58
|
turn: string;
|
|
@@ -56,6 +61,7 @@ export type ConversationMessage = {
|
|
|
56
61
|
};
|
|
57
62
|
export type AcceptedMessage = ConversationMessage & {
|
|
58
63
|
position: string;
|
|
64
|
+
change: string;
|
|
59
65
|
};
|
|
60
66
|
export type ConversationHistoryRequest = {
|
|
61
67
|
conversations: readonly {
|
|
@@ -71,37 +77,10 @@ export type ConversationHistoryPage = {
|
|
|
71
77
|
export type ConversationHistories = {
|
|
72
78
|
histories: readonly ConversationHistoryPage[];
|
|
73
79
|
};
|
|
74
|
-
export type TurnContext = {
|
|
75
|
-
used: number;
|
|
76
|
-
window: number;
|
|
77
|
-
};
|
|
78
80
|
export type TurnOperation = {
|
|
79
81
|
op: 'begin';
|
|
80
82
|
at: string;
|
|
81
|
-
} |
|
|
82
|
-
op: 'start';
|
|
83
|
-
index: number;
|
|
84
|
-
part: unknown;
|
|
85
|
-
} | {
|
|
86
|
-
op: 'append';
|
|
87
|
-
index: number;
|
|
88
|
-
text: string;
|
|
89
|
-
} | {
|
|
90
|
-
op: 'status';
|
|
91
|
-
index: number;
|
|
92
|
-
status: string;
|
|
93
|
-
result: unknown;
|
|
94
|
-
} | {
|
|
95
|
-
op: 'count';
|
|
96
|
-
index: number;
|
|
97
|
-
count: number;
|
|
98
|
-
} | {
|
|
99
|
-
op: 'plan';
|
|
100
|
-
index: number;
|
|
101
|
-
entries: readonly unknown[];
|
|
102
|
-
} | ({
|
|
103
|
-
op: 'context';
|
|
104
|
-
} & TurnContext);
|
|
83
|
+
} | Operation;
|
|
105
84
|
export type ProcessCommand = {
|
|
106
85
|
[field: string]: unknown;
|
|
107
86
|
name: string;
|
|
@@ -159,6 +138,19 @@ export type ConversationEvent = {
|
|
|
159
138
|
kind: 'options';
|
|
160
139
|
conversation: string;
|
|
161
140
|
options: readonly SessionOption[];
|
|
141
|
+
} | {
|
|
142
|
+
kind: 'starting';
|
|
143
|
+
conversation: string;
|
|
144
|
+
step: string | null;
|
|
145
|
+
} | {
|
|
146
|
+
kind: 'state';
|
|
147
|
+
conversation: string;
|
|
148
|
+
state: SessionState | null;
|
|
149
|
+
} | {
|
|
150
|
+
kind: 'deliveries';
|
|
151
|
+
conversation: string;
|
|
152
|
+
waiting: readonly string[];
|
|
153
|
+
unknown: readonly string[];
|
|
162
154
|
} | {
|
|
163
155
|
kind: 'accepted-message';
|
|
164
156
|
conversation: string;
|
|
@@ -168,22 +160,84 @@ export type ConversationEvent = {
|
|
|
168
160
|
conversation: string;
|
|
169
161
|
} | {
|
|
170
162
|
kind: 'list';
|
|
163
|
+
agents: readonly ListedAgent[];
|
|
171
164
|
entries: readonly ListedConversation[];
|
|
165
|
+
whole: boolean;
|
|
166
|
+
more: boolean;
|
|
167
|
+
cursor: string | null;
|
|
172
168
|
} | {
|
|
173
169
|
kind: 'listed';
|
|
174
170
|
entry: ListedConversation;
|
|
171
|
+
} | {
|
|
172
|
+
kind: 'agent';
|
|
173
|
+
agent: ListedAgent;
|
|
175
174
|
} | {
|
|
176
175
|
kind: 'unlisted';
|
|
177
176
|
conversation: string;
|
|
178
177
|
};
|
|
178
|
+
export type AgentEnvironment = {
|
|
179
|
+
identity: string;
|
|
180
|
+
name: string;
|
|
181
|
+
state: 'online' | 'offline';
|
|
182
|
+
};
|
|
183
|
+
export type ListedOwner = {
|
|
184
|
+
readonly user: string;
|
|
185
|
+
readonly name: string;
|
|
186
|
+
};
|
|
187
|
+
export type ListedSpaceRef = {
|
|
188
|
+
readonly space_ref: string;
|
|
189
|
+
readonly name: string;
|
|
190
|
+
};
|
|
191
|
+
export type RoomListEntry = {
|
|
192
|
+
readonly room_ref: string;
|
|
193
|
+
readonly room_handle: string;
|
|
194
|
+
readonly name: string;
|
|
195
|
+
readonly level: 'search' | 'open' | 'keep';
|
|
196
|
+
readonly access: 'owner' | 'manage' | 'write' | 'read' | 'public';
|
|
197
|
+
readonly owner: ListedOwner;
|
|
198
|
+
readonly created: string;
|
|
199
|
+
readonly archived?: string;
|
|
200
|
+
readonly exportable?: true;
|
|
201
|
+
readonly space?: ListedSpaceRef;
|
|
202
|
+
};
|
|
203
|
+
export type SpaceListEntry = ListedSpaceRef & {
|
|
204
|
+
readonly owner: ListedOwner;
|
|
205
|
+
readonly created: string;
|
|
206
|
+
readonly manages?: true;
|
|
207
|
+
};
|
|
208
|
+
export type RoomList = {
|
|
209
|
+
readonly rooms: readonly RoomListEntry[];
|
|
210
|
+
readonly spaces: readonly SpaceListEntry[];
|
|
211
|
+
};
|
|
212
|
+
export type ListedAgent = {
|
|
213
|
+
id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
revision: number;
|
|
216
|
+
environment: string;
|
|
217
|
+
environment_name: string;
|
|
218
|
+
environment_connected: boolean;
|
|
219
|
+
launch_directory: string;
|
|
220
|
+
cli: string;
|
|
221
|
+
model: string | null;
|
|
222
|
+
effort: string | null;
|
|
223
|
+
mode: string | null;
|
|
224
|
+
base_instructions: string;
|
|
225
|
+
in_telegram: boolean;
|
|
226
|
+
created: string;
|
|
227
|
+
retired_at: string | null;
|
|
228
|
+
};
|
|
179
229
|
export type ConversationStream = {
|
|
180
230
|
replicate(conversations: readonly string[]): void;
|
|
231
|
+
hold(cursor: string | null): void;
|
|
181
232
|
observe(notify: (event: ConversationEvent) => void): () => void;
|
|
233
|
+
history?(request: ConversationHistoryRequest): Promise<ActionResult>;
|
|
182
234
|
};
|
|
183
235
|
export type ActionDeclaration = {
|
|
184
236
|
name: string;
|
|
185
237
|
inputShape: unknown;
|
|
186
238
|
resultKind: unknown;
|
|
239
|
+
room?: string;
|
|
240
|
+
roomPaths?: readonly string[];
|
|
187
241
|
};
|
|
188
242
|
export type ProviderLimit = {
|
|
189
243
|
name: string;
|
|
@@ -197,18 +251,27 @@ export type HistoryRetention = {
|
|
|
197
251
|
};
|
|
198
252
|
export type Retention = {
|
|
199
253
|
history: HistoryRetention;
|
|
200
|
-
outcome: number;
|
|
201
254
|
refreshHorizon: number;
|
|
202
255
|
};
|
|
256
|
+
export type QueriedRoom = {
|
|
257
|
+
readonly locator: string;
|
|
258
|
+
readonly handle: string;
|
|
259
|
+
readonly name: string;
|
|
260
|
+
};
|
|
203
261
|
export type Discovery = {
|
|
204
262
|
kind: 'discovery';
|
|
205
263
|
rooms: readonly DiscoveredRoom[];
|
|
206
264
|
capabilities: readonly Capability[];
|
|
207
265
|
providerLimits: readonly ProviderLimit[];
|
|
208
266
|
retention: Retention;
|
|
267
|
+
member?: Member;
|
|
268
|
+
timeZone?: string | null;
|
|
269
|
+
roomList?: RoomList;
|
|
270
|
+
queriesOnly?: readonly QueriedRoom[];
|
|
209
271
|
};
|
|
210
272
|
export type TransportUncertainty = {
|
|
211
273
|
kind: 'transport-uncertainty';
|
|
274
|
+
failure?: unknown;
|
|
212
275
|
};
|
|
213
276
|
export type RoomNotReadable = {
|
|
214
277
|
kind: 'room-not-readable';
|
|
@@ -220,11 +283,12 @@ export type RevokedAuthorization = {
|
|
|
220
283
|
export type ProviderRefusal = {
|
|
221
284
|
code: string;
|
|
222
285
|
fields: Readonly<Record<string, unknown>>;
|
|
286
|
+
retryable: boolean;
|
|
223
287
|
};
|
|
224
288
|
export type ScopedRefusal = ProviderRefusal & {
|
|
225
289
|
kind: 'scoped-refusal';
|
|
226
290
|
locator: string;
|
|
227
|
-
scope: 'content' | '
|
|
291
|
+
scope: Open<'content' | 'model' | 'operation' | 'undisclosed'>;
|
|
228
292
|
};
|
|
229
293
|
export type AdapterFailure = TransportUncertainty | RoomNotReadable | RevokedAuthorization | ScopedRefusal;
|
|
230
294
|
export type ContractUnavailable = ProviderRefusal & {
|
|
@@ -233,11 +297,12 @@ export type ContractUnavailable = ProviderRefusal & {
|
|
|
233
297
|
export type DiscoverResult = Discovery | TransportUncertainty | RevokedAuthorization | ContractUnavailable;
|
|
234
298
|
export type PageToken = string;
|
|
235
299
|
export type ChangeAuthor = {
|
|
236
|
-
kind: 'user'
|
|
300
|
+
kind: Open<'user' | 'site' | 'inbox' | 'app'>;
|
|
237
301
|
id: string;
|
|
238
302
|
name: string;
|
|
239
|
-
}
|
|
240
|
-
|
|
303
|
+
};
|
|
304
|
+
export type Member = {
|
|
305
|
+
kind: Open<'user'>;
|
|
241
306
|
id: string;
|
|
242
307
|
name: string;
|
|
243
308
|
};
|
|
@@ -245,34 +310,52 @@ export type HeadChange = {
|
|
|
245
310
|
author: ChangeAuthor | null;
|
|
246
311
|
time: string;
|
|
247
312
|
};
|
|
248
|
-
export type
|
|
249
|
-
reference: string;
|
|
250
|
-
name: string;
|
|
313
|
+
export type Attachment = {
|
|
251
314
|
byteLength: number;
|
|
252
|
-
mediaType: string
|
|
253
|
-
|
|
315
|
+
mediaType: string;
|
|
316
|
+
sha256: string;
|
|
317
|
+
width?: number | null;
|
|
318
|
+
height?: number | null;
|
|
254
319
|
};
|
|
255
320
|
export type BootstrapRequest = {
|
|
256
321
|
locator: string;
|
|
257
322
|
selection: string;
|
|
258
323
|
pageToken?: PageToken;
|
|
324
|
+
arriving?: (bytes: number) => void;
|
|
325
|
+
signal?: AbortSignal;
|
|
326
|
+
};
|
|
327
|
+
export type BootstrapPart = {
|
|
328
|
+
readonly id: string;
|
|
329
|
+
readonly bytes: number;
|
|
330
|
+
};
|
|
331
|
+
export type BootstrapInventory = {
|
|
332
|
+
readonly bytes: number;
|
|
259
333
|
};
|
|
260
334
|
export type RoomModels = {
|
|
261
335
|
collection?: ModelResult;
|
|
262
|
-
selection?: ModelResult;
|
|
263
336
|
};
|
|
264
337
|
export type BootstrapPage = {
|
|
265
338
|
kind: 'bootstrap';
|
|
266
339
|
roomVersion: string;
|
|
267
340
|
models?: RoomModels;
|
|
268
341
|
documents: Readonly<Record<string, string>>;
|
|
342
|
+
facts: Readonly<Record<string, SavedFacts>>;
|
|
269
343
|
revisions: Readonly<Record<string, string>>;
|
|
344
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
345
|
+
created?: Readonly<Record<string, string>>;
|
|
270
346
|
changes: Readonly<Record<string, HeadChange>>;
|
|
271
|
-
|
|
272
|
-
|
|
347
|
+
attachments: Readonly<Record<string, Attachment>>;
|
|
348
|
+
folders?: readonly string[];
|
|
273
349
|
pageToken?: PageToken;
|
|
350
|
+
parts?: readonly BootstrapPart[];
|
|
351
|
+
bytes?: number;
|
|
352
|
+
};
|
|
353
|
+
export type NotReady = {
|
|
354
|
+
kind: 'not-ready';
|
|
274
355
|
};
|
|
275
|
-
export type BootstrapResult = BootstrapPage |
|
|
356
|
+
export type BootstrapResult = BootstrapPage | {
|
|
357
|
+
kind: 'beyond-horizon';
|
|
358
|
+
} | NotReady | AdapterFailure;
|
|
276
359
|
export type RefreshRequest = {
|
|
277
360
|
locator: string;
|
|
278
361
|
selection: string;
|
|
@@ -284,11 +367,15 @@ export type RefreshPage = {
|
|
|
284
367
|
roomVersion: string;
|
|
285
368
|
models?: RoomModels;
|
|
286
369
|
documents: Readonly<Record<string, string>>;
|
|
370
|
+
facts: Readonly<Record<string, SavedFacts>>;
|
|
287
371
|
revisions: Readonly<Record<string, string>>;
|
|
372
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
373
|
+
created?: Readonly<Record<string, string>>;
|
|
288
374
|
changes: Readonly<Record<string, HeadChange>>;
|
|
289
|
-
|
|
375
|
+
attachments: Readonly<Record<string, Attachment>>;
|
|
290
376
|
removals: readonly string[];
|
|
291
|
-
|
|
377
|
+
folders?: readonly string[];
|
|
378
|
+
folderRemovals?: readonly string[];
|
|
292
379
|
pageToken?: PageToken;
|
|
293
380
|
};
|
|
294
381
|
export type RefreshResult = {
|
|
@@ -299,42 +386,40 @@ export type RefreshResult = {
|
|
|
299
386
|
export type MutationRequest = {
|
|
300
387
|
locator: string;
|
|
301
388
|
changeBatch: ChangeBatch;
|
|
389
|
+
file(localId: string): Promise<Blob>;
|
|
302
390
|
upload?: unknown;
|
|
303
391
|
};
|
|
304
392
|
export type RetryableRefusal = ProviderRefusal & {
|
|
305
393
|
kind: 'retryable-refusal';
|
|
306
394
|
reset?: string;
|
|
307
395
|
};
|
|
308
|
-
export type ServiceMode = 'open' | 'write-halted'
|
|
396
|
+
export type ServiceMode = Open<'open' | 'write-halted'>;
|
|
309
397
|
export type ServiceModeSignal = {
|
|
310
398
|
observe(notify: (mode: ServiceMode) => void): () => void;
|
|
311
399
|
};
|
|
312
|
-
export type
|
|
313
|
-
kind: 'accepted';
|
|
400
|
+
export type AcceptedRoom = {
|
|
314
401
|
roomVersion: string;
|
|
315
402
|
documents: Readonly<Record<string, string>>;
|
|
316
403
|
revisions: Readonly<Record<string, string>>;
|
|
404
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
405
|
+
changes: Readonly<Record<string, HeadChange>>;
|
|
317
406
|
removals: readonly string[];
|
|
318
|
-
attachments?:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
407
|
+
attachments?: Readonly<Record<string, Attachment>>;
|
|
408
|
+
};
|
|
409
|
+
export type MutationResult = (AcceptedRoom & {
|
|
410
|
+
kind: 'accepted';
|
|
411
|
+
destination?: AcceptedRoom;
|
|
412
|
+
}) | (ProviderRefusal & {
|
|
322
413
|
kind: 'conflicted';
|
|
323
|
-
roomVersion?: string;
|
|
324
414
|
affected: Readonly<Record<string, string>>;
|
|
325
415
|
}) | (ProviderRefusal & {
|
|
326
416
|
kind: 'rejected';
|
|
327
417
|
affected: Readonly<Record<string, string>>;
|
|
328
418
|
}) | RetryableRefusal | {
|
|
329
419
|
kind: 'write-halted';
|
|
330
|
-
} | {
|
|
331
|
-
kind: 'expired';
|
|
332
420
|
} | AdapterFailure;
|
|
333
421
|
export type HistoryAuthor = {
|
|
334
|
-
kind: 'user';
|
|
335
|
-
id: string;
|
|
336
|
-
} | {
|
|
337
|
-
kind: 'site';
|
|
422
|
+
kind: 'user' | 'site' | 'inbox' | 'app';
|
|
338
423
|
id: string;
|
|
339
424
|
name: string;
|
|
340
425
|
};
|
|
@@ -342,6 +427,7 @@ export type HistoryRevision = {
|
|
|
342
427
|
revision: string;
|
|
343
428
|
author: HistoryAuthor;
|
|
344
429
|
time: string;
|
|
430
|
+
attachment?: Attachment;
|
|
345
431
|
};
|
|
346
432
|
export type HistoryRequest = {
|
|
347
433
|
locator: string;
|
|
@@ -353,12 +439,63 @@ export type HistoryResult = {
|
|
|
353
439
|
kind: 'history';
|
|
354
440
|
revisions: readonly HistoryRevision[];
|
|
355
441
|
pageToken?: PageToken;
|
|
442
|
+
deleted?: true;
|
|
356
443
|
} | {
|
|
357
444
|
kind: 'revision';
|
|
358
445
|
content: string;
|
|
359
446
|
} | {
|
|
360
447
|
kind: 'no-history';
|
|
361
448
|
} | AdapterFailure;
|
|
449
|
+
export type BinaryRequest = {
|
|
450
|
+
kind: 'path';
|
|
451
|
+
locator: string;
|
|
452
|
+
path: string;
|
|
453
|
+
revision: string;
|
|
454
|
+
};
|
|
455
|
+
export type KeyedRequest = {
|
|
456
|
+
kind: 'key';
|
|
457
|
+
link: string;
|
|
458
|
+
};
|
|
459
|
+
export type BinaryCopy = {
|
|
460
|
+
url: string;
|
|
461
|
+
width: number;
|
|
462
|
+
};
|
|
463
|
+
export type BinaryResult = {
|
|
464
|
+
kind: 'binary';
|
|
465
|
+
body: ReadableStream<Uint8Array>;
|
|
466
|
+
mediaType: string;
|
|
467
|
+
sha256?: string;
|
|
468
|
+
url?: string;
|
|
469
|
+
copies?: readonly BinaryCopy[];
|
|
470
|
+
} | (ProviderRefusal & {
|
|
471
|
+
kind: 'rejected';
|
|
472
|
+
}) | AdapterFailure;
|
|
473
|
+
export type BinaryLinkResult = {
|
|
474
|
+
kind: 'link';
|
|
475
|
+
url: string;
|
|
476
|
+
name: string;
|
|
477
|
+
mediaType?: string;
|
|
478
|
+
} | (ProviderRefusal & {
|
|
479
|
+
kind: 'rejected';
|
|
480
|
+
}) | AdapterFailure;
|
|
481
|
+
export type AttachRequest = {
|
|
482
|
+
locator?: string;
|
|
483
|
+
name: string;
|
|
484
|
+
mediaType: string;
|
|
485
|
+
byteLength: number;
|
|
486
|
+
sha256: string;
|
|
487
|
+
blob: Blob;
|
|
488
|
+
};
|
|
489
|
+
export type AttachResult = {
|
|
490
|
+
kind: 'attached';
|
|
491
|
+
path: string;
|
|
492
|
+
revision: string;
|
|
493
|
+
} | {
|
|
494
|
+
kind: 'linked';
|
|
495
|
+
link: string;
|
|
496
|
+
} | (ProviderRefusal & {
|
|
497
|
+
kind: 'rejected';
|
|
498
|
+
}) | AdapterFailure;
|
|
362
499
|
export type ActionRequest = {
|
|
363
500
|
name: string;
|
|
364
501
|
input: unknown;
|
|
@@ -371,46 +508,119 @@ export type ActionResult = {
|
|
|
371
508
|
kind: 'action';
|
|
372
509
|
result: unknown;
|
|
373
510
|
at?: RoomVersionAt;
|
|
511
|
+
} | (ProviderRefusal & {
|
|
512
|
+
kind: 'rejected';
|
|
513
|
+
reset?: string;
|
|
514
|
+
}) | AdapterFailure;
|
|
515
|
+
export type SearchHit = {
|
|
516
|
+
room: string;
|
|
517
|
+
path: string;
|
|
518
|
+
line?: number;
|
|
519
|
+
snippet?: string;
|
|
520
|
+
};
|
|
521
|
+
export type SearchAsk = {
|
|
522
|
+
text: string;
|
|
523
|
+
rooms: readonly string[] | null;
|
|
524
|
+
};
|
|
525
|
+
export type SearchAnswer = {
|
|
526
|
+
kind: 'found';
|
|
527
|
+
documents: readonly SearchHit[];
|
|
374
528
|
} | (ProviderRefusal & {
|
|
375
529
|
kind: 'rejected';
|
|
376
530
|
}) | AdapterFailure;
|
|
531
|
+
export type HouseQueryAsk = {
|
|
532
|
+
room: string;
|
|
533
|
+
fresh: boolean;
|
|
534
|
+
follows?: readonly string[];
|
|
535
|
+
} & ({
|
|
536
|
+
query: Readonly<Record<string, unknown>>;
|
|
537
|
+
} | {
|
|
538
|
+
path: string;
|
|
539
|
+
after?: string;
|
|
540
|
+
});
|
|
541
|
+
export type HouseQueryRows = {
|
|
542
|
+
kind: 'rows';
|
|
543
|
+
documents: readonly QueryDocument[];
|
|
544
|
+
next?: string;
|
|
545
|
+
total?: number;
|
|
546
|
+
totalCapped?: true;
|
|
547
|
+
};
|
|
548
|
+
export type HouseQueryGroups = {
|
|
549
|
+
kind: 'groups';
|
|
550
|
+
groups: readonly QueryGroup[];
|
|
551
|
+
next?: string;
|
|
552
|
+
capped?: true;
|
|
553
|
+
};
|
|
554
|
+
export type HouseQueryAnswer = HouseQueryRows | HouseQueryGroups | (ProviderRefusal & {
|
|
555
|
+
kind: 'rejected';
|
|
556
|
+
}) | AdapterFailure;
|
|
377
557
|
export type HeldRoom = {
|
|
378
558
|
locator: string;
|
|
559
|
+
roomVersion: string | null;
|
|
560
|
+
};
|
|
561
|
+
export type RoomChange = {
|
|
562
|
+
kind: 'room-change';
|
|
563
|
+
locator: string;
|
|
564
|
+
from: string | null;
|
|
379
565
|
roomVersion: string;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
566
|
+
read(): Promise<RefreshPage>;
|
|
567
|
+
};
|
|
568
|
+
export type AuthorityChange = {
|
|
569
|
+
kind: 'authority-changed';
|
|
570
|
+
rooms: readonly DiscoveredRoom[];
|
|
571
|
+
left: readonly string[];
|
|
572
|
+
member?: Member;
|
|
573
|
+
timeZone?: string | null;
|
|
574
|
+
roomList?: RoomList & {
|
|
575
|
+
readonly left: readonly string[];
|
|
576
|
+
};
|
|
383
577
|
};
|
|
384
578
|
export type RoomStreamEvent = {
|
|
385
579
|
kind: 'opened';
|
|
580
|
+
} | {
|
|
581
|
+
kind: 'discovered';
|
|
582
|
+
discovery: Discovery;
|
|
386
583
|
} | {
|
|
387
584
|
kind: 'closed';
|
|
388
585
|
revoked: boolean;
|
|
586
|
+
lost: boolean;
|
|
587
|
+
authorityChanged: boolean;
|
|
389
588
|
} | {
|
|
390
|
-
kind: '
|
|
589
|
+
kind: 'caught-up';
|
|
391
590
|
expired: readonly string[];
|
|
392
591
|
} | {
|
|
393
|
-
kind: '
|
|
394
|
-
|
|
395
|
-
roomVersion: string;
|
|
396
|
-
};
|
|
592
|
+
kind: 'reported';
|
|
593
|
+
} | AuthorityChange | RoomChange;
|
|
397
594
|
export type RoomStream = {
|
|
398
595
|
hold(rooms: readonly HeldRoom[]): void;
|
|
399
596
|
observe(notify: (event: RoomStreamEvent) => void): () => void;
|
|
400
597
|
};
|
|
598
|
+
export type PathRule = (path: string) => boolean;
|
|
401
599
|
export type Adapter = {
|
|
600
|
+
readonly localSaves?: true;
|
|
601
|
+
readonly roomTypes?: VerifiedModel;
|
|
602
|
+
readonly typedPaths?: readonly TypedPath[];
|
|
603
|
+
readonly pathRule?: PathRule;
|
|
604
|
+
readonly unkeptReads?: readonly string[];
|
|
605
|
+
readonly leadingReads?: readonly string[];
|
|
606
|
+
readonly renamedActions?: ReadonlyMap<string, string>;
|
|
607
|
+
readonly rewrittenInputs?: ReadonlyMap<string, (input: unknown) => unknown>;
|
|
402
608
|
authorize(): Promise<Authorization>;
|
|
403
|
-
discover(authorization: Authorization): Promise<DiscoverResult>;
|
|
609
|
+
discover?(authorization: Authorization): Promise<DiscoverResult>;
|
|
404
610
|
bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
|
|
405
|
-
refresh(authorization: Authorization, request: RefreshRequest): Promise<RefreshResult>;
|
|
611
|
+
refresh?(authorization: Authorization, request: RefreshRequest): Promise<RefreshResult>;
|
|
406
612
|
mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
|
|
407
613
|
history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
|
|
614
|
+
binary(authorization: Authorization, request: BinaryRequest): Promise<BinaryResult>;
|
|
615
|
+
link(authorization: Authorization, request: BinaryRequest | KeyedRequest): Promise<BinaryLinkResult>;
|
|
616
|
+
attach(authorization: Authorization, request: AttachRequest): Promise<AttachResult>;
|
|
408
617
|
action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
|
|
618
|
+
search?(authorization: Authorization, request: SearchAsk): Promise<SearchAnswer>;
|
|
619
|
+
queryHouse?(authorization: Authorization, request: HouseQueryAsk): Promise<HouseQueryAnswer>;
|
|
409
620
|
reached(locator: string, roomVersion: string, target: string): boolean;
|
|
410
621
|
follows(locator: string, roomVersion: string, next: string): boolean;
|
|
411
622
|
roomStream?: RoomStream;
|
|
412
623
|
conversations?: ConversationStream;
|
|
413
624
|
serviceMode?: ServiceModeSignal;
|
|
414
625
|
};
|
|
415
|
-
export {};
|
|
416
626
|
//# sourceMappingURL=adapter.d.ts.map
|