caisson-cli 0.0.0-stage → 0.2.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/README.math-mvp.md +28 -0
- package/README.md +56 -3
- package/dist/admin/adminRoutes.d.ts +10 -0
- package/dist/admin/adminRoutes.js +194 -0
- package/dist/admin/adminRoutes.js.map +1 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.js +4 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/workspaceAdmin.d.ts +417 -0
- package/dist/admin/workspaceAdmin.js +569 -0
- package/dist/admin/workspaceAdmin.js.map +1 -0
- package/dist/analytics/index.d.ts +1 -0
- package/dist/analytics/index.js +3 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/metrics.d.ts +105 -0
- package/dist/analytics/metrics.js +837 -0
- package/dist/analytics/metrics.js.map +1 -0
- package/dist/audit/index.d.ts +4 -0
- package/dist/audit/index.js +6 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/pipeline.d.ts +90 -0
- package/dist/audit/pipeline.js +424 -0
- package/dist/audit/pipeline.js.map +1 -0
- package/dist/audit/receiptSchema.d.ts +441 -0
- package/dist/audit/receiptSchema.js +208 -0
- package/dist/audit/receiptSchema.js.map +1 -0
- package/dist/audit/stageA.d.ts +50 -0
- package/dist/audit/stageA.js +218 -0
- package/dist/audit/stageA.js.map +1 -0
- package/dist/audit/stageB.d.ts +48 -0
- package/dist/audit/stageB.js +113 -0
- package/dist/audit/stageB.js.map +1 -0
- package/dist/auth/agentAuth.d.ts +28 -0
- package/dist/auth/agentAuth.js +88 -0
- package/dist/auth/agentAuth.js.map +1 -0
- package/dist/auth/agentCardSigner.d.ts +55 -0
- package/dist/auth/agentCardSigner.js +188 -0
- package/dist/auth/agentCardSigner.js.map +1 -0
- package/dist/billing/billingRoutes.d.ts +11 -0
- package/dist/billing/billingRoutes.js +303 -0
- package/dist/billing/billingRoutes.js.map +1 -0
- package/dist/billing/bountyRoutes.d.ts +9 -0
- package/dist/billing/bountyRoutes.js +332 -0
- package/dist/billing/bountyRoutes.js.map +1 -0
- package/dist/billing/index.d.ts +3 -0
- package/dist/billing/index.js +4 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/subscriptions.d.ts +226 -0
- package/dist/billing/subscriptions.js +673 -0
- package/dist/billing/subscriptions.js.map +1 -0
- package/dist/cli/caissonCli.d.ts +15 -0
- package/dist/cli/caissonCli.js +528 -0
- package/dist/cli/caissonCli.js.map +1 -0
- package/dist/cli/doctor.d.ts +31 -0
- package/dist/cli/doctor.js +321 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/inviteCard.d.ts +25 -0
- package/dist/cli/inviteCard.js +111 -0
- package/dist/cli/inviteCard.js.map +1 -0
- package/dist/cli/mcpProxy.d.ts +36 -0
- package/dist/cli/mcpProxy.js +292 -0
- package/dist/cli/mcpProxy.js.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +28 -0
- package/dist/config.js.map +1 -0
- package/dist/db/adapter.d.ts +210 -0
- package/dist/db/adapter.js +769 -0
- package/dist/db/adapter.js.map +1 -0
- package/dist/db/sqlite.d.ts +7 -0
- package/dist/db/sqlite.js +60 -0
- package/dist/db/sqlite.js.map +1 -0
- package/dist/db/telemetry.d.ts +11 -0
- package/dist/db/telemetry.js +9 -0
- package/dist/db/telemetry.js.map +1 -0
- package/dist/economy/bountyEngine.d.ts +248 -0
- package/dist/economy/bountyEngine.js +836 -0
- package/dist/economy/bountyEngine.js.map +1 -0
- package/dist/economy/index.d.ts +5 -0
- package/dist/economy/index.js +6 -0
- package/dist/economy/index.js.map +1 -0
- package/dist/economy/scLedger.d.ts +183 -0
- package/dist/economy/scLedger.js +528 -0
- package/dist/economy/scLedger.js.map +1 -0
- package/dist/economy/scMinting.d.ts +177 -0
- package/dist/economy/scMinting.js +659 -0
- package/dist/economy/scMinting.js.map +1 -0
- package/dist/economy/scSinks.d.ts +135 -0
- package/dist/economy/scSinks.js +314 -0
- package/dist/economy/scSinks.js.map +1 -0
- package/dist/economy/usdLedger.d.ts +211 -0
- package/dist/economy/usdLedger.js +604 -0
- package/dist/economy/usdLedger.js.map +1 -0
- package/dist/mcp/handlers.d.ts +136 -0
- package/dist/mcp/handlers.js +809 -0
- package/dist/mcp/handlers.js.map +1 -0
- package/dist/mcp/httpServer.d.ts +29 -0
- package/dist/mcp/httpServer.js +384 -0
- package/dist/mcp/httpServer.js.map +1 -0
- package/dist/mcp/serverFactory.d.ts +4 -0
- package/dist/mcp/serverFactory.js +53 -0
- package/dist/mcp/serverFactory.js.map +1 -0
- package/dist/mcp/stdioServer.d.ts +2 -0
- package/dist/mcp/stdioServer.js +24 -0
- package/dist/mcp/stdioServer.js.map +1 -0
- package/dist/mcp/toolMetadata.d.ts +15 -0
- package/dist/mcp/toolMetadata.js +73 -0
- package/dist/mcp/toolMetadata.js.map +1 -0
- package/dist/memo/artifactIndex.d.ts +51 -0
- package/dist/memo/artifactIndex.js +162 -0
- package/dist/memo/artifactIndex.js.map +1 -0
- package/dist/memo/dependencyBundle.d.ts +33 -0
- package/dist/memo/dependencyBundle.js +86 -0
- package/dist/memo/dependencyBundle.js.map +1 -0
- package/dist/memo/embeddings.d.ts +110 -0
- package/dist/memo/embeddings.js +672 -0
- package/dist/memo/embeddings.js.map +1 -0
- package/dist/packs/foundryEvm.d.ts +21 -0
- package/dist/packs/foundryEvm.js +274 -0
- package/dist/packs/foundryEvm.js.map +1 -0
- package/dist/packs/index.d.ts +8 -0
- package/dist/packs/index.js +19 -0
- package/dist/packs/index.js.map +1 -0
- package/dist/packs/mathLean4.d.ts +7 -0
- package/dist/packs/mathLean4.js +145 -0
- package/dist/packs/mathLean4.js.map +1 -0
- package/dist/packs/rustKani.d.ts +17 -0
- package/dist/packs/rustKani.js +257 -0
- package/dist/packs/rustKani.js.map +1 -0
- package/dist/packs/sdk.d.ts +314 -0
- package/dist/packs/sdk.js +271 -0
- package/dist/packs/sdk.js.map +1 -0
- package/dist/preflight/leanTripwire.d.ts +19 -0
- package/dist/preflight/leanTripwire.js +105 -0
- package/dist/preflight/leanTripwire.js.map +1 -0
- package/dist/storage/blobStore.d.ts +11 -0
- package/dist/storage/blobStore.js +39 -0
- package/dist/storage/blobStore.js.map +1 -0
- package/dist/storage/gitStore.d.ts +68 -0
- package/dist/storage/gitStore.js +228 -0
- package/dist/storage/gitStore.js.map +1 -0
- package/dist/types/errors.d.ts +16 -0
- package/dist/types/errors.js +23 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/schemas.d.ts +453 -0
- package/dist/types/schemas.js +197 -0
- package/dist/types/schemas.js.map +1 -0
- package/dist/web/discoveryRoutes.d.ts +24 -0
- package/dist/web/discoveryRoutes.js +532 -0
- package/dist/web/discoveryRoutes.js.map +1 -0
- package/dist/web/docsRoutes.d.ts +14 -0
- package/dist/web/docsRoutes.js +451 -0
- package/dist/web/docsRoutes.js.map +1 -0
- package/dist/web/explorer/dagLayout.d.ts +41 -0
- package/dist/web/explorer/dagLayout.js +183 -0
- package/dist/web/explorer/dagLayout.js.map +1 -0
- package/dist/web/explorer/index.d.ts +45 -0
- package/dist/web/explorer/index.js +512 -0
- package/dist/web/explorer/index.js.map +1 -0
- package/dist/web/explorer/renderers.d.ts +35 -0
- package/dist/web/explorer/renderers.js +399 -0
- package/dist/web/explorer/renderers.js.map +1 -0
- package/dist/web/landing.d.ts +36 -0
- package/dist/web/landing.js +532 -0
- package/dist/web/landing.js.map +1 -0
- package/dist/web/onboardingRoutes.d.ts +96 -0
- package/dist/web/onboardingRoutes.js +629 -0
- package/dist/web/onboardingRoutes.js.map +1 -0
- package/dist/web/repoBrowser.d.ts +19 -0
- package/dist/web/repoBrowser.js +128 -0
- package/dist/web/repoBrowser.js.map +1 -0
- package/dist/worker/executionAdapter.d.ts +14 -0
- package/dist/worker/executionAdapter.js +162 -0
- package/dist/worker/executionAdapter.js.map +1 -0
- package/dist/worker/finalize.d.ts +21 -0
- package/dist/worker/finalize.js +146 -0
- package/dist/worker/finalize.js.map +1 -0
- package/dist/worker/firecrackerAdapter.d.ts +180 -0
- package/dist/worker/firecrackerAdapter.js +421 -0
- package/dist/worker/firecrackerAdapter.js.map +1 -0
- package/dist/worker/loop.d.ts +56 -0
- package/dist/worker/loop.js +239 -0
- package/dist/worker/loop.js.map +1 -0
- package/dist/worker/postMergeSync.d.ts +17 -0
- package/dist/worker/postMergeSync.js +52 -0
- package/dist/worker/postMergeSync.js.map +1 -0
- package/dist/worker/prepareInput.d.ts +41 -0
- package/dist/worker/prepareInput.js +130 -0
- package/dist/worker/prepareInput.js.map +1 -0
- package/dist/worker/queue.d.ts +83 -0
- package/dist/worker/queue.js +278 -0
- package/dist/worker/queue.js.map +1 -0
- package/dist/worker/sandbox.d.ts +2 -0
- package/dist/worker/sandbox.js +3 -0
- package/dist/worker/sandbox.js.map +1 -0
- package/dist/worker/webhook.d.ts +14 -0
- package/dist/worker/webhook.js +110 -0
- package/dist/worker/webhook.js.map +1 -0
- package/migrations/001_init.sql +193 -0
- package/migrations/002_epic3_scale.sql +34 -0
- package/migrations/003_swarm_credits.sql +153 -0
- package/migrations/004_usd_bounties.sql +216 -0
- package/migrations_pg/001_init.sql +229 -0
- package/migrations_pg/002_multitenant_rls.sql +63 -0
- package/migrations_pg/003_swarm_credits.sql +135 -0
- package/migrations_pg/004_usd_bounties.sql +201 -0
- package/package.json +58 -6
- package/packs/foundry-evm/pack.json +60 -0
- package/packs/foundry-evm/verifier/Dockerfile +9 -0
- package/packs/foundry-evm/verifier/run.py +160 -0
- package/packs/math-lean4/pack.json +68 -0
- package/packs/rust-kani/pack.json +53 -0
- package/packs/rust-kani/verifier/Dockerfile +7 -0
- package/packs/rust-kani/verifier/run.py +159 -0
- package/public/.well-known/agent-card.json +162 -0
- package/public/llms.txt +40 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type Database from 'better-sqlite3';
|
|
2
|
+
import { type AgentContext } from '../auth/agentAuth.js';
|
|
3
|
+
import type { ContentAddressedBlobStore } from '../storage/blobStore.js';
|
|
4
|
+
import type { BareGitStore } from '../storage/gitStore.js';
|
|
5
|
+
import { type DomainPackRegistry } from '../packs/index.js';
|
|
6
|
+
export declare class SwarmToolHandlers {
|
|
7
|
+
private readonly db;
|
|
8
|
+
private readonly git;
|
|
9
|
+
private readonly blobs?;
|
|
10
|
+
private readonly packRegistry;
|
|
11
|
+
constructor(db: Database.Database, git: BareGitStore, blobs?: ContentAddressedBlobStore | undefined, packRegistry?: DomainPackRegistry);
|
|
12
|
+
private assertWritableAgent;
|
|
13
|
+
private checkHourlyQuota;
|
|
14
|
+
/** 1. read_graph */
|
|
15
|
+
readGraph(rawInput: unknown, agent: AgentContext): {
|
|
16
|
+
workspace: {
|
|
17
|
+
workspace_id: any;
|
|
18
|
+
title: any;
|
|
19
|
+
problem_summary: any;
|
|
20
|
+
visibility: any;
|
|
21
|
+
domain_pack: any;
|
|
22
|
+
verifier_type: any;
|
|
23
|
+
require_precheck: boolean;
|
|
24
|
+
merge_target: any;
|
|
25
|
+
environment_version: any;
|
|
26
|
+
environment_lock_hash: any;
|
|
27
|
+
git_head_sha: any;
|
|
28
|
+
};
|
|
29
|
+
nodes: {
|
|
30
|
+
node_id: any;
|
|
31
|
+
type: any;
|
|
32
|
+
status: any;
|
|
33
|
+
title: any;
|
|
34
|
+
spec_summary: any;
|
|
35
|
+
parent_ids: string[];
|
|
36
|
+
claim_lease: {
|
|
37
|
+
agent_id: any;
|
|
38
|
+
expires_at: any;
|
|
39
|
+
} | null;
|
|
40
|
+
payload_ref: any;
|
|
41
|
+
payload: {
|
|
42
|
+
content: string | null;
|
|
43
|
+
} | null;
|
|
44
|
+
spec_content: string | null;
|
|
45
|
+
verifier_result: any;
|
|
46
|
+
bounty_config: any;
|
|
47
|
+
updated_at: any;
|
|
48
|
+
}[];
|
|
49
|
+
edges: any[];
|
|
50
|
+
dead_end_summaries: {
|
|
51
|
+
superseded?: boolean | undefined;
|
|
52
|
+
artifact_id: any;
|
|
53
|
+
node_id: any;
|
|
54
|
+
approach_summary: any;
|
|
55
|
+
verified: boolean;
|
|
56
|
+
}[];
|
|
57
|
+
next_cursor: string | null;
|
|
58
|
+
};
|
|
59
|
+
/** 2. query_cache (Hybrid Semantic + FTS5 BM25 v2 + Content-Hash Index + Lineage Traversal + Privacy Airlock + Pagination) */
|
|
60
|
+
queryCache(rawInput: unknown, agent: AgentContext): {
|
|
61
|
+
lineage?: import("../memo/artifactIndex.js").ArtifactLineageResult | null | undefined;
|
|
62
|
+
results: {
|
|
63
|
+
match_signals?: {
|
|
64
|
+
lexical_score: number;
|
|
65
|
+
semantic_score: number;
|
|
66
|
+
match_source: "hybrid" | "lexical" | "semantic";
|
|
67
|
+
} | undefined;
|
|
68
|
+
verifier_hash: string;
|
|
69
|
+
semantic_tags: string[];
|
|
70
|
+
derived_from: any[];
|
|
71
|
+
reuse_count: number;
|
|
72
|
+
author_agent_id: string;
|
|
73
|
+
relevance_score: number;
|
|
74
|
+
environment_lock_hash?: string | undefined;
|
|
75
|
+
artifact_id: string;
|
|
76
|
+
content_hash: string;
|
|
77
|
+
artifact_type: string;
|
|
78
|
+
title: string;
|
|
79
|
+
summary: string;
|
|
80
|
+
payload_preview: string;
|
|
81
|
+
payload_uri: string;
|
|
82
|
+
environment_version: string;
|
|
83
|
+
}[];
|
|
84
|
+
total_matches: number;
|
|
85
|
+
next_cursor: string | null;
|
|
86
|
+
};
|
|
87
|
+
/** 3. claim_node (Atomic CAS TTL Lease) */
|
|
88
|
+
claimNode(rawInput: unknown, agent: AgentContext): {
|
|
89
|
+
node_id: any;
|
|
90
|
+
status: string;
|
|
91
|
+
lease_active: boolean;
|
|
92
|
+
lease_token: null;
|
|
93
|
+
expires_at: null;
|
|
94
|
+
node_spec: null;
|
|
95
|
+
} | {
|
|
96
|
+
node_id: any;
|
|
97
|
+
status: string;
|
|
98
|
+
lease_active: boolean;
|
|
99
|
+
lease_token: string;
|
|
100
|
+
expires_at: string;
|
|
101
|
+
node_spec: null;
|
|
102
|
+
} | {
|
|
103
|
+
node_id: any;
|
|
104
|
+
status: string;
|
|
105
|
+
lease_active: boolean;
|
|
106
|
+
lease_token: string;
|
|
107
|
+
expires_at: string;
|
|
108
|
+
node_spec: {
|
|
109
|
+
title: any;
|
|
110
|
+
type: any;
|
|
111
|
+
spec_content: any;
|
|
112
|
+
required_precheck: boolean;
|
|
113
|
+
parent_artifacts: any[];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
/** 4. submit_artifact (Stage 0 Control-Plane Preflight + Enqueue + Optional Sync Wait) */
|
|
117
|
+
submitArtifact(rawInput: unknown, agent: AgentContext): Promise<{
|
|
118
|
+
run_id: string;
|
|
119
|
+
node_id: any;
|
|
120
|
+
node_status: any;
|
|
121
|
+
merged: boolean;
|
|
122
|
+
artifact_id: any;
|
|
123
|
+
content_hash: any;
|
|
124
|
+
git_commit_sha: string | null;
|
|
125
|
+
verifier_result: any;
|
|
126
|
+
}>;
|
|
127
|
+
/** 5. log_dead_end */
|
|
128
|
+
logDeadEnd(rawInput: unknown, agent: AgentContext): {
|
|
129
|
+
artifact_id: string;
|
|
130
|
+
content_hash: string;
|
|
131
|
+
node_id: any;
|
|
132
|
+
node_status: any;
|
|
133
|
+
evidence_verified: boolean;
|
|
134
|
+
verifier_result: null;
|
|
135
|
+
};
|
|
136
|
+
}
|