dsh-plugin-dshm 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +228 -2
- package/README.zh-CN.md +190 -0
- package/cordis.patch.yml +7 -0
- package/lib/auth/signature.d.ts +4 -0
- package/lib/auth/signature.js +24 -0
- package/lib/cli/index.d.ts +4 -0
- package/lib/cli/index.js +41 -0
- package/lib/client.js +419 -0
- package/lib/config.d.ts +10 -0
- package/lib/config.js +27 -0
- package/lib/discovery/advertiser.d.ts +45 -0
- package/lib/discovery/advertiser.js +141 -0
- package/lib/discovery/interfaces.d.ts +5 -0
- package/lib/discovery/interfaces.js +24 -0
- package/lib/errors.d.ts +5 -0
- package/lib/errors.js +10 -0
- package/lib/host/local.d.ts +5 -0
- package/lib/host/local.js +122 -0
- package/lib/host/tailscale.d.ts +43 -0
- package/lib/host/tailscale.js +137 -0
- package/lib/host/types.d.ts +40 -0
- package/lib/host/types.js +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +98 -0
- package/lib/methods/index.d.ts +9 -0
- package/lib/methods/index.js +206 -0
- package/lib/pairing/state.d.ts +26 -0
- package/lib/pairing/state.js +89 -0
- package/lib/pairing/window.d.ts +18 -0
- package/lib/pairing/window.js +57 -0
- package/lib/projection/client.d.mts +2 -0
- package/lib/projection/client.mjs +11 -0
- package/lib/projection/files.d.ts +33 -0
- package/lib/projection/files.js +278 -0
- package/lib/projection/fold-recording.d.mts +50 -0
- package/lib/projection/fold-recording.mjs +440 -0
- package/lib/projection/host.d.ts +6 -0
- package/lib/projection/host.js +86 -0
- package/lib/projection/ids.d.mts +1 -0
- package/lib/projection/ids.mjs +1 -0
- package/lib/projection/index.d.ts +2 -0
- package/lib/projection/index.js +2 -0
- package/lib/projection/interactions.d.ts +10 -0
- package/lib/projection/interactions.js +73 -0
- package/lib/projection/native.d.ts +114 -0
- package/lib/projection/native.js +903 -0
- package/lib/protocol/THIRD_PARTY_LICENSES.txt +135 -0
- package/lib/protocol/dmp.d.ts +402 -0
- package/lib/protocol/dmp.js +1 -0
- package/lib/protocol/schema/dmp-v1/common.schema.json +88 -0
- package/lib/protocol/schema/dmp-v1/events.schema.json +107 -0
- package/lib/protocol/schema/dmp-v1/frames.schema.json +280 -0
- package/lib/protocol/schema/dmp-v1/methods.schema.json +584 -0
- package/lib/protocol/schema/dmp-v1/models.schema.json +674 -0
- package/lib/protocol/scripts/contract.mjs +8106 -0
- package/lib/push/controller.d.ts +64 -0
- package/lib/push/controller.js +290 -0
- package/lib/push/observer.d.ts +51 -0
- package/lib/push/observer.js +266 -0
- package/lib/push/payload.d.ts +15 -0
- package/lib/push/payload.js +18 -0
- package/lib/push/store.d.ts +17 -0
- package/lib/push/store.js +75 -0
- package/lib/server/index.d.ts +30 -0
- package/lib/server/index.js +500 -0
- package/lib/server/rate-limit.d.ts +7 -0
- package/lib/server/rate-limit.js +19 -0
- package/lib/server/uploads.d.ts +21 -0
- package/lib/server/uploads.js +74 -0
- package/lib/types.d.ts +92 -0
- package/lib/types.js +1 -0
- package/lib/ui/card.d.mts +3 -0
- package/lib/ui/card.mjs +59 -0
- package/lib/ui/copy.d.mts +146 -0
- package/lib/ui/copy.mjs +106 -0
- package/lib/ui/remote-setup.d.mts +81 -0
- package/lib/ui/remote-setup.mjs +75 -0
- package/package.json +67 -4
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
ajv 8.17.1
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
ajv-formats 3.0.1
|
|
29
|
+
MIT License
|
|
30
|
+
|
|
31
|
+
Copyright (c) 2020 Evgeny Poberezkin
|
|
32
|
+
|
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
34
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
35
|
+
in the Software without restriction, including without limitation the rights
|
|
36
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
37
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
38
|
+
furnished to do so, subject to the following conditions:
|
|
39
|
+
|
|
40
|
+
The above copyright notice and this permission notice shall be included in all
|
|
41
|
+
copies or substantial portions of the Software.
|
|
42
|
+
|
|
43
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
44
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
45
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
46
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
47
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
48
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
49
|
+
SOFTWARE.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
fast-deep-equal 3.1.3
|
|
55
|
+
MIT License
|
|
56
|
+
|
|
57
|
+
Copyright (c) 2017 Evgeny Poberezkin
|
|
58
|
+
|
|
59
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
60
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
61
|
+
in the Software without restriction, including without limitation the rights
|
|
62
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
63
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
64
|
+
furnished to do so, subject to the following conditions:
|
|
65
|
+
|
|
66
|
+
The above copyright notice and this permission notice shall be included in all
|
|
67
|
+
copies or substantial portions of the Software.
|
|
68
|
+
|
|
69
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
70
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
71
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
72
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
73
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
74
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
75
|
+
SOFTWARE.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
fast-uri 3.1.9
|
|
81
|
+
Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
|
|
82
|
+
Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
83
|
+
All rights reserved.
|
|
84
|
+
|
|
85
|
+
Redistribution and use in source and binary forms, with or without
|
|
86
|
+
modification, are permitted provided that the following conditions are met:
|
|
87
|
+
* Redistributions of source code must retain the above copyright
|
|
88
|
+
notice, this list of conditions and the following disclaimer.
|
|
89
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
90
|
+
notice, this list of conditions and the following disclaimer in the
|
|
91
|
+
documentation and/or other materials provided with the distribution.
|
|
92
|
+
* The names of any contributors may not be used to endorse or promote
|
|
93
|
+
products derived from this software without specific prior written
|
|
94
|
+
permission.
|
|
95
|
+
|
|
96
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
97
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
98
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
99
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
|
|
100
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
101
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
102
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
103
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
104
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
105
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
106
|
+
|
|
107
|
+
* * *
|
|
108
|
+
|
|
109
|
+
The complete list of contributors can be found at:
|
|
110
|
+
- https://github.com/garycourt/uri-js/graphs/contributors
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
json-schema-traverse 1.0.0
|
|
115
|
+
MIT License
|
|
116
|
+
|
|
117
|
+
Copyright (c) 2017 Evgeny Poberezkin
|
|
118
|
+
|
|
119
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
120
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
121
|
+
in the Software without restriction, including without limitation the rights
|
|
122
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
123
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
124
|
+
furnished to do so, subject to the following conditions:
|
|
125
|
+
|
|
126
|
+
The above copyright notice and this permission notice shall be included in all
|
|
127
|
+
copies or substantial portions of the Software.
|
|
128
|
+
|
|
129
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
130
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
131
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
132
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
133
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
134
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
135
|
+
SOFTWARE.
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
// Generated by protocol/scripts/generate.mjs. Do not edit.
|
|
2
|
+
// Schema SHA-256: 5293e9a818170e796653c3dcda5de84aadf198e57bd005ab63f54d06d90dd8c7
|
|
3
|
+
|
|
4
|
+
export type JSONValue = null | boolean | number | string | JSONValue[] | { [key: string]: JSONValue };
|
|
5
|
+
|
|
6
|
+
export type Id = string;
|
|
7
|
+
|
|
8
|
+
export type Timestamp = string;
|
|
9
|
+
|
|
10
|
+
export type Seq = number;
|
|
11
|
+
|
|
12
|
+
export type Base64 = string;
|
|
13
|
+
|
|
14
|
+
export type Base64Url = string;
|
|
15
|
+
|
|
16
|
+
export type Uuid = string;
|
|
17
|
+
|
|
18
|
+
export type RelativePath = string;
|
|
19
|
+
|
|
20
|
+
export type ErrorCode = "bad-frame" | "version-unsupported" | "unauthorized" | "revoked" | "pairing-closed" | "bad-otp" | "unknown-method" | "unsupported" | "invalid-params" | "not-found" | "expired" | "conflict" | "busy" | "forbidden-path" | "too-large" | "dsh-unavailable" | "dsh-incompatible" | "cancelled" | "timeout" | "internal" | (string & {});
|
|
21
|
+
|
|
22
|
+
export type Error = { "code": ErrorCode; "message": string; "retryable": boolean; "details"?: Record<string, JSONValue>; };
|
|
23
|
+
|
|
24
|
+
export type Capability = "sessions" | "timeline" | "timeline.stream" | "send" | "send.steer" | "queue.edit" | "interactions.approval" | "interactions.question" | "model.select" | "permission.select" | "files.read" | "files.download" | "changes" | "deliverables" | "jobs" | "attachments" | "push" | "devices" | (string & {});
|
|
25
|
+
|
|
26
|
+
export type ModelSelection = { "provider": Id; "model": Id; "effort"?: string; };
|
|
27
|
+
|
|
28
|
+
export type Empty = { };
|
|
29
|
+
|
|
30
|
+
export type Accepted = { "accepted": true; };
|
|
31
|
+
|
|
32
|
+
export type WorkspaceUpsert = { "workspace": Workspace; };
|
|
33
|
+
|
|
34
|
+
export type WorkspaceRemove = { "workspaceId": Id; };
|
|
35
|
+
|
|
36
|
+
export type SessionUpsert = { "session": SessionSummary; };
|
|
37
|
+
|
|
38
|
+
export type SessionRemove = { "sessionId": Id; };
|
|
39
|
+
|
|
40
|
+
export type TimelineUpsert = { "item": TimelineItem; "throughSeq": Seq; };
|
|
41
|
+
|
|
42
|
+
export type TimelineRemove = { "itemId": Id; "throughSeq": Seq; };
|
|
43
|
+
|
|
44
|
+
export type TimelineDelta = { "itemId": Id; "field": "text"; "append": string; };
|
|
45
|
+
|
|
46
|
+
export type SessionUpdate = { "session": SessionDetail; };
|
|
47
|
+
|
|
48
|
+
export type InteractionOpen = { "interaction": Interaction; };
|
|
49
|
+
|
|
50
|
+
export type InteractionClose = { "interactionId": Id; "reason": "answered" | "cancelled" | "expired"; };
|
|
51
|
+
|
|
52
|
+
export type QueueUpdate = { "queue": Array<QueueItem>; };
|
|
53
|
+
|
|
54
|
+
export type SessionReset = { "reason": "rewritten" | "removed" | "dsh-restarted" | (string & {}); };
|
|
55
|
+
|
|
56
|
+
export type JobsReplace = { "jobs": Array<Job>; };
|
|
57
|
+
|
|
58
|
+
export type JobOutput = { "chunks": Array<JobChunk>; "next": number; };
|
|
59
|
+
|
|
60
|
+
export type JobStatus = { "job": Job; };
|
|
61
|
+
|
|
62
|
+
export type DevicesReplace = { "devices": Array<Device>; };
|
|
63
|
+
|
|
64
|
+
export type ServerFrame = (ServerHello) | (AuthChallenge) | (PairResult) | (AuthOk) | (Res) | (Ev) | (Err) | (StreamAck) | (StreamAbort) | (Ping) | (Pong);
|
|
65
|
+
|
|
66
|
+
export type ClientFrame = (ClientHello) | (PairRequest) | (AuthResponse) | (Req) | (Cancel) | (StreamAck) | (StreamAbort) | (Ping) | (Pong);
|
|
67
|
+
|
|
68
|
+
export type ServerHello = { "t": "hello"; "v": Array<number>; "host": HostInfo; "bridge": { "version": string; "instanceId": Id; }; "dsh": { "version"?: string; "status": "ok" | "incompatible" | "unavailable"; }; "caps": Array<Capability>; "limits": { "maxTextFrameBytes": number; "maxChunkBytes": number; "streamWindowBytes": number; }; };
|
|
69
|
+
|
|
70
|
+
export type ClientHello = { "t": "hello"; "v": number; "app": { "version": string; "build": string; "platform": "ios" | "ipados"; }; "caps"?: Array<string>; };
|
|
71
|
+
|
|
72
|
+
export type AuthChallenge = { "t": "auth.challenge"; "nonce": Base64Url; };
|
|
73
|
+
|
|
74
|
+
export type PairRequest = { "t": "pair.request"; "otp": Base64Url; "devicePublicKey": Base64; "deviceName": string; "deviceModel": string; "secureEnclave": boolean; };
|
|
75
|
+
|
|
76
|
+
export type PairResult = { "t": "pair.result"; "deviceId": Id; "hostId": Id; };
|
|
77
|
+
|
|
78
|
+
export type AuthResponse = { "t": "auth.response"; "deviceId": Id; "sig": Base64; };
|
|
79
|
+
|
|
80
|
+
export type AuthOk = { "t": "auth.ok"; "deviceId": Id; "connectionId": Id; "via": "lan" | "tailscale" | "other"; };
|
|
81
|
+
|
|
82
|
+
export type Req = { "t": "req"; "id": number; "method": string; "params": Record<string, JSONValue>; };
|
|
83
|
+
|
|
84
|
+
export type Res = ({ "t": "res"; "id": number; "ok": true; "result": Record<string, JSONValue>; }) | ({ "t": "res"; "id": number; "ok": false; "error": Error; });
|
|
85
|
+
|
|
86
|
+
export type Cancel = { "t": "cancel"; "id": number; };
|
|
87
|
+
|
|
88
|
+
export type Ev = { "t": "ev"; "sub": Id; "kind": string; "data": Record<string, JSONValue>; };
|
|
89
|
+
|
|
90
|
+
export type Err = { "t": "err"; "code": ErrorCode; "message": string; "retryable": boolean; };
|
|
91
|
+
|
|
92
|
+
export type StreamAck = { "t": "stream.ack"; "streamId": number; "bytes": number; };
|
|
93
|
+
|
|
94
|
+
export type StreamAbort = { "t": "stream.abort"; "streamId": number; "code": ErrorCode; };
|
|
95
|
+
|
|
96
|
+
export type Ping = { "t": "ping"; };
|
|
97
|
+
|
|
98
|
+
export type Pong = { "t": "pong"; };
|
|
99
|
+
|
|
100
|
+
export type SessionRef = { "sessionId": Id; };
|
|
101
|
+
|
|
102
|
+
export type Download = { "streamId": number; "size": number; "mime"?: string; "version"?: string; };
|
|
103
|
+
|
|
104
|
+
export type Cursor = { "throughSeq": Seq; };
|
|
105
|
+
|
|
106
|
+
export type HostInfoParams = Empty;
|
|
107
|
+
|
|
108
|
+
export type HostInfoResult = { "host": HostInfo; "bridgeVersion": string; "dshVersion"?: string; "dshStatus": "ok" | "incompatible" | "unavailable"; "caps": Array<Capability>; "time": Timestamp; };
|
|
109
|
+
|
|
110
|
+
export type UnsubscribeParams = { "subId": Id; };
|
|
111
|
+
|
|
112
|
+
export type UnsubscribeResult = Empty;
|
|
113
|
+
|
|
114
|
+
export type SessionsListParams = { "includeArchived"?: boolean; };
|
|
115
|
+
|
|
116
|
+
export type SessionsListResult = { "workspaces": Array<Workspace>; "sessions": Array<SessionSummary>; };
|
|
117
|
+
|
|
118
|
+
export type SessionsWatchParams = SessionsListParams;
|
|
119
|
+
|
|
120
|
+
export type SessionsWatchResult = { "subId": Id; "workspaces": Array<Workspace>; "sessions": Array<SessionSummary>; };
|
|
121
|
+
|
|
122
|
+
export type WorkspacesListParams = Empty;
|
|
123
|
+
|
|
124
|
+
export type WorkspacesListResult = { "workspaces": Array<Workspace>; };
|
|
125
|
+
|
|
126
|
+
export type SessionsCreateParams = { "workspaceId": Id; "sendId": Uuid; "text"?: string; };
|
|
127
|
+
|
|
128
|
+
export type SessionsCreateResult = { "sessionId": Id; };
|
|
129
|
+
|
|
130
|
+
export type SessionWatchParams = { "sessionId": Id; "sinceSeq"?: Seq; "window"?: { "turns"?: number; "minItems"?: number; }; };
|
|
131
|
+
|
|
132
|
+
export type SessionWatchResult = { "subId": Id; "session": SessionDetail; "items": Array<TimelineItem>; "removedItemIds": Array<Id>; "cursor": Cursor; "hasMoreBefore": boolean; "resumed": boolean; "interactions": Array<Interaction>; "queue": Array<QueueItem>; };
|
|
133
|
+
|
|
134
|
+
export type SessionHistoryParams = { "sessionId": Id; "beforeSeq": number; "throughSeq": Seq; "limit"?: number; };
|
|
135
|
+
|
|
136
|
+
export type SessionHistoryResult = { "items": Array<TimelineItem>; "hasMoreBefore": boolean; };
|
|
137
|
+
|
|
138
|
+
export type SessionSendParams = { "sessionId": Id; "sendId": Uuid; "text": string; "attachments"?: Array<Id>; "mode"?: "queue" | "steer"; };
|
|
139
|
+
|
|
140
|
+
export type SessionSendResult = Accepted;
|
|
141
|
+
|
|
142
|
+
export type SessionQueueUpdateParams = { "sessionId": Id; "queueItemId": Id; "action": "remove" | "steer" | "edit"; "text"?: string; };
|
|
143
|
+
|
|
144
|
+
export type SessionQueueUpdateResult = Accepted;
|
|
145
|
+
|
|
146
|
+
export type SessionInterruptParams = SessionRef;
|
|
147
|
+
|
|
148
|
+
export type SessionInterruptResult = Accepted;
|
|
149
|
+
|
|
150
|
+
export type SessionSetModelParams = { "sessionId": Id; "provider": Id; "model": Id; "effort"?: string; };
|
|
151
|
+
|
|
152
|
+
export type SessionSetModelResult = { "selected": ModelSelection; "defaultUpdated": boolean; };
|
|
153
|
+
|
|
154
|
+
export type SessionSetPermissionParams = { "sessionId": Id; "preset": string; };
|
|
155
|
+
|
|
156
|
+
export type SessionSetPermissionResult = { "current": string; };
|
|
157
|
+
|
|
158
|
+
export type ModelsCatalogParams = Empty;
|
|
159
|
+
|
|
160
|
+
export type ModelsCatalogResult = ModelCatalog;
|
|
161
|
+
|
|
162
|
+
export type PermissionsCatalogParams = Empty;
|
|
163
|
+
|
|
164
|
+
export type PermissionsCatalogResult = PermissionCatalog;
|
|
165
|
+
|
|
166
|
+
export type ToolOutputParams = { "sessionId": Id; "callId": Id; };
|
|
167
|
+
|
|
168
|
+
export type ToolOutputResult = Download;
|
|
169
|
+
|
|
170
|
+
export type TimelineTextParams = { "sessionId": Id; "itemId": Id; };
|
|
171
|
+
|
|
172
|
+
export type TimelineTextResult = Download;
|
|
173
|
+
|
|
174
|
+
export type InteractionsListParams = Empty;
|
|
175
|
+
|
|
176
|
+
export type InteractionsListResult = { "interactions": Array<Interaction>; };
|
|
177
|
+
|
|
178
|
+
export type InteractionAnswerParams = { "interactionId": Id; "answer": InteractionAnswer; };
|
|
179
|
+
|
|
180
|
+
export type InteractionAnswerResult = { "settled": true; };
|
|
181
|
+
|
|
182
|
+
export type FilesListParams = { "sessionId": Id; "path": RelativePath; };
|
|
183
|
+
|
|
184
|
+
export type FilesListResult = { "path": RelativePath; "entries": Array<FileEntry>; "truncated": boolean; };
|
|
185
|
+
|
|
186
|
+
export type FilesReadParams = { "sessionId": Id; "path": RelativePath; "offset"?: number; "limit"?: number; };
|
|
187
|
+
|
|
188
|
+
export type FilesReadResult = { "path": RelativePath; "text": string; "offset": number; "lines": number; "eof": boolean; "version": string; };
|
|
189
|
+
|
|
190
|
+
export type FilesStatParams = FilesListParams;
|
|
191
|
+
|
|
192
|
+
export type FilesStatResult = { "type": "file" | "dir" | "symlink" | "other"; "size"?: number; "version": string; };
|
|
193
|
+
|
|
194
|
+
export type FilesDownloadParams = FilesListParams;
|
|
195
|
+
|
|
196
|
+
export type FilesDownloadResult = Download;
|
|
197
|
+
|
|
198
|
+
export type ChangesSummaryParams = { "sessionId": Id; "changeId": Id; };
|
|
199
|
+
|
|
200
|
+
export type ChangesSummaryResult = { "files": Array<ChangeFile>; "added": number; "deleted": number; };
|
|
201
|
+
|
|
202
|
+
export type ChangesDiffParams = { "sessionId": Id; "changeId": Id; "index": number; };
|
|
203
|
+
|
|
204
|
+
export type ChangesDiffResult = { "diff": Diff; };
|
|
205
|
+
|
|
206
|
+
export type DeliverablesListParams = SessionRef;
|
|
207
|
+
|
|
208
|
+
export type DeliverablesListResult = { "deliverables": Array<Deliverable>; };
|
|
209
|
+
|
|
210
|
+
export type DeliverablesDownloadParams = { "deliverableId": Id; };
|
|
211
|
+
|
|
212
|
+
export type DeliverablesDownloadResult = Download;
|
|
213
|
+
|
|
214
|
+
export type AttachmentsBeginParams = { "sessionId": Id; "name": string; "mime": string; "size": number; "sha256": string; };
|
|
215
|
+
|
|
216
|
+
export type AttachmentsBeginResult = { "uploadId": Id; "streamId": number; };
|
|
217
|
+
|
|
218
|
+
export type AttachmentsFinishParams = { "uploadId": Id; };
|
|
219
|
+
|
|
220
|
+
export type AttachmentsFinishResult = { "attachmentId": Id; };
|
|
221
|
+
|
|
222
|
+
export type JobsWatchParams = SessionRef;
|
|
223
|
+
|
|
224
|
+
export type JobsWatchResult = { "subId": Id; "jobs": Array<Job>; };
|
|
225
|
+
|
|
226
|
+
export type JobWatchParams = { "sessionId": Id; "jobId": Id; "fromByte"?: number; };
|
|
227
|
+
|
|
228
|
+
export type JobWatchResult = { "subId": Id; "job": Job; "from": number; };
|
|
229
|
+
|
|
230
|
+
export type DevicesListParams = Empty;
|
|
231
|
+
|
|
232
|
+
export type DevicesListResult = { "devices": Array<Device>; };
|
|
233
|
+
|
|
234
|
+
export type DevicesWatchParams = Empty;
|
|
235
|
+
|
|
236
|
+
export type DevicesWatchResult = { "subId": Id; "devices": Array<Device>; };
|
|
237
|
+
|
|
238
|
+
export type DevicesRevokeParams = { "deviceId": Id; };
|
|
239
|
+
|
|
240
|
+
export type DevicesRevokeResult = Empty;
|
|
241
|
+
|
|
242
|
+
export type DevicesRenameParams = { "deviceId": Id; "name": string; };
|
|
243
|
+
|
|
244
|
+
export type DevicesRenameResult = { "device": Device; };
|
|
245
|
+
|
|
246
|
+
export type PushRegisterParams = { "pushId": Id; "pushSecret": Base64; "notifKey": Base64; "env": "sandbox" | "production"; "prefs": PushPrefs; };
|
|
247
|
+
|
|
248
|
+
export type PushRegisterResult = Empty;
|
|
249
|
+
|
|
250
|
+
export type PushUnregisterParams = Empty;
|
|
251
|
+
|
|
252
|
+
export type PushUnregisterResult = Empty;
|
|
253
|
+
|
|
254
|
+
export type PushPrefs = { "approvals": boolean; "turnFinished": boolean; "errors": boolean; };
|
|
255
|
+
|
|
256
|
+
export type PushUpdatePrefsParams = { "prefs": PushPrefs; };
|
|
257
|
+
|
|
258
|
+
export type PushUpdatePrefsResult = Empty;
|
|
259
|
+
|
|
260
|
+
export type HostInfo = { "hostId": Id; "name": string; "platform": "macos" | "windows" | "linux"; };
|
|
261
|
+
|
|
262
|
+
export type Workspace = { "workspaceId": Id; "title": string; "path": string; "updatedAt": Timestamp; };
|
|
263
|
+
|
|
264
|
+
export type SessionStatus = "idle" | "running" | "needs-input" | "error" | (string & {});
|
|
265
|
+
|
|
266
|
+
export type SessionSummary = { "sessionId": Id; "workspaceId"?: Id; "parentSessionId"?: Id; "title": string | null; "preview"?: string; "status": SessionStatus; "pendingInteractions": number; "updatedAt": Timestamp; "lastActivityAt"?: Timestamp; "archived": boolean; "pinned": boolean; "model"?: ModelSelection; };
|
|
267
|
+
|
|
268
|
+
export type SessionDetail = { "summary": SessionSummary; "cwd"?: string; "permission"?: { "current": string; }; };
|
|
269
|
+
|
|
270
|
+
export type Attachment = { "name": string; "mime"?: string; "size"?: number; };
|
|
271
|
+
|
|
272
|
+
export type ItemState = "streaming" | "complete" | "failed" | "cancelled";
|
|
273
|
+
|
|
274
|
+
export type ToolKind = "shell" | "edit" | "read" | "search" | "web" | "mcp" | "subagent" | "question" | "present" | "plan" | "other" | (string & {});
|
|
275
|
+
|
|
276
|
+
export type ToolStatus = "pending" | "awaiting-approval" | "running" | "succeeded" | "failed" | "denied" | "cancelled" | (string & {});
|
|
277
|
+
|
|
278
|
+
export type DiffHunk = { "oldStart": number; "oldLines": number; "newStart": number; "newLines": number; "lines": Array<string>; };
|
|
279
|
+
|
|
280
|
+
export type Diff = ({ "kind": "text"; "path": string; "hunks": Array<DiffHunk>; "coarse": boolean; }) | ({ "kind": "binary"; "path": string; }) | ({ "kind": "oversized"; "path": string; });
|
|
281
|
+
|
|
282
|
+
export type ToolOutput = { "text": string; "truncated": boolean; "totalBytes"?: number; "isError": boolean; };
|
|
283
|
+
|
|
284
|
+
export type Todo = { "text": string; "status": "pending" | "in_progress" | "completed"; };
|
|
285
|
+
|
|
286
|
+
export type DeliverableRef = { "deliverableId": Id; "name": string; "path": string; "description"?: string; };
|
|
287
|
+
|
|
288
|
+
export type Deliverable = { "deliverableId": Id; "name": string; "path": string; "description"?: string; "turn": number; "presentedAt": Timestamp; };
|
|
289
|
+
|
|
290
|
+
export type ItemOrder = { "seq": Seq; "index": number; };
|
|
291
|
+
|
|
292
|
+
export type TextTruncation = { "totalBytes": number; };
|
|
293
|
+
|
|
294
|
+
export type ItemBase = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": string; };
|
|
295
|
+
|
|
296
|
+
export type TimelineItem = (UserMessageItem) | (AssistantMessageItem) | (ReasoningItem) | (ToolCallItem) | (InteractionItem) | (PlanItem) | (GoalItem) | (ChangesItem) | (DeliverablesItem) | (TurnEndItem) | (NoticeItem);
|
|
297
|
+
|
|
298
|
+
export type UserMessageItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "user_message"; "text": string; "truncated"?: TextTruncation; "attachments": Array<Attachment>; };
|
|
299
|
+
|
|
300
|
+
export type AssistantMessageItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "assistant_message"; "text": string; "truncated"?: TextTruncation; "state": ItemState; "model"?: ModelSelection; };
|
|
301
|
+
|
|
302
|
+
export type ReasoningItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "reasoning"; "text": string; "truncated"?: TextTruncation; "state": ItemState; "durationMs"?: number; };
|
|
303
|
+
|
|
304
|
+
export type ToolCallItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "tool_call"; "callId": Id; "tool": { "name": string; "kind": ToolKind; }; "title": string; "input": { "command"?: string; "path"?: string; "query"?: string; "url"?: string; "raw"?: string; }; "status": ToolStatus; "output"?: ToolOutput; "diff"?: Diff; "jobId"?: Id; "childSessionId"?: Id; "durationMs"?: number; };
|
|
305
|
+
|
|
306
|
+
export type InteractionItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "interaction"; "interactionId"?: Id; "interactionKind": "approval" | "question"; "state": "pending" | "answered" | "cancelled" | "expired"; "summary": string; "outcome"?: string; "toolCallId"?: Id; };
|
|
307
|
+
|
|
308
|
+
export type PlanItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "plan"; "todos": Array<Todo>; };
|
|
309
|
+
|
|
310
|
+
export type GoalItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "goal"; "objective": string; "state": "active" | "achieved" | "abandoned" | (string & {}); };
|
|
311
|
+
|
|
312
|
+
export type ChangesItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "changes"; "changeId": Id; "fileCount": number; "added": number; "deleted": number; "available": boolean; };
|
|
313
|
+
|
|
314
|
+
export type DeliverablesItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "deliverables"; "deliverables": Array<DeliverableRef>; };
|
|
315
|
+
|
|
316
|
+
export type TurnEndItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "turn_end"; "reason": "completed" | "cancelled" | "error"; "errorMessage"?: string; };
|
|
317
|
+
|
|
318
|
+
export type NoticeItem = { "itemId": Id; "seq": Seq; "order": ItemOrder; "turn"?: number; "time": Timestamp; "kind": "notice"; "level": "info" | "warning" | "error"; "text": string; "code"?: "model-changed" | "permission-changed" | "title-changed" | "session-forked" | "other" | (string & {}); };
|
|
319
|
+
|
|
320
|
+
export type ApprovalRequest = { "toolName": string; "toolKind": ToolKind; "title": string; "command"?: string; "path"?: string; "reason"?: string; "preview"?: ({ "kind": "diff"; "diff": Diff; }) | ({ "kind": "text"; "text": string; }); };
|
|
321
|
+
|
|
322
|
+
export type Question = { "questionId": Id; "question": string; "header"?: string; "options": Array<{ "label": string; "description"?: string; }>; "multiSelect": boolean; };
|
|
323
|
+
|
|
324
|
+
export type Interaction = ({ "interactionId": Id; "sessionId": Id; "kind": "approval"; "blocking": true; "createdAt": Timestamp; "toolCallId"?: Id; "approval": ApprovalRequest; }) | ({ "interactionId": Id; "sessionId": Id; "kind": "question"; "blocking": boolean; "createdAt": Timestamp; "toolCallId"?: Id; "questions": Array<Question>; });
|
|
325
|
+
|
|
326
|
+
export type InteractionAnswer = ({ "kind": "approval"; "decision": "allow-once" | "deny"; }) | ({ "kind": "question"; "answers": Array<{ "questionId": Id; "selected": Array<string>; "custom"?: string; }>; });
|
|
327
|
+
|
|
328
|
+
export type QueueItem = { "queueItemId": Id; "text": string; "mode": "next-turn" | "next-step"; "createdAt"?: Timestamp; };
|
|
329
|
+
|
|
330
|
+
export type Job = { "jobId": Id; "sessionId"?: Id; "toolCallId"?: Id; "title": string; "status": "running" | "completed" | "failed" | "killed" | (string & {}); "startedAt"?: Timestamp; "endedAt"?: Timestamp; "output": { "earliest": number; "total": number; }; };
|
|
331
|
+
|
|
332
|
+
export type JobChunk = { "at": number; "text": string; "channel": "stdout" | "stderr"; "gapBefore"?: boolean; "lossy"?: boolean; };
|
|
333
|
+
|
|
334
|
+
export type Device = { "deviceId": Id; "name": string; "model": string; "pairedAt": Timestamp; "lastSeenAt"?: Timestamp; "secureEnclave": boolean; "current": boolean; };
|
|
335
|
+
|
|
336
|
+
export type ModelCatalog = { "providers": Array<{ "provider": Id; "label": string; "error"?: string; "models": Array<{ "model": Id; "label": string; "efforts": Array<string>; }>; }>; "default"?: ModelSelection; };
|
|
337
|
+
|
|
338
|
+
export type PermissionCatalog = { "options": Array<{ "preset": string; "label": string; "description"?: string; "approval": "ask" | "never" | "auto" | (string & {}); }>; "defaultPreset": string; };
|
|
339
|
+
|
|
340
|
+
export type FileEntry = { "name": string; "type": "file" | "dir" | "symlink" | "other"; "size"?: number; };
|
|
341
|
+
|
|
342
|
+
export type ChangeFile = { "index": number; "path": string; "display": string; "status": "added" | "modified" | "deleted" | "renamed" | (string & {}); "added": number; "deleted": number; };
|
|
343
|
+
|
|
344
|
+
export interface MethodMap {
|
|
345
|
+
"host.info": { params: HostInfoParams; result: HostInfoResult; };
|
|
346
|
+
"unsubscribe": { params: UnsubscribeParams; result: UnsubscribeResult; };
|
|
347
|
+
"sessions.list": { params: SessionsListParams; result: SessionsListResult; };
|
|
348
|
+
"sessions.watch": { params: SessionsWatchParams; result: SessionsWatchResult; };
|
|
349
|
+
"workspaces.list": { params: WorkspacesListParams; result: WorkspacesListResult; };
|
|
350
|
+
"sessions.create": { params: SessionsCreateParams; result: SessionsCreateResult; };
|
|
351
|
+
"session.watch": { params: SessionWatchParams; result: SessionWatchResult; };
|
|
352
|
+
"session.history": { params: SessionHistoryParams; result: SessionHistoryResult; };
|
|
353
|
+
"session.send": { params: SessionSendParams; result: SessionSendResult; };
|
|
354
|
+
"session.queue.update": { params: SessionQueueUpdateParams; result: SessionQueueUpdateResult; };
|
|
355
|
+
"session.interrupt": { params: SessionInterruptParams; result: SessionInterruptResult; };
|
|
356
|
+
"session.setModel": { params: SessionSetModelParams; result: SessionSetModelResult; };
|
|
357
|
+
"session.setPermission": { params: SessionSetPermissionParams; result: SessionSetPermissionResult; };
|
|
358
|
+
"models.catalog": { params: ModelsCatalogParams; result: ModelsCatalogResult; };
|
|
359
|
+
"permissions.catalog": { params: PermissionsCatalogParams; result: PermissionsCatalogResult; };
|
|
360
|
+
"tool.output": { params: ToolOutputParams; result: ToolOutputResult; };
|
|
361
|
+
"timeline.text": { params: TimelineTextParams; result: TimelineTextResult; };
|
|
362
|
+
"interactions.list": { params: InteractionsListParams; result: InteractionsListResult; };
|
|
363
|
+
"interaction.answer": { params: InteractionAnswerParams; result: InteractionAnswerResult; };
|
|
364
|
+
"files.list": { params: FilesListParams; result: FilesListResult; };
|
|
365
|
+
"files.read": { params: FilesReadParams; result: FilesReadResult; };
|
|
366
|
+
"files.stat": { params: FilesStatParams; result: FilesStatResult; };
|
|
367
|
+
"files.download": { params: FilesDownloadParams; result: FilesDownloadResult; };
|
|
368
|
+
"changes.summary": { params: ChangesSummaryParams; result: ChangesSummaryResult; };
|
|
369
|
+
"changes.diff": { params: ChangesDiffParams; result: ChangesDiffResult; };
|
|
370
|
+
"deliverables.list": { params: DeliverablesListParams; result: DeliverablesListResult; };
|
|
371
|
+
"deliverables.download": { params: DeliverablesDownloadParams; result: DeliverablesDownloadResult; };
|
|
372
|
+
"attachments.begin": { params: AttachmentsBeginParams; result: AttachmentsBeginResult; };
|
|
373
|
+
"attachments.finish": { params: AttachmentsFinishParams; result: AttachmentsFinishResult; };
|
|
374
|
+
"jobs.watch": { params: JobsWatchParams; result: JobsWatchResult; };
|
|
375
|
+
"job.watch": { params: JobWatchParams; result: JobWatchResult; };
|
|
376
|
+
"devices.list": { params: DevicesListParams; result: DevicesListResult; };
|
|
377
|
+
"devices.watch": { params: DevicesWatchParams; result: DevicesWatchResult; };
|
|
378
|
+
"devices.revoke": { params: DevicesRevokeParams; result: DevicesRevokeResult; };
|
|
379
|
+
"devices.rename": { params: DevicesRenameParams; result: DevicesRenameResult; };
|
|
380
|
+
"push.register": { params: PushRegisterParams; result: PushRegisterResult; };
|
|
381
|
+
"push.unregister": { params: PushUnregisterParams; result: PushUnregisterResult; };
|
|
382
|
+
"push.updatePrefs": { params: PushUpdatePrefsParams; result: PushUpdatePrefsResult; };
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface EventMap {
|
|
386
|
+
"workspace.upsert": WorkspaceUpsert;
|
|
387
|
+
"workspace.remove": WorkspaceRemove;
|
|
388
|
+
"session.upsert": SessionUpsert;
|
|
389
|
+
"session.remove": SessionRemove;
|
|
390
|
+
"timeline.upsert": TimelineUpsert;
|
|
391
|
+
"timeline.remove": TimelineRemove;
|
|
392
|
+
"timeline.delta": TimelineDelta;
|
|
393
|
+
"session.update": SessionUpdate;
|
|
394
|
+
"interaction.open": InteractionOpen;
|
|
395
|
+
"interaction.close": InteractionClose;
|
|
396
|
+
"queue.update": QueueUpdate;
|
|
397
|
+
"session.reset": SessionReset;
|
|
398
|
+
"jobs.replace": JobsReplace;
|
|
399
|
+
"job.output": JobOutput;
|
|
400
|
+
"job.status": JobStatus;
|
|
401
|
+
"devices.replace": DevicesReplace;
|
|
402
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "dmp://v1/common.schema.json",
|
|
4
|
+
"title": "DMP v1 common types",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"Id": {
|
|
7
|
+
"description": "Opaque identifier. Clients must not parse it.",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1,
|
|
10
|
+
"maxLength": 256
|
|
11
|
+
},
|
|
12
|
+
"Timestamp": {
|
|
13
|
+
"description": "RFC 3339 / ISO 8601 UTC timestamp.",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"Seq": {
|
|
18
|
+
"description": "DSH session-log sequence number as seen through the bridge. -1 means 'before the first event'.",
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": -1
|
|
21
|
+
},
|
|
22
|
+
"Base64": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"contentEncoding": "base64",
|
|
25
|
+
"pattern": "^[A-Za-z0-9+/]*={0,2}$"
|
|
26
|
+
},
|
|
27
|
+
"Base64Url": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
30
|
+
},
|
|
31
|
+
"Uuid": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
|
34
|
+
},
|
|
35
|
+
"RelativePath": {
|
|
36
|
+
"description": "Slash-separated path relative to the session workspace root. '' or '.' is the root.",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"maxLength": 4096
|
|
39
|
+
},
|
|
40
|
+
"ErrorCode": {
|
|
41
|
+
"x-dmp-open-enum": true,
|
|
42
|
+
"enum": [
|
|
43
|
+
"bad-frame", "version-unsupported", "unauthorized", "revoked", "pairing-closed", "bad-otp",
|
|
44
|
+
"unknown-method", "unsupported", "invalid-params", "not-found", "expired", "conflict", "busy",
|
|
45
|
+
"forbidden-path", "too-large", "dsh-unavailable", "dsh-incompatible", "cancelled", "timeout", "internal"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"Error": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["code", "message", "retryable"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"code": { "$ref": "#/$defs/ErrorCode" },
|
|
54
|
+
"message": { "type": "string" },
|
|
55
|
+
"retryable": { "type": "boolean" },
|
|
56
|
+
"details": { "type": "object" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"Capability": {
|
|
60
|
+
"x-dmp-open-enum": true,
|
|
61
|
+
"enum": [
|
|
62
|
+
"sessions", "timeline", "timeline.stream", "send", "send.steer", "queue.edit",
|
|
63
|
+
"interactions.approval", "interactions.question", "model.select", "permission.select",
|
|
64
|
+
"files.read", "files.download", "changes", "deliverables", "jobs", "attachments", "push", "devices"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"ModelSelection": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["provider", "model"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"provider": { "$ref": "#/$defs/Id" },
|
|
73
|
+
"model": { "$ref": "#/$defs/Id" },
|
|
74
|
+
"effort": { "description": "Adapter-owned reasoning effort; opaque.", "type": "string" }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"Empty": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
},
|
|
81
|
+
"Accepted": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["accepted"],
|
|
85
|
+
"properties": { "accepted": { "const": true } }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|