@synapsor/runner 1.4.122 → 1.5.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/CHANGELOG.md +71 -19
- package/README.md +56 -46
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +14531 -8137
- package/dist/runtime.d.ts +50 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.mjs +15066 -0
- package/docs/README.md +19 -3
- package/docs/capability-authoring.md +17 -1
- package/docs/contract-review.md +33 -0
- package/docs/database-enforced-scope.md +273 -0
- package/docs/dependency-license-inventory.md +6 -2
- package/docs/doctor.md +17 -0
- package/docs/effect-regression.md +142 -0
- package/docs/getting-started-own-database.md +7 -0
- package/docs/local-mode.md +7 -3
- package/docs/mcp-apps.md +188 -0
- package/docs/mcp-audit.md +54 -0
- package/docs/mcp-client-setup.md +16 -4
- package/docs/mcp-clients.md +8 -0
- package/docs/production.md +8 -0
- package/docs/release-notes.md +67 -11
- package/docs/release-policy.md +9 -5
- package/docs/runner-config-reference.md +25 -0
- package/docs/schema-api-candidates.md +68 -0
- package/docs/security-boundary.md +14 -1
- package/docs/shadow-studies.md +198 -0
- package/examples/mcp-postgres-billing-app-handler/app-handler.mjs +9 -1
- package/examples/mcp-postgres-billing-app-handler/schema.sql +11 -0
- package/examples/mcp-postgres-billing-app-handler/synapsor-handler.mjs +3 -0
- package/examples/raw-sql-vs-synapsor/Makefile +2 -2
- package/examples/raw-sql-vs-synapsor/README.md +6 -4
- package/examples/support-billing-agent/Makefile +5 -1
- package/examples/support-billing-agent/README.md +39 -5
- package/examples/support-billing-agent/db/schema.sql +88 -1
- package/examples/support-billing-agent/db/seed.sql +15 -15
- package/examples/support-billing-agent/scripts/run-demo.sh +4 -0
- package/examples/support-billing-agent/scripts/run-evaluation.sh +62 -0
- package/examples/support-billing-agent/shadow-study/cases.jsonl +6 -0
- package/examples/support-billing-agent/shadow-study/outcomes.jsonl +2 -0
- package/examples/support-billing-agent/synapsor.runner.json +17 -5
- package/fixtures/contracts/capability-surface-fitness.contract.json +190 -0
- package/fixtures/effects/changed/eff_support_late_fee_v1.result.json +58 -0
- package/fixtures/effects/dataset.json +8 -0
- package/fixtures/effects/results/eff_support_late_fee_v1.result.json +59 -0
- package/fixtures/effects/support-late-fee.effect.json +71 -0
- package/fixtures/generators/drizzle/malicious.ts +11 -0
- package/fixtures/generators/drizzle/schema.ts +12 -0
- package/fixtures/generators/openapi/external-ref.yaml +15 -0
- package/fixtures/generators/openapi/openapi.yaml +81 -0
- package/fixtures/generators/prisma/schema.prisma +34 -0
- package/package.json +13 -2
- package/schemas/effect-dataset.schema.json +19 -0
- package/schemas/effect-fixture.schema.json +191 -0
- package/schemas/effect-result.schema.json +52 -0
- package/schemas/mcp-audit-candidates.schema.json +41 -0
- package/schemas/mcp-audit-report.schema.json +104 -0
- package/schemas/schema-candidate-review.schema.json +167 -0
- package/schemas/schema-candidates.schema.json +49 -0
- package/schemas/synapsor.runner.schema.json +51 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type TenantCredentialResolver = {
|
|
2
|
+
id: string;
|
|
3
|
+
resolve(input: {
|
|
4
|
+
source_name: string;
|
|
5
|
+
engine: "postgres" | "mysql";
|
|
6
|
+
access: "read" | "write";
|
|
7
|
+
tenant_id: string;
|
|
8
|
+
principal: string;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
connection_url: string;
|
|
11
|
+
credential_id: string;
|
|
12
|
+
expires_at?: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type RunnerStdioOptions = {
|
|
16
|
+
configPath?: string;
|
|
17
|
+
storePath?: string;
|
|
18
|
+
credentialResolver: TenantCredentialResolver;
|
|
19
|
+
};
|
|
20
|
+
export type RunnerHttpOptions = RunnerStdioOptions & {
|
|
21
|
+
host?: string;
|
|
22
|
+
port?: number;
|
|
23
|
+
authTokenEnv?: string;
|
|
24
|
+
devNoAuth?: boolean;
|
|
25
|
+
corsOrigin?: string;
|
|
26
|
+
env?: Record<string, string | undefined>;
|
|
27
|
+
};
|
|
28
|
+
export type RunnerHttpServerHandle = {
|
|
29
|
+
host: string;
|
|
30
|
+
port: number;
|
|
31
|
+
url: string;
|
|
32
|
+
close(): Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Embed Runner's stdio MCP transport with an application-owned tenant
|
|
36
|
+
* credential broker. The CLI intentionally does not load executable resolver
|
|
37
|
+
* modules.
|
|
38
|
+
*/
|
|
39
|
+
export declare function serveRunnerStdio(options: RunnerStdioOptions): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Embed the spec-compatible Streamable HTTP transport with an
|
|
42
|
+
* application-owned tenant credential broker.
|
|
43
|
+
*/
|
|
44
|
+
export declare function startRunnerStreamableHttp(options: RunnerHttpOptions): Promise<RunnerHttpServerHandle>;
|
|
45
|
+
/**
|
|
46
|
+
* Embed the legacy JSON-RPC HTTP bridge. Prefer Streamable HTTP for new MCP
|
|
47
|
+
* clients.
|
|
48
|
+
*/
|
|
49
|
+
export declare function startRunnerJsonRpcHttp(options: RunnerHttpOptions): Promise<RunnerHttpServerHandle>;
|
|
50
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,KAAK,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;QAC7B,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAA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