@getmateo/protocol 0.0.0-stage → 0.17.1
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/LICENSE +211 -0
- package/README.md +11 -2
- package/dist/addresses.d.ts +6 -0
- package/dist/addresses.js +2 -0
- package/dist/agent-attention-notification.d.ts +57 -0
- package/dist/agent-attention-notification.js +177 -0
- package/dist/agent-deep-link.d.ts +8 -0
- package/dist/agent-deep-link.js +49 -0
- package/dist/agent-labels.d.ts +14 -0
- package/dist/agent-labels.js +38 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-message.d.ts +20 -0
- package/dist/agent-message.js +12 -0
- package/dist/agent-profile.d.ts +31 -0
- package/dist/agent-profile.js +32 -0
- package/dist/agent-runtime-config.d.ts +4 -0
- package/dist/agent-runtime-config.js +5 -0
- package/dist/agent-shells.d.ts +25 -0
- package/dist/agent-shells.js +17 -0
- package/dist/agent-state-bucket.d.ts +15 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +484 -0
- package/dist/agent-types.js +33 -0
- package/dist/binary-frames/demux.d.ts +15 -0
- package/dist/binary-frames/demux.js +28 -0
- package/dist/binary-frames/file-transfer.d.ts +51 -0
- package/dist/binary-frames/file-transfer.js +108 -0
- package/dist/binary-frames/host-route.d.ts +13 -0
- package/dist/binary-frames/host-route.js +39 -0
- package/dist/binary-frames/index.d.ts +5 -0
- package/dist/binary-frames/index.js +5 -0
- package/dist/binary-frames/terminal.d.ts +35 -0
- package/dist/binary-frames/terminal.js +100 -0
- package/dist/branch-slug.d.ts +14 -0
- package/dist/branch-slug.js +49 -0
- package/dist/browser-automation/capabilities.d.ts +7 -0
- package/dist/browser-automation/capabilities.js +31 -0
- package/dist/browser-automation/rpc-schemas.d.ts +1113 -0
- package/dist/browser-automation/rpc-schemas.js +463 -0
- package/dist/build-metadata.d.ts +17 -0
- package/dist/build-metadata.js +61 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +104 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +23 -0
- package/dist/check-traits.d.ts +11 -0
- package/dist/check-traits.js +10 -0
- package/dist/chunked-transport.d.ts +42 -0
- package/dist/chunked-transport.js +277 -0
- package/dist/client-capabilities.d.ts +24 -0
- package/dist/client-capabilities.js +52 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-auth.d.ts +548 -0
- package/dist/daemon-auth.js +152 -0
- package/dist/daemon-endpoints.d.ts +54 -0
- package/dist/daemon-endpoints.js +243 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/fleet.d.ts +381 -0
- package/dist/fleet.js +134 -0
- package/dist/forge-manifest.d.ts +66 -0
- package/dist/forge-manifest.js +92 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +14023 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.js +258 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +512 -0
- package/dist/generated/validation/ws-outbound.aot.js +105425 -0
- package/dist/git-remote.d.ts +33 -0
- package/dist/git-remote.js +94 -0
- package/dist/gitea-status.d.ts +10 -0
- package/dist/gitea-status.js +23 -0
- package/dist/gitlab-pipeline.d.ts +10 -0
- package/dist/gitlab-pipeline.js +17 -0
- package/dist/global-terminal.d.ts +3 -0
- package/dist/global-terminal.js +8 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/host-target.d.ts +20 -0
- package/dist/host-target.js +137 -0
- package/dist/hosts.d.ts +133 -0
- package/dist/hosts.js +82 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +636 -0
- package/dist/loop/rpc-schemas.js +164 -0
- package/dist/mateo-config-schema.d.ts +138 -0
- package/dist/mateo-config-schema.js +98 -0
- package/dist/mateo-tool-call-detail.d.ts +2 -0
- package/dist/mateo-tool-call-detail.js +3 -0
- package/dist/mateo-tool-presentation/agent-message.d.ts +10 -0
- package/dist/mateo-tool-presentation/agent-message.js +23 -0
- package/dist/mateo-tool-presentation/catalog.d.ts +320 -0
- package/dist/mateo-tool-presentation/catalog.js +318 -0
- package/dist/mateo-tool-presentation/detail-sections.d.ts +15 -0
- package/dist/mateo-tool-presentation/detail-sections.js +161 -0
- package/dist/mateo-tool-presentation/index.d.ts +22 -0
- package/dist/mateo-tool-presentation/index.js +62 -0
- package/dist/mateo-tool-presentation/summary-text.d.ts +7 -0
- package/dist/mateo-tool-presentation/summary-text.js +22 -0
- package/dist/messages.d.ts +69382 -0
- package/dist/messages.js +6717 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/plugin-config.d.ts +18 -0
- package/dist/plugin-config.js +13 -0
- package/dist/plugin-overview.d.ts +12 -0
- package/dist/plugin-overview.js +50 -0
- package/dist/plugin-registry.d.ts +153 -0
- package/dist/plugin-registry.js +83 -0
- package/dist/plugin-requirements.d.ts +11 -0
- package/dist/plugin-requirements.js +26 -0
- package/dist/plugin-source-reference.d.ts +11 -0
- package/dist/plugin-source-reference.js +68 -0
- package/dist/provider-config.d.ts +141 -0
- package/dist/provider-config.js +113 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +54 -0
- package/dist/provider-manifest.d.ts +30 -0
- package/dist/provider-manifest.js +247 -0
- package/dist/provider-snapshot-codec.d.ts +18 -0
- package/dist/provider-snapshot-codec.js +71 -0
- package/dist/schedule/cadence.d.ts +6 -0
- package/dist/schedule/cadence.js +28 -0
- package/dist/schedule/cron-expression.d.ts +14 -0
- package/dist/schedule/cron-expression.js +107 -0
- package/dist/schedule/rpc-schemas.d.ts +570 -0
- package/dist/schedule/rpc-schemas.js +158 -0
- package/dist/schedule/types.d.ts +201 -0
- package/dist/schedule/types.js +68 -0
- package/dist/search/text-match.d.ts +78 -0
- package/dist/search/text-match.js +330 -0
- package/dist/service-defaults.d.ts +3 -0
- package/dist/service-defaults.js +5 -0
- package/dist/ssh-transport.d.ts +11 -0
- package/dist/ssh-transport.js +72 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +30 -0
- package/dist/terminal-input-mode.js +180 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +210 -0
- package/dist/terminal-profile.d.ts +10 -0
- package/dist/terminal-profile.js +11 -0
- package/dist/terminal-profiles.d.ts +41 -0
- package/dist/terminal-profiles.js +276 -0
- package/dist/terminal-snapshot.d.ts +4 -0
- package/dist/terminal-snapshot.js +220 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/dist/timeline-identity.d.ts +3 -0
- package/dist/timeline-identity.js +8 -0
- package/dist/tool-call-display.d.ts +13 -0
- package/dist/tool-call-display.js +144 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/user-agent.d.ts +26 -0
- package/dist/user-agent.js +101 -0
- package/dist/validation/ws-outbound-envelope.d.ts +13261 -0
- package/dist/validation/ws-outbound-envelope.js +17 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +38 -0
- package/dist/websocket-message-limit.d.ts +5 -0
- package/dist/websocket-message-limit.js +5 -0
- package/dist/workspace-labels.d.ts +9 -0
- package/dist/workspace-labels.js +19 -0
- package/package.json +43 -4
package/dist/fleet.d.ts
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A member's own dispatch state, reported to every session in server_info. */
|
|
3
|
+
export declare const FleetSelfStateSchema: z.ZodObject<{
|
|
4
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
5
|
+
dispatchEnabled: z.ZodBoolean;
|
|
6
|
+
passwordEnabled: z.ZodBoolean;
|
|
7
|
+
acceptsDispatch: z.ZodBoolean;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const FleetLinkTypeSchema: z.ZodEnum<{
|
|
10
|
+
relay: "relay";
|
|
11
|
+
direct: "direct";
|
|
12
|
+
}>;
|
|
13
|
+
export declare const FleetMemberSchema: z.ZodObject<{
|
|
14
|
+
serverId: z.ZodString;
|
|
15
|
+
label: z.ZodNullable<z.ZodString>;
|
|
16
|
+
linkType: z.ZodEnum<{
|
|
17
|
+
relay: "relay";
|
|
18
|
+
direct: "direct";
|
|
19
|
+
}>;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
error: "error";
|
|
22
|
+
connecting: "connecting";
|
|
23
|
+
online: "online";
|
|
24
|
+
offline: "offline";
|
|
25
|
+
}>;
|
|
26
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
27
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
28
|
+
disabled: "disabled";
|
|
29
|
+
password_required: "password_required";
|
|
30
|
+
}>>;
|
|
31
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
32
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
33
|
+
code: z.ZodString;
|
|
34
|
+
message: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const FleetStatusSchema: z.ZodObject<{
|
|
38
|
+
self: z.ZodObject<{
|
|
39
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
dispatchEnabled: z.ZodBoolean;
|
|
41
|
+
passwordEnabled: z.ZodBoolean;
|
|
42
|
+
acceptsDispatch: z.ZodBoolean;
|
|
43
|
+
serverId: z.ZodString;
|
|
44
|
+
label: z.ZodString;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
members: z.ZodArray<z.ZodObject<{
|
|
47
|
+
serverId: z.ZodString;
|
|
48
|
+
label: z.ZodNullable<z.ZodString>;
|
|
49
|
+
linkType: z.ZodEnum<{
|
|
50
|
+
relay: "relay";
|
|
51
|
+
direct: "direct";
|
|
52
|
+
}>;
|
|
53
|
+
status: z.ZodEnum<{
|
|
54
|
+
error: "error";
|
|
55
|
+
connecting: "connecting";
|
|
56
|
+
online: "online";
|
|
57
|
+
offline: "offline";
|
|
58
|
+
}>;
|
|
59
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
60
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
61
|
+
disabled: "disabled";
|
|
62
|
+
password_required: "password_required";
|
|
63
|
+
}>>;
|
|
64
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
65
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
66
|
+
code: z.ZodString;
|
|
67
|
+
message: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
/** Connection details a member hands to the App for one named peer. */
|
|
72
|
+
export declare const FleetCredentialSchema: z.ZodObject<{
|
|
73
|
+
serverId: z.ZodString;
|
|
74
|
+
label: z.ZodString;
|
|
75
|
+
credential: z.ZodString;
|
|
76
|
+
relay: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
endpoint: z.ZodString;
|
|
78
|
+
useTls: z.ZodBoolean;
|
|
79
|
+
daemonPublicKeyB64: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
direct: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export declare const FleetJoinMemberSchema: z.ZodObject<{
|
|
84
|
+
serverId: z.ZodString;
|
|
85
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
connection: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export declare const FleetProjectSchema: z.ZodObject<{
|
|
89
|
+
projectKey: z.ZodString;
|
|
90
|
+
displayName: z.ZodString;
|
|
91
|
+
rootPath: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type FleetSelfState = z.infer<typeof FleetSelfStateSchema>;
|
|
94
|
+
export type FleetMember = z.infer<typeof FleetMemberSchema>;
|
|
95
|
+
export type FleetStatus = z.infer<typeof FleetStatusSchema>;
|
|
96
|
+
export type FleetCredential = z.infer<typeof FleetCredentialSchema>;
|
|
97
|
+
export type FleetJoinMember = z.infer<typeof FleetJoinMemberSchema>;
|
|
98
|
+
export type FleetProject = z.infer<typeof FleetProjectSchema>;
|
|
99
|
+
export declare const FleetStatusRequestSchema: z.ZodObject<{
|
|
100
|
+
type: z.ZodLiteral<"fleet.status.request">;
|
|
101
|
+
requestId: z.ZodString;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export declare const FleetCredentialIssueRequestSchema: z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"fleet.credential.issue.request">;
|
|
105
|
+
requestId: z.ZodString;
|
|
106
|
+
fleetId: z.ZodString;
|
|
107
|
+
peerServerId: z.ZodString;
|
|
108
|
+
peerLabel: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export declare const FleetJoinRequestSchema: z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"fleet.join.request">;
|
|
112
|
+
requestId: z.ZodString;
|
|
113
|
+
fleetId: z.ZodString;
|
|
114
|
+
members: z.ZodArray<z.ZodObject<{
|
|
115
|
+
serverId: z.ZodString;
|
|
116
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
connection: z.ZodString;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export declare const FleetLeaveRequestSchema: z.ZodObject<{
|
|
121
|
+
type: z.ZodLiteral<"fleet.leave.request">;
|
|
122
|
+
requestId: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export declare const FleetMemberRemoveRequestSchema: z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"fleet.member.remove.request">;
|
|
126
|
+
requestId: z.ZodString;
|
|
127
|
+
serverId: z.ZodString;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const FleetDispatchSetRequestSchema: z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"fleet.dispatch.set.request">;
|
|
131
|
+
requestId: z.ZodString;
|
|
132
|
+
enabled: z.ZodBoolean;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
export declare const FleetProjectsListRequestSchema: z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"fleet.projects.list.request">;
|
|
136
|
+
requestId: z.ZodString;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export declare const FleetWorkspaceResolveRequestSchema: z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"fleet.workspace.resolve.request">;
|
|
140
|
+
requestId: z.ZodString;
|
|
141
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
142
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export declare const FleetStatusResponseSchema: z.ZodObject<{
|
|
145
|
+
type: z.ZodLiteral<"fleet.status.response">;
|
|
146
|
+
payload: z.ZodObject<{
|
|
147
|
+
requestId: z.ZodString;
|
|
148
|
+
fleet: z.ZodObject<{
|
|
149
|
+
self: z.ZodObject<{
|
|
150
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
151
|
+
dispatchEnabled: z.ZodBoolean;
|
|
152
|
+
passwordEnabled: z.ZodBoolean;
|
|
153
|
+
acceptsDispatch: z.ZodBoolean;
|
|
154
|
+
serverId: z.ZodString;
|
|
155
|
+
label: z.ZodString;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
members: z.ZodArray<z.ZodObject<{
|
|
158
|
+
serverId: z.ZodString;
|
|
159
|
+
label: z.ZodNullable<z.ZodString>;
|
|
160
|
+
linkType: z.ZodEnum<{
|
|
161
|
+
relay: "relay";
|
|
162
|
+
direct: "direct";
|
|
163
|
+
}>;
|
|
164
|
+
status: z.ZodEnum<{
|
|
165
|
+
error: "error";
|
|
166
|
+
connecting: "connecting";
|
|
167
|
+
online: "online";
|
|
168
|
+
offline: "offline";
|
|
169
|
+
}>;
|
|
170
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
171
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
172
|
+
disabled: "disabled";
|
|
173
|
+
password_required: "password_required";
|
|
174
|
+
}>>;
|
|
175
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
176
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
177
|
+
code: z.ZodString;
|
|
178
|
+
message: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export declare const FleetCredentialIssueResponseSchema: z.ZodObject<{
|
|
185
|
+
type: z.ZodLiteral<"fleet.credential.issue.response">;
|
|
186
|
+
payload: z.ZodObject<{
|
|
187
|
+
requestId: z.ZodString;
|
|
188
|
+
credential: z.ZodObject<{
|
|
189
|
+
serverId: z.ZodString;
|
|
190
|
+
label: z.ZodString;
|
|
191
|
+
credential: z.ZodString;
|
|
192
|
+
relay: z.ZodNullable<z.ZodObject<{
|
|
193
|
+
endpoint: z.ZodString;
|
|
194
|
+
useTls: z.ZodBoolean;
|
|
195
|
+
daemonPublicKeyB64: z.ZodString;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
direct: z.ZodNullable<z.ZodString>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
export declare const FleetJoinResponseSchema: z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"fleet.join.response">;
|
|
203
|
+
payload: z.ZodObject<{
|
|
204
|
+
requestId: z.ZodString;
|
|
205
|
+
fleet: z.ZodObject<{
|
|
206
|
+
self: z.ZodObject<{
|
|
207
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
208
|
+
dispatchEnabled: z.ZodBoolean;
|
|
209
|
+
passwordEnabled: z.ZodBoolean;
|
|
210
|
+
acceptsDispatch: z.ZodBoolean;
|
|
211
|
+
serverId: z.ZodString;
|
|
212
|
+
label: z.ZodString;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
members: z.ZodArray<z.ZodObject<{
|
|
215
|
+
serverId: z.ZodString;
|
|
216
|
+
label: z.ZodNullable<z.ZodString>;
|
|
217
|
+
linkType: z.ZodEnum<{
|
|
218
|
+
relay: "relay";
|
|
219
|
+
direct: "direct";
|
|
220
|
+
}>;
|
|
221
|
+
status: z.ZodEnum<{
|
|
222
|
+
error: "error";
|
|
223
|
+
connecting: "connecting";
|
|
224
|
+
online: "online";
|
|
225
|
+
offline: "offline";
|
|
226
|
+
}>;
|
|
227
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
228
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
229
|
+
disabled: "disabled";
|
|
230
|
+
password_required: "password_required";
|
|
231
|
+
}>>;
|
|
232
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
233
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
234
|
+
code: z.ZodString;
|
|
235
|
+
message: z.ZodString;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const FleetLeaveResponseSchema: z.ZodObject<{
|
|
242
|
+
type: z.ZodLiteral<"fleet.leave.response">;
|
|
243
|
+
payload: z.ZodObject<{
|
|
244
|
+
requestId: z.ZodString;
|
|
245
|
+
fleet: z.ZodObject<{
|
|
246
|
+
self: z.ZodObject<{
|
|
247
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
248
|
+
dispatchEnabled: z.ZodBoolean;
|
|
249
|
+
passwordEnabled: z.ZodBoolean;
|
|
250
|
+
acceptsDispatch: z.ZodBoolean;
|
|
251
|
+
serverId: z.ZodString;
|
|
252
|
+
label: z.ZodString;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
members: z.ZodArray<z.ZodObject<{
|
|
255
|
+
serverId: z.ZodString;
|
|
256
|
+
label: z.ZodNullable<z.ZodString>;
|
|
257
|
+
linkType: z.ZodEnum<{
|
|
258
|
+
relay: "relay";
|
|
259
|
+
direct: "direct";
|
|
260
|
+
}>;
|
|
261
|
+
status: z.ZodEnum<{
|
|
262
|
+
error: "error";
|
|
263
|
+
connecting: "connecting";
|
|
264
|
+
online: "online";
|
|
265
|
+
offline: "offline";
|
|
266
|
+
}>;
|
|
267
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
268
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
269
|
+
disabled: "disabled";
|
|
270
|
+
password_required: "password_required";
|
|
271
|
+
}>>;
|
|
272
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
273
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
274
|
+
code: z.ZodString;
|
|
275
|
+
message: z.ZodString;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
export declare const FleetMemberRemoveResponseSchema: z.ZodObject<{
|
|
282
|
+
type: z.ZodLiteral<"fleet.member.remove.response">;
|
|
283
|
+
payload: z.ZodObject<{
|
|
284
|
+
requestId: z.ZodString;
|
|
285
|
+
fleet: z.ZodObject<{
|
|
286
|
+
self: z.ZodObject<{
|
|
287
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
288
|
+
dispatchEnabled: z.ZodBoolean;
|
|
289
|
+
passwordEnabled: z.ZodBoolean;
|
|
290
|
+
acceptsDispatch: z.ZodBoolean;
|
|
291
|
+
serverId: z.ZodString;
|
|
292
|
+
label: z.ZodString;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
members: z.ZodArray<z.ZodObject<{
|
|
295
|
+
serverId: z.ZodString;
|
|
296
|
+
label: z.ZodNullable<z.ZodString>;
|
|
297
|
+
linkType: z.ZodEnum<{
|
|
298
|
+
relay: "relay";
|
|
299
|
+
direct: "direct";
|
|
300
|
+
}>;
|
|
301
|
+
status: z.ZodEnum<{
|
|
302
|
+
error: "error";
|
|
303
|
+
connecting: "connecting";
|
|
304
|
+
online: "online";
|
|
305
|
+
offline: "offline";
|
|
306
|
+
}>;
|
|
307
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
308
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
309
|
+
disabled: "disabled";
|
|
310
|
+
password_required: "password_required";
|
|
311
|
+
}>>;
|
|
312
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
313
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
314
|
+
code: z.ZodString;
|
|
315
|
+
message: z.ZodString;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
}, z.core.$strip>>;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
export declare const FleetDispatchSetResponseSchema: z.ZodObject<{
|
|
322
|
+
type: z.ZodLiteral<"fleet.dispatch.set.response">;
|
|
323
|
+
payload: z.ZodObject<{
|
|
324
|
+
requestId: z.ZodString;
|
|
325
|
+
fleet: z.ZodObject<{
|
|
326
|
+
self: z.ZodObject<{
|
|
327
|
+
fleetId: z.ZodNullable<z.ZodString>;
|
|
328
|
+
dispatchEnabled: z.ZodBoolean;
|
|
329
|
+
passwordEnabled: z.ZodBoolean;
|
|
330
|
+
acceptsDispatch: z.ZodBoolean;
|
|
331
|
+
serverId: z.ZodString;
|
|
332
|
+
label: z.ZodString;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
members: z.ZodArray<z.ZodObject<{
|
|
335
|
+
serverId: z.ZodString;
|
|
336
|
+
label: z.ZodNullable<z.ZodString>;
|
|
337
|
+
linkType: z.ZodEnum<{
|
|
338
|
+
relay: "relay";
|
|
339
|
+
direct: "direct";
|
|
340
|
+
}>;
|
|
341
|
+
status: z.ZodEnum<{
|
|
342
|
+
error: "error";
|
|
343
|
+
connecting: "connecting";
|
|
344
|
+
online: "online";
|
|
345
|
+
offline: "offline";
|
|
346
|
+
}>;
|
|
347
|
+
acceptsDispatch: z.ZodNullable<z.ZodBoolean>;
|
|
348
|
+
dispatchBlockedReason: z.ZodNullable<z.ZodEnum<{
|
|
349
|
+
disabled: "disabled";
|
|
350
|
+
password_required: "password_required";
|
|
351
|
+
}>>;
|
|
352
|
+
lastOnlineAt: z.ZodNullable<z.ZodString>;
|
|
353
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
354
|
+
code: z.ZodString;
|
|
355
|
+
message: z.ZodString;
|
|
356
|
+
}, z.core.$strip>>;
|
|
357
|
+
}, z.core.$strip>>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
export declare const FleetProjectsListResponseSchema: z.ZodObject<{
|
|
362
|
+
type: z.ZodLiteral<"fleet.projects.list.response">;
|
|
363
|
+
payload: z.ZodObject<{
|
|
364
|
+
requestId: z.ZodString;
|
|
365
|
+
acceptsDispatch: z.ZodBoolean;
|
|
366
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
367
|
+
projectKey: z.ZodString;
|
|
368
|
+
displayName: z.ZodString;
|
|
369
|
+
rootPath: z.ZodString;
|
|
370
|
+
}, z.core.$strip>>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
export declare const FleetWorkspaceResolveResponseSchema: z.ZodObject<{
|
|
374
|
+
type: z.ZodLiteral<"fleet.workspace.resolve.response">;
|
|
375
|
+
payload: z.ZodObject<{
|
|
376
|
+
requestId: z.ZodString;
|
|
377
|
+
workspaceId: z.ZodString;
|
|
378
|
+
cwd: z.ZodString;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
//# sourceMappingURL=fleet.d.ts.map
|
package/dist/fleet.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A member's own dispatch state, reported to every session in server_info. */
|
|
3
|
+
export const FleetSelfStateSchema = z.object({
|
|
4
|
+
fleetId: z.string().nullable(),
|
|
5
|
+
/** The owner's per-host choice to accept agents dispatched by other members. */
|
|
6
|
+
dispatchEnabled: z.boolean(),
|
|
7
|
+
/** Peers can only be scoped when the host requires password authentication. */
|
|
8
|
+
passwordEnabled: z.boolean(),
|
|
9
|
+
/** Effective: a member with dispatch enabled and a password. */
|
|
10
|
+
acceptsDispatch: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export const FleetLinkTypeSchema = z.enum(["relay", "direct"]);
|
|
13
|
+
export const FleetMemberSchema = z.object({
|
|
14
|
+
serverId: z.string(),
|
|
15
|
+
label: z.string().nullable(),
|
|
16
|
+
linkType: FleetLinkTypeSchema,
|
|
17
|
+
status: z.enum(["connecting", "online", "offline", "error"]),
|
|
18
|
+
/** Null until the link has reached the member. */
|
|
19
|
+
acceptsDispatch: z.boolean().nullable(),
|
|
20
|
+
/** Why the member refuses dispatch, when it is reachable but not accepting. */
|
|
21
|
+
dispatchBlockedReason: z.enum(["disabled", "password_required"]).nullable(),
|
|
22
|
+
lastOnlineAt: z.string().nullable(),
|
|
23
|
+
error: z.object({ code: z.string(), message: z.string() }).nullable(),
|
|
24
|
+
});
|
|
25
|
+
export const FleetStatusSchema = z.object({
|
|
26
|
+
self: FleetSelfStateSchema.extend({ serverId: z.string(), label: z.string() }),
|
|
27
|
+
members: z.array(FleetMemberSchema),
|
|
28
|
+
});
|
|
29
|
+
/** Connection details a member hands to the App for one named peer. */
|
|
30
|
+
export const FleetCredentialSchema = z.object({
|
|
31
|
+
serverId: z.string(),
|
|
32
|
+
label: z.string(),
|
|
33
|
+
/** Opaque peer credential. Shown once; the member stores only its hash. */
|
|
34
|
+
credential: z.string(),
|
|
35
|
+
relay: z
|
|
36
|
+
.object({
|
|
37
|
+
endpoint: z.string(),
|
|
38
|
+
useTls: z.boolean(),
|
|
39
|
+
daemonPublicKeyB64: z.string(),
|
|
40
|
+
})
|
|
41
|
+
.nullable(),
|
|
42
|
+
/** host:port when the daemon listens on TCP. Reachability depends on the peer's network. */
|
|
43
|
+
direct: z.string().nullable(),
|
|
44
|
+
});
|
|
45
|
+
export const FleetJoinMemberSchema = z.object({
|
|
46
|
+
serverId: z.string().min(1).max(256),
|
|
47
|
+
label: z.string().max(256).nullable().optional(),
|
|
48
|
+
/** relay:// or tcp:// connection carrying the peer credential in its peer parameter. */
|
|
49
|
+
connection: z.string().min(1).max(16384),
|
|
50
|
+
});
|
|
51
|
+
export const FleetProjectSchema = z.object({
|
|
52
|
+
projectKey: z.string(),
|
|
53
|
+
displayName: z.string(),
|
|
54
|
+
rootPath: z.string(),
|
|
55
|
+
});
|
|
56
|
+
export const FleetStatusRequestSchema = z.object({
|
|
57
|
+
type: z.literal("fleet.status.request"),
|
|
58
|
+
requestId: z.string(),
|
|
59
|
+
});
|
|
60
|
+
export const FleetCredentialIssueRequestSchema = z.object({
|
|
61
|
+
type: z.literal("fleet.credential.issue.request"),
|
|
62
|
+
requestId: z.string(),
|
|
63
|
+
fleetId: z.string().min(1).max(256),
|
|
64
|
+
peerServerId: z.string().min(1).max(256),
|
|
65
|
+
peerLabel: z.string().max(256).optional(),
|
|
66
|
+
});
|
|
67
|
+
export const FleetJoinRequestSchema = z.object({
|
|
68
|
+
type: z.literal("fleet.join.request"),
|
|
69
|
+
requestId: z.string(),
|
|
70
|
+
fleetId: z.string().min(1).max(256),
|
|
71
|
+
members: z.array(FleetJoinMemberSchema).max(64),
|
|
72
|
+
});
|
|
73
|
+
export const FleetLeaveRequestSchema = z.object({
|
|
74
|
+
type: z.literal("fleet.leave.request"),
|
|
75
|
+
requestId: z.string(),
|
|
76
|
+
});
|
|
77
|
+
export const FleetMemberRemoveRequestSchema = z.object({
|
|
78
|
+
type: z.literal("fleet.member.remove.request"),
|
|
79
|
+
requestId: z.string(),
|
|
80
|
+
serverId: z.string().min(1).max(256),
|
|
81
|
+
});
|
|
82
|
+
export const FleetDispatchSetRequestSchema = z.object({
|
|
83
|
+
type: z.literal("fleet.dispatch.set.request"),
|
|
84
|
+
requestId: z.string(),
|
|
85
|
+
enabled: z.boolean(),
|
|
86
|
+
});
|
|
87
|
+
export const FleetProjectsListRequestSchema = z.object({
|
|
88
|
+
type: z.literal("fleet.projects.list.request"),
|
|
89
|
+
requestId: z.string(),
|
|
90
|
+
});
|
|
91
|
+
export const FleetWorkspaceResolveRequestSchema = z.object({
|
|
92
|
+
type: z.literal("fleet.workspace.resolve.request"),
|
|
93
|
+
requestId: z.string(),
|
|
94
|
+
// Exactly one of projectKey or workspaceId; the daemon rejects anything else.
|
|
95
|
+
projectKey: z.string().min(1).max(4096).optional(),
|
|
96
|
+
workspaceId: z.string().min(1).max(256).optional(),
|
|
97
|
+
});
|
|
98
|
+
export const FleetStatusResponseSchema = z.object({
|
|
99
|
+
type: z.literal("fleet.status.response"),
|
|
100
|
+
payload: z.object({ requestId: z.string(), fleet: FleetStatusSchema }),
|
|
101
|
+
});
|
|
102
|
+
export const FleetCredentialIssueResponseSchema = z.object({
|
|
103
|
+
type: z.literal("fleet.credential.issue.response"),
|
|
104
|
+
payload: z.object({ requestId: z.string(), credential: FleetCredentialSchema }),
|
|
105
|
+
});
|
|
106
|
+
export const FleetJoinResponseSchema = z.object({
|
|
107
|
+
type: z.literal("fleet.join.response"),
|
|
108
|
+
payload: z.object({ requestId: z.string(), fleet: FleetStatusSchema }),
|
|
109
|
+
});
|
|
110
|
+
export const FleetLeaveResponseSchema = z.object({
|
|
111
|
+
type: z.literal("fleet.leave.response"),
|
|
112
|
+
payload: z.object({ requestId: z.string(), fleet: FleetStatusSchema }),
|
|
113
|
+
});
|
|
114
|
+
export const FleetMemberRemoveResponseSchema = z.object({
|
|
115
|
+
type: z.literal("fleet.member.remove.response"),
|
|
116
|
+
payload: z.object({ requestId: z.string(), fleet: FleetStatusSchema }),
|
|
117
|
+
});
|
|
118
|
+
export const FleetDispatchSetResponseSchema = z.object({
|
|
119
|
+
type: z.literal("fleet.dispatch.set.response"),
|
|
120
|
+
payload: z.object({ requestId: z.string(), fleet: FleetStatusSchema }),
|
|
121
|
+
});
|
|
122
|
+
export const FleetProjectsListResponseSchema = z.object({
|
|
123
|
+
type: z.literal("fleet.projects.list.response"),
|
|
124
|
+
payload: z.object({
|
|
125
|
+
requestId: z.string(),
|
|
126
|
+
acceptsDispatch: z.boolean(),
|
|
127
|
+
projects: z.array(FleetProjectSchema),
|
|
128
|
+
}),
|
|
129
|
+
});
|
|
130
|
+
export const FleetWorkspaceResolveResponseSchema = z.object({
|
|
131
|
+
type: z.literal("fleet.workspace.resolve.response"),
|
|
132
|
+
payload: z.object({ requestId: z.string(), workspaceId: z.string(), cwd: z.string() }),
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=fleet.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative manifest of the git forges Mateo knows how to present, mirroring
|
|
3
|
+
* provider-manifest.ts. Pure build-time data shared by BOTH the client (icon,
|
|
4
|
+
* brand label, PR↔MR relabel) and the server (registry host-matching, prompt
|
|
5
|
+
* branding). It is NEVER serialized over the wire, so adding a forge here is not
|
|
6
|
+
* a protocol change.
|
|
7
|
+
*
|
|
8
|
+
* Keep this a pure leaf: no imports, no zod, no functions with runtime deps.
|
|
9
|
+
* Behavioural concerns (CLI invocation, host probing, REST adapters) live in the
|
|
10
|
+
* server adapter keyed by {@link ForgeDefinition.id}; this file is only the
|
|
11
|
+
* declarative half.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Declarative sign-in recipe for a forge. The client renders install/sign-in
|
|
15
|
+
* hints from this data alone — no per-CLI switch — so a new forge wires its auth
|
|
16
|
+
* UX entirely from the manifest. Behavioural auth (the actual host probe) stays
|
|
17
|
+
* in the server adapter; this is only what the user is told to run.
|
|
18
|
+
*/
|
|
19
|
+
export interface ForgeSignInCommand {
|
|
20
|
+
/** Binary the user installs, e.g. "gh" — shown in the install-CLI hint. */
|
|
21
|
+
cli: string;
|
|
22
|
+
/** Full sign-in command, e.g. "gh auth login". */
|
|
23
|
+
command: string;
|
|
24
|
+
/**
|
|
25
|
+
* Flag that targets a self-hosted host, e.g. "--hostname". When present and a
|
|
26
|
+
* host is known, the client appends `${command} ${hostnameFlag} ${host}`.
|
|
27
|
+
* Omit when the command already targets the right host on its own.
|
|
28
|
+
*/
|
|
29
|
+
hostnameFlag?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ForgeDefinition {
|
|
32
|
+
/** Registry id, matches the server adapter and the wire `forge` value. */
|
|
33
|
+
id: string;
|
|
34
|
+
/** Human brand name, e.g. for "Open on GitLab". */
|
|
35
|
+
displayName: string;
|
|
36
|
+
/** Short change-request noun: "PR" for GitHub, "MR" for GitLab. */
|
|
37
|
+
changeRequestAbbrev: string;
|
|
38
|
+
/** Full change-request noun: "pull request" vs "merge request". */
|
|
39
|
+
changeRequestNoun: string;
|
|
40
|
+
/** Prefix before a change-request number: "#" vs "!". */
|
|
41
|
+
changeRequestNumberPrefix: string;
|
|
42
|
+
/** Prefix before an issue number ("#" on every forge so far). */
|
|
43
|
+
issueNumberPrefix: string;
|
|
44
|
+
/** Icon key; the client falls back to a generic git icon for unknown values. */
|
|
45
|
+
iconKind: string;
|
|
46
|
+
/** Sign-in recipe, or null when the forge has no Mateo-driven sign-in. */
|
|
47
|
+
signIn: ForgeSignInCommand | null;
|
|
48
|
+
/**
|
|
49
|
+
* Public cloud hosts this forge owns exactly. A BOUNDED list, never an
|
|
50
|
+
* allowlist for self-hosted detection — self-hosted/Enterprise instances are
|
|
51
|
+
* recognized at runtime by the adapter's host probe, not by this field.
|
|
52
|
+
*/
|
|
53
|
+
cloudHosts?: string[];
|
|
54
|
+
}
|
|
55
|
+
export declare const FORGE_DEFINITIONS: ForgeDefinition[];
|
|
56
|
+
/** Forge definitions only present in dev builds (none today; mirrors providers). */
|
|
57
|
+
export declare const DEV_FORGE_DEFINITIONS: ForgeDefinition[];
|
|
58
|
+
export declare const FORGE_IDS: string[];
|
|
59
|
+
export declare function getForgeDefinition(id: string, definitions?: ForgeDefinition[]): ForgeDefinition | null;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve a forge definition, synthesizing a neutral one for a forge id the
|
|
62
|
+
* client has never heard of (e.g. a self-hosted forge a newer daemon reports to
|
|
63
|
+
* an older client). The neutral shape renders generic, never GitHub-branded.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getForgeDefinitionOrNeutral(id: string): ForgeDefinition;
|
|
66
|
+
//# sourceMappingURL=forge-manifest.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative manifest of the git forges Mateo knows how to present, mirroring
|
|
3
|
+
* provider-manifest.ts. Pure build-time data shared by BOTH the client (icon,
|
|
4
|
+
* brand label, PR↔MR relabel) and the server (registry host-matching, prompt
|
|
5
|
+
* branding). It is NEVER serialized over the wire, so adding a forge here is not
|
|
6
|
+
* a protocol change.
|
|
7
|
+
*
|
|
8
|
+
* Keep this a pure leaf: no imports, no zod, no functions with runtime deps.
|
|
9
|
+
* Behavioural concerns (CLI invocation, host probing, REST adapters) live in the
|
|
10
|
+
* server adapter keyed by {@link ForgeDefinition.id}; this file is only the
|
|
11
|
+
* declarative half.
|
|
12
|
+
*/
|
|
13
|
+
export const FORGE_DEFINITIONS = [
|
|
14
|
+
{
|
|
15
|
+
id: "github",
|
|
16
|
+
displayName: "GitHub",
|
|
17
|
+
changeRequestAbbrev: "PR",
|
|
18
|
+
changeRequestNoun: "pull request",
|
|
19
|
+
changeRequestNumberPrefix: "#",
|
|
20
|
+
issueNumberPrefix: "#",
|
|
21
|
+
iconKind: "github",
|
|
22
|
+
signIn: { cli: "gh", command: "gh auth login" },
|
|
23
|
+
cloudHosts: ["github.com", "ssh.github.com"],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "gitlab",
|
|
27
|
+
displayName: "GitLab",
|
|
28
|
+
changeRequestAbbrev: "MR",
|
|
29
|
+
changeRequestNoun: "merge request",
|
|
30
|
+
changeRequestNumberPrefix: "!",
|
|
31
|
+
issueNumberPrefix: "#",
|
|
32
|
+
iconKind: "gitlab",
|
|
33
|
+
signIn: { cli: "glab", command: "glab auth login", hostnameFlag: "--hostname" },
|
|
34
|
+
cloudHosts: ["gitlab.com"],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "gitea",
|
|
38
|
+
displayName: "Gitea",
|
|
39
|
+
changeRequestAbbrev: "PR",
|
|
40
|
+
changeRequestNoun: "pull request",
|
|
41
|
+
changeRequestNumberPrefix: "#",
|
|
42
|
+
issueNumberPrefix: "#",
|
|
43
|
+
iconKind: "gitea",
|
|
44
|
+
signIn: { cli: "tea", command: "tea login add" },
|
|
45
|
+
cloudHosts: ["gitea.com"],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "forgejo",
|
|
49
|
+
displayName: "Forgejo",
|
|
50
|
+
changeRequestAbbrev: "PR",
|
|
51
|
+
changeRequestNoun: "pull request",
|
|
52
|
+
changeRequestNumberPrefix: "#",
|
|
53
|
+
issueNumberPrefix: "#",
|
|
54
|
+
iconKind: "forgejo",
|
|
55
|
+
signIn: { cli: "tea", command: "tea login add" },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "codeberg",
|
|
59
|
+
displayName: "Codeberg",
|
|
60
|
+
changeRequestAbbrev: "PR",
|
|
61
|
+
changeRequestNoun: "pull request",
|
|
62
|
+
changeRequestNumberPrefix: "#",
|
|
63
|
+
issueNumberPrefix: "#",
|
|
64
|
+
iconKind: "codeberg",
|
|
65
|
+
signIn: { cli: "tea", command: "tea login add" },
|
|
66
|
+
cloudHosts: ["codeberg.org"],
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
/** Forge definitions only present in dev builds (none today; mirrors providers). */
|
|
70
|
+
export const DEV_FORGE_DEFINITIONS = [];
|
|
71
|
+
export const FORGE_IDS = FORGE_DEFINITIONS.map((definition) => definition.id);
|
|
72
|
+
export function getForgeDefinition(id, definitions = [...FORGE_DEFINITIONS, ...DEV_FORGE_DEFINITIONS]) {
|
|
73
|
+
return definitions.find((definition) => definition.id === id) ?? null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolve a forge definition, synthesizing a neutral one for a forge id the
|
|
77
|
+
* client has never heard of (e.g. a self-hosted forge a newer daemon reports to
|
|
78
|
+
* an older client). The neutral shape renders generic, never GitHub-branded.
|
|
79
|
+
*/
|
|
80
|
+
export function getForgeDefinitionOrNeutral(id) {
|
|
81
|
+
return (getForgeDefinition(id) ?? {
|
|
82
|
+
id,
|
|
83
|
+
displayName: id,
|
|
84
|
+
changeRequestAbbrev: "PR",
|
|
85
|
+
changeRequestNoun: "pull request",
|
|
86
|
+
changeRequestNumberPrefix: "#",
|
|
87
|
+
issueNumberPrefix: "#",
|
|
88
|
+
iconKind: "git",
|
|
89
|
+
signIn: null,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=forge-manifest.js.map
|