thumbgate 1.27.19 → 1.28.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 (116) hide show
  1. package/.claude/commands/dashboard.md +15 -0
  2. package/.claude/commands/thumbgate-blocked.md +27 -0
  3. package/.claude/commands/thumbgate-dashboard.md +15 -0
  4. package/.claude/commands/thumbgate-doctor.md +30 -0
  5. package/.claude/commands/thumbgate-guard.md +36 -0
  6. package/.claude/commands/thumbgate-protect.md +30 -0
  7. package/.claude/commands/thumbgate-rules.md +30 -0
  8. package/.claude-plugin/plugin.json +1 -1
  9. package/.well-known/mcp/server-card.json +1 -1
  10. package/README.md +63 -45
  11. package/adapters/claude/.mcp.json +2 -2
  12. package/adapters/gcp/dfcx-webhook-gate.js +295 -0
  13. package/adapters/letta/README.md +41 -0
  14. package/adapters/letta/thumbgate-letta-adapter.js +133 -0
  15. package/adapters/mcp/server-stdio.js +1 -1
  16. package/adapters/opencode/opencode.json +1 -1
  17. package/adapters/policy-engine/ethicore-guardian-client.js +68 -0
  18. package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +260 -0
  19. package/bench/observability-eval-suite.json +26 -0
  20. package/bin/cli.js +52 -9
  21. package/bin/dashboard-cli.js +7 -0
  22. package/bin/postinstall.js +14 -23
  23. package/commands/dashboard.md +15 -0
  24. package/commands/thumbgate-dashboard.md +15 -0
  25. package/config/entitlement-public-keys.json +6 -0
  26. package/config/gates/default.json +1 -1
  27. package/config/github-about.json +2 -2
  28. package/config/merge-quality-checks.json +3 -0
  29. package/package.json +233 -100
  30. package/public/about.html +159 -0
  31. package/public/agent-manager.html +179 -0
  32. package/public/agents-cost-savings.html +153 -0
  33. package/public/ai-malpractice-prevention.html +818 -0
  34. package/public/assets/brand/github-social-preview.png +0 -0
  35. package/public/assets/brand/thumbgate-icon-512.png +0 -0
  36. package/public/assets/brand/thumbgate-icon-pro-512.png +0 -0
  37. package/public/assets/brand/thumbgate-icon-team-512.png +0 -0
  38. package/public/assets/brand/thumbgate-logo-1200x360.png +0 -0
  39. package/public/assets/brand/thumbgate-logo-transparent.svg +28 -0
  40. package/public/assets/brand/thumbgate-mark-inline-v3.svg +18 -0
  41. package/public/assets/brand/thumbgate-mark-pro.svg +23 -0
  42. package/public/assets/brand/thumbgate-mark-team.svg +26 -0
  43. package/public/assets/brand/thumbgate-mark.svg +21 -0
  44. package/public/assets/brand/thumbgate-wordmark.svg +20 -0
  45. package/public/assets/claude-thumbgate-statusbar.svg +8 -0
  46. package/public/assets/codex-thumbgate-statusbar-test.svg +9 -0
  47. package/public/assets/legal-intake-control-flow.svg +66 -0
  48. package/public/blog.html +12 -9
  49. package/public/brand/thumbgate-mark.svg +19 -0
  50. package/public/brand/thumbgate-og.svg +16 -0
  51. package/public/chatgpt-app.html +330 -0
  52. package/public/codex-enterprise.html +123 -0
  53. package/public/codex-plugin.html +5 -5
  54. package/public/compare.html +10 -10
  55. package/public/dashboard.html +1 -1
  56. package/public/diagnostic.html +345 -0
  57. package/public/federal.html +2 -2
  58. package/public/guide.html +14 -14
  59. package/public/index.html +81 -70
  60. package/public/install.html +193 -0
  61. package/public/js/buyer-intent.js +672 -0
  62. package/public/learn.html +4 -17
  63. package/public/numbers.html +2 -2
  64. package/public/pricing.html +392 -0
  65. package/public/pro.html +2 -2
  66. package/scripts/action-receipts.js +324 -0
  67. package/scripts/activation-quickstart.js +187 -0
  68. package/scripts/agent-operations-planner.js +621 -0
  69. package/scripts/agent-reward-model.js +13 -0
  70. package/scripts/ai-component-inventory.js +367 -0
  71. package/scripts/async-eval-observability.js +236 -0
  72. package/scripts/audit.js +65 -0
  73. package/scripts/aws-blocks-guardrails.js +272 -0
  74. package/scripts/bayes-optimal-gate.js +6 -1
  75. package/scripts/classifier-routing.js +130 -0
  76. package/scripts/cli-feedback.js +17 -1
  77. package/scripts/commercial-offer.js +3 -3
  78. package/scripts/dashboard-chat.js +332 -0
  79. package/scripts/entitlement.js +250 -0
  80. package/scripts/export-databricks-bundle.js +5 -0
  81. package/scripts/export-dpo-pairs.js +6 -0
  82. package/scripts/export-hf-dataset.js +5 -0
  83. package/scripts/feedback-aggregate.js +281 -0
  84. package/scripts/feedback-sanitizer.js +105 -0
  85. package/scripts/gates-engine.js +15 -3
  86. package/scripts/hook-stop-anti-claim.js +301 -0
  87. package/scripts/imperative-detector.js +85 -0
  88. package/scripts/install-shim.js +87 -0
  89. package/scripts/intervention-policy.js +13 -0
  90. package/scripts/mcp-oauth.js +293 -0
  91. package/scripts/noop-detect.js +285 -0
  92. package/scripts/parallel-workflow-orchestrator.js +293 -0
  93. package/scripts/plan-gate.js +243 -0
  94. package/scripts/plausible-domain-config.js +99 -0
  95. package/scripts/pr-manager.js +9 -22
  96. package/scripts/pro-local-dashboard.js +198 -0
  97. package/scripts/qa-scenario-planner.js +136 -0
  98. package/scripts/repeat-metric.js +137 -0
  99. package/scripts/risk-scorer.js +6 -0
  100. package/scripts/secret-fixture-tokens.js +61 -0
  101. package/scripts/secret-redaction.js +166 -0
  102. package/scripts/self-harness-optimizer.js +141 -0
  103. package/scripts/self-healing-check.js +193 -0
  104. package/scripts/self-protection.js +90 -0
  105. package/scripts/seo-gsd.js +2 -2
  106. package/scripts/silent-failure-cluster.js +531 -0
  107. package/scripts/statusline-cache-read.js +57 -0
  108. package/scripts/sync-telemetry-from-prod.js +374 -0
  109. package/scripts/thompson-sampling.js +11 -2
  110. package/scripts/tool-contract-validator.js +76 -0
  111. package/scripts/trajectory-scorer.js +63 -0
  112. package/scripts/verify-marketing-pages-deployed.js +212 -0
  113. package/scripts/visitor-journey.js +172 -0
  114. package/src/api/server.js +81 -10
  115. package/.claude-plugin/marketplace.json +0 -85
  116. package/adapters/chatgpt/openapi.yaml +0 -1707
