@independo/inderun-web 0.2.0-dev.1 → 0.2.0-dev.11
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 +187 -1
- package/dist/core/browser-host.d.ts.map +1 -0
- package/dist/{engine.d.ts → core/engine.d.ts} +6 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/{engine.js → core/engine.js} +14 -1
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/host.d.ts.map +1 -0
- package/dist/{provider.d.ts → core/provider.d.ts} +9 -0
- package/dist/core/provider.d.ts.map +1 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/{route-planner.d.ts → core/route-planner.d.ts} +31 -8
- package/dist/core/route-planner.d.ts.map +1 -0
- package/dist/{route-planner.js → core/route-planner.js} +46 -17
- package/dist/{router.d.ts → core/router.d.ts} +11 -1
- package/dist/core/router.d.ts.map +1 -0
- package/dist/{router.js → core/router.js} +26 -20
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/onnx.d.ts +13 -0
- package/dist/onnx.d.ts.map +1 -0
- package/dist/onnx.js +12 -0
- package/dist/openai.d.ts +1 -1
- package/dist/openai.d.ts.map +1 -1
- package/dist/openai.js +1 -1
- package/dist/providers/onnx/provider.d.ts +78 -0
- package/dist/providers/onnx/provider.d.ts.map +1 -0
- package/dist/providers/onnx/provider.js +217 -0
- package/dist/providers/onnx/runtime.d.ts +110 -0
- package/dist/providers/onnx/runtime.d.ts.map +1 -0
- package/dist/providers/onnx/runtime.js +76 -0
- package/dist/providers/onnx/transformers-runtime.d.ts +72 -0
- package/dist/providers/onnx/transformers-runtime.d.ts.map +1 -0
- package/dist/providers/onnx/transformers-runtime.js +210 -0
- package/dist/{openai-provider.d.ts → providers/openai/provider.d.ts} +21 -3
- package/dist/providers/openai/provider.d.ts.map +1 -0
- package/dist/{openai-provider.js → providers/openai/provider.js} +42 -2
- package/dist/providers/system-model/chrome-runtime.d.ts +48 -0
- package/dist/providers/system-model/chrome-runtime.d.ts.map +1 -0
- package/dist/providers/system-model/chrome-runtime.js +137 -0
- package/dist/providers/system-model/provider.d.ts +67 -0
- package/dist/providers/system-model/provider.d.ts.map +1 -0
- package/dist/providers/system-model/provider.js +190 -0
- package/dist/providers/system-model/runtime.d.ts +110 -0
- package/dist/providers/system-model/runtime.d.ts.map +1 -0
- package/dist/providers/system-model/runtime.js +73 -0
- package/dist/system-model.d.ts +13 -0
- package/dist/system-model.d.ts.map +1 -0
- package/dist/system-model.js +12 -0
- package/dist/web-sdk.d.ts +23 -6
- package/dist/web-sdk.d.ts.map +1 -1
- package/dist/web-sdk.js +29 -12
- package/package.json +21 -5
- package/dist/browser-host.d.ts.map +0 -1
- package/dist/engine.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/host.d.ts.map +0 -1
- package/dist/openai-provider.d.ts.map +0 -1
- package/dist/provider.d.ts.map +0 -1
- package/dist/registry.d.ts.map +0 -1
- package/dist/route-planner.d.ts.map +0 -1
- package/dist/router.d.ts.map +0 -1
- package/dist/telemetry.d.ts.map +0 -1
- /package/dist/{browser-host.d.ts → core/browser-host.d.ts} +0 -0
- /package/dist/{browser-host.js → core/browser-host.js} +0 -0
- /package/dist/{errors.d.ts → core/errors.d.ts} +0 -0
- /package/dist/{errors.js → core/errors.js} +0 -0
- /package/dist/{host.d.ts → core/host.d.ts} +0 -0
- /package/dist/{host.js → core/host.js} +0 -0
- /package/dist/{provider.js → core/provider.js} +0 -0
- /package/dist/{registry.d.ts → core/registry.d.ts} +0 -0
- /package/dist/{registry.js → core/registry.js} +0 -0
- /package/dist/{telemetry.d.ts → core/telemetry.d.ts} +0 -0
- /package/dist/{telemetry.js → core/telemetry.js} +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { createCapabilityMismatch, createInternal, createTimeout, createUnavailable, toIndeRunException } from "../../core/errors.js";
|
|
2
|
+
import { createChromePromptApiRuntime } from "./chrome-runtime.js";
|
|
3
|
+
import { SystemModelRuntimeError } from "./runtime.js";
|
|
4
|
+
/** Default provider id of the Web member of the system-model provider family. */
|
|
5
|
+
export const DEFAULT_SYSTEM_MODEL_WEB_PROVIDER_ID = "local.system-model.web";
|
|
6
|
+
/** Task kind this provider implements in Milestone 2 (Mode 1 only). */
|
|
7
|
+
const TEXT_TO_TEXT = "text_to_text";
|
|
8
|
+
/**
|
|
9
|
+
* Local provider adapter that executes Mode-1 text-to-text requests against a browser-managed
|
|
10
|
+
* on-device model (for example Chrome's Prompt API / Gemini Nano).
|
|
11
|
+
*
|
|
12
|
+
* Unlike the ONNX Runtime provider family, this provider takes no developer-supplied model: the
|
|
13
|
+
* browser owns model availability, download, and execution. The adapter owns the IndeRun-facing
|
|
14
|
+
* contract (descriptor, capability checks, error taxonomy) and delegates everything else to an
|
|
15
|
+
* injectable {@link SystemModelRuntime}.
|
|
16
|
+
*/
|
|
17
|
+
export class SystemModelWebProvider {
|
|
18
|
+
options;
|
|
19
|
+
id;
|
|
20
|
+
runtime;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a Web system-model provider.
|
|
23
|
+
* @param options - Optional id, runtime, and timeout overrides.
|
|
24
|
+
*/
|
|
25
|
+
constructor(options = {}) {
|
|
26
|
+
this.options = options;
|
|
27
|
+
this.id = options.id ?? DEFAULT_SYSTEM_MODEL_WEB_PROVIDER_ID;
|
|
28
|
+
this.runtime = options.runtime ?? createChromePromptApiRuntime();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns static metadata used by the router for deterministic provider selection.
|
|
32
|
+
*/
|
|
33
|
+
describe() {
|
|
34
|
+
return {
|
|
35
|
+
id: this.id,
|
|
36
|
+
type: "local",
|
|
37
|
+
transport: "system_service",
|
|
38
|
+
supports: {
|
|
39
|
+
run: true,
|
|
40
|
+
streaming: false,
|
|
41
|
+
realtime: false,
|
|
42
|
+
tools: false,
|
|
43
|
+
reasoningEvents: false,
|
|
44
|
+
structuredOutput: false,
|
|
45
|
+
multimodal: false
|
|
46
|
+
},
|
|
47
|
+
cancel: "soft",
|
|
48
|
+
tasks: [TEXT_TO_TEXT],
|
|
49
|
+
privacy: {
|
|
50
|
+
dataLeavesDevice: false
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Reports dynamic provider availability for the current host.
|
|
56
|
+
*
|
|
57
|
+
* Every failure below is provider-internal detail: the shared route planner flattens it into a
|
|
58
|
+
* single `capability_unavailable` rejection carrying the returned reason.
|
|
59
|
+
*
|
|
60
|
+
* @param _host - Host services available to the engine (unused; the browser owns execution).
|
|
61
|
+
*/
|
|
62
|
+
async capabilities(_host) {
|
|
63
|
+
const availability = await this.runtime.availability();
|
|
64
|
+
return toDynamicCapabilities(availability);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Executes a normalized text-to-text task against the browser-managed on-device model.
|
|
68
|
+
* @param request - Canonical IndeRun task request.
|
|
69
|
+
* @param context - Engine execution context containing run id and host services.
|
|
70
|
+
* @returns Normalized IndeRun task result.
|
|
71
|
+
* @throws IndeRunException mapped to the standard error taxonomy.
|
|
72
|
+
*/
|
|
73
|
+
async run(request, context) {
|
|
74
|
+
const availability = await this.runtime.availability();
|
|
75
|
+
const capabilities = toDynamicCapabilities(availability);
|
|
76
|
+
if (!capabilities.available) {
|
|
77
|
+
throw createCapabilityMismatch(capabilities.reason ?? "Web system-model provider is unavailable on this host.", { providerId: this.id, runId: context.runId });
|
|
78
|
+
}
|
|
79
|
+
const messages = createMessages(request);
|
|
80
|
+
if (messages.length === 0) {
|
|
81
|
+
throw createInternal("Web system-model provider requires a prompt or messages.", {
|
|
82
|
+
providerId: this.id,
|
|
83
|
+
runId: context.runId
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const timeoutMs = request.constraints?.timeoutMs ?? this.options.timeoutMs;
|
|
87
|
+
const controller = new AbortController();
|
|
88
|
+
const timer = timeoutMs !== undefined && timeoutMs > 0
|
|
89
|
+
? setTimeout(() => controller.abort(), timeoutMs)
|
|
90
|
+
: undefined;
|
|
91
|
+
let output;
|
|
92
|
+
try {
|
|
93
|
+
output = await this.runtime.generate({
|
|
94
|
+
messages,
|
|
95
|
+
...(request.generation !== undefined ? { generation: request.generation } : {})
|
|
96
|
+
}, controller.signal);
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
throw this.mapRuntimeError(err, context);
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
if (timer !== undefined)
|
|
103
|
+
clearTimeout(timer);
|
|
104
|
+
}
|
|
105
|
+
if (typeof output.text !== "string" || output.text.length === 0) {
|
|
106
|
+
throw createInternal("Web system-model provider returned no text output.", {
|
|
107
|
+
providerId: this.id,
|
|
108
|
+
runId: context.runId
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
schemaVersion: "1.0",
|
|
113
|
+
runId: context.runId,
|
|
114
|
+
output: {
|
|
115
|
+
type: "text",
|
|
116
|
+
text: output.text
|
|
117
|
+
},
|
|
118
|
+
finishReason: output.finishReason ?? "stop",
|
|
119
|
+
telemetry: {
|
|
120
|
+
providerUsed: this.id,
|
|
121
|
+
totalMs: 0
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
mapRuntimeError(error, context) {
|
|
126
|
+
const extra = { providerId: this.id, runId: context.runId };
|
|
127
|
+
if (error instanceof SystemModelRuntimeError) {
|
|
128
|
+
const details = error.originalError !== undefined
|
|
129
|
+
? { details: { originalError: getErrorSummary(error.originalError) } }
|
|
130
|
+
: {};
|
|
131
|
+
switch (error.kind) {
|
|
132
|
+
case "capability":
|
|
133
|
+
return createCapabilityMismatch(error.message, { ...extra, ...details });
|
|
134
|
+
case "unavailable":
|
|
135
|
+
return createUnavailable(error.message, { ...extra, ...details });
|
|
136
|
+
case "timeout":
|
|
137
|
+
return createTimeout(error.message, { ...extra, ...details });
|
|
138
|
+
default:
|
|
139
|
+
return createInternal(error.message, { ...extra, ...details });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (isAbortError(error)) {
|
|
143
|
+
return createTimeout("Web system-model generation timed out.", extra);
|
|
144
|
+
}
|
|
145
|
+
return toIndeRunException(error, extra);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const REASON_PREFIX = {
|
|
149
|
+
available: undefined,
|
|
150
|
+
downloadable: "model downloadable",
|
|
151
|
+
downloading: "model downloading",
|
|
152
|
+
model_unavailable: "model unavailable",
|
|
153
|
+
api_missing: "system model API missing",
|
|
154
|
+
browser_unsupported: "browser unsupported",
|
|
155
|
+
feature_disabled: "browser feature disabled",
|
|
156
|
+
hardware_unsupported: "hardware unsupported",
|
|
157
|
+
resource_constrained: "storage or network constraints",
|
|
158
|
+
unavailable: "provider temporarily unavailable"
|
|
159
|
+
};
|
|
160
|
+
function toDynamicCapabilities(availability) {
|
|
161
|
+
if (availability.kind === "available") {
|
|
162
|
+
return { available: true };
|
|
163
|
+
}
|
|
164
|
+
const prefix = REASON_PREFIX[availability.kind];
|
|
165
|
+
const reason = availability.reason
|
|
166
|
+
? `${prefix}: ${availability.reason}`
|
|
167
|
+
: `${prefix}: the Web system-model provider is unavailable.`;
|
|
168
|
+
return { available: false, reason };
|
|
169
|
+
}
|
|
170
|
+
function createMessages(request) {
|
|
171
|
+
if (request.messages && request.messages.length > 0) {
|
|
172
|
+
return request.messages.map((message) => ({
|
|
173
|
+
role: message.role,
|
|
174
|
+
content: message.content
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
const prompt = request.prompt;
|
|
178
|
+
return prompt !== undefined && prompt.length > 0 ? [{ role: "user", content: prompt }] : [];
|
|
179
|
+
}
|
|
180
|
+
function isAbortError(error) {
|
|
181
|
+
return (typeof error === "object" &&
|
|
182
|
+
error !== null &&
|
|
183
|
+
error.name === "AbortError");
|
|
184
|
+
}
|
|
185
|
+
function getErrorSummary(error) {
|
|
186
|
+
if (error instanceof Error) {
|
|
187
|
+
return { name: error.name, message: error.message, stack: error.stack };
|
|
188
|
+
}
|
|
189
|
+
return { message: String(error) };
|
|
190
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { TaskRequest, TaskResult } from "@independo/inderun-contracts";
|
|
2
|
+
/**
|
|
3
|
+
* Capability state reported by a system-model runtime.
|
|
4
|
+
*
|
|
5
|
+
* The `reason` string uses the provider-internal capability vocabulary documented in
|
|
6
|
+
* `docs/architecture/web-system-model-provider-family.md`. It is not a public enum: the provider
|
|
7
|
+
* flattens every non-`available` kind into a single `capability_unavailable` route rejection and
|
|
8
|
+
* carries the reason as human-readable text.
|
|
9
|
+
*/
|
|
10
|
+
export type SystemModelAvailabilityKind = "available" | "downloadable" | "downloading" | "model_unavailable" | "api_missing" | "browser_unsupported" | "feature_disabled" | "hardware_unsupported" | "resource_constrained" | "unavailable";
|
|
11
|
+
/**
|
|
12
|
+
* Availability snapshot reported by a system-model runtime.
|
|
13
|
+
*/
|
|
14
|
+
export interface SystemModelAvailability {
|
|
15
|
+
/** The specific availability state the runtime observed. */
|
|
16
|
+
kind: SystemModelAvailabilityKind;
|
|
17
|
+
/** Human-readable detail describing the state; expected for every non-`available` kind. */
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Normalized conversation turn handed to a system-model runtime.
|
|
22
|
+
*/
|
|
23
|
+
export interface SystemModelPromptMessage {
|
|
24
|
+
/** The role of the author of this turn. */
|
|
25
|
+
role: "system" | "user" | "assistant";
|
|
26
|
+
/** Plain-text content of this turn. */
|
|
27
|
+
content: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Normalized generation request handed to a system-model runtime.
|
|
31
|
+
*/
|
|
32
|
+
export interface SystemModelGenerationInput {
|
|
33
|
+
/** Conversation turns, normalized from `prompt` or `messages` by the provider. */
|
|
34
|
+
messages: SystemModelPromptMessage[];
|
|
35
|
+
/** Optional generation controls copied from the task request. */
|
|
36
|
+
generation?: NonNullable<TaskRequest["generation"]>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Normalized generation result returned by a system-model runtime.
|
|
40
|
+
*/
|
|
41
|
+
export interface SystemModelGenerationOutput {
|
|
42
|
+
/** The generated text. */
|
|
43
|
+
text: string;
|
|
44
|
+
/** Optional normalized finish reason; the provider defaults to `stop`. */
|
|
45
|
+
finishReason?: TaskResult["finishReason"];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Failure category a runtime can signal so the provider maps it onto the IndeRun error taxonomy.
|
|
49
|
+
*
|
|
50
|
+
* - `capability`: the browser or hardware cannot serve this request (`CapabilityMismatch`).
|
|
51
|
+
* - `unavailable`: resource exhaustion or transient failure (`Unavailable`).
|
|
52
|
+
* - `timeout`: generation exceeded its budget or was aborted (`Timeout`).
|
|
53
|
+
* - `internal`: unexpected runtime failure (`Internal`).
|
|
54
|
+
*/
|
|
55
|
+
export type SystemModelRuntimeErrorKind = "capability" | "unavailable" | "timeout" | "internal";
|
|
56
|
+
/**
|
|
57
|
+
* Error type system-model runtime implementations throw to steer IndeRun error normalization.
|
|
58
|
+
*
|
|
59
|
+
* Anything else thrown by a runtime is normalized to `Internal`.
|
|
60
|
+
*/
|
|
61
|
+
export declare class SystemModelRuntimeError extends Error {
|
|
62
|
+
/** Failure category used by the provider to select an IndeRun error class. */
|
|
63
|
+
readonly kind: SystemModelRuntimeErrorKind;
|
|
64
|
+
/** Optional underlying error captured for telemetry details. */
|
|
65
|
+
readonly originalError?: unknown;
|
|
66
|
+
constructor(kind: SystemModelRuntimeErrorKind, message: string, originalError?: unknown);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Injectable seam between the IndeRun Web system-model provider and the browser's on-device model
|
|
70
|
+
* API.
|
|
71
|
+
*
|
|
72
|
+
* IndeRun ships a Chrome Prompt API-backed implementation as the default and a deterministic
|
|
73
|
+
* fixture for tests. The seam exposes only Mode-1 generation (no session object, no streaming
|
|
74
|
+
* method) so streaming/session support cannot leak in even as unused scaffolding.
|
|
75
|
+
*/
|
|
76
|
+
export interface SystemModelRuntime {
|
|
77
|
+
/**
|
|
78
|
+
* Checks browser API presence and model readiness. Implementations must resolve with an
|
|
79
|
+
* availability snapshot rather than throwing.
|
|
80
|
+
*/
|
|
81
|
+
availability(): Promise<SystemModelAvailability>;
|
|
82
|
+
/**
|
|
83
|
+
* Runs one Mode-1 generation. Implementations should honor `signal` where the underlying API
|
|
84
|
+
* allows it.
|
|
85
|
+
*/
|
|
86
|
+
generate(input: SystemModelGenerationInput, signal?: AbortSignal): Promise<SystemModelGenerationOutput>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Configuration for the deterministic fixture runtime.
|
|
90
|
+
*/
|
|
91
|
+
export interface FixtureSystemModelRuntimeOptions {
|
|
92
|
+
/** Availability snapshot returned by `availability`. Defaults to `{ kind: "available" }`. */
|
|
93
|
+
availability?: SystemModelAvailability;
|
|
94
|
+
/** Text or full output produced by `generate`. Defaults to a deterministic echo. */
|
|
95
|
+
respond?: (input: SystemModelGenerationInput) => string | SystemModelGenerationOutput;
|
|
96
|
+
/** Error thrown by `generate` instead of producing output. */
|
|
97
|
+
failWith?: unknown;
|
|
98
|
+
/** Artificial generation delay in milliseconds, used to exercise timeouts. */
|
|
99
|
+
delayMs?: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Creates a deterministic in-memory system-model runtime.
|
|
103
|
+
*
|
|
104
|
+
* This is the test seam for the Web system-model provider family: it proves capability checks,
|
|
105
|
+
* routing, and error normalization without depending on a real browser Prompt API implementation.
|
|
106
|
+
*
|
|
107
|
+
* @param options - Scripted availability, response, failure, and delay behavior.
|
|
108
|
+
*/
|
|
109
|
+
export declare function createFixtureSystemModelRuntime(options?: FixtureSystemModelRuntimeOptions): SystemModelRuntime;
|
|
110
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/providers/system-model/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GACnC,WAAW,GACX,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,aAAa,GACb,qBAAqB,GACrB,kBAAkB,GAClB,sBAAsB,GACtB,sBAAsB,GACtB,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,4DAA4D;IAC5D,IAAI,EAAE,2BAA2B,CAAC;IAClC,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,kFAAkF;IAClF,QAAQ,EAAE,wBAAwB,EAAE,CAAC;IACrC,iEAAiE;IACjE,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;CAC3C;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhG;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,gEAAgE;IAChE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;gBAErB,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,OAAO;CAQxF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACjD;;;OAGG;IACH,QAAQ,CACN,KAAK,EAAE,0BAA0B,EACjC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,6FAA6F;IAC7F,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,oFAAoF;IACpF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,MAAM,GAAG,2BAA2B,CAAC;IACtF,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,gCAAqC,GAC7C,kBAAkB,CA0BpB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error type system-model runtime implementations throw to steer IndeRun error normalization.
|
|
3
|
+
*
|
|
4
|
+
* Anything else thrown by a runtime is normalized to `Internal`.
|
|
5
|
+
*/
|
|
6
|
+
export class SystemModelRuntimeError extends Error {
|
|
7
|
+
/** Failure category used by the provider to select an IndeRun error class. */
|
|
8
|
+
kind;
|
|
9
|
+
/** Optional underlying error captured for telemetry details. */
|
|
10
|
+
originalError;
|
|
11
|
+
constructor(kind, message, originalError) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = "SystemModelRuntimeError";
|
|
14
|
+
this.kind = kind;
|
|
15
|
+
if (originalError !== undefined)
|
|
16
|
+
this.originalError = originalError;
|
|
17
|
+
Object.setPrototypeOf(this, SystemModelRuntimeError.prototype);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Creates a deterministic in-memory system-model runtime.
|
|
22
|
+
*
|
|
23
|
+
* This is the test seam for the Web system-model provider family: it proves capability checks,
|
|
24
|
+
* routing, and error normalization without depending on a real browser Prompt API implementation.
|
|
25
|
+
*
|
|
26
|
+
* @param options - Scripted availability, response, failure, and delay behavior.
|
|
27
|
+
*/
|
|
28
|
+
export function createFixtureSystemModelRuntime(options = {}) {
|
|
29
|
+
const availability = options.availability ?? { kind: "available" };
|
|
30
|
+
return {
|
|
31
|
+
async availability() {
|
|
32
|
+
return availability;
|
|
33
|
+
},
|
|
34
|
+
async generate(input, signal) {
|
|
35
|
+
if (options.delayMs !== undefined && options.delayMs > 0) {
|
|
36
|
+
await delay(options.delayMs, signal);
|
|
37
|
+
}
|
|
38
|
+
throwIfAborted(signal);
|
|
39
|
+
if (options.failWith !== undefined) {
|
|
40
|
+
throw options.failWith;
|
|
41
|
+
}
|
|
42
|
+
const response = options.respond ? options.respond(input) : createFixtureText(input.messages);
|
|
43
|
+
return typeof response === "string" ? { text: response } : response;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function createFixtureText(messages) {
|
|
48
|
+
const lastUserMessage = [...messages].reverse().find((message) => message.role === "user");
|
|
49
|
+
const prompt = lastUserMessage?.content ?? "";
|
|
50
|
+
return `[fixture:system-model] ${prompt}`;
|
|
51
|
+
}
|
|
52
|
+
function delay(ms, signal) {
|
|
53
|
+
return new Promise((resolve, reject) => {
|
|
54
|
+
const timer = setTimeout(() => {
|
|
55
|
+
signal?.removeEventListener("abort", onAbort);
|
|
56
|
+
resolve();
|
|
57
|
+
}, ms);
|
|
58
|
+
function onAbort() {
|
|
59
|
+
clearTimeout(timer);
|
|
60
|
+
reject(new SystemModelRuntimeError("timeout", "Fixture system-model generation was aborted."));
|
|
61
|
+
}
|
|
62
|
+
if (signal?.aborted) {
|
|
63
|
+
onAbort();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function throwIfAborted(signal) {
|
|
70
|
+
if (signal?.aborted) {
|
|
71
|
+
throw new SystemModelRuntimeError("timeout", "Fixture system-model generation was aborted.");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-specific entry point for the Web member of the system-model provider family.
|
|
3
|
+
*
|
|
4
|
+
* Kept out of the unified SDK index (`@independo/inderun-web`) so the top-level
|
|
5
|
+
* surface stays provider-agnostic. Import from `@independo/inderun-web/system-model`
|
|
6
|
+
* when registering the adapter manually or when implementing a custom
|
|
7
|
+
* `SystemModelRuntime`; most browser apps should pass `systemModel` to
|
|
8
|
+
* `createIndeRunWeb` from the main entry point instead.
|
|
9
|
+
*/
|
|
10
|
+
export { DEFAULT_SYSTEM_MODEL_WEB_PROVIDER_ID, SystemModelWebProvider, type SystemModelProviderOptions } from "./providers/system-model/provider.js";
|
|
11
|
+
export { SystemModelRuntimeError, createFixtureSystemModelRuntime, type FixtureSystemModelRuntimeOptions, type SystemModelAvailability, type SystemModelAvailabilityKind, type SystemModelGenerationInput, type SystemModelGenerationOutput, type SystemModelPromptMessage, type SystemModelRuntime, type SystemModelRuntimeErrorKind } from "./providers/system-model/runtime.js";
|
|
12
|
+
export { createChromePromptApiRuntime, type ChromePromptApiGenerationOptions, type ChromePromptApiRuntimeOptions, type PromptApiLanguageModel, type PromptApiSession } from "./providers/system-model/chrome-runtime.js";
|
|
13
|
+
//# sourceMappingURL=system-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-model.d.ts","sourceRoot":"","sources":["../src/system-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,oCAAoC,EACpC,sBAAsB,EACtB,KAAK,0BAA0B,EAChC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EACjC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,4BAA4B,EAC5B,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACtB,MAAM,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-specific entry point for the Web member of the system-model provider family.
|
|
3
|
+
*
|
|
4
|
+
* Kept out of the unified SDK index (`@independo/inderun-web`) so the top-level
|
|
5
|
+
* surface stays provider-agnostic. Import from `@independo/inderun-web/system-model`
|
|
6
|
+
* when registering the adapter manually or when implementing a custom
|
|
7
|
+
* `SystemModelRuntime`; most browser apps should pass `systemModel` to
|
|
8
|
+
* `createIndeRunWeb` from the main entry point instead.
|
|
9
|
+
*/
|
|
10
|
+
export { DEFAULT_SYSTEM_MODEL_WEB_PROVIDER_ID, SystemModelWebProvider } from "./providers/system-model/provider.js";
|
|
11
|
+
export { SystemModelRuntimeError, createFixtureSystemModelRuntime } from "./providers/system-model/runtime.js";
|
|
12
|
+
export { createChromePromptApiRuntime } from "./providers/system-model/chrome-runtime.js";
|
package/dist/web-sdk.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { type CreateBrowserHostServicesOptions } from "./browser-host.js";
|
|
2
|
-
import { IndeRun } from "./engine.js";
|
|
3
|
-
import { type
|
|
1
|
+
import { type CreateBrowserHostServicesOptions } from "./core/browser-host.js";
|
|
2
|
+
import { IndeRun } from "./core/engine.js";
|
|
3
|
+
import { type OnnxProviderOptions } from "./providers/onnx/provider.js";
|
|
4
|
+
import { type OpenAIProviderOptions } from "./providers/openai/provider.js";
|
|
5
|
+
import { type SystemModelProviderOptions } from "./providers/system-model/provider.js";
|
|
4
6
|
/**
|
|
5
7
|
* Configuration for the default Web SDK factory.
|
|
6
8
|
*/
|
|
@@ -8,7 +10,18 @@ export interface CreateIndeRunWebOptions {
|
|
|
8
10
|
/**
|
|
9
11
|
* OpenAI Responses provider configuration registered by the factory.
|
|
10
12
|
*/
|
|
11
|
-
openAI
|
|
13
|
+
openAI?: OpenAIProviderOptions;
|
|
14
|
+
/**
|
|
15
|
+
* Web ONNX Runtime provider configuration registered by the factory, for developer-supplied
|
|
16
|
+
* local models. Registering it is what makes `constraints.privacy = "local_required"` routable.
|
|
17
|
+
*/
|
|
18
|
+
onnx?: OnnxProviderOptions;
|
|
19
|
+
/**
|
|
20
|
+
* Web system-model provider configuration registered by the factory, for browser-managed
|
|
21
|
+
* on-device models (for example Chrome's Prompt API). Unlike `onnx`, this provider takes no
|
|
22
|
+
* developer-supplied model: the browser owns model availability, download, and execution.
|
|
23
|
+
*/
|
|
24
|
+
systemModel?: SystemModelProviderOptions;
|
|
12
25
|
/**
|
|
13
26
|
* Optional browser host service overrides.
|
|
14
27
|
*/
|
|
@@ -23,13 +36,17 @@ export interface CreateIndeRunWebOptions {
|
|
|
23
36
|
allowDirectOpenAIEndpoint?: boolean;
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
26
|
-
* Creates a Web SDK instance with the
|
|
39
|
+
* Creates a Web SDK instance with the configured providers registered.
|
|
40
|
+
*
|
|
41
|
+
* Pass `openAI` for cloud execution, `onnx` for developer-supplied local models, `systemModel` for
|
|
42
|
+
* browser-managed on-device models, or any combination to let routing choose between them; at
|
|
43
|
+
* least one is required.
|
|
27
44
|
*
|
|
28
45
|
* Use `openAI.auth = "none"` with a proxy endpoint for production browser apps so the OpenAI API key never ships
|
|
29
46
|
* to the client. Direct OpenAI calls require `allowDirectOpenAIEndpoint` and should resolve credentials through
|
|
30
47
|
* `authContextRef` and `SecureStorageService`.
|
|
31
48
|
*
|
|
32
|
-
* @param options -
|
|
49
|
+
* @param options - Provider configuration and optional host service overrides.
|
|
33
50
|
*/
|
|
34
51
|
export declare function createIndeRunWeb(options: CreateIndeRunWebOptions): IndeRun;
|
|
35
52
|
//# sourceMappingURL=web-sdk.d.ts.map
|
package/dist/web-sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-sdk.d.ts","sourceRoot":"","sources":["../src/web-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,
|
|
1
|
+
{"version":3,"file":"web-sdk.d.ts","sourceRoot":"","sources":["../src/web-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,gCAAgC,CAAC;IAChD;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAuB1E"}
|
package/dist/web-sdk.js
CHANGED
|
@@ -1,27 +1,44 @@
|
|
|
1
|
-
import { createBrowserHostServices } from "./browser-host.js";
|
|
2
|
-
import { IndeRun } from "./engine.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { createBrowserHostServices } from "./core/browser-host.js";
|
|
2
|
+
import { IndeRun } from "./core/engine.js";
|
|
3
|
+
import { OnnxRuntimeWebProvider } from "./providers/onnx/provider.js";
|
|
4
|
+
import { DEFAULT_OPENAI_RESPONSES_ENDPOINT, OpenAIResponsesProvider } from "./providers/openai/provider.js";
|
|
5
|
+
import { ProviderRegistry } from "./core/registry.js";
|
|
6
|
+
import { SystemModelWebProvider } from "./providers/system-model/provider.js";
|
|
5
7
|
/**
|
|
6
|
-
* Creates a Web SDK instance with the
|
|
8
|
+
* Creates a Web SDK instance with the configured providers registered.
|
|
9
|
+
*
|
|
10
|
+
* Pass `openAI` for cloud execution, `onnx` for developer-supplied local models, `systemModel` for
|
|
11
|
+
* browser-managed on-device models, or any combination to let routing choose between them; at
|
|
12
|
+
* least one is required.
|
|
7
13
|
*
|
|
8
14
|
* Use `openAI.auth = "none"` with a proxy endpoint for production browser apps so the OpenAI API key never ships
|
|
9
15
|
* to the client. Direct OpenAI calls require `allowDirectOpenAIEndpoint` and should resolve credentials through
|
|
10
16
|
* `authContextRef` and `SecureStorageService`.
|
|
11
17
|
*
|
|
12
|
-
* @param options -
|
|
18
|
+
* @param options - Provider configuration and optional host service overrides.
|
|
13
19
|
*/
|
|
14
20
|
export function createIndeRunWeb(options) {
|
|
15
|
-
|
|
21
|
+
if (!options.openAI && !options.onnx && !options.systemModel) {
|
|
22
|
+
throw new Error("createIndeRunWeb requires at least one provider configuration (openAI, onnx, and/or systemModel).");
|
|
23
|
+
}
|
|
16
24
|
const registry = new ProviderRegistry();
|
|
17
|
-
|
|
25
|
+
if (options.openAI) {
|
|
26
|
+
assertSafeOpenAIEndpoint(options.openAI, options.allowDirectOpenAIEndpoint);
|
|
27
|
+
registry.register(new OpenAIResponsesProvider(options.openAI));
|
|
28
|
+
}
|
|
29
|
+
if (options.onnx) {
|
|
30
|
+
registry.register(new OnnxRuntimeWebProvider(options.onnx));
|
|
31
|
+
}
|
|
32
|
+
if (options.systemModel) {
|
|
33
|
+
registry.register(new SystemModelWebProvider(options.systemModel));
|
|
34
|
+
}
|
|
18
35
|
return new IndeRun(registry, createBrowserHostServices(options.hostServices));
|
|
19
36
|
}
|
|
20
|
-
function assertSafeOpenAIEndpoint(
|
|
21
|
-
const endpointUrl =
|
|
22
|
-
const auth =
|
|
37
|
+
function assertSafeOpenAIEndpoint(openAI, allowDirectOpenAIEndpoint) {
|
|
38
|
+
const endpointUrl = openAI.endpointUrl ?? DEFAULT_OPENAI_RESPONSES_ENDPOINT;
|
|
39
|
+
const auth = openAI.auth ?? "authContextRef";
|
|
23
40
|
const isDirectOpenAIEndpoint = isOpenAIResponsesEndpoint(endpointUrl);
|
|
24
|
-
if (isDirectOpenAIEndpoint && auth !== "none" && !
|
|
41
|
+
if (isDirectOpenAIEndpoint && auth !== "none" && !allowDirectOpenAIEndpoint) {
|
|
25
42
|
throw new Error('createIndeRunWeb is proxy-first for browser safety. Configure openAI.endpointUrl to a server-side proxy with auth: "none", or set allowDirectOpenAIEndpoint: true for controlled direct OpenAI calls.');
|
|
26
43
|
}
|
|
27
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@independo/inderun-web",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.11",
|
|
4
4
|
"description": "TypeScript/Web SDK for IndeRun.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
"./openai": {
|
|
41
41
|
"types": "./dist/openai.d.ts",
|
|
42
42
|
"default": "./dist/openai.js"
|
|
43
|
+
},
|
|
44
|
+
"./onnx": {
|
|
45
|
+
"types": "./dist/onnx.d.ts",
|
|
46
|
+
"default": "./dist/onnx.js"
|
|
47
|
+
},
|
|
48
|
+
"./system-model": {
|
|
49
|
+
"types": "./dist/system-model.d.ts",
|
|
50
|
+
"default": "./dist/system-model.js"
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
"files": [
|
|
@@ -47,13 +55,21 @@
|
|
|
47
55
|
"README.md"
|
|
48
56
|
],
|
|
49
57
|
"dependencies": {
|
|
50
|
-
"@independo/inderun-
|
|
51
|
-
"@independo/inderun-
|
|
58
|
+
"@independo/inderun-route-core-wasm": "^0.2.0-dev.11",
|
|
59
|
+
"@independo/inderun-contracts": "^0.2.0-dev.11"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@huggingface/transformers": "^4.0.0"
|
|
63
|
+
},
|
|
64
|
+
"peerDependenciesMeta": {
|
|
65
|
+
"@huggingface/transformers": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
52
68
|
},
|
|
53
69
|
"devDependencies": {
|
|
54
|
-
"@types/node": "^26.
|
|
70
|
+
"@types/node": "^26.2.0",
|
|
55
71
|
"typescript": "^6.0.3",
|
|
56
|
-
"vitest": "^
|
|
72
|
+
"vitest": "^4.1.10"
|
|
57
73
|
},
|
|
58
74
|
"scripts": {
|
|
59
75
|
"build": "tsc -p tsconfig.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-host.d.ts","sourceRoot":"","sources":["../src/browser-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,YAAY,EACb,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IACpE;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAA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OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,GAChE,gBAAgB,CAuDlB"}
|
package/dist/host.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACb,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openai-provider.d.ts","sourceRoot":"","sources":["../src/openai-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ5E,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,2BAA2B,EAC3B,UAAU,EACX,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,iCAAiC,wCAAwC,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwBD;;;;;;GAMG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IASjD,OAAO,CAAC,QAAQ,CAAC,OAAO;IARpC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,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ot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAsC;IAEvD;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAWzC;;;OAGG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAI5C;;OAEG;IACH,IAAI,IAAI,eAAe,EAAE;IAIzB;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route-planner.d.ts","sourceRoot":"","sources":["../src/route-planner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,IAAI,sBAAsB,EACnC,iBAAiB,IAAI,kBAAkB,EACvC,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChE;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;CAC9E;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,C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IACH,SAAS,EAAE,sBAAsB,CAAC;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,MAAM;IAEf,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;gBADP,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,GAAE,YAAqC;IAGxD;;;;;;;;;OASG;IACG,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;IAc5F,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,2BAA2B;IAuBnC,OAAO,CAAC,kBAAkB;IAuF1B,OAAO,CAAC,2BAA2B;IAiCnC,OAAO,CAAC,gBAAgB;CAYzB"}
|
package/dist/telemetry.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErF,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IAC3D;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;CAGnC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|