scoutline 0.1.0 → 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.
Files changed (206) hide show
  1. package/README.md +170 -5
  2. package/bin/scoutline.js +36 -15
  3. package/dist/capabilities/diagnostics.d.ts +97 -0
  4. package/dist/capabilities/diagnostics.d.ts.map +1 -0
  5. package/dist/capabilities/diagnostics.js +88 -0
  6. package/dist/capabilities/diagnostics.js.map +1 -0
  7. package/dist/capabilities/quota.d.ts +99 -0
  8. package/dist/capabilities/quota.d.ts.map +1 -0
  9. package/dist/capabilities/quota.js +129 -0
  10. package/dist/capabilities/quota.js.map +1 -0
  11. package/dist/capabilities/search.d.ts +110 -0
  12. package/dist/capabilities/search.d.ts.map +1 -0
  13. package/dist/capabilities/search.js +21 -0
  14. package/dist/capabilities/search.js.map +1 -0
  15. package/dist/capabilities/vision.d.ts +156 -0
  16. package/dist/capabilities/vision.d.ts.map +1 -0
  17. package/dist/capabilities/vision.js +111 -0
  18. package/dist/capabilities/vision.js.map +1 -0
  19. package/dist/command-invocation.d.ts +58 -0
  20. package/dist/command-invocation.d.ts.map +1 -0
  21. package/dist/command-invocation.js +95 -0
  22. package/dist/command-invocation.js.map +1 -0
  23. package/dist/commands/code.d.ts +11 -4
  24. package/dist/commands/code.d.ts.map +1 -1
  25. package/dist/commands/code.js +16 -42
  26. package/dist/commands/code.js.map +1 -1
  27. package/dist/commands/doctor.d.ts +58 -3
  28. package/dist/commands/doctor.d.ts.map +1 -1
  29. package/dist/commands/doctor.js +154 -52
  30. package/dist/commands/doctor.js.map +1 -1
  31. package/dist/commands/quota.d.ts +45 -3
  32. package/dist/commands/quota.d.ts.map +1 -1
  33. package/dist/commands/quota.js +116 -60
  34. package/dist/commands/quota.js.map +1 -1
  35. package/dist/commands/read.d.ts +15 -1
  36. package/dist/commands/read.d.ts.map +1 -1
  37. package/dist/commands/read.js +53 -54
  38. package/dist/commands/read.js.map +1 -1
  39. package/dist/commands/repo.d.ts +8 -3
  40. package/dist/commands/repo.d.ts.map +1 -1
  41. package/dist/commands/repo.js +40 -78
  42. package/dist/commands/repo.js.map +1 -1
  43. package/dist/commands/search.d.ts +27 -2
  44. package/dist/commands/search.d.ts.map +1 -1
  45. package/dist/commands/search.js +95 -103
  46. package/dist/commands/search.js.map +1 -1
  47. package/dist/commands/tools.d.ts +9 -3
  48. package/dist/commands/tools.d.ts.map +1 -1
  49. package/dist/commands/tools.js +29 -59
  50. package/dist/commands/tools.js.map +1 -1
  51. package/dist/commands/vision.d.ts +35 -9
  52. package/dist/commands/vision.d.ts.map +1 -1
  53. package/dist/commands/vision.js +184 -131
  54. package/dist/commands/vision.js.map +1 -1
  55. package/dist/index.d.ts +42 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +389 -207
  58. package/dist/index.js.map +1 -1
  59. package/dist/lib/cache.d.ts +61 -0
  60. package/dist/lib/cache.d.ts.map +1 -1
  61. package/dist/lib/cache.js +74 -11
  62. package/dist/lib/cache.js.map +1 -1
  63. package/dist/lib/code-mode.d.ts +13 -0
  64. package/dist/lib/code-mode.d.ts.map +1 -1
  65. package/dist/lib/code-mode.js +26 -6
  66. package/dist/lib/code-mode.js.map +1 -1
  67. package/dist/lib/config.d.ts.map +1 -1
  68. package/dist/lib/config.js +15 -18
  69. package/dist/lib/config.js.map +1 -1
  70. package/dist/lib/errors.d.ts +65 -10
  71. package/dist/lib/errors.d.ts.map +1 -1
  72. package/dist/lib/errors.js +135 -19
  73. package/dist/lib/errors.js.map +1 -1
  74. package/dist/lib/execution.d.ts +76 -0
  75. package/dist/lib/execution.d.ts.map +1 -0
  76. package/dist/lib/execution.js +177 -0
  77. package/dist/lib/execution.js.map +1 -0
  78. package/dist/lib/index.d.ts +10 -2
  79. package/dist/lib/index.d.ts.map +1 -1
  80. package/dist/lib/index.js +10 -2
  81. package/dist/lib/index.js.map +1 -1
  82. package/dist/lib/mcp-client.d.ts +46 -11
  83. package/dist/lib/mcp-client.d.ts.map +1 -1
  84. package/dist/lib/mcp-client.js +92 -27
  85. package/dist/lib/mcp-client.js.map +1 -1
  86. package/dist/lib/mcp-config.d.ts +17 -0
  87. package/dist/lib/mcp-config.d.ts.map +1 -1
  88. package/dist/lib/mcp-config.js +29 -0
  89. package/dist/lib/mcp-config.js.map +1 -1
  90. package/dist/lib/monitor-client.d.ts +17 -3
  91. package/dist/lib/monitor-client.d.ts.map +1 -1
  92. package/dist/lib/monitor-client.js +23 -69
  93. package/dist/lib/monitor-client.js.map +1 -1
  94. package/dist/lib/output.d.ts +53 -7
  95. package/dist/lib/output.d.ts.map +1 -1
  96. package/dist/lib/output.js +126 -39
  97. package/dist/lib/output.js.map +1 -1
  98. package/dist/lib/redact.d.ts +62 -3
  99. package/dist/lib/redact.d.ts.map +1 -1
  100. package/dist/lib/redact.js +165 -31
  101. package/dist/lib/redact.js.map +1 -1
  102. package/dist/lib/tty.d.ts +7 -20
  103. package/dist/lib/tty.d.ts.map +1 -1
  104. package/dist/lib/tty.js +51 -30
  105. package/dist/lib/tty.js.map +1 -1
  106. package/dist/node-command-invocation-adapter.d.ts +28 -0
  107. package/dist/node-command-invocation-adapter.d.ts.map +1 -0
  108. package/dist/node-command-invocation-adapter.js +88 -0
  109. package/dist/node-command-invocation-adapter.js.map +1 -0
  110. package/dist/providers/minimax/adapter.d.ts +47 -0
  111. package/dist/providers/minimax/adapter.d.ts.map +1 -0
  112. package/dist/providers/minimax/adapter.js +443 -0
  113. package/dist/providers/minimax/adapter.js.map +1 -0
  114. package/dist/providers/minimax/config.d.ts +32 -0
  115. package/dist/providers/minimax/config.d.ts.map +1 -0
  116. package/dist/providers/minimax/config.js +84 -0
  117. package/dist/providers/minimax/config.js.map +1 -0
  118. package/dist/providers/minimax/media.d.ts +34 -0
  119. package/dist/providers/minimax/media.d.ts.map +1 -0
  120. package/dist/providers/minimax/media.js +92 -0
  121. package/dist/providers/minimax/media.js.map +1 -0
  122. package/dist/providers/minimax/quota-client.d.ts +37 -0
  123. package/dist/providers/minimax/quota-client.d.ts.map +1 -0
  124. package/dist/providers/minimax/quota-client.js +78 -0
  125. package/dist/providers/minimax/quota-client.js.map +1 -0
  126. package/dist/providers/minimax/quota.d.ts +48 -0
  127. package/dist/providers/minimax/quota.d.ts.map +1 -0
  128. package/dist/providers/minimax/quota.js +120 -0
  129. package/dist/providers/minimax/quota.js.map +1 -0
  130. package/dist/providers/minimax/sdk-client.d.ts +29 -0
  131. package/dist/providers/minimax/sdk-client.d.ts.map +1 -0
  132. package/dist/providers/minimax/sdk-client.js +50 -0
  133. package/dist/providers/minimax/sdk-client.js.map +1 -0
  134. package/dist/providers/minimax/vision-attestations.d.ts +29 -0
  135. package/dist/providers/minimax/vision-attestations.d.ts.map +1 -0
  136. package/dist/providers/minimax/vision-attestations.js +54 -0
  137. package/dist/providers/minimax/vision-attestations.js.map +1 -0
  138. package/dist/providers/minimax/vision-conformance.d.ts +184 -0
  139. package/dist/providers/minimax/vision-conformance.d.ts.map +1 -0
  140. package/dist/providers/minimax/vision-conformance.js +369 -0
  141. package/dist/providers/minimax/vision-conformance.js.map +1 -0
  142. package/dist/providers/minimax/vision-mappings/chart.d.ts +35 -0
  143. package/dist/providers/minimax/vision-mappings/chart.d.ts.map +1 -0
  144. package/dist/providers/minimax/vision-mappings/chart.js +55 -0
  145. package/dist/providers/minimax/vision-mappings/chart.js.map +1 -0
  146. package/dist/providers/minimax/vision-mappings/common.d.ts +60 -0
  147. package/dist/providers/minimax/vision-mappings/common.d.ts.map +1 -0
  148. package/dist/providers/minimax/vision-mappings/common.js +75 -0
  149. package/dist/providers/minimax/vision-mappings/common.js.map +1 -0
  150. package/dist/providers/minimax/vision-mappings/diagnose-error.d.ts +35 -0
  151. package/dist/providers/minimax/vision-mappings/diagnose-error.d.ts.map +1 -0
  152. package/dist/providers/minimax/vision-mappings/diagnose-error.js +55 -0
  153. package/dist/providers/minimax/vision-mappings/diagnose-error.js.map +1 -0
  154. package/dist/providers/minimax/vision-mappings/diagram.d.ts +35 -0
  155. package/dist/providers/minimax/vision-mappings/diagram.d.ts.map +1 -0
  156. package/dist/providers/minimax/vision-mappings/diagram.js +55 -0
  157. package/dist/providers/minimax/vision-mappings/diagram.js.map +1 -0
  158. package/dist/providers/minimax/vision-mappings/extract-text.d.ts +35 -0
  159. package/dist/providers/minimax/vision-mappings/extract-text.d.ts.map +1 -0
  160. package/dist/providers/minimax/vision-mappings/extract-text.js +55 -0
  161. package/dist/providers/minimax/vision-mappings/extract-text.js.map +1 -0
  162. package/dist/providers/minimax/vision-mappings/ui-artifact.d.ts +35 -0
  163. package/dist/providers/minimax/vision-mappings/ui-artifact.d.ts.map +1 -0
  164. package/dist/providers/minimax/vision-mappings/ui-artifact.js +69 -0
  165. package/dist/providers/minimax/vision-mappings/ui-artifact.js.map +1 -0
  166. package/dist/providers/minimax/vision-mappings.generated.d.ts +29 -0
  167. package/dist/providers/minimax/vision-mappings.generated.d.ts.map +1 -0
  168. package/dist/providers/minimax/vision-mappings.generated.js +29 -0
  169. package/dist/providers/minimax/vision-mappings.generated.js.map +1 -0
  170. package/dist/providers/minimax/vision-revisions.d.ts +22 -0
  171. package/dist/providers/minimax/vision-revisions.d.ts.map +1 -0
  172. package/dist/providers/minimax/vision-revisions.js +27 -0
  173. package/dist/providers/minimax/vision-revisions.js.map +1 -0
  174. package/dist/providers/registry.d.ts +36 -0
  175. package/dist/providers/registry.d.ts.map +1 -0
  176. package/dist/providers/registry.js +45 -0
  177. package/dist/providers/registry.js.map +1 -0
  178. package/dist/providers/selection.d.ts +44 -0
  179. package/dist/providers/selection.d.ts.map +1 -0
  180. package/dist/providers/selection.js +85 -0
  181. package/dist/providers/selection.js.map +1 -0
  182. package/dist/providers/types.d.ts +247 -0
  183. package/dist/providers/types.d.ts.map +1 -0
  184. package/dist/providers/types.js +127 -0
  185. package/dist/providers/types.js.map +1 -0
  186. package/dist/providers/zai/adapter.d.ts +35 -0
  187. package/dist/providers/zai/adapter.d.ts.map +1 -0
  188. package/dist/providers/zai/adapter.js +619 -0
  189. package/dist/providers/zai/adapter.js.map +1 -0
  190. package/dist/providers/zai/credentials.d.ts +38 -0
  191. package/dist/providers/zai/credentials.d.ts.map +1 -0
  192. package/dist/providers/zai/credentials.js +60 -0
  193. package/dist/providers/zai/credentials.js.map +1 -0
  194. package/dist/providers/zai/media.d.ts +38 -0
  195. package/dist/providers/zai/media.d.ts.map +1 -0
  196. package/dist/providers/zai/media.js +107 -0
  197. package/dist/providers/zai/media.js.map +1 -0
  198. package/dist/providers/zai/monitor-client.d.ts +53 -0
  199. package/dist/providers/zai/monitor-client.d.ts.map +1 -0
  200. package/dist/providers/zai/monitor-client.js +117 -0
  201. package/dist/providers/zai/monitor-client.js.map +1 -0
  202. package/dist/providers/zai/quota.d.ts +47 -0
  203. package/dist/providers/zai/quota.d.ts.map +1 -0
  204. package/dist/providers/zai/quota.js +127 -0
  205. package/dist/providers/zai/quota.js.map +1 -0
  206. package/package.json +10 -5
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Compiled MiniMax specialized-vision conformance registry (DESIGN.md §15,
3
+ * phases/05-specialized-vision.md P5-02).
4
+ *
5
+ * This module is the single source of truth for which specialized
6
+ * MiniMax Vision operations are supported at runtime. Help text, doctor
7
+ * `sharedCapabilities`, MiniMax descriptor capability metadata, and the
8
+ * Adapter support check all derive from this registry through the two
9
+ * pure queries below. There is no environment override and no runtime
10
+ * filesystem lookup.
11
+ *
12
+ * Boundary rules:
13
+ * - Pure module: no `process.env`, no I/O, no Provider calls.
14
+ * - Imports only the compiled revisions map, the compiled attestation
15
+ * manifest, and the shared capability type. It does not import the
16
+ * MiniMax Adapter, the Vision command, the doctor command, or any
17
+ * Provider transport.
18
+ * - The registry is built once at module load from immutable sources
19
+ * and frozen; support queries are pure functions over that snapshot.
20
+ *
21
+ * Support contract (DESIGN.md §15):
22
+ * `isMiniMaxVisionOperationSupported(op)` is true iff every condition
23
+ * holds:
24
+ * 1. `op` is one of the five specialized operations
25
+ * (`ui-artifact`, `extract-text`, `diagnose-error`, `diagram`,
26
+ * `chart`); `interpret-image`, `diff`, and `video` are not
27
+ * registry entries.
28
+ * 2. The entry's `offline` state is `"pass"`.
29
+ * 3. The entry's `live` state is `"pass"`.
30
+ * 4. A compiled attestation exists whose `operation` matches.
31
+ * 5. The attestation's `fixtureVersion` equals the entry's
32
+ * `fixtureVersion`.
33
+ * 6. The attestation's `implementationId` equals the entry's
34
+ * `implementationId` (which equals
35
+ * {@link MINIMAX_VISION_IMPLEMENTATION_ID}).
36
+ * 7. The attestation's `mappingRevision` equals the entry's
37
+ * `mappingRevision` (sourced from `vision-revisions.ts`).
38
+ * 8. Every entry in `attestation.assertions` has `passed: true`.
39
+ *
40
+ * At P5-02 every entry begins `pending/pending` with no attestation,
41
+ * so every specialized operation is unsupported. P5-03 flips entries
42
+ * to `pass/pass` and appends sanitized attestations one at a time.
43
+ */
44
+ import type { VisionOperation } from "../../capabilities/vision.js";
45
+ /**
46
+ * Conformance state for an offline or live test leg. `pending` means
47
+ * the test has not been run; `pass` means it has run and the operation
48
+ * is eligible for support; `fail` means it ran and the semantics did
49
+ * not hold.
50
+ */
51
+ export type ConformanceState = "pending" | "pass" | "fail";
52
+ /**
53
+ * A specialized MiniMax Vision operation id. `interpret-image`, `diff`,
54
+ * and `video` are excluded by design: `interpret-image` is supported
55
+ * unconditionally by the MiniMax Adapter, and `diff`/`video` remain
56
+ * Z.AI-only (DESIGN.md §15).
57
+ */
58
+ export type SpecializedVisionOperation = Exclude<VisionOperation, "interpret-image" | "diff" | "video">;
59
+ /**
60
+ * Sanitized attestation shape (DESIGN.md §15). Attestations contain
61
+ * ONLY these fields and never include returned prose, credentials,
62
+ * URLs with credentials, headers, raw response bodies, local paths,
63
+ * or stacks.
64
+ */
65
+ export interface VisionAttestation {
66
+ readonly schemaVersion: 1;
67
+ readonly provider: "minimax";
68
+ readonly operation: SpecializedVisionOperation;
69
+ readonly fixtureVersion: number;
70
+ readonly implementationId: string;
71
+ readonly mappingRevision: string;
72
+ readonly testedAt: string;
73
+ readonly resultDigest: string;
74
+ readonly assertions: readonly {
75
+ id: string;
76
+ passed: true;
77
+ }[];
78
+ }
79
+ /**
80
+ * A registry entry. Each immutable entry contains the fixture version,
81
+ * the current Implementation identity, the generated mapping revision,
82
+ * the offline/live conformance states, and an optional compiled
83
+ * attestation attached at registry assembly time.
84
+ */
85
+ export interface VisionConformanceEntry {
86
+ readonly fixtureVersion: number;
87
+ readonly implementationId: string;
88
+ readonly mappingRevision: string;
89
+ readonly offline: ConformanceState;
90
+ readonly live: ConformanceState;
91
+ readonly attestation?: VisionAttestation;
92
+ }
93
+ /**
94
+ * The Implementation identity for the SDK-backed MiniMax Vision
95
+ * transport. Matches the pinned `mmx-cli` dependency in
96
+ * `packages/scoutline/package.json`. Changing this value (e.g. moving
97
+ * to a direct MiniMax transport) invalidates every attestation until
98
+ * each mapping is re-attested (DESIGN.md §17).
99
+ */
100
+ export declare const MINIMAX_VISION_IMPLEMENTATION_ID = "mmx-cli-sdk@1.0.16";
101
+ /**
102
+ * The five specialized MiniMax Vision operations governed by this
103
+ * registry, in stable canonical order. `interpret-image`, `diff`, and
104
+ * `video` are deliberately absent.
105
+ */
106
+ export declare const SPECIALIZED_VISION_OPERATIONS: readonly ["ui-artifact", "extract-text", "diagnose-error", "diagram", "chart"];
107
+ /**
108
+ * Readonly set form of {@link SPECIALIZED_VISION_OPERATIONS} for fast
109
+ * membership checks. Used by the Adapter and by the support query.
110
+ */
111
+ export declare const SPECIALIZED_VISION_OPERATION_SET: ReadonlySet<SpecializedVisionOperation>;
112
+ /**
113
+ * The immutable MiniMax specialized-vision conformance registry. Pure
114
+ * snapshot; reading it performs no Provider call and inspects no
115
+ * environment value.
116
+ */
117
+ export declare const MINIMAX_VISION_CONFORMANCE_REGISTRY: Readonly<Record<SpecializedVisionOperation, VisionConformanceEntry>>;
118
+ /**
119
+ * Validate a candidate registry against the structural contract. Used
120
+ * by tests to prove invariants: the production registry is built from
121
+ * frozen sources and is always valid. Returns a list of human-readable
122
+ * errors; an empty list means the candidate is structurally valid.
123
+ *
124
+ * Validation rules:
125
+ * - Exactly the five specialized operation keys are present.
126
+ * - `diff`, `video`, and `interpret-image` never appear.
127
+ * - `offline` and `live` are each one of `pending|pass|fail`.
128
+ * - `fixtureVersion` is a positive integer.
129
+ * - `implementationId` equals {@link MINIMAX_VISION_IMPLEMENTATION_ID}.
130
+ * - `mappingRevision` is a non-empty string.
131
+ * - If an attestation is present, it may NOT be attached to an entry
132
+ * whose `live` state is not `pass` (an attestation is the proof of
133
+ * a passing live run).
134
+ *
135
+ * NOTE: this function intentionally does NOT cross-check the
136
+ * attestation's `mappingRevision` against the generated revisions map
137
+ * or its `implementationId` against the constant; those checks are the
138
+ * `isMiniMaxVisionOperationSupported` query's job. The validator only
139
+ * checks structural integrity of a candidate registry. Tests that need
140
+ * to assert the attestation/revision match semantics use the support
141
+ * query directly.
142
+ */
143
+ export declare function validateConformanceRegistry(candidate: Readonly<Record<string, unknown>>): string[];
144
+ /**
145
+ * Validate a candidate attestation against the schema contract.
146
+ * Returns a list of human-readable errors; an empty list means the
147
+ * attestation is structurally valid. Used by tests to prove the
148
+ * support contract fails closed on malformed attestations.
149
+ */
150
+ export declare function validateAttestation(candidate: unknown): string[];
151
+ /**
152
+ * Options for {@link isMiniMaxVisionOperationSupported}. Tests pass a
153
+ * synthetic `registry` and `attestations` to exercise pending/pass/fail
154
+ * combinations without mutating compiled sources. Production calls
155
+ * with no options; the compiled registry and manifest are used.
156
+ */
157
+ export interface MiniMaxVisionSupportOptions {
158
+ readonly registry?: Readonly<Record<SpecializedVisionOperation, VisionConformanceEntry>>;
159
+ readonly revisions?: Readonly<Record<SpecializedVisionOperation, string>>;
160
+ readonly implementationId?: string;
161
+ }
162
+ /**
163
+ * Return true iff `operation` is currently a supported MiniMax
164
+ * specialized Vision operation, per DESIGN.md §15. Pure: no Provider
165
+ * call, no env read, no I/O. `interpret-image`, `diff`, and `video`
166
+ * always return false (they are not registry entries).
167
+ */
168
+ export declare function isMiniMaxVisionOperationSupported(operation: VisionOperation, options?: MiniMaxVisionSupportOptions): boolean;
169
+ /**
170
+ * Return a snapshot of every specialized operation's registry entry.
171
+ * The returned record is the same frozen object as the compiled
172
+ * registry; callers MUST NOT mutate it. Use this for help text,
173
+ * diagnostics, and packaging tests so there is a single source of
174
+ * truth for registry metadata.
175
+ */
176
+ export declare function getMiniMaxVisionConformanceMetadata(): Readonly<Record<SpecializedVisionOperation, VisionConformanceEntry>>;
177
+ /**
178
+ * Return the subset of specialized operations currently supported by
179
+ * the MiniMax Vision conformance registry, in canonical order. Used by
180
+ * the Adapter descriptor, Vision help, and doctor `sharedCapabilities`
181
+ * so they all derive from a single query.
182
+ */
183
+ export declare function listSupportedMiniMaxVisionOperations(): readonly SpecializedVisionOperation[];
184
+ //# sourceMappingURL=vision-conformance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vision-conformance.d.ts","sourceRoot":"","sources":["../../../src/providers/minimax/vision-conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAQpE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,eAAe,EACf,iBAAiB,GAAG,MAAM,GAAG,OAAO,CACrC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;IAC/C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,C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2BAA2B;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACzF,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,eAAe,EAC1B,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAiCT;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,IAAI,QAAQ,CAC7D,MAAM,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAC3D,CAEA;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,IAAI,SAAS,0BAA0B,EAAE,CAE5F"}
@@ -0,0 +1,369 @@
1
+ /**
2
+ * Compiled MiniMax specialized-vision conformance registry (DESIGN.md §15,
3
+ * phases/05-specialized-vision.md P5-02).
4
+ *
5
+ * This module is the single source of truth for which specialized
6
+ * MiniMax Vision operations are supported at runtime. Help text, doctor
7
+ * `sharedCapabilities`, MiniMax descriptor capability metadata, and the
8
+ * Adapter support check all derive from this registry through the two
9
+ * pure queries below. There is no environment override and no runtime
10
+ * filesystem lookup.
11
+ *
12
+ * Boundary rules:
13
+ * - Pure module: no `process.env`, no I/O, no Provider calls.
14
+ * - Imports only the compiled revisions map, the compiled attestation
15
+ * manifest, and the shared capability type. It does not import the
16
+ * MiniMax Adapter, the Vision command, the doctor command, or any
17
+ * Provider transport.
18
+ * - The registry is built once at module load from immutable sources
19
+ * and frozen; support queries are pure functions over that snapshot.
20
+ *
21
+ * Support contract (DESIGN.md §15):
22
+ * `isMiniMaxVisionOperationSupported(op)` is true iff every condition
23
+ * holds:
24
+ * 1. `op` is one of the five specialized operations
25
+ * (`ui-artifact`, `extract-text`, `diagnose-error`, `diagram`,
26
+ * `chart`); `interpret-image`, `diff`, and `video` are not
27
+ * registry entries.
28
+ * 2. The entry's `offline` state is `"pass"`.
29
+ * 3. The entry's `live` state is `"pass"`.
30
+ * 4. A compiled attestation exists whose `operation` matches.
31
+ * 5. The attestation's `fixtureVersion` equals the entry's
32
+ * `fixtureVersion`.
33
+ * 6. The attestation's `implementationId` equals the entry's
34
+ * `implementationId` (which equals
35
+ * {@link MINIMAX_VISION_IMPLEMENTATION_ID}).
36
+ * 7. The attestation's `mappingRevision` equals the entry's
37
+ * `mappingRevision` (sourced from `vision-revisions.ts`).
38
+ * 8. Every entry in `attestation.assertions` has `passed: true`.
39
+ *
40
+ * At P5-02 every entry begins `pending/pending` with no attestation,
41
+ * so every specialized operation is unsupported. P5-03 flips entries
42
+ * to `pass/pass` and appends sanitized attestations one at a time.
43
+ */
44
+ import { MINIMAX_VISION_MAPPING_REVISIONS } from "./vision-revisions.js";
45
+ import { MINIMAX_VISION_ATTESTATIONS } from "./vision-attestations.js";
46
+ // ---------------------------------------------------------------------------
47
+ // Constants
48
+ // ---------------------------------------------------------------------------
49
+ /**
50
+ * The Implementation identity for the SDK-backed MiniMax Vision
51
+ * transport. Matches the pinned `mmx-cli` dependency in
52
+ * `packages/scoutline/package.json`. Changing this value (e.g. moving
53
+ * to a direct MiniMax transport) invalidates every attestation until
54
+ * each mapping is re-attested (DESIGN.md §17).
55
+ */
56
+ export const MINIMAX_VISION_IMPLEMENTATION_ID = "mmx-cli-sdk@1.0.16";
57
+ /**
58
+ * The five specialized MiniMax Vision operations governed by this
59
+ * registry, in stable canonical order. `interpret-image`, `diff`, and
60
+ * `video` are deliberately absent.
61
+ */
62
+ export const SPECIALIZED_VISION_OPERATIONS = [
63
+ "ui-artifact",
64
+ "extract-text",
65
+ "diagnose-error",
66
+ "diagram",
67
+ "chart",
68
+ ];
69
+ /**
70
+ * Readonly set form of {@link SPECIALIZED_VISION_OPERATIONS} for fast
71
+ * membership checks. Used by the Adapter and by the support query.
72
+ */
73
+ export const SPECIALIZED_VISION_OPERATION_SET = new Set(SPECIALIZED_VISION_OPERATIONS);
74
+ /**
75
+ * States considered valid for an entry's offline or live leg. Any
76
+ * other string makes the entry invalid.
77
+ */
78
+ const VALID_CONFORMANCE_STATES = new Set(["pending", "pass", "fail"]);
79
+ const MINIMAX_VISION_CONFORMANCE_SOURCE = Object.freeze({
80
+ // P5-03a: ui-artifact offline conformance proven; live remains pending
81
+ // until the opt-in live attestation script runs with credentials.
82
+ "ui-artifact": { fixtureVersion: 1, offline: "pass", live: "pass" },
83
+ // P5-03b: extract-text offline conformance proven; live pending.
84
+ "extract-text": { fixtureVersion: 1, offline: "pass", live: "pending" },
85
+ // P5-03c: diagnose-error offline conformance proven; live pending.
86
+ "diagnose-error": { fixtureVersion: 1, offline: "pass", live: "pass" },
87
+ // P5-03d: diagram offline conformance proven; live pending.
88
+ diagram: { fixtureVersion: 1, offline: "pass", live: "pending" },
89
+ // P5-03e: chart offline conformance proven; live pending.
90
+ chart: { fixtureVersion: 1, offline: "pass", live: "pending" },
91
+ });
92
+ // ---------------------------------------------------------------------------
93
+ // Registry assembly (module load; pure; frozen)
94
+ // ---------------------------------------------------------------------------
95
+ /**
96
+ * Build the immutable registry by joining the hand-authored source
97
+ * with the generated mapping revisions and the compiled attestation
98
+ * manifest. Exactly one entry per specialized operation. The result
99
+ * is deeply frozen and indexed by operation.
100
+ *
101
+ * Attestations are matched by `operation`; if multiple attestations
102
+ * share an operation (a malformed manifest), the first wins and later
103
+ * duplicates are ignored. The support query performs the strict
104
+ * validation, so a mismatched attestation (wrong version, wrong
105
+ * implementation, etc.) is harmless to the registry shape — it simply
106
+ * fails the support contract.
107
+ */
108
+ function buildRegistry() {
109
+ const attestationByOp = new Map();
110
+ for (const att of MINIMAX_VISION_ATTESTATIONS) {
111
+ if (typeof att === "object" &&
112
+ att !== null &&
113
+ typeof att.operation === "string" &&
114
+ SPECIALIZED_VISION_OPERATION_SET.has(att.operation) &&
115
+ !attestationByOp.has(att.operation)) {
116
+ attestationByOp.set(att.operation, att);
117
+ }
118
+ }
119
+ const registry = {};
120
+ for (const op of SPECIALIZED_VISION_OPERATIONS) {
121
+ const source = MINIMAX_VISION_CONFORMANCE_SOURCE[op];
122
+ const mappingRevision = MINIMAX_VISION_MAPPING_REVISIONS[op];
123
+ const entry = {
124
+ fixtureVersion: source.fixtureVersion,
125
+ implementationId: MINIMAX_VISION_IMPLEMENTATION_ID,
126
+ mappingRevision,
127
+ offline: source.offline,
128
+ live: source.live,
129
+ };
130
+ const attestation = attestationByOp.get(op);
131
+ if (attestation !== undefined) {
132
+ entry.attestation = attestation;
133
+ }
134
+ Object.freeze(entry);
135
+ registry[op] = entry;
136
+ }
137
+ return Object.freeze(registry);
138
+ }
139
+ /**
140
+ * The immutable MiniMax specialized-vision conformance registry. Pure
141
+ * snapshot; reading it performs no Provider call and inspects no
142
+ * environment value.
143
+ */
144
+ export const MINIMAX_VISION_CONFORMANCE_REGISTRY = buildRegistry();
145
+ // ---------------------------------------------------------------------------
146
+ // Pure validation helpers
147
+ // ---------------------------------------------------------------------------
148
+ /**
149
+ * Validate a candidate registry against the structural contract. Used
150
+ * by tests to prove invariants: the production registry is built from
151
+ * frozen sources and is always valid. Returns a list of human-readable
152
+ * errors; an empty list means the candidate is structurally valid.
153
+ *
154
+ * Validation rules:
155
+ * - Exactly the five specialized operation keys are present.
156
+ * - `diff`, `video`, and `interpret-image` never appear.
157
+ * - `offline` and `live` are each one of `pending|pass|fail`.
158
+ * - `fixtureVersion` is a positive integer.
159
+ * - `implementationId` equals {@link MINIMAX_VISION_IMPLEMENTATION_ID}.
160
+ * - `mappingRevision` is a non-empty string.
161
+ * - If an attestation is present, it may NOT be attached to an entry
162
+ * whose `live` state is not `pass` (an attestation is the proof of
163
+ * a passing live run).
164
+ *
165
+ * NOTE: this function intentionally does NOT cross-check the
166
+ * attestation's `mappingRevision` against the generated revisions map
167
+ * or its `implementationId` against the constant; those checks are the
168
+ * `isMiniMaxVisionOperationSupported` query's job. The validator only
169
+ * checks structural integrity of a candidate registry. Tests that need
170
+ * to assert the attestation/revision match semantics use the support
171
+ * query directly.
172
+ */
173
+ export function validateConformanceRegistry(candidate) {
174
+ const errors = [];
175
+ if (!candidate || typeof candidate !== "object") {
176
+ return ["registry must be an object"];
177
+ }
178
+ const seen = new Set();
179
+ for (const key of Object.keys(candidate)) {
180
+ seen.add(key);
181
+ if (key === "diff" || key === "video") {
182
+ errors.push(`forbidden key: ${key} never enters the specialized registry`);
183
+ continue;
184
+ }
185
+ if (key === "interpret-image") {
186
+ errors.push("forbidden key: interpret-image is supported unconditionally and is not a registry entry");
187
+ continue;
188
+ }
189
+ if (!SPECIALIZED_VISION_OPERATION_SET.has(key)) {
190
+ errors.push(`unknown key: ${key}`);
191
+ continue;
192
+ }
193
+ const entry = candidate[key];
194
+ if (!entry || typeof entry !== "object") {
195
+ errors.push(`entry ${key} must be an object`);
196
+ continue;
197
+ }
198
+ const e = entry;
199
+ if (typeof e.fixtureVersion !== "number" || !Number.isInteger(e.fixtureVersion)) {
200
+ errors.push(`entry ${key} fixtureVersion must be an integer`);
201
+ }
202
+ else if (e.fixtureVersion <= 0) {
203
+ errors.push(`entry ${key} fixtureVersion must be positive, got ${e.fixtureVersion}`);
204
+ }
205
+ if (typeof e.implementationId !== "string" || e.implementationId.length === 0) {
206
+ errors.push(`entry ${key} implementationId must be a non-empty string`);
207
+ }
208
+ else if (e.implementationId !== MINIMAX_VISION_IMPLEMENTATION_ID) {
209
+ errors.push(`entry ${key} implementationId must equal ${MINIMAX_VISION_IMPLEMENTATION_ID}, got ${e.implementationId}`);
210
+ }
211
+ if (typeof e.mappingRevision !== "string" || e.mappingRevision.length === 0) {
212
+ errors.push(`entry ${key} mappingRevision must be a non-empty string`);
213
+ }
214
+ if (typeof e.offline !== "string" || !VALID_CONFORMANCE_STATES.has(e.offline)) {
215
+ errors.push(`entry ${key} offline state invalid: ${String(e.offline)}`);
216
+ }
217
+ if (typeof e.live !== "string" || !VALID_CONFORMANCE_STATES.has(e.live)) {
218
+ errors.push(`entry ${key} live state invalid: ${String(e.live)}`);
219
+ }
220
+ if (e.attestation !== undefined) {
221
+ if (e.live !== "pass") {
222
+ errors.push(`entry ${key} carries an attestation but live state is ${String(e.live)} (must be pass)`);
223
+ }
224
+ }
225
+ }
226
+ for (const op of SPECIALIZED_VISION_OPERATIONS) {
227
+ if (!seen.has(op)) {
228
+ errors.push(`missing key: ${op}`);
229
+ }
230
+ }
231
+ return errors;
232
+ }
233
+ /**
234
+ * Validate a candidate attestation against the schema contract.
235
+ * Returns a list of human-readable errors; an empty list means the
236
+ * attestation is structurally valid. Used by tests to prove the
237
+ * support contract fails closed on malformed attestations.
238
+ */
239
+ export function validateAttestation(candidate) {
240
+ const errors = [];
241
+ if (!candidate || typeof candidate !== "object") {
242
+ return ["attestation must be an object"];
243
+ }
244
+ const a = candidate;
245
+ if (a.schemaVersion !== 1) {
246
+ errors.push(`attestation schemaVersion must be 1, got ${String(a.schemaVersion)}`);
247
+ }
248
+ if (a.provider !== "minimax") {
249
+ errors.push(`attestation provider must be minimax, got ${String(a.provider)}`);
250
+ }
251
+ if (typeof a.operation !== "string") {
252
+ errors.push("attestation operation must be a string");
253
+ }
254
+ else if (!SPECIALIZED_VISION_OPERATION_SET.has(a.operation)) {
255
+ errors.push(`attestation operation must be a specialized op, got ${a.operation}`);
256
+ }
257
+ if (typeof a.fixtureVersion !== "number" ||
258
+ !Number.isInteger(a.fixtureVersion) ||
259
+ a.fixtureVersion <= 0) {
260
+ errors.push(`attestation fixtureVersion must be a positive integer, got ${String(a.fixtureVersion)}`);
261
+ }
262
+ if (typeof a.implementationId !== "string" || a.implementationId.length === 0) {
263
+ errors.push("attestation implementationId must be a non-empty string");
264
+ }
265
+ if (typeof a.mappingRevision !== "string" || a.mappingRevision.length === 0) {
266
+ errors.push("attestation mappingRevision must be a non-empty string");
267
+ }
268
+ if (typeof a.testedAt !== "string" || a.testedAt.length === 0) {
269
+ errors.push("attestation testedAt must be a non-empty string");
270
+ }
271
+ if (typeof a.resultDigest !== "string" || a.resultDigest.length === 0) {
272
+ errors.push("attestation resultDigest must be a non-empty string");
273
+ }
274
+ if (!Array.isArray(a.assertions) || a.assertions.length === 0) {
275
+ errors.push("attestation assertions must be a non-empty array");
276
+ }
277
+ else {
278
+ const ids = new Set();
279
+ for (const item of a.assertions) {
280
+ if (!item || typeof item !== "object") {
281
+ errors.push("attestation assertion must be an object");
282
+ continue;
283
+ }
284
+ const r = item;
285
+ if (typeof r.id !== "string" || r.id.length === 0) {
286
+ errors.push("attestation assertion id must be a non-empty string");
287
+ continue;
288
+ }
289
+ if (ids.has(r.id)) {
290
+ errors.push(`attestation assertion duplicate id: ${r.id}`);
291
+ continue;
292
+ }
293
+ ids.add(r.id);
294
+ if (r.passed !== true) {
295
+ errors.push(`attestation assertion ${r.id} must have passed: true`);
296
+ }
297
+ }
298
+ }
299
+ return errors;
300
+ }
301
+ /**
302
+ * Return true iff `operation` is currently a supported MiniMax
303
+ * specialized Vision operation, per DESIGN.md §15. Pure: no Provider
304
+ * call, no env read, no I/O. `interpret-image`, `diff`, and `video`
305
+ * always return false (they are not registry entries).
306
+ */
307
+ export function isMiniMaxVisionOperationSupported(operation, options = {}) {
308
+ if (!SPECIALIZED_VISION_OPERATION_SET.has(operation)) {
309
+ return false;
310
+ }
311
+ const op = operation;
312
+ const registry = options.registry ?? MINIMAX_VISION_CONFORMANCE_REGISTRY;
313
+ const revisions = options.revisions ?? MINIMAX_VISION_MAPPING_REVISIONS;
314
+ const implementationId = options.implementationId ?? MINIMAX_VISION_IMPLEMENTATION_ID;
315
+ const entry = registry[op];
316
+ if (!entry)
317
+ return false;
318
+ if (entry.offline !== "pass" || entry.live !== "pass")
319
+ return false;
320
+ const attestation = entry.attestation;
321
+ if (!attestation)
322
+ return false;
323
+ // Strict attestation match. Every field that the registry records
324
+ // for this operation must agree with the attestation.
325
+ if (attestation.operation !== op)
326
+ return false;
327
+ if (attestation.fixtureVersion !== entry.fixtureVersion)
328
+ return false;
329
+ if (attestation.implementationId !== entry.implementationId)
330
+ return false;
331
+ if (attestation.implementationId !== implementationId)
332
+ return false;
333
+ if (attestation.mappingRevision !== entry.mappingRevision)
334
+ return false;
335
+ if (attestation.mappingRevision !== revisions[op])
336
+ return false;
337
+ if (attestation.schemaVersion !== 1)
338
+ return false;
339
+ if (attestation.provider !== "minimax")
340
+ return false;
341
+ const assertions = attestation.assertions;
342
+ if (!Array.isArray(assertions) || assertions.length === 0)
343
+ return false;
344
+ for (const a of assertions) {
345
+ if (!a || a.passed !== true)
346
+ return false;
347
+ }
348
+ return true;
349
+ }
350
+ /**
351
+ * Return a snapshot of every specialized operation's registry entry.
352
+ * The returned record is the same frozen object as the compiled
353
+ * registry; callers MUST NOT mutate it. Use this for help text,
354
+ * diagnostics, and packaging tests so there is a single source of
355
+ * truth for registry metadata.
356
+ */
357
+ export function getMiniMaxVisionConformanceMetadata() {
358
+ return MINIMAX_VISION_CONFORMANCE_REGISTRY;
359
+ }
360
+ /**
361
+ * Return the subset of specialized operations currently supported by
362
+ * the MiniMax Vision conformance registry, in canonical order. Used by
363
+ * the Adapter descriptor, Vision help, and doctor `sharedCapabilities`
364
+ * so they all derive from a single query.
365
+ */
366
+ export function listSupportedMiniMaxVisionOperations() {
367
+ return SPECIALIZED_VISION_OPERATIONS.filter((op) => isMiniMaxVisionOperationSupported(op));
368
+ }
369
+ //# sourceMappingURL=vision-conformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vision-conformance.js","sourceRoot":"","sources":["../../../src/providers/minimax/vision-conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AA0DvE,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;;GA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AI,CAAC,CAAC,MAAM,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;IAC5C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mCAAmC;IAGjD,OAAO,mCAAmC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC;IAClD,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,iCAAiC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7F,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * chart specialized Vision mapping (DESIGN.md §15, P5-03e).
3
+ *
4
+ * Composes the user instruction, an optional focus hint, and the
5
+ * chart-analysis intent into a single prompt for
6
+ * `sdk.vision.describe`. The user instruction is preserved verbatim;
7
+ * the optional focus hint is rendered exactly once. The mapping routes
8
+ * ONLY through `sdk.vision.describe` with one image — it never claims a
9
+ * dedicated MiniMax operation.
10
+ *
11
+ * This Module is wired into the generated operation map
12
+ * (`vision-mappings.generated.ts`) by the prebuild generator and
13
+ * contributes the chart input to the conformance registry's SHA-256
14
+ * mapping revision. It stays unsupported at runtime until a separate
15
+ * opt-in live attestation flips the registry's live state to "pass"
16
+ * (DESIGN.md §15).
17
+ *
18
+ * Boundary rules:
19
+ * - Pure prompt composition + result normalization only. No
20
+ * `process.env`, no filesystem, no network, no Provider imports.
21
+ * - Imports only the shared common runtime helpers; any change to
22
+ * `common.ts` intentionally invalidates this mapping's revision.
23
+ */
24
+ import type { SpecializedVisionOperation } from "../vision-conformance.js";
25
+ /**
26
+ * The chart mapping Module. Satisfies the
27
+ * {@link MiniMaxVisionMappingModule} interface declared in the generated
28
+ * operation map.
29
+ */
30
+ export declare const chartMapping: {
31
+ readonly operation: SpecializedVisionOperation;
32
+ composePrompt(request: unknown): string;
33
+ normalizeResult(raw: unknown): string;
34
+ };
35
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/chart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AA0B3E;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE;IACzB,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAC;IAC/C,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IACxC,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;CAmBvC,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * chart specialized Vision mapping (DESIGN.md §15, P5-03e).
3
+ *
4
+ * Composes the user instruction, an optional focus hint, and the
5
+ * chart-analysis intent into a single prompt for
6
+ * `sdk.vision.describe`. The user instruction is preserved verbatim;
7
+ * the optional focus hint is rendered exactly once. The mapping routes
8
+ * ONLY through `sdk.vision.describe` with one image — it never claims a
9
+ * dedicated MiniMax operation.
10
+ *
11
+ * This Module is wired into the generated operation map
12
+ * (`vision-mappings.generated.ts`) by the prebuild generator and
13
+ * contributes the chart input to the conformance registry's SHA-256
14
+ * mapping revision. It stays unsupported at runtime until a separate
15
+ * opt-in live attestation flips the registry's live state to "pass"
16
+ * (DESIGN.md §15).
17
+ *
18
+ * Boundary rules:
19
+ * - Pure prompt composition + result normalization only. No
20
+ * `process.env`, no filesystem, no network, no Provider imports.
21
+ * - Imports only the shared common runtime helpers; any change to
22
+ * `common.ts` intentionally invalidates this mapping's revision.
23
+ */
24
+ import { composeMappingPrompt, normalizeMappingResult, formatOptionalOption, } from "./common.js";
25
+ /**
26
+ * Chart-analysis intent. Rendered once per prompt as the opening intent
27
+ * segment. Deliberately distinct from the user instruction's phrasing
28
+ * so the instruction remains intact.
29
+ */
30
+ const CHART_INTENT = "Analyze the chart shown in the image. Report its title or subject, what each axis measures, and the overall direction of the data.";
31
+ /**
32
+ * The chart mapping Module. Satisfies the
33
+ * {@link MiniMaxVisionMappingModule} interface declared in the generated
34
+ * operation map.
35
+ */
36
+ export const chartMapping = {
37
+ operation: "chart",
38
+ composePrompt(request) {
39
+ const req = request;
40
+ const segments = [
41
+ { kind: "intent", text: CHART_INTENT },
42
+ { kind: "instruction", text: req.instruction },
43
+ ];
44
+ // Optional focus hint, rendered at most once.
45
+ const focus = formatOptionalOption("Focus", req.focus);
46
+ if (focus.length > 0) {
47
+ segments.push({ kind: "option", text: focus });
48
+ }
49
+ return composeMappingPrompt(segments);
50
+ },
51
+ normalizeResult(raw) {
52
+ return normalizeMappingResult(raw);
53
+ },
54
+ };
55
+ //# sourceMappingURL=chart.js.map