@martinloop/mcp 0.7.1 → 0.8.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/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/vendor/adapters/claude-cli.d.ts +16 -1
- package/dist/vendor/adapters/claude-cli.js +286 -71
- package/dist/vendor/adapters/cli-bridge.d.ts +12 -3
- package/dist/vendor/adapters/cli-bridge.js +129 -149
- package/dist/vendor/adapters/codex-capabilities.d.ts +4 -1
- package/dist/vendor/adapters/codex-capabilities.js +36 -4
- package/dist/vendor/adapters/codex-cli.d.ts +10 -3
- package/dist/vendor/adapters/codex-cli.js +21 -24
- package/dist/vendor/adapters/codex-host.js +150 -132
- package/dist/vendor/adapters/index.d.ts +3 -2
- package/dist/vendor/adapters/index.js +3 -2
- package/dist/vendor/adapters/openai-compatible.js +88 -6
- package/dist/vendor/adapters/process-supervisor.d.ts +60 -0
- package/dist/vendor/adapters/process-supervisor.js +541 -0
- package/dist/vendor/adapters/verifier-only.d.ts +10 -1
- package/dist/vendor/adapters/verifier-only.js +43 -1
- package/dist/vendor/contracts/external-outcome.d.ts +102 -0
- package/dist/vendor/contracts/external-outcome.js +226 -0
- package/dist/vendor/contracts/index.d.ts +12 -1
- package/dist/vendor/contracts/index.js +2 -0
- package/dist/vendor/contracts/swarm-hosted.d.ts +204 -0
- package/dist/vendor/contracts/swarm-hosted.js +629 -0
- package/dist/vendor/contracts/swarm.d.ts +449 -0
- package/dist/vendor/contracts/swarm.js +550 -0
- package/dist/vendor/core/external-outcome.d.ts +34 -0
- package/dist/vendor/core/external-outcome.js +515 -0
- package/dist/vendor/core/grounding.js +1 -1
- package/dist/vendor/core/index.d.ts +52 -1
- package/dist/vendor/core/index.js +55 -3
- package/dist/vendor/core/leash.d.ts +1 -0
- package/dist/vendor/core/leash.js +13 -0
- package/dist/vendor/core/persistence/integrity.d.ts +4 -0
- package/dist/vendor/core/persistence/integrity.js +19 -6
- package/dist/vendor/core/persistence/swarm-integrity.d.ts +63 -0
- package/dist/vendor/core/persistence/swarm-integrity.js +309 -0
- package/dist/vendor/core/policy.d.ts +3 -0
- package/dist/vendor/core/policy.js +13 -0
- package/dist/vendor/core/swarm/candidates.d.ts +78 -0
- package/dist/vendor/core/swarm/candidates.js +810 -0
- package/dist/vendor/core/swarm/evidence-projection.d.ts +87 -0
- package/dist/vendor/core/swarm/evidence-projection.js +128 -0
- package/dist/vendor/core/swarm/evidence.d.ts +40 -0
- package/dist/vendor/core/swarm/evidence.js +575 -0
- package/dist/vendor/core/swarm/hosted-export.d.ts +48 -0
- package/dist/vendor/core/swarm/hosted-export.js +362 -0
- package/dist/vendor/core/swarm/hosted-projection.d.ts +5 -0
- package/dist/vendor/core/swarm/hosted-projection.js +258 -0
- package/dist/vendor/core/swarm/index.d.ts +110 -0
- package/dist/vendor/core/swarm/index.js +1060 -0
- package/dist/vendor/core/swarm/integration.d.ts +76 -0
- package/dist/vendor/core/swarm/integration.js +615 -0
- package/dist/vendor/core/swarm/lifecycle.d.ts +72 -0
- package/dist/vendor/core/swarm/lifecycle.js +252 -0
- package/dist/vendor/core/swarm/live-runtime.d.ts +78 -0
- package/dist/vendor/core/swarm/live-runtime.js +1482 -0
- package/dist/vendor/core/swarm/live-store.d.ts +99 -0
- package/dist/vendor/core/swarm/live-store.js +860 -0
- package/dist/vendor/core/swarm/operational-reader.d.ts +17 -0
- package/dist/vendor/core/swarm/operational-reader.js +96 -0
- package/dist/vendor/core/swarm/operations.d.ts +29 -0
- package/dist/vendor/core/swarm/operations.js +128 -0
- package/dist/vendor/core/swarm/parent-receipt.d.ts +13 -0
- package/dist/vendor/core/swarm/parent-receipt.js +489 -0
- package/dist/vendor/core/swarm/receipt-projection.d.ts +26 -0
- package/dist/vendor/core/swarm/receipt-projection.js +120 -0
- package/dist/vendor/core/swarm/scheduler.d.ts +92 -0
- package/dist/vendor/core/swarm/scheduler.js +555 -0
- package/dist/vendor/core/swarm/verification.d.ts +70 -0
- package/dist/vendor/core/swarm/verification.js +295 -0
- package/dist/vendor/core/swarm/workspaces.d.ts +77 -0
- package/dist/vendor/core/swarm/workspaces.js +488 -0
- package/dist/vendor/core/verified-handoff.d.ts +4 -0
- package/dist/vendor/core/verified-handoff.js +4 -0
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ReceiptIntegritySummary, type SwarmCandidate, type SwarmPatchAdmission, type SwarmRunRecord } from "../../contracts/index.js";
|
|
2
|
+
import type { SwarmWorkspaceRuntimeHandle } from "./workspaces.js";
|
|
3
|
+
export interface SwarmCandidateGitCommand {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly args: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export interface SwarmCandidateGitResult {
|
|
8
|
+
readonly stdout: Buffer;
|
|
9
|
+
readonly stderr: Buffer;
|
|
10
|
+
}
|
|
11
|
+
export type SwarmCandidateGitRunner = (command: SwarmCandidateGitCommand) => Promise<SwarmCandidateGitResult>;
|
|
12
|
+
export interface PersistedSwarmCandidateArtifact {
|
|
13
|
+
readonly candidate: SwarmCandidate;
|
|
14
|
+
readonly attemptId: string;
|
|
15
|
+
readonly proposalId: string;
|
|
16
|
+
readonly identitySha256: string;
|
|
17
|
+
readonly candidateTreeHash: string;
|
|
18
|
+
readonly patch: Buffer;
|
|
19
|
+
readonly manifest: Buffer;
|
|
20
|
+
readonly manifestSha256: string;
|
|
21
|
+
readonly receiptIntegrity: ReceiptIntegritySummary;
|
|
22
|
+
}
|
|
23
|
+
export interface SwarmProcessClosureEvidence {
|
|
24
|
+
readonly swarmId: string;
|
|
25
|
+
readonly workspaceId: string;
|
|
26
|
+
readonly childRunId: string;
|
|
27
|
+
readonly agentId: string;
|
|
28
|
+
readonly state: "closed";
|
|
29
|
+
readonly completedAt: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Implementations must durably and atomically reject duplicate candidate IDs.
|
|
33
|
+
* The caller does not receive cleanup authority until both operations resolve.
|
|
34
|
+
*/
|
|
35
|
+
export interface SwarmCandidateArtifactWriter {
|
|
36
|
+
loadProcessClosure(childRunId: string): Promise<SwarmProcessClosureEvidence | undefined>;
|
|
37
|
+
persistCandidate(artifact: PersistedSwarmCandidateArtifact): Promise<void>;
|
|
38
|
+
persistDecision(decision: SwarmPatchAdmission): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export interface CaptureSwarmCandidateInput {
|
|
41
|
+
readonly swarmRecord: SwarmRunRecord;
|
|
42
|
+
readonly canonicalRoot: string;
|
|
43
|
+
readonly swarmId: string;
|
|
44
|
+
readonly candidateId: string;
|
|
45
|
+
readonly admissionId: string;
|
|
46
|
+
readonly attemptId: string;
|
|
47
|
+
readonly proposalId: string;
|
|
48
|
+
readonly childRunId: string;
|
|
49
|
+
readonly agentId: string;
|
|
50
|
+
readonly taskIds: readonly string[];
|
|
51
|
+
readonly expectedBaselineCommit: string;
|
|
52
|
+
readonly workspace: SwarmWorkspaceRuntimeHandle;
|
|
53
|
+
readonly childState: "verified" | "stopped" | "needs_review" | "running" | "queued";
|
|
54
|
+
readonly declaredPaths: readonly string[];
|
|
55
|
+
readonly childAllowedPaths: readonly string[];
|
|
56
|
+
readonly inheritedDeniedPaths: readonly string[];
|
|
57
|
+
readonly taskWriteScope: readonly string[];
|
|
58
|
+
readonly runsRoot: string;
|
|
59
|
+
readonly loopRecordPath: string;
|
|
60
|
+
readonly ledgerPath: string;
|
|
61
|
+
readonly artifactWriter: SwarmCandidateArtifactWriter;
|
|
62
|
+
readonly gitRunner?: SwarmCandidateGitRunner;
|
|
63
|
+
readonly now?: () => string;
|
|
64
|
+
/** Test-only race seam executed after validation and before staging. */
|
|
65
|
+
readonly beforeStage?: () => void | Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
export interface CaptureSwarmCandidateResult {
|
|
68
|
+
readonly admission: SwarmPatchAdmission;
|
|
69
|
+
readonly artifact?: PersistedSwarmCandidateArtifact;
|
|
70
|
+
readonly cleanupAuthorized: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Internal live-runtime bridge to the candidate module's single NUL-safe Git
|
|
74
|
+
* inventory parser. Policy enforcement remains in captureAndAdmitSwarmCandidate.
|
|
75
|
+
*/
|
|
76
|
+
export declare function inventorySwarmCandidatePaths(workspacePath: string, gitRunner?: SwarmCandidateGitRunner): Promise<string[]>;
|
|
77
|
+
export declare function captureAndAdmitSwarmCandidate(input: CaptureSwarmCandidateInput): Promise<CaptureSwarmCandidateResult>;
|
|
78
|
+
export declare function verifyPersistedSwarmCandidateArtifact(artifact: PersistedSwarmCandidateArtifact): boolean;
|