@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.
Files changed (65) hide show
  1. package/README.md +109 -2
  2. package/icon.svg +4 -0
  3. package/lib/aes-gcm.js +22 -0
  4. package/lib/aes-gcm.js.map +1 -0
  5. package/lib/assistant-tools.js +421 -0
  6. package/lib/assistant-tools.js.map +1 -0
  7. package/lib/bridge.js +127 -8
  8. package/lib/bridge.js.map +1 -1
  9. package/lib/cli.js +1 -1
  10. package/lib/cli.js.map +1 -1
  11. package/lib/client.js +206 -18
  12. package/lib/client.js.map +1 -1
  13. package/lib/config-sync.js +2 -1
  14. package/lib/config-sync.js.map +1 -1
  15. package/lib/index.js +187 -73
  16. package/lib/index.js.map +1 -1
  17. package/lib/local-share.js +87 -0
  18. package/lib/local-share.js.map +1 -0
  19. package/lib/panel.js +9 -0
  20. package/lib/panel.js.map +1 -1
  21. package/lib/phone-security.js +283 -0
  22. package/lib/phone-security.js.map +1 -0
  23. package/lib/phone-session.js +20 -0
  24. package/lib/phone-session.js.map +1 -0
  25. package/lib/phone-uploads.js +136 -0
  26. package/lib/phone-uploads.js.map +1 -0
  27. package/lib/platform-models.js +2 -2
  28. package/lib/platform-models.js.map +1 -1
  29. package/lib/preset-context.js +1 -1
  30. package/lib/preset-context.js.map +1 -1
  31. package/lib/relay.js +9 -4
  32. package/lib/relay.js.map +1 -1
  33. package/lib/secure-channel.js +398 -0
  34. package/lib/secure-channel.js.map +1 -0
  35. package/lib/types/aes-gcm.d.ts +3 -0
  36. package/lib/types/aes-gcm.d.ts.map +1 -0
  37. package/lib/types/assistant-tools.d.ts +7 -0
  38. package/lib/types/assistant-tools.d.ts.map +1 -0
  39. package/lib/types/bridge.d.ts +5 -0
  40. package/lib/types/bridge.d.ts.map +1 -1
  41. package/lib/types/client.d.ts +432 -195
  42. package/lib/types/client.d.ts.map +1 -1
  43. package/lib/types/config-sync.d.ts +1 -1
  44. package/lib/types/config-sync.d.ts.map +1 -1
  45. package/lib/types/index.d.ts.map +1 -1
  46. package/lib/types/local-share.d.ts +11 -0
  47. package/lib/types/local-share.d.ts.map +1 -0
  48. package/lib/types/panel.d.ts +39 -5
  49. package/lib/types/panel.d.ts.map +1 -1
  50. package/lib/types/phone-security.d.ts +59 -0
  51. package/lib/types/phone-security.d.ts.map +1 -0
  52. package/lib/types/phone-session.d.ts +52 -0
  53. package/lib/types/phone-session.d.ts.map +1 -0
  54. package/lib/types/phone-uploads.d.ts +75 -0
  55. package/lib/types/phone-uploads.d.ts.map +1 -0
  56. package/lib/types/platform-models.d.ts.map +1 -1
  57. package/lib/types/preset-context.d.ts +2 -0
  58. package/lib/types/preset-context.d.ts.map +1 -1
  59. package/lib/types/preset-session.d.ts +1 -1
  60. package/lib/types/relay.d.ts +10 -2
  61. package/lib/types/relay.d.ts.map +1 -1
  62. package/lib/types/secure-channel.d.ts +79 -0
  63. package/lib/types/secure-channel.d.ts.map +1 -0
  64. package/lib/web/client.js +850 -269
  65. package/package.json +11 -2
