@dsh-teamwork/dsh-teamwork 0.6.1 → 0.8.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/README.md +109 -2
- package/icon.svg +4 -0
- package/lib/aes-gcm.js +22 -0
- package/lib/aes-gcm.js.map +1 -0
- package/lib/assistant-tools.js +421 -0
- package/lib/assistant-tools.js.map +1 -0
- package/lib/bridge.js +127 -8
- package/lib/bridge.js.map +1 -1
- package/lib/cli.js +1 -1
- package/lib/cli.js.map +1 -1
- package/lib/client.js +206 -18
- package/lib/client.js.map +1 -1
- package/lib/config-sync.js +2 -1
- package/lib/config-sync.js.map +1 -1
- package/lib/index.js +187 -73
- package/lib/index.js.map +1 -1
- package/lib/local-share.js +87 -0
- package/lib/local-share.js.map +1 -0
- package/lib/panel.js +9 -0
- package/lib/panel.js.map +1 -1
- package/lib/phone-security.js +283 -0
- package/lib/phone-security.js.map +1 -0
- package/lib/phone-session.js +20 -0
- package/lib/phone-session.js.map +1 -0
- package/lib/phone-uploads.js +136 -0
- package/lib/phone-uploads.js.map +1 -0
- package/lib/platform-models.js +2 -2
- package/lib/platform-models.js.map +1 -1
- package/lib/preset-context.js +1 -1
- package/lib/preset-context.js.map +1 -1
- package/lib/relay.js +9 -4
- package/lib/relay.js.map +1 -1
- package/lib/secure-channel.js +398 -0
- package/lib/secure-channel.js.map +1 -0
- package/lib/types/aes-gcm.d.ts +3 -0
- package/lib/types/aes-gcm.d.ts.map +1 -0
- package/lib/types/assistant-tools.d.ts +7 -0
- package/lib/types/assistant-tools.d.ts.map +1 -0
- package/lib/types/bridge.d.ts +5 -0
- package/lib/types/bridge.d.ts.map +1 -1
- package/lib/types/client.d.ts +432 -195
- package/lib/types/client.d.ts.map +1 -1
- package/lib/types/config-sync.d.ts +1 -1
- package/lib/types/config-sync.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/local-share.d.ts +11 -0
- package/lib/types/local-share.d.ts.map +1 -0
- package/lib/types/panel.d.ts +39 -5
- package/lib/types/panel.d.ts.map +1 -1
- package/lib/types/phone-security.d.ts +59 -0
- package/lib/types/phone-security.d.ts.map +1 -0
- package/lib/types/phone-session.d.ts +52 -0
- package/lib/types/phone-session.d.ts.map +1 -0
- package/lib/types/phone-uploads.d.ts +75 -0
- package/lib/types/phone-uploads.d.ts.map +1 -0
- package/lib/types/platform-models.d.ts.map +1 -1
- package/lib/types/preset-context.d.ts +2 -0
- package/lib/types/preset-context.d.ts.map +1 -1
- package/lib/types/preset-session.d.ts +1 -1
- package/lib/types/relay.d.ts +10 -2
- package/lib/types/relay.d.ts.map +1 -1
- package/lib/types/secure-channel.d.ts +79 -0
- package/lib/types/secure-channel.d.ts.map +1 -0
- package/lib/web/client.js +850 -269
- package/package.json +11 -2
package/lib/types/client.d.ts
CHANGED
|
@@ -1,59 +1,204 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { PanelProfile, PanelQuota } from './panel.js';
|
|
3
|
+
/** `GET /api/configs`: every team the member is in, each with its configuration (platform ADR 0013). */
|
|
2
4
|
export declare const snapshotSchema: z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
teams: z.ZodArray<z.ZodObject<{
|
|
6
|
+
teamId: z.ZodString;
|
|
7
|
+
teamName: z.ZodString;
|
|
8
|
+
role: z.ZodEnum<{
|
|
9
|
+
admin: "admin";
|
|
10
|
+
member: "member";
|
|
11
|
+
}>;
|
|
12
|
+
pluginVersions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
+
configId: z.ZodString;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
data: z.ZodObject<{
|
|
16
|
+
artifactId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
18
|
+
package: z.ZodString;
|
|
19
|
+
version: z.ZodString;
|
|
20
|
+
providesTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
description: z.ZodDefault<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
configs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"model">;
|
|
26
|
+
data: z.ZodObject<{
|
|
27
|
+
provider: z.ZodString;
|
|
28
|
+
model: z.ZodString;
|
|
29
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
builtin: z.ZodOptional<z.ZodLiteral<"team-assistant">>;
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
version: z.ZodNumber;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"preset">;
|
|
38
|
+
data: z.ZodObject<{
|
|
39
|
+
inheritModel: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
41
|
+
model: z.ZodOptional<z.ZodString>;
|
|
42
|
+
modelConfigId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
description: z.ZodOptional<z.ZodString>;
|
|
44
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
45
|
+
outputDescription: z.ZodOptional<z.ZodString>;
|
|
46
|
+
pluginDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
pluginConfigId: z.ZodString;
|
|
48
|
+
version: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
requiredTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
optionalTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
systemPrompt: z.ZodDefault<z.ZodString>;
|
|
53
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
builtin: z.ZodOptional<z.ZodLiteral<"team-assistant">>;
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
version: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"plugin">;
|
|
62
|
+
data: z.ZodObject<{
|
|
63
|
+
artifactId: z.ZodOptional<z.ZodString>;
|
|
64
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
65
|
+
package: z.ZodString;
|
|
31
66
|
version: z.ZodString;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
version: z.ZodNumber;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
kind: z.ZodLiteral<"plugin">;
|
|
44
|
-
data: z.ZodObject<{
|
|
45
|
-
package: z.ZodString;
|
|
46
|
-
version: z.ZodString;
|
|
47
|
-
providesTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
-
description: z.ZodDefault<z.ZodString>;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
id: z.ZodString;
|
|
51
|
-
name: z.ZodString;
|
|
52
|
-
version: z.ZodNumber;
|
|
53
|
-
}, z.core.$strip>], "kind">>;
|
|
67
|
+
providesTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
description: z.ZodDefault<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
builtin: z.ZodOptional<z.ZodLiteral<"team-assistant">>;
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
version: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>], "kind">>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
54
76
|
}, z.core.$strip>;
|
|
55
77
|
export type Snapshot = z.infer<typeof snapshotSchema>;
|
|
56
|
-
export type
|
|
78
|
+
export type TeamSnapshot = Snapshot['teams'][number];
|
|
79
|
+
export type TeamConfig = TeamSnapshot['configs'][number];
|
|
80
|
+
/** Every team's configuration in one list. Ids are the server's primary keys, so they are unique across teams. */
|
|
81
|
+
export declare const allConfigs: (snapshot?: Snapshot) => TeamConfig[];
|
|
82
|
+
export declare const findConfig: (snapshot: Snapshot | undefined, id: string) => {
|
|
83
|
+
kind: "model";
|
|
84
|
+
data: {
|
|
85
|
+
provider: string;
|
|
86
|
+
model: string;
|
|
87
|
+
contextWindow?: number | undefined;
|
|
88
|
+
maxTokens?: number | undefined;
|
|
89
|
+
};
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
version: number;
|
|
93
|
+
builtin?: "team-assistant" | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
kind: "preset";
|
|
96
|
+
data: {
|
|
97
|
+
systemPrompt: string;
|
|
98
|
+
inheritModel?: boolean | undefined;
|
|
99
|
+
provider?: string | undefined;
|
|
100
|
+
model?: string | undefined;
|
|
101
|
+
modelConfigId?: string | undefined;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
instructions?: string | undefined;
|
|
104
|
+
outputDescription?: string | undefined;
|
|
105
|
+
pluginDependencies?: {
|
|
106
|
+
pluginConfigId: string;
|
|
107
|
+
version: string;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
requiredTools?: string[] | undefined;
|
|
110
|
+
optionalTools?: string[] | undefined;
|
|
111
|
+
contextWindow?: number | undefined;
|
|
112
|
+
maxTokens?: number | undefined;
|
|
113
|
+
};
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
version: number;
|
|
117
|
+
builtin?: "team-assistant" | undefined;
|
|
118
|
+
} | {
|
|
119
|
+
kind: "plugin";
|
|
120
|
+
data: {
|
|
121
|
+
package: string;
|
|
122
|
+
version: string;
|
|
123
|
+
description: string;
|
|
124
|
+
artifactId?: string | undefined;
|
|
125
|
+
sha256?: string | undefined;
|
|
126
|
+
providesTools?: string[] | undefined;
|
|
127
|
+
};
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
version: number;
|
|
131
|
+
builtin?: "team-assistant" | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
/** The team a configuration belongs to. */
|
|
134
|
+
export declare const teamOf: (snapshot: Snapshot | undefined, configId: string) => {
|
|
135
|
+
teamId: string;
|
|
136
|
+
teamName: string;
|
|
137
|
+
role: "admin" | "member";
|
|
138
|
+
configs: ({
|
|
139
|
+
kind: "model";
|
|
140
|
+
data: {
|
|
141
|
+
provider: string;
|
|
142
|
+
model: string;
|
|
143
|
+
contextWindow?: number | undefined;
|
|
144
|
+
maxTokens?: number | undefined;
|
|
145
|
+
};
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
version: number;
|
|
149
|
+
builtin?: "team-assistant" | undefined;
|
|
150
|
+
} | {
|
|
151
|
+
kind: "preset";
|
|
152
|
+
data: {
|
|
153
|
+
systemPrompt: string;
|
|
154
|
+
inheritModel?: boolean | undefined;
|
|
155
|
+
provider?: string | undefined;
|
|
156
|
+
model?: string | undefined;
|
|
157
|
+
modelConfigId?: string | undefined;
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
instructions?: string | undefined;
|
|
160
|
+
outputDescription?: string | undefined;
|
|
161
|
+
pluginDependencies?: {
|
|
162
|
+
pluginConfigId: string;
|
|
163
|
+
version: string;
|
|
164
|
+
}[] | undefined;
|
|
165
|
+
requiredTools?: string[] | undefined;
|
|
166
|
+
optionalTools?: string[] | undefined;
|
|
167
|
+
contextWindow?: number | undefined;
|
|
168
|
+
maxTokens?: number | undefined;
|
|
169
|
+
};
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
version: number;
|
|
173
|
+
builtin?: "team-assistant" | undefined;
|
|
174
|
+
} | {
|
|
175
|
+
kind: "plugin";
|
|
176
|
+
data: {
|
|
177
|
+
package: string;
|
|
178
|
+
version: string;
|
|
179
|
+
description: string;
|
|
180
|
+
artifactId?: string | undefined;
|
|
181
|
+
sha256?: string | undefined;
|
|
182
|
+
providesTools?: string[] | undefined;
|
|
183
|
+
};
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
version: number;
|
|
187
|
+
builtin?: "team-assistant" | undefined;
|
|
188
|
+
})[];
|
|
189
|
+
pluginVersions?: {
|
|
190
|
+
configId: string;
|
|
191
|
+
name: string;
|
|
192
|
+
data: {
|
|
193
|
+
package: string;
|
|
194
|
+
version: string;
|
|
195
|
+
description: string;
|
|
196
|
+
artifactId?: string | undefined;
|
|
197
|
+
sha256?: string | undefined;
|
|
198
|
+
providesTools?: string[] | undefined;
|
|
199
|
+
};
|
|
200
|
+
}[] | undefined;
|
|
201
|
+
} | undefined;
|
|
57
202
|
/**
|
|
58
203
|
* A server address as the plugin stores and calls it: https anywhere, plain http only on
|
|
59
204
|
* this machine, no query or fragment, no trailing slash. Throws a message for the member.
|
|
@@ -82,177 +227,269 @@ export declare class TeamworkClient {
|
|
|
82
227
|
/** Takes the code alone or the whole `/teamwork authorize <code>` line the sign-in page shows, so the panel accepts what was copied. */
|
|
83
228
|
completeLogin(pasted: string): Promise<void>;
|
|
84
229
|
private api;
|
|
230
|
+
downloadArtifact(teamId: string, id: string, digest: string): Promise<string>;
|
|
231
|
+
submitPlugin(teamId: string, bytes: Buffer, sha256: string, input: {
|
|
232
|
+
name: string;
|
|
233
|
+
note: string;
|
|
234
|
+
configId?: string;
|
|
235
|
+
baseVersion: number;
|
|
236
|
+
}, signal: AbortSignal): Promise<unknown>;
|
|
237
|
+
assistantChange(teamId: string, action: string, input: Record<string, unknown>, signal: AbortSignal): Promise<unknown>;
|
|
238
|
+
reviewPreview(teamId: string, id: string, signal: AbortSignal): Promise<{
|
|
239
|
+
revision: number;
|
|
240
|
+
proposal: unknown;
|
|
241
|
+
configId: string;
|
|
242
|
+
baseVersion: number;
|
|
243
|
+
}>;
|
|
244
|
+
exportUsage(teamId: string, filters: Record<string, string>, signal: AbortSignal): Promise<string>;
|
|
245
|
+
/** Narrow team operations; credentials never enter model-visible results. */
|
|
246
|
+
assistantRead(teamId: string, action: 'configs' | 'usage' | 'budgets' | 'members' | 'submissions' | 'history' | 'providers', signal: AbortSignal, filters?: Record<string, string>): Promise<any>;
|
|
85
247
|
sync(): Promise<{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
248
|
+
teams: {
|
|
249
|
+
teamId: string;
|
|
250
|
+
teamName: string;
|
|
251
|
+
role: "admin" | "member";
|
|
252
|
+
configs: ({
|
|
253
|
+
kind: "model";
|
|
254
|
+
data: {
|
|
255
|
+
provider: string;
|
|
256
|
+
model: string;
|
|
257
|
+
contextWindow?: number | undefined;
|
|
258
|
+
maxTokens?: number | undefined;
|
|
259
|
+
};
|
|
260
|
+
id: string;
|
|
261
|
+
name: string;
|
|
262
|
+
version: number;
|
|
263
|
+
builtin?: "team-assistant" | undefined;
|
|
264
|
+
} | {
|
|
265
|
+
kind: "preset";
|
|
266
|
+
data: {
|
|
267
|
+
systemPrompt: string;
|
|
268
|
+
inheritModel?: boolean | undefined;
|
|
269
|
+
provider?: string | undefined;
|
|
270
|
+
model?: string | undefined;
|
|
271
|
+
modelConfigId?: string | undefined;
|
|
272
|
+
description?: string | undefined;
|
|
273
|
+
instructions?: string | undefined;
|
|
274
|
+
outputDescription?: string | undefined;
|
|
275
|
+
pluginDependencies?: {
|
|
276
|
+
pluginConfigId: string;
|
|
277
|
+
version: string;
|
|
278
|
+
}[] | undefined;
|
|
279
|
+
requiredTools?: string[] | undefined;
|
|
280
|
+
optionalTools?: string[] | undefined;
|
|
281
|
+
contextWindow?: number | undefined;
|
|
282
|
+
maxTokens?: number | undefined;
|
|
283
|
+
};
|
|
284
|
+
id: string;
|
|
285
|
+
name: string;
|
|
286
|
+
version: number;
|
|
287
|
+
builtin?: "team-assistant" | undefined;
|
|
288
|
+
} | {
|
|
289
|
+
kind: "plugin";
|
|
290
|
+
data: {
|
|
291
|
+
package: string;
|
|
112
292
|
version: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
293
|
+
description: string;
|
|
294
|
+
artifactId?: string | undefined;
|
|
295
|
+
sha256?: string | undefined;
|
|
296
|
+
providesTools?: string[] | undefined;
|
|
297
|
+
};
|
|
298
|
+
id: string;
|
|
299
|
+
name: string;
|
|
300
|
+
version: number;
|
|
301
|
+
builtin?: "team-assistant" | undefined;
|
|
302
|
+
})[];
|
|
303
|
+
pluginVersions?: {
|
|
304
|
+
configId: string;
|
|
305
|
+
name: string;
|
|
306
|
+
data: {
|
|
307
|
+
package: string;
|
|
308
|
+
version: string;
|
|
309
|
+
description: string;
|
|
310
|
+
artifactId?: string | undefined;
|
|
311
|
+
sha256?: string | undefined;
|
|
312
|
+
providesTools?: string[] | undefined;
|
|
313
|
+
};
|
|
314
|
+
}[] | undefined;
|
|
315
|
+
}[];
|
|
134
316
|
}>;
|
|
135
317
|
private syncOnce;
|
|
136
318
|
restore(): Promise<{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
319
|
+
teams: {
|
|
320
|
+
teamId: string;
|
|
321
|
+
teamName: string;
|
|
322
|
+
role: "admin" | "member";
|
|
323
|
+
configs: ({
|
|
324
|
+
kind: "model";
|
|
325
|
+
data: {
|
|
326
|
+
provider: string;
|
|
327
|
+
model: string;
|
|
328
|
+
contextWindow?: number | undefined;
|
|
329
|
+
maxTokens?: number | undefined;
|
|
330
|
+
};
|
|
331
|
+
id: string;
|
|
332
|
+
name: string;
|
|
333
|
+
version: number;
|
|
334
|
+
builtin?: "team-assistant" | undefined;
|
|
335
|
+
} | {
|
|
336
|
+
kind: "preset";
|
|
337
|
+
data: {
|
|
338
|
+
systemPrompt: string;
|
|
339
|
+
inheritModel?: boolean | undefined;
|
|
340
|
+
provider?: string | undefined;
|
|
341
|
+
model?: string | undefined;
|
|
342
|
+
modelConfigId?: string | undefined;
|
|
343
|
+
description?: string | undefined;
|
|
344
|
+
instructions?: string | undefined;
|
|
345
|
+
outputDescription?: string | undefined;
|
|
346
|
+
pluginDependencies?: {
|
|
347
|
+
pluginConfigId: string;
|
|
348
|
+
version: string;
|
|
349
|
+
}[] | undefined;
|
|
350
|
+
requiredTools?: string[] | undefined;
|
|
351
|
+
optionalTools?: string[] | undefined;
|
|
352
|
+
contextWindow?: number | undefined;
|
|
353
|
+
maxTokens?: number | undefined;
|
|
354
|
+
};
|
|
355
|
+
id: string;
|
|
356
|
+
name: string;
|
|
357
|
+
version: number;
|
|
358
|
+
builtin?: "team-assistant" | undefined;
|
|
359
|
+
} | {
|
|
360
|
+
kind: "plugin";
|
|
361
|
+
data: {
|
|
362
|
+
package: string;
|
|
163
363
|
version: string;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
364
|
+
description: string;
|
|
365
|
+
artifactId?: string | undefined;
|
|
366
|
+
sha256?: string | undefined;
|
|
367
|
+
providesTools?: string[] | undefined;
|
|
368
|
+
};
|
|
369
|
+
id: string;
|
|
370
|
+
name: string;
|
|
371
|
+
version: number;
|
|
372
|
+
builtin?: "team-assistant" | undefined;
|
|
373
|
+
})[];
|
|
374
|
+
pluginVersions?: {
|
|
375
|
+
configId: string;
|
|
376
|
+
name: string;
|
|
377
|
+
data: {
|
|
378
|
+
package: string;
|
|
379
|
+
version: string;
|
|
380
|
+
description: string;
|
|
381
|
+
artifactId?: string | undefined;
|
|
382
|
+
sha256?: string | undefined;
|
|
383
|
+
providesTools?: string[] | undefined;
|
|
384
|
+
};
|
|
385
|
+
}[] | undefined;
|
|
386
|
+
}[];
|
|
185
387
|
} | undefined>;
|
|
186
388
|
platformCredential(): string;
|
|
187
389
|
sessionRevision(): number;
|
|
188
390
|
authenticated(): boolean;
|
|
391
|
+
/** Independent of configuration sync: no credentials or other members' budgets leave the host. */
|
|
392
|
+
quota(teamId: string): Promise<PanelQuota>;
|
|
393
|
+
profile(): Promise<PanelProfile>;
|
|
394
|
+
updateProfile(input: {
|
|
395
|
+
name: string | null;
|
|
396
|
+
locale: 'en' | 'zh-CN';
|
|
397
|
+
}): Promise<PanelProfile>;
|
|
189
398
|
current(): {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
399
|
+
teams: {
|
|
400
|
+
teamId: string;
|
|
401
|
+
teamName: string;
|
|
402
|
+
role: "admin" | "member";
|
|
403
|
+
configs: ({
|
|
404
|
+
kind: "model";
|
|
405
|
+
data: {
|
|
406
|
+
provider: string;
|
|
407
|
+
model: string;
|
|
408
|
+
contextWindow?: number | undefined;
|
|
409
|
+
maxTokens?: number | undefined;
|
|
410
|
+
};
|
|
411
|
+
id: string;
|
|
412
|
+
name: string;
|
|
413
|
+
version: number;
|
|
414
|
+
builtin?: "team-assistant" | undefined;
|
|
415
|
+
} | {
|
|
416
|
+
kind: "preset";
|
|
417
|
+
data: {
|
|
418
|
+
systemPrompt: string;
|
|
419
|
+
inheritModel?: boolean | undefined;
|
|
420
|
+
provider?: string | undefined;
|
|
421
|
+
model?: string | undefined;
|
|
422
|
+
modelConfigId?: string | undefined;
|
|
423
|
+
description?: string | undefined;
|
|
424
|
+
instructions?: string | undefined;
|
|
425
|
+
outputDescription?: string | undefined;
|
|
426
|
+
pluginDependencies?: {
|
|
427
|
+
pluginConfigId: string;
|
|
428
|
+
version: string;
|
|
429
|
+
}[] | undefined;
|
|
430
|
+
requiredTools?: string[] | undefined;
|
|
431
|
+
optionalTools?: string[] | undefined;
|
|
432
|
+
contextWindow?: number | undefined;
|
|
433
|
+
maxTokens?: number | undefined;
|
|
434
|
+
};
|
|
435
|
+
id: string;
|
|
436
|
+
name: string;
|
|
437
|
+
version: number;
|
|
438
|
+
builtin?: "team-assistant" | undefined;
|
|
439
|
+
} | {
|
|
440
|
+
kind: "plugin";
|
|
441
|
+
data: {
|
|
442
|
+
package: string;
|
|
216
443
|
version: string;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
444
|
+
description: string;
|
|
445
|
+
artifactId?: string | undefined;
|
|
446
|
+
sha256?: string | undefined;
|
|
447
|
+
providesTools?: string[] | undefined;
|
|
448
|
+
};
|
|
449
|
+
id: string;
|
|
450
|
+
name: string;
|
|
451
|
+
version: number;
|
|
452
|
+
builtin?: "team-assistant" | undefined;
|
|
453
|
+
})[];
|
|
454
|
+
pluginVersions?: {
|
|
455
|
+
configId: string;
|
|
456
|
+
name: string;
|
|
457
|
+
data: {
|
|
458
|
+
package: string;
|
|
459
|
+
version: string;
|
|
460
|
+
description: string;
|
|
461
|
+
artifactId?: string | undefined;
|
|
462
|
+
sha256?: string | undefined;
|
|
463
|
+
providesTools?: string[] | undefined;
|
|
464
|
+
};
|
|
465
|
+
}[] | undefined;
|
|
466
|
+
}[];
|
|
238
467
|
} | undefined;
|
|
239
468
|
clear(): Promise<void>;
|
|
240
469
|
logout(): Promise<void>;
|
|
241
470
|
/** Forgets the token locally; the platform cannot revoke it, but a removed member is refused on every request. */
|
|
242
471
|
private logoutOnce;
|
|
243
472
|
}
|
|
244
|
-
/**
|
|
473
|
+
/**
|
|
474
|
+
* Reconcile only registrations owned by this plugin, for every team at once. The host's local registry is never
|
|
475
|
+
* enumerated or mutated. A registration is `team:<teamId>:<configId>`, and a team's new name re-registers its entries.
|
|
476
|
+
*/
|
|
245
477
|
export declare class TeamOverlay {
|
|
246
478
|
private register;
|
|
247
479
|
private owned;
|
|
248
|
-
constructor(register: (id: string, config: TeamConfig) => Promise<() => Promise<void>>);
|
|
480
|
+
constructor(register: (id: string, config: TeamConfig, team: TeamSnapshot) => Promise<() => Promise<void>>);
|
|
249
481
|
private operations;
|
|
250
482
|
apply(snapshot?: Snapshot): Promise<void>;
|
|
251
483
|
private reconcile;
|
|
252
484
|
}
|
|
253
|
-
|
|
485
|
+
export declare function pinnedPlugin(snapshot: Snapshot | undefined, id: string, version: string): Extract<TeamConfig, {
|
|
486
|
+
kind: 'plugin';
|
|
487
|
+
}> | undefined;
|
|
488
|
+
export declare const inheritsModel: (config: TeamConfig) => boolean;
|
|
489
|
+
/** References resolve within the configuration's own team only; never across teams, never to local models. */
|
|
254
490
|
export declare function modelData(snapshot: Snapshot, config: TeamConfig): {
|
|
255
491
|
systemPrompt: string;
|
|
492
|
+
inheritModel?: boolean | undefined;
|
|
256
493
|
provider?: string | undefined;
|
|
257
494
|
model?: string | undefined;
|
|
258
495
|
modelConfigId?: string | undefined;
|