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.
- package/README.md +170 -5
- package/bin/scoutline.js +36 -15
- package/dist/capabilities/diagnostics.d.ts +97 -0
- package/dist/capabilities/diagnostics.d.ts.map +1 -0
- package/dist/capabilities/diagnostics.js +88 -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/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/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 +58 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +154 -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 +15 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +53 -54
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/repo.d.ts +8 -3
- package/dist/commands/repo.d.ts.map +1 -1
- package/dist/commands/repo.js +40 -78
- package/dist/commands/repo.js.map +1 -1
- 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 +42 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +389 -207
- package/dist/index.js.map +1 -1
- package/dist/lib/cache.d.ts +61 -0
- package/dist/lib/cache.d.ts.map +1 -1
- package/dist/lib/cache.js +74 -11
- 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 +65 -10
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +135 -19
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/execution.d.ts +76 -0
- package/dist/lib/execution.d.ts.map +1 -0
- package/dist/lib/execution.js +177 -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 +46 -11
- package/dist/lib/mcp-client.d.ts.map +1 -1
- package/dist/lib/mcp-client.js +92 -27
- 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/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 +47 -0
- package/dist/providers/minimax/adapter.d.ts.map +1 -0
- package/dist/providers/minimax/adapter.js +443 -0
- package/dist/providers/minimax/adapter.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 +34 -0
- package/dist/providers/minimax/media.d.ts.map +1 -0
- package/dist/providers/minimax/media.js +92 -0
- package/dist/providers/minimax/media.js.map +1 -0
- package/dist/providers/minimax/quota-client.d.ts +37 -0
- package/dist/providers/minimax/quota-client.d.ts.map +1 -0
- package/dist/providers/minimax/quota-client.js +78 -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 +29 -0
- package/dist/providers/minimax/vision-attestations.d.ts.map +1 -0
- package/dist/providers/minimax/vision-attestations.js +54 -0
- package/dist/providers/minimax/vision-attestations.js.map +1 -0
- package/dist/providers/minimax/vision-conformance.d.ts +184 -0
- package/dist/providers/minimax/vision-conformance.d.ts.map +1 -0
- package/dist/providers/minimax/vision-conformance.js +369 -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 +22 -0
- package/dist/providers/minimax/vision-revisions.d.ts.map +1 -0
- package/dist/providers/minimax/vision-revisions.js +27 -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 +247 -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 +619 -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/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/package.json +10 -5
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider Types (DESIGN.md §5, PRD FR-001, FR-004, NFR-004, NFR-010).
|
|
3
|
+
*
|
|
4
|
+
* This module defines the static shape of a Provider: a stable ID, the
|
|
5
|
+
* set of Capabilities it advertises, and a factory that produces an
|
|
6
|
+
* Adapter bound to a Provider context. No transport, no I/O, no
|
|
7
|
+
* credential reads occur outside Capability invocation.
|
|
8
|
+
*
|
|
9
|
+
* Phase 2 (P2-01) declares only the Search Capability; Phase 3 (P3-01)
|
|
10
|
+
* adds the `vision?: VisionCapability` slot on `ProviderAdapter` and
|
|
11
|
+
* declares the matching descriptor metadata. Quota and diagnostics
|
|
12
|
+
* attach to the `ProviderAdapter` interface in later phases. The
|
|
13
|
+
* `ProviderCapability` union already enumerates them so descriptor
|
|
14
|
+
* metadata stays forward-compatible.
|
|
15
|
+
*
|
|
16
|
+
* `BUILT_IN_PROVIDER_DESCRIPTORS` is intentionally empty in this stub
|
|
17
|
+
* file; the production registry waits for P2-05, after both real
|
|
18
|
+
* Search Adapters exist. Selection functions and tests operate on
|
|
19
|
+
* explicit descriptor lists through `getProviderDescriptor` and
|
|
20
|
+
* `getConfiguredProviderDescriptors`.
|
|
21
|
+
*/
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
// Provider identity
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
/**
|
|
26
|
+
* Built-in Provider IDs. Adding a new Provider is a Phase 2+ decision;
|
|
27
|
+
* new entries must come with a real Adapter and conformance coverage.
|
|
28
|
+
*/
|
|
29
|
+
export const PROVIDER_IDS = ["zai", "minimax"];
|
|
30
|
+
/**
|
|
31
|
+
* Built-in Provider registry. Phase 2 leaves this empty; P2-05 wires
|
|
32
|
+
* the real Z.AI and MiniMax descriptors once both Adapters exist. Tests
|
|
33
|
+
* inject descriptor lists explicitly through `getProviderDescriptor` and
|
|
34
|
+
* `getConfiguredProviderDescriptors`; the production registry is static
|
|
35
|
+
* and never accepts package names, file paths, or dynamic imports.
|
|
36
|
+
*/
|
|
37
|
+
export const BUILT_IN_PROVIDER_DESCRIPTORS = [];
|
|
38
|
+
/**
|
|
39
|
+
* Look up a descriptor by ID. Throws when the ID is unknown. The
|
|
40
|
+
* optional `descriptors` parameter lets tests inject doubles; production
|
|
41
|
+
* uses the static built-in list.
|
|
42
|
+
*/
|
|
43
|
+
export function getProviderDescriptor(id, descriptors) {
|
|
44
|
+
const list = descriptors ?? BUILT_IN_PROVIDER_DESCRIPTORS;
|
|
45
|
+
const descriptor = list.find((d) => d.id === id);
|
|
46
|
+
if (!descriptor) {
|
|
47
|
+
throw new Error(`Unknown provider "${id}". Built-in providers: ${PROVIDER_IDS.join(", ")}.`);
|
|
48
|
+
}
|
|
49
|
+
return descriptor;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Return the descriptors that are configured for the given environment.
|
|
53
|
+
* Configuration is purely metadata-driven and never constructs an
|
|
54
|
+
* Adapter.
|
|
55
|
+
*/
|
|
56
|
+
export function getConfiguredProviderDescriptors(env, descriptors) {
|
|
57
|
+
const list = descriptors ?? BUILT_IN_PROVIDER_DESCRIPTORS;
|
|
58
|
+
return list.filter((d) => d.isConfigured(env));
|
|
59
|
+
}
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
// Descriptor factories
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
/**
|
|
64
|
+
* Build the Z.AI Provider Descriptor. Phase 2 returns a stub that
|
|
65
|
+
* advertises the search Capability; P2-03 supplies the real Adapter.
|
|
66
|
+
* P3-01 extends the capability set with every current Vision operation
|
|
67
|
+
* so descriptor metadata advertises the Capability before any Adapter
|
|
68
|
+
* is constructed; the real `vision` slot arrives in P3-03.
|
|
69
|
+
*
|
|
70
|
+
* The stub keeps the Provider registerable from day one while the
|
|
71
|
+
* Search Adapter is implemented in P2-03. Throwing inside `create()`
|
|
72
|
+
* surfaces the unfinished Adapter during testing rather than silently
|
|
73
|
+
* failing later.
|
|
74
|
+
*/
|
|
75
|
+
export function createZaiDescriptor(
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
77
|
+
dependencies) {
|
|
78
|
+
return {
|
|
79
|
+
id: "zai",
|
|
80
|
+
isConfigured(env) {
|
|
81
|
+
const key = env.Z_AI_API_KEY;
|
|
82
|
+
return typeof key === "string" && /\S/.test(key);
|
|
83
|
+
},
|
|
84
|
+
capabilities() {
|
|
85
|
+
return new Set([
|
|
86
|
+
"search",
|
|
87
|
+
"vision.interpret-image",
|
|
88
|
+
"vision.ui-artifact",
|
|
89
|
+
"vision.extract-text",
|
|
90
|
+
"vision.diagnose-error",
|
|
91
|
+
"vision.diagram",
|
|
92
|
+
"vision.chart",
|
|
93
|
+
"vision.diff",
|
|
94
|
+
"vision.video",
|
|
95
|
+
"diagnostics",
|
|
96
|
+
]);
|
|
97
|
+
},
|
|
98
|
+
create() {
|
|
99
|
+
throw new Error("Z.AI Search Adapter is not yet implemented; arrives in P2-03.");
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Build the MiniMax Provider Descriptor. Phase 2 returns a stub that
|
|
105
|
+
* advertises the search Capability; P2-04 supplies the real Adapter.
|
|
106
|
+
* P3-01 advertises the general `vision.interpret-image` Capability
|
|
107
|
+
* while leaving every specialized operation out until Phase 5
|
|
108
|
+
* attests individual specialized mappings.
|
|
109
|
+
*/
|
|
110
|
+
export function createMiniMaxDescriptor(
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
112
|
+
dependencies) {
|
|
113
|
+
return {
|
|
114
|
+
id: "minimax",
|
|
115
|
+
isConfigured(env) {
|
|
116
|
+
const key = env.MINIMAX_API_KEY;
|
|
117
|
+
return typeof key === "string" && /\S/.test(key);
|
|
118
|
+
},
|
|
119
|
+
capabilities() {
|
|
120
|
+
return new Set(["search", "vision.interpret-image", "diagnostics"]);
|
|
121
|
+
},
|
|
122
|
+
create() {
|
|
123
|
+
throw new Error("MiniMax Search Adapter is not yet implemented; arrives in P2-04.");
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,CAAU,CAAC;AAmExD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAkC,EAAE,CAAC;AAE/E;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,EAAc,EACd,WAA2C;IAE3C,MAAM,IAAI,GAAG,WAAW,IAAI,6BAA6B,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,qBAAqB,EAAE,0BAA0B,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,GAAsB,EACtB,WAA2C;IAE3C,MAAM,IAAI,GAAG,WAAW,IAAI,6BAA6B,CAAC;IAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC;AAsJD,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB;AACjC,6DAA6D;AAC7D,YAAqC;IAErC,OAAO;QACL,EAAE,EAAE,KAAK;QACT,YAAY,CAAC,GAAG;YACd,MAAM,GAAG,GAAG,GAAG,CAAC,YAAY,CAAC;YAC7B,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,CAAC;QACD,YAAY;YACV,OAAO,IAAI,GAAG,CAAqB;gBACjC,QAAQ;gBACR,wBAAwB;gBACxB,oBAAoB;gBACpB,qBAAqB;gBACrB,uBAAuB;gBACvB,gBAAgB;gBAChB,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,aAAa;aACd,CAAC,CAAC;QACL,CAAC;QACD,MAAM;YACJ,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB;AACrC,6DAA6D;AAC7D,YAAyC;IAEzC,OAAO;QACL,EAAE,EAAE,SAAS;QACb,YAAY,CAAC,GAAG;YACd,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC;YAChC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,CAAC;QACD,YAAY;YACV,OAAO,IAAI,GAAG,CAAqB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,aAAa,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,MAAM;YACJ,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;QACtF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z.AI Search Adapter (DESIGN.md §5, §7, §11 — P2-03).
|
|
3
|
+
*
|
|
4
|
+
* Implements the real Z.AI Provider Descriptor with Search support.
|
|
5
|
+
* The Adapter owns credentials, transport lifecycle, Provider field
|
|
6
|
+
* mapping, and failure normalization. Shared execution owns cache and
|
|
7
|
+
* retry policy, so Adapter invocations disable client-owned cache and
|
|
8
|
+
* retries (`noCache: true, disableRetry: true`).
|
|
9
|
+
*
|
|
10
|
+
* Boundary rules (ARCHITECTURE.md §2):
|
|
11
|
+
* - May import capability types, normalized errors, Provider-specific
|
|
12
|
+
* transport (ZaiMcpClient), and Provider identity types.
|
|
13
|
+
* - Must NOT import command presentation, output mode, or another
|
|
14
|
+
* Provider's Adapter.
|
|
15
|
+
*
|
|
16
|
+
* Field mapping (DESIGN.md §7):
|
|
17
|
+
* title -> title
|
|
18
|
+
* link -> url
|
|
19
|
+
* content -> summary
|
|
20
|
+
* media -> source
|
|
21
|
+
* publish_date -> date
|
|
22
|
+
*
|
|
23
|
+
* The Adapter sends only `search_query`, domain, recency, content size,
|
|
24
|
+
* and location to the Provider. It NEVER sends count.
|
|
25
|
+
*/
|
|
26
|
+
import type { ProviderDescriptor, ZaiAdapterDependencies } from "../types.js";
|
|
27
|
+
/**
|
|
28
|
+
* Build the Z.AI Provider Descriptor. The descriptor advertises the
|
|
29
|
+
* Search Capability and constructs an Adapter whose `search` Capability
|
|
30
|
+
* owns credentials, transport lifecycle, Provider field mapping, and
|
|
31
|
+
* failure normalization. Construction is side-effect-free; transport is
|
|
32
|
+
* built and torn down per invocation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createZaiDescriptor(dependencies?: ZaiAdapterDependencies): ProviderDescriptor;
|
|
35
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/providers/zai/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAIV,kBAAkB,EAElB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAunBrB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,CAAC,EAAE,sBAAsB,GAAG,kBAAkB,CA2D7F"}
|