@@ -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
- teamId: z.ZodString;
4
- teamName: z.ZodString;
5
- role: z.ZodEnum<{
6
- admin: "admin";
7
- member: "member";
8
- }>;
9
- configs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
10
- kind: z.ZodLiteral<"model">;
11
- data: z.ZodObject<{
12
- provider: z.ZodString;
13
- model: z.ZodString;
14
- contextWindow: z.ZodOptional<z.ZodNumber>;
15
- maxTokens: z.ZodOptional<z.ZodNumber>;
16
- }, z.core.$strip>;
17
- id: z.ZodString;
18
- name: z.ZodString;
19
- version: z.ZodNumber;
20
- }, z.core.$strip>, z.ZodObject<{
21
- kind: z.ZodLiteral<"preset">;
22
- data: z.ZodObject<{
23
- provider: z.ZodOptional<z.ZodString>;
24
- model: z.ZodOptional<z.ZodString>;
25
- modelConfigId: z.ZodOptional<z.ZodString>;
26
- description: z.ZodOptional<z.ZodString>;
27
- instructions: z.ZodOptional<z.ZodString>;
28
- outputDescription: z.ZodOptional<z.ZodString>;
29
- pluginDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
- pluginConfigId: z.ZodString;
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
- }, z.core.$strip>>>;
33
- requiredTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
- optionalTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
- systemPrompt: z.ZodDefault<z.ZodString>;
36
- contextWindow: z.ZodOptional<z.ZodNumber>;
37
- maxTokens: z.ZodOptional<z.ZodNumber>;
38
- }, z.core.$strip>;
39
- id: z.ZodString;
40
- name: z.ZodString;
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 TeamConfig = Snapshot['configs'][number];
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
- teamId: string;
87
- teamName: string;
88
- role: "admin" | "member";
89
- configs: ({
90
- kind: "model";
91
- data: {
92
- provider: string;
93
- model: string;
94
- contextWindow?: number | undefined;
95
- maxTokens?: number | undefined;
96
- };
97
- id: string;
98
- name: string;
99
- version: number;
100
- } | {
101
- kind: "preset";
102
- data: {
103
- systemPrompt: string;
104
- provider?: string | undefined;
105
- model?: string | undefined;
106
- modelConfigId?: string | undefined;
107
- description?: string | undefined;
108
- instructions?: string | undefined;
109
- outputDescription?: string | undefined;
110
- pluginDependencies?: {
111
- pluginConfigId: string;
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
- }[] | undefined;
114
- requiredTools?: string[] | undefined;
115
- optionalTools?: string[] | undefined;
116
- contextWindow?: number | undefined;
117
- maxTokens?: number | undefined;
118
- };
119
- id: string;
120
- name: string;
121
- version: number;
122
- } | {
123
- kind: "plugin";
124
- data: {
125
- package: string;
126
- version: string;
127
- description: string;
128
- providesTools?: string[] | undefined;
129
- };
130
- id: string;
131
- name: string;
132
- version: number;
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
- teamId: string;
138
- teamName: string;
139
- role: "admin" | "member";
140
- configs: ({
141
- kind: "model";
142
- data: {
143
- provider: string;
144
- model: string;
145
- contextWindow?: number | undefined;
146
- maxTokens?: number | undefined;
147
- };
148
- id: string;
149
- name: string;
150
- version: number;
151
- } | {
152
- kind: "preset";
153
- data: {
154
- systemPrompt: string;
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;
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
- }[] | 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
- } | {
174
- kind: "plugin";
175
- data: {
176
- package: string;
177
- version: string;
178
- description: string;
179
- providesTools?: string[] | undefined;
180
- };
181
- id: string;
182
- name: string;
183
- version: number;
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
- teamId: string;
191
- teamName: string;
192
- role: "admin" | "member";
193
- configs: ({
194
- kind: "model";
195
- data: {
196
- provider: string;
197
- model: string;
198
- contextWindow?: number | undefined;
199
- maxTokens?: number | undefined;
200
- };
201
- id: string;
202
- name: string;
203
- version: number;
204
- } | {
205
- kind: "preset";
206
- data: {
207
- systemPrompt: string;
208
- provider?: string | undefined;
209
- model?: string | undefined;
210
- modelConfigId?: string | undefined;
211
- description?: string | undefined;
212
- instructions?: string | undefined;
213
- outputDescription?: string | undefined;
214
- pluginDependencies?: {
215
- pluginConfigId: string;
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
- }[] | undefined;
218
- requiredTools?: string[] | undefined;
219
- optionalTools?: string[] | undefined;
220
- contextWindow?: number | undefined;
221
- maxTokens?: number | undefined;
222
- };
223
- id: string;
224
- name: string;
225
- version: number;
226
- } | {
227
- kind: "plugin";
228
- data: {
229
- package: string;
230
- version: string;
231
- description: string;
232
- providesTools?: string[] | undefined;
233
- };
234
- id: string;
235
- name: string;
236
- version: number;
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
- /** Reconcile only registrations owned by this plugin. The host's local registry is never enumerated or mutated. */
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
- /** References resolve within the current team snapshot only; never fall back to local models. */
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;