arcane-os 0.5.16 → 0.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +42 -19
  3. package/bin/arcane-test.mjs +16 -13
  4. package/browser-runtime/ai/browser-speech-artifacts.mjs +41 -38
  5. package/browser-runtime/ai/browser-speech-providers.mjs +53 -46
  6. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +127 -124
  7. package/browser-runtime/ai/browser-wasm.mjs +6 -3
  8. package/browser-runtime/ai/browser-wllama-runtime.mjs +26 -23
  9. package/browser-runtime/ai/model-controller.mjs +94 -91
  10. package/browser-runtime/ai/speech-worker-client.mjs +12 -9
  11. package/browser-runtime/ai/speech-worker-runtime.mjs +56 -53
  12. package/browser-runtime/dependencies/strong-type/index.js +207 -82
  13. package/browser-runtime/dependencies/strong-type/package.json +15 -6
  14. package/browser-runtime/dom-event-instrumentation.mjs +24 -20
  15. package/browser-runtime/event-manager.mjs +111 -108
  16. package/browser-runtime/speech-text.mjs +35 -0
  17. package/docs/architecture.md +1 -1
  18. package/docs/reference/README.md +8 -8
  19. package/docs/reference/ai/browser-speech.md +230 -16
  20. package/docs/reference/ai/twin-cloud.md +1 -1
  21. package/docs/reference/availability-and-normalization.md +42 -1
  22. package/docs/reference/cli.md +1 -1
  23. package/docs/reference/core/arcane-ai-contracts.md +1 -1
  24. package/docs/reference/inventory/package-api.json +60 -4
  25. package/docs/reference/inventory/runtime-components.json +2 -2
  26. package/docs/reference/inventory/runtime-modules.json +29 -31
  27. package/docs/reference/protocols.md +17 -13
  28. package/docs/reference/runtime-components.md +6 -5
  29. package/docs/reference/runtime-modules.md +212 -70
  30. package/docs/reference/sdk-api.md +197 -11
  31. package/examples/wasm-ai-demo/index.html +1 -0
  32. package/node_modules/event-pubsub/node_modules/strong-type/README.md +408 -0
  33. package/node_modules/event-pubsub/node_modules/strong-type/assets/strong-type-header.png +0 -0
  34. package/node_modules/event-pubsub/node_modules/strong-type/index.js +1151 -0
  35. package/node_modules/event-pubsub/node_modules/strong-type/licence +21 -0
  36. package/node_modules/event-pubsub/node_modules/strong-type/node.js +125 -0
  37. package/node_modules/event-pubsub/node_modules/strong-type/package.json +61 -0
  38. package/node_modules/strong-type/README.md +42 -24
  39. package/node_modules/strong-type/benchmark/core.js +324 -0
  40. package/node_modules/strong-type/index.js +207 -82
  41. package/node_modules/strong-type/package.json +14 -6
  42. package/package.json +4 -3
  43. package/runtime/arcane/components/app-bar.html +5 -2
  44. package/runtime/arcane/components/assistant-panel.html +5 -2
  45. package/runtime/arcane/components/chart.html +15 -12
  46. package/runtime/arcane/components/chat.html +118 -141
  47. package/runtime/arcane/components/dashboard-config.html +6 -3
  48. package/runtime/arcane/components/data-view.html +4 -1
  49. package/runtime/arcane/components/directory-picker.html +5 -2
  50. package/runtime/arcane/components/document-inspector.html +6 -3
  51. package/runtime/arcane/components/file-drop.html +5 -2
  52. package/runtime/arcane/components/file-inspector.html +9 -6
  53. package/runtime/arcane/components/file-manager.html +16 -13
  54. package/runtime/arcane/components/local-ai-status.html +5 -2
  55. package/runtime/arcane/components/markdown-document.html +14 -11
  56. package/runtime/arcane/components/markdown-editor.html +4 -1
  57. package/runtime/arcane/components/modal.html +4 -1
  58. package/runtime/arcane/components/output-panel.html +6 -3
  59. package/runtime/arcane/components/preferences-form.html +4 -1
  60. package/runtime/arcane/components/record-timeline.html +8 -5
  61. package/runtime/arcane/components/relationship-board.html +9 -6
  62. package/runtime/arcane/components/source-code-viewer.html +12 -9
  63. package/runtime/arcane/components/source-explanation.html +8 -5
  64. package/runtime/arcane/components/speech.html +24 -21
  65. package/runtime/arcane/components/summary-strip.html +4 -1
  66. package/runtime/arcane/components/task-progress.html +6 -3
  67. package/runtime/arcane/components/terminal-workspace.html +4 -1
  68. package/runtime/arcane/components/voice-transcription.html +11 -8
  69. package/runtime/arcane/components/web-navigator.html +5 -2
  70. package/runtime/arcane/entities/ApiModelRecord.js +5 -2
  71. package/runtime/arcane/entities/Calculation.js +5 -2
  72. package/runtime/arcane/entities/Chat.js +33 -33
  73. package/runtime/arcane/entities/CommunicationMessage.js +4 -1
  74. package/runtime/arcane/entities/CommunicationThread.js +4 -1
  75. package/runtime/arcane/entities/File.js +1 -1
  76. package/runtime/arcane/entities/Image.js +8 -5
  77. package/runtime/arcane/entities/IntentEnvelope.js +20 -17
  78. package/runtime/arcane/entities/Preference.js +9 -6
  79. package/runtime/arcane/entities/Theme.js +5 -2
  80. package/runtime/arcane/entities/User.js +11 -11
  81. package/runtime/arcane/entities/Weather.js +5 -2
  82. package/runtime/arcane/modules/AI.js +503 -187
  83. package/runtime/arcane/modules/AIPreferenceRuntime.js +5 -2
  84. package/runtime/arcane/modules/AIPreferenceTuple.js +9 -6
  85. package/runtime/arcane/modules/AIProviderRuntime.js +117 -92
  86. package/runtime/arcane/modules/AIResponseURLPolicy.js +148 -62
  87. package/runtime/arcane/modules/AIRuntimeState.js +29 -26
  88. package/runtime/arcane/modules/AnsiText.js +4 -1
  89. package/runtime/arcane/modules/ApiModelDatabase.js +22 -19
  90. package/runtime/arcane/modules/AppDataScope.js +8 -5
  91. package/runtime/arcane/modules/ArcaneCommunicationBridge.js +4 -1
  92. package/runtime/arcane/modules/ArcaneNavigationPolicy.js +8 -5
  93. package/runtime/arcane/modules/ArcaneNetworkPolicy.js +18 -15
  94. package/runtime/arcane/modules/AsyncBoundary.js +13 -10
  95. package/runtime/arcane/modules/BrowserTestSuite.js +19 -16
  96. package/runtime/arcane/modules/CalculatorEngine.js +5 -2
  97. package/runtime/arcane/modules/ChatRecords.js +18 -15
  98. package/runtime/arcane/modules/CommunicationAppController.js +9 -6
  99. package/runtime/arcane/modules/CommunicationHub.js +9 -6
  100. package/runtime/arcane/modules/CommunicationPreferences.js +4 -1
  101. package/runtime/arcane/modules/CommunicationProviderRegistry.js +4 -1
  102. package/runtime/arcane/modules/ComponentContracts.js +56 -53
  103. package/runtime/arcane/modules/ConfiguredAIChatSession.js +30 -27
  104. package/runtime/arcane/modules/ConversationActionItems.js +15 -12
  105. package/runtime/arcane/modules/ConversationClosingReport.js +11 -8
  106. package/runtime/arcane/modules/ConversationTimebox.js +28 -25
  107. package/runtime/arcane/modules/CoreLocalModelCatalog.js +17 -14
  108. package/runtime/arcane/modules/DBLS.js +7 -4
  109. package/runtime/arcane/modules/DBOPFS.js +7 -7
  110. package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +34 -31
  111. package/runtime/arcane/modules/DevelopmentWorkspace.js +4 -1
  112. package/runtime/arcane/modules/DirectoryPicker.js +8 -5
  113. package/runtime/arcane/modules/DocumentLexicalSearch.js +11 -8
  114. package/runtime/arcane/modules/DocumentNavigation.js +7 -4
  115. package/runtime/arcane/modules/Errors.js +28 -25
  116. package/runtime/arcane/modules/HTMLImport.js +7 -4
  117. package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +15 -12
  118. package/runtime/arcane/modules/LocalAIReadiness.js +21 -18
  119. package/runtime/arcane/modules/LocalAIReadinessController.js +6 -3
  120. package/runtime/arcane/modules/MD.js +1 -1
  121. package/runtime/arcane/modules/Mail.js +46 -43
  122. package/runtime/arcane/modules/MailOutbox.mjs +48 -45
  123. package/runtime/arcane/modules/MailTransport.mjs +29 -26
  124. package/runtime/arcane/modules/MarkdownSpeech.js +1 -50
  125. package/runtime/arcane/modules/MemoryRecords.js +7 -4
  126. package/runtime/arcane/modules/MessageAdvisory.js +6 -3
  127. package/runtime/arcane/modules/ModelDefinition.js +7 -4
  128. package/runtime/arcane/modules/Ollama.js +6 -3
  129. package/runtime/arcane/modules/OllamaModelIdentifier.js +4 -1
  130. package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +18 -15
  131. package/runtime/arcane/modules/PersistentAIChatSession.js +33 -30
  132. package/runtime/arcane/modules/PreferenceStore.js +20 -17
  133. package/runtime/arcane/modules/PreparedSpeech.js +485 -0
  134. package/runtime/arcane/modules/Questionnaire.js +6 -3
  135. package/runtime/arcane/modules/RecordLinkIndex.js +4 -1
  136. package/runtime/arcane/modules/RecordPassageIndex.js +9 -6
  137. package/runtime/arcane/modules/RecordReviewStore.js +12 -9
  138. package/runtime/arcane/modules/RiskSignalAnalyzer.js +4 -1
  139. package/runtime/arcane/modules/ScopedOPFSCache.js +6 -3
  140. package/runtime/arcane/modules/ScreenCapture.js +20 -17
  141. package/runtime/arcane/modules/SpeechPlayback.js +61 -28
  142. package/runtime/arcane/modules/StaticDocumentCatalog.js +33 -30
  143. package/runtime/arcane/modules/SystemAppearance.js +5 -2
  144. package/runtime/arcane/modules/SystemToolRegistry.js +6 -3
  145. package/runtime/arcane/modules/TerminalClient.js +14 -11
  146. package/runtime/arcane/modules/TerminalCommandRegistry.js +4 -1
  147. package/runtime/arcane/modules/ThemeBootstrap.js +9 -6
  148. package/runtime/arcane/modules/ThemeManager.js +5 -2
  149. package/runtime/arcane/modules/TimeGuard.js +1 -1
  150. package/runtime/arcane/modules/ToolCallRouter.js +11 -8
  151. package/runtime/arcane/modules/WaitForComponent.js +19 -16
  152. package/runtime/arcane/modules/YouTubeMedia.js +4 -1
  153. package/runtime/strong-type/index.js +1276 -352
  154. package/runtime/strong-type/package.json +69 -45
  155. package/src/app-descriptor.mjs +17 -14
  156. package/src/application-tests.mjs +4 -1
  157. package/src/cli/main.mjs +8 -5
  158. package/src/constants.mjs +4 -1
  159. package/src/dev-server.mjs +8 -5
  160. package/src/doctor.mjs +5 -2
  161. package/src/dom-event-instrumentation.mjs +24 -20
  162. package/src/errors.mjs +7 -3
  163. package/src/event-manager.mjs +111 -108
  164. package/src/event-queue.mjs +8 -5
  165. package/src/events.mjs +12 -9
  166. package/src/import-map.mjs +36 -27
  167. package/src/installed-sdk-runtime.mjs +4 -1
  168. package/src/integrated-provider-loader.mjs +9 -6
  169. package/src/mail-credentials.mjs +16 -13
  170. package/src/mail-server.mjs +53 -50
  171. package/src/mail.mjs +18 -15
  172. package/src/native-plan.mjs +12 -9
  173. package/src/native-provider-loader.mjs +7 -4
  174. package/src/packager/core.mjs +18 -15
  175. package/src/process.mjs +6 -3
  176. package/src/release-bundle.mjs +14 -11
  177. package/src/runtime.mjs +4 -1
  178. package/src/scaffold.mjs +9 -6
  179. package/src/sdk-browser-runtime.mjs +4 -1
  180. package/src/source-server.mjs +17 -14
  181. package/src/targets/index.mjs +5 -2
  182. package/src/templates/workspace-template.mjs +13 -6
  183. package/src/testing-loader.mjs +7 -4
  184. package/src/testing.mjs +10 -7
  185. package/src/toolchain.mjs +13 -10
  186. package/src/update-check.mjs +9 -6
  187. package/src/workspace-operation-lock.mjs +14 -11
  188. package/src/workspace-runtime.mjs +4 -1
  189. package/src/workspace.mjs +17 -14
  190. package/runtime/arcane/modules/AIResponseLength.js +0 -32
