thumbgate 1.37.3 → 1.39.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 (134) hide show
  1. package/.agents/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
  2. package/.agents/skills/bolt-forge-opt-in-not-clone/SKILL.md +72 -0
  3. package/.agents/skills/decisive-step-evaluator/SKILL.md +47 -0
  4. package/.agents/skills/fiddler-control-plane-honesty/SKILL.md +61 -0
  5. package/.agents/skills/halo-trace-optimize-not-clone/SKILL.md +60 -0
  6. package/.agents/skills/harness-evolution-ceiling/SKILL.md +52 -0
  7. package/.agents/skills/infoq-architect-honesty-not-clone/SKILL.md +37 -0
  8. package/.agents/skills/meko-datapack-honesty-not-clone/SKILL.md +45 -0
  9. package/.agents/skills/mintlify-knowledge-honesty-not-clone/SKILL.md +49 -0
  10. package/.agents/skills/model-distress-governance/SKILL.md +56 -0
  11. package/.agents/skills/omp-coordination-honesty-not-clone/SKILL.md +94 -0
  12. package/.agents/skills/saas-moat-honesty-not-clone/SKILL.md +22 -0
  13. package/.agents/skills/salt-code-policy-honesty-not-clone/SKILL.md +76 -0
  14. package/.agents/skills/siren-mcp-governance/SKILL.md +50 -0
  15. package/.agents/skills/vs-coverage-gap-not-clone/SKILL.md +69 -0
  16. package/.agents/skills/wisdom-context-artifact-not-clone/SKILL.md +67 -0
  17. package/.claude-plugin/plugin.json +1 -1
  18. package/.well-known/mcp/server-card.json +1 -1
  19. package/adapters/claude/.mcp.json +2 -2
  20. package/adapters/forge/forge.yaml +3 -3
  21. package/adapters/future-agi/.mcp.json +1 -1
  22. package/adapters/future-agi/config.toml +1 -1
  23. package/adapters/future-agi/opencode.json +1 -1
  24. package/adapters/herdr/herdr-plugin.toml +2 -2
  25. package/adapters/hotdata/hotdata-vector-store.js +575 -0
  26. package/adapters/mcp/server-stdio.js +1 -1
  27. package/adapters/opencode/opencode.json +1 -1
  28. package/adapters/strands/STRANDS.md +107 -0
  29. package/adapters/strands/strands-box-diode.js +344 -0
  30. package/adapters/strands/strands-decider-adapter.js +445 -0
  31. package/adapters/strands/strands-middleware.js +192 -0
  32. package/adapters/tailscale/.mcp.json +15 -0
  33. package/adapters/tailscale/TAILSCALE.md +117 -0
  34. package/adapters/tailscale/config.toml +16 -0
  35. package/bin/cli.js +602 -21
  36. package/config/gate-templates.json +109 -0
  37. package/config/gates/default.json +13 -0
  38. package/config/schemas/task-outcome-receipt.schema.json +12 -0
  39. package/package.json +150 -21
  40. package/public/blog/2026-09-28-pretool-secret-deny.html +83 -0
  41. package/public/blog/2026-10-01-aws-strands-harness-token-firewall.html +77 -0
  42. package/public/blog/2026-10-01-model-distress-relief-seeking-firewall.html +71 -0
  43. package/public/blog/2026-10-02-salt-code-honest-steal-40-guardrails.html +106 -0
  44. package/public/blog/2026-10-05-why-3-days-of-triage-wont-save-ai-speed-code.html +119 -0
  45. package/public/blog/2026-10-09-your-code-got-a-third-author-governance.html +141 -0
  46. package/public/connectors.html +329 -0
  47. package/public/enterprise-governance.html +311 -0
  48. package/public/gaming-playbook.html +732 -0
  49. package/public/index.html +77 -51
  50. package/public/install.html +7 -7
  51. package/public/learn.html +14 -0
  52. package/public/numbers.html +2 -2
  53. package/public/onboarding.html +794 -0
  54. package/public/operator-framework.html +385 -0
  55. package/public/pricing.html +14 -10
  56. package/scripts/activesaddler-curriculum-doctor.js +357 -0
  57. package/scripts/agent-context-artifact.js +325 -0
  58. package/scripts/agent-egress-policy.js +2 -2
  59. package/scripts/agent-operations-planner.js +1 -1
  60. package/scripts/agent-outcome-eval.js +1 -1
  61. package/scripts/agent-reliability-client.js +148 -0
  62. package/scripts/apple-minions-idle-compute-steal.js +428 -0
  63. package/scripts/autoresearch-runner.js +20 -1
  64. package/scripts/billing.js +0 -1
  65. package/scripts/cli-demo.js +505 -1
  66. package/scripts/cli-schema.js +36 -0
  67. package/scripts/colab-compute-honesty.js +93 -0
  68. package/scripts/corporate-email-isolation-diode.js +299 -0
  69. package/scripts/coverage-gap.js +396 -0
  70. package/scripts/dashboard-chat.js +3 -3
  71. package/scripts/dashboard.js +2 -2
  72. package/scripts/decisive-step-doctor.js +256 -0
  73. package/scripts/decisive-step-evaluator.js +390 -0
  74. package/scripts/entitlement.js +18 -7
  75. package/scripts/experiment-tracker.js +5 -3
  76. package/scripts/feedback-loop.js +26 -3
  77. package/scripts/fiddler-control-plane-honesty.js +303 -0
  78. package/scripts/financial-control-plane.js +10 -2
  79. package/scripts/gates-engine.js +3 -1
  80. package/scripts/github-license-compliance-diode.js +378 -0
  81. package/scripts/halo-trace-optimizer.js +631 -0
  82. package/scripts/harness-ceiling-doctor.js +326 -0
  83. package/scripts/hf-papers.js +1 -1
  84. package/scripts/human-escalation.js +7 -1
  85. package/scripts/hybrid-feedback-context.js +53 -7
  86. package/scripts/infoq-architect-honesty.js +362 -0
  87. package/scripts/lesson-graph.js +785 -0
  88. package/scripts/lesson-inference.js +1 -1
  89. package/scripts/lesson-retrieval.js +26 -18
  90. package/scripts/license.js +122 -21
  91. package/scripts/llm-behavior-monitor.js +1 -1
  92. package/scripts/llm-obs-honesty.js +52 -0
  93. package/scripts/local-model-profile.js +11 -7
  94. package/scripts/mailer/resend-mailer.js +6 -3
  95. package/scripts/mcp-transport-strategy.js +1 -1
  96. package/scripts/meko-datapack-honesty.js +414 -0
  97. package/scripts/migrate-lesson-graph.js +442 -0
  98. package/scripts/mintlify-knowledge-honesty.js +647 -0
  99. package/scripts/model-distress-detector.js +207 -0
  100. package/scripts/model-distress-doctor.js +368 -0
  101. package/scripts/multi-harness-invariants.js +305 -0
  102. package/scripts/omp-coordination-honesty.js +488 -0
  103. package/scripts/pro-local-dashboard.js +20 -3
  104. package/scripts/prompt-eval.js +1 -1
  105. package/scripts/prove-herdr-adapter.js +367 -3
  106. package/scripts/rag-embedding-identity.js +1 -1
  107. package/scripts/rrsi-regularizer.js +531 -0
  108. package/scripts/saas-moat-honesty.js +443 -0
  109. package/scripts/salt-code-policy-honesty.js +1204 -0
  110. package/scripts/secret-redaction.js +58 -0
  111. package/scripts/session-export-gate.js +368 -0
  112. package/scripts/siren-mcp-governance.js +539 -0
  113. package/scripts/strands-box-doctor.js +130 -0
  114. package/scripts/strands-harness-doctor.js +390 -0
  115. package/scripts/stripe-revenue-catalog-audit.js +12 -0
  116. package/scripts/stripe-revenue-catalog.js +40 -0
  117. package/scripts/switchyard-router.js +153 -0
  118. package/scripts/tailscale-p2p-doctor.js +252 -0
  119. package/scripts/task-outcomes.js +148 -3
  120. package/scripts/thumbgate-board-loop.js +4 -2
  121. package/scripts/thumbgate-daily-discoveries-publish.js +86 -38
  122. package/scripts/triage-savings-calculator.js +181 -0
  123. package/scripts/vector-store.js +41 -2
  124. package/scripts/vulnerability-pre-action-diode.js +319 -0
  125. package/scripts/windbg-evidence-diagnostics.js +241 -0
  126. package/scripts/workflow-intake-queue.js +1 -1
  127. package/scripts/workspace-agent-routines.js +534 -6
  128. package/scripts/workspace-evolver.js +143 -13
  129. package/server.json +2 -2
  130. package/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
  131. package/skills/siren-mcp-governance/SKILL.md +50 -0
  132. package/src/api/server.js +191 -5
  133. package/src/mcp-writeguard.js +1 -1
  134. package/src/session-interactivity.js +284 -0
@@ -0,0 +1,284 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Session-level interactivity: what the user actually waited, not what the
5
+ * server was busy for.
6
+ *
7
+ * Taken from NVIDIA's SemiAnalysis AgentX methodology, which reports two rates
8
+ * side by side and treats the gap between them as the finding:
9
+ *
10
+ * Standard Interactivity
11
+ * "output tokens divided by the elapsed time from the first token to the
12
+ * last"
13
+ *
14
+ * E2E Normalized Interactivity
15
+ * "average output-token rate per user over the full request, calculated by
16
+ * dividing total output tokens by the time from request submission to
17
+ * final-token delivery"
18
+ *
19
+ * Standard starts the clock at the first token. Everything before that -- queue
20
+ * time, scheduling, a runner that has not claimed the work yet -- is invisible
21
+ * to it. E2E starts at submission, so it counts what the person counts.
22
+ *
23
+ * WHY THIS EXISTS HERE
24
+ *
25
+ * 2026-08-25, production: a task was created at 17:34:08Z and completed at
26
+ * 17:34:53Z. The execution itself was quick and the UI advertised a "90s
27
+ * lease", so by any server-side measure the system was healthy. The user spent
28
+ * that time looking at a spinner reading "Waiting for the fenced VPS runner to
29
+ * pick this up". Standard Interactivity would have scored that request well.
30
+ *
31
+ * A metric that cannot see queue time cannot see that outage. This module
32
+ * exists so that class of defect shows up as a number rather than as a
33
+ * screenshot.
34
+ *
35
+ * WHY SESSIONS AND NOT REQUESTS
36
+ *
37
+ * Also from AgentX: "Agentic sessions are long, stateful, and variable: they
38
+ * chain model calls, tool use, and growing context rather than following a
39
+ * fixed prompt-and-response pattern." Their sample session grows from roughly
40
+ * 60K to 400K tokens, and industry figures they cite put a single agentic
41
+ * request at ~15x the tokens of ordinary chat. Per-call averages hide all of
42
+ * that, so everything below aggregates over a whole session and keeps tool
43
+ * gaps in the denominator: a tool call the user waits through is wait, whoever
44
+ * is executing it.
45
+ */
46
+
47
+ /** A turn is only usable if these are present and ordered. */
48
+ const REQUIRED = ['submittedAt', 'firstTokenAt', 'lastTokenAt'];
49
+
50
+ /**
51
+ * Fraction of total wall time that may be invisible to Standard Interactivity
52
+ * before it is called out. Deliberately generous: this is meant to catch a
53
+ * request that spent most of its life queued, not to police a slow scheduler.
54
+ */
55
+ const HIDDEN_WAIT_BUDGET = 0.25;
56
+
57
+ function isFiniteNumber(value) {
58
+ return typeof value === 'number' && Number.isFinite(value);
59
+ }
60
+
61
+ /**
62
+ * Validate one turn, returning a reason string when unusable.
63
+ *
64
+ * Unusable turns are never silently dropped: a session whose turns cannot be
65
+ * measured must report as UNKNOWN rather than as fast, for the same reason the
66
+ * incident above went unnoticed.
67
+ */
68
+ function turnProblem(turn) {
69
+ if (!turn || typeof turn !== 'object') return 'not an object';
70
+ for (const field of REQUIRED) {
71
+ if (!isFiniteNumber(turn[field])) return `missing or non-numeric ${field}`;
72
+ }
73
+ if (turn.firstTokenAt < turn.submittedAt) return 'firstTokenAt precedes submittedAt';
74
+ if (turn.lastTokenAt < turn.firstTokenAt) return 'lastTokenAt precedes firstTokenAt';
75
+ if (!isFiniteNumber(turn.outputTokens) || turn.outputTokens < 0) {
76
+ return 'missing or negative outputTokens';
77
+ }
78
+ return null;
79
+ }
80
+
81
+ /**
82
+ * Measure a single turn.
83
+ *
84
+ * Rates are tokens per second. A zero-length generation window yields a null
85
+ * rate rather than Infinity -- an unmeasurable rate is not an infinitely fast
86
+ * one, and reporting Infinity here would flatter exactly the pathological case
87
+ * this module is watching for.
88
+ */
89
+ function measureTurn(turn) {
90
+ const problem = turnProblem(turn);
91
+ if (problem) return { ok: false, problem };
92
+
93
+ const queueMs = turn.firstTokenAt - turn.submittedAt;
94
+ const generationMs = turn.lastTokenAt - turn.firstTokenAt;
95
+ const totalMs = turn.lastTokenAt - turn.submittedAt;
96
+ const rate = (ms) => (ms > 0 ? (turn.outputTokens / ms) * 1000 : null);
97
+
98
+ return {
99
+ ok: true,
100
+ outputTokens: turn.outputTokens,
101
+ queueMs,
102
+ generationMs,
103
+ totalMs,
104
+ ttftMs: queueMs,
105
+ standardInteractivity: rate(generationMs),
106
+ e2eNormalizedInteractivity: rate(totalMs),
107
+ };
108
+ }
109
+
110
+ /**
111
+ * Aggregate a whole session.
112
+ *
113
+ * The denominator for E2E is submission of the first turn to the final token of
114
+ * the last, which means time spent in tool calls between turns stays counted.
115
+ * That is intentional: from the user's chair a tool call is indistinguishable
116
+ * from thinking, and a serving stack that offloads work into tools should not
117
+ * get to subtract that time from its own score.
118
+ *
119
+ * @param {Object} session - { id, turns: [{ submittedAt, firstTokenAt, lastTokenAt, outputTokens, promptTokens? }] }
120
+ * @returns {Object} measurement, always including `status`
121
+ */
122
+ function measureSession(session) {
123
+ const turns = session && Array.isArray(session.turns) ? session.turns : null;
124
+ if (!turns || turns.length === 0) {
125
+ return { status: 'NO_DATA', id: session && session.id, reason: 'no turns supplied' };
126
+ }
127
+
128
+ const measured = [];
129
+ const problems = [];
130
+ turns.forEach((turn, index) => {
131
+ const result = measureTurn(turn);
132
+ if (result.ok) measured.push({ index, ...result });
133
+ else problems.push({ index, problem: result.problem });
134
+ });
135
+
136
+ // Any unmeasurable turn makes the session total unknowable. Reporting the
137
+ // measurable subset would understate the wait, which is the failure mode.
138
+ if (problems.length) {
139
+ return {
140
+ status: 'UNKNOWN',
141
+ id: session && session.id,
142
+ reason: 'one or more turns could not be measured',
143
+ problems,
144
+ measuredTurns: measured.length,
145
+ totalTurns: turns.length,
146
+ };
147
+ }
148
+
149
+ const ordered = [...turns].sort((a, b) => a.submittedAt - b.submittedAt);
150
+ if (ordered.some((turn, index) => index > 0 && turn.submittedAt < ordered[index - 1].lastTokenAt)) {
151
+ return { status: 'UNKNOWN', id: session.id, reason: 'overlapping turns cannot be measured as a sequential session' };
152
+ }
153
+
154
+ const outputTokens = measured.reduce((sum, t) => sum + t.outputTokens, 0);
155
+ const sessionStart = Math.min(...turns.map((t) => t.submittedAt));
156
+ const sessionEnd = Math.max(...turns.map((t) => t.lastTokenAt));
157
+ const wallMs = sessionEnd - sessionStart;
158
+
159
+ const generationMs = measured.reduce((sum, t) => sum + t.generationMs, 0);
160
+ const queueMs = measured.reduce((sum, t) => sum + t.queueMs, 0);
161
+ // Whatever is left is time between turns: tool execution, agent deliberation,
162
+ // scheduling. The user waited through all of it.
163
+ const gapMs = Math.max(0, wallMs - generationMs - queueMs);
164
+
165
+ const rate = (ms) => (ms > 0 ? (outputTokens / ms) * 1000 : null);
166
+ const standard = rate(generationMs);
167
+ const e2e = rate(wallMs);
168
+
169
+ const hiddenMs = wallMs - generationMs;
170
+ const hiddenFraction = wallMs > 0 ? hiddenMs / wallMs : 0;
171
+
172
+ return {
173
+ status: 'OK',
174
+ id: session && session.id,
175
+ turns: measured.length,
176
+ outputTokens,
177
+ promptTokensFirst: firstPromptTokens(ordered),
178
+ promptTokensLast: lastPromptTokens(ordered),
179
+ wallMs,
180
+ generationMs,
181
+ queueMs,
182
+ gapMs,
183
+ standardInteractivity: standard,
184
+ e2eNormalizedInteractivity: e2e,
185
+ // The headline: how much of the user's wait the standard metric cannot see.
186
+ hiddenWaitMs: hiddenMs,
187
+ hiddenWaitFraction: hiddenFraction,
188
+ hiddenWaitExceedsBudget: hiddenFraction > HIDDEN_WAIT_BUDGET,
189
+ };
190
+ }
191
+
192
+ function firstPromptTokens(turns) {
193
+ const first = turns.find((t) => isFiniteNumber(t && t.promptTokens));
194
+ return first ? first.promptTokens : null;
195
+ }
196
+
197
+ function lastPromptTokens(turns) {
198
+ for (let i = turns.length - 1; i >= 0; i -= 1) {
199
+ if (isFiniteNumber(turns[i] && turns[i].promptTokens)) return turns[i].promptTokens;
200
+ }
201
+ return null;
202
+ }
203
+
204
+ /**
205
+ * Context growth across a session, the other thing fixed-length benchmarks
206
+ * cannot show. AgentX reports a session growing ~60K -> ~400K tokens; a
207
+ * benchmark pinned at 8K in / 1K out would call that the same workload.
208
+ */
209
+ function contextGrowth(session) {
210
+ const measurement = measureSession(session);
211
+ if (measurement.status !== 'OK') return measurement;
212
+ const { promptTokensFirst: first, promptTokensLast: last } = measurement;
213
+ const observations = session.turns.filter((turn) => isFiniteNumber(turn.promptTokens));
214
+ if (observations.length < 2 || !isFiniteNumber(first) || !isFiniteNumber(last) || first <= 0) {
215
+ return { status: 'NO_DATA', reason: 'promptTokens not reported on enough turns' };
216
+ }
217
+ return { status: 'OK', first, last, growthFactor: last / first };
218
+ }
219
+
220
+ /**
221
+ * Compare two serving configurations over the SAME recorded sessions.
222
+ *
223
+ * AgentX is explicit about why replay matters: "Because every system receives
224
+ * the same recorded traffic, observed differences reflect the serving stack
225
+ * rather than benchmark-specific tuning." Comparing runs over different traffic
226
+ * measures the traffic.
227
+ */
228
+ function compareRuns(baseline, candidate) {
229
+ const ids = (run) => Array.isArray(run) ? run.map((session) => session && session.id) : [];
230
+ const aIds = ids(baseline);
231
+ const bIds = ids(candidate);
232
+ const validIds = (values) => values.length > 0
233
+ && values.every((id) => typeof id === 'string' && id.trim().length > 0)
234
+ && new Set(values).size === values.length;
235
+ if (!validIds(aIds) || !validIds(bIds) || aIds.length !== bIds.length
236
+ || aIds.some((id, index) => id !== bIds[index])) {
237
+ return {
238
+ status: 'INVALID',
239
+ reason: 'runs did not replay the same sessions in the same order',
240
+ };
241
+ }
242
+
243
+ const summarize = (run) => {
244
+ const results = run.map((x) => measureSession(x));
245
+ if (results.some((r) => r.status !== 'OK')) {
246
+ return { status: 'UNKNOWN', results };
247
+ }
248
+ const tokens = results.reduce((sum, r) => sum + r.outputTokens, 0);
249
+ const wall = results.reduce((sum, r) => sum + r.wallMs, 0);
250
+ return {
251
+ status: 'OK',
252
+ results,
253
+ outputTokens: tokens,
254
+ wallMs: wall,
255
+ e2eNormalizedInteractivity: wall > 0 ? (tokens / wall) * 1000 : null,
256
+ };
257
+ };
258
+
259
+ const a = summarize(baseline);
260
+ const b = summarize(candidate);
261
+ if (a.status !== 'OK' || b.status !== 'OK') {
262
+ return { status: 'UNKNOWN', reason: 'a session in one run could not be measured', baseline: a, candidate: b };
263
+ }
264
+ if (!a.e2eNormalizedInteractivity) {
265
+ return { status: 'UNKNOWN', reason: 'baseline rate is not measurable' };
266
+ }
267
+
268
+ return {
269
+ status: 'OK',
270
+ baseline: a.e2eNormalizedInteractivity,
271
+ candidate: b.e2eNormalizedInteractivity,
272
+ speedup: b.e2eNormalizedInteractivity / a.e2eNormalizedInteractivity,
273
+ sessions: baseline.length,
274
+ };
275
+ }
276
+
277
+ module.exports = {
278
+ measureTurn,
279
+ measureSession,
280
+ contextGrowth,
281
+ compareRuns,
282
+ turnProblem,
283
+ HIDDEN_WAIT_BUDGET,
284
+ };