scoutline 0.1.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +394 -7
- package/bin/scoutline.js +36 -15
- package/dist/capabilities/diagnostics.d.ts +135 -0
- package/dist/capabilities/diagnostics.d.ts.map +1 -0
- package/dist/capabilities/diagnostics.js +139 -0
- package/dist/capabilities/diagnostics.js.map +1 -0
- package/dist/capabilities/quota.d.ts +99 -0
- package/dist/capabilities/quota.d.ts.map +1 -0
- package/dist/capabilities/quota.js +129 -0
- package/dist/capabilities/quota.js.map +1 -0
- package/dist/capabilities/reader.d.ts +227 -0
- package/dist/capabilities/reader.d.ts.map +1 -0
- package/dist/capabilities/reader.js +100 -0
- package/dist/capabilities/reader.js.map +1 -0
- package/dist/capabilities/repository.d.ts +221 -0
- package/dist/capabilities/repository.d.ts.map +1 -0
- package/dist/capabilities/repository.js +172 -0
- package/dist/capabilities/repository.js.map +1 -0
- package/dist/capabilities/search.d.ts +110 -0
- package/dist/capabilities/search.d.ts.map +1 -0
- package/dist/capabilities/search.js +21 -0
- package/dist/capabilities/search.js.map +1 -0
- package/dist/capabilities/vision.d.ts +156 -0
- package/dist/capabilities/vision.d.ts.map +1 -0
- package/dist/capabilities/vision.js +111 -0
- package/dist/capabilities/vision.js.map +1 -0
- package/dist/command-invocation.d.ts +58 -0
- package/dist/command-invocation.d.ts.map +1 -0
- package/dist/command-invocation.js +95 -0
- package/dist/command-invocation.js.map +1 -0
- package/dist/commands/cache.d.ts +106 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +203 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/code.d.ts +11 -4
- package/dist/commands/code.d.ts.map +1 -1
- package/dist/commands/code.js +16 -42
- package/dist/commands/code.js.map +1 -1
- package/dist/commands/doctor.d.ts +69 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +179 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/quota.d.ts +45 -3
- package/dist/commands/quota.d.ts.map +1 -1
- package/dist/commands/quota.js +116 -60
- package/dist/commands/quota.js.map +1 -1
- package/dist/commands/read.d.ts +76 -2
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +260 -121
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/repo.d.ts +55 -4
- package/dist/commands/repo.d.ts.map +1 -1
- package/dist/commands/repo.js +115 -172
- package/dist/commands/repo.js.map +1 -1
- package/dist/commands/repository-explorer.d.ts +147 -0
- package/dist/commands/repository-explorer.d.ts.map +1 -0
- package/dist/commands/repository-explorer.js +550 -0
- package/dist/commands/repository-explorer.js.map +1 -0
- package/dist/commands/search.d.ts +27 -2
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +95 -103
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/tools.d.ts +9 -3
- package/dist/commands/tools.d.ts.map +1 -1
- package/dist/commands/tools.js +29 -59
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/vision.d.ts +35 -9
- package/dist/commands/vision.d.ts.map +1 -1
- package/dist/commands/vision.js +184 -131
- package/dist/commands/vision.js.map +1 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +580 -223
- package/dist/index.js.map +1 -1
- package/dist/lib/cache.d.ts +178 -12
- package/dist/lib/cache.d.ts.map +1 -1
- package/dist/lib/cache.js +377 -39
- package/dist/lib/cache.js.map +1 -1
- package/dist/lib/code-mode.d.ts +13 -0
- package/dist/lib/code-mode.d.ts.map +1 -1
- package/dist/lib/code-mode.js +26 -6
- package/dist/lib/code-mode.js.map +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +15 -18
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/errors.d.ts +89 -11
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +168 -21
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/execution.d.ts +190 -0
- package/dist/lib/execution.d.ts.map +1 -0
- package/dist/lib/execution.js +383 -0
- package/dist/lib/execution.js.map +1 -0
- package/dist/lib/index.d.ts +10 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +10 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/mcp-client.d.ts +75 -16
- package/dist/lib/mcp-client.d.ts.map +1 -1
- package/dist/lib/mcp-client.js +173 -108
- package/dist/lib/mcp-client.js.map +1 -1
- package/dist/lib/mcp-config.d.ts +17 -0
- package/dist/lib/mcp-config.d.ts.map +1 -1
- package/dist/lib/mcp-config.js +29 -0
- package/dist/lib/mcp-config.js.map +1 -1
- package/dist/lib/monitor-client.d.ts +17 -3
- package/dist/lib/monitor-client.d.ts.map +1 -1
- package/dist/lib/monitor-client.js +23 -69
- package/dist/lib/monitor-client.js.map +1 -1
- package/dist/lib/output.d.ts +53 -7
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +126 -39
- package/dist/lib/output.js.map +1 -1
- package/dist/lib/redact.d.ts +62 -3
- package/dist/lib/redact.d.ts.map +1 -1
- package/dist/lib/redact.js +165 -31
- package/dist/lib/redact.js.map +1 -1
- package/dist/lib/tool-cache.d.ts +86 -0
- package/dist/lib/tool-cache.d.ts.map +1 -0
- package/dist/lib/tool-cache.js +123 -0
- package/dist/lib/tool-cache.js.map +1 -0
- package/dist/lib/tty.d.ts +7 -20
- package/dist/lib/tty.d.ts.map +1 -1
- package/dist/lib/tty.js +51 -30
- package/dist/lib/tty.js.map +1 -1
- package/dist/node-command-invocation-adapter.d.ts +28 -0
- package/dist/node-command-invocation-adapter.d.ts.map +1 -0
- package/dist/node-command-invocation-adapter.js +88 -0
- package/dist/node-command-invocation-adapter.js.map +1 -0
- package/dist/providers/minimax/adapter.d.ts +49 -0
- package/dist/providers/minimax/adapter.d.ts.map +1 -0
- package/dist/providers/minimax/adapter.js +450 -0
- package/dist/providers/minimax/adapter.js.map +1 -0
- package/dist/providers/minimax/coding-plan-client.d.ts +60 -0
- package/dist/providers/minimax/coding-plan-client.d.ts.map +1 -0
- package/dist/providers/minimax/coding-plan-client.js +204 -0
- package/dist/providers/minimax/coding-plan-client.js.map +1 -0
- package/dist/providers/minimax/config.d.ts +32 -0
- package/dist/providers/minimax/config.d.ts.map +1 -0
- package/dist/providers/minimax/config.js +84 -0
- package/dist/providers/minimax/config.js.map +1 -0
- package/dist/providers/minimax/media.d.ts +88 -0
- package/dist/providers/minimax/media.d.ts.map +1 -0
- package/dist/providers/minimax/media.js +232 -0
- package/dist/providers/minimax/media.js.map +1 -0
- package/dist/providers/minimax/quota-client.d.ts +44 -0
- package/dist/providers/minimax/quota-client.d.ts.map +1 -0
- package/dist/providers/minimax/quota-client.js +83 -0
- package/dist/providers/minimax/quota-client.js.map +1 -0
- package/dist/providers/minimax/quota.d.ts +48 -0
- package/dist/providers/minimax/quota.d.ts.map +1 -0
- package/dist/providers/minimax/quota.js +120 -0
- package/dist/providers/minimax/quota.js.map +1 -0
- package/dist/providers/minimax/sdk-client.d.ts +29 -0
- package/dist/providers/minimax/sdk-client.d.ts.map +1 -0
- package/dist/providers/minimax/sdk-client.js +50 -0
- package/dist/providers/minimax/sdk-client.js.map +1 -0
- package/dist/providers/minimax/vision-attestations.d.ts +52 -0
- package/dist/providers/minimax/vision-attestations.d.ts.map +1 -0
- package/dist/providers/minimax/vision-attestations.js +79 -0
- package/dist/providers/minimax/vision-attestations.js.map +1 -0
- package/dist/providers/minimax/vision-conformance.d.ts +186 -0
- package/dist/providers/minimax/vision-conformance.d.ts.map +1 -0
- package/dist/providers/minimax/vision-conformance.js +371 -0
- package/dist/providers/minimax/vision-conformance.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/chart.d.ts +35 -0
- package/dist/providers/minimax/vision-mappings/chart.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/chart.js +55 -0
- package/dist/providers/minimax/vision-mappings/chart.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/common.d.ts +60 -0
- package/dist/providers/minimax/vision-mappings/common.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/common.js +75 -0
- package/dist/providers/minimax/vision-mappings/common.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/diagnose-error.d.ts +35 -0
- package/dist/providers/minimax/vision-mappings/diagnose-error.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/diagnose-error.js +55 -0
- package/dist/providers/minimax/vision-mappings/diagnose-error.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/diagram.d.ts +35 -0
- package/dist/providers/minimax/vision-mappings/diagram.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/diagram.js +55 -0
- package/dist/providers/minimax/vision-mappings/diagram.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/extract-text.d.ts +35 -0
- package/dist/providers/minimax/vision-mappings/extract-text.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/extract-text.js +55 -0
- package/dist/providers/minimax/vision-mappings/extract-text.js.map +1 -0
- package/dist/providers/minimax/vision-mappings/ui-artifact.d.ts +35 -0
- package/dist/providers/minimax/vision-mappings/ui-artifact.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings/ui-artifact.js +69 -0
- package/dist/providers/minimax/vision-mappings/ui-artifact.js.map +1 -0
- package/dist/providers/minimax/vision-mappings.generated.d.ts +29 -0
- package/dist/providers/minimax/vision-mappings.generated.d.ts.map +1 -0
- package/dist/providers/minimax/vision-mappings.generated.js +29 -0
- package/dist/providers/minimax/vision-mappings.generated.js.map +1 -0
- package/dist/providers/minimax/vision-revisions.d.ts +29 -0
- package/dist/providers/minimax/vision-revisions.d.ts.map +1 -0
- package/dist/providers/minimax/vision-revisions.js +34 -0
- package/dist/providers/minimax/vision-revisions.js.map +1 -0
- package/dist/providers/registry.d.ts +36 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +45 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/selection.d.ts +44 -0
- package/dist/providers/selection.d.ts.map +1 -0
- package/dist/providers/selection.js +85 -0
- package/dist/providers/selection.js.map +1 -0
- package/dist/providers/types.d.ts +281 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +127 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/zai/adapter.d.ts +35 -0
- package/dist/providers/zai/adapter.d.ts.map +1 -0
- package/dist/providers/zai/adapter.js +685 -0
- package/dist/providers/zai/adapter.js.map +1 -0
- package/dist/providers/zai/credentials.d.ts +38 -0
- package/dist/providers/zai/credentials.d.ts.map +1 -0
- package/dist/providers/zai/credentials.js +60 -0
- package/dist/providers/zai/credentials.js.map +1 -0
- package/dist/providers/zai/encoded-error.d.ts +90 -0
- package/dist/providers/zai/encoded-error.d.ts.map +1 -0
- package/dist/providers/zai/encoded-error.js +169 -0
- package/dist/providers/zai/encoded-error.js.map +1 -0
- package/dist/providers/zai/media.d.ts +38 -0
- package/dist/providers/zai/media.d.ts.map +1 -0
- package/dist/providers/zai/media.js +107 -0
- package/dist/providers/zai/media.js.map +1 -0
- package/dist/providers/zai/monitor-client.d.ts +53 -0
- package/dist/providers/zai/monitor-client.d.ts.map +1 -0
- package/dist/providers/zai/monitor-client.js +117 -0
- package/dist/providers/zai/monitor-client.js.map +1 -0
- package/dist/providers/zai/quota.d.ts +47 -0
- package/dist/providers/zai/quota.d.ts.map +1 -0
- package/dist/providers/zai/quota.js +127 -0
- package/dist/providers/zai/quota.js.map +1 -0
- package/dist/providers/zai/reader.d.ts +82 -0
- package/dist/providers/zai/reader.d.ts.map +1 -0
- package/dist/providers/zai/reader.js +490 -0
- package/dist/providers/zai/reader.js.map +1 -0
- package/dist/providers/zai/repository.d.ts +76 -0
- package/dist/providers/zai/repository.d.ts.map +1 -0
- package/dist/providers/zai/repository.js +715 -0
- package/dist/providers/zai/repository.js.map +1 -0
- package/package.json +11 -6
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* diagnose-error specialized Vision mapping (DESIGN.md §15, P5-03c).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional context hint, and the
|
|
5
|
+
* error-diagnosis intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional context hint is rendered exactly once. The mapping
|
|
8
|
+
* routes ONLY through `sdk.vision.describe` with one image — it never
|
|
9
|
+
* claims a 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 diagnose-error input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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 diagnose-error mapping Module. Satisfies the
|
|
27
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
28
|
+
* operation map.
|
|
29
|
+
*/
|
|
30
|
+
export declare const diagnoseErrorMapping: {
|
|
31
|
+
readonly operation: SpecializedVisionOperation;
|
|
32
|
+
composePrompt(request: unknown): string;
|
|
33
|
+
normalizeResult(raw: unknown): string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=diagnose-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose-error.d.ts","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/diagnose-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AA0B3E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE;IACjC,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
|
+
* diagnose-error specialized Vision mapping (DESIGN.md §15, P5-03c).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional context hint, and the
|
|
5
|
+
* error-diagnosis intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional context hint is rendered exactly once. The mapping
|
|
8
|
+
* routes ONLY through `sdk.vision.describe` with one image — it never
|
|
9
|
+
* claims a 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 diagnose-error input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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
|
+
* Error-diagnosis intent. Rendered once per prompt as the opening
|
|
27
|
+
* intent segment. Deliberately does NOT reuse the user instruction's
|
|
28
|
+
* phrasing so the instruction remains intact and distinct.
|
|
29
|
+
*/
|
|
30
|
+
const DIAGNOSE_ERROR_INTENT = "Diagnose the error shown in the image. Identify the error class, the cause, and at least one remediation.";
|
|
31
|
+
/**
|
|
32
|
+
* The diagnose-error mapping Module. Satisfies the
|
|
33
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
34
|
+
* operation map.
|
|
35
|
+
*/
|
|
36
|
+
export const diagnoseErrorMapping = {
|
|
37
|
+
operation: "diagnose-error",
|
|
38
|
+
composePrompt(request) {
|
|
39
|
+
const req = request;
|
|
40
|
+
const segments = [
|
|
41
|
+
{ kind: "intent", text: DIAGNOSE_ERROR_INTENT },
|
|
42
|
+
{ kind: "instruction", text: req.instruction },
|
|
43
|
+
];
|
|
44
|
+
// Optional context hint, rendered at most once.
|
|
45
|
+
const context = formatOptionalOption("Context", req.context);
|
|
46
|
+
if (context.length > 0) {
|
|
47
|
+
segments.push({ kind: "option", text: context });
|
|
48
|
+
}
|
|
49
|
+
return composeMappingPrompt(segments);
|
|
50
|
+
},
|
|
51
|
+
normalizeResult(raw) {
|
|
52
|
+
return normalizeMappingResult(raw);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=diagnose-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose-error.js","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/diagnose-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAYrB;;;;GAIG;AACH,MAAM,qBAAqB,GACzB,2GAA2G,CAAC;AAE9G;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAI7B;IACF,SAAS,EAAE,gBAAgB;IAC3B,aAAa,CAAC,OAAgB;QAC5B,MAAM,GAAG,GAAG,OAA+B,CAAC;QAC5C,MAAM,QAAQ,GAA2B;YACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,EAAE;YAC/C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE;SAC/C,CAAC;QACF,gDAAgD;QAChD,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,eAAe,CAAC,GAAY;QAC1B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* diagram specialized Vision mapping (DESIGN.md §15, P5-03d).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional diagram-type hint, and the
|
|
5
|
+
* diagram-interpretation intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional diagram-type hint is rendered exactly once. The mapping
|
|
8
|
+
* routes ONLY through `sdk.vision.describe` with one image — it never
|
|
9
|
+
* claims a 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 diagram 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 diagram mapping Module. Satisfies the
|
|
27
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
28
|
+
* operation map.
|
|
29
|
+
*/
|
|
30
|
+
export declare const diagramMapping: {
|
|
31
|
+
readonly operation: SpecializedVisionOperation;
|
|
32
|
+
composePrompt(request: unknown): string;
|
|
33
|
+
normalizeResult(raw: unknown): string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=diagram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram.d.ts","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/diagram.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AA0B3E;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE;IAC3B,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
|
+
* diagram specialized Vision mapping (DESIGN.md §15, P5-03d).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional diagram-type hint, and the
|
|
5
|
+
* diagram-interpretation intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional diagram-type hint is rendered exactly once. The mapping
|
|
8
|
+
* routes ONLY through `sdk.vision.describe` with one image — it never
|
|
9
|
+
* claims a 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 diagram 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
|
+
* Diagram-interpretation intent. Rendered once per prompt as the
|
|
27
|
+
* opening intent segment. Deliberately distinct from the user
|
|
28
|
+
* instruction's phrasing so the instruction remains intact.
|
|
29
|
+
*/
|
|
30
|
+
const DIAGRAM_INTENT = "Interpret the diagram shown in the image. Report each node by its label and describe how the nodes connect, including the direction of every relationship.";
|
|
31
|
+
/**
|
|
32
|
+
* The diagram mapping Module. Satisfies the
|
|
33
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
34
|
+
* operation map.
|
|
35
|
+
*/
|
|
36
|
+
export const diagramMapping = {
|
|
37
|
+
operation: "diagram",
|
|
38
|
+
composePrompt(request) {
|
|
39
|
+
const req = request;
|
|
40
|
+
const segments = [
|
|
41
|
+
{ kind: "intent", text: DIAGRAM_INTENT },
|
|
42
|
+
{ kind: "instruction", text: req.instruction },
|
|
43
|
+
];
|
|
44
|
+
// Optional diagram-type hint, rendered at most once.
|
|
45
|
+
const diagramType = formatOptionalOption("Diagram type", req.diagramType);
|
|
46
|
+
if (diagramType.length > 0) {
|
|
47
|
+
segments.push({ kind: "option", text: diagramType });
|
|
48
|
+
}
|
|
49
|
+
return composeMappingPrompt(segments);
|
|
50
|
+
},
|
|
51
|
+
normalizeResult(raw) {
|
|
52
|
+
return normalizeMappingResult(raw);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=diagram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram.js","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/diagram.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAYrB;;;;GAIG;AACH,MAAM,cAAc,GAClB,4JAA4J,CAAC;AAE/J;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAIvB;IACF,SAAS,EAAE,SAAS;IACpB,aAAa,CAAC,OAAgB;QAC5B,MAAM,GAAG,GAAG,OAAyB,CAAC;QACtC,MAAM,QAAQ,GAA2B;YACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE;YACxC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE;SAC/C,CAAC;QACF,qDAAqD;QACrD,MAAM,WAAW,GAAG,oBAAoB,CAAC,cAAc,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;QAC1E,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,eAAe,CAAC,GAAY;QAC1B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* extract-text specialized Vision mapping (DESIGN.md §15, P5-03b).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional programming-language hint,
|
|
5
|
+
* and the exact-text recovery intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional programming-language hint is rendered exactly once. The
|
|
8
|
+
* mapping routes ONLY through `sdk.vision.describe` with one image — it
|
|
9
|
+
* never claims a 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 extract-text input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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 extract-text mapping Module. Satisfies the
|
|
27
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
28
|
+
* operation map.
|
|
29
|
+
*/
|
|
30
|
+
export declare const extractTextMapping: {
|
|
31
|
+
readonly operation: SpecializedVisionOperation;
|
|
32
|
+
composePrompt(request: unknown): string;
|
|
33
|
+
normalizeResult(raw: unknown): string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=extract-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-text.d.ts","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/extract-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AA0B3E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE;IAC/B,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
|
+
* extract-text specialized Vision mapping (DESIGN.md §15, P5-03b).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, an optional programming-language hint,
|
|
5
|
+
* and the exact-text recovery intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the optional programming-language hint is rendered exactly once. The
|
|
8
|
+
* mapping routes ONLY through `sdk.vision.describe` with one image — it
|
|
9
|
+
* never claims a 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 extract-text input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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
|
+
* Exact-text recovery intent. Rendered once per prompt as the opening
|
|
27
|
+
* intent segment. Deliberately does NOT reuse the user instruction's
|
|
28
|
+
* phrasing so the instruction remains intact and distinct.
|
|
29
|
+
*/
|
|
30
|
+
const EXTRACT_TEXT_INTENT = "Recover every rendered line of text verbatim. Output each line in order; do not paraphrase, summarize, or reorder.";
|
|
31
|
+
/**
|
|
32
|
+
* The extract-text mapping Module. Satisfies the
|
|
33
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
34
|
+
* operation map.
|
|
35
|
+
*/
|
|
36
|
+
export const extractTextMapping = {
|
|
37
|
+
operation: "extract-text",
|
|
38
|
+
composePrompt(request) {
|
|
39
|
+
const req = request;
|
|
40
|
+
const segments = [
|
|
41
|
+
{ kind: "intent", text: EXTRACT_TEXT_INTENT },
|
|
42
|
+
{ kind: "instruction", text: req.instruction },
|
|
43
|
+
];
|
|
44
|
+
// Optional programming-language hint, rendered at most once.
|
|
45
|
+
const language = formatOptionalOption("Programming language", req.programmingLanguage);
|
|
46
|
+
if (language.length > 0) {
|
|
47
|
+
segments.push({ kind: "option", text: language });
|
|
48
|
+
}
|
|
49
|
+
return composeMappingPrompt(segments);
|
|
50
|
+
},
|
|
51
|
+
normalizeResult(raw) {
|
|
52
|
+
return normalizeMappingResult(raw);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=extract-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-text.js","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/extract-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAYrB;;;;GAIG;AACH,MAAM,mBAAmB,GACvB,oHAAoH,CAAC;AAEvH;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAI3B;IACF,SAAS,EAAE,cAAc;IACzB,aAAa,CAAC,OAAgB;QAC5B,MAAM,GAAG,GAAG,OAA6B,CAAC;QAC1C,MAAM,QAAQ,GAA2B;YACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE;YAC7C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE;SAC/C,CAAC;QACF,6DAA6D;QAC7D,MAAM,QAAQ,GAAG,oBAAoB,CAAC,sBAAsB,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;QACvF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,eAAe,CAAC,GAAY;QAC1B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ui-artifact specialized Vision mapping (DESIGN.md §15, P5-03a).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, the selected output form, and the
|
|
5
|
+
* UI-artifact analysis intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the output-type 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 ui-artifact input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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 ui-artifact mapping Module. Satisfies the
|
|
27
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
28
|
+
* operation map.
|
|
29
|
+
*/
|
|
30
|
+
export declare const uiArtifactMapping: {
|
|
31
|
+
readonly operation: SpecializedVisionOperation;
|
|
32
|
+
composePrompt(request: unknown): string;
|
|
33
|
+
normalizeResult(raw: unknown): string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ui-artifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-artifact.d.ts","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/ui-artifact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AA8C3E;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE;IAC9B,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;CAevC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ui-artifact specialized Vision mapping (DESIGN.md §15, P5-03a).
|
|
3
|
+
*
|
|
4
|
+
* Composes the user instruction, the selected output form, and the
|
|
5
|
+
* UI-artifact analysis intent into a single prompt for
|
|
6
|
+
* `sdk.vision.describe`. The user instruction is preserved verbatim;
|
|
7
|
+
* the output-type 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 ui-artifact input to the conformance registry's
|
|
14
|
+
* SHA-256 mapping revision. It stays unsupported at runtime until a
|
|
15
|
+
* separate opt-in live attestation flips the registry's live state to
|
|
16
|
+
* "pass" (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, } from "./common.js";
|
|
25
|
+
/**
|
|
26
|
+
* UI-artifact analysis intent. Rendered once per prompt as the opening
|
|
27
|
+
* intent segment. Deliberately does NOT mention the selected output
|
|
28
|
+
* form — that hint lives in its own option segment so operation hints
|
|
29
|
+
* are represented exactly once.
|
|
30
|
+
*/
|
|
31
|
+
const UI_ARTIFACT_INTENT = "You are analyzing a user-interface screenshot. Identify the visible page regions (such as header, sidebar, content, and footer) and produce the artifact requested below.";
|
|
32
|
+
/**
|
|
33
|
+
* Map the ui-artifact outputType to a human-readable label for the
|
|
34
|
+
* option segment. Kept here (not in common.ts) because it is
|
|
35
|
+
* operation-specific.
|
|
36
|
+
*/
|
|
37
|
+
function outputFormLabel(outputType) {
|
|
38
|
+
switch (outputType) {
|
|
39
|
+
case "code":
|
|
40
|
+
return "code (markup)";
|
|
41
|
+
case "prompt":
|
|
42
|
+
return "a prompt";
|
|
43
|
+
case "spec":
|
|
44
|
+
return "a specification";
|
|
45
|
+
case "description":
|
|
46
|
+
return "a description";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The ui-artifact mapping Module. Satisfies the
|
|
51
|
+
* {@link MiniMaxVisionMappingModule} interface declared in the generated
|
|
52
|
+
* operation map.
|
|
53
|
+
*/
|
|
54
|
+
export const uiArtifactMapping = {
|
|
55
|
+
operation: "ui-artifact",
|
|
56
|
+
composePrompt(request) {
|
|
57
|
+
const req = request;
|
|
58
|
+
const segments = [
|
|
59
|
+
{ kind: "intent", text: UI_ARTIFACT_INTENT },
|
|
60
|
+
{ kind: "option", text: `Requested output form: ${outputFormLabel(req.outputType)}` },
|
|
61
|
+
{ kind: "instruction", text: req.instruction },
|
|
62
|
+
];
|
|
63
|
+
return composeMappingPrompt(segments);
|
|
64
|
+
},
|
|
65
|
+
normalizeResult(raw) {
|
|
66
|
+
return normalizeMappingResult(raw);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=ui-artifact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-artifact.js","sourceRoot":"","sources":["../../../../src/providers/minimax/vision-mappings/ui-artifact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GAEvB,MAAM,aAAa,CAAC;AAcrB;;;;;GAKG;AACH,MAAM,kBAAkB,GACtB,2KAA2K,CAAC;AAE9K;;;;GAIG;AACH,SAAS,eAAe,CAAC,UAA2C;IAClE,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,MAAM;YACT,OAAO,eAAe,CAAC;QACzB,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,iBAAiB,CAAC;QAC3B,KAAK,aAAa;YAChB,OAAO,eAAe,CAAC;IAC3B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAI1B;IACF,SAAS,EAAE,aAAa;IACxB,aAAa,CAAC,OAAgB;QAC5B,MAAM,GAAG,GAAG,OAA4B,CAAC;QACzC,MAAM,QAAQ,GAAoC;YAChD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,kBAAkB,EAAE;YAC5C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,0BAA0B,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE;YACrF,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE;SAC/C,CAAC;QACF,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,eAAe,CAAC,GAAY;QAC1B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Regenerate with: `node scripts/generate-minimax-vision-revisions.mjs`.
|
|
5
|
+
* The prebuild step in `packages/scoutline/package.json` runs the
|
|
6
|
+
* generator before `tsc`, so this file is always fresh when the
|
|
7
|
+
* TypeScript compiler runs.
|
|
8
|
+
*
|
|
9
|
+
* The operation map connects each specialized Vision operation id to
|
|
10
|
+
* its mapping Module (`vision-mappings/{op}.ts`). Currently 5 of 5 operations have Modules.
|
|
11
|
+
*/
|
|
12
|
+
import type { SpecializedVisionOperation } from "./vision-conformance.js";
|
|
13
|
+
/**
|
|
14
|
+
* The interface every operation-specific mapping Module implements.
|
|
15
|
+
* Defined here so the generated map has a stable type even when the
|
|
16
|
+
* map itself is empty. P5-03's Modules will satisfy this shape.
|
|
17
|
+
*/
|
|
18
|
+
export interface MiniMaxVisionMappingModule {
|
|
19
|
+
readonly operation: SpecializedVisionOperation;
|
|
20
|
+
composePrompt(request: unknown): string;
|
|
21
|
+
normalizeResult(raw: unknown): string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The generated operation map. The Adapter looks up the Module for a
|
|
25
|
+
* supported operation; absence here means the operation is not wired
|
|
26
|
+
* even if its registry entry is fully passing.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MINIMAX_VISION_MAPPINGS: Readonly<Partial<Record<SpecializedVisionOperation, MiniMaxVisionMappingModule>>>;
|
|
29
|
+
//# sourceMappingURL=vision-mappings.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vision-mappings.generated.d.ts","sourceRoot":"","sources":["../../../src/providers/minimax/vision-mappings.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAO1E;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,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;CACvC;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAAC,CAOvE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Regenerate with: `node scripts/generate-minimax-vision-revisions.mjs`.
|
|
5
|
+
* The prebuild step in `packages/scoutline/package.json` runs the
|
|
6
|
+
* generator before `tsc`, so this file is always fresh when the
|
|
7
|
+
* TypeScript compiler runs.
|
|
8
|
+
*
|
|
9
|
+
* The operation map connects each specialized Vision operation id to
|
|
10
|
+
* its mapping Module (`vision-mappings/{op}.ts`). Currently 5 of 5 operations have Modules.
|
|
11
|
+
*/
|
|
12
|
+
import { uiArtifactMapping } from "./vision-mappings/ui-artifact.js";
|
|
13
|
+
import { extractTextMapping } from "./vision-mappings/extract-text.js";
|
|
14
|
+
import { diagnoseErrorMapping } from "./vision-mappings/diagnose-error.js";
|
|
15
|
+
import { diagramMapping } from "./vision-mappings/diagram.js";
|
|
16
|
+
import { chartMapping } from "./vision-mappings/chart.js";
|
|
17
|
+
/**
|
|
18
|
+
* The generated operation map. The Adapter looks up the Module for a
|
|
19
|
+
* supported operation; absence here means the operation is not wired
|
|
20
|
+
* even if its registry entry is fully passing.
|
|
21
|
+
*/
|
|
22
|
+
export const MINIMAX_VISION_MAPPINGS = Object.freeze({
|
|
23
|
+
"ui-artifact": uiArtifactMapping,
|
|
24
|
+
"extract-text": extractTextMapping,
|
|
25
|
+
"diagnose-error": diagnoseErrorMapping,
|
|
26
|
+
"diagram": diagramMapping,
|
|
27
|
+
"chart": chartMapping,
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=vision-mappings.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vision-mappings.generated.js","sourceRoot":"","sources":["../../../src/providers/minimax/vision-mappings.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAa1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAEhC,MAAM,CAAC,MAAM,CAAC;IAChB,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,oBAAoB;IACtC,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,YAAY;CACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Regenerate with: `node scripts/generate-minimax-vision-revisions.mjs`.
|
|
5
|
+
* The prebuild step in `packages/scoutline/package.json` runs the
|
|
6
|
+
* generator before `tsc`, so this file is always fresh when the
|
|
7
|
+
* TypeScript compiler runs.
|
|
8
|
+
*
|
|
9
|
+
* Each value is a SHA-256 digest covering the Implementation ID
|
|
10
|
+
* (`scoutline-direct@0.5.0`), the stable common mapping runtime
|
|
11
|
+
* (`vision-mappings/common.ts`), only that operation's mapping Module
|
|
12
|
+
* under `vision-mappings/`, the fixture image bytes, the canonical
|
|
13
|
+
* request fields, and the exact required assertion IDs. Adding another
|
|
14
|
+
* operation does not change an existing operation's revision; changing
|
|
15
|
+
* the common runtime intentionally changes every revision.
|
|
16
|
+
*
|
|
17
|
+
* The Implementation ID participates in every revision digest, so
|
|
18
|
+
* bumping it (e.g. critique C3 swapping the SDK-backed runtime for
|
|
19
|
+
* the Scoutline direct transport) regenerates the entire map. Any
|
|
20
|
+
* shipped attestation that pins `mappingRevision` must be re-issued
|
|
21
|
+
* against the new revisions before the registry will accept it
|
|
22
|
+
* (see `scripts/attest-minimax-vision.mjs`).
|
|
23
|
+
*
|
|
24
|
+
* Operations without a mapping Module carry the placeholder
|
|
25
|
+
* `"pending-no-mapping-module"` until P5-03 creates their Module.
|
|
26
|
+
*/
|
|
27
|
+
import type { SpecializedVisionOperation } from "./vision-conformance.js";
|
|
28
|
+
export declare const MINIMAX_VISION_MAPPING_REVISIONS: Readonly<Record<SpecializedVisionOperation, string>>;
|
|
29
|
+
//# sourceMappingURL=vision-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vision-revisions.d.ts","sourceRoot":"","sources":["../../../src/providers/minimax/vision-revisions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CACrD,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAO1C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Regenerate with: `node scripts/generate-minimax-vision-revisions.mjs`.
|
|
5
|
+
* The prebuild step in `packages/scoutline/package.json` runs the
|
|
6
|
+
* generator before `tsc`, so this file is always fresh when the
|
|
7
|
+
* TypeScript compiler runs.
|
|
8
|
+
*
|
|
9
|
+
* Each value is a SHA-256 digest covering the Implementation ID
|
|
10
|
+
* (`scoutline-direct@0.5.0`), the stable common mapping runtime
|
|
11
|
+
* (`vision-mappings/common.ts`), only that operation's mapping Module
|
|
12
|
+
* under `vision-mappings/`, the fixture image bytes, the canonical
|
|
13
|
+
* request fields, and the exact required assertion IDs. Adding another
|
|
14
|
+
* operation does not change an existing operation's revision; changing
|
|
15
|
+
* the common runtime intentionally changes every revision.
|
|
16
|
+
*
|
|
17
|
+
* The Implementation ID participates in every revision digest, so
|
|
18
|
+
* bumping it (e.g. critique C3 swapping the SDK-backed runtime for
|
|
19
|
+
* the Scoutline direct transport) regenerates the entire map. Any
|
|
20
|
+
* shipped attestation that pins `mappingRevision` must be re-issued
|
|
21
|
+
* against the new revisions before the registry will accept it
|
|
22
|
+
* (see `scripts/attest-minimax-vision.mjs`).
|
|
23
|
+
*
|
|
24
|
+
* Operations without a mapping Module carry the placeholder
|
|
25
|
+
* `"pending-no-mapping-module"` until P5-03 creates their Module.
|
|
26
|
+
*/
|
|
27
|
+
export const MINIMAX_VISION_MAPPING_REVISIONS = Object.freeze({
|
|
28
|
+
"ui-artifact": "7428094e0ed28452b8c76290341b08d56e6581f2de543daf803049c418fc9fe8",
|
|
29
|
+
"extract-text": "8c87d739d3aae6dc1df7c3659c68536a8237d95f9dc611a3977166b143c35ce7",
|
|
30
|
+
"diagnose-error": "f8ba9fc0c8053b3384a24395fc6100c6587c0af3280c0d96ac74f4b9f06ad18e",
|
|
31
|
+
"diagram": "a665e58f86ede08feb6100d1c74153b21715e76e47955e469c2f027b546ffdfd",
|
|
32
|
+
"chart": "1383fa97703b4833ce23001d1f36a68bb19b369c65909b9eb76aa50f7599ccf3",
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=vision-revisions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vision-revisions.js","sourceRoot":"","sources":["../../../src/providers/minimax/vision-revisions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,MAAM,CAAC,MAAM,gCAAgC,GAEzC,MAAM,CAAC,MAAM,CAAC;IAChB,aAAa,EAAE,kEAAkE;IACjF,cAAc,EAAE,kEAAkE;IAClF,gBAAgB,EAAE,kEAAkE;IACpF,SAAS,EAAE,kEAAkE;IAC7E,OAAO,EAAE,kEAAkE;CAC5E,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static Provider Registry (DESIGN.md §5, P2-05).
|
|
3
|
+
*
|
|
4
|
+
* The production registry is a static list of the two real Search
|
|
5
|
+
* Provider Descriptors, in the fixed order [zai, minimax]. It performs
|
|
6
|
+
* NO dynamic imports, accepts no package names, file paths, or
|
|
7
|
+
* externally supplied factories. Tests inject descriptor lists through
|
|
8
|
+
* the explicit optional parameters of {@link getProviderDescriptor} and
|
|
9
|
+
* {@link getConfiguredProviderDescriptors}; production uses the static
|
|
10
|
+
* built-in list by default.
|
|
11
|
+
*
|
|
12
|
+
* Boundary rules (ARCHITECTURE.md §2):
|
|
13
|
+
* - Imports the real Adapter Modules (`providers/zai/adapter.js`,
|
|
14
|
+
* `providers/minimax/adapter.js`), NOT the P2-01 stubs in `types.ts`.
|
|
15
|
+
* - Must NOT import command Modules, shared execution, or transport.
|
|
16
|
+
*/
|
|
17
|
+
import type { ProviderDescriptor, ProviderId } from "./types.js";
|
|
18
|
+
/**
|
|
19
|
+
* Built-in Provider Descriptors in canonical order. Each Descriptor is
|
|
20
|
+
* constructed once at module load with its production (no-argument)
|
|
21
|
+
* factory; the Adapters bind their real transports lazily, only inside
|
|
22
|
+
* Capability invocation.
|
|
23
|
+
*/
|
|
24
|
+
export declare const BUILT_IN_PROVIDER_DESCRIPTORS: readonly ProviderDescriptor[];
|
|
25
|
+
/**
|
|
26
|
+
* Look up a built-in Descriptor by ID. The optional `descriptors`
|
|
27
|
+
* parameter lets tests inject doubles; production defaults to the
|
|
28
|
+
* static built-in list.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getProviderDescriptor(id: ProviderId, descriptors?: readonly ProviderDescriptor[]): ProviderDescriptor;
|
|
31
|
+
/**
|
|
32
|
+
* Return the built-in Descriptors that are configured for the given
|
|
33
|
+
* environment. Pure metadata; no Adapter is constructed.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getConfiguredProviderDescriptors(env: NodeJS.ProcessEnv, descriptors?: readonly ProviderDescriptor[]): readonly ProviderDescriptor[];
|
|
36
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMjE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,kBAAkB,EAGtE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,UAAU,EACd,WAAW,GAAE,SAAS,kBAAkB,EAAkC,GACzE,kBAAkB,CAEpB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,WAAW,GAAE,SAAS,kBAAkB,EAAkC,GACzE,SAAS,kBAAkB,EAAE,CAE/B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static Provider Registry (DESIGN.md §5, P2-05).
|
|
3
|
+
*
|
|
4
|
+
* The production registry is a static list of the two real Search
|
|
5
|
+
* Provider Descriptors, in the fixed order [zai, minimax]. It performs
|
|
6
|
+
* NO dynamic imports, accepts no package names, file paths, or
|
|
7
|
+
* externally supplied factories. Tests inject descriptor lists through
|
|
8
|
+
* the explicit optional parameters of {@link getProviderDescriptor} and
|
|
9
|
+
* {@link getConfiguredProviderDescriptors}; production uses the static
|
|
10
|
+
* built-in list by default.
|
|
11
|
+
*
|
|
12
|
+
* Boundary rules (ARCHITECTURE.md §2):
|
|
13
|
+
* - Imports the real Adapter Modules (`providers/zai/adapter.js`,
|
|
14
|
+
* `providers/minimax/adapter.js`), NOT the P2-01 stubs in `types.ts`.
|
|
15
|
+
* - Must NOT import command Modules, shared execution, or transport.
|
|
16
|
+
*/
|
|
17
|
+
import { createZaiDescriptor } from "./zai/adapter.js";
|
|
18
|
+
import { createMiniMaxDescriptor } from "./minimax/adapter.js";
|
|
19
|
+
import { getProviderDescriptor as lookupProviderDescriptor, getConfiguredProviderDescriptors as lookupConfigured, } from "./types.js";
|
|
20
|
+
/**
|
|
21
|
+
* Built-in Provider Descriptors in canonical order. Each Descriptor is
|
|
22
|
+
* constructed once at module load with its production (no-argument)
|
|
23
|
+
* factory; the Adapters bind their real transports lazily, only inside
|
|
24
|
+
* Capability invocation.
|
|
25
|
+
*/
|
|
26
|
+
export const BUILT_IN_PROVIDER_DESCRIPTORS = [
|
|
27
|
+
createZaiDescriptor(),
|
|
28
|
+
createMiniMaxDescriptor(),
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Look up a built-in Descriptor by ID. The optional `descriptors`
|
|
32
|
+
* parameter lets tests inject doubles; production defaults to the
|
|
33
|
+
* static built-in list.
|
|
34
|
+
*/
|
|
35
|
+
export function getProviderDescriptor(id, descriptors = BUILT_IN_PROVIDER_DESCRIPTORS) {
|
|
36
|
+
return lookupProviderDescriptor(id, descriptors);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Return the built-in Descriptors that are configured for the given
|
|
40
|
+
* environment. Pure metadata; no Adapter is constructed.
|
|
41
|
+
*/
|
|
42
|
+
export function getConfiguredProviderDescriptors(env, descriptors = BUILT_IN_PROVIDER_DESCRIPTORS) {
|
|
43
|
+
return lookupConfigured(env, descriptors);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=registry.js.map
|