perttool 0.5.0 → 0.5.2

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 (41) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +66 -28
  3. package/dist/cli.js +41 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +92 -13
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/history/git-probe.d.ts +4 -0
  9. package/dist/history/git-probe.d.ts.map +1 -1
  10. package/dist/history/git-probe.js +23 -14
  11. package/dist/history/git-probe.js.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/schema/registry.d.ts +53 -0
  17. package/dist/schema/registry.d.ts.map +1 -0
  18. package/dist/schema/registry.js +346 -0
  19. package/dist/schema/registry.js.map +1 -0
  20. package/dist/version.d.ts +1 -1
  21. package/dist/version.js +1 -1
  22. package/package.json +5 -2
  23. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +607 -0
  24. package/schemas/Perttool.AnalysisResult.v4.schema.json +790 -0
  25. package/schemas/Perttool.CheckResult.v3.schema.json +203 -0
  26. package/schemas/Perttool.CliError.v1.schema.json +119 -0
  27. package/schemas/Perttool.CommandHelpResult.v1.schema.json +377 -0
  28. package/schemas/Perttool.Common.v1.schema.json +1893 -0
  29. package/schemas/Perttool.ExportResult.v1.schema.json +96 -0
  30. package/schemas/Perttool.FormatResult.v1.schema.json +82 -0
  31. package/schemas/Perttool.GuideResult.v1.schema.json +138 -0
  32. package/schemas/Perttool.ImportResult.v1.schema.json +111 -0
  33. package/schemas/Perttool.InitResult.v1.schema.json +70 -0
  34. package/schemas/Perttool.MutationResult.v3.schema.json +194 -0
  35. package/schemas/Perttool.NextResult.v5.schema.json +1264 -0
  36. package/schemas/Perttool.OverrideDecision.v1.schema.json +402 -0
  37. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +283 -0
  38. package/schemas/Perttool.ProjectResult.v3.schema.json +217 -0
  39. package/schemas/Perttool.SchemaResult.v1.schema.json +137 -0
  40. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +343 -0
  41. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +301 -0