@@ -1,3 +1,4 @@
1
+ import Is from "../dependencies/strong-type/index.js";
1
2
  import {
2
3
  completeValueText,
3
4
  createModelController,
@@ -11,6 +12,8 @@ import {
11
12
  } from "./browser-wasm-llm-provider.mjs";
12
13
  import { BROWSER_WASM_RUNTIME_AUTHORITY } from "./browser-wllama-runtime.mjs";
13
14
 
15
+ const is = new Is(false);
16
+
14
17
  /**
15
18
  * Creates the public Arcane browser-local AI API module. The SDK owns lifecycle,
16
19
  * cache, streaming, complete response projection, and structural tool visibility; applications
@@ -24,12 +27,12 @@ function createArcaneAI({
24
27
  } = {}) {
25
28
  const selected = llm ?? provider;
26
29
  if (!selected) throw new TypeError("createArcaneAI requires an llm provider.");
27
- if (selected instanceof ModelController && security !== undefined) {
30
+ if (is.instanceCheck(selected, ModelController) && security !== undefined) {
28
31
  throw new TypeError(
29
32
  "createArcaneAI security must be configured when the existing ModelController is created.",
30
33
  );
31
34
  }
32
- const controller = selected instanceof ModelController
35
+ const controller = is.instanceCheck(selected, ModelController)
33
36
  ? selected
34
37
  : createModelController({ provider: selected, loadPolicy, security });
35
38
  const api = {
@@ -46,7 +49,7 @@ function createArcaneAI({
46
49
  };
47
50
 
48
51
  async function createChatSession(options = {}) {
49
- if (!options || typeof options !== "object" || Array.isArray(options)) {
52
+ if (!options || !is.object(options) || is.array(options)) {
50
53
  throw new TypeError("createChatSession options must be a plain object.");
51
54
  }
52
55
  if (Object.getPrototypeOf(options) !== Object.prototype) {
@@ -1,6 +1,9 @@
1
+ import Is from "../dependencies/strong-type/index.js";
1
2
  import { arcaneLogging } from '../logging.mjs';
2
3
  import { Wllama } from "./wllama/index.mjs";
3
4
 
5
+ const is = new Is(false);
6
+
4
7
  const completeValue = (value) => value;
5
8
 
6
9
  const MODULE_URL = new URL("./wllama/index.mjs", import.meta.url).href;
@@ -63,15 +66,15 @@ function runtimeCapabilitySnapshot(evidence) {
63
66
  const navigatorObject = globalThis.navigator;
64
67
  const webgpuOperational = evidence?.state === "ready" && evidence?.webgpu?.observed === true;
65
68
  return completeValue({
66
- webAssembly: typeof globalThis.WebAssembly === "object",
67
- opfs: typeof navigatorObject?.storage?.getDirectory === "function",
69
+ webAssembly: is.object(globalThis.WebAssembly),
70
+ opfs: is.function(navigatorObject?.storage?.getDirectory),
68
71
  webgpu: webgpuOperational,
69
72
  webgpuApiPresent: Boolean(navigatorObject?.gpu),
70
73
  webgpuOperational,
71
74
  webgpuEvidenceProtocol: RUNTIME_EVIDENCE_PROTOCOL,
72
75
  crossOriginIsolated: globalThis.crossOriginIsolated === true,
73
76
  secureContext: globalThis.isSecureContext === true,
74
- hardwareConcurrency: Number.isSafeInteger(navigatorObject?.hardwareConcurrency)
77
+ hardwareConcurrency: is.safeInteger(navigatorObject?.hardwareConcurrency)
75
78
  ? navigatorObject.hardwareConcurrency
76
79
  : null,
77
80
  });
@@ -80,7 +83,7 @@ function runtimeCapabilitySnapshot(evidence) {
80
83
  function normalizePositiveInteger(value, fallback) {
81
84
  if (value === undefined || value === null) return fallback;
82
85
  const number = Number(value);
83
- if (!Number.isSafeInteger(number) || number < 1) {
86
+ if (!is.safeInteger(number) || number < 1) {
84
87
  throw new RangeError("Expected a positive safe integer.");
85
88
  }
86
89
  return number;
@@ -142,7 +145,7 @@ function createEvidenceLogger(logger) {
142
145
 
143
146
  function observe(level, args) {
144
147
  for (const value of args) {
145
- if (typeof value !== "string") continue;
148
+ if (!is.string(value)) continue;
146
149
  for (const line of value.split(/\r?\n/u)) observeLine(level, line);
147
150
  }
148
151
  }
@@ -151,7 +154,7 @@ function createEvidenceLogger(logger) {
151
154
  for (const level of ["debug", "log", "warn", "error"]) {
152
155
  wrapped[level] = (...args) => {
153
156
  observe(level, args);
154
- if (typeof logger?.[level] === "function") logger[level](...args);
157
+ if (is.function(logger?.[level])) logger[level](...args);
155
158
  };
156
159
  }
157
160
 
@@ -214,7 +217,7 @@ function createStructuredStreamCapture() {
214
217
 
215
218
  function observe(value) {
216
219
  chunks += 1;
217
- if (!value || typeof value !== "object" || !Array.isArray(value.choices)) {
220
+ if (!value || !is.object(value) || !is.array(value.choices)) {
218
221
  invalid = true;
219
222
  return;
220
223
  }
@@ -227,8 +230,8 @@ function createStructuredStreamCapture() {
227
230
  if (
228
231
  choice?.index !== 0
229
232
  || !delta
230
- || typeof delta !== "object"
231
- || Array.isArray(delta)
233
+ || !is.object(delta)
234
+ || is.array(delta)
232
235
  || (delta.role !== undefined && delta.role !== "assistant")
233
236
  || (choice.finish_reason !== undefined && choice.finish_reason !== null)
234
237
  || delta.tool_calls !== undefined
@@ -239,7 +242,7 @@ function createStructuredStreamCapture() {
239
242
  return;
240
243
  }
241
244
  if (delta.content === undefined || delta.content === null) return;
242
- if (typeof delta.content !== "string") {
245
+ if (!is.string(delta.content)) {
243
246
  invalid = true;
244
247
  return;
245
248
  }
@@ -296,7 +299,7 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
296
299
  }
297
300
 
298
301
  function cancellationError(reason, fallback = "The Wllama operation was cancelled.") {
299
- return reason instanceof Error ? reason : new Error(reason ? String(reason) : fallback);
302
+ return is.error(reason) ? reason : new Error(reason ? String(reason) : fallback);
300
303
  }
301
304
 
302
305
  function trackOperation(rawOperation) {
@@ -380,7 +383,7 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
380
383
  });
381
384
  next.setCompat(null);
382
385
  for (const method of ["arcaneLoadModel", "arcaneTelemetry", "arcaneTerminate"]) {
383
- if (typeof next[method] !== "function") {
386
+ if (!is.function(next[method])) {
384
387
  throw new Error(`The packaged Wllama projection is missing public ${method}().`);
385
388
  }
386
389
  }
@@ -401,10 +404,10 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
401
404
  }
402
405
 
403
406
  async function load(files, options = {}) {
404
- if (!Array.isArray(files) || files.length === 0) {
407
+ if (!is.array(files) || files.length === 0) {
405
408
  throw new TypeError("Wllama load() requires at least one File or Blob.");
406
409
  }
407
- if (typeof globalThis.WebAssembly !== "object") {
410
+ if (!is.object(globalThis.WebAssembly)) {
408
411
  throw new Error("WebAssembly is unavailable in this browser.");
409
412
  }
410
413
  if (!globalThis.navigator?.gpu) {
@@ -435,25 +438,25 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
435
438
  loadOptions.n_ubatch = normalizePositiveInteger(options.microBatchTokens, 128);
436
439
  }
437
440
  if (options.reasoning !== undefined) {
438
- if (typeof options.reasoning !== "boolean") {
441
+ if (!is.boolean(options.reasoning)) {
439
442
  throw new TypeError("reasoning must be a boolean when provided.");
440
443
  }
441
444
  loadOptions.reasoning = options.reasoning;
442
445
  }
443
446
  if (options.chatTemplate !== undefined) {
444
- if (typeof options.chatTemplate !== "string") {
447
+ if (!is.string(options.chatTemplate)) {
445
448
  throw new TypeError("chatTemplate must be a string when provided.");
446
449
  }
447
450
  loadOptions.chat_template = options.chatTemplate;
448
451
  }
449
452
  if (options.jinja !== undefined) {
450
- if (typeof options.jinja !== "boolean") {
453
+ if (!is.boolean(options.jinja)) {
451
454
  throw new TypeError("jinja must be a boolean when provided.");
452
455
  }
453
456
  loadOptions.jinja = options.jinja;
454
457
  }
455
458
  if (options.templateDefaults !== undefined) {
456
- if (!options.templateDefaults || typeof options.templateDefaults !== "object" || Array.isArray(options.templateDefaults)) {
459
+ if (!options.templateDefaults || !is.object(options.templateDefaults) || is.array(options.templateDefaults)) {
457
460
  throw new TypeError("templateDefaults must be a plain object when provided.");
458
461
  }
459
462
  loadOptions.default_template_kwargs = { ...options.templateDefaults };
@@ -482,7 +485,7 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
482
485
  try {
483
486
  await loadOperation;
484
487
  if (pending?.engine !== next) throw new Error("Wllama load was cancelled.");
485
- if (typeof next.isModelLoaded !== "function" || next.isModelLoaded() !== true) {
488
+ if (!is.function(next.isModelLoaded) || next.isModelLoaded() !== true) {
486
489
  throw runtimeFailure(
487
490
  "ARCANE_AI_LOAD_FAILED",
488
491
  "Wllama did not confirm a successfully loaded model.",
@@ -553,13 +556,13 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
553
556
  lastObservedOperational: evidenceState.webgpu?.lastObservedOperational === true,
554
557
  },
555
558
  failure: completeValue({
556
- code: typeof error?.code === "string" ? error.code : "ARCANE_AI_RUNTIME_FAILED",
559
+ code: is.string(error?.code) ? error.code : "ARCANE_AI_RUNTIME_FAILED",
557
560
  }),
558
561
  });
559
562
  }
560
563
 
561
564
  async function inference(options, onData = null) {
562
- if (!options || typeof options !== "object" || Array.isArray(options)) {
565
+ if (!options || !is.object(options) || is.array(options)) {
563
566
  throw new TypeError("Wllama inference options must be an object.");
564
567
  }
565
568
  if (Object.hasOwn(options, "signal")) {
@@ -629,7 +632,7 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
629
632
  }
630
633
 
631
634
  function stream(options, onData) {
632
- if (typeof onData !== "function") {
635
+ if (!is.function(onData)) {
633
636
  throw new TypeError("Wllama stream() requires an onData callback.");
634
637
  }
635
638
  return inference({ ...options, stream: true }, onData);
@@ -653,7 +656,7 @@ export function createPackagedWllamaRuntime({ logger = arcaneLogging } = {}) {
653
656
 
654
657
  async function probe({ args = ["-o", "ADD"] } = {}) {
655
658
  if (engine) throw new Error("The no-model Wllama probe cannot run while a model is loaded.");
656
- if (!Array.isArray(args) || args.some((value) => typeof value !== "string")) {
659
+ if (!is.array(args) || args.some((value) => !is.string(value))) {
657
660
  throw new TypeError("Wllama probe args must be an array of strings.");
658
661
  }
659
662
  const temporary = newEngine();