thumbgate 1.27.17 → 1.27.18

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