@@ -1,1707 +0,0 @@
1
- openapi: 3.1.0
2
- info:
3
- title: ThumbGate API
4
- version: 1.2.0
5
- description: |
6
- Production API for feedback capture, schema-validated memory promotion,
7
- prevention rule generation, and DPO export.
8
- Bare up/down signals are logged immediately, but the API returns
9
- clarification_required until one sentence explains what worked or failed.
10
- When the explanation is specific enough, ThumbGate infers a domain tag if
11
- the caller omitted manual tags so the feedback can still promote cleanly.
12
- servers:
13
- - url: https://thumbgate-production.up.railway.app
14
- security:
15
- - bearerAuth: []
16
- components:
17
- securitySchemes:
18
- bearerAuth:
19
- type: http
20
- scheme: bearer
21
- bearerFormat: API Key
22
- schemas:
23
- RubricScore:
24
- type: object
25
- required: [criterion, score]
26
- properties:
27
- criterion:
28
- type: string
29
- score:
30
- type: number
31
- minimum: 1
32
- maximum: 5
33
- evidence:
34
- type: string
35
- judge:
36
- type: string
37
- CaptureFeedbackRequest:
38
- type: object
39
- required: [signal]
40
- properties:
41
- signal:
42
- type: string
43
- enum: [up, down, positive, negative]
44
- context:
45
- type: string
46
- description: One-sentence reason describing what worked or failed
47
- whatWentWrong:
48
- type: string
49
- whatToChange:
50
- type: string
51
- whatWorked:
52
- type: string
53
- rubricScores:
54
- type: array
55
- items:
56
- $ref: '#/components/schemas/RubricScore'
57
- guardrails:
58
- type: object
59
- properties:
60
- testsPassed:
61
- type: boolean
62
- pathSafety:
63
- type: boolean
64
- budgetCompliant:
65
- type: boolean
66
- tags:
67
- oneOf:
68
- - type: array
69
- items:
70
- type: string
71
- - type: string
72
- description: Optional domain tags. If omitted, ThumbGate infers one from the feedback text before promotion.
73
- skill:
74
- type: string
75
- source:
76
- type: string
77
- enum: [chatgpt_gpt]
78
- default: chatgpt_gpt
79
- description: Attribution marker for ThumbGate analytics. The published ThumbGate GPT should send `chatgpt_gpt` so owner dashboards can distinguish GPT Action calls from local API calls.
80
- IntentPlanRequest:
81
- type: object
82
- required: [intentId]
83
- properties:
84
- intentId:
85
- type: string
86
- context:
87
- type: string
88
- mcpProfile:
89
- type: string
90
- bundleId:
91
- type: string
92
- partnerProfile:
93
- type: string
94
- delegationMode:
95
- type: string
96
- enum: [off, auto, sequential]
97
- enforcePlanQuality:
98
- type: boolean
99
- approved:
100
- type: boolean
101
- repoPath:
102
- type: string
103
- InternalAgentBootstrapRequest:
104
- type: object
105
- required: [source]
106
- properties:
107
- source:
108
- type: string
109
- enum: [github, slack, linear, api, cli]
110
- repoPath:
111
- type: string
112
- prepareSandbox:
113
- type: boolean
114
- sandboxRoot:
115
- type: string
116
- intentId:
117
- type: string
118
- context:
119
- type: string
120
- mcpProfile:
121
- type: string
122
- partnerProfile:
123
- type: string
124
- delegationMode:
125
- type: string
126
- enum: [off, auto, sequential]
127
- approved:
128
- type: boolean
129
- trigger:
130
- type: object
131
- properties:
132
- type:
133
- type: string
134
- id:
135
- type: string
136
- url:
137
- type: string
138
- actor:
139
- type: string
140
- thread:
141
- type: object
142
- properties:
143
- id:
144
- type: string
145
- title:
146
- type: string
147
- url:
148
- type: string
149
- task:
150
- type: object
151
- properties:
152
- title:
153
- type: string
154
- body:
155
- type: string
156
- number:
157
- type: string
158
- branch:
159
- type: string
160
- labels:
161
- type: array
162
- items:
163
- type: string
164
- comments:
165
- type: array
166
- items:
167
- type: object
168
- properties:
169
- author:
170
- type: string
171
- text:
172
- type: string
173
- timestamp:
174
- type: string
175
- messages:
176
- type: array
177
- items:
178
- type: object
179
- properties:
180
- author:
181
- type: string
182
- text:
183
- type: string
184
- timestamp:
185
- type: string
186
- HandoffStartRequest:
187
- type: object
188
- required: [intentId]
189
- properties:
190
- intentId:
191
- type: string
192
- context:
193
- type: string
194
- mcpProfile:
195
- type: string
196
- bundleId:
197
- type: string
198
- partnerProfile:
199
- type: string
200
- approved:
201
- type: boolean
202
- repoPath:
203
- type: string
204
- delegateProfile:
205
- type: string
206
- plannedChecks:
207
- type: array
208
- items:
209
- type: string
210
- HandoffCompleteRequest:
211
- type: object
212
- required: [handoffId, outcome]
213
- properties:
214
- handoffId:
215
- type: string
216
- outcome:
217
- type: string
218
- enum: [accepted, rejected, aborted]
219
- resultContext:
220
- type: string
221
- attempts:
222
- type: number
223
- violationCount:
224
- type: number
225
- tokenEstimate:
226
- type: number
227
- latencyMs:
228
- type: number
229
- summary:
230
- type: string
231
- BillingCheckoutRequest:
232
- type: object
233
- properties:
234
- successUrl:
235
- type: string
236
- format: uri
237
- cancelUrl:
238
- type: string
239
- format: uri
240
- customerEmail:
241
- type: string
242
- format: email
243
- installId:
244
- type: string
245
- metadata:
246
- type: object
247
- additionalProperties:
248
- type: string
249
- BillingProvisionRequest:
250
- type: object
251
- required: [customerId]
252
- properties:
253
- customerId:
254
- type: string
255
- installId:
256
- type: string
257
- WorkflowSprintIntakeRequest:
258
- type: object
259
- required: [email, workflow, owner, blocker, runtime]
260
- properties:
261
- email:
262
- type: string
263
- format: email
264
- company:
265
- type: string
266
- workflow:
267
- type: string
268
- owner:
269
- type: string
270
- blocker:
271
- type: string
272
- runtime:
273
- type: string
274
- note:
275
- type: string
276
- acquisitionId:
277
- type: string
278
- visitorId:
279
- type: string
280
- sessionId:
281
- type: string
282
- traceId:
283
- type: string
284
- installId:
285
- type: string
286
- source:
287
- type: string
288
- utmSource:
289
- type: string
290
- utmMedium:
291
- type: string
292
- utmCampaign:
293
- type: string
294
- utmContent:
295
- type: string
296
- utmTerm:
297
- type: string
298
- community:
299
- type: string
300
- postId:
301
- type: string
302
- commentId:
303
- type: string
304
- campaignVariant:
305
- type: string
306
- offerCode:
307
- type: string
308
- ctaId:
309
- type: string
310
- ctaPlacement:
311
- type: string
312
- planId:
313
- type: string
314
- page:
315
- type: string
316
- landingPath:
317
- type: string
318
- referrerHost:
319
- type: string
320
- referrer:
321
- type: string
322
- WorkflowSprintIntakeResponse:
323
- type: object
324
- properties:
325
- ok:
326
- type: boolean
327
- leadId:
328
- type: string
329
- status:
330
- type: string
331
- offer:
332
- type: string
333
- nextStep:
334
- type: string
335
- proofPackUrl:
336
- type: string
337
- format: uri
338
- sprintBriefUrl:
339
- type: string
340
- format: uri
341
- WorkflowSprintAdvanceRequest:
342
- type: object
343
- required: [leadId, status]
344
- properties:
345
- leadId:
346
- type: string
347
- status:
348
- type: string
349
- enum: [new, qualified, named_pilot, proof_backed_run, paid_team]
350
- actor:
351
- type: string
352
- note:
353
- type: string
354
- reviewedBy:
355
- type: string
356
- workflowId:
357
- type: string
358
- teamId:
359
- type: string
360
- proofArtifacts:
361
- type: array
362
- items:
363
- type: string
364
- WorkflowSprintAdvanceResponse:
365
- type: object
366
- properties:
367
- ok:
368
- type: boolean
369
- unchanged:
370
- type: boolean
371
- lead:
372
- type: object
373
- additionalProperties: true
374
- workflowRun:
375
- type: object
376
- nullable: true
377
- additionalProperties: true
378
- FunnelAnalyticsResponse:
379
- type: object
380
- properties:
381
- totalEvents:
382
- type: integer
383
- stageCounts:
384
- type: object
385
- properties:
386
- acquisition:
387
- type: integer
388
- activation:
389
- type: integer
390
- paid:
391
- type: integer
392
- eventCounts:
393
- type: object
394
- additionalProperties:
395
- type: integer
396
- conversionRates:
397
- type: object
398
- properties:
399
- acquisitionToActivation:
400
- type: number
401
- activationToPaid:
402
- type: number
403
- acquisitionToPaid:
404
- type: number
405
- paidProviderEvents:
406
- type: integer
407
- BillingSummaryResponse:
408
- type: object
409
- properties:
410
- generatedAt:
411
- type: string
412
- format: date-time
413
- coverage:
414
- type: object
415
- properties:
416
- source:
417
- type: string
418
- tracksBookedRevenue:
419
- type: boolean
420
- tracksPaidOrders:
421
- type: boolean
422
- tracksInvoices:
423
- type: boolean
424
- tracksAttribution:
425
- type: boolean
426
- providerCoverage:
427
- type: object
428
- additionalProperties:
429
- type: string
430
- funnel:
431
- allOf:
432
- - $ref: '#/components/schemas/FunnelAnalyticsResponse'
433
- - type: object
434
- properties:
435
- uniqueAcquisitionLeads:
436
- type: integer
437
- uniquePaidCustomers:
438
- type: integer
439
- firstPaidAt:
440
- type: string
441
- nullable: true
442
- lastPaidAt:
443
- type: string
444
- nullable: true
445
- lastPaidEvent:
446
- type: object
447
- nullable: true
448
- properties:
449
- timestamp:
450
- type: string
451
- nullable: true
452
- event:
453
- type: string
454
- nullable: true
455
- evidence:
456
- type: string
457
- nullable: true
458
- customerId:
459
- type: string
460
- nullable: true
461
- traceId:
462
- type: string
463
- nullable: true
464
- signups:
465
- type: object
466
- properties:
467
- total:
468
- type: integer
469
- uniqueLeads:
470
- type: integer
471
- bySource:
472
- type: object
473
- additionalProperties:
474
- type: integer
475
- byCampaign:
476
- type: object
477
- additionalProperties:
478
- type: integer
479
- pipeline:
480
- type: object
481
- properties:
482
- workflowSprintLeads:
483
- type: object
484
- properties:
485
- total:
486
- type: integer
487
- bySource:
488
- type: object
489
- additionalProperties:
490
- type: integer
491
- qualifiedWorkflowSprintLeads:
492
- type: object
493
- properties:
494
- total:
495
- type: integer
496
- bySource:
497
- type: object
498
- additionalProperties:
499
- type: integer
500
- revenue:
501
- type: object
502
- properties:
503
- paidProviderEvents:
504
- type: integer
505
- paidOrders:
506
- type: integer
507
- paidCustomers:
508
- type: integer
509
- bookedRevenueCents:
510
- type: integer
511
- bookedRevenueByCurrency:
512
- type: object
513
- additionalProperties:
514
- type: integer
515
- amountKnownOrders:
516
- type: integer
517
- amountUnknownOrders:
518
- type: integer
519
- amountKnownCoverageRate:
520
- type: number
521
- unreconciledPaidEvents:
522
- type: integer
523
- latestPaidAt:
524
- type: string
525
- nullable: true
526
- latestPaidOrder:
527
- type: object
528
- nullable: true
529
- properties:
530
- timestamp:
531
- type: string
532
- nullable: true
533
- provider:
534
- type: string
535
- nullable: true
536
- event:
537
- type: string
538
- nullable: true
539
- orderId:
540
- type: string
541
- nullable: true
542
- customerId:
543
- type: string
544
- nullable: true
545
- amountCents:
546
- type: integer
547
- nullable: true
548
- currency:
549
- type: string
550
- nullable: true
551
- amountKnown:
552
- type: boolean
553
- byProvider:
554
- type: object
555
- additionalProperties:
556
- type: object
557
- properties:
558
- paidOrders:
559
- type: integer
560
- bookedRevenueCents:
561
- type: integer
562
- amountKnownOrders:
563
- type: integer
564
- amountUnknownOrders:
565
- type: integer
566
- bookedRevenueByCurrency:
567
- type: object
568
- additionalProperties:
569
- type: integer
570
- attribution:
571
- type: object
572
- properties:
573
- acquisitionBySource:
574
- type: object
575
- additionalProperties:
576
- type: integer
577
- acquisitionByCampaign:
578
- type: object
579
- additionalProperties:
580
- type: integer
581
- paidBySource:
582
- type: object
583
- additionalProperties:
584
- type: integer
585
- paidByCampaign:
586
- type: object
587
- additionalProperties:
588
- type: integer
589
- bookedRevenueBySourceCents:
590
- type: object
591
- additionalProperties:
592
- type: integer
593
- bookedRevenueByCampaignCents:
594
- type: object
595
- additionalProperties:
596
- type: integer
597
- conversionBySource:
598
- type: object
599
- additionalProperties:
600
- type: number
601
- conversionByCampaign:
602
- type: object
603
- additionalProperties:
604
- type: number
605
- keys:
606
- type: object
607
- properties:
608
- total:
609
- type: integer
610
- active:
611
- type: integer
612
- disabled:
613
- type: integer
614
- activeCustomers:
615
- type: integer
616
- totalUsage:
617
- type: integer
618
- bySource:
619
- type: object
620
- additionalProperties:
621
- type: integer
622
- activeBySource:
623
- type: object
624
- additionalProperties:
625
- type: integer
626
- customers:
627
- type: array
628
- items:
629
- type: object
630
- properties:
631
- customerId:
632
- type: string
633
- activeKeys:
634
- type: integer
635
- totalKeys:
636
- type: integer
637
- usageCount:
638
- type: integer
639
- source:
640
- type: string
641
- installId:
642
- type: string
643
- nullable: true
644
- createdAt:
645
- type: string
646
- nullable: true
647
- disabledAt:
648
- type: string
649
- nullable: true
650
- trafficMetrics:
651
- type: object
652
- properties:
653
- visitors:
654
- type: integer
655
- sessions:
656
- type: integer
657
- pageViews:
658
- type: integer
659
- ctaClicks:
660
- type: integer
661
- checkoutStarts:
662
- type: integer
663
- buyerLossFeedback:
664
- type: integer
665
- seoLandingViews:
666
- type: integer
667
- operatorGeneratedAcquisition:
668
- type: object
669
- properties:
670
- totalEvents:
671
- type: integer
672
- uniqueLeads:
673
- type: integer
674
- bySource:
675
- type: object
676
- additionalProperties:
677
- type: integer
678
- dataQuality:
679
- type: object
680
- properties:
681
- telemetryCoverage:
682
- type: number
683
- attributionCoverage:
684
- type: number
685
- amountKnownCoverage:
686
- type: number
687
- unreconciledPaidEvents:
688
- type: integer
689
- paths:
690
- /healthz:
691
- get:
692
- operationId: healthz
693
- responses:
694
- '200':
695
- description: Service health
696
- '401':
697
- description: Unauthorized
698
- /v1/feedback/capture:
699
- post:
700
- operationId: captureFeedback
701
- requestBody:
702
- required: true
703
- content:
704
- application/json:
705
- schema:
706
- $ref: '#/components/schemas/CaptureFeedbackRequest'
707
- responses:
708
- '200':
709
- description: Feedback accepted and promoted to memory
710
- '422':
711
- description: Feedback logged only; clarification required or promotion rejected
712
- '401':
713
- description: Unauthorized
714
- /v1/feedback/stats:
715
- get:
716
- operationId: getFeedbackStats
717
- responses:
718
- '200':
719
- description: Aggregated feedback statistics
720
- '401':
721
- description: Unauthorized
722
- /v1/feedback/infer:
723
- post:
724
- operationId: inferLessonFromHistory
725
- requestBody:
726
- required: true
727
- content:
728
- application/json:
729
- schema:
730
- $ref: '#/components/schemas/InferLessonRequest'
731
- responses:
732
- '200':
733
- description: Distilled lesson from chat history
734
- '401':
735
- description: Unauthorized
736
- /v1/telemetry/ping:
737
- post:
738
- operationId: recordTelemetryPing
739
- requestBody:
740
- required: false
741
- content:
742
- application/json:
743
- schema:
744
- type: object
745
- additionalProperties: true
746
- responses:
747
- '204':
748
- description: Telemetry accepted on a best-effort basis
749
- /v1/analytics/funnel:
750
- get:
751
- operationId: getFunnelAnalytics
752
- responses:
753
- '200':
754
- description: Acquisition/activation/paid funnel metrics from append-only ledger
755
- content:
756
- application/json:
757
- schema:
758
- $ref: '#/components/schemas/FunnelAnalyticsResponse'
759
- '401':
760
- description: Unauthorized
761
- /v1/analytics/losses:
762
- get:
763
- operationId: getLossAnalytics
764
- parameters:
765
- - in: query
766
- name: window
767
- schema:
768
- type: string
769
- enum: [today, 7d, 30d, lifetime]
770
- - in: query
771
- name: timezone
772
- schema:
773
- type: string
774
- - in: query
775
- name: now
776
- schema:
777
- type: string
778
- format: date-time
779
- responses:
780
- '200':
781
- description: Ranked buyer-loss and revenue-opportunity analysis for the active analytics window
782
- content:
783
- application/json:
784
- schema:
785
- type: object
786
- additionalProperties: true
787
- '401':
788
- description: Unauthorized
789
- /v1/dashboard:
790
- get:
791
- operationId: getDashboard
792
- parameters:
793
- - in: query
794
- name: window
795
- schema:
796
- type: string
797
- enum: [today, 7d, 30d, lifetime]
798
- - in: query
799
- name: timezone
800
- schema:
801
- type: string
802
- - in: query
803
- name: now
804
- schema:
805
- type: string
806
- format: date-time
807
- responses:
808
- '200':
809
- description: Full ThumbGate dashboard with feedback, telemetry, funnel, and observability analytics
810
- content:
811
- application/json:
812
- schema:
813
- type: object
814
- additionalProperties: true
815
- '401':
816
- description: Unauthorized
817
- /v1/dashboard/review-state:
818
- get:
819
- operationId: getDashboardReviewState
820
- responses:
821
- '200':
822
- description: Persisted dashboard review checkpoint and the current delta since that checkpoint
823
- content:
824
- application/json:
825
- schema:
826
- type: object
827
- additionalProperties: true
828
- '401':
829
- description: Unauthorized
830
- post:
831
- operationId: markDashboardReviewed
832
- responses:
833
- '200':
834
- description: Persist and return the current dashboard review checkpoint
835
- content:
836
- application/json:
837
- schema:
838
- type: object
839
- additionalProperties: true
840
- '401':
841
- description: Unauthorized
842
- /v1/dashboard/render-spec:
843
- get:
844
- operationId: getDashboardRenderSpec
845
- parameters:
846
- - in: query
847
- name: view
848
- schema:
849
- type: string
850
- enum: [team-review, incident-review, workflow-rollout]
851
- - in: query
852
- name: window
853
- schema:
854
- type: string
855
- enum: [today, 7d, 30d, lifetime]
856
- - in: query
857
- name: timezone
858
- schema:
859
- type: string
860
- - in: query
861
- name: now
862
- schema:
863
- type: string
864
- format: date-time
865
- responses:
866
- '200':
867
- description: Constrained JSON render spec for hosted Team and operations dashboard views
868
- content:
869
- application/json:
870
- schema:
871
- type: object
872
- additionalProperties: true
873
- '400':
874
- description: Invalid dashboard render view or query
875
- '401':
876
- description: Unauthorized
877
- /v1/decisions/evaluate:
878
- post:
879
- operationId: evaluateDecision
880
- requestBody:
881
- required: true
882
- content:
883
- application/json:
884
- schema:
885
- type: object
886
- properties:
887
- toolName:
888
- type: string
889
- description: Tool name is optional when provider-native tool call payload is supplied.
890
- source:
891
- type: string
892
- enum: [chatgpt_gpt]
893
- default: chatgpt_gpt
894
- description: Attribution marker for ThumbGate analytics. The published ThumbGate GPT should send `chatgpt_gpt` so owner dashboards can distinguish GPT Action calls from local API calls.
895
- provider:
896
- type: string
897
- model:
898
- type: string
899
- providerToolCall:
900
- type: object
901
- additionalProperties: true
902
- toolCall:
903
- type: object
904
- additionalProperties: true
905
- toolUse:
906
- type: object
907
- additionalProperties: true
908
- content:
909
- type: array
910
- items:
911
- type: object
912
- additionalProperties: true
913
- input:
914
- type: object
915
- additionalProperties: true
916
- arguments:
917
- type: object
918
- additionalProperties: true
919
- method:
920
- type: string
921
- params:
922
- type: object
923
- additionalProperties: true
924
- mcp:
925
- type: object
926
- additionalProperties: true
927
- mcpToolCall:
928
- type: object
929
- additionalProperties: true
930
- usage:
931
- type: object
932
- additionalProperties: true
933
- tokenEstimate:
934
- type: number
935
- costUsd:
936
- type: number
937
- budget:
938
- type: object
939
- additionalProperties: true
940
- workflowPattern:
941
- type: string
942
- enum: [single_action, chaining, routing, parallelization, evaluator-optimizer, agent]
943
- workflow:
944
- type: object
945
- additionalProperties: true
946
- goal:
947
- type: string
948
- tools:
949
- type: array
950
- items:
951
- type: string
952
- branches:
953
- type: array
954
- items:
955
- type: string
956
- steps:
957
- type: array
958
- items:
959
- type: string
960
- routes:
961
- type: array
962
- items:
963
- type: string
964
- command:
965
- type: string
966
- filePath:
967
- type: string
968
- changedFiles:
969
- type: array
970
- items:
971
- type: string
972
- repoPath:
973
- type: string
974
- baseBranch:
975
- type: string
976
- requirePrForReleaseSensitive:
977
- type: boolean
978
- requireVersionNotBehindBase:
979
- type: boolean
980
- workflowDispatch:
981
- type: object
982
- description: Evidence required before running `gh workflow run` or another environment-specific workflow dispatch.
983
- properties:
984
- environment:
985
- type: string
986
- description: Requested environment such as dev, staging, beta, or release.
987
- workflow:
988
- type: string
989
- description: Expected workflow file or workflow name.
990
- ref:
991
- type: string
992
- description: Expected branch or ref passed to the workflow dispatch command.
993
- sha:
994
- type: string
995
- description: Expected HEAD SHA to verify before and after dispatch.
996
- job:
997
- type: string
998
- description: Expected job name to verify before reporting the workflow URL.
999
- responses:
1000
- '200':
1001
- description: Persisted workflow-sentinel recommendation with decision-control metadata and actionId
1002
- content:
1003
- application/json:
1004
- schema:
1005
- type: object
1006
- additionalProperties: true
1007
- '400':
1008
- description: Invalid decision evaluation request
1009
- '401':
1010
- description: Unauthorized
1011
- /v1/decisions/outcome:
1012
- post:
1013
- operationId: recordDecisionOutcome
1014
- requestBody:
1015
- required: true
1016
- content:
1017
- application/json:
1018
- schema:
1019
- type: object
1020
- required: [actionId, outcome]
1021
- properties:
1022
- actionId:
1023
- type: string
1024
- outcome:
1025
- type: string
1026
- actualDecision:
1027
- type: string
1028
- actor:
1029
- type: string
1030
- notes:
1031
- type: string
1032
- latencyMs:
1033
- type: number
1034
- metadata:
1035
- type: object
1036
- additionalProperties: true
1037
- responses:
1038
- '200':
1039
- description: Recorded a decision override, rollback, completion, or block outcome
1040
- content:
1041
- application/json:
1042
- schema:
1043
- type: object
1044
- additionalProperties: true
1045
- '400':
1046
- description: Invalid decision outcome request
1047
- '401':
1048
- description: Unauthorized
1049
- /v1/decisions/metrics:
1050
- get:
1051
- operationId: getDecisionMetrics
1052
- responses:
1053
- '200':
1054
- description: Decision-loop metrics derived from recorded evaluations and outcomes
1055
- content:
1056
- application/json:
1057
- schema:
1058
- type: object
1059
- additionalProperties: true
1060
- '401':
1061
- description: Unauthorized
1062
- /v1/settings/status:
1063
- get:
1064
- operationId: getSettingsStatus
1065
- responses:
1066
- '200':
1067
- description: Resolved settings hierarchy with per-field origin metadata for managed, user, project, and local scopes
1068
- content:
1069
- application/json:
1070
- schema:
1071
- type: object
1072
- additionalProperties: true
1073
- '401':
1074
- description: Unauthorized
1075
- /v1/billing/summary:
1076
- get:
1077
- operationId: getBillingSummary
1078
- responses:
1079
- '200':
1080
- description: Admin-only business summary from the funnel ledger, revenue ledger, and key store
1081
- content:
1082
- application/json:
1083
- schema:
1084
- $ref: '#/components/schemas/BillingSummaryResponse'
1085
- '401':
1086
- description: Unauthorized
1087
- '403':
1088
- description: Forbidden
1089
- /v1/intake/workflow-sprint:
1090
- post:
1091
- operationId: submitWorkflowSprintIntake
1092
- requestBody:
1093
- required: true
1094
- content:
1095
- application/json:
1096
- schema:
1097
- $ref: '#/components/schemas/WorkflowSprintIntakeRequest'
1098
- responses:
1099
- '201':
1100
- description: Workflow Hardening Sprint lead accepted
1101
- content:
1102
- application/json:
1103
- schema:
1104
- $ref: '#/components/schemas/WorkflowSprintIntakeResponse'
1105
- '400':
1106
- description: Invalid sprint intake request
1107
- /v1/intake/workflow-sprint/advance:
1108
- post:
1109
- operationId: advanceWorkflowSprintLead
1110
- requestBody:
1111
- required: true
1112
- content:
1113
- application/json:
1114
- schema:
1115
- $ref: '#/components/schemas/WorkflowSprintAdvanceRequest'
1116
- responses:
1117
- '200':
1118
- description: Workflow Hardening Sprint lead advanced to the next state
1119
- content:
1120
- application/json:
1121
- schema:
1122
- $ref: '#/components/schemas/WorkflowSprintAdvanceResponse'
1123
- '400':
1124
- description: Invalid sprint advancement request
1125
- '403':
1126
- description: Forbidden
1127
- /v1/intents/catalog:
1128
- get:
1129
- operationId: listIntentCatalog
1130
- parameters:
1131
- - in: query
1132
- name: mcpProfile
1133
- schema:
1134
- type: string
1135
- - in: query
1136
- name: bundleId
1137
- schema:
1138
- type: string
1139
- - in: query
1140
- name: partnerProfile
1141
- schema:
1142
- type: string
1143
- responses:
1144
- '200':
1145
- description: Intent catalog with risk and checkpoint metadata
1146
- '401':
1147
- description: Unauthorized
1148
- /v1/intents/plan:
1149
- post:
1150
- operationId: planIntent
1151
- requestBody:
1152
- required: true
1153
- content:
1154
- application/json:
1155
- schema:
1156
- $ref: '#/components/schemas/IntentPlanRequest'
1157
- responses:
1158
- '200':
1159
- description: Policy-scoped intent execution plan
1160
- '400':
1161
- description: Invalid intent request
1162
- '401':
1163
- description: Unauthorized
1164
- /v1/handoffs/start:
1165
- post:
1166
- operationId: startHandoff
1167
- requestBody:
1168
- required: true
1169
- content:
1170
- application/json:
1171
- schema:
1172
- $ref: '#/components/schemas/HandoffStartRequest'
1173
- responses:
1174
- '200':
1175
- description: Sequential handoff started
1176
- '400':
1177
- description: Invalid handoff request
1178
- '401':
1179
- description: Unauthorized
1180
- /v1/handoffs/complete:
1181
- post:
1182
- operationId: completeHandoff
1183
- requestBody:
1184
- required: true
1185
- content:
1186
- application/json:
1187
- schema:
1188
- $ref: '#/components/schemas/HandoffCompleteRequest'
1189
- responses:
1190
- '200':
1191
- description: Sequential handoff completed
1192
- '400':
1193
- description: Invalid handoff completion request
1194
- '401':
1195
- description: Unauthorized
1196
- /v1/internal-agent/bootstrap:
1197
- post:
1198
- operationId: bootstrapInternalAgent
1199
- requestBody:
1200
- required: true
1201
- content:
1202
- application/json:
1203
- schema:
1204
- $ref: '#/components/schemas/InternalAgentBootstrapRequest'
1205
- responses:
1206
- '200':
1207
- description: Normalized trigger context, recall pack, sandbox, and reviewer-ready execution plan
1208
- '400':
1209
- description: Invalid internal-agent bootstrap request
1210
- '401':
1211
- description: Unauthorized
1212
- /v1/feedback/summary:
1213
- get:
1214
- operationId: getFeedbackSummary
1215
- parameters:
1216
- - in: query
1217
- name: recent
1218
- schema:
1219
- type: integer
1220
- default: 20
1221
- responses:
1222
- '200':
1223
- description: Feedback summary text
1224
- '401':
1225
- description: Unauthorized
1226
- /v1/lessons/search:
1227
- get:
1228
- operationId: searchLessons
1229
- parameters:
1230
- - in: query
1231
- name: q
1232
- schema:
1233
- type: string
1234
- description: Search query. Leave empty to list recent lessons.
1235
- - in: query
1236
- name: limit
1237
- schema:
1238
- type: integer
1239
- default: 10
1240
- - in: query
1241
- name: category
1242
- schema:
1243
- type: string
1244
- enum: [error, learning, preference]
1245
- - in: query
1246
- name: tags
1247
- schema:
1248
- type: string
1249
- description: Comma-separated tags that must all be present on a lesson.
1250
- responses:
1251
- '200':
1252
- description: Searchable promoted lessons with linked corrective actions, prevention rules, and auto-promoted checks
1253
- '401':
1254
- description: Unauthorized
1255
- /v1/search:
1256
- get:
1257
- operationId: searchThumbgate
1258
- parameters:
1259
- - in: query
1260
- name: q
1261
- schema:
1262
- type: string
1263
- description: Search query for raw ThumbGate state.
1264
- - in: query
1265
- name: limit
1266
- schema:
1267
- type: integer
1268
- default: 10
1269
- - in: query
1270
- name: source
1271
- schema:
1272
- type: string
1273
- enum: [all, feedback, context, rules]
1274
- default: all
1275
- - in: query
1276
- name: signal
1277
- schema:
1278
- type: string
1279
- enum: [up, down, positive, negative]
1280
- responses:
1281
- '200':
1282
- description: Search results across feedback logs, ContextFS, and prevention rules
1283
- '401':
1284
- description: Unauthorized
1285
- post:
1286
- operationId: searchThumbgatePost
1287
- requestBody:
1288
- required: true
1289
- content:
1290
- application/json:
1291
- schema:
1292
- type: object
1293
- properties:
1294
- query:
1295
- type: string
1296
- q:
1297
- type: string
1298
- limit:
1299
- type: integer
1300
- default: 10
1301
- source:
1302
- type: string
1303
- enum: [all, feedback, context, rules]
1304
- default: all
1305
- signal:
1306
- type: string
1307
- enum: [up, down, positive, negative]
1308
- responses:
1309
- '200':
1310
- description: Search results across feedback logs, ContextFS, and prevention rules
1311
- '401':
1312
- description: Unauthorized
1313
- /v1/feedback/rules:
1314
- post:
1315
- operationId: generatePreventionRules
1316
- requestBody:
1317
- required: false
1318
- content:
1319
- application/json:
1320
- schema:
1321
- type: object
1322
- properties:
1323
- minOccurrences:
1324
- type: integer
1325
- default: 2
1326
- outputPath:
1327
- type: string
1328
- responses:
1329
- '200':
1330
- description: Prevention rules generated
1331
- '401':
1332
- description: Unauthorized
1333
- /v1/dpo/export:
1334
- post:
1335
- operationId: exportDpoPairs
1336
- requestBody:
1337
- required: false
1338
- content:
1339
- application/json:
1340
- schema:
1341
- type: object
1342
- properties:
1343
- inputPath:
1344
- type: string
1345
- memoryLogPath:
1346
- type: string
1347
- outputPath:
1348
- type: string
1349
- async:
1350
- type: boolean
1351
- mode:
1352
- type: string
1353
- enum: [sync, async]
1354
- jobId:
1355
- type: string
1356
- responses:
1357
- '200':
1358
- description: DPO export completed
1359
- '202':
1360
- description: DPO export accepted as a hosted background job
1361
- '401':
1362
- description: Unauthorized
1363
- /v1/documents:
1364
- get:
1365
- operationId: listImportedDocuments
1366
- parameters:
1367
- - in: query
1368
- name: query
1369
- schema:
1370
- type: string
1371
- - in: query
1372
- name: q
1373
- schema:
1374
- type: string
1375
- - in: query
1376
- name: tag
1377
- schema:
1378
- type: string
1379
- - in: query
1380
- name: limit
1381
- schema:
1382
- type: integer
1383
- default: 20
1384
- responses:
1385
- '200':
1386
- description: Imported policy and runbook documents
1387
- '401':
1388
- description: Unauthorized
1389
- /v1/documents/import:
1390
- post:
1391
- operationId: importDocument
1392
- requestBody:
1393
- required: true
1394
- content:
1395
- application/json:
1396
- schema:
1397
- type: object
1398
- properties:
1399
- filePath:
1400
- type: string
1401
- content:
1402
- type: string
1403
- title:
1404
- type: string
1405
- sourceFormat:
1406
- type: string
1407
- enum: [markdown, text, yaml, json, html]
1408
- sourceUrl:
1409
- type: string
1410
- tags:
1411
- type: array
1412
- items:
1413
- type: string
1414
- proposeGates:
1415
- type: boolean
1416
- responses:
1417
- '201':
1418
- description: Document imported
1419
- '400':
1420
- description: Invalid document import request
1421
- '401':
1422
- description: Unauthorized
1423
- /v1/documents/{documentId}:
1424
- get:
1425
- operationId: getImportedDocument
1426
- parameters:
1427
- - in: path
1428
- name: documentId
1429
- required: true
1430
- schema:
1431
- type: string
1432
- responses:
1433
- '200':
1434
- description: Imported document with proposed gates
1435
- '401':
1436
- description: Unauthorized
1437
- '404':
1438
- description: Imported document not found
1439
- /v1/jobs:
1440
- get:
1441
- operationId: listHostedJobs
1442
- parameters:
1443
- - in: query
1444
- name: limit
1445
- schema:
1446
- type: integer
1447
- default: 20
1448
- - in: query
1449
- name: status
1450
- schema:
1451
- type: string
1452
- description: Optional comma-separated list of job statuses to filter.
1453
- responses:
1454
- '200':
1455
- description: Hosted job states
1456
- '401':
1457
- description: Unauthorized
1458
- /v1/jobs/harness:
1459
- post:
1460
- operationId: launchHostedHarness
1461
- requestBody:
1462
- required: true
1463
- content:
1464
- application/json:
1465
- schema:
1466
- type: object
1467
- required: [harness]
1468
- properties:
1469
- harness:
1470
- type: string
1471
- harnessId:
1472
- type: string
1473
- jobId:
1474
- type: string
1475
- skill:
1476
- type: string
1477
- partnerProfile:
1478
- type: string
1479
- autoImprove:
1480
- type: boolean
1481
- inputs:
1482
- type: object
1483
- responses:
1484
- '202':
1485
- description: Hosted harness accepted
1486
- '401':
1487
- description: Unauthorized
1488
- /v1/jobs/{jobId}:
1489
- get:
1490
- operationId: getHostedJob
1491
- parameters:
1492
- - in: path
1493
- name: jobId
1494
- required: true
1495
- schema:
1496
- type: string
1497
- responses:
1498
- '200':
1499
- description: Hosted job state
1500
- '401':
1501
- description: Unauthorized
1502
- '404':
1503
- description: Job not found
1504
- /v1/jobs/{jobId}/control:
1505
- post:
1506
- operationId: controlHostedJob
1507
- parameters:
1508
- - in: path
1509
- name: jobId
1510
- required: true
1511
- schema:
1512
- type: string
1513
- requestBody:
1514
- required: true
1515
- content:
1516
- application/json:
1517
- schema:
1518
- type: object
1519
- required: [action]
1520
- properties:
1521
- action:
1522
- type: string
1523
- enum: [pause, cancel, resume]
1524
- metadata:
1525
- type: object
1526
- responses:
1527
- '202':
1528
- description: Hosted job control accepted
1529
- '401':
1530
- description: Unauthorized
1531
- '404':
1532
- description: Job not found
1533
- '409':
1534
- description: Job cannot accept the requested control action
1535
- /v1/analytics/databricks/export:
1536
- post:
1537
- operationId: exportDatabricksBundle
1538
- requestBody:
1539
- required: false
1540
- content:
1541
- application/json:
1542
- schema:
1543
- type: object
1544
- properties:
1545
- outputPath:
1546
- type: string
1547
- responses:
1548
- '200':
1549
- description: Databricks bundle exported
1550
- '401':
1551
- description: Unauthorized
1552
- /v1/context/construct:
1553
- post:
1554
- operationId: constructContextPack
1555
- requestBody:
1556
- required: false
1557
- content:
1558
- application/json:
1559
- schema:
1560
- type: object
1561
- properties:
1562
- query:
1563
- type: string
1564
- maxItems:
1565
- type: integer
1566
- default: 8
1567
- maxChars:
1568
- type: integer
1569
- default: 6000
1570
- namespaces:
1571
- type: array
1572
- items:
1573
- type: string
1574
- enum:
1575
- - raw_history
1576
- - memory/error
1577
- - memory/learning
1578
- - rules
1579
- - tools
1580
- - provenance
1581
- responses:
1582
- '200':
1583
- description: Context pack created
1584
- '400':
1585
- description: Invalid namespace selection
1586
- '401':
1587
- description: Unauthorized
1588
- /v1/context/evaluate:
1589
- post:
1590
- operationId: evaluateContextPack
1591
- requestBody:
1592
- required: true
1593
- content:
1594
- application/json:
1595
- schema:
1596
- type: object
1597
- required: [packId, outcome]
1598
- properties:
1599
- packId:
1600
- type: string
1601
- outcome:
1602
- type: string
1603
- signal:
1604
- type: string
1605
- notes:
1606
- type: string
1607
- rubricScores:
1608
- type: array
1609
- items:
1610
- $ref: '#/components/schemas/RubricScore'
1611
- guardrails:
1612
- type: object
1613
- properties:
1614
- testsPassed:
1615
- type: boolean
1616
- pathSafety:
1617
- type: boolean
1618
- budgetCompliant:
1619
- type: boolean
1620
- responses:
1621
- '200':
1622
- description: Evaluation recorded
1623
- '400':
1624
- description: Invalid rubric payload
1625
- '401':
1626
- description: Unauthorized
1627
- /v1/context/provenance:
1628
- get:
1629
- operationId: getContextProvenance
1630
- parameters:
1631
- - in: query
1632
- name: limit
1633
- schema:
1634
- type: integer
1635
- default: 50
1636
- responses:
1637
- '200':
1638
- description: Recent provenance events
1639
- '401':
1640
- description: Unauthorized
1641
- /v1/billing/checkout:
1642
- post:
1643
- operationId: createBillingCheckoutSession
1644
- security: []
1645
- requestBody:
1646
- required: false
1647
- content:
1648
- application/json:
1649
- schema:
1650
- $ref: '#/components/schemas/BillingCheckoutRequest'
1651
- responses:
1652
- '200':
1653
- description: Stripe checkout session created
1654
- /v1/billing/usage:
1655
- get:
1656
- operationId: getBillingUsage
1657
- responses:
1658
- '200':
1659
- description: Usage count for authenticated billing key
1660
- '401':
1661
- description: Unauthorized
1662
- /v1/billing/provision:
1663
- post:
1664
- operationId: provisionBillingKey
1665
- requestBody:
1666
- required: true
1667
- content:
1668
- application/json:
1669
- schema:
1670
- $ref: '#/components/schemas/BillingProvisionRequest'
1671
- responses:
1672
- '200':
1673
- description: API key provisioned
1674
- '400':
1675
- description: Missing required customerId
1676
- '401':
1677
- description: Unauthorized
1678
- '403':
1679
- description: Forbidden - requires static THUMBGATE_API_KEY admin token
1680
- /v1/billing/webhook:
1681
- post:
1682
- operationId: stripeBillingWebhook
1683
- security: []
1684
- responses:
1685
- '200':
1686
- description: Webhook accepted
1687
- '400':
1688
- description: Invalid webhook signature or payload
1689
- /v1/billing/github-webhook:
1690
- post:
1691
- operationId: githubMarketplaceWebhook
1692
- security: []
1693
- responses:
1694
- '200':
1695
- description: Webhook accepted
1696
- '400':
1697
- description: Invalid webhook signature or payload
1698
- k signature or payload
1699
- /v1/billing/github-webhook:
1700
- post:
1701
- operationId: githubMarketplaceWebhook
1702
- security: []
1703
- responses:
1704
- '200':
1705
- description: Webhook accepted
1706
- '400':
1707
- description: Invalid webhook signature or payload