@@ -0,0 +1,607 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.AgentGuidanceResult.v1.schema.json",
4
+ "title": "Perttool.AgentGuidanceResult.v1",
5
+ "$defs": {
6
+ "providerId": {
7
+ "enum": [
8
+ "codex",
9
+ "github-copilot",
10
+ "claude-code",
11
+ "grok-build",
12
+ "antigravity"
13
+ ]
14
+ },
15
+ "surfaceId": {
16
+ "enum": [
17
+ "instruction",
18
+ "workflow",
19
+ "delegated_agent",
20
+ "enforcement",
21
+ "prompt",
22
+ "connector"
23
+ ]
24
+ },
25
+ "supportStatus": {
26
+ "enum": [
27
+ "native",
28
+ "compatible",
29
+ "preview",
30
+ "deprecated",
31
+ "unsupported",
32
+ "unknown"
33
+ ]
34
+ },
35
+ "scopeId": {
36
+ "enum": [
37
+ "repository",
38
+ "directory",
39
+ "workspace",
40
+ "user",
41
+ "organization",
42
+ "enterprise",
43
+ "managed",
44
+ "session",
45
+ "conversation",
46
+ "local",
47
+ "admin",
48
+ "system",
49
+ "plugin",
50
+ "compatibility"
51
+ ]
52
+ },
53
+ "description": {
54
+ "type": "object",
55
+ "required": [
56
+ "key",
57
+ "parameters",
58
+ "text"
59
+ ],
60
+ "properties": {
61
+ "key": {
62
+ "type": "string"
63
+ },
64
+ "parameters": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "required": [
69
+ "name",
70
+ "value"
71
+ ],
72
+ "properties": {
73
+ "name": {
74
+ "type": "string"
75
+ },
76
+ "value": {
77
+ "type": "string"
78
+ }
79
+ },
80
+ "additionalProperties": false
81
+ }
82
+ },
83
+ "text": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "additionalProperties": false
88
+ },
89
+ "nullableDescription": {
90
+ "oneOf": [
91
+ {
92
+ "$ref": "#/$defs/description"
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ]
98
+ },
99
+ "statusEvidence": {
100
+ "type": "object",
101
+ "required": [
102
+ "evidence_kind",
103
+ "source_ids",
104
+ "facts",
105
+ "description"
106
+ ],
107
+ "properties": {
108
+ "evidence_kind": {
109
+ "enum": [
110
+ "official_native_documentation",
111
+ "official_compatibility_documentation",
112
+ "official_preview_notice",
113
+ "official_deprecation_notice",
114
+ "official_unsupported_notice",
115
+ "insufficient_official_evidence"
116
+ ]
117
+ },
118
+ "source_ids": {
119
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
120
+ },
121
+ "facts": {
122
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
123
+ },
124
+ "description": {
125
+ "$ref": "#/$defs/nullableDescription"
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ "artifact": {
131
+ "type": "object",
132
+ "required": [
133
+ "artifact_id",
134
+ "path",
135
+ "scope_ids",
136
+ "primary",
137
+ "support_status",
138
+ "status_evidence"
139
+ ],
140
+ "properties": {
141
+ "artifact_id": {
142
+ "type": "string"
143
+ },
144
+ "path": {
145
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
146
+ },
147
+ "scope_ids": {
148
+ "type": "array",
149
+ "items": {
150
+ "$ref": "#/$defs/scopeId"
151
+ }
152
+ },
153
+ "primary": {
154
+ "type": "boolean"
155
+ },
156
+ "support_status": {
157
+ "$ref": "#/$defs/supportStatus"
158
+ },
159
+ "status_evidence": {
160
+ "$ref": "#/$defs/statusEvidence"
161
+ }
162
+ },
163
+ "additionalProperties": false
164
+ },
165
+ "surface": {
166
+ "type": "object",
167
+ "required": [
168
+ "surface_id",
169
+ "support_status",
170
+ "primary_artifact_id",
171
+ "artifact_resolution",
172
+ "provider_terms",
173
+ "scopes",
174
+ "artifacts",
175
+ "guidance_ids",
176
+ "risk_ids",
177
+ "status_evidence",
178
+ "staleness"
179
+ ],
180
+ "properties": {
181
+ "surface_id": {
182
+ "$ref": "#/$defs/surfaceId"
183
+ },
184
+ "support_status": {
185
+ "$ref": "#/$defs/supportStatus"
186
+ },
187
+ "primary_artifact_id": {
188
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
189
+ },
190
+ "artifact_resolution": {
191
+ "enum": [
192
+ "known",
193
+ "not_applicable",
194
+ "unknown"
195
+ ]
196
+ },
197
+ "provider_terms": {
198
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
199
+ },
200
+ "scopes": {
201
+ "type": "array",
202
+ "items": {
203
+ "$ref": "#/$defs/scopeId"
204
+ }
205
+ },
206
+ "artifacts": {
207
+ "type": "array",
208
+ "items": {
209
+ "$ref": "#/$defs/artifact"
210
+ }
211
+ },
212
+ "guidance_ids": {
213
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
214
+ },
215
+ "risk_ids": {
216
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
217
+ },
218
+ "status_evidence": {
219
+ "$ref": "#/$defs/statusEvidence"
220
+ },
221
+ "staleness": {
222
+ "type": "object",
223
+ "required": [
224
+ "status",
225
+ "verified_at",
226
+ "review_after",
227
+ "basis_date"
228
+ ],
229
+ "properties": {
230
+ "status": {
231
+ "enum": [
232
+ "verified",
233
+ "review_due",
234
+ "unknown"
235
+ ]
236
+ },
237
+ "verified_at": {
238
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
239
+ },
240
+ "review_after": {
241
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
242
+ },
243
+ "basis_date": {
244
+ "type": "string"
245
+ }
246
+ },
247
+ "additionalProperties": false
248
+ }
249
+ },
250
+ "additionalProperties": false
251
+ },
252
+ "provider": {
253
+ "type": "object",
254
+ "required": [
255
+ "provider_id",
256
+ "display_name",
257
+ "aliases",
258
+ "available_surface_ids",
259
+ "surfaces"
260
+ ],
261
+ "properties": {
262
+ "provider_id": {
263
+ "$ref": "#/$defs/providerId"
264
+ },
265
+ "display_name": {
266
+ "type": "string"
267
+ },
268
+ "aliases": {
269
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
270
+ },
271
+ "available_surface_ids": {
272
+ "type": "array",
273
+ "items": {
274
+ "$ref": "#/$defs/surfaceId"
275
+ }
276
+ },
277
+ "surfaces": {
278
+ "type": "array",
279
+ "items": {
280
+ "$ref": "#/$defs/surface"
281
+ }
282
+ }
283
+ },
284
+ "additionalProperties": false
285
+ },
286
+ "guidanceRecord": {
287
+ "type": "object",
288
+ "required": [
289
+ "guidance_id",
290
+ "origin",
291
+ "directive",
292
+ "surface_ids",
293
+ "description"
294
+ ],
295
+ "properties": {
296
+ "guidance_id": {
297
+ "type": "string"
298
+ },
299
+ "origin": {
300
+ "enum": [
301
+ "project_control",
302
+ "common_surface",
303
+ "provider"
304
+ ]
305
+ },
306
+ "directive": {
307
+ "enum": [
308
+ "must",
309
+ "should",
310
+ "may"
311
+ ]
312
+ },
313
+ "surface_ids": {
314
+ "type": "array",
315
+ "items": {
316
+ "$ref": "#/$defs/surfaceId"
317
+ }
318
+ },
319
+ "description": {
320
+ "$ref": "#/$defs/nullableDescription"
321
+ }
322
+ },
323
+ "additionalProperties": false
324
+ },
325
+ "riskRecord": {
326
+ "type": "object",
327
+ "required": [
328
+ "risk_id",
329
+ "kind",
330
+ "surface_ids",
331
+ "mitigation_guidance_ids",
332
+ "description"
333
+ ],
334
+ "properties": {
335
+ "risk_id": {
336
+ "type": "string"
337
+ },
338
+ "kind": {
339
+ "enum": [
340
+ "scope",
341
+ "execution",
342
+ "delegation",
343
+ "external_access",
344
+ "compatibility",
345
+ "staleness"
346
+ ]
347
+ },
348
+ "surface_ids": {
349
+ "type": "array",
350
+ "items": {
351
+ "$ref": "#/$defs/surfaceId"
352
+ }
353
+ },
354
+ "mitigation_guidance_ids": {
355
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
356
+ },
357
+ "description": {
358
+ "$ref": "#/$defs/nullableDescription"
359
+ }
360
+ },
361
+ "additionalProperties": false
362
+ },
363
+ "source": {
364
+ "type": "object",
365
+ "required": [
366
+ "source_id",
367
+ "provider_id",
368
+ "title",
369
+ "url",
370
+ "verified_at"
371
+ ],
372
+ "properties": {
373
+ "source_id": {
374
+ "type": "string"
375
+ },
376
+ "provider_id": {
377
+ "$ref": "#/$defs/providerId"
378
+ },
379
+ "title": {
380
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
381
+ },
382
+ "url": {
383
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
384
+ },
385
+ "verified_at": {
386
+ "type": "string"
387
+ }
388
+ },
389
+ "additionalProperties": false
390
+ },
391
+ "diagnostic": {
392
+ "type": "object",
393
+ "required": [
394
+ "code",
395
+ "severity",
396
+ "message",
397
+ "provider_id",
398
+ "surface_id"
399
+ ],
400
+ "properties": {
401
+ "code": {
402
+ "type": "string"
403
+ },
404
+ "severity": {
405
+ "enum": [
406
+ "error",
407
+ "warning",
408
+ "info"
409
+ ]
410
+ },
411
+ "message": {
412
+ "type": "string"
413
+ },
414
+ "provider_id": {
415
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
416
+ },
417
+ "surface_id": {
418
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
419
+ }
420
+ },
421
+ "additionalProperties": false
422
+ }
423
+ },
424
+ "type": "object",
425
+ "required": [
426
+ "schema_version",
427
+ "cli_contract_version",
428
+ "guidance_interface_version",
429
+ "profile_schema_version",
430
+ "profile_data_version",
431
+ "guidance_taxonomy_version",
432
+ "risk_taxonomy_version",
433
+ "description_registry_version",
434
+ "description_locale",
435
+ "staleness_policy_version",
436
+ "tool_version",
437
+ "operation",
438
+ "ok",
439
+ "profile_digest",
440
+ "snapshot_as_of",
441
+ "query",
442
+ "providers",
443
+ "guidance_records",
444
+ "risk_records",
445
+ "sources",
446
+ "capabilities",
447
+ "diagnostics"
448
+ ],
449
+ "properties": {
450
+ "schema_version": {
451
+ "const": "Perttool.AgentGuidanceResult.v1"
452
+ },
453
+ "cli_contract_version": {
454
+ "const": 6
455
+ },
456
+ "guidance_interface_version": {
457
+ "const": 1
458
+ },
459
+ "profile_schema_version": {
460
+ "type": "string"
461
+ },
462
+ "profile_data_version": {
463
+ "type": "integer",
464
+ "minimum": 1
465
+ },
466
+ "guidance_taxonomy_version": {
467
+ "type": "integer",
468
+ "minimum": 1
469
+ },
470
+ "risk_taxonomy_version": {
471
+ "type": "integer",
472
+ "minimum": 1
473
+ },
474
+ "description_registry_version": {
475
+ "type": "integer",
476
+ "minimum": 1
477
+ },
478
+ "description_locale": {
479
+ "const": "en"
480
+ },
481
+ "staleness_policy_version": {
482
+ "type": "integer",
483
+ "minimum": 1
484
+ },
485
+ "tool_version": {
486
+ "type": "string"
487
+ },
488
+ "operation": {
489
+ "const": "agent.help"
490
+ },
491
+ "ok": {
492
+ "type": "boolean"
493
+ },
494
+ "profile_digest": {
495
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
496
+ },
497
+ "snapshot_as_of": {
498
+ "type": "string"
499
+ },
500
+ "query": {
501
+ "type": "object",
502
+ "required": [
503
+ "input_provider_id",
504
+ "canonical_provider_id",
505
+ "surface_id",
506
+ "level",
507
+ "alias_applied"
508
+ ],
509
+ "properties": {
510
+ "input_provider_id": {
511
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
512
+ },
513
+ "canonical_provider_id": {
514
+ "oneOf": [
515
+ {
516
+ "$ref": "#/$defs/providerId"
517
+ },
518
+ {
519
+ "type": "null"
520
+ }
521
+ ]
522
+ },
523
+ "surface_id": {
524
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
525
+ },
526
+ "level": {
527
+ "enum": [
528
+ "index",
529
+ "quick",
530
+ "detail"
531
+ ]
532
+ },
533
+ "alias_applied": {
534
+ "type": "boolean"
535
+ }
536
+ },
537
+ "additionalProperties": false
538
+ },
539
+ "providers": {
540
+ "type": "array",
541
+ "items": {
542
+ "$ref": "#/$defs/provider"
543
+ }
544
+ },
545
+ "guidance_records": {
546
+ "type": "array",
547
+ "items": {
548
+ "$ref": "#/$defs/guidanceRecord"
549
+ }
550
+ },
551
+ "risk_records": {
552
+ "type": "array",
553
+ "items": {
554
+ "$ref": "#/$defs/riskRecord"
555
+ }
556
+ },
557
+ "sources": {
558
+ "type": "array",
559
+ "items": {
560
+ "$ref": "#/$defs/source"
561
+ }
562
+ },
563
+ "capabilities": {
564
+ "type": "object",
565
+ "required": [
566
+ "reads_project_files",
567
+ "writes_files",
568
+ "executes_hooks",
569
+ "executes_commands",
570
+ "accesses_network",
571
+ "reads_provider_state",
572
+ "writes_provider_state"
573
+ ],
574
+ "properties": {
575
+ "reads_project_files": {
576
+ "type": "boolean"
577
+ },
578
+ "writes_files": {
579
+ "type": "boolean"
580
+ },
581
+ "executes_hooks": {
582
+ "type": "boolean"
583
+ },
584
+ "executes_commands": {
585
+ "type": "boolean"
586
+ },
587
+ "accesses_network": {
588
+ "type": "boolean"
589
+ },
590
+ "reads_provider_state": {
591
+ "type": "boolean"
592
+ },
593
+ "writes_provider_state": {
594
+ "type": "boolean"
595
+ }
596
+ },
597
+ "additionalProperties": false
598
+ },
599
+ "diagnostics": {
600
+ "type": "array",
601
+ "items": {
602
+ "$ref": "#/$defs/diagnostic"
603
+ }
604
+ }
605
+ },
606
+ "additionalProperties": false
607
+ }