@plune-ai/cli 0.39.6 → 0.39.7

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.
@@ -1,940 +1,5 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The tool contract of Plune's agent surface (plune-ai/cli#146): names, task descriptions, input and
5
- * output schemas, and which tools write. The MCP server (`plune mcp serve`) registers exactly these, and the platform's
6
- * built-in agent imports them from `@plune-ai/cli/mcp-tools`, so the two paths cannot drift apart.
7
- *
8
- * `visibility`: `core` tools are listed to a client from the start; `discoverable` ones only after `plune_discover_tools`
9
- * names them (Qase's 17-of-41 rule). `endpoints` is what the tool calls on the platform, the
10
- * signature the no-duplicates check reads.
11
- */
12
- type ToolVisibility = 'core' | 'discoverable';
13
- interface PluneToolDefinition {
14
- readonly name: string;
15
- readonly title: string;
16
- readonly description: string;
17
- readonly input: z.ZodObject;
18
- readonly output: z.ZodObject;
19
- /** Needs a token with the `write` scope; refused for a `read` token. */
20
- readonly write: boolean;
21
- readonly visibility: ToolVisibility;
22
- readonly endpoints: readonly string[];
23
- }
24
- /** What a client sees before it asks for more. */
25
- declare const MAX_VISIBLE_TOOLS = 20;
26
- declare const PLUNE_TOOLS: readonly [{
27
- name: string;
28
- title: string;
29
- description: string;
30
- input: z.ZodObject<{}, z.core.$strict>;
31
- output: z.ZodObject<{
32
- projectId: z.ZodNullable<z.ZodString>;
33
- projects: z.ZodArray<z.ZodObject<{
34
- id: z.ZodOptional<z.ZodString>;
35
- }, z.core.$loose>>;
36
- suites: z.ZodArray<z.ZodObject<{
37
- id: z.ZodOptional<z.ZodString>;
38
- }, z.core.$loose>>;
39
- cases: z.ZodObject<{
40
- total: z.ZodNumber;
41
- }, z.core.$strip>;
42
- missions: z.ZodArray<z.ZodObject<{
43
- id: z.ZodOptional<z.ZodString>;
44
- }, z.core.$loose>>;
45
- reviewQueue: z.ZodObject<{
46
- pending: z.ZodNumber;
47
- more: z.ZodBoolean;
48
- }, z.core.$strip>;
49
- memoryRules: z.ZodArray<z.ZodObject<{
50
- id: z.ZodString;
51
- text: z.ZodString;
52
- }, z.core.$strip>>;
53
- }, z.core.$strip>;
54
- write: false;
55
- visibility: "core";
56
- endpoints: string[];
57
- }, {
58
- name: string;
59
- title: string;
60
- description: string;
61
- input: z.ZodObject<{
62
- kind: z.ZodEnum<{
63
- "test-case": "test-case";
64
- run: "run";
65
- "review-item": "review-item";
66
- }>;
67
- id: z.ZodString;
68
- }, z.core.$strict>;
69
- output: z.ZodObject<{
70
- kind: z.ZodString;
71
- item: z.ZodObject<{
72
- id: z.ZodOptional<z.ZodString>;
73
- }, z.core.$loose>;
74
- }, z.core.$strip>;
75
- write: false;
76
- visibility: "core";
77
- endpoints: string[];
78
- }, {
79
- name: string;
80
- title: string;
81
- description: string;
82
- input: z.ZodObject<{
83
- limit: z.ZodOptional<z.ZodNumber>;
84
- cursor: z.ZodOptional<z.ZodString>;
85
- filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
86
- }, z.core.$strict>;
87
- output: z.ZodObject<{
88
- testCases: z.ZodArray<z.ZodObject<{
89
- id: z.ZodOptional<z.ZodString>;
90
- }, z.core.$loose>>;
91
- total: z.ZodOptional<z.ZodNumber>;
92
- matching: z.ZodOptional<z.ZodNumber>;
93
- nextCursor: z.ZodNullable<z.ZodString>;
94
- }, z.core.$strip>;
95
- write: false;
96
- visibility: "core";
97
- endpoints: string[];
98
- }, {
99
- name: string;
100
- title: string;
101
- description: string;
102
- input: z.ZodObject<{
103
- limit: z.ZodOptional<z.ZodNumber>;
104
- cursor: z.ZodOptional<z.ZodString>;
105
- state: z.ZodOptional<z.ZodEnum<{
106
- pending: "pending";
107
- changes_requested: "changes_requested";
108
- approved: "approved";
109
- rejected: "rejected";
110
- }>>;
111
- kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
112
- endpoint: "endpoint";
113
- result: "result";
114
- proposal: "proposal";
115
- discovered: "discovered";
116
- strategy: "strategy";
117
- report: "report";
118
- memory_rule: "memory_rule";
119
- }>>>;
120
- missionId: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strict>;
122
- output: z.ZodObject<{
123
- items: z.ZodArray<z.ZodObject<{
124
- id: z.ZodOptional<z.ZodString>;
125
- }, z.core.$loose>>;
126
- nextCursor: z.ZodNullable<z.ZodString>;
127
- }, z.core.$strip>;
128
- write: false;
129
- visibility: "core";
130
- endpoints: string[];
131
- }, {
132
- name: string;
133
- title: string;
134
- description: string;
135
- input: z.ZodObject<{
136
- itemIds: z.ZodArray<z.ZodString>;
137
- verdict: z.ZodEnum<{
138
- approved: "approved";
139
- rejected: "rejected";
140
- }>;
141
- rejectionCategory: z.ZodOptional<z.ZodEnum<{
142
- duplicate: "duplicate";
143
- incorrect: "incorrect";
144
- "out-of-scope": "out-of-scope";
145
- "low-value": "low-value";
146
- "not-testable": "not-testable";
147
- other: "other";
148
- }>>;
149
- note: z.ZodOptional<z.ZodString>;
150
- confirm: z.ZodOptional<z.ZodString>;
151
- }, z.core.$strict>;
152
- output: z.ZodObject<{
153
- requested: z.ZodNumber;
154
- applied: z.ZodNumber;
155
- preview: z.ZodOptional<z.ZodObject<{
156
- total: z.ZodNumber;
157
- confirm: z.ZodString;
158
- expiresInSeconds: z.ZodNumber;
159
- }, z.core.$loose>>;
160
- report: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
161
- }, z.core.$strip>;
162
- write: true;
163
- visibility: "core";
164
- endpoints: string[];
165
- }, {
166
- name: string;
167
- title: string;
168
- description: string;
169
- input: z.ZodObject<{
170
- target: z.ZodString;
171
- missionId: z.ZodOptional<z.ZodString>;
172
- cases: z.ZodArray<z.ZodObject<{
173
- title: z.ZodString;
174
- steps: z.ZodArray<z.ZodString>;
175
- expected: z.ZodString;
176
- execution: z.ZodOptional<z.ZodEnum<{
177
- manual: "manual";
178
- auto: "auto";
179
- }>>;
180
- technique: z.ZodOptional<z.ZodString>;
181
- priority: z.ZodOptional<z.ZodString>;
182
- source: z.ZodOptional<z.ZodObject<{
183
- kind: z.ZodEnum<{
184
- url: "url";
185
- requirement: "requirement";
186
- "openapi-operation": "openapi-operation";
187
- "pasted-text": "pasted-text";
188
- }>;
189
- value: z.ZodString;
190
- }, z.core.$strict>>;
191
- rationale: z.ZodOptional<z.ZodString>;
192
- }, z.core.$strict>>;
193
- dry_run: z.ZodOptional<z.ZodBoolean>;
194
- }, z.core.$strict>;
195
- output: z.ZodObject<{
196
- dryRun: z.ZodBoolean;
197
- requested: z.ZodNumber;
198
- applied: z.ZodNumber;
199
- requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
200
- method: z.ZodString;
201
- path: z.ZodString;
202
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
203
- body: z.ZodOptional<z.ZodUnknown>;
204
- }, z.core.$strip>>>;
205
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
- ok: z.ZodBoolean;
207
- status: z.ZodOptional<z.ZodNumber>;
208
- id: z.ZodOptional<z.ZodString>;
209
- error: z.ZodOptional<z.ZodString>;
210
- code: z.ZodOptional<z.ZodString>;
211
- }, z.core.$strip>>>;
212
- report: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
213
- itemIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
214
- }, z.core.$strip>;
215
- write: true;
216
- visibility: "core";
217
- endpoints: string[];
218
- }, {
219
- name: string;
220
- title: string;
221
- description: string;
222
- input: z.ZodObject<{
223
- dry_run: z.ZodOptional<z.ZodBoolean>;
224
- input: z.ZodObject<{
225
- kind: z.ZodLiteral<"pasted-text">;
226
- text: z.ZodString;
227
- title: z.ZodOptional<z.ZodString>;
228
- }, z.core.$strict>;
229
- maxCases: z.ZodOptional<z.ZodNumber>;
230
- language: z.ZodOptional<z.ZodString>;
231
- confirmDuplicates: z.ZodOptional<z.ZodBoolean>;
232
- projectId: z.ZodOptional<z.ZodString>;
233
- }, z.core.$strict>;
234
- output: z.ZodObject<{
235
- dryRun: z.ZodBoolean;
236
- request: z.ZodOptional<z.ZodObject<{
237
- method: z.ZodString;
238
- path: z.ZodString;
239
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
240
- body: z.ZodOptional<z.ZodUnknown>;
241
- }, z.core.$strip>>;
242
- result: z.ZodOptional<z.ZodObject<{
243
- id: z.ZodOptional<z.ZodString>;
244
- }, z.core.$loose>>;
245
- }, z.core.$strip>;
246
- write: true;
247
- visibility: "core";
248
- endpoints: string[];
249
- }, {
250
- name: string;
251
- title: string;
252
- description: string;
253
- input: z.ZodObject<{
254
- projectId: z.ZodOptional<z.ZodString>;
255
- generationId: z.ZodString;
256
- }, z.core.$strict>;
257
- output: z.ZodObject<{
258
- generation: z.ZodObject<{
259
- id: z.ZodOptional<z.ZodString>;
260
- }, z.core.$loose>;
261
- }, z.core.$strip>;
262
- write: false;
263
- visibility: "core";
264
- endpoints: string[];
265
- }, {
266
- name: string;
267
- title: string;
268
- description: string;
269
- input: z.ZodObject<{
270
- dry_run: z.ZodOptional<z.ZodBoolean>;
271
- name: z.ZodString;
272
- summary: z.ZodOptional<z.ZodString>;
273
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
- state: z.ZodOptional<z.ZodEnum<{
275
- draft: "draft";
276
- active: "active";
277
- done: "done";
278
- }>>;
279
- documentation: z.ZodOptional<z.ZodEnum<{
280
- unknown: "unknown";
281
- provided: "provided";
282
- none: "none";
283
- }>>;
284
- }, z.core.$strict>;
285
- output: z.ZodObject<{
286
- dryRun: z.ZodBoolean;
287
- request: z.ZodOptional<z.ZodObject<{
288
- method: z.ZodString;
289
- path: z.ZodString;
290
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
291
- body: z.ZodOptional<z.ZodUnknown>;
292
- }, z.core.$strip>>;
293
- result: z.ZodOptional<z.ZodObject<{
294
- id: z.ZodOptional<z.ZodString>;
295
- }, z.core.$loose>>;
296
- }, z.core.$strip>;
297
- write: true;
298
- visibility: "core";
299
- endpoints: string[];
300
- }, {
301
- name: string;
302
- title: string;
303
- description: string;
304
- input: z.ZodObject<{
305
- missionId: z.ZodString;
306
- }, z.core.$strict>;
307
- output: z.ZodObject<{
308
- mission: z.ZodObject<{
309
- id: z.ZodOptional<z.ZodString>;
310
- }, z.core.$loose>;
311
- }, z.core.$strip>;
312
- write: false;
313
- visibility: "core";
314
- endpoints: string[];
315
- }, {
316
- name: string;
317
- title: string;
318
- description: string;
319
- input: z.ZodObject<{
320
- missionId: z.ZodString;
321
- name: z.ZodOptional<z.ZodString>;
322
- summary: z.ZodOptional<z.ZodString>;
323
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
324
- state: z.ZodOptional<z.ZodEnum<{
325
- draft: "draft";
326
- active: "active";
327
- done: "done";
328
- }>>;
329
- documentation: z.ZodOptional<z.ZodEnum<{
330
- unknown: "unknown";
331
- provided: "provided";
332
- none: "none";
333
- }>>;
334
- dry_run: z.ZodOptional<z.ZodBoolean>;
335
- }, z.core.$strict>;
336
- output: z.ZodObject<{
337
- dryRun: z.ZodBoolean;
338
- request: z.ZodOptional<z.ZodObject<{
339
- method: z.ZodString;
340
- path: z.ZodString;
341
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
342
- body: z.ZodOptional<z.ZodUnknown>;
343
- }, z.core.$strip>>;
344
- result: z.ZodOptional<z.ZodObject<{
345
- id: z.ZodOptional<z.ZodString>;
346
- }, z.core.$loose>>;
347
- }, z.core.$strip>;
348
- write: true;
349
- visibility: "core";
350
- endpoints: string[];
351
- }, {
352
- name: string;
353
- title: string;
354
- description: string;
355
- input: z.ZodObject<{
356
- missionId: z.ZodString;
357
- kind: z.ZodEnum<{
358
- url: "url";
359
- openapi: "openapi";
360
- repo: "repo";
361
- ticket: "ticket";
362
- file: "file";
363
- }>;
364
- ref: z.ZodOptional<z.ZodString>;
365
- name: z.ZodOptional<z.ZodString>;
366
- text: z.ZodOptional<z.ZodString>;
367
- title: z.ZodOptional<z.ZodString>;
368
- version: z.ZodOptional<z.ZodString>;
369
- dry_run: z.ZodOptional<z.ZodBoolean>;
370
- }, z.core.$strict>;
371
- output: z.ZodObject<{
372
- dryRun: z.ZodBoolean;
373
- request: z.ZodOptional<z.ZodObject<{
374
- method: z.ZodString;
375
- path: z.ZodString;
376
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
377
- body: z.ZodOptional<z.ZodUnknown>;
378
- }, z.core.$strip>>;
379
- result: z.ZodOptional<z.ZodObject<{
380
- id: z.ZodOptional<z.ZodString>;
381
- }, z.core.$loose>>;
382
- }, z.core.$strip>;
383
- write: true;
384
- visibility: "core";
385
- endpoints: string[];
386
- }, {
387
- name: string;
388
- title: string;
389
- description: string;
390
- input: z.ZodObject<{
391
- template: z.ZodEnum<{
392
- plain: "plain";
393
- access: "access";
394
- }>;
395
- text: z.ZodString;
396
- missionId: z.ZodOptional<z.ZodString>;
397
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
398
- access: z.ZodOptional<z.ZodArray<z.ZodEnum<{
399
- openapi: "openapi";
400
- repo: "repo";
401
- staging: "staging";
402
- har: "har";
403
- }>>>;
404
- dry_run: z.ZodOptional<z.ZodBoolean>;
405
- }, z.core.$strict>;
406
- output: z.ZodObject<{
407
- dryRun: z.ZodBoolean;
408
- request: z.ZodOptional<z.ZodObject<{
409
- method: z.ZodString;
410
- path: z.ZodString;
411
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
412
- body: z.ZodOptional<z.ZodUnknown>;
413
- }, z.core.$strip>>;
414
- result: z.ZodOptional<z.ZodObject<{
415
- id: z.ZodOptional<z.ZodString>;
416
- }, z.core.$loose>>;
417
- }, z.core.$strip>;
418
- write: true;
419
- visibility: "core";
420
- endpoints: string[];
421
- }, {
422
- name: string;
423
- title: string;
424
- description: string;
425
- input: z.ZodObject<{
426
- limit: z.ZodOptional<z.ZodNumber>;
427
- cursor: z.ZodOptional<z.ZodString>;
428
- missionId: z.ZodOptional<z.ZodString>;
429
- state: z.ZodOptional<z.ZodEnum<{
430
- pending: "pending";
431
- changes_requested: "changes_requested";
432
- approved: "approved";
433
- rejected: "rejected";
434
- }>>;
435
- }, z.core.$strict>;
436
- output: z.ZodObject<{
437
- questions: z.ZodArray<z.ZodObject<{
438
- id: z.ZodOptional<z.ZodString>;
439
- }, z.core.$loose>>;
440
- nextCursor: z.ZodNullable<z.ZodString>;
441
- }, z.core.$strip>;
442
- write: false;
443
- visibility: "core";
444
- endpoints: string[];
445
- }, {
446
- name: string;
447
- title: string;
448
- description: string;
449
- input: z.ZodObject<{
450
- missionId: z.ZodString;
451
- content: z.ZodObject<{
452
- objectives: z.ZodArray<z.ZodObject<{
453
- text: z.ZodString;
454
- source: z.ZodOptional<z.ZodObject<{
455
- kind: z.ZodEnum<{
456
- url: "url";
457
- "mission-source": "mission-source";
458
- "doc-section": "doc-section";
459
- screen: "screen";
460
- endpoint: "endpoint";
461
- requirement: "requirement";
462
- }>;
463
- ref: z.ZodString;
464
- }, z.core.$strict>>;
465
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
466
- waitingOn: z.ZodOptional<z.ZodString>;
467
- }, z.core.$strict>>;
468
- scope: z.ZodObject<{
469
- in: z.ZodArray<z.ZodObject<{
470
- text: z.ZodString;
471
- source: z.ZodOptional<z.ZodObject<{
472
- kind: z.ZodEnum<{
473
- url: "url";
474
- "mission-source": "mission-source";
475
- "doc-section": "doc-section";
476
- screen: "screen";
477
- endpoint: "endpoint";
478
- requirement: "requirement";
479
- }>;
480
- ref: z.ZodString;
481
- }, z.core.$strict>>;
482
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
483
- waitingOn: z.ZodOptional<z.ZodString>;
484
- }, z.core.$strict>>;
485
- out: z.ZodArray<z.ZodObject<{
486
- text: z.ZodString;
487
- source: z.ZodOptional<z.ZodObject<{
488
- kind: z.ZodEnum<{
489
- url: "url";
490
- "mission-source": "mission-source";
491
- "doc-section": "doc-section";
492
- screen: "screen";
493
- endpoint: "endpoint";
494
- requirement: "requirement";
495
- }>;
496
- ref: z.ZodString;
497
- }, z.core.$strict>>;
498
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
499
- waitingOn: z.ZodOptional<z.ZodString>;
500
- }, z.core.$strict>>;
501
- }, z.core.$strict>;
502
- approach: z.ZodArray<z.ZodObject<{
503
- text: z.ZodString;
504
- source: z.ZodOptional<z.ZodObject<{
505
- kind: z.ZodEnum<{
506
- url: "url";
507
- "mission-source": "mission-source";
508
- "doc-section": "doc-section";
509
- screen: "screen";
510
- endpoint: "endpoint";
511
- requirement: "requirement";
512
- }>;
513
- ref: z.ZodString;
514
- }, z.core.$strict>>;
515
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
516
- waitingOn: z.ZodOptional<z.ZodString>;
517
- }, z.core.$strict>>;
518
- profile: z.ZodObject<{
519
- levels: z.ZodArray<z.ZodEnum<{
520
- component: "component";
521
- "component-integration": "component-integration";
522
- system: "system";
523
- "system-integration": "system-integration";
524
- acceptance: "acceptance";
525
- }>>;
526
- characteristics: z.ZodArray<z.ZodEnum<{
527
- "functional-suitability": "functional-suitability";
528
- "performance-efficiency": "performance-efficiency";
529
- compatibility: "compatibility";
530
- "interaction-capability": "interaction-capability";
531
- reliability: "reliability";
532
- security: "security";
533
- maintainability: "maintainability";
534
- flexibility: "flexibility";
535
- safety: "safety";
536
- }>>;
537
- techniques: z.ZodArray<z.ZodEnum<{
538
- "equivalence-partitioning": "equivalence-partitioning";
539
- "boundary-value": "boundary-value";
540
- "decision-table": "decision-table";
541
- "state-transition": "state-transition";
542
- statement: "statement";
543
- branch: "branch";
544
- "error-guessing": "error-guessing";
545
- exploratory: "exploratory";
546
- checklist: "checklist";
547
- }>>;
548
- split: z.ZodObject<{
549
- api: z.ZodNumber;
550
- ui: z.ZodNumber;
551
- manual: z.ZodNumber;
552
- }, z.core.$strict>;
553
- notes: z.ZodArray<z.ZodObject<{
554
- text: z.ZodString;
555
- source: z.ZodOptional<z.ZodObject<{
556
- kind: z.ZodEnum<{
557
- url: "url";
558
- "mission-source": "mission-source";
559
- "doc-section": "doc-section";
560
- screen: "screen";
561
- endpoint: "endpoint";
562
- requirement: "requirement";
563
- }>;
564
- ref: z.ZodString;
565
- }, z.core.$strict>>;
566
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
567
- waitingOn: z.ZodOptional<z.ZodString>;
568
- }, z.core.$strict>>;
569
- }, z.core.$strict>;
570
- risks: z.ZodArray<z.ZodObject<{
571
- likelihood: z.ZodEnum<{
572
- low: "low";
573
- medium: "medium";
574
- high: "high";
575
- }>;
576
- impact: z.ZodEnum<{
577
- low: "low";
578
- medium: "medium";
579
- high: "high";
580
- }>;
581
- caseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
582
- requirementIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
583
- text: z.ZodString;
584
- source: z.ZodOptional<z.ZodObject<{
585
- kind: z.ZodEnum<{
586
- url: "url";
587
- "mission-source": "mission-source";
588
- "doc-section": "doc-section";
589
- screen: "screen";
590
- endpoint: "endpoint";
591
- requirement: "requirement";
592
- }>;
593
- ref: z.ZodString;
594
- }, z.core.$strict>>;
595
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
596
- waitingOn: z.ZodOptional<z.ZodString>;
597
- }, z.core.$strict>>;
598
- entryCriteria: z.ZodArray<z.ZodObject<{
599
- text: z.ZodString;
600
- source: z.ZodOptional<z.ZodObject<{
601
- kind: z.ZodEnum<{
602
- url: "url";
603
- "mission-source": "mission-source";
604
- "doc-section": "doc-section";
605
- screen: "screen";
606
- endpoint: "endpoint";
607
- requirement: "requirement";
608
- }>;
609
- ref: z.ZodString;
610
- }, z.core.$strict>>;
611
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
612
- waitingOn: z.ZodOptional<z.ZodString>;
613
- }, z.core.$strict>>;
614
- exitCriteria: z.ZodArray<z.ZodObject<{
615
- text: z.ZodString;
616
- source: z.ZodOptional<z.ZodObject<{
617
- kind: z.ZodEnum<{
618
- url: "url";
619
- "mission-source": "mission-source";
620
- "doc-section": "doc-section";
621
- screen: "screen";
622
- endpoint: "endpoint";
623
- requirement: "requirement";
624
- }>;
625
- ref: z.ZodString;
626
- }, z.core.$strict>>;
627
- assumption: z.ZodOptional<z.ZodLiteral<true>>;
628
- waitingOn: z.ZodOptional<z.ZodString>;
629
- }, z.core.$strict>>;
630
- }, z.core.$strict>;
631
- dry_run: z.ZodOptional<z.ZodBoolean>;
632
- }, z.core.$strict>;
633
- output: z.ZodObject<{
634
- dryRun: z.ZodBoolean;
635
- request: z.ZodOptional<z.ZodObject<{
636
- method: z.ZodString;
637
- path: z.ZodString;
638
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
639
- body: z.ZodOptional<z.ZodUnknown>;
640
- }, z.core.$strip>>;
641
- result: z.ZodOptional<z.ZodObject<{
642
- id: z.ZodOptional<z.ZodString>;
643
- }, z.core.$loose>>;
644
- checked: z.ZodOptional<z.ZodBoolean>;
645
- findings: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
646
- }, z.core.$strip>;
647
- write: true;
648
- visibility: "core";
649
- endpoints: string[];
650
- }, {
651
- name: string;
652
- title: string;
653
- description: string;
654
- input: z.ZodObject<{
655
- missionId: z.ZodString;
656
- dry_run: z.ZodOptional<z.ZodBoolean>;
657
- }, z.core.$strict>;
658
- output: z.ZodObject<{
659
- dryRun: z.ZodBoolean;
660
- request: z.ZodOptional<z.ZodObject<{
661
- method: z.ZodString;
662
- path: z.ZodString;
663
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
664
- body: z.ZodOptional<z.ZodUnknown>;
665
- }, z.core.$strip>>;
666
- result: z.ZodOptional<z.ZodObject<{
667
- id: z.ZodOptional<z.ZodString>;
668
- }, z.core.$loose>>;
669
- }, z.core.$strip>;
670
- write: true;
671
- visibility: "core";
672
- endpoints: string[];
673
- }, {
674
- name: string;
675
- title: string;
676
- description: string;
677
- input: z.ZodObject<{
678
- query: z.ZodOptional<z.ZodString>;
679
- names: z.ZodOptional<z.ZodArray<z.ZodString>>;
680
- }, z.core.$strict>;
681
- output: z.ZodObject<{
682
- revealed: z.ZodArray<z.ZodString>;
683
- available: z.ZodArray<z.ZodObject<{
684
- name: z.ZodString;
685
- title: z.ZodString;
686
- description: z.ZodString;
687
- write: z.ZodBoolean;
688
- inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
689
- }, z.core.$strip>>;
690
- visible: z.ZodArray<z.ZodString>;
691
- }, z.core.$strip>;
692
- write: false;
693
- visibility: "core";
694
- endpoints: string[];
695
- }, {
696
- name: string;
697
- title: string;
698
- description: string;
699
- input: z.ZodObject<{
700
- cases: z.ZodArray<z.ZodObject<{
701
- id: z.ZodString;
702
- changes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
703
- }, z.core.$strict>>;
704
- dry_run: z.ZodOptional<z.ZodBoolean>;
705
- }, z.core.$strict>;
706
- output: z.ZodObject<{
707
- dryRun: z.ZodBoolean;
708
- requested: z.ZodNumber;
709
- applied: z.ZodNumber;
710
- requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
711
- method: z.ZodString;
712
- path: z.ZodString;
713
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
714
- body: z.ZodOptional<z.ZodUnknown>;
715
- }, z.core.$strip>>>;
716
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
717
- ok: z.ZodBoolean;
718
- status: z.ZodOptional<z.ZodNumber>;
719
- id: z.ZodOptional<z.ZodString>;
720
- error: z.ZodOptional<z.ZodString>;
721
- code: z.ZodOptional<z.ZodString>;
722
- }, z.core.$strip>>>;
723
- report: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
724
- }, z.core.$strip>;
725
- write: true;
726
- visibility: "discoverable";
727
- endpoints: string[];
728
- }, {
729
- name: string;
730
- title: string;
731
- description: string;
732
- input: z.ZodObject<{
733
- run: z.ZodRecord<z.ZodString, z.ZodUnknown>;
734
- dry_run: z.ZodOptional<z.ZodBoolean>;
735
- }, z.core.$strict>;
736
- output: z.ZodObject<{
737
- dryRun: z.ZodBoolean;
738
- request: z.ZodOptional<z.ZodObject<{
739
- method: z.ZodString;
740
- path: z.ZodString;
741
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
742
- body: z.ZodOptional<z.ZodUnknown>;
743
- }, z.core.$strip>>;
744
- result: z.ZodOptional<z.ZodObject<{
745
- id: z.ZodOptional<z.ZodString>;
746
- }, z.core.$loose>>;
747
- }, z.core.$strip>;
748
- write: true;
749
- visibility: "discoverable";
750
- endpoints: string[];
751
- }, {
752
- name: string;
753
- title: string;
754
- description: string;
755
- input: z.ZodObject<{
756
- runId: z.ZodString;
757
- results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
758
- combination: z.ZodOptional<z.ZodNumber>;
759
- configuration: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
760
- dry_run: z.ZodOptional<z.ZodBoolean>;
761
- }, z.core.$strict>;
762
- output: z.ZodObject<{
763
- dryRun: z.ZodBoolean;
764
- requested: z.ZodNumber;
765
- applied: z.ZodNumber;
766
- requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
767
- method: z.ZodString;
768
- path: z.ZodString;
769
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
770
- body: z.ZodOptional<z.ZodUnknown>;
771
- }, z.core.$strip>>>;
772
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
773
- ok: z.ZodBoolean;
774
- status: z.ZodOptional<z.ZodNumber>;
775
- id: z.ZodOptional<z.ZodString>;
776
- error: z.ZodOptional<z.ZodString>;
777
- code: z.ZodOptional<z.ZodString>;
778
- }, z.core.$strip>>>;
779
- report: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
780
- }, z.core.$strip>;
781
- write: true;
782
- visibility: "discoverable";
783
- endpoints: string[];
784
- }, {
785
- name: string;
786
- title: string;
787
- description: string;
788
- input: z.ZodObject<{
789
- endpoints: z.ZodArray<z.ZodObject<{
790
- method: z.ZodEnum<{
791
- GET: "GET";
792
- PUT: "PUT";
793
- POST: "POST";
794
- DELETE: "DELETE";
795
- OPTIONS: "OPTIONS";
796
- HEAD: "HEAD";
797
- PATCH: "PATCH";
798
- TRACE: "TRACE";
799
- }>;
800
- path: z.ZodString;
801
- source: z.ZodEnum<{
802
- spec: "spec";
803
- code: "code";
804
- traffic: "traffic";
805
- }>;
806
- trust: z.ZodOptional<z.ZodEnum<{
807
- confirmed: "confirmed";
808
- derived: "derived";
809
- }>>;
810
- summary: z.ZodOptional<z.ZodString>;
811
- auth: z.ZodOptional<z.ZodArray<z.ZodString>>;
812
- environment: z.ZodOptional<z.ZodString>;
813
- seenAt: z.ZodOptional<z.ZodString>;
814
- }, z.core.$strict>>;
815
- dry_run: z.ZodOptional<z.ZodBoolean>;
816
- }, z.core.$strict>;
817
- output: z.ZodObject<{
818
- dryRun: z.ZodBoolean;
819
- requested: z.ZodNumber;
820
- applied: z.ZodNumber;
821
- requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
822
- method: z.ZodString;
823
- path: z.ZodString;
824
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
825
- body: z.ZodOptional<z.ZodUnknown>;
826
- }, z.core.$strip>>>;
827
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
828
- ok: z.ZodBoolean;
829
- status: z.ZodOptional<z.ZodNumber>;
830
- id: z.ZodOptional<z.ZodString>;
831
- error: z.ZodOptional<z.ZodString>;
832
- code: z.ZodOptional<z.ZodString>;
833
- }, z.core.$strip>>>;
834
- report: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
835
- }, z.core.$strip>;
836
- write: true;
837
- visibility: "discoverable";
838
- endpoints: string[];
839
- }, {
840
- name: string;
841
- title: string;
842
- description: string;
843
- input: z.ZodObject<{
844
- method: z.ZodEnum<{
845
- GET: "GET";
846
- PUT: "PUT";
847
- POST: "POST";
848
- DELETE: "DELETE";
849
- PATCH: "PATCH";
850
- }>;
851
- path: z.ZodString;
852
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
853
- body: z.ZodOptional<z.ZodUnknown>;
854
- confirm: z.ZodOptional<z.ZodString>;
855
- dry_run: z.ZodOptional<z.ZodBoolean>;
856
- }, z.core.$strict>;
857
- output: z.ZodObject<{
858
- status: z.ZodOptional<z.ZodNumber>;
859
- body: z.ZodOptional<z.ZodUnknown>;
860
- dryRun: z.ZodOptional<z.ZodBoolean>;
861
- request: z.ZodOptional<z.ZodObject<{
862
- method: z.ZodString;
863
- path: z.ZodString;
864
- query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
865
- body: z.ZodOptional<z.ZodUnknown>;
866
- }, z.core.$strip>>;
867
- preview: z.ZodOptional<z.ZodObject<{
868
- method: z.ZodString;
869
- path: z.ZodString;
870
- confirm: z.ZodString;
871
- expiresInSeconds: z.ZodNumber;
872
- }, z.core.$loose>>;
873
- }, z.core.$strip>;
874
- write: true;
875
- visibility: "discoverable";
876
- endpoints: string[];
877
- }];
878
- type PluneToolName = (typeof PLUNE_TOOLS)[number]['name'];
879
- declare const PLUNE_TOOL_NAMES: readonly PluneToolName[];
880
- /** The definition of one tool; throws on a name the contract does not have. */
881
- declare function pluneTool(name: string): PluneToolDefinition;
882
- declare function isPluneToolName(name: string): name is PluneToolName;
883
- /**
884
- * Whether a token of this scope is offered the tool at all. A `read` token gets no writer, and no discovery while every
885
- * hidden tool writes: there it could only answer with a refusal, which a model reads as a way to write.
886
- */
887
- declare function offeredTo(tool: PluneToolDefinition, scope?: 'read' | 'write'): boolean;
888
- /** The tools a client is shown before it asks for more; for a `read` token, only those it is offered. */
889
- declare function defaultVisibleTools(scope?: 'read' | 'write'): PluneToolName[];
890
-
891
- /**
892
- * Runs a tool of the contract against the platform's HTTP API. Transport-free: the MCP server wraps it, and so can the
893
- * platform's built-in agent. One executor is one agent session — one `X-Plune-Session`, one set of revealed tools, one
894
- * set of issued confirm values.
895
- */
896
- type TokenScope = 'read' | 'write';
897
- interface ToolError {
898
- status?: number;
899
- code: string;
900
- message: string;
901
- details?: unknown;
902
- }
903
- type ToolOutcome = {
904
- ok: true;
905
- data: Record<string, unknown>;
906
- } | {
907
- ok: false;
908
- error: ToolError;
909
- };
910
- interface PluneToolExecutorOptions {
911
- token: string;
912
- apiUrl: string;
913
- projectId?: string | undefined;
914
- /** Defaults to a fresh UUID: one session per executor. */
915
- sessionId?: string | undefined;
916
- /** The token's scope when it is known. `read` refuses every write before a request is made. */
917
- scope?: TokenScope | undefined;
918
- fetchImpl?: typeof fetch | undefined;
919
- userAgent?: string | undefined;
920
- now?: (() => number) | undefined;
921
- /**
922
- * The client's tool list never changes: discover_tools switches nothing on and describes the hidden tools with their
923
- * input schemas, and a hidden tool is called by its name. MCP 2026-07-28 asks this of tools/list.
924
- */
925
- fixedToolList?: boolean | undefined;
926
- }
927
- interface PluneToolExecutor {
928
- readonly sessionId: string;
929
- /** The token's scope as known now: given, or learned from the platform's 403. */
930
- scope(): TokenScope | undefined;
931
- /** The tools a client should be shown now. */
932
- visibleTools(): PluneToolName[];
933
- execute(name: string, input: unknown): Promise<ToolOutcome>;
934
- }
935
- /** How long a confirm value of the escape hatch lives — the platform's own five minutes. */
936
- declare const CONFIRM_TTL_MS: number;
937
- declare function createPluneToolExecutor(opts: PluneToolExecutorOptions): PluneToolExecutor;
1
+ export { C as CONFIRM_TTL_MS, M as MAX_VISIBLE_TOOLS, P as PLUNE_TOOLS, a as PLUNE_TOOL_NAMES, b as PluneToolDefinition, c as PluneToolExecutor, d as PluneToolExecutorOptions, e as PluneToolName, T as TokenScope, f as ToolError, g as ToolOutcome, h as ToolVisibility, i as createPluneToolExecutor, j as defaultVisibleTools, k as isPluneToolName, o as offeredTo, p as pluneTool } from './execute-CR3Ixbxj.cjs';
2
+ import 'zod';
938
3
 
939
4
  /** The platform answered, with a status outside 2xx. */
940
5
  declare class PluneApiError extends Error {
@@ -958,4 +23,4 @@ declare class PluneNetworkError extends Error {
958
23
  /** Objects one call takes. */
959
24
  declare const BATCH_MAX = 100;
960
25
 
961
- export { BATCH_MAX, CONFIRM_TTL_MS, MAX_VISIBLE_TOOLS, PLUNE_TOOLS, PLUNE_TOOL_NAMES, PluneApiError, PluneNetworkError, type PluneToolDefinition, type PluneToolExecutor, type PluneToolExecutorOptions, type PluneToolName, type TokenScope, type ToolError, type ToolOutcome, type ToolVisibility, createPluneToolExecutor, defaultVisibleTools, isPluneToolName, offeredTo, pluneTool };
26
+ export { BATCH_MAX, PluneApiError, PluneNetworkError };