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.
- package/.agents/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
- package/.agents/skills/bolt-forge-opt-in-not-clone/SKILL.md +72 -0
- package/.agents/skills/decisive-step-evaluator/SKILL.md +47 -0
- package/.agents/skills/fiddler-control-plane-honesty/SKILL.md +61 -0
- package/.agents/skills/halo-trace-optimize-not-clone/SKILL.md +60 -0
- package/.agents/skills/harness-evolution-ceiling/SKILL.md +52 -0
- package/.agents/skills/infoq-architect-honesty-not-clone/SKILL.md +37 -0
- package/.agents/skills/meko-datapack-honesty-not-clone/SKILL.md +45 -0
- package/.agents/skills/mintlify-knowledge-honesty-not-clone/SKILL.md +49 -0
- package/.agents/skills/model-distress-governance/SKILL.md +56 -0
- package/.agents/skills/omp-coordination-honesty-not-clone/SKILL.md +94 -0
- package/.agents/skills/saas-moat-honesty-not-clone/SKILL.md +22 -0
- package/.agents/skills/salt-code-policy-honesty-not-clone/SKILL.md +76 -0
- package/.agents/skills/siren-mcp-governance/SKILL.md +50 -0
- package/.agents/skills/vs-coverage-gap-not-clone/SKILL.md +69 -0
- package/.agents/skills/wisdom-context-artifact-not-clone/SKILL.md +67 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/future-agi/.mcp.json +1 -1
- package/adapters/future-agi/config.toml +1 -1
- package/adapters/future-agi/opencode.json +1 -1
- package/adapters/herdr/herdr-plugin.toml +2 -2
- package/adapters/hotdata/hotdata-vector-store.js +575 -0
- package/adapters/mcp/server-stdio.js +1 -1
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/strands/STRANDS.md +107 -0
- package/adapters/strands/strands-box-diode.js +344 -0
- package/adapters/strands/strands-decider-adapter.js +445 -0
- package/adapters/strands/strands-middleware.js +192 -0
- package/adapters/tailscale/.mcp.json +15 -0
- package/adapters/tailscale/TAILSCALE.md +117 -0
- package/adapters/tailscale/config.toml +16 -0
- package/bin/cli.js +602 -21
- package/config/gate-templates.json +109 -0
- package/config/gates/default.json +13 -0
- package/config/schemas/task-outcome-receipt.schema.json +12 -0
- package/package.json +150 -21
- package/public/blog/2026-09-28-pretool-secret-deny.html +83 -0
- package/public/blog/2026-10-01-aws-strands-harness-token-firewall.html +77 -0
- package/public/blog/2026-10-01-model-distress-relief-seeking-firewall.html +71 -0
- package/public/blog/2026-10-02-salt-code-honest-steal-40-guardrails.html +106 -0
- package/public/blog/2026-10-05-why-3-days-of-triage-wont-save-ai-speed-code.html +119 -0
- package/public/blog/2026-10-09-your-code-got-a-third-author-governance.html +141 -0
- package/public/connectors.html +329 -0
- package/public/enterprise-governance.html +311 -0
- package/public/gaming-playbook.html +732 -0
- package/public/index.html +77 -51
- package/public/install.html +7 -7
- package/public/learn.html +14 -0
- package/public/numbers.html +2 -2
- package/public/onboarding.html +794 -0
- package/public/operator-framework.html +385 -0
- package/public/pricing.html +14 -10
- package/scripts/activesaddler-curriculum-doctor.js +357 -0
- package/scripts/agent-context-artifact.js +325 -0
- package/scripts/agent-egress-policy.js +2 -2
- package/scripts/agent-operations-planner.js +1 -1
- package/scripts/agent-outcome-eval.js +1 -1
- package/scripts/agent-reliability-client.js +148 -0
- package/scripts/apple-minions-idle-compute-steal.js +428 -0
- package/scripts/autoresearch-runner.js +20 -1
- package/scripts/billing.js +0 -1
- package/scripts/cli-demo.js +505 -1
- package/scripts/cli-schema.js +36 -0
- package/scripts/colab-compute-honesty.js +93 -0
- package/scripts/corporate-email-isolation-diode.js +299 -0
- package/scripts/coverage-gap.js +396 -0
- package/scripts/dashboard-chat.js +3 -3
- package/scripts/dashboard.js +2 -2
- package/scripts/decisive-step-doctor.js +256 -0
- package/scripts/decisive-step-evaluator.js +390 -0
- package/scripts/entitlement.js +18 -7
- package/scripts/experiment-tracker.js +5 -3
- package/scripts/feedback-loop.js +26 -3
- package/scripts/fiddler-control-plane-honesty.js +303 -0
- package/scripts/financial-control-plane.js +10 -2
- package/scripts/gates-engine.js +3 -1
- package/scripts/github-license-compliance-diode.js +378 -0
- package/scripts/halo-trace-optimizer.js +631 -0
- package/scripts/harness-ceiling-doctor.js +326 -0
- package/scripts/hf-papers.js +1 -1
- package/scripts/human-escalation.js +7 -1
- package/scripts/hybrid-feedback-context.js +53 -7
- package/scripts/infoq-architect-honesty.js +362 -0
- package/scripts/lesson-graph.js +785 -0
- package/scripts/lesson-inference.js +1 -1
- package/scripts/lesson-retrieval.js +26 -18
- package/scripts/license.js +122 -21
- package/scripts/llm-behavior-monitor.js +1 -1
- package/scripts/llm-obs-honesty.js +52 -0
- package/scripts/local-model-profile.js +11 -7
- package/scripts/mailer/resend-mailer.js +6 -3
- package/scripts/mcp-transport-strategy.js +1 -1
- package/scripts/meko-datapack-honesty.js +414 -0
- package/scripts/migrate-lesson-graph.js +442 -0
- package/scripts/mintlify-knowledge-honesty.js +647 -0
- package/scripts/model-distress-detector.js +207 -0
- package/scripts/model-distress-doctor.js +368 -0
- package/scripts/multi-harness-invariants.js +305 -0
- package/scripts/omp-coordination-honesty.js +488 -0
- package/scripts/pro-local-dashboard.js +20 -3
- package/scripts/prompt-eval.js +1 -1
- package/scripts/prove-herdr-adapter.js +367 -3
- package/scripts/rag-embedding-identity.js +1 -1
- package/scripts/rrsi-regularizer.js +531 -0
- package/scripts/saas-moat-honesty.js +443 -0
- package/scripts/salt-code-policy-honesty.js +1204 -0
- package/scripts/secret-redaction.js +58 -0
- package/scripts/session-export-gate.js +368 -0
- package/scripts/siren-mcp-governance.js +539 -0
- package/scripts/strands-box-doctor.js +130 -0
- package/scripts/strands-harness-doctor.js +390 -0
- package/scripts/stripe-revenue-catalog-audit.js +12 -0
- package/scripts/stripe-revenue-catalog.js +40 -0
- package/scripts/switchyard-router.js +153 -0
- package/scripts/tailscale-p2p-doctor.js +252 -0
- package/scripts/task-outcomes.js +148 -3
- package/scripts/thumbgate-board-loop.js +4 -2
- package/scripts/thumbgate-daily-discoveries-publish.js +86 -38
- package/scripts/triage-savings-calculator.js +181 -0
- package/scripts/vector-store.js +41 -2
- package/scripts/vulnerability-pre-action-diode.js +319 -0
- package/scripts/windbg-evidence-diagnostics.js +241 -0
- package/scripts/workflow-intake-queue.js +1 -1
- package/scripts/workspace-agent-routines.js +534 -6
- package/scripts/workspace-evolver.js +143 -13
- package/server.json +2 -2
- package/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
- package/skills/siren-mcp-governance/SKILL.md +50 -0
- package/src/api/server.js +191 -5
- package/src/mcp-writeguard.js +1 -1
- package/src/session-interactivity.js +284 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const { randomInt } = require('node:crypto');
|
|
3
4
|
const { spawnSync } = require('node:child_process');
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -15,6 +16,15 @@ const {
|
|
|
15
16
|
restoreEvolutionSnapshot,
|
|
16
17
|
withTemporaryEvolutionSettings,
|
|
17
18
|
} = require('./evolution-state');
|
|
19
|
+
const {
|
|
20
|
+
calculateAnnealedBudget,
|
|
21
|
+
calculateAnnealedStepMultiplier,
|
|
22
|
+
screenLeakage,
|
|
23
|
+
computeComplexityDelta,
|
|
24
|
+
evaluateComplexityRegularizedScore,
|
|
25
|
+
detectStagnation,
|
|
26
|
+
selectTargetWithExploration,
|
|
27
|
+
} = require('./rrsi-regularizer');
|
|
18
28
|
|
|
19
29
|
const DEFAULT_TIMEOUT_MS = 120000;
|
|
20
30
|
|
|
@@ -115,8 +125,7 @@ function parseCommandLine(cmdString) {
|
|
|
115
125
|
let inSingleQuote = false;
|
|
116
126
|
let escaped = false;
|
|
117
127
|
|
|
118
|
-
for (
|
|
119
|
-
const char = cmdString[i];
|
|
128
|
+
for (const char of cmdString) {
|
|
120
129
|
|
|
121
130
|
if (escaped) {
|
|
122
131
|
current += char;
|
|
@@ -248,13 +257,18 @@ function evaluateWorkspace({
|
|
|
248
257
|
};
|
|
249
258
|
}
|
|
250
259
|
|
|
251
|
-
function chooseNextValue(target, currentValue, requestedValue = undefined) {
|
|
260
|
+
function chooseNextValue(target, currentValue, requestedValue = undefined, stepMultiplier = 1.0) {
|
|
252
261
|
if (Number.isFinite(requestedValue)) {
|
|
253
262
|
return Math.max(target.range[0], Math.min(target.range[1], requestedValue));
|
|
254
263
|
}
|
|
255
264
|
|
|
256
|
-
const direction =
|
|
257
|
-
const
|
|
265
|
+
const direction = randomInt(0, 2) === 1 ? 1 : -1;
|
|
266
|
+
const rawStep = target.step * (Number.isFinite(stepMultiplier) ? stepMultiplier : 1.0);
|
|
267
|
+
const effectiveStep = typeof target.step === 'number' && Number.isInteger(target.step)
|
|
268
|
+
? Math.max(1, Math.round(rawStep))
|
|
269
|
+
: Math.max(1e-4, rawStep);
|
|
270
|
+
|
|
271
|
+
const candidate = currentValue + (direction * effectiveStep);
|
|
258
272
|
const bounded = Math.max(target.range[0], Math.min(target.range[1], candidate));
|
|
259
273
|
return typeof target.step === 'number' && Number.isInteger(target.step)
|
|
260
274
|
? Math.round(bounded)
|
|
@@ -275,21 +289,88 @@ function recommendEvolutionTarget({ failureType, tags = [] } = {}) {
|
|
|
275
289
|
return 'half_life_days';
|
|
276
290
|
}
|
|
277
291
|
|
|
278
|
-
function
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
292
|
+
function resolveEvolutionTarget(opts, enableRRSI, history) {
|
|
293
|
+
if (opts.targetName) {
|
|
294
|
+
const target = EVOLUTION_TARGETS.find((entry) => entry.name === opts.targetName);
|
|
295
|
+
if (!target) {
|
|
296
|
+
throw new Error(`Unknown evolution target: ${opts.targetName}`);
|
|
297
|
+
}
|
|
298
|
+
return { target, meta: null };
|
|
299
|
+
}
|
|
282
300
|
|
|
283
|
-
if (
|
|
284
|
-
|
|
301
|
+
if (enableRRSI) {
|
|
302
|
+
const stagnation = detectStagnation(history, { windowSize: opts.stagnationWindow });
|
|
303
|
+
const selection = selectTargetWithExploration({
|
|
304
|
+
targets: EVOLUTION_TARGETS,
|
|
305
|
+
history,
|
|
306
|
+
isStagnant: stagnation.isStagnant,
|
|
307
|
+
});
|
|
308
|
+
return { target: selection.target, meta: selection };
|
|
285
309
|
}
|
|
286
310
|
|
|
311
|
+
const index = randomInt(0, EVOLUTION_TARGETS.length);
|
|
312
|
+
return { target: EVOLUTION_TARGETS[index], meta: null };
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function evaluateCandidateMutation({
|
|
316
|
+
target,
|
|
317
|
+
currentValue,
|
|
318
|
+
nextValue,
|
|
319
|
+
enableRRSI,
|
|
320
|
+
candidateEvaluation,
|
|
321
|
+
baselineEvaluation,
|
|
322
|
+
opts,
|
|
323
|
+
}) {
|
|
324
|
+
const complexityDelta = enableRRSI
|
|
325
|
+
? computeComplexityDelta(nextValue, currentValue, { range: target.range })
|
|
326
|
+
: 0;
|
|
327
|
+
|
|
328
|
+
if (enableRRSI) {
|
|
329
|
+
const rrsiDecision = evaluateComplexityRegularizedScore({
|
|
330
|
+
baselineScore: baselineEvaluation.score,
|
|
331
|
+
candidateScore: candidateEvaluation.score,
|
|
332
|
+
testsPassed: candidateEvaluation.passed,
|
|
333
|
+
complexityDelta,
|
|
334
|
+
}, {
|
|
335
|
+
lambda: opts.lambda,
|
|
336
|
+
stabilityFloor: opts.stabilityFloor,
|
|
337
|
+
});
|
|
338
|
+
return {
|
|
339
|
+
kept: rrsiDecision.accepted,
|
|
340
|
+
rrsiDecision,
|
|
341
|
+
complexityDelta,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
kept: candidateEvaluation.passed && candidateEvaluation.score > baselineEvaluation.score,
|
|
347
|
+
rrsiDecision: null,
|
|
348
|
+
complexityDelta,
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function runWorkspaceEvolution(opts = {}) {
|
|
353
|
+
const enableRRSI = opts.enableRRSI !== false;
|
|
354
|
+
const iteration = Number.isFinite(opts.iteration) ? opts.iteration : 0;
|
|
355
|
+
const totalIterations = Number.isFinite(opts.totalIterations) ? opts.totalIterations : 1;
|
|
356
|
+
const history = Array.isArray(opts.history) ? opts.history : [];
|
|
357
|
+
|
|
358
|
+
const { target, meta: targetSelectionMeta } = resolveEvolutionTarget(opts, enableRRSI, history);
|
|
359
|
+
|
|
287
360
|
const primaryCommands = normalizeCommands(opts.primaryCommands || opts.testCommand, ['npm test']);
|
|
288
361
|
const holdoutCommands = normalizeCommands(opts.holdoutCommands, []);
|
|
289
362
|
const timeoutMs = Number.isFinite(opts.timeoutMs) ? opts.timeoutMs : DEFAULT_TIMEOUT_MS;
|
|
290
363
|
const feedbackDir = opts.feedbackDir;
|
|
291
364
|
const currentValue = getEffectiveSetting(target.settingKey, target.range[0], feedbackDir);
|
|
292
|
-
|
|
365
|
+
|
|
366
|
+
const stepMultiplier = enableRRSI
|
|
367
|
+
? calculateAnnealedStepMultiplier(iteration, totalIterations)
|
|
368
|
+
: 1.0;
|
|
369
|
+
const annealedBudget = enableRRSI
|
|
370
|
+
? calculateAnnealedBudget(iteration, totalIterations)
|
|
371
|
+
: 1;
|
|
372
|
+
|
|
373
|
+
const nextValue = chooseNextValue(target, currentValue, opts.nextValue, stepMultiplier);
|
|
293
374
|
|
|
294
375
|
if (nextValue === currentValue) {
|
|
295
376
|
return {
|
|
@@ -301,6 +382,30 @@ function runWorkspaceEvolution(opts = {}) {
|
|
|
301
382
|
};
|
|
302
383
|
}
|
|
303
384
|
|
|
385
|
+
// RRSI Selection Critic: screen proposed mutation & commands for benchmark leakage
|
|
386
|
+
if (enableRRSI) {
|
|
387
|
+
const leakageCheck = screenLeakage({
|
|
388
|
+
target: target.name,
|
|
389
|
+
settingKey: target.settingKey,
|
|
390
|
+
from: currentValue,
|
|
391
|
+
to: nextValue,
|
|
392
|
+
hypothesisSuffix: opts.hypothesisSuffix,
|
|
393
|
+
primaryCommands,
|
|
394
|
+
holdoutCommands,
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
if (!leakageCheck.passed) {
|
|
398
|
+
return {
|
|
399
|
+
skipped: true,
|
|
400
|
+
reason: `[RRSI Leakage Critic] ${leakageCheck.reason}`,
|
|
401
|
+
leakageCheck,
|
|
402
|
+
target,
|
|
403
|
+
currentValue,
|
|
404
|
+
nextValue,
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
304
409
|
const experiment = createExperiment({
|
|
305
410
|
name: `${target.name}: ${currentValue} → ${nextValue}`,
|
|
306
411
|
hypothesis: [
|
|
@@ -332,7 +437,18 @@ function runWorkspaceEvolution(opts = {}) {
|
|
|
332
437
|
[target.settingKey]: nextValue,
|
|
333
438
|
}, () => evaluateWorkspace(evaluationOptions), feedbackDir);
|
|
334
439
|
|
|
335
|
-
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
const { kept, rrsiDecision, complexityDelta } = evaluateCandidateMutation({
|
|
443
|
+
target,
|
|
444
|
+
currentValue,
|
|
445
|
+
nextValue,
|
|
446
|
+
enableRRSI,
|
|
447
|
+
candidateEvaluation,
|
|
448
|
+
baselineEvaluation,
|
|
449
|
+
opts,
|
|
450
|
+
});
|
|
451
|
+
|
|
336
452
|
const acceptedMutation = kept
|
|
337
453
|
? applyAcceptedMutation({
|
|
338
454
|
targetKey: target.settingKey,
|
|
@@ -353,6 +469,8 @@ function runWorkspaceEvolution(opts = {}) {
|
|
|
353
469
|
score: candidateEvaluation.score,
|
|
354
470
|
baseline: baselineEvaluation.score,
|
|
355
471
|
testsPassed: candidateEvaluation.passed,
|
|
472
|
+
kept,
|
|
473
|
+
reason: rrsiDecision ? rrsiDecision.reason : undefined,
|
|
356
474
|
metrics: {
|
|
357
475
|
target: target.name,
|
|
358
476
|
settingKey: target.settingKey,
|
|
@@ -364,6 +482,17 @@ function runWorkspaceEvolution(opts = {}) {
|
|
|
364
482
|
candidateEvaluation,
|
|
365
483
|
evolutionStatePath: getEvolutionPaths(feedbackDir).statePath,
|
|
366
484
|
rollbackSnapshotId: acceptedMutation ? acceptedMutation.rollbackSnapshot.snapshotId : null,
|
|
485
|
+
rrsi: enableRRSI ? {
|
|
486
|
+
enabled: true,
|
|
487
|
+
iteration,
|
|
488
|
+
totalIterations,
|
|
489
|
+
annealedBudget,
|
|
490
|
+
stepMultiplier,
|
|
491
|
+
complexityDelta,
|
|
492
|
+
penalty: rrsiDecision?.penalty ?? 0,
|
|
493
|
+
regularizedDelta: rrsiDecision?.regularizedDelta ?? (candidateEvaluation.score - baselineEvaluation.score),
|
|
494
|
+
targetStrategy: targetSelectionMeta?.strategy ?? 'explicit',
|
|
495
|
+
} : { enabled: false },
|
|
367
496
|
...(opts.additionalMetrics || {}),
|
|
368
497
|
},
|
|
369
498
|
});
|
|
@@ -378,6 +507,7 @@ function runWorkspaceEvolution(opts = {}) {
|
|
|
378
507
|
candidateEvaluation,
|
|
379
508
|
acceptedMutation,
|
|
380
509
|
evolutionState: readEvolutionState(feedbackDir),
|
|
510
|
+
rrsiDecision,
|
|
381
511
|
};
|
|
382
512
|
}
|
|
383
513
|
|
package/server.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"source": "github",
|
|
9
9
|
"url": "https://github.com/IgorGanapolsky/ThumbGate"
|
|
10
10
|
},
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.39.0",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
16
|
"identifier": "thumbgate",
|
|
17
|
-
"version": "1.
|
|
17
|
+
"version": "1.39.0",
|
|
18
18
|
"runtimeHint": "npx",
|
|
19
19
|
"runtimeArguments": [
|
|
20
20
|
{
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aws-strands-harness-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
AWS Strands Harness (The New Stack 2026-10 / Marc Brooker) is an agent
|
|
5
|
+
runtime architecture, not a ThumbGate clone. Steal the three context-management
|
|
6
|
+
defaults (output shunting <= 350 lines, 75% compaction threshold, in-loop
|
|
7
|
+
recovery) and inject ThumbGate's PreToolUse diode. Never vendor Bedrock-only
|
|
8
|
+
dependencies. Slash: /aws-strands-harness-not-clone.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# AWS Strands Harness — FORMAT Steal, Not Clone
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Provide fail-closed pre-action governance and token-shunted output bounds for agents running on AWS Strands Harness (`@strands-agents/harness` or `strands-harness`), capturing the 45% (and 77% Terminal-Bench 2.1) token savings while preventing destructive tool actions.
|
|
16
|
+
|
|
17
|
+
## Constraints
|
|
18
|
+
|
|
19
|
+
| NEVER | ALWAYS |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| Clone or install Bedrock-only proprietary packages | Use decoupled providers (Bedrock, Anthropic, OpenAI, Ollama) |
|
|
22
|
+
| Allow un-shunted raw tool returns (> 350 lines / 16KB) | Truncate with `evaluateOutputShunt` offset markers |
|
|
23
|
+
| Drop durable prevention rules during context compaction | Pin ThumbGate rules across 75% compaction threshold |
|
|
24
|
+
| Crash the agent loop on context overflow | Recover in-loop by pruning non-pinned conversational history |
|
|
25
|
+
| Execute mutating shell/file tools without governance | Run ThumbGate `PreToolUse` diode before dispatch |
|
|
26
|
+
| Claim 77% savings without citing Terminal-Bench 2.1 | Ground benchmarks in measured tool-output reduction |
|
|
27
|
+
|
|
28
|
+
HARD fail closed. REFUSE un-gated autonomous execution.
|
|
29
|
+
|
|
30
|
+
## Reference
|
|
31
|
+
|
|
32
|
+
- The New Stack (2026-10): *AWS open-sources an AI agent it says is 45% cheaper than Claude Code and Codex*
|
|
33
|
+
- `scripts/strands-harness-doctor.js`
|
|
34
|
+
- `adapters/strands/strands-middleware.js`
|
|
35
|
+
- `adapters/strands/config.json`
|
|
36
|
+
- `adapters/strands/STRANDS.md`
|
|
37
|
+
- `docs/agents/aws-strands-harness.md`
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Audit Strands Harness compliance
|
|
43
|
+
node scripts/strands-harness-doctor.js
|
|
44
|
+
|
|
45
|
+
# Machine-readable output
|
|
46
|
+
node scripts/strands-harness-doctor.js --json
|
|
47
|
+
|
|
48
|
+
# Architectural map
|
|
49
|
+
node scripts/strands-harness-doctor.js --map-only
|
|
50
|
+
|
|
51
|
+
# CI Gate check
|
|
52
|
+
node scripts/strands-harness-doctor.js --check
|
|
53
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: siren-mcp-governance
|
|
3
|
+
description: >
|
|
4
|
+
Siren MCP Marketing Diode & Autonomous Campaign Governance. Enforce pre-action
|
|
5
|
+
review diodes on post_run, 300s buffer guards on schedule_post, $500 daily budget
|
|
6
|
+
ceilings on create_campaign, brand safety scanning, and partner link attribution
|
|
7
|
+
("Video made with Siren" -> https://mysiren.ai). Slash: /siren-mcp-governance.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Siren MCP Marketing Diode & Campaign Governance
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Govern autonomous marketing agents utilizing Siren MCP tools (`post_run`, `schedule_post`, `create_campaign`), preventing unreviewed live broadcasts, invalid scheduling windows, ad budget overruns, brand reputation damage, and attribution violations before social tools execute.
|
|
15
|
+
|
|
16
|
+
## Constraints
|
|
17
|
+
|
|
18
|
+
| NEVER | ALWAYS |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Allow unreviewed autonomous `post_run` directly to production social channels | Require `dry_run: true` or verified human approval token before broadcast |
|
|
21
|
+
| Schedule posts with less than 300 seconds safety buffer | Block `schedule_post` calls if delta < 300s to ensure human cancellation window |
|
|
22
|
+
| Create unbudgeted ad campaigns or exceed $500 ceiling | Require explicit executive override for campaigns exceeding daily ceilings |
|
|
23
|
+
| Strip or omit required attribution on Siren-generated videos | Enforce "Video made with Siren" / https://mysiren.ai link attribution |
|
|
24
|
+
| Permit predatory guarantees ("100% profit risk-free") or leaked tokens | Hard `block` on brand safety violations |
|
|
25
|
+
| Clone Siren SaaS or vendor their private video rendering pipeline | Steal the pre-action diode FORMAT onto ThumbGate PreToolUse rails |
|
|
26
|
+
|
|
27
|
+
HARD fail closed. REFUSE unreviewed immediate broadcasts.
|
|
28
|
+
|
|
29
|
+
## Reference
|
|
30
|
+
|
|
31
|
+
- https://github.com/Hexahedral-Inc/siren-mcp
|
|
32
|
+
- `scripts/siren-mcp-governance.js`
|
|
33
|
+
- `docs/agents/siren-mcp-governance.md`
|
|
34
|
+
- `tests/siren-mcp-governance.test.js`
|
|
35
|
+
|
|
36
|
+
## Procedures
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Display FORMAT mapping table
|
|
40
|
+
npx thumbgate siren-mcp-governance --map-only
|
|
41
|
+
|
|
42
|
+
# Emit machine-readable format mapping
|
|
43
|
+
npx thumbgate siren-mcp-governance --map-only --json
|
|
44
|
+
|
|
45
|
+
# Evaluate tool call before dispatch
|
|
46
|
+
npx thumbgate siren-mcp-governance --tool=post_run --args='{"content":"Launch day! Video made with Siren","dry_run":true}'
|
|
47
|
+
|
|
48
|
+
# Verify with automated unit tests
|
|
49
|
+
npm run test:siren-mcp
|
|
50
|
+
```
|
package/src/api/server.js
CHANGED
|
@@ -37,6 +37,12 @@ const PRO_CHECKOUT_URL = 'https://buy.stripe.com/8x2dR91M84r4cSd9uj3sI3f';
|
|
|
37
37
|
// missing Railway env cannot silently charge $499 under a $1500 label.
|
|
38
38
|
const SPRINT_DIAGNOSTIC_CHECKOUT_URL = 'https://buy.stripe.com/9B69ATbmI4r4aK5eOD3sI3k';
|
|
39
39
|
const WORKFLOW_SPRINT_CHECKOUT_URL = 'https://www.paypal.com/ncp/payment/LTQFR7P9AR3QG';
|
|
40
|
+
// Operator Framework service rails (public/operator-framework.html). Stripe
|
|
41
|
+
// Payment Links stay server-side behind /go/operator-* so public HTML never
|
|
42
|
+
// exposes buy.stripe.com and bots are deflected back to the page.
|
|
43
|
+
const OPERATOR_DIAGNOSTIC_CHECKOUT_URL = 'https://buy.stripe.com/fZueVd9eA4r42dz7mb3sI2W';
|
|
44
|
+
const OPERATOR_TURNKEY_CHECKOUT_URL = 'https://buy.stripe.com/14A8wP62o0aOcSd35V3sJ0Q';
|
|
45
|
+
const OPERATOR_RETAINER_CHECKOUT_URL = 'https://buy.stripe.com/9B614n0I43n03hD35V3sJ0P';
|
|
40
46
|
|
|
41
47
|
function getPosthogProxyPath(pathname) {
|
|
42
48
|
return pathname.slice('/ingest'.length) || '/';
|
|
@@ -329,7 +335,10 @@ const WHITEPAPER_PAGE_PATH = path.resolve(__dirname, '../../public/whitepaper.ht
|
|
|
329
335
|
const EVAL_SCORECARD_PAGE_PATH = path.resolve(__dirname, '../../public/eval-scorecard.html');
|
|
330
336
|
const EVALUATIONS_PAGE_PATH = path.resolve(__dirname, '../../public/evaluations.html');
|
|
331
337
|
const CASE_STUDIES_PAGE_PATH = path.resolve(__dirname, '../../public/case-studies.html');
|
|
338
|
+
const OPERATOR_FRAMEWORK_PAGE_PATH = path.resolve(__dirname, '../../public/operator-framework.html');
|
|
332
339
|
const FEDERAL_PAGE_PATH = path.resolve(__dirname, '../../public/federal.html');
|
|
340
|
+
const ENTERPRISE_GOVERNANCE_PAGE_PATH = path.resolve(__dirname, '../../public/enterprise-governance.html');
|
|
341
|
+
const GAMING_PLAYBOOK_PAGE_PATH = path.resolve(__dirname, '../../public/gaming-playbook.html');
|
|
333
342
|
const YT_PAGE_PATH = path.resolve(__dirname, '../../public/yt.html');
|
|
334
343
|
const PRICING_PAGE_PATH = path.resolve(__dirname, '../../public/pricing.html');
|
|
335
344
|
const ABOUT_PAGE_PATH = path.resolve(__dirname, '../../public/about.html');
|
|
@@ -338,6 +347,7 @@ const FOUNDERS_PAGE_PATH = path.resolve(__dirname, '../../public/founders.html')
|
|
|
338
347
|
const PARTNER_INTAKE_PAGE_PATH = path.resolve(__dirname, '../../public/partner-intake.html');
|
|
339
348
|
const PETER_PAGE_PATH = path.resolve(__dirname, '../../public/peter.html');
|
|
340
349
|
const INSTALL_PAGE_PATH = path.resolve(__dirname, '../../public/install.html');
|
|
350
|
+
const ONBOARDING_PAGE_PATH = path.resolve(__dirname, '../../public/onboarding.html');
|
|
341
351
|
const LEARN_DIR = path.resolve(__dirname, '../../public/learn');
|
|
342
352
|
const GUIDES_DIR = path.resolve(__dirname, '../../public/guides');
|
|
343
353
|
const COMPARE_DIR = path.resolve(__dirname, '../../public/compare');
|
|
@@ -559,6 +569,64 @@ const TRACKED_LINK_TARGETS = Object.freeze({
|
|
|
559
569
|
allowCustomerEmail: true,
|
|
560
570
|
prefillStripeEmail: true,
|
|
561
571
|
},
|
|
572
|
+
// Operator Framework offers (/operator-framework). Same-origin hop keeps
|
|
573
|
+
// buy.stripe.com out of public HTML; bots are deflected to the page.
|
|
574
|
+
'operator-diagnostic': {
|
|
575
|
+
fallbackHref: OPERATOR_DIAGNOSTIC_CHECKOUT_URL,
|
|
576
|
+
external: true,
|
|
577
|
+
botDeflectPath: '/operator-framework',
|
|
578
|
+
ctaId: 'operator_diagnostic_buy',
|
|
579
|
+
ctaPlacement: 'operator_framework',
|
|
580
|
+
eventType: 'operator_framework_checkout_click',
|
|
581
|
+
defaults: {
|
|
582
|
+
utm_source: 'operator_framework',
|
|
583
|
+
utm_medium: 'offer_card',
|
|
584
|
+
utm_campaign: 'operator_framework',
|
|
585
|
+
plan_id: 'sprint_diagnostic',
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
'operator-turnkey': {
|
|
589
|
+
fallbackHref: OPERATOR_TURNKEY_CHECKOUT_URL,
|
|
590
|
+
external: true,
|
|
591
|
+
botDeflectPath: '/operator-framework',
|
|
592
|
+
ctaId: 'operator_turnkey_buy',
|
|
593
|
+
ctaPlacement: 'operator_framework',
|
|
594
|
+
eventType: 'operator_framework_checkout_click',
|
|
595
|
+
defaults: {
|
|
596
|
+
utm_source: 'operator_framework',
|
|
597
|
+
utm_medium: 'offer_card',
|
|
598
|
+
utm_campaign: 'operator_framework',
|
|
599
|
+
plan_id: 'turnkey_setup',
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
'operator-retainer': {
|
|
603
|
+
fallbackHref: OPERATOR_RETAINER_CHECKOUT_URL,
|
|
604
|
+
external: true,
|
|
605
|
+
botDeflectPath: '/operator-framework',
|
|
606
|
+
ctaId: 'operator_retainer_buy',
|
|
607
|
+
ctaPlacement: 'operator_framework',
|
|
608
|
+
eventType: 'operator_framework_checkout_click',
|
|
609
|
+
defaults: {
|
|
610
|
+
utm_source: 'operator_framework',
|
|
611
|
+
utm_medium: 'offer_card',
|
|
612
|
+
utm_campaign: 'operator_framework',
|
|
613
|
+
plan_id: 'managed_retainer',
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
'operator-pro': {
|
|
617
|
+
fallbackHref: PRO_CHECKOUT_URL,
|
|
618
|
+
external: true,
|
|
619
|
+
botDeflectPath: '/operator-framework',
|
|
620
|
+
ctaId: 'operator_pro_buy',
|
|
621
|
+
ctaPlacement: 'operator_framework',
|
|
622
|
+
eventType: 'operator_framework_checkout_click',
|
|
623
|
+
defaults: {
|
|
624
|
+
utm_source: 'operator_framework',
|
|
625
|
+
utm_medium: 'offer_card',
|
|
626
|
+
utm_campaign: 'operator_framework',
|
|
627
|
+
plan_id: 'pro',
|
|
628
|
+
},
|
|
629
|
+
},
|
|
562
630
|
// 2026-06-02: Teams/Aiventyx deprecated. Redirect legacy links to Pro.
|
|
563
631
|
teams: {
|
|
564
632
|
path: '/go/pro?utm_source=legacy_teams&utm_medium=redirect',
|
|
@@ -2270,7 +2338,7 @@ function appendFeedbackListLines(lines, { entries, signal, intent }) {
|
|
|
2270
2338
|
}
|
|
2271
2339
|
lines.push(
|
|
2272
2340
|
`${FEEDBACK_LIST_LABELS[signal] || 'Recent feedback'} (${intent.windowLabel}):`,
|
|
2273
|
-
...entries.map(formatFeedbackEntry)
|
|
2341
|
+
...entries.map((x) => formatFeedbackEntry(x))
|
|
2274
2342
|
);
|
|
2275
2343
|
}
|
|
2276
2344
|
|
|
@@ -2826,6 +2894,26 @@ ${hiddenInputs}
|
|
|
2826
2894
|
}
|
|
2827
2895
|
fetch('/v1/telemetry/ping', { method:'POST', headers:{ 'content-type':'application/json' }, body: body, keepalive: true }).catch(function(){});
|
|
2828
2896
|
}
|
|
2897
|
+
var emailInput = document.querySelector('input[name=customer_email]');
|
|
2898
|
+
var skipLink = document.querySelector('a[data-i=pro_checkout_direct_stripe]');
|
|
2899
|
+
function updateSkipLink() {
|
|
2900
|
+
if (!skipLink) return;
|
|
2901
|
+
try {
|
|
2902
|
+
var u = new URL(skipLink.href, window.location.origin);
|
|
2903
|
+
var email = emailInput ? emailInput.value.trim() : '';
|
|
2904
|
+
if (email && email.length <= 320 && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
|
|
2905
|
+
u.searchParams.set('customer_email', email);
|
|
2906
|
+
} else {
|
|
2907
|
+
u.searchParams.delete('customer_email');
|
|
2908
|
+
}
|
|
2909
|
+
skipLink.href = u.toString();
|
|
2910
|
+
} catch(_) {}
|
|
2911
|
+
}
|
|
2912
|
+
if (emailInput) {
|
|
2913
|
+
emailInput.addEventListener('input', updateSkipLink);
|
|
2914
|
+
emailInput.addEventListener('change', updateSkipLink);
|
|
2915
|
+
updateSkipLink();
|
|
2916
|
+
}
|
|
2829
2917
|
document.querySelector('form').addEventListener('submit', function(){
|
|
2830
2918
|
submitted = true;
|
|
2831
2919
|
var emailInput = document.querySelector('input[name=customer_email]');
|
|
@@ -3563,6 +3651,10 @@ function loadPricingPageHtml(runtimeConfig, pageContext = {}) {
|
|
|
3563
3651
|
return loadPublicMarketingTemplateHtml(PRICING_PAGE_PATH, runtimeConfig, pageContext);
|
|
3564
3652
|
}
|
|
3565
3653
|
|
|
3654
|
+
function loadOperatorFrameworkPageHtml(runtimeConfig, pageContext = {}) {
|
|
3655
|
+
return loadPublicMarketingTemplateHtml(OPERATOR_FRAMEWORK_PAGE_PATH, runtimeConfig, pageContext);
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3566
3658
|
function loadAboutPageHtml(runtimeConfig, pageContext = {}) {
|
|
3567
3659
|
return loadPublicMarketingTemplateHtml(ABOUT_PAGE_PATH, runtimeConfig, pageContext);
|
|
3568
3660
|
}
|
|
@@ -3575,6 +3667,10 @@ function loadLearnPageHtml(runtimeConfig, pageContext = {}) {
|
|
|
3575
3667
|
return loadPublicMarketingTemplateHtml(LEARN_PAGE_PATH, runtimeConfig, pageContext);
|
|
3576
3668
|
}
|
|
3577
3669
|
|
|
3670
|
+
function loadOnboardingPageHtml(runtimeConfig, pageContext = {}) {
|
|
3671
|
+
return loadPublicMarketingTemplateHtml(ONBOARDING_PAGE_PATH, runtimeConfig, pageContext);
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3578
3674
|
function readOptionalPublicTemplate(filePath) {
|
|
3579
3675
|
try {
|
|
3580
3676
|
return fs.readFileSync(filePath, 'utf-8');
|
|
@@ -4194,6 +4290,7 @@ function renderSitemapXml(runtimeConfig) {
|
|
|
4194
4290
|
{ path: '/pro', changefreq: 'weekly', priority: '0.9' },
|
|
4195
4291
|
{ path: '/diagnostic', changefreq: 'weekly', priority: '0.9' },
|
|
4196
4292
|
{ path: '/founders', changefreq: 'weekly', priority: '0.95' },
|
|
4293
|
+
{ path: '/operator-framework', changefreq: 'weekly', priority: '0.9' },
|
|
4197
4294
|
{ path: '/peter', changefreq: 'weekly', priority: '0.9' },
|
|
4198
4295
|
{ path: '/workflow-hardening-sprint', changefreq: 'weekly', priority: '0.9' },
|
|
4199
4296
|
{ path: '/install', changefreq: 'weekly', priority: '0.9' },
|
|
@@ -5788,7 +5885,7 @@ function createApiServer() {
|
|
|
5788
5885
|
return;
|
|
5789
5886
|
}
|
|
5790
5887
|
}
|
|
5791
|
-
(async () => {
|
|
5888
|
+
void (async () => {
|
|
5792
5889
|
try {
|
|
5793
5890
|
const { callTool } = require('../../adapters/mcp/server-stdio');
|
|
5794
5891
|
const name = msg.params?.name;
|
|
@@ -6671,6 +6768,25 @@ async function addContext(){
|
|
|
6671
6768
|
return;
|
|
6672
6769
|
}
|
|
6673
6770
|
|
|
6771
|
+
if (isGetLikeRequest && (pathname === '/onboarding' || pathname === '/onboarding.html')) {
|
|
6772
|
+
try {
|
|
6773
|
+
servePublicMarketingPage({
|
|
6774
|
+
req,
|
|
6775
|
+
res,
|
|
6776
|
+
parsed,
|
|
6777
|
+
hostedConfig,
|
|
6778
|
+
isHeadRequest,
|
|
6779
|
+
renderHtml: loadOnboardingPageHtml,
|
|
6780
|
+
extraTelemetry: {
|
|
6781
|
+
pageType: 'onboarding',
|
|
6782
|
+
},
|
|
6783
|
+
});
|
|
6784
|
+
} catch (err) {
|
|
6785
|
+
sendText(res, 500, err.message || 'Onboarding page unavailable');
|
|
6786
|
+
}
|
|
6787
|
+
return;
|
|
6788
|
+
}
|
|
6789
|
+
|
|
6674
6790
|
|
|
6675
6791
|
// Partner co-branded case study (Peter Yang / high-ROI acquisition landing).
|
|
6676
6792
|
if (isGetLikeRequest && (pathname === '/peter' || pathname === '/peter.html')) {
|
|
@@ -6868,6 +6984,51 @@ async function addContext(){
|
|
|
6868
6984
|
return;
|
|
6869
6985
|
}
|
|
6870
6986
|
|
|
6987
|
+
if (isGetLikeRequest && (
|
|
6988
|
+
pathname === '/enterprise-governance'
|
|
6989
|
+
|| pathname === '/enterprise-governance.html'
|
|
6990
|
+
|| pathname === '/enterprise'
|
|
6991
|
+
|| pathname === '/gemini-at-work'
|
|
6992
|
+
)) {
|
|
6993
|
+
try {
|
|
6994
|
+
servePublicMarketingPage({
|
|
6995
|
+
req,
|
|
6996
|
+
res,
|
|
6997
|
+
parsed,
|
|
6998
|
+
hostedConfig,
|
|
6999
|
+
isHeadRequest,
|
|
7000
|
+
renderHtml: () => fs.readFileSync(ENTERPRISE_GOVERNANCE_PAGE_PATH, 'utf-8'),
|
|
7001
|
+
extraTelemetry: { pageType: 'enterprise-governance' },
|
|
7002
|
+
});
|
|
7003
|
+
} catch {
|
|
7004
|
+
sendJson(res, 404, { error: 'Enterprise governance page not found' });
|
|
7005
|
+
}
|
|
7006
|
+
return;
|
|
7007
|
+
}
|
|
7008
|
+
|
|
7009
|
+
if (isGetLikeRequest && (
|
|
7010
|
+
pathname === '/gaming-playbook'
|
|
7011
|
+
|| pathname === '/gaming-playbook.html'
|
|
7012
|
+
|| pathname === '/gaming'
|
|
7013
|
+
|| pathname === '/industry-playbook'
|
|
7014
|
+
|| pathname === '/industry-playbook/gaming'
|
|
7015
|
+
)) {
|
|
7016
|
+
try {
|
|
7017
|
+
servePublicMarketingPage({
|
|
7018
|
+
req,
|
|
7019
|
+
res,
|
|
7020
|
+
parsed,
|
|
7021
|
+
hostedConfig,
|
|
7022
|
+
isHeadRequest,
|
|
7023
|
+
renderHtml: () => fs.readFileSync(GAMING_PLAYBOOK_PAGE_PATH, 'utf-8'),
|
|
7024
|
+
extraTelemetry: { pageType: 'gaming-playbook' },
|
|
7025
|
+
});
|
|
7026
|
+
} catch {
|
|
7027
|
+
sendJson(res, 404, { error: 'Gaming playbook page not found' });
|
|
7028
|
+
}
|
|
7029
|
+
return;
|
|
7030
|
+
}
|
|
7031
|
+
|
|
6871
7032
|
if (isGetLikeRequest && (
|
|
6872
7033
|
pathname === '/yt'
|
|
6873
7034
|
|| pathname === '/yt.html'
|
|
@@ -8901,6 +9062,26 @@ footer{margin-top:40px;padding-top:20px;border-top:1px solid #e5e7eb;color:#6b72
|
|
|
8901
9062
|
return;
|
|
8902
9063
|
}
|
|
8903
9064
|
|
|
9065
|
+
// Operator Framework: done-for-you ThumbGate offers + agency partner program.
|
|
9066
|
+
if (isGetLikeRequest && (pathname === '/operator-framework' || pathname === '/operator-framework.html')) {
|
|
9067
|
+
try {
|
|
9068
|
+
servePublicMarketingPage({
|
|
9069
|
+
req,
|
|
9070
|
+
res,
|
|
9071
|
+
parsed,
|
|
9072
|
+
hostedConfig,
|
|
9073
|
+
isHeadRequest,
|
|
9074
|
+
renderHtml: loadOperatorFrameworkPageHtml,
|
|
9075
|
+
extraTelemetry: {
|
|
9076
|
+
pageType: 'operator_framework',
|
|
9077
|
+
},
|
|
9078
|
+
});
|
|
9079
|
+
} catch (err) {
|
|
9080
|
+
sendText(res, 500, err.message || 'Operator Framework page unavailable');
|
|
9081
|
+
}
|
|
9082
|
+
return;
|
|
9083
|
+
}
|
|
9084
|
+
|
|
8904
9085
|
// Public canonical pricing page.
|
|
8905
9086
|
if (isGetLikeRequest && (pathname === '/pricing' || pathname === '/pricing.html')) {
|
|
8906
9087
|
try {
|
|
@@ -11444,7 +11625,12 @@ module.exports = {
|
|
|
11444
11625
|
};
|
|
11445
11626
|
|
|
11446
11627
|
if (require.main === module) {
|
|
11447
|
-
startServer()
|
|
11448
|
-
|
|
11449
|
-
|
|
11628
|
+
startServer()
|
|
11629
|
+
.then(({ host, port }) => {
|
|
11630
|
+
console.log(`ThumbGate API listening on http://${host}:${port}`);
|
|
11631
|
+
})
|
|
11632
|
+
.catch((err) => {
|
|
11633
|
+
console.error('Failed to start ThumbGate server:', err);
|
|
11634
|
+
process.exit(1);
|
|
11635
|
+
});
|
|
11450
11636
|
}
|
package/src/mcp-writeguard.js
CHANGED