thumbgate 1.34.3 → 1.37.1
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/cyberstrike-compare-not-clone/SKILL.md +36 -0
- package/.agents/skills/gitlab-sandbox-allowlist-not-trust/SKILL.md +77 -0
- package/.agents/skills/jit-harness-compare-not-clone/SKILL.md +34 -0
- package/.agents/skills/openui-catalog-compose-honesty/SKILL.md +64 -0
- package/.agents/skills/zvec-grep-compare-not-clone/SKILL.md +34 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/llms.txt +1 -0
- package/.well-known/mcp/server-card.json +1 -1
- package/CONTRIBUTING.md +95 -0
- package/README.md +195 -632
- package/THIRD_PARTY_NOTICES.md +89 -0
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/future-agi/.mcp.json +8 -0
- package/adapters/future-agi/FUTURE_AGI.md +23 -0
- package/adapters/future-agi/config.toml +3 -0
- package/adapters/future-agi/future-agi-bridge.js +9 -0
- package/adapters/future-agi/opencode.json +8 -0
- package/adapters/herdr/herdr-plugin.toml +18 -0
- package/adapters/mcp/server-stdio.js +238 -25
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/workos/WORKOS.md +52 -0
- package/bin/cli.js +373 -5
- package/bin/futureagi-bridge +9 -0
- package/config/gate-templates.json +653 -4
- package/config/gates/actor-critic-audit.json +34 -0
- package/config/gates/default.json +21 -2
- package/config/gates/five-walls-governance.json +34 -0
- package/config/gates/future-agi-guardrails.json +34 -0
- package/config/gates/radware-threat-defense-2026.json +61 -0
- package/config/gates/simatree-data-governance.json +33 -0
- package/config/mcp-allowlists.json +4 -0
- package/config/merge-quality-checks.json +10 -1
- package/config/model-candidates.json +382 -24
- package/config/model-tiers.json +18 -0
- package/config/post-deploy-marketing-pages.json +10 -0
- package/config/progressive/01-wire-only.json +11 -0
- package/config/progressive/02-dashboard-empty-ok.json +10 -0
- package/config/progressive/03-one-lesson.json +10 -0
- package/config/progressive/04-warn-fires.json +11 -0
- package/config/progressive/05-strict-optional.json +11 -0
- package/config/progressive/README.md +15 -0
- package/config/schemas/broker-execution-receipt.schema.json +139 -0
- package/config/schemas/provider-execution-attestation-v1.schema.json +58 -0
- package/conformance/provider-attestation/vectors.json +320 -0
- package/docs/specs/provider-execution-attestation-v1.md +69 -0
- package/openapi/openapi.yaml +15 -0
- package/package.json +401 -147
- package/public/about.html +2 -2
- package/public/ai-malpractice-prevention.html +7 -7
- package/public/blog/a-10-dollar-vps-is-not-a-computer.html +143 -0
- package/public/blog/a-receipt-is-not-world-state.html +388 -0
- package/public/blog/git-at-agent-scale.html +374 -0
- package/public/blog/no-llm-in-the-gate.html +133 -0
- package/public/blog.html +80 -0
- package/public/case-studies.html +16 -1
- package/public/compare.html +28 -0
- package/public/diagnostic.html +216 -7
- package/public/docs/connectors.html +39 -0
- package/public/federal.html +2 -2
- package/public/founders.html +639 -0
- package/public/index.html +87 -9
- package/public/install.html +8 -8
- package/public/learn.html +39 -0
- package/public/numbers.html +2 -2
- package/public/peter.html +310 -0
- package/public/platform-partners.html +119 -0
- package/public/pricing.html +24 -3
- package/public/privacy.html +117 -0
- package/public/pro.html +17 -0
- package/public/support.html +62 -0
- package/public/terms.html +130 -0
- package/public/third-party-notices.html +95 -0
- package/public/yt.html +351 -0
- package/scripts/action-receipts.js +133 -3
- package/scripts/adaptive-governance-arena.js +349 -0
- package/scripts/admin-override.js +205 -0
- package/scripts/agent-action-inventory.js +869 -0
- package/scripts/agent-audit-trace.js +42 -2
- package/scripts/agent-egress-policy.js +1117 -0
- package/scripts/agent-memory-lifecycle.js +141 -2
- package/scripts/agent-operations-planner.js +441 -1
- package/scripts/agent-readiness.js +68 -0
- package/scripts/agent-security-central.js +647 -0
- package/scripts/allowlist-bridge-honesty.js +417 -0
- package/scripts/async-job-runner.js +102 -11
- package/scripts/audit-trail.js +212 -0
- package/scripts/auto-promote-gates.js +178 -27
- package/scripts/billing.js +1 -1
- package/scripts/broker-execution-receipts.js +719 -0
- package/scripts/budget-aware-gates-proof.js +423 -0
- package/scripts/claude-feedback-sync.js +29 -3
- package/scripts/claw-harness-production.js +237 -0
- package/scripts/cli-progress.js +111 -0
- package/scripts/cli-schema.js +163 -1
- package/scripts/codex-runbook-flywheel.js +318 -0
- package/scripts/context-footprint.js +186 -0
- package/scripts/contextfs.js +143 -61
- package/scripts/dashboard-limits.js +27 -0
- package/scripts/dashboard.js +279 -9
- package/scripts/deepseek-v4-runtime-guardrails.js +72 -6
- package/scripts/docker-sandbox-planner.js +18 -0
- package/scripts/double-blind-eval-protocol.js +252 -0
- package/scripts/edotenv-rl-gateway.js +259 -0
- package/scripts/ensure-production-search-corpus.js +162 -0
- package/scripts/eval-holdout.js +311 -0
- package/scripts/feedback-aggregate.js +21 -2
- package/scripts/feedback-loop.js +87 -5
- package/scripts/feedback-quality.js +9 -0
- package/scripts/file-ledger-lock.js +4 -1
- package/scripts/financial-control-plane.js +41 -1
- package/scripts/find-dormant-requires.js +118 -0
- package/scripts/fs-utils.js +84 -8
- package/scripts/gate-stats.js +2 -2
- package/scripts/gates-engine.js +859 -58
- package/scripts/generate-case-study-outreach.js +24 -15
- package/scripts/git-at-scale.js +628 -0
- package/scripts/governance-conflict-audit.js +1650 -0
- package/scripts/governance-difficulty-curriculum.js +328 -0
- package/scripts/graphrag-retrieval.js +275 -0
- package/scripts/gurobi-optimizer.js +324 -0
- package/scripts/gurobi_optimizer.py +485 -0
- package/scripts/harness-selector.js +82 -1
- package/scripts/hidden-entry-points.js +284 -0
- package/scripts/human-escalation.js +199 -1
- package/scripts/hybrid-feedback-context.js +152 -19
- package/scripts/intent-governed-execution.js +602 -0
- package/scripts/intervention-policy.js +123 -20
- package/scripts/jit-harness-compose.js +628 -0
- package/scripts/jsonl-watcher.js +10 -0
- package/scripts/lesson-embedding-index.js +95 -12
- package/scripts/lesson-retrieval.js +105 -19
- package/scripts/local-model-profile.js +19 -2
- package/scripts/mailer/resend-mailer.js +1 -1
- package/scripts/matryoshka-embedding.js +235 -0
- package/scripts/mcp-oauth.js +42 -4
- package/scripts/mcp-session-handles.js +1016 -0
- package/scripts/mcp-wiring-doctor.js +314 -0
- package/scripts/memory-firewall.js +115 -2
- package/scripts/memory-scope-readiness.js +299 -0
- package/scripts/memory-vs-rag-route.js +161 -0
- package/scripts/model-tier-router.js +148 -21
- package/scripts/nvidia-specdecode-al-doctor.js +536 -0
- package/scripts/openui-catalog-compose-honesty.js +593 -0
- package/scripts/operational-integrity.js +19 -1
- package/scripts/override-audit.js +213 -0
- package/scripts/package-manager-honesty-doctor.js +458 -0
- package/scripts/pr-manager.js +63 -1
- package/scripts/prove-herdr-adapter.js +52 -0
- package/scripts/prove-memory-pyramid-and-symbolic-canvas.js +95 -0
- package/scripts/prove-workos.js +73 -0
- package/scripts/provider-attestation-conformance.js +192 -0
- package/scripts/provider-receipt-contract.js +136 -0
- package/scripts/qwen38-max-cost-optimizer.js +401 -0
- package/scripts/radware-threat-defense.js +280 -0
- package/scripts/rag-embedding-identity.js +221 -0
- package/scripts/rag-precision-guardrails.js +112 -2
- package/scripts/remote-feedback-capture.js +159 -0
- package/scripts/research-agent-harness.js +256 -0
- package/scripts/rsi-safety-hillclimb.js +200 -0
- package/scripts/rule-sprawl.js +188 -0
- package/scripts/schedule-manager.js +147 -0
- package/scripts/self-heal.js +8 -0
- package/scripts/session-lease.js +415 -0
- package/scripts/simatree-data-governance.js +347 -0
- package/scripts/slo-alert-engine.js +172 -7
- package/scripts/solver-parity.js +539 -0
- package/scripts/stealth-memory-injection-gate.js +333 -0
- package/scripts/switchyard-router.js +366 -0
- package/scripts/telemetry-analytics.js +84 -27
- package/scripts/temporal-decay-weighting.js +138 -0
- package/scripts/test-all.js +165 -0
- package/scripts/token-savings.js +42 -0
- package/scripts/tool-kpi-tracker.js +108 -5
- package/scripts/tool-registry.js +193 -5
- package/scripts/universal-claim-evaluator.js +14 -2
- package/scripts/vector-store.js +279 -9
- package/scripts/workflow-notebook.js +391 -0
- package/scripts/workflow-sentinel.js +111 -12
- package/scripts/workos-production-guard.js +260 -0
- package/scripts/workspace-search-route.js +515 -0
- package/server.json +2 -2
- package/src/agent-identity-boundary.js +76 -0
- package/src/agent-retrieval-cache.js +155 -0
- package/src/alert-noise-ledger.js +502 -0
- package/src/api/server.js +802 -185
- package/src/git-fast-cache.js +220 -0
- package/src/git-wal-sync.js +156 -0
- package/src/hash-anchored-edit.js +82 -0
- package/src/hermes-platform-protocol.js +475 -0
- package/src/hermes-sync-plane.js +241 -0
- package/src/index.js +30 -1
- package/src/iso42001-compliance-guard.js +97 -0
- package/src/latency-budget.js +244 -0
- package/src/mcp-writeguard.js +316 -0
- package/src/miminions-adapter.js +106 -0
- package/src/pipeline-compass.js +104 -0
- package/src/ppl-alert-pipeline.js +284 -0
- package/src/rendezvous-router.js +90 -0
- package/src/security-questionnaire.js +195 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# WorkOS + ThumbGate (identity vs pre-action gates)
|
|
2
|
+
|
|
3
|
+
## Split of responsibility
|
|
4
|
+
|
|
5
|
+
| Concern | WorkOS AuthKit / MCP Auth | ThumbGate |
|
|
6
|
+
|---------|---------------------------|-----------|
|
|
7
|
+
| Who is the user/org? | SSO, social login, orgs, SCIM (paid) | — |
|
|
8
|
+
| OAuth for MCP servers | AuthKit as OAuth 2.1 AS; scopes → RBAC | Remote MCP OAuth 2.1 PKCE (`scripts/mcp-oauth.js`) |
|
|
9
|
+
| What may this tool call do *now*? | Scope admission only | Pre-action gates, lessons, prevention rules |
|
|
10
|
+
| Agent skill install / auth scaffold | WorkOS CLI / widget skills | Gate: `review-workos-skill-and-auth-installer-actions` |
|
|
11
|
+
|
|
12
|
+
**One line for buyers:** WorkOS (or any IdP) decides *who* the agent is. ThumbGate decides *which tool calls may run*.
|
|
13
|
+
|
|
14
|
+
## ThumbGate production policy ($10/mo)
|
|
15
|
+
|
|
16
|
+
Public `thumbgate.app` auth uses **WorkOS Production AuthKit only**:
|
|
17
|
+
|
|
18
|
+
- AuthKit host: `progressive-mouse-13.authkit.app`
|
|
19
|
+
- Production client id: `client_01KY0306CYDV6QSXE43QKM2ZXW`
|
|
20
|
+
- Allowed under cap: email + password, **own** social OAuth apps (Google free under AuthKit MAU tier)
|
|
21
|
+
- **Forbidden without budget rewrite:** custom AuthKit domain (~$99/mo), enterprise SSO/SAML connections (~$125/conn), Directory Sync, public traffic on staging AuthKit
|
|
22
|
+
|
|
23
|
+
Guard (secret-free):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node scripts/workos-production-guard.js --json
|
|
27
|
+
npm run prove:workos
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## MCP OAuth scopes (hierarchy)
|
|
31
|
+
|
|
32
|
+
ThumbGate remote MCP supports:
|
|
33
|
+
|
|
34
|
+
| Scope | Allows |
|
|
35
|
+
|-------|--------|
|
|
36
|
+
| `mcp:read` | Tools with `readOnlyHint: true` |
|
|
37
|
+
| `mcp:gates` | Gate-evaluation tools (+ read) |
|
|
38
|
+
| `mcp:feedback` | Feedback capture tools (+ read) |
|
|
39
|
+
| `mcp:write` | Mutating tools **and** everything above |
|
|
40
|
+
|
|
41
|
+
`mcp:write` **implies** read/gates/feedback so operator tokens are not fail-closed on read-only tools (WorkOS-style role implication).
|
|
42
|
+
|
|
43
|
+
## Complementary, not competitive
|
|
44
|
+
|
|
45
|
+
Do not pitch ThumbGate as “WorkOS for agents.” Pitch as the **runtime prevention layer after identity** — the same gap as claw-style enterprise agents and GDG “dark agent” demos (poisoned specs, secret egress, destructive tool use).
|
|
46
|
+
|
|
47
|
+
## Related
|
|
48
|
+
|
|
49
|
+
- `scripts/workos-production-guard.js`
|
|
50
|
+
- `scripts/mcp-oauth.js`
|
|
51
|
+
- `scripts/prove-workos.js`
|
|
52
|
+
- Gate category: **Enterprise Identity & MCP Auth Governance** in `config/gate-templates.json`
|
package/bin/cli.js
CHANGED
|
@@ -1659,13 +1659,18 @@ function compact() {
|
|
|
1659
1659
|
|
|
1660
1660
|
function cfo() {
|
|
1661
1661
|
const args = parseArgs(process.argv.slice(3));
|
|
1662
|
+
const { createCliProgress } = require(path.join(PKG_ROOT, 'scripts', 'cli-progress'));
|
|
1663
|
+
const progress = createCliProgress();
|
|
1662
1664
|
const { getOperationalBillingSummary } = require(path.join(PKG_ROOT, 'scripts', 'operational-summary'));
|
|
1665
|
+
progress.start('Loading CFO billing summary…');
|
|
1663
1666
|
getOperationalBillingSummary({
|
|
1664
1667
|
window: args.window,
|
|
1665
1668
|
timeZone: args.timezone,
|
|
1666
1669
|
now: args.now,
|
|
1670
|
+
onProgress: (message) => progress.update(message),
|
|
1667
1671
|
})
|
|
1668
1672
|
.then(({ source, summary, fallbackReason }) => {
|
|
1673
|
+
progress.succeed(`Billing summary ready (${source})`);
|
|
1669
1674
|
console.log(JSON.stringify({
|
|
1670
1675
|
source,
|
|
1671
1676
|
fallbackReason,
|
|
@@ -1674,6 +1679,7 @@ function cfo() {
|
|
|
1674
1679
|
process.exit(0);
|
|
1675
1680
|
})
|
|
1676
1681
|
.catch((err) => {
|
|
1682
|
+
progress.fail('CFO billing summary failed');
|
|
1677
1683
|
console.error(err && err.message ? err.message : err);
|
|
1678
1684
|
process.exit(1);
|
|
1679
1685
|
});
|
|
@@ -1691,14 +1697,19 @@ function repairGithubMarketplace() {
|
|
|
1691
1697
|
|
|
1692
1698
|
function northStar() {
|
|
1693
1699
|
const args = parseArgs(process.argv.slice(3));
|
|
1700
|
+
const { createCliProgress } = require(path.join(PKG_ROOT, 'scripts', 'cli-progress'));
|
|
1701
|
+
const progress = createCliProgress();
|
|
1694
1702
|
const { getOperationalDashboard } = require(path.join(PKG_ROOT, 'scripts', 'operational-dashboard'));
|
|
1695
1703
|
|
|
1704
|
+
progress.start('Loading North Star metrics…');
|
|
1696
1705
|
getOperationalDashboard({
|
|
1697
1706
|
window: args.window,
|
|
1698
1707
|
timeZone: args.timezone,
|
|
1699
1708
|
now: args.now,
|
|
1709
|
+
onProgress: (message) => progress.update(message),
|
|
1700
1710
|
})
|
|
1701
1711
|
.then(({ source, data, fallbackReason }) => {
|
|
1712
|
+
progress.succeed(`North Star ready (${source})`);
|
|
1702
1713
|
const summary = data.analytics.northStar || {};
|
|
1703
1714
|
const revenue = data.analytics.revenue || {};
|
|
1704
1715
|
|
|
@@ -1721,6 +1732,7 @@ function northStar() {
|
|
|
1721
1732
|
process.exit(0);
|
|
1722
1733
|
})
|
|
1723
1734
|
.catch((err) => {
|
|
1735
|
+
progress.fail('North Star failed');
|
|
1724
1736
|
console.error(err && err.message ? err.message : err);
|
|
1725
1737
|
process.exit(1);
|
|
1726
1738
|
});
|
|
@@ -2615,6 +2627,156 @@ function deepseekV4RuntimeGuardrails() {
|
|
|
2615
2627
|
process.stdout.write(formatDeepSeekV4RuntimeGuardrailsPlan(report));
|
|
2616
2628
|
}
|
|
2617
2629
|
|
|
2630
|
+
function nvidiaSpecDecodeAlDoctor() {
|
|
2631
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2632
|
+
const {
|
|
2633
|
+
buildNvidiaSpecDecodeAlDoctorReport,
|
|
2634
|
+
formatNvidiaSpecDecodeAlDoctorReport,
|
|
2635
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'nvidia-specdecode-al-doctor'));
|
|
2636
|
+
const report = buildNvidiaSpecDecodeAlDoctorReport(args);
|
|
2637
|
+
|
|
2638
|
+
if (args.json) {
|
|
2639
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2640
|
+
} else {
|
|
2641
|
+
process.stdout.write(formatNvidiaSpecDecodeAlDoctorReport(report));
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
if (args.strict && report.status !== 'ready') {
|
|
2645
|
+
process.exitCode = 1;
|
|
2646
|
+
return;
|
|
2647
|
+
}
|
|
2648
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
function intentGovernedExecution() {
|
|
2654
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2655
|
+
const {
|
|
2656
|
+
buildIntentGovernedExecutionReport,
|
|
2657
|
+
formatIntentGovernedExecutionReport,
|
|
2658
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'intent-governed-execution'));
|
|
2659
|
+
const report = buildIntentGovernedExecutionReport(args);
|
|
2660
|
+
|
|
2661
|
+
if (args.json) {
|
|
2662
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2663
|
+
} else {
|
|
2664
|
+
process.stdout.write(formatIntentGovernedExecutionReport(report));
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
if (args.strict && report.status !== 'ready') {
|
|
2668
|
+
process.exitCode = 1;
|
|
2669
|
+
return;
|
|
2670
|
+
}
|
|
2671
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
function jitHarnessCompose() {
|
|
2675
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2676
|
+
const {
|
|
2677
|
+
buildJitHarnessComposeReport,
|
|
2678
|
+
formatJitHarnessComposeReport,
|
|
2679
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'jit-harness-compose'));
|
|
2680
|
+
const report = buildJitHarnessComposeReport(args);
|
|
2681
|
+
|
|
2682
|
+
if (args.json) {
|
|
2683
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2684
|
+
} else {
|
|
2685
|
+
process.stdout.write(formatJitHarnessComposeReport(report));
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
if (args.strict && report.status !== 'ready') {
|
|
2689
|
+
process.exitCode = 1;
|
|
2690
|
+
return;
|
|
2691
|
+
}
|
|
2692
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
function allowlistBridgeHonestyDoctor() {
|
|
2696
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2697
|
+
const {
|
|
2698
|
+
buildAllowlistBridgeHonestyReport,
|
|
2699
|
+
formatAllowlistBridgeHonestyReport,
|
|
2700
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'allowlist-bridge-honesty'));
|
|
2701
|
+
const report = buildAllowlistBridgeHonestyReport(args);
|
|
2702
|
+
|
|
2703
|
+
if (args.json) {
|
|
2704
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2705
|
+
} else {
|
|
2706
|
+
process.stdout.write(formatAllowlistBridgeHonestyReport(report));
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
if (args.strict && report.status !== 'ready') {
|
|
2710
|
+
process.exitCode = 1;
|
|
2711
|
+
return;
|
|
2712
|
+
}
|
|
2713
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
function packageManagerHonestyDoctor() {
|
|
2717
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2718
|
+
const {
|
|
2719
|
+
buildPackageManagerHonestyReport,
|
|
2720
|
+
formatPackageManagerHonestyReport,
|
|
2721
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'package-manager-honesty-doctor'));
|
|
2722
|
+
const report = buildPackageManagerHonestyReport(args);
|
|
2723
|
+
|
|
2724
|
+
if (args.json) {
|
|
2725
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2726
|
+
} else {
|
|
2727
|
+
process.stdout.write(formatPackageManagerHonestyReport(report));
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
if (args.strict && report.status !== 'ready') {
|
|
2731
|
+
process.exitCode = 1;
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
function openuiCatalogComposeHonestyDoctor() {
|
|
2738
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2739
|
+
const {
|
|
2740
|
+
buildOpenuiCatalogComposeHonestyReport,
|
|
2741
|
+
formatOpenuiCatalogComposeHonestyReport,
|
|
2742
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'openui-catalog-compose-honesty'));
|
|
2743
|
+
const report = buildOpenuiCatalogComposeHonestyReport(args);
|
|
2744
|
+
|
|
2745
|
+
if (args.json) {
|
|
2746
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2747
|
+
} else {
|
|
2748
|
+
process.stdout.write(formatOpenuiCatalogComposeHonestyReport(report));
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
if (args.strict && report.status !== 'ready') {
|
|
2752
|
+
process.exitCode = 1;
|
|
2753
|
+
return;
|
|
2754
|
+
}
|
|
2755
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
async function workspaceSearchRoute() {
|
|
2760
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2761
|
+
const {
|
|
2762
|
+
buildWorkspaceSearchRouteReport,
|
|
2763
|
+
formatWorkspaceSearchRouteReport,
|
|
2764
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'workspace-search-route'));
|
|
2765
|
+
const report = await buildWorkspaceSearchRouteReport(args);
|
|
2766
|
+
|
|
2767
|
+
if (args.json) {
|
|
2768
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2769
|
+
} else {
|
|
2770
|
+
process.stdout.write(formatWorkspaceSearchRouteReport(report));
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
if (args.strict && report.status !== 'ready') {
|
|
2774
|
+
process.exitCode = 1;
|
|
2775
|
+
return;
|
|
2776
|
+
}
|
|
2777
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2618
2780
|
function upstreamContributions() {
|
|
2619
2781
|
const args = parseArgs(process.argv.slice(3));
|
|
2620
2782
|
const {
|
|
@@ -3000,6 +3162,24 @@ function sessionStart() {
|
|
|
3000
3162
|
}
|
|
3001
3163
|
} catch (_) { /* non-critical */ }
|
|
3002
3164
|
|
|
3165
|
+
// MCP + lessons-store wiring — make unattended RAG-loop gaps loud at boot
|
|
3166
|
+
try {
|
|
3167
|
+
const { wiringReport } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
|
|
3168
|
+
const wiring = wiringReport(CWD);
|
|
3169
|
+
if (wiring && wiring.overall !== 'ok') {
|
|
3170
|
+
if (reminderLines.length > 0) reminderLines.push('');
|
|
3171
|
+
reminderLines.push(`ThumbGate RAG wiring: ${wiring.overall.toUpperCase()}`);
|
|
3172
|
+
reminderLines.push(
|
|
3173
|
+
wiring.unattendedCaptureReady
|
|
3174
|
+
? ' Capture path available (local and/or hosted).'
|
|
3175
|
+
: ' Capture path BROKEN for unattended runs — wire .mcp.json thumbgate server and set THUMBGATE_FEEDBACK_DIR or THUMBGATE_API_BASE_URL+THUMBGATE_API_KEY.'
|
|
3176
|
+
);
|
|
3177
|
+
(wiring.findings || []).slice(0, 4).forEach((finding) => {
|
|
3178
|
+
reminderLines.push(` - ${finding}`);
|
|
3179
|
+
});
|
|
3180
|
+
}
|
|
3181
|
+
} catch (_) { /* non-critical */ }
|
|
3182
|
+
|
|
3003
3183
|
// Top high-risk tags — force agent to see them at session start, not opt-in
|
|
3004
3184
|
try {
|
|
3005
3185
|
const { getRiskSummary } = require(path.join(PKG_ROOT, 'scripts', 'risk-scorer'));
|
|
@@ -3038,21 +3218,35 @@ function installMcp() {
|
|
|
3038
3218
|
|
|
3039
3219
|
function dashboard() {
|
|
3040
3220
|
const args = parseArgs(process.argv.slice(3));
|
|
3221
|
+
const { createCliProgress } = require(path.join(PKG_ROOT, 'scripts', 'cli-progress'));
|
|
3222
|
+
const progress = createCliProgress();
|
|
3223
|
+
|
|
3041
3224
|
if (args.open || args.web) {
|
|
3042
3225
|
const { resolveProjectDir } = require(path.join(PKG_ROOT, 'scripts', 'feedback-paths'));
|
|
3043
3226
|
const projectDir = resolveProjectDir({ cwd: process.cwd(), env: process.env });
|
|
3044
3227
|
const port = process.env.PORT || 3456;
|
|
3045
3228
|
const url = `http://127.0.0.1:${port}/dashboard?project=${encodeURIComponent(projectDir)}`;
|
|
3046
3229
|
|
|
3230
|
+
progress.start(`Starting local dashboard on :${port}…`);
|
|
3047
3231
|
ensureDash(Number(port))
|
|
3048
3232
|
.then((server) => {
|
|
3233
|
+
// Keep the stable stdout contract: scripts/tests parse `API <port> pid <n>`.
|
|
3234
|
+
// Progress stays on stderr so humans still see a spinner without breaking parsers.
|
|
3049
3235
|
if (server.started) {
|
|
3050
3236
|
console.log(`API ${port} pid ${server.pid}`);
|
|
3237
|
+
progress.update(`Local API listening (pid ${server.pid})…`);
|
|
3238
|
+
} else {
|
|
3239
|
+
progress.update('Local API already running…');
|
|
3051
3240
|
}
|
|
3241
|
+
progress.update('Opening browser…');
|
|
3052
3242
|
return openBrowser(url);
|
|
3053
3243
|
})
|
|
3054
|
-
.then(() =>
|
|
3244
|
+
.then(() => {
|
|
3245
|
+
progress.succeed(`Dashboard open: ${url}`);
|
|
3246
|
+
process.exit(0);
|
|
3247
|
+
})
|
|
3055
3248
|
.catch((err) => {
|
|
3249
|
+
progress.fail('Failed to open local dashboard');
|
|
3056
3250
|
console.error(err && err.message ? err.message : err);
|
|
3057
3251
|
process.exit(1);
|
|
3058
3252
|
});
|
|
@@ -3062,16 +3256,25 @@ function dashboard() {
|
|
|
3062
3256
|
const { printDashboard } = require(path.join(PKG_ROOT, 'scripts', 'dashboard'));
|
|
3063
3257
|
const { getOperationalDashboard } = require(path.join(PKG_ROOT, 'scripts', 'operational-dashboard'));
|
|
3064
3258
|
|
|
3259
|
+
progress.start('Loading ThumbGate dashboard…');
|
|
3065
3260
|
getOperationalDashboard({
|
|
3066
3261
|
window: args.window,
|
|
3067
3262
|
timeZone: args.timezone,
|
|
3068
3263
|
now: args.now,
|
|
3264
|
+
onProgress: (message) => progress.update(message),
|
|
3069
3265
|
})
|
|
3070
|
-
.then(({ data }) => {
|
|
3266
|
+
.then(({ data, source }) => {
|
|
3267
|
+
const sourceLabel = source === 'hosted'
|
|
3268
|
+
? 'hosted'
|
|
3269
|
+
: source === 'local-unverified'
|
|
3270
|
+
? 'local (hosted unavailable)'
|
|
3271
|
+
: 'local';
|
|
3272
|
+
progress.succeed(`Dashboard ready (${sourceLabel})`);
|
|
3071
3273
|
printDashboard(data);
|
|
3072
3274
|
process.exit(0);
|
|
3073
3275
|
})
|
|
3074
3276
|
.catch((err) => {
|
|
3277
|
+
progress.fail('Dashboard failed');
|
|
3075
3278
|
console.error(err && err.message ? err.message : err);
|
|
3076
3279
|
process.exit(1);
|
|
3077
3280
|
});
|
|
@@ -3270,6 +3473,8 @@ function help() {
|
|
|
3270
3473
|
console.log(' ai-inventory Scan AI/ML components and export ML-BOM evidence');
|
|
3271
3474
|
console.log(' verify-claims --claim="..." Recheck factual claims against configured sources');
|
|
3272
3475
|
console.log(' doctor Audit runtime isolation + bootstrap context');
|
|
3476
|
+
console.log(' compass 6-axis pipeline: wire, lessons, rules, eval');
|
|
3477
|
+
console.log(' security-central Free Agent Security Central posture report');
|
|
3273
3478
|
console.log(' break-glass --reason="..." Short TTL recovery if gates over-fire');
|
|
3274
3479
|
console.log(' brain [--write] Build the agent-readable context brain (lessons + rules + gates)');
|
|
3275
3480
|
console.log(' pro ThumbGate Pro (dashboard, exports, sync)');
|
|
@@ -3337,6 +3542,7 @@ function help() {
|
|
|
3337
3542
|
console.log(' eval Turn feedback into reusable prompt/workflow eval proof');
|
|
3338
3543
|
console.log(' optimize [PRO] Prune CLAUDE.md and migrate rules to Pre-Action Checks');
|
|
3339
3544
|
console.log(' prove [--target=X] Run proof harness (adapters|automation|...)');
|
|
3545
|
+
console.log(' compass 6-axis pipeline check (wire → lessons → rules → eval)');
|
|
3340
3546
|
console.log(' watch Watch .thumbgate/ for external signals');
|
|
3341
3547
|
console.log(' status Approval trend + failure domain dashboard');
|
|
3342
3548
|
console.log(' funnel Marketing and revenue conversion funnel analytics');
|
|
@@ -3351,8 +3557,17 @@ function help() {
|
|
|
3351
3557
|
console.log(' long-running-agent-context-guardrails Map structured-memory gaps to long-running agent gates');
|
|
3352
3558
|
console.log(' reasoning-efficiency-guardrails Map reasoning compression signals to efficiency gates');
|
|
3353
3559
|
console.log(' deepseek-v4-runtime-guardrails Map sparse-attention runtime signals to safety gates');
|
|
3560
|
+
console.log(' nvidia-specdecode-al-doctor Check speculative AL/D evidence vs AL/(1+ρD) speedup math');
|
|
3561
|
+
console.log(' package-manager-honesty-doctor Audit lockfile/CI parity; fail-closed manager switches');
|
|
3562
|
+
console.log(' openui-catalog-compose-honesty Catalog-compose-only + repair-before-claim (OpenUI FORMAT)');
|
|
3563
|
+
console.log(' allowlist-bridge-honesty Audit allowlisted registries/proxies as hops, not trust boundaries');
|
|
3564
|
+
console.log(' jit-harness-compose Compose memory/planning/action/capability onto existing rails (JIT FORMAT)');
|
|
3565
|
+
console.log(' workspace-search-route Route query to rg/fts/vector/hybrid/graph (zg FORMAT)');
|
|
3566
|
+
console.log(' intent-governed-execution NL intent → classify/authorize/gate/HITL/evidence (CyberStrike FORMAT)');
|
|
3354
3567
|
console.log(' background-governance Background-agent run report and dispatch risk check');
|
|
3355
3568
|
console.log(' analytics Unified analytics snapshot (npm, GitHub, landing)');
|
|
3569
|
+
console.log(' inventory Agent action inventory: tool calls, gate denies, false-deny rate');
|
|
3570
|
+
console.log(' conflict-audit Find controls that report success but enforce nothing');
|
|
3356
3571
|
console.log(' start-api Start the ThumbGate HTTPS API server');
|
|
3357
3572
|
console.log('');
|
|
3358
3573
|
|
|
@@ -3385,6 +3600,13 @@ function help() {
|
|
|
3385
3600
|
console.log(' npx thumbgate long-running-agent-context-guardrails --request-count=80 --output-mb=3 --raw-chat-only --json');
|
|
3386
3601
|
console.log(' npx thumbgate reasoning-efficiency-guardrails --baseline-tokens=1200 --compressed-tokens=980 --baseline-accuracy=0.84 --compressed-accuracy=0.85 --verifier --json');
|
|
3387
3602
|
console.log(' npx thumbgate deepseek-v4-runtime-guardrails --context-tokens=900000 --hybrid-attention --speculative-decoding --accept-length=1.4 --precision-mode=fp8 --json');
|
|
3603
|
+
console.log(' npx thumbgate nvidia-specdecode-al-doctor --speculative-decoding --accept-length=1.4 --draft-length=7 --draft-depth-ratio=0.05 --claimed-speedup=3 --json');
|
|
3604
|
+
console.log(' npx thumbgate package-manager-honesty-doctor --propose-switch=pnpm --json');
|
|
3605
|
+
console.log(' npx thumbgate openui-catalog-compose-honesty --catalog=catalog.json --stream=compose.txt --repair --json');
|
|
3606
|
+
console.log(' npx thumbgate allowlist-bridge-honesty --json');
|
|
3607
|
+
console.log(' npx thumbgate jit-harness-compose --task="implement PreToolUse gate fix" --json');
|
|
3608
|
+
console.log(' npx thumbgate workspace-search-route --query="how does X connect" --json');
|
|
3609
|
+
console.log(' npx thumbgate intent-governed-execution --intent="railway deploy" --json');
|
|
3388
3610
|
console.log(' npx thumbgate upstream-contributions --max-repos=10 --write');
|
|
3389
3611
|
console.log(' npx thumbgate background-governance --json');
|
|
3390
3612
|
console.log(' npx thumbgate background-governance --check --agent-id=builder --branch=main --files-changed=25 --json');
|
|
@@ -3438,6 +3660,8 @@ const SUBCOMMAND_HELP = {
|
|
|
3438
3660
|
compact: 'Usage: npx thumbgate compact\n\nCompact the lesson database and reclaim disk space.',
|
|
3439
3661
|
'context-packs': 'Usage: npx thumbgate context-packs\n\nGenerate context packs from top failure patterns.',
|
|
3440
3662
|
suggest: 'Usage: npx thumbgate suggest <gate-id>\n\nSuggest fixes for a specific gate based on lesson history.',
|
|
3663
|
+
inventory: 'Usage: npx thumbgate inventory [--json] [--days=N] [--data-dir=path] [--max-bytes=N]\n\nRead-only inventory of agent activity in this repo\'s ThumbGate store: agents seen, tool calls by tool, allow/deny counts, deny reasons per gate, top gates, per-day activity, and the false-deny rate.\n\nEvery source reports its own status (ok / empty / missing) so an uninstrumented store never looks like a quiet one. falseDenyRate is null with a stated reason whenever a real denominator was not observed; falseDenyNumerator and falseDenyDenominator are always emitted raw.\n\nEach source is read as a bounded tail (default 8 MiB, --max-bytes to change) so a multi-hundred-MB audit log is never loaded whole. If the tail did not reach back to the start of the window, windowFullyCovered is false and the text output says so.',
|
|
3664
|
+
'conflict-audit': 'Usage: npx thumbgate conflict-audit [--json] [--offline] [--repo-root=path] [--github-repo=owner/name] [--branch=main] [--consecutive-failures=N] [--excluded-lines=N] [--commits=N]\n\nDeterministic detector for controls that report success but enforce nothing. Six detectors, no model involved:\n\n D1 gate configs declaring a `patterns` array when the engine reads `pattern` (the match block is skipped, so the gate fires on every tool in its toolNames)\n D2 gate patterns that cannot compile (an inline (?i) flag group throws; the engine swallows the throw as "no match")\n D3 checks required by NEITHER classic branch protection NOR any repository ruleset, which have failed on N or more consecutive recent commits\n D4 sonar.exclusions / sonar.coverage.exclusions entries that hide non-trivial code inside sonar.sources from scanning\n D5 modules and entry exports with zero production call sites outside their own tests (for a PUBLISHED package the entry surface is public API whose callers are downstream npm consumers, so those are reported NOT INSPECTED rather than dead)\n D6 the bare `path.resolve(process.argv[1]) === path.resolve(__filename)` main check, which no-ops under an npm bin shim\n\nEvery detector reports its own status: `ran` (inspected), `partial` (some of the surface was not inspected, and which), or `unavailable` (could not inspect at all). An unavailable detector is NEVER reported as clean. D3 needs the `gh` CLI (resolved from a fixed install location, never through $PATH) plus read access to branch protection and repository rulesets; use --offline to skip it explicitly.',
|
|
3441
3665
|
cost: 'Usage: npx thumbgate cost [--json] [--stats <path>] [--mix \'{"claude-sonnet-4-5":0.8,...}\']\n\nShow cumulative $ and tokens saved by PreToolUse gate blocks. Reads ~/.thumbgate/gate-stats.json.',
|
|
3442
3666
|
savings: 'Usage: npx thumbgate savings [--json] [--stats <path>] [--mix \'{"claude-sonnet-4-5":0.8,...}\']\n\nAlias for `thumbgate cost`.',
|
|
3443
3667
|
'setup-vertex': 'Usage: npx thumbgate setup-vertex [--dry-run]\n\nAuto-enable Vertex AI API on GCP and write local Vertex routing config to .env. With --dry-run, only detect the active account/project and print the planned changes. This does not create or verify a Dialogflow CX agent; use the Dialogflow CX REST API or console for live-agent evidence.',
|
|
@@ -3888,14 +4112,66 @@ switch (COMMAND) {
|
|
|
3888
4112
|
generateAgentReadinessReport,
|
|
3889
4113
|
reportToText,
|
|
3890
4114
|
} = require(path.join(PKG_ROOT, 'scripts', 'agent-readiness'));
|
|
4115
|
+
const { wiringReport, formatReport } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
|
|
3891
4116
|
const args = parseArgs(process.argv.slice(3));
|
|
3892
4117
|
const report = generateAgentReadinessReport({ projectRoot: CWD });
|
|
4118
|
+
const wiring = wiringReport(CWD);
|
|
3893
4119
|
if (args.json) {
|
|
3894
|
-
console.log(JSON.stringify(report, null, 2));
|
|
4120
|
+
console.log(JSON.stringify({ ...report, wiring }, null, 2));
|
|
3895
4121
|
} else {
|
|
3896
4122
|
process.stdout.write(reportToText(report));
|
|
4123
|
+
process.stdout.write(`\n${formatReport(wiring)}\n`);
|
|
3897
4124
|
}
|
|
3898
|
-
|
|
4125
|
+
const ready = report.overallStatus === 'ready' && wiring.overall !== 'error';
|
|
4126
|
+
process.exit(ready ? 0 : 1);
|
|
4127
|
+
break;
|
|
4128
|
+
}
|
|
4129
|
+
case 'compass':
|
|
4130
|
+
case 'pipeline':
|
|
4131
|
+
case 'pipeline-compass': {
|
|
4132
|
+
const { getPipelineCompass, formatPipelineCompass } = require(path.join(PKG_ROOT, 'src', 'pipeline-compass'));
|
|
4133
|
+
const args = parseArgs(process.argv.slice(3));
|
|
4134
|
+
const report = getPipelineCompass({ projectRoot: CWD });
|
|
4135
|
+
if (args.json) console.log(JSON.stringify(report, null, 2));
|
|
4136
|
+
else console.log(formatPipelineCompass(report));
|
|
4137
|
+
process.exit(report.ready ? 0 : 1);
|
|
4138
|
+
break;
|
|
4139
|
+
}
|
|
4140
|
+
case 'writeguard':
|
|
4141
|
+
case 'mcp-writeguard': {
|
|
4142
|
+
const { main } = require(path.join(PKG_ROOT, 'scripts', 'mcp-writeguard'));
|
|
4143
|
+
main();
|
|
4144
|
+
break;
|
|
4145
|
+
}
|
|
4146
|
+
case 'latency':
|
|
4147
|
+
case 'latency-budget': {
|
|
4148
|
+
const { main } = require(path.join(PKG_ROOT, 'scripts', 'latency-budget'));
|
|
4149
|
+
main();
|
|
4150
|
+
break;
|
|
4151
|
+
}
|
|
4152
|
+
case 'wiring-doctor':
|
|
4153
|
+
case 'mcp-wiring-doctor': {
|
|
4154
|
+
const { wiringReport, formatReport, applyFix } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
|
|
4155
|
+
const args = parseArgs(process.argv.slice(3));
|
|
4156
|
+
if (args.fix) applyFix(CWD);
|
|
4157
|
+
const wiring = wiringReport(CWD);
|
|
4158
|
+
if (args.json) console.log(JSON.stringify(wiring, null, 2));
|
|
4159
|
+
else console.log(formatReport(wiring));
|
|
4160
|
+
process.exit(wiring.overall === 'error' ? 2 : wiring.overall === 'warning' ? 1 : 0);
|
|
4161
|
+
break;
|
|
4162
|
+
}
|
|
4163
|
+
case 'security-central':
|
|
4164
|
+
case 'security:central':
|
|
4165
|
+
case 'agent-security-central': {
|
|
4166
|
+
const {
|
|
4167
|
+
buildSecurityCentralReport,
|
|
4168
|
+
formatSecurityCentralReport,
|
|
4169
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'agent-security-central'));
|
|
4170
|
+
const args = parseArgs(process.argv.slice(3));
|
|
4171
|
+
const report = buildSecurityCentralReport({ projectRoot: CWD });
|
|
4172
|
+
if (args.json) console.log(JSON.stringify(report, null, 2));
|
|
4173
|
+
else console.log(formatSecurityCentralReport(report));
|
|
4174
|
+
process.exit(report.posture.band === 'critical' ? 2 : report.posture.band === 'at_risk' ? 1 : 0);
|
|
3899
4175
|
break;
|
|
3900
4176
|
}
|
|
3901
4177
|
case 'export-dpo':
|
|
@@ -3959,6 +4235,51 @@ switch (COMMAND) {
|
|
|
3959
4235
|
case 'sparse-attention-runtime-guardrails':
|
|
3960
4236
|
deepseekV4RuntimeGuardrails();
|
|
3961
4237
|
break;
|
|
4238
|
+
case 'nvidia-specdecode-al-doctor':
|
|
4239
|
+
case 'specdecode-al-doctor':
|
|
4240
|
+
case 'speculative-decoding-al-doctor':
|
|
4241
|
+
case 'nvidia-speculative-decoding-doctor':
|
|
4242
|
+
nvidiaSpecDecodeAlDoctor();
|
|
4243
|
+
break;
|
|
4244
|
+
case 'package-manager-honesty-doctor':
|
|
4245
|
+
case 'pm-honesty-doctor':
|
|
4246
|
+
case 'pnpm12-honesty-doctor':
|
|
4247
|
+
case 'lockfile-ci-parity-doctor':
|
|
4248
|
+
packageManagerHonestyDoctor();
|
|
4249
|
+
break;
|
|
4250
|
+
case 'openui-catalog-compose-honesty':
|
|
4251
|
+
case 'openui-honesty-doctor':
|
|
4252
|
+
case 'catalog-compose-honesty':
|
|
4253
|
+
case 'repair-before-compose-claim':
|
|
4254
|
+
openuiCatalogComposeHonestyDoctor();
|
|
4255
|
+
break;
|
|
4256
|
+
case 'allowlist-bridge-honesty':
|
|
4257
|
+
case 'gitlab-sandbox-allowlist':
|
|
4258
|
+
case 'allowlist-not-trust':
|
|
4259
|
+
case 'trust-handoff-honesty':
|
|
4260
|
+
allowlistBridgeHonestyDoctor();
|
|
4261
|
+
break;
|
|
4262
|
+
case 'jit-harness-compose':
|
|
4263
|
+
case 'jit-compose':
|
|
4264
|
+
case 'jit-harness':
|
|
4265
|
+
case 'harness-compose':
|
|
4266
|
+
jitHarnessCompose();
|
|
4267
|
+
break;
|
|
4268
|
+
case 'workspace-search-route':
|
|
4269
|
+
case 'zg-search-route':
|
|
4270
|
+
case 'zvec-grep-route':
|
|
4271
|
+
case 'search-route':
|
|
4272
|
+
workspaceSearchRoute().catch((err) => {
|
|
4273
|
+
console.error(err && err.stack ? err.stack : err);
|
|
4274
|
+
process.exitCode = 1;
|
|
4275
|
+
});
|
|
4276
|
+
break;
|
|
4277
|
+
case 'intent-governed-execution':
|
|
4278
|
+
case 'governed-intent':
|
|
4279
|
+
case 'cyberstrike-governed':
|
|
4280
|
+
case 'intent-govern':
|
|
4281
|
+
intentGovernedExecution();
|
|
4282
|
+
break;
|
|
3962
4283
|
case 'long-running-agent-context-guardrails':
|
|
3963
4284
|
case 'agent-context-guardrails':
|
|
3964
4285
|
case 'slack-context-guardrails':
|
|
@@ -4292,6 +4613,53 @@ switch (COMMAND) {
|
|
|
4292
4613
|
runAnalytics();
|
|
4293
4614
|
break;
|
|
4294
4615
|
}
|
|
4616
|
+
case 'inventory': {
|
|
4617
|
+
// Read-only rollup of what agents did in this repo's ThumbGate store:
|
|
4618
|
+
// tool calls, allow/deny counts, deny reasons per gate, per-day activity,
|
|
4619
|
+
// and the false-deny rate (null when it cannot be honestly computed).
|
|
4620
|
+
const inventoryArgs = parseArgs(process.argv.slice(3));
|
|
4621
|
+
const {
|
|
4622
|
+
buildInventory,
|
|
4623
|
+
renderInventoryText,
|
|
4624
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'agent-action-inventory'));
|
|
4625
|
+
const { resolveFeedbackDir } = require(path.join(PKG_ROOT, 'scripts', 'feedback-paths'));
|
|
4626
|
+
const inventory = buildInventory({
|
|
4627
|
+
dataDir: inventoryArgs['data-dir'] || resolveFeedbackDir(),
|
|
4628
|
+
windowDays: inventoryArgs.days,
|
|
4629
|
+
maxBytes: inventoryArgs['max-bytes'] ? Number(inventoryArgs['max-bytes']) : undefined,
|
|
4630
|
+
});
|
|
4631
|
+
if (inventoryArgs.json) {
|
|
4632
|
+
console.log(JSON.stringify(inventory, null, 2));
|
|
4633
|
+
} else {
|
|
4634
|
+
process.stdout.write(renderInventoryText(inventory));
|
|
4635
|
+
}
|
|
4636
|
+
break;
|
|
4637
|
+
}
|
|
4638
|
+
case 'conflict-audit': {
|
|
4639
|
+
// Deterministic sweep for controls that report success but enforce
|
|
4640
|
+
// nothing. Each detector reports its own status, so a surface that could
|
|
4641
|
+
// not be inspected is never rendered as a clean bill of health.
|
|
4642
|
+
const conflictArgs = parseArgs(process.argv.slice(3));
|
|
4643
|
+
const {
|
|
4644
|
+
auditGovernanceConflicts,
|
|
4645
|
+
renderConflictAuditText,
|
|
4646
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'governance-conflict-audit'));
|
|
4647
|
+
const conflictReport = auditGovernanceConflicts({
|
|
4648
|
+
repoRoot: conflictArgs['repo-root'] || process.cwd(),
|
|
4649
|
+
gitHubRepo: conflictArgs['github-repo'],
|
|
4650
|
+
branch: conflictArgs.branch,
|
|
4651
|
+
consecutiveFailureThreshold: conflictArgs['consecutive-failures'],
|
|
4652
|
+
excludedLineThreshold: conflictArgs['excluded-lines'],
|
|
4653
|
+
commitLimit: conflictArgs.commits,
|
|
4654
|
+
offline: Boolean(conflictArgs.offline),
|
|
4655
|
+
});
|
|
4656
|
+
if (conflictArgs.json) {
|
|
4657
|
+
console.log(JSON.stringify(conflictReport, null, 2));
|
|
4658
|
+
} else {
|
|
4659
|
+
process.stdout.write(`${renderConflictAuditText(conflictReport)}\n`);
|
|
4660
|
+
}
|
|
4661
|
+
break;
|
|
4662
|
+
}
|
|
4295
4663
|
case 'start-api':
|
|
4296
4664
|
startApi();
|
|
4297
4665
|
break;
|
|
@@ -4373,7 +4741,7 @@ switch (COMMAND) {
|
|
|
4373
4741
|
});
|
|
4374
4742
|
req.on('error', (err) => {
|
|
4375
4743
|
console.error(`✗ Subscribe failed: ${err.message}`);
|
|
4376
|
-
console.error(' Network issue? Try again, or email
|
|
4744
|
+
console.error(' Network issue? Try again, or email support@thumbgate.ai directly.');
|
|
4377
4745
|
process.exit(3);
|
|
4378
4746
|
});
|
|
4379
4747
|
req.on('timeout', () => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// Requiring the module is not enough: its CLI only self-executes when the
|
|
5
|
+
// module itself is the entry point, so `futureagi-bridge --doctor` used to
|
|
6
|
+
// exit 0 having evaluated nothing.
|
|
7
|
+
const { mainCli } = require('../scripts/future-agi-evaluator.js');
|
|
8
|
+
|
|
9
|
+
process.exit(mainCli());
|