@wrenai/genbi 0.0.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/LICENSE +201 -0
- package/README.md +141 -0
- package/bin/genbi.mjs +31 -0
- package/dist/assets/echarts-LTFC-ysd.js +40 -0
- package/dist/assets/index-Bo--QMUN.js +441 -0
- package/dist/assets/index-Xs4q7pNo.css +1 -0
- package/dist/index.html +14 -0
- package/dist/wrenai_logo.png +0 -0
- package/dist/wrenai_logo_white.png +0 -0
- package/dist-server/harness/auth/detect.d.ts +18 -0
- package/dist-server/harness/auth/detect.js +37 -0
- package/dist-server/harness/auth/index.d.ts +4 -0
- package/dist-server/harness/auth/index.js +2 -0
- package/dist-server/harness/auth/probe.d.ts +18 -0
- package/dist-server/harness/auth/probe.js +52 -0
- package/dist-server/harness/auth/types.d.ts +42 -0
- package/dist-server/harness/auth/types.js +9 -0
- package/dist-server/harness/bundle/loader.d.ts +32 -0
- package/dist-server/harness/bundle/loader.js +43 -0
- package/dist-server/harness/bundle/schema.d.ts +199 -0
- package/dist-server/harness/bundle/schema.js +127 -0
- package/dist-server/harness/bundle/version.d.ts +10 -0
- package/dist-server/harness/bundle/version.js +43 -0
- package/dist-server/harness/capability/gate.d.ts +6 -0
- package/dist-server/harness/capability/gate.js +29 -0
- package/dist-server/harness/capability/registry.d.ts +6 -0
- package/dist-server/harness/capability/registry.js +17 -0
- package/dist-server/harness/cli-args.d.ts +123 -0
- package/dist-server/harness/cli-args.js +247 -0
- package/dist-server/harness/cli.d.ts +2 -0
- package/dist-server/harness/cli.js +151 -0
- package/dist-server/harness/compile/cache.d.ts +23 -0
- package/dist-server/harness/compile/cache.js +109 -0
- package/dist-server/harness/compile/compose-profile.d.ts +34 -0
- package/dist-server/harness/compile/compose-profile.js +95 -0
- package/dist-server/harness/compile/errors.d.ts +22 -0
- package/dist-server/harness/compile/errors.js +41 -0
- package/dist-server/harness/compile/fingerprint.d.ts +22 -0
- package/dist-server/harness/compile/fingerprint.js +84 -0
- package/dist-server/harness/compile/index.d.ts +8 -0
- package/dist-server/harness/compile/index.js +7 -0
- package/dist-server/harness/compile/pipeline.d.ts +66 -0
- package/dist-server/harness/compile/pipeline.js +176 -0
- package/dist-server/harness/compile/resolve-binary.d.ts +55 -0
- package/dist-server/harness/compile/resolve-binary.js +133 -0
- package/dist-server/harness/compile/types.d.ts +107 -0
- package/dist-server/harness/compile/types.js +1 -0
- package/dist-server/harness/compile/warble-identity.d.ts +12 -0
- package/dist-server/harness/compile/warble-identity.js +33 -0
- package/dist-server/harness/compliance/gate.d.ts +35 -0
- package/dist-server/harness/compliance/gate.js +48 -0
- package/dist-server/harness/compliance/index.d.ts +2 -0
- package/dist-server/harness/compliance/index.js +1 -0
- package/dist-server/harness/compliance/types.d.ts +16 -0
- package/dist-server/harness/compliance/types.js +1 -0
- package/dist-server/harness/events/emitter.d.ts +34 -0
- package/dist-server/harness/events/emitter.js +25 -0
- package/dist-server/harness/events/index.d.ts +4 -0
- package/dist-server/harness/events/index.js +2 -0
- package/dist-server/harness/events/sse.d.ts +20 -0
- package/dist-server/harness/events/sse.js +48 -0
- package/dist-server/harness/events/types.d.ts +131 -0
- package/dist-server/harness/events/types.js +1 -0
- package/dist-server/harness/exec/errors.d.ts +16 -0
- package/dist-server/harness/exec/errors.js +29 -0
- package/dist-server/harness/exec/index.d.ts +5 -0
- package/dist-server/harness/exec/index.js +2 -0
- package/dist-server/harness/exec/local.d.ts +32 -0
- package/dist-server/harness/exec/local.js +134 -0
- package/dist-server/harness/exec/policy.d.ts +12 -0
- package/dist-server/harness/exec/policy.js +1 -0
- package/dist-server/harness/exec/types.d.ts +63 -0
- package/dist-server/harness/exec/types.js +1 -0
- package/dist-server/harness/guardrails/index.d.ts +2 -0
- package/dist-server/harness/guardrails/index.js +1 -0
- package/dist-server/harness/guardrails/policy.d.ts +45 -0
- package/dist-server/harness/guardrails/policy.js +57 -0
- package/dist-server/harness/index.d.ts +37 -0
- package/dist-server/harness/index.js +19 -0
- package/dist-server/harness/loop/errors.d.ts +53 -0
- package/dist-server/harness/loop/errors.js +72 -0
- package/dist-server/harness/loop/executor.d.ts +123 -0
- package/dist-server/harness/loop/executor.js +380 -0
- package/dist-server/harness/loop/guard.d.ts +16 -0
- package/dist-server/harness/loop/guard.js +1 -0
- package/dist-server/harness/loop/index.d.ts +5 -0
- package/dist-server/harness/loop/index.js +3 -0
- package/dist-server/harness/native-producer/index.d.ts +109 -0
- package/dist-server/harness/native-producer/index.js +302 -0
- package/dist-server/harness/npm-package-resolve.d.ts +28 -0
- package/dist-server/harness/npm-package-resolve.js +47 -0
- package/dist-server/harness/providers/adapters/anthropic.d.ts +7 -0
- package/dist-server/harness/providers/adapters/anthropic.js +6 -0
- package/dist-server/harness/providers/adapters/mock.d.ts +4 -0
- package/dist-server/harness/providers/adapters/mock.js +5 -0
- package/dist-server/harness/providers/adapters/openai-compatible.d.ts +10 -0
- package/dist-server/harness/providers/adapters/openai-compatible.js +10 -0
- package/dist-server/harness/providers/binding.d.ts +23 -0
- package/dist-server/harness/providers/binding.js +13 -0
- package/dist-server/harness/providers/errors.d.ts +6 -0
- package/dist-server/harness/providers/errors.js +12 -0
- package/dist-server/harness/providers/index.d.ts +18 -0
- package/dist-server/harness/providers/index.js +22 -0
- package/dist-server/harness/providers/registry.d.ts +16 -0
- package/dist-server/harness/providers/registry.js +24 -0
- package/dist-server/harness/render/envelope.d.ts +145 -0
- package/dist-server/harness/render/envelope.js +428 -0
- package/dist-server/harness/render/errors.d.ts +33 -0
- package/dist-server/harness/render/errors.js +46 -0
- package/dist-server/harness/render/index.d.ts +5 -0
- package/dist-server/harness/render/index.js +3 -0
- package/dist-server/harness/render/validate.d.ts +13 -0
- package/dist-server/harness/render/validate.js +88 -0
- package/dist-server/harness/route/adapter-spec.d.ts +40 -0
- package/dist-server/harness/route/adapter-spec.js +61 -0
- package/dist-server/harness/route/agent-sdk-cli.d.ts +30 -0
- package/dist-server/harness/route/agent-sdk-cli.js +86 -0
- package/dist-server/harness/route/agent-sdk-manifest.d.ts +31 -0
- package/dist-server/harness/route/agent-sdk-manifest.js +56 -0
- package/dist-server/harness/route/artifact-content.d.ts +53 -0
- package/dist-server/harness/route/artifact-content.js +83 -0
- package/dist-server/harness/route/chat-event-mapper.d.ts +95 -0
- package/dist-server/harness/route/chat-event-mapper.js +164 -0
- package/dist-server/harness/route/codex-ask-events.d.ts +25 -0
- package/dist-server/harness/route/codex-ask-events.js +395 -0
- package/dist-server/harness/route/codex-ask.d.ts +15 -0
- package/dist-server/harness/route/codex-ask.js +242 -0
- package/dist-server/harness/route/codex-local-cli.d.ts +20 -0
- package/dist-server/harness/route/codex-local-cli.js +78 -0
- package/dist-server/harness/route/codex-local-manifest.d.ts +22 -0
- package/dist-server/harness/route/codex-local-manifest.js +180 -0
- package/dist-server/harness/route/describe.d.ts +54 -0
- package/dist-server/harness/route/describe.js +84 -0
- package/dist-server/harness/route/dispatched.d.ts +138 -0
- package/dist-server/harness/route/dispatched.js +339 -0
- package/dist-server/harness/route/in-process.d.ts +43 -0
- package/dist-server/harness/route/in-process.js +106 -0
- package/dist-server/harness/route/index.d.ts +19 -0
- package/dist-server/harness/route/index.js +12 -0
- package/dist-server/harness/route/profile-source.d.ts +37 -0
- package/dist-server/harness/route/profile-source.js +76 -0
- package/dist-server/harness/route/route.d.ts +33 -0
- package/dist-server/harness/route/route.js +114 -0
- package/dist-server/harness/route/tier-binding.d.ts +36 -0
- package/dist-server/harness/route/tier-binding.js +63 -0
- package/dist-server/harness/route/types.d.ts +286 -0
- package/dist-server/harness/route/types.js +1 -0
- package/dist-server/harness/session/errors.d.ts +4 -0
- package/dist-server/harness/session/errors.js +7 -0
- package/dist-server/harness/session/gate.d.ts +11 -0
- package/dist-server/harness/session/gate.js +13 -0
- package/dist-server/harness/session/index.d.ts +5 -0
- package/dist-server/harness/session/index.js +3 -0
- package/dist-server/harness/session/run.d.ts +60 -0
- package/dist-server/harness/session/run.js +333 -0
- package/dist-server/harness/session/types.d.ts +29 -0
- package/dist-server/harness/session/types.js +1 -0
- package/dist-server/harness/setup/codex-events.d.ts +12 -0
- package/dist-server/harness/setup/codex-events.js +108 -0
- package/dist-server/harness/setup/runner.d.ts +497 -0
- package/dist-server/harness/setup/runner.js +1314 -0
- package/dist-server/harness/tools/errors.d.ts +107 -0
- package/dist-server/harness/tools/errors.js +141 -0
- package/dist-server/harness/tools/index.d.ts +13 -0
- package/dist-server/harness/tools/index.js +8 -0
- package/dist-server/harness/tools/mcp.d.ts +26 -0
- package/dist-server/harness/tools/mcp.js +15 -0
- package/dist-server/harness/tools/native.d.ts +179 -0
- package/dist-server/harness/tools/native.js +322 -0
- package/dist-server/harness/tools/parse.d.ts +14 -0
- package/dist-server/harness/tools/parse.js +18 -0
- package/dist-server/harness/tools/resolve-wren-binary.d.ts +12 -0
- package/dist-server/harness/tools/resolve-wren-binary.js +21 -0
- package/dist-server/harness/tools/resolve.d.ts +51 -0
- package/dist-server/harness/tools/resolve.js +79 -0
- package/dist-server/harness/tools/setup-native.d.ts +84 -0
- package/dist-server/harness/tools/setup-native.js +353 -0
- package/dist-server/harness/tools/wiring.d.ts +10 -0
- package/dist-server/harness/tools/wiring.js +16 -0
- package/dist-server/providers/setup.provider.yaml +31 -0
- package/dist-server/providers/wren.provider.yaml +33 -0
- package/dist-server/server/adopt.d.ts +87 -0
- package/dist-server/server/adopt.js +263 -0
- package/dist-server/server/app.d.ts +6 -0
- package/dist-server/server/app.js +2521 -0
- package/dist-server/server/auth-choice.d.ts +16 -0
- package/dist-server/server/auth-choice.js +36 -0
- package/dist-server/server/bin.d.ts +2 -0
- package/dist-server/server/bin.js +601 -0
- package/dist-server/server/bootstrap-project-binding.d.ts +31 -0
- package/dist-server/server/bootstrap-project-binding.js +71 -0
- package/dist-server/server/clarify.d.ts +10 -0
- package/dist-server/server/clarify.js +17 -0
- package/dist-server/server/codex-setup-mcp.d.ts +2 -0
- package/dist-server/server/codex-setup-mcp.js +147 -0
- package/dist-server/server/compose.d.ts +89 -0
- package/dist-server/server/compose.js +271 -0
- package/dist-server/server/conn-config.d.ts +30 -0
- package/dist-server/server/conn-config.js +253 -0
- package/dist-server/server/context-files.d.ts +12 -0
- package/dist-server/server/context-files.js +117 -0
- package/dist-server/server/context-map.d.ts +30 -0
- package/dist-server/server/context-map.js +95 -0
- package/dist-server/server/context-source.d.ts +68 -0
- package/dist-server/server/context-source.js +85 -0
- package/dist-server/server/db.d.ts +862 -0
- package/dist-server/server/db.js +1839 -0
- package/dist-server/server/enrichment-runner.d.ts +184 -0
- package/dist-server/server/enrichment-runner.js +213 -0
- package/dist-server/server/enrichment-verify.d.ts +73 -0
- package/dist-server/server/enrichment-verify.js +290 -0
- package/dist-server/server/enrichment.d.ts +232 -0
- package/dist-server/server/enrichment.js +199 -0
- package/dist-server/server/env-detect.d.ts +8 -0
- package/dist-server/server/env-detect.js +17 -0
- package/dist-server/server/env-field-hints.d.ts +46 -0
- package/dist-server/server/env-field-hints.js +48 -0
- package/dist-server/server/fold.d.ts +133 -0
- package/dist-server/server/fold.js +407 -0
- package/dist-server/server/harness-profile-sources.d.ts +3 -0
- package/dist-server/server/harness-profile-sources.js +24 -0
- package/dist-server/server/harness.d.ts +19 -0
- package/dist-server/server/harness.js +439 -0
- package/dist-server/server/impact.d.ts +18 -0
- package/dist-server/server/impact.js +85 -0
- package/dist-server/server/interactive-terminal.d.ts +175 -0
- package/dist-server/server/interactive-terminal.js +336 -0
- package/dist-server/server/native-artifacts.d.ts +1004 -0
- package/dist-server/server/native-artifacts.js +564 -0
- package/dist-server/server/native-dispatch-registry.d.ts +42 -0
- package/dist-server/server/native-dispatch-registry.js +45 -0
- package/dist-server/server/native-producer-fence.d.ts +14 -0
- package/dist-server/server/native-producer-fence.js +48 -0
- package/dist-server/server/native-session-resume.d.ts +6 -0
- package/dist-server/server/native-session-resume.js +103 -0
- package/dist-server/server/native-session-workspace.d.ts +40 -0
- package/dist-server/server/native-session-workspace.js +175 -0
- package/dist-server/server/native-sessions.d.ts +374 -0
- package/dist-server/server/native-sessions.js +1517 -0
- package/dist-server/server/native-wren-runtime.d.ts +20 -0
- package/dist-server/server/native-wren-runtime.js +259 -0
- package/dist-server/server/node-pty-host.d.ts +31 -0
- package/dist-server/server/node-pty-host.js +100 -0
- package/dist-server/server/route-intent.d.ts +40 -0
- package/dist-server/server/route-intent.js +23 -0
- package/dist-server/server/runtime-binding.d.ts +52 -0
- package/dist-server/server/runtime-binding.js +258 -0
- package/dist-server/server/source-catalog.d.ts +84 -0
- package/dist-server/server/source-catalog.js +221 -0
- package/dist-server/server/source-driver.d.ts +35 -0
- package/dist-server/server/source-driver.js +124 -0
- package/dist-server/server/spa.d.ts +2 -0
- package/dist-server/server/spa.js +51 -0
- package/dist-server/server/subscription-model-catalog.d.ts +27 -0
- package/dist-server/server/subscription-model-catalog.js +203 -0
- package/dist-server/server/turn.d.ts +249 -0
- package/dist-server/server/turn.js +1074 -0
- package/dist-server/server/wire-types.d.ts +799 -0
- package/dist-server/server/wire-types.js +1 -0
- package/dist-server/server/wren-home.d.ts +19 -0
- package/dist-server/server/wren-home.js +33 -0
- package/dist-server/server/wren-profiles.d.ts +43 -0
- package/dist-server/server/wren-profiles.js +123 -0
- package/package.json +93 -0
- package/profiles/genbi-default/context/binding.yml +9 -0
- package/profiles/genbi-default/ir.golden.json +506 -0
- package/profiles/genbi-default/profile.yml +16 -0
- package/profiles/genbi-enrich-context/components/apply_enrichment/component.yml +42 -0
- package/profiles/genbi-enrich-context/components/draft_enrichment/component.yml +30 -0
- package/profiles/genbi-enrich-context/components/draft_enrichment/steps/draft.md +34 -0
- package/profiles/genbi-enrich-context/components/inspect_context/component.yml +32 -0
- package/profiles/genbi-enrich-context/components/inspect_context/steps/inspect.md +13 -0
- package/profiles/genbi-enrich-context/context/binding.yml +4 -0
- package/profiles/genbi-enrich-context/ir.golden.json +302 -0
- package/profiles/genbi-enrich-context/profile.yml +15 -0
- package/profiles/genbi-monitor/context/binding.yml +7 -0
- package/profiles/genbi-monitor/ir.golden.json +188 -0
- package/profiles/genbi-monitor/profile.yml +27 -0
- package/profiles/genbi-setup/components/build_context/component.yml +44 -0
- package/profiles/genbi-setup/components/build_context/steps/build.md +14 -0
- package/profiles/genbi-setup/components/connect_source/component.yml +51 -0
- package/profiles/genbi-setup/components/connect_source/steps/connect.md +23 -0
- package/profiles/genbi-setup/context/binding.yml +8 -0
- package/profiles/genbi-setup/ir.golden.json +140 -0
- package/profiles/genbi-setup/profile.yml +18 -0
- package/profiles/genbi-setup/raw/schema.json +5 -0
|
@@ -0,0 +1,1004 @@
|
|
|
1
|
+
import { type NativeSessionRow, type NativeStructuredAnswerRow, type Store } from "./db.js";
|
|
2
|
+
import type { EnrichmentBinding } from "./enrichment.js";
|
|
3
|
+
export declare const NATIVE_MCP_CREDENTIAL_ENV_VAR = "WARBLE_MCP_CONNECTION_CREDENTIAL";
|
|
4
|
+
export declare const NATIVE_MCP_TOOL_NAME = "save_dashboard";
|
|
5
|
+
export declare const NATIVE_MCP_PERSIST_ANSWER_TOOL_NAME = "persist_answer";
|
|
6
|
+
export declare const NATIVE_MCP_SERVER_LABEL = "GenBI MCP";
|
|
7
|
+
export declare const NATIVE_MCP_ARTIFACTS_LABEL = "GenBI Artifacts";
|
|
8
|
+
/**
|
|
9
|
+
* Rules that relate sibling fields and therefore cannot be expressed by the
|
|
10
|
+
* JSON Schema vocabulary used by MCP. These descriptions and the executable
|
|
11
|
+
* helpers below form the advertised second validation layer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const NATIVE_SAVE_DASHBOARD_SEMANTIC_CONSTRAINTS: {
|
|
14
|
+
readonly table: {
|
|
15
|
+
readonly positionalRows: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
16
|
+
};
|
|
17
|
+
readonly chart: {
|
|
18
|
+
readonly x: "The x field must not also appear in series.";
|
|
19
|
+
readonly series: "Each series item must differ from x.";
|
|
20
|
+
readonly positionalRows: "Positional scalar rows in [x, ...series] order. Each row must contain exactly one x cell plus one cell per series entry.";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/** The exact public MCP shape advertised to native clients and accepted by the host. */
|
|
24
|
+
export declare const NATIVE_SAVE_DASHBOARD_INPUT_SCHEMA: {
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly additionalProperties: false;
|
|
27
|
+
readonly required: readonly ["version", "name", "idempotency_key"];
|
|
28
|
+
readonly oneOf: readonly [{
|
|
29
|
+
readonly required: readonly ["envelope"];
|
|
30
|
+
readonly not: {
|
|
31
|
+
readonly anyOf: readonly [{
|
|
32
|
+
readonly required: readonly ["answer_ref"];
|
|
33
|
+
}, {
|
|
34
|
+
readonly required: readonly ["answer_selection"];
|
|
35
|
+
}];
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
readonly required: readonly ["answer_ref"];
|
|
39
|
+
readonly not: {
|
|
40
|
+
readonly anyOf: readonly [{
|
|
41
|
+
readonly required: readonly ["envelope"];
|
|
42
|
+
}, {
|
|
43
|
+
readonly required: readonly ["answer_selection"];
|
|
44
|
+
}];
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
readonly required: readonly ["answer_selection"];
|
|
48
|
+
readonly not: {
|
|
49
|
+
readonly anyOf: readonly [{
|
|
50
|
+
readonly required: readonly ["envelope"];
|
|
51
|
+
}, {
|
|
52
|
+
readonly required: readonly ["answer_ref"];
|
|
53
|
+
}];
|
|
54
|
+
};
|
|
55
|
+
}];
|
|
56
|
+
readonly properties: {
|
|
57
|
+
readonly version: {
|
|
58
|
+
readonly anyOf: readonly [{
|
|
59
|
+
readonly const: "1";
|
|
60
|
+
}, {
|
|
61
|
+
readonly const: 1;
|
|
62
|
+
}];
|
|
63
|
+
readonly description: "Use the canonical string literal \"1\". Numeric 1 is accepted for Claude Code compatibility and is canonicalized before persistence.";
|
|
64
|
+
};
|
|
65
|
+
readonly name: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
readonly not: {
|
|
68
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
69
|
+
};
|
|
70
|
+
readonly minLength: 1;
|
|
71
|
+
readonly maxLength: 120;
|
|
72
|
+
readonly pattern: "\\S";
|
|
73
|
+
};
|
|
74
|
+
readonly idempotency_key: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
readonly not: {
|
|
77
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
78
|
+
};
|
|
79
|
+
readonly minLength: 8;
|
|
80
|
+
readonly maxLength: 128;
|
|
81
|
+
readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]+$";
|
|
82
|
+
};
|
|
83
|
+
readonly answer_ref: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
readonly not: {
|
|
86
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
87
|
+
};
|
|
88
|
+
readonly pattern: "^answer-[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
89
|
+
readonly description: "Opaque reference returned by persist_answer for this native session.";
|
|
90
|
+
};
|
|
91
|
+
readonly answer_selection: {
|
|
92
|
+
readonly const: "latest";
|
|
93
|
+
readonly description: "Resolve the newest verified answer retained by this native session when its opaque answer_ref is no longer available in the conversation.";
|
|
94
|
+
};
|
|
95
|
+
readonly envelope: {
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly additionalProperties: false;
|
|
98
|
+
readonly required: readonly ["blocks", "verified"];
|
|
99
|
+
readonly properties: {
|
|
100
|
+
readonly verified: {
|
|
101
|
+
readonly const: true;
|
|
102
|
+
};
|
|
103
|
+
readonly summary: {
|
|
104
|
+
readonly anyOf: readonly [{
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly not: {
|
|
107
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
108
|
+
};
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "null";
|
|
111
|
+
}];
|
|
112
|
+
};
|
|
113
|
+
readonly estimate: {
|
|
114
|
+
readonly type: readonly ["boolean", "null"];
|
|
115
|
+
};
|
|
116
|
+
readonly blocks: {
|
|
117
|
+
readonly type: "array";
|
|
118
|
+
readonly minItems: 1;
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly oneOf: readonly [{
|
|
121
|
+
readonly type: "object";
|
|
122
|
+
readonly additionalProperties: false;
|
|
123
|
+
readonly required: readonly ["type", "label", "value"];
|
|
124
|
+
readonly properties: {
|
|
125
|
+
readonly type: {
|
|
126
|
+
readonly const: "kpi_card";
|
|
127
|
+
};
|
|
128
|
+
readonly label: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly not: {
|
|
131
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly value: {
|
|
135
|
+
readonly anyOf: readonly [{
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
readonly not: {
|
|
138
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
139
|
+
};
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "number";
|
|
142
|
+
}];
|
|
143
|
+
};
|
|
144
|
+
readonly unit: {
|
|
145
|
+
readonly anyOf: readonly [{
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly not: {
|
|
148
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
149
|
+
};
|
|
150
|
+
}, {
|
|
151
|
+
readonly type: "null";
|
|
152
|
+
}];
|
|
153
|
+
};
|
|
154
|
+
readonly delta: {
|
|
155
|
+
readonly type: readonly ["number", "null"];
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "object";
|
|
160
|
+
readonly additionalProperties: false;
|
|
161
|
+
readonly required: readonly ["type", "columns", "rows"];
|
|
162
|
+
readonly properties: {
|
|
163
|
+
readonly type: {
|
|
164
|
+
readonly const: "table";
|
|
165
|
+
};
|
|
166
|
+
readonly columns: {
|
|
167
|
+
readonly type: "array";
|
|
168
|
+
readonly minItems: 1;
|
|
169
|
+
readonly uniqueItems: true;
|
|
170
|
+
readonly items: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly not: {
|
|
173
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
174
|
+
};
|
|
175
|
+
readonly minLength: 1;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
readonly rows: {
|
|
179
|
+
readonly type: "array";
|
|
180
|
+
readonly items: {
|
|
181
|
+
readonly type: "array";
|
|
182
|
+
readonly items: {
|
|
183
|
+
readonly anyOf: readonly [{
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly not: {
|
|
186
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
187
|
+
};
|
|
188
|
+
}, {
|
|
189
|
+
readonly type: "number";
|
|
190
|
+
}, {
|
|
191
|
+
readonly type: "boolean";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "null";
|
|
194
|
+
}];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
readonly description: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
}, {
|
|
201
|
+
readonly type: "object";
|
|
202
|
+
readonly additionalProperties: false;
|
|
203
|
+
readonly required: readonly ["type", "chart_type", "x", "series", "rows"];
|
|
204
|
+
readonly properties: {
|
|
205
|
+
readonly type: {
|
|
206
|
+
readonly const: "chart";
|
|
207
|
+
};
|
|
208
|
+
readonly chart_type: {
|
|
209
|
+
readonly enum: readonly ["bar", "line", "pie", "area", "scatter"];
|
|
210
|
+
};
|
|
211
|
+
readonly x: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly not: {
|
|
214
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
215
|
+
};
|
|
216
|
+
readonly minLength: 1;
|
|
217
|
+
readonly description: "The x field must not also appear in series.";
|
|
218
|
+
};
|
|
219
|
+
readonly series: {
|
|
220
|
+
readonly type: "array";
|
|
221
|
+
readonly minItems: 1;
|
|
222
|
+
readonly uniqueItems: true;
|
|
223
|
+
readonly description: "Each series item must differ from x.";
|
|
224
|
+
readonly items: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
readonly not: {
|
|
227
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
228
|
+
};
|
|
229
|
+
readonly minLength: 1;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly rows: {
|
|
233
|
+
readonly type: "array";
|
|
234
|
+
readonly items: {
|
|
235
|
+
readonly type: "array";
|
|
236
|
+
readonly items: {
|
|
237
|
+
readonly anyOf: readonly [{
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly not: {
|
|
240
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
241
|
+
};
|
|
242
|
+
}, {
|
|
243
|
+
readonly type: "number";
|
|
244
|
+
}, {
|
|
245
|
+
readonly type: "boolean";
|
|
246
|
+
}, {
|
|
247
|
+
readonly type: "null";
|
|
248
|
+
}];
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly description: "Positional scalar rows in [x, ...series] order. Each row must contain exactly one x cell plus one cell per series entry.";
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}, {
|
|
255
|
+
readonly type: "object";
|
|
256
|
+
readonly additionalProperties: false;
|
|
257
|
+
readonly required: readonly ["type", "sql", "source_tables", "filters"];
|
|
258
|
+
readonly properties: {
|
|
259
|
+
readonly type: {
|
|
260
|
+
readonly const: "definition";
|
|
261
|
+
};
|
|
262
|
+
readonly sql: {
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly not: {
|
|
265
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
266
|
+
};
|
|
267
|
+
readonly minLength: 1;
|
|
268
|
+
};
|
|
269
|
+
readonly source_tables: {
|
|
270
|
+
readonly type: "array";
|
|
271
|
+
readonly minItems: 1;
|
|
272
|
+
readonly items: {
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
readonly not: {
|
|
275
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
276
|
+
};
|
|
277
|
+
readonly minLength: 1;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
readonly filters: {
|
|
281
|
+
readonly type: "array";
|
|
282
|
+
readonly items: {
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
readonly not: {
|
|
285
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
}, {
|
|
291
|
+
readonly type: "object";
|
|
292
|
+
readonly additionalProperties: false;
|
|
293
|
+
readonly required: readonly ["type", "text"];
|
|
294
|
+
readonly properties: {
|
|
295
|
+
readonly type: {
|
|
296
|
+
readonly const: "narrative";
|
|
297
|
+
};
|
|
298
|
+
readonly text: {
|
|
299
|
+
readonly type: "string";
|
|
300
|
+
readonly not: {
|
|
301
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
302
|
+
};
|
|
303
|
+
readonly minLength: 1;
|
|
304
|
+
};
|
|
305
|
+
readonly title: {
|
|
306
|
+
readonly anyOf: readonly [{
|
|
307
|
+
readonly type: "string";
|
|
308
|
+
readonly not: {
|
|
309
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
310
|
+
};
|
|
311
|
+
}, {
|
|
312
|
+
readonly type: "null";
|
|
313
|
+
}];
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
}];
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* The producer persists only the existing answer_query result blocks. The
|
|
325
|
+
* semantic validator below requires exactly one table and allows at most one
|
|
326
|
+
* definition block. It rejects summary/chart/raw/transcript-shaped additions.
|
|
327
|
+
*/
|
|
328
|
+
export declare const NATIVE_PERSIST_ANSWER_INPUT_SCHEMA: {
|
|
329
|
+
readonly type: "object";
|
|
330
|
+
readonly additionalProperties: false;
|
|
331
|
+
readonly required: readonly ["version", "idempotency_key", "envelope"];
|
|
332
|
+
readonly properties: {
|
|
333
|
+
readonly version: {
|
|
334
|
+
readonly const: "1";
|
|
335
|
+
};
|
|
336
|
+
readonly idempotency_key: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly not: {
|
|
339
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
340
|
+
};
|
|
341
|
+
readonly minLength: 8;
|
|
342
|
+
readonly maxLength: 128;
|
|
343
|
+
readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]+$";
|
|
344
|
+
readonly description: "Caller retry key only; the host mints canonical answer provenance.";
|
|
345
|
+
};
|
|
346
|
+
readonly envelope: {
|
|
347
|
+
readonly type: "object";
|
|
348
|
+
readonly additionalProperties: false;
|
|
349
|
+
readonly required: readonly ["blocks", "verified"];
|
|
350
|
+
readonly properties: {
|
|
351
|
+
readonly verified: {
|
|
352
|
+
readonly const: true;
|
|
353
|
+
};
|
|
354
|
+
readonly blocks: {
|
|
355
|
+
readonly type: "array";
|
|
356
|
+
readonly minItems: 1;
|
|
357
|
+
readonly maxItems: 2;
|
|
358
|
+
readonly items: {
|
|
359
|
+
readonly oneOf: readonly [{
|
|
360
|
+
readonly type: "object";
|
|
361
|
+
readonly additionalProperties: false;
|
|
362
|
+
readonly required: readonly ["type", "columns", "rows"];
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly type: {
|
|
365
|
+
readonly const: "table";
|
|
366
|
+
};
|
|
367
|
+
readonly columns: {
|
|
368
|
+
readonly type: "array";
|
|
369
|
+
readonly minItems: 1;
|
|
370
|
+
readonly uniqueItems: true;
|
|
371
|
+
readonly items: {
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
readonly not: {
|
|
374
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
375
|
+
};
|
|
376
|
+
readonly minLength: 1;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
readonly rows: {
|
|
380
|
+
readonly type: "array";
|
|
381
|
+
readonly items: {
|
|
382
|
+
readonly type: "array";
|
|
383
|
+
readonly items: {
|
|
384
|
+
readonly anyOf: readonly [{
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
readonly not: {
|
|
387
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
388
|
+
};
|
|
389
|
+
}, {
|
|
390
|
+
readonly type: "number";
|
|
391
|
+
}, {
|
|
392
|
+
readonly type: "boolean";
|
|
393
|
+
}, {
|
|
394
|
+
readonly type: "null";
|
|
395
|
+
}];
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
readonly description: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
}, {
|
|
402
|
+
readonly type: "object";
|
|
403
|
+
readonly additionalProperties: false;
|
|
404
|
+
readonly required: readonly ["type", "sql", "source_tables", "filters"];
|
|
405
|
+
readonly properties: {
|
|
406
|
+
readonly type: {
|
|
407
|
+
readonly const: "definition";
|
|
408
|
+
};
|
|
409
|
+
readonly sql: {
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly not: {
|
|
412
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
413
|
+
};
|
|
414
|
+
readonly minLength: 1;
|
|
415
|
+
};
|
|
416
|
+
readonly source_tables: {
|
|
417
|
+
readonly type: "array";
|
|
418
|
+
readonly minItems: 1;
|
|
419
|
+
readonly items: {
|
|
420
|
+
readonly type: "string";
|
|
421
|
+
readonly not: {
|
|
422
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
423
|
+
};
|
|
424
|
+
readonly minLength: 1;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
readonly filters: {
|
|
428
|
+
readonly type: "array";
|
|
429
|
+
readonly items: {
|
|
430
|
+
readonly type: "string";
|
|
431
|
+
readonly not: {
|
|
432
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
}];
|
|
438
|
+
};
|
|
439
|
+
readonly allOf: readonly [{
|
|
440
|
+
readonly contains: {
|
|
441
|
+
readonly type: "object";
|
|
442
|
+
readonly properties: {
|
|
443
|
+
readonly type: {
|
|
444
|
+
readonly const: "table";
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
readonly required: readonly ["type"];
|
|
448
|
+
};
|
|
449
|
+
}];
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
export interface NativeMcpDescriptor {
|
|
456
|
+
readonly version: "1";
|
|
457
|
+
readonly url: string;
|
|
458
|
+
readonly credential: string;
|
|
459
|
+
}
|
|
460
|
+
export interface NativeMcpReadiness {
|
|
461
|
+
readonly available: boolean;
|
|
462
|
+
readonly reason?: string;
|
|
463
|
+
}
|
|
464
|
+
/** Browser-safe health projection; credentials and binding details stay server-side. */
|
|
465
|
+
export interface NativeMcpHealth extends NativeMcpReadiness {
|
|
466
|
+
readonly server: typeof NATIVE_MCP_SERVER_LABEL;
|
|
467
|
+
readonly tool: typeof NATIVE_MCP_TOOL_NAME;
|
|
468
|
+
readonly destination: typeof NATIVE_MCP_ARTIFACTS_LABEL;
|
|
469
|
+
}
|
|
470
|
+
export interface SaveDashboardPayloadInput {
|
|
471
|
+
readonly version: "1";
|
|
472
|
+
readonly name: string;
|
|
473
|
+
readonly envelope: unknown;
|
|
474
|
+
readonly idempotency_key: string;
|
|
475
|
+
}
|
|
476
|
+
export interface SaveDashboardReferenceInput {
|
|
477
|
+
readonly version: "1";
|
|
478
|
+
readonly name: string;
|
|
479
|
+
readonly answer_ref: string;
|
|
480
|
+
readonly idempotency_key: string;
|
|
481
|
+
}
|
|
482
|
+
export interface SaveDashboardLatestInput {
|
|
483
|
+
readonly version: "1";
|
|
484
|
+
readonly name: string;
|
|
485
|
+
readonly answer_selection: "latest";
|
|
486
|
+
readonly idempotency_key: string;
|
|
487
|
+
}
|
|
488
|
+
export type SaveDashboardInput = SaveDashboardPayloadInput | SaveDashboardReferenceInput | SaveDashboardLatestInput;
|
|
489
|
+
export interface PersistStructuredAnswerInput {
|
|
490
|
+
readonly version: "1";
|
|
491
|
+
readonly idempotency_key: string;
|
|
492
|
+
readonly envelope: unknown;
|
|
493
|
+
}
|
|
494
|
+
export interface PersistedStructuredAnswer {
|
|
495
|
+
readonly answer_ref: string;
|
|
496
|
+
readonly digest: string;
|
|
497
|
+
readonly persisted_at: string;
|
|
498
|
+
}
|
|
499
|
+
export interface SavedNativeArtifact {
|
|
500
|
+
readonly artifact_id: string;
|
|
501
|
+
readonly saved_at: string;
|
|
502
|
+
readonly source_href: string;
|
|
503
|
+
}
|
|
504
|
+
export declare class NativeArtifactError extends Error {
|
|
505
|
+
readonly status: number;
|
|
506
|
+
constructor(message: string, status?: number);
|
|
507
|
+
}
|
|
508
|
+
/** Shared executable counterpart of the advertised positional-row rules. */
|
|
509
|
+
export declare function hasExactNativePositionalRow(row: unknown, expectedLength: number): boolean;
|
|
510
|
+
/** Shared executable counterpart of the advertised chart x/series rule. */
|
|
511
|
+
export declare function hasDistinctNativeChartSeries(x: unknown, series: unknown): series is string[];
|
|
512
|
+
/** The complete MCP contract: mechanically checked schema plus semantic rules. */
|
|
513
|
+
export declare const NATIVE_SAVE_DASHBOARD_CONTRACT: {
|
|
514
|
+
readonly inputSchema: {
|
|
515
|
+
readonly type: "object";
|
|
516
|
+
readonly additionalProperties: false;
|
|
517
|
+
readonly required: readonly ["version", "name", "idempotency_key"];
|
|
518
|
+
readonly oneOf: readonly [{
|
|
519
|
+
readonly required: readonly ["envelope"];
|
|
520
|
+
readonly not: {
|
|
521
|
+
readonly anyOf: readonly [{
|
|
522
|
+
readonly required: readonly ["answer_ref"];
|
|
523
|
+
}, {
|
|
524
|
+
readonly required: readonly ["answer_selection"];
|
|
525
|
+
}];
|
|
526
|
+
};
|
|
527
|
+
}, {
|
|
528
|
+
readonly required: readonly ["answer_ref"];
|
|
529
|
+
readonly not: {
|
|
530
|
+
readonly anyOf: readonly [{
|
|
531
|
+
readonly required: readonly ["envelope"];
|
|
532
|
+
}, {
|
|
533
|
+
readonly required: readonly ["answer_selection"];
|
|
534
|
+
}];
|
|
535
|
+
};
|
|
536
|
+
}, {
|
|
537
|
+
readonly required: readonly ["answer_selection"];
|
|
538
|
+
readonly not: {
|
|
539
|
+
readonly anyOf: readonly [{
|
|
540
|
+
readonly required: readonly ["envelope"];
|
|
541
|
+
}, {
|
|
542
|
+
readonly required: readonly ["answer_ref"];
|
|
543
|
+
}];
|
|
544
|
+
};
|
|
545
|
+
}];
|
|
546
|
+
readonly properties: {
|
|
547
|
+
readonly version: {
|
|
548
|
+
readonly anyOf: readonly [{
|
|
549
|
+
readonly const: "1";
|
|
550
|
+
}, {
|
|
551
|
+
readonly const: 1;
|
|
552
|
+
}];
|
|
553
|
+
readonly description: "Use the canonical string literal \"1\". Numeric 1 is accepted for Claude Code compatibility and is canonicalized before persistence.";
|
|
554
|
+
};
|
|
555
|
+
readonly name: {
|
|
556
|
+
readonly type: "string";
|
|
557
|
+
readonly not: {
|
|
558
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
559
|
+
};
|
|
560
|
+
readonly minLength: 1;
|
|
561
|
+
readonly maxLength: 120;
|
|
562
|
+
readonly pattern: "\\S";
|
|
563
|
+
};
|
|
564
|
+
readonly idempotency_key: {
|
|
565
|
+
readonly type: "string";
|
|
566
|
+
readonly not: {
|
|
567
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
568
|
+
};
|
|
569
|
+
readonly minLength: 8;
|
|
570
|
+
readonly maxLength: 128;
|
|
571
|
+
readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]+$";
|
|
572
|
+
};
|
|
573
|
+
readonly answer_ref: {
|
|
574
|
+
readonly type: "string";
|
|
575
|
+
readonly not: {
|
|
576
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
577
|
+
};
|
|
578
|
+
readonly pattern: "^answer-[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
579
|
+
readonly description: "Opaque reference returned by persist_answer for this native session.";
|
|
580
|
+
};
|
|
581
|
+
readonly answer_selection: {
|
|
582
|
+
readonly const: "latest";
|
|
583
|
+
readonly description: "Resolve the newest verified answer retained by this native session when its opaque answer_ref is no longer available in the conversation.";
|
|
584
|
+
};
|
|
585
|
+
readonly envelope: {
|
|
586
|
+
readonly type: "object";
|
|
587
|
+
readonly additionalProperties: false;
|
|
588
|
+
readonly required: readonly ["blocks", "verified"];
|
|
589
|
+
readonly properties: {
|
|
590
|
+
readonly verified: {
|
|
591
|
+
readonly const: true;
|
|
592
|
+
};
|
|
593
|
+
readonly summary: {
|
|
594
|
+
readonly anyOf: readonly [{
|
|
595
|
+
readonly type: "string";
|
|
596
|
+
readonly not: {
|
|
597
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
598
|
+
};
|
|
599
|
+
}, {
|
|
600
|
+
readonly type: "null";
|
|
601
|
+
}];
|
|
602
|
+
};
|
|
603
|
+
readonly estimate: {
|
|
604
|
+
readonly type: readonly ["boolean", "null"];
|
|
605
|
+
};
|
|
606
|
+
readonly blocks: {
|
|
607
|
+
readonly type: "array";
|
|
608
|
+
readonly minItems: 1;
|
|
609
|
+
readonly items: {
|
|
610
|
+
readonly oneOf: readonly [{
|
|
611
|
+
readonly type: "object";
|
|
612
|
+
readonly additionalProperties: false;
|
|
613
|
+
readonly required: readonly ["type", "label", "value"];
|
|
614
|
+
readonly properties: {
|
|
615
|
+
readonly type: {
|
|
616
|
+
readonly const: "kpi_card";
|
|
617
|
+
};
|
|
618
|
+
readonly label: {
|
|
619
|
+
readonly type: "string";
|
|
620
|
+
readonly not: {
|
|
621
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
readonly value: {
|
|
625
|
+
readonly anyOf: readonly [{
|
|
626
|
+
readonly type: "string";
|
|
627
|
+
readonly not: {
|
|
628
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
629
|
+
};
|
|
630
|
+
}, {
|
|
631
|
+
readonly type: "number";
|
|
632
|
+
}];
|
|
633
|
+
};
|
|
634
|
+
readonly unit: {
|
|
635
|
+
readonly anyOf: readonly [{
|
|
636
|
+
readonly type: "string";
|
|
637
|
+
readonly not: {
|
|
638
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
639
|
+
};
|
|
640
|
+
}, {
|
|
641
|
+
readonly type: "null";
|
|
642
|
+
}];
|
|
643
|
+
};
|
|
644
|
+
readonly delta: {
|
|
645
|
+
readonly type: readonly ["number", "null"];
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
}, {
|
|
649
|
+
readonly type: "object";
|
|
650
|
+
readonly additionalProperties: false;
|
|
651
|
+
readonly required: readonly ["type", "columns", "rows"];
|
|
652
|
+
readonly properties: {
|
|
653
|
+
readonly type: {
|
|
654
|
+
readonly const: "table";
|
|
655
|
+
};
|
|
656
|
+
readonly columns: {
|
|
657
|
+
readonly type: "array";
|
|
658
|
+
readonly minItems: 1;
|
|
659
|
+
readonly uniqueItems: true;
|
|
660
|
+
readonly items: {
|
|
661
|
+
readonly type: "string";
|
|
662
|
+
readonly not: {
|
|
663
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
664
|
+
};
|
|
665
|
+
readonly minLength: 1;
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
readonly rows: {
|
|
669
|
+
readonly type: "array";
|
|
670
|
+
readonly items: {
|
|
671
|
+
readonly type: "array";
|
|
672
|
+
readonly items: {
|
|
673
|
+
readonly anyOf: readonly [{
|
|
674
|
+
readonly type: "string";
|
|
675
|
+
readonly not: {
|
|
676
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
677
|
+
};
|
|
678
|
+
}, {
|
|
679
|
+
readonly type: "number";
|
|
680
|
+
}, {
|
|
681
|
+
readonly type: "boolean";
|
|
682
|
+
}, {
|
|
683
|
+
readonly type: "null";
|
|
684
|
+
}];
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
readonly description: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
}, {
|
|
691
|
+
readonly type: "object";
|
|
692
|
+
readonly additionalProperties: false;
|
|
693
|
+
readonly required: readonly ["type", "chart_type", "x", "series", "rows"];
|
|
694
|
+
readonly properties: {
|
|
695
|
+
readonly type: {
|
|
696
|
+
readonly const: "chart";
|
|
697
|
+
};
|
|
698
|
+
readonly chart_type: {
|
|
699
|
+
readonly enum: readonly ["bar", "line", "pie", "area", "scatter"];
|
|
700
|
+
};
|
|
701
|
+
readonly x: {
|
|
702
|
+
readonly type: "string";
|
|
703
|
+
readonly not: {
|
|
704
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
705
|
+
};
|
|
706
|
+
readonly minLength: 1;
|
|
707
|
+
readonly description: "The x field must not also appear in series.";
|
|
708
|
+
};
|
|
709
|
+
readonly series: {
|
|
710
|
+
readonly type: "array";
|
|
711
|
+
readonly minItems: 1;
|
|
712
|
+
readonly uniqueItems: true;
|
|
713
|
+
readonly description: "Each series item must differ from x.";
|
|
714
|
+
readonly items: {
|
|
715
|
+
readonly type: "string";
|
|
716
|
+
readonly not: {
|
|
717
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
718
|
+
};
|
|
719
|
+
readonly minLength: 1;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
readonly rows: {
|
|
723
|
+
readonly type: "array";
|
|
724
|
+
readonly items: {
|
|
725
|
+
readonly type: "array";
|
|
726
|
+
readonly items: {
|
|
727
|
+
readonly anyOf: readonly [{
|
|
728
|
+
readonly type: "string";
|
|
729
|
+
readonly not: {
|
|
730
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
731
|
+
};
|
|
732
|
+
}, {
|
|
733
|
+
readonly type: "number";
|
|
734
|
+
}, {
|
|
735
|
+
readonly type: "boolean";
|
|
736
|
+
}, {
|
|
737
|
+
readonly type: "null";
|
|
738
|
+
}];
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
readonly description: "Positional scalar rows in [x, ...series] order. Each row must contain exactly one x cell plus one cell per series entry.";
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
}, {
|
|
745
|
+
readonly type: "object";
|
|
746
|
+
readonly additionalProperties: false;
|
|
747
|
+
readonly required: readonly ["type", "sql", "source_tables", "filters"];
|
|
748
|
+
readonly properties: {
|
|
749
|
+
readonly type: {
|
|
750
|
+
readonly const: "definition";
|
|
751
|
+
};
|
|
752
|
+
readonly sql: {
|
|
753
|
+
readonly type: "string";
|
|
754
|
+
readonly not: {
|
|
755
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
756
|
+
};
|
|
757
|
+
readonly minLength: 1;
|
|
758
|
+
};
|
|
759
|
+
readonly source_tables: {
|
|
760
|
+
readonly type: "array";
|
|
761
|
+
readonly minItems: 1;
|
|
762
|
+
readonly items: {
|
|
763
|
+
readonly type: "string";
|
|
764
|
+
readonly not: {
|
|
765
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
766
|
+
};
|
|
767
|
+
readonly minLength: 1;
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
readonly filters: {
|
|
771
|
+
readonly type: "array";
|
|
772
|
+
readonly items: {
|
|
773
|
+
readonly type: "string";
|
|
774
|
+
readonly not: {
|
|
775
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
}, {
|
|
781
|
+
readonly type: "object";
|
|
782
|
+
readonly additionalProperties: false;
|
|
783
|
+
readonly required: readonly ["type", "text"];
|
|
784
|
+
readonly properties: {
|
|
785
|
+
readonly type: {
|
|
786
|
+
readonly const: "narrative";
|
|
787
|
+
};
|
|
788
|
+
readonly text: {
|
|
789
|
+
readonly type: "string";
|
|
790
|
+
readonly not: {
|
|
791
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
792
|
+
};
|
|
793
|
+
readonly minLength: 1;
|
|
794
|
+
};
|
|
795
|
+
readonly title: {
|
|
796
|
+
readonly anyOf: readonly [{
|
|
797
|
+
readonly type: "string";
|
|
798
|
+
readonly not: {
|
|
799
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
800
|
+
};
|
|
801
|
+
}, {
|
|
802
|
+
readonly type: "null";
|
|
803
|
+
}];
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
}];
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
readonly semanticConstraints: {
|
|
814
|
+
readonly table: {
|
|
815
|
+
readonly positionalRows: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
816
|
+
};
|
|
817
|
+
readonly chart: {
|
|
818
|
+
readonly x: "The x field must not also appear in series.";
|
|
819
|
+
readonly series: "Each series item must differ from x.";
|
|
820
|
+
readonly positionalRows: "Positional scalar rows in [x, ...series] order. Each row must contain exactly one x cell plus one cell per series entry.";
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
readonly hasExactPositionalRow: typeof hasExactNativePositionalRow;
|
|
824
|
+
readonly hasDistinctChartSeries: typeof hasDistinctNativeChartSeries;
|
|
825
|
+
};
|
|
826
|
+
export declare const NATIVE_PERSIST_ANSWER_CONTRACT: {
|
|
827
|
+
readonly inputSchema: {
|
|
828
|
+
readonly type: "object";
|
|
829
|
+
readonly additionalProperties: false;
|
|
830
|
+
readonly required: readonly ["version", "idempotency_key", "envelope"];
|
|
831
|
+
readonly properties: {
|
|
832
|
+
readonly version: {
|
|
833
|
+
readonly const: "1";
|
|
834
|
+
};
|
|
835
|
+
readonly idempotency_key: {
|
|
836
|
+
readonly type: "string";
|
|
837
|
+
readonly not: {
|
|
838
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
839
|
+
};
|
|
840
|
+
readonly minLength: 8;
|
|
841
|
+
readonly maxLength: 128;
|
|
842
|
+
readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]+$";
|
|
843
|
+
readonly description: "Caller retry key only; the host mints canonical answer provenance.";
|
|
844
|
+
};
|
|
845
|
+
readonly envelope: {
|
|
846
|
+
readonly type: "object";
|
|
847
|
+
readonly additionalProperties: false;
|
|
848
|
+
readonly required: readonly ["blocks", "verified"];
|
|
849
|
+
readonly properties: {
|
|
850
|
+
readonly verified: {
|
|
851
|
+
readonly const: true;
|
|
852
|
+
};
|
|
853
|
+
readonly blocks: {
|
|
854
|
+
readonly type: "array";
|
|
855
|
+
readonly minItems: 1;
|
|
856
|
+
readonly maxItems: 2;
|
|
857
|
+
readonly items: {
|
|
858
|
+
readonly oneOf: readonly [{
|
|
859
|
+
readonly type: "object";
|
|
860
|
+
readonly additionalProperties: false;
|
|
861
|
+
readonly required: readonly ["type", "columns", "rows"];
|
|
862
|
+
readonly properties: {
|
|
863
|
+
readonly type: {
|
|
864
|
+
readonly const: "table";
|
|
865
|
+
};
|
|
866
|
+
readonly columns: {
|
|
867
|
+
readonly type: "array";
|
|
868
|
+
readonly minItems: 1;
|
|
869
|
+
readonly uniqueItems: true;
|
|
870
|
+
readonly items: {
|
|
871
|
+
readonly type: "string";
|
|
872
|
+
readonly not: {
|
|
873
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
874
|
+
};
|
|
875
|
+
readonly minLength: 1;
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
readonly rows: {
|
|
879
|
+
readonly type: "array";
|
|
880
|
+
readonly items: {
|
|
881
|
+
readonly type: "array";
|
|
882
|
+
readonly items: {
|
|
883
|
+
readonly anyOf: readonly [{
|
|
884
|
+
readonly type: "string";
|
|
885
|
+
readonly not: {
|
|
886
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
887
|
+
};
|
|
888
|
+
}, {
|
|
889
|
+
readonly type: "number";
|
|
890
|
+
}, {
|
|
891
|
+
readonly type: "boolean";
|
|
892
|
+
}, {
|
|
893
|
+
readonly type: "null";
|
|
894
|
+
}];
|
|
895
|
+
};
|
|
896
|
+
};
|
|
897
|
+
readonly description: "Positional scalar rows in columns order. Each row must contain exactly one cell per columns entry.";
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
}, {
|
|
901
|
+
readonly type: "object";
|
|
902
|
+
readonly additionalProperties: false;
|
|
903
|
+
readonly required: readonly ["type", "sql", "source_tables", "filters"];
|
|
904
|
+
readonly properties: {
|
|
905
|
+
readonly type: {
|
|
906
|
+
readonly const: "definition";
|
|
907
|
+
};
|
|
908
|
+
readonly sql: {
|
|
909
|
+
readonly type: "string";
|
|
910
|
+
readonly not: {
|
|
911
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
912
|
+
};
|
|
913
|
+
readonly minLength: 1;
|
|
914
|
+
};
|
|
915
|
+
readonly source_tables: {
|
|
916
|
+
readonly type: "array";
|
|
917
|
+
readonly minItems: 1;
|
|
918
|
+
readonly items: {
|
|
919
|
+
readonly type: "string";
|
|
920
|
+
readonly not: {
|
|
921
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
922
|
+
};
|
|
923
|
+
readonly minLength: 1;
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
readonly filters: {
|
|
927
|
+
readonly type: "array";
|
|
928
|
+
readonly items: {
|
|
929
|
+
readonly type: "string";
|
|
930
|
+
readonly not: {
|
|
931
|
+
readonly pattern: "<\\s*\\/?(?:[sS][cC][rR][iI][pP][tT]|[hH][tT][mM][lL])\\b|[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]\\s*:";
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
}];
|
|
937
|
+
};
|
|
938
|
+
readonly allOf: readonly [{
|
|
939
|
+
readonly contains: {
|
|
940
|
+
readonly type: "object";
|
|
941
|
+
readonly properties: {
|
|
942
|
+
readonly type: {
|
|
943
|
+
readonly const: "table";
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
readonly required: readonly ["type"];
|
|
947
|
+
};
|
|
948
|
+
}];
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
readonly semanticConstraint: "The envelope contains exactly one typed table block and at most one typed definition block, with no presentation-only fields.";
|
|
955
|
+
};
|
|
956
|
+
export interface NativeArtifactServiceOptions {
|
|
957
|
+
readonly store: Store;
|
|
958
|
+
readonly artifactsRoot: string;
|
|
959
|
+
/** Canonical local BFF endpoint derived from its actual listener port. */
|
|
960
|
+
readonly expectedMcpUrl: string;
|
|
961
|
+
/** Optional override, accepted only when it is the expected local endpoint. */
|
|
962
|
+
readonly mcpUrl: string;
|
|
963
|
+
readonly getBinding: () => EnrichmentBinding | undefined;
|
|
964
|
+
/** Test-only seam; production writes one contained JSON file atomically. */
|
|
965
|
+
readonly writeAtomic?: (target: string, contents: string) => void;
|
|
966
|
+
/** Test-only seam for a persistence outage; production uses the typed Store method. */
|
|
967
|
+
readonly persistStructuredAnswer?: (input: {
|
|
968
|
+
readonly id: string;
|
|
969
|
+
readonly nativeSessionId: string;
|
|
970
|
+
readonly idempotencyKey: string;
|
|
971
|
+
readonly envelopeJson: string;
|
|
972
|
+
readonly digest: string;
|
|
973
|
+
}) => {
|
|
974
|
+
readonly row: NativeStructuredAnswerRow;
|
|
975
|
+
readonly created: boolean;
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
export declare class NativeArtifactService {
|
|
979
|
+
private readonly options;
|
|
980
|
+
private readonly credentials;
|
|
981
|
+
constructor(options: NativeArtifactServiceOptions);
|
|
982
|
+
/** Validate the exact local BFF endpoint before advertising or issuing it. */
|
|
983
|
+
readiness(): NativeMcpReadiness;
|
|
984
|
+
issue(session: NativeSessionRow, binding: EnrichmentBinding | undefined): NativeMcpDescriptor;
|
|
985
|
+
revoke(credential: string | undefined): void;
|
|
986
|
+
/** Releases opaque credentials when the owning BFF service shuts down. */
|
|
987
|
+
dispose(): void;
|
|
988
|
+
hasCredential(credential: string | undefined): boolean;
|
|
989
|
+
health(): NativeMcpHealth;
|
|
990
|
+
/**
|
|
991
|
+
* Resolves the live session behind an opaque MCP credential without exposing
|
|
992
|
+
* its secret or binding. The generic MCP route uses this before purpose/tool
|
|
993
|
+
* allowlisting; artifact persistence applies its stricter bound-project
|
|
994
|
+
* fence below.
|
|
995
|
+
*/
|
|
996
|
+
authorize(credential: string | undefined): NativeSessionRow;
|
|
997
|
+
/**
|
|
998
|
+
* Retains the exact typed answer before conversational presentation. This
|
|
999
|
+
* contract is intentionally independent of dashboard naming/save intent so
|
|
1000
|
+
* a later follow-up can only reference this stored result, never recompute.
|
|
1001
|
+
*/
|
|
1002
|
+
persistAnswer(credential: string | undefined, input: unknown): PersistedStructuredAnswer;
|
|
1003
|
+
save(credential: string | undefined, input: unknown): SavedNativeArtifact;
|
|
1004
|
+
}
|