arcane-os 0.5.13 → 0.5.14
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/CHANGELOG.md +16 -0
- package/browser-runtime/ai/browser-wasm-llm-provider.mjs +11 -10
- package/browser-runtime/ai/browser-wllama-runtime.mjs +2 -1
- package/browser-runtime/ai/model-controller.mjs +6 -5
- package/browser-runtime/ai/speech-worker-client.mjs +45 -3
- package/browser-runtime/event-manager.mjs +2 -1
- package/browser-runtime/logging.mjs +58 -0
- package/docs/reference/README.md +8 -7
- package/docs/reference/ai/browser-speech.md +46 -1
- package/docs/reference/inventory/package-api.json +30 -2
- package/docs/reference/runtime-modules.md +18 -0
- package/docs/reference/sdk-api.md +94 -8
- package/package.json +3 -2
- package/runtime/arcane/components/app-bar.html +3 -1
- package/runtime/arcane/components/chat.html +22 -20
- package/runtime/arcane/components/dashboard-config.html +3 -1
- package/runtime/arcane/components/data-maintenance.html +4 -2
- package/runtime/arcane/components/data-view.html +3 -1
- package/runtime/arcane/components/directory-picker.html +3 -1
- package/runtime/arcane/components/file-manager.html +11 -9
- package/runtime/arcane/components/header.html +5 -3
- package/runtime/arcane/components/markdown-document.html +3 -1
- package/runtime/arcane/components/markdown-editor.html +4 -2
- package/runtime/arcane/components/modal.html +3 -1
- package/runtime/arcane/components/screen-capture.html +4 -2
- package/runtime/arcane/components/speech.html +10 -8
- package/runtime/arcane/components/table.html +3 -1
- package/runtime/arcane/components/voice-transcription.html +8 -6
- package/runtime/arcane/entities/Chat.js +5 -4
- package/runtime/arcane/entities/User.js +2 -1
- package/runtime/arcane/modules/AI.js +442 -292
- package/runtime/arcane/modules/AIProviderRuntime.js +359 -82
- package/runtime/arcane/modules/CommunicationAppController.js +2 -1
- package/runtime/arcane/modules/ComponentContracts.js +3 -2
- package/runtime/arcane/modules/ConversationTimebox.js +2 -1
- package/runtime/arcane/modules/DBOPFS.js +5 -4
- package/runtime/arcane/modules/Errors.js +3 -14
- package/runtime/arcane/modules/HTMLImport.js +4 -3
- package/runtime/arcane/modules/LocalAIReadinessController.js +2 -1
- package/runtime/arcane/modules/MD.js +3 -2
- package/runtime/arcane/modules/MailOutbox.mjs +2 -1
- package/runtime/arcane/modules/PersistentAIChatSession.js +2 -1
- package/runtime/arcane/modules/ScreenCapture.js +2 -1
- package/runtime/arcane/modules/ThemeBootstrap.js +3 -2
- package/runtime/arcane/modules/ToolCallRouter.js +2 -1
- package/src/import-map.mjs +65 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Arcane OS SDK JavaScript API
|
|
2
2
|
|
|
3
3
|
The npm package exposes a Node.js ESM control plane, the portable
|
|
4
|
-
`arcane-os/event-manager`, `arcane-os/mail`, `arcane-os/preference-store`, and
|
|
4
|
+
`arcane-os/event-manager`, `arcane-os/logging`, `arcane-os/mail`, `arcane-os/preference-store`, and
|
|
5
5
|
`arcane-os/speech-playback` entrypoints, and the browser-only
|
|
6
6
|
`arcane-os/ai/browser-wasm` and `arcane-os/ai/browser-speech` entrypoints.
|
|
7
7
|
Those package subpaths are distinct from application-facing projection modules
|
|
@@ -18,7 +18,7 @@ This table is the Node `package.json#exports` map: it defines package
|
|
|
18
18
|
entrypoints for SDK/tooling code. It is distinct from the generated browser
|
|
19
19
|
import map that resolves application-facing `arcane/*` modules and the focused
|
|
20
20
|
EventManager entry. See [browser runtime delivery](protocols.md#browser-runtime-delivery)
|
|
21
|
-
for the installed-inventory-derived physical-runtime contract in SDK `0.5.
|
|
21
|
+
for the installed-inventory-derived physical-runtime contract in SDK `0.5.14`.
|
|
22
22
|
|
|
23
23
|
| Specifier | Purpose |
|
|
24
24
|
| --- | --- |
|
|
@@ -33,6 +33,7 @@ for the installed-inventory-derived physical-runtime contract in SDK `0.5.12`.
|
|
|
33
33
|
| `arcane-os/packager` | Low-level browser app packager. |
|
|
34
34
|
| `arcane-os/release-bundle` | Deterministic external release bundles. |
|
|
35
35
|
| `arcane-os/event-manager` | Central synchronous events, complete time-travel history, playback, and optional DOM instrumentation. |
|
|
36
|
+
| `arcane-os/logging` | Shared console diagnostics controlled by the existing `user.developer` preference. |
|
|
36
37
|
| `arcane-os/preference-store` | Portable preference records and injected storage adapters. |
|
|
37
38
|
| `arcane-os/speech-playback` | Portable speech preparation, playback state, and injected media adapters. |
|
|
38
39
|
| `arcane-os/ai/browser-wasm` | Caller-selected browser-local Wllama inference, complete DBOPFS model storage, streaming, cancellation, and structural tool-call results. |
|
|
@@ -52,7 +53,7 @@ Protocol mechanics are intentionally kept in the [deep protocol guide](protocols
|
|
|
52
53
|
|
|
53
54
|
## Canonical member inventory
|
|
54
55
|
|
|
55
|
-
The current JavaScript member total is derived mechanically from every
|
|
56
|
+
The current JavaScript member total is derived mechanically from every JavaScript
|
|
56
57
|
entrypoint in `package.json#exports`. Records are grouped by export name and
|
|
57
58
|
`Object.is()` binding identity, then retain the sorted entrypoints that expose
|
|
58
59
|
that binding; `memberCount` in
|
|
@@ -259,6 +260,8 @@ browser map are cataloged separately in [Runtime modules](runtime-modules.md).
|
|
|
259
260
|
| `resolveMailConfig()` | function | `arcane-os/mail` | Portable Mail | Node with explicit configuration, or browser/native WebView with optional document and location defaults |
|
|
260
261
|
| `sendMailReport()` | function | `arcane-os/mail` | Portable Mail | Node and browser with Fetch and AbortController, or an explicit fetch implementation |
|
|
261
262
|
| `serializeMailReport()` | function | `arcane-os/mail` | Portable Mail | Node and browser |
|
|
263
|
+
| `arcaneLogging` | singleton | `arcane-os/logging` | Shared logging | Node and browser |
|
|
264
|
+
| `readArcaneDeveloperMode()` | function | `arcane-os/logging` | Shared logging | Node and browser |
|
|
262
265
|
|
|
263
266
|
# Packaging and release bundles
|
|
264
267
|
|
|
@@ -748,7 +751,7 @@ deterministic map. The package root also contains the public
|
|
|
748
751
|
{
|
|
749
752
|
schemaVersion: 1,
|
|
750
753
|
kind: 'arcane-app-runtime-projection',
|
|
751
|
-
sdkVersion: '0.5.
|
|
754
|
+
sdkVersion: '0.5.14',
|
|
752
755
|
pathPrefix: 'arcane/',
|
|
753
756
|
files: [{path}]
|
|
754
757
|
}
|
|
@@ -2667,7 +2670,7 @@ The import-map operation also reports the stable operation-specific strings
|
|
|
2667
2670
|
`ARCANE_IMPORT_MAP_INVALID`, `ARCANE_IMPORT_MAP_UNRESOLVED`, and
|
|
2668
2671
|
`ARCANE_IMPORT_MAP_COLLISION`; package assembly can additionally report
|
|
2669
2672
|
`ARCANE_IMPORT_MAP_CLEANUP_FAILED`. They are normalized `ArcaneError.code`
|
|
2670
|
-
values, but are not properties added to this general registry in SDK `0.5.
|
|
2673
|
+
values, but are not properties added to this general registry in SDK `0.5.14`.
|
|
2671
2674
|
|
|
2672
2675
|
### Value and import
|
|
2673
2676
|
|
|
@@ -3437,7 +3440,7 @@ workspace it additionally returns the exact installed package authority:
|
|
|
3437
3440
|
packageSource,
|
|
3438
3441
|
canonicalPackageRoot,
|
|
3439
3442
|
packageName: 'arcane-os',
|
|
3440
|
-
packageVersion: '0.5.
|
|
3443
|
+
packageVersion: '0.5.14',
|
|
3441
3444
|
runtimeRoot,
|
|
3442
3445
|
browserRuntimeRoot
|
|
3443
3446
|
}
|
|
@@ -3445,9 +3448,9 @@ workspace it additionally returns the exact installed package authority:
|
|
|
3445
3448
|
```
|
|
3446
3449
|
|
|
3447
3450
|
The dependency can be named `arcane-os` or be one exact npm alias for
|
|
3448
|
-
`npm:arcane-os@0.5.
|
|
3451
|
+
`npm:arcane-os@0.5.14`. The selected installation must still be one direct,
|
|
3449
3452
|
physical, non-link package directory whose manifest identifies exactly as
|
|
3450
|
-
`arcane-os@0.5.
|
|
3453
|
+
`arcane-os@0.5.14`; duplicate canonical/alias declarations reject.
|
|
3451
3454
|
`allowMissingManagedImportMap` is an internal packaging/development seam. An
|
|
3452
3455
|
ordinary caller should leave it `false`.
|
|
3453
3456
|
|
|
@@ -6728,6 +6731,89 @@ import {serializeMailReport} from 'arcane-os/mail';
|
|
|
6728
6731
|
const body = serializeMailReport(report);
|
|
6729
6732
|
```
|
|
6730
6733
|
|
|
6734
|
+
# Shared logging
|
|
6735
|
+
|
|
6736
|
+
## arcaneLogging
|
|
6737
|
+
|
|
6738
|
+
### Overview
|
|
6739
|
+
|
|
6740
|
+
Shared console owner for Arcane runtime and application diagnostics. Available
|
|
6741
|
+
in SDK `0.5.14`, it reads the existing `user.developer` preference on every
|
|
6742
|
+
diagnostic emission after the shared user is ready. Enable developer mode in
|
|
6743
|
+
the application's profile settings. There is no separate verbosity setting.
|
|
6744
|
+
See [speech developer diagnostics](ai/browser-speech.md#developer-diagnostics)
|
|
6745
|
+
for API calls, generation queue state, and playback events.
|
|
6746
|
+
|
|
6747
|
+
### Signature and result
|
|
6748
|
+
|
|
6749
|
+
```text
|
|
6750
|
+
const arcaneLogging
|
|
6751
|
+
arcaneLogging.enabled
|
|
6752
|
+
arcaneLogging.log(...args)
|
|
6753
|
+
arcaneLogging.info(...args)
|
|
6754
|
+
arcaneLogging.debug(...args)
|
|
6755
|
+
arcaneLogging.warn(...args)
|
|
6756
|
+
arcaneLogging.error(...args)
|
|
6757
|
+
arcaneLogging.trace(...args)
|
|
6758
|
+
```
|
|
6759
|
+
|
|
6760
|
+
`enabled` is a boolean getter for the current shared preference, not another
|
|
6761
|
+
setting. `log`, `info`, and `debug` forward to `console.info` when enabled, so
|
|
6762
|
+
diagnostics appear at the console's normal Info level. `warn`, `error`, and
|
|
6763
|
+
failure `trace` calls forward to their corresponding console methods in either
|
|
6764
|
+
mode. Each method returns `undefined`; a console failure does not change the
|
|
6765
|
+
operation being observed.
|
|
6766
|
+
|
|
6767
|
+
### Availability and normalization
|
|
6768
|
+
|
|
6769
|
+
**Node and browser.** Imports reuse the same realm-local owner through
|
|
6770
|
+
`Symbol.for('arcane.logging')`, also exposed as `globalThis.arcaneLogging`.
|
|
6771
|
+
Arguments pass to the host console unchanged, including complete object
|
|
6772
|
+
references. The logger does not serialize content, retain diagnostic history,
|
|
6773
|
+
write storage, or send network requests. Diagnostics remain disabled while
|
|
6774
|
+
the shared user is not ready. The logger does not select a language or change
|
|
6775
|
+
speech generation and playback behavior.
|
|
6776
|
+
|
|
6777
|
+
### Example
|
|
6778
|
+
|
|
6779
|
+
```javascript
|
|
6780
|
+
import {arcaneLogging} from 'arcane-os/logging';
|
|
6781
|
+
|
|
6782
|
+
arcaneLogging.info('AI request', request);
|
|
6783
|
+
arcaneLogging.info('AI response', parsedResponse);
|
|
6784
|
+
```
|
|
6785
|
+
|
|
6786
|
+
## readArcaneDeveloperMode()
|
|
6787
|
+
|
|
6788
|
+
### Overview
|
|
6789
|
+
|
|
6790
|
+
Reads the same developer-mode preference used by `arcaneLogging`, preserving
|
|
6791
|
+
the unloaded-user state without creating or changing a setting.
|
|
6792
|
+
|
|
6793
|
+
### Signature and result
|
|
6794
|
+
|
|
6795
|
+
```text
|
|
6796
|
+
readArcaneDeveloperMode(target=globalThis)
|
|
6797
|
+
```
|
|
6798
|
+
|
|
6799
|
+
`target` supplies the shared `user`. The result is `null` until
|
|
6800
|
+
`target.user.ready === true`, then `true` only when
|
|
6801
|
+
`target.user.developer === true`; other loaded preference values return
|
|
6802
|
+
`false`. If preference access throws, the reader returns `false`.
|
|
6803
|
+
|
|
6804
|
+
### Availability and normalization
|
|
6805
|
+
|
|
6806
|
+
**Node and browser.** Reads the supplied target synchronously. It performs no
|
|
6807
|
+
subscription, write, or logging, and does not cache the preference.
|
|
6808
|
+
|
|
6809
|
+
### Example
|
|
6810
|
+
|
|
6811
|
+
```javascript
|
|
6812
|
+
import {readArcaneDeveloperMode} from 'arcane-os/logging';
|
|
6813
|
+
|
|
6814
|
+
const developerMode=readArcaneDeveloperMode();
|
|
6815
|
+
```
|
|
6816
|
+
|
|
6731
6817
|
## Data export subpaths
|
|
6732
6818
|
|
|
6733
6819
|
The package also exposes eight JSON Schemas (including `arcane-os/schemas/event-stack.json`) and its package manifest. These are data contracts, not callable JavaScript members. See [schema contracts](../architecture.md) and the files under `schemas/`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcane-os",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.mjs",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"./toolchain": "./src/toolchain.mjs",
|
|
14
14
|
"./events": "./src/events.mjs",
|
|
15
15
|
"./event-manager": "./src/event-manager.mjs",
|
|
16
|
+
"./logging": "./browser-runtime/logging.mjs",
|
|
16
17
|
"./preference-store": "./runtime/arcane/modules/PreferenceStore.js",
|
|
17
18
|
"./speech-playback": "./runtime/arcane/modules/SpeechPlayback.js",
|
|
18
19
|
"./ai/browser-wasm": "./browser-runtime/ai/browser-wasm.mjs",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"test:unit": "node ./bin/arcane-test.mjs test/app-descriptor.test.mjs test/app-schema.test.mjs test/contracts.test.mjs test/doctor.test.mjs test/mail-credentials.test.mjs test/mail-outbox.test.mjs test/mail-public-api.test.mjs test/mail-send.test.mjs test/mail-transport.test.mjs test/targets.test.mjs test/workspace-operation-lock.test.mjs",
|
|
66
67
|
"test:functional": "node ./bin/arcane-test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/cli.test.mjs test/dbopfs-document-library.test.mjs test/dev-server.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/import-map.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/packaging.test.mjs test/persistent-ai-chat-session.test.mjs test/reference-completeness.test.mjs test/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/site.test.mjs test/update-check.test.mjs",
|
|
67
68
|
"test:integration": "node ./bin/arcane-test.mjs test/integrated-shared.test.mjs test/integrated-workspace.test.mjs test/mail-browser.test.mjs test/native-plan.test.mjs test/native-provider-loader.test.mjs test/npm-release.test.mjs test/release-bundle.test.mjs test/release-capability-smoke.test.mjs test/shared-payload-batch.test.mjs test/tarball.test.mjs test/wllama-webgpu-runtime.test.mjs",
|
|
68
|
-
"test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/native-provider-generation.test.mjs test/testing.test.mjs test/test-sets.test.mjs",
|
|
69
|
+
"test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/logging-regression.test.mjs test/native-provider-generation.test.mjs test/speech-queue-regression.test.mjs test/testing.test.mjs test/test-sets.test.mjs",
|
|
69
70
|
"check": "node tools/check-source.mjs && npm test",
|
|
70
71
|
"check:release": "node tools/check-source.mjs --package-only && npm run test:release",
|
|
71
72
|
"pack:local": "npm pack --ignore-scripts",
|
|
@@ -220,6 +220,8 @@
|
|
|
220
220
|
</nav>
|
|
221
221
|
|
|
222
222
|
<script type="module">
|
|
223
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
224
|
+
|
|
223
225
|
const host=this;
|
|
224
226
|
const root=host.shadowRoot;
|
|
225
227
|
const {createArcaneEventSource,projectArcaneDOMEvent}=await import('arcane-os/event-manager');
|
|
@@ -349,7 +351,7 @@
|
|
|
349
351
|
try{
|
|
350
352
|
setNavigation(JSON.parse(source));
|
|
351
353
|
}catch(error){
|
|
352
|
-
|
|
354
|
+
arcaneLogging.warn('Unable to parse app-bar data-navigation.',error);
|
|
353
355
|
setNavigation([]);
|
|
354
356
|
}
|
|
355
357
|
}
|
|
@@ -832,7 +832,9 @@
|
|
|
832
832
|
</section>
|
|
833
833
|
</section>
|
|
834
834
|
|
|
835
|
-
<script type="module">
|
|
835
|
+
<script type="module">
|
|
836
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
837
|
+
|
|
836
838
|
const {
|
|
837
839
|
createArcaneEventSource,
|
|
838
840
|
projectArcaneDOMEvent
|
|
@@ -1059,7 +1061,7 @@
|
|
|
1059
1061
|
return value||fallback;
|
|
1060
1062
|
}
|
|
1061
1063
|
if(value&&typeof value==='object'){
|
|
1062
|
-
|
|
1064
|
+
arcaneLogging.error(`Arcane chat progress ${field} is not text.`,value);
|
|
1063
1065
|
return visibleErrorMessage(value,fallback);
|
|
1064
1066
|
}
|
|
1065
1067
|
if(value!==undefined&&value!==null&&value!==''){
|
|
@@ -1067,7 +1069,7 @@
|
|
|
1067
1069
|
`Arcane chat progress ${field} must be text.`,
|
|
1068
1070
|
{cause:value}
|
|
1069
1071
|
);
|
|
1070
|
-
|
|
1072
|
+
arcaneLogging.error(`Arcane chat progress ${field} is not text.`,error);
|
|
1071
1073
|
}
|
|
1072
1074
|
return fallback;
|
|
1073
1075
|
}
|
|
@@ -1394,7 +1396,7 @@
|
|
|
1394
1396
|
const serialized=JSON.stringify(value,null,2);
|
|
1395
1397
|
if(serialized!==undefined) return serialized;
|
|
1396
1398
|
}catch(error){
|
|
1397
|
-
|
|
1399
|
+
arcaneLogging.error('Arcane saved chat record could not be serialized as JSON.',error);
|
|
1398
1400
|
}
|
|
1399
1401
|
return String(value);
|
|
1400
1402
|
}
|
|
@@ -1506,7 +1508,7 @@
|
|
|
1506
1508
|
recoveryNeeded=true;
|
|
1507
1509
|
actionable=false;
|
|
1508
1510
|
restoredPendingToolCalls.clear();
|
|
1509
|
-
|
|
1511
|
+
arcaneLogging.error(`Arcane saved chat record ${index+1} is not actionable.`,error);
|
|
1510
1512
|
item=createSavedRecordFallback(message,index);
|
|
1511
1513
|
}
|
|
1512
1514
|
fragment.append(item);
|
|
@@ -1617,7 +1619,7 @@
|
|
|
1617
1619
|
}catch(error){
|
|
1618
1620
|
if(!destroyed&&generation===sessionBindingGeneration){
|
|
1619
1621
|
const internalProtocolFailure=internalStructuralToolFailure(error);
|
|
1620
|
-
|
|
1622
|
+
arcaneLogging.error('Arcane saved chat could not be opened.',error);
|
|
1621
1623
|
const message=internalProtocolFailure
|
|
1622
1624
|
?'This saved chat could not be opened.'
|
|
1623
1625
|
:visibleErrorMessage(error,'The chat session could not be opened.');
|
|
@@ -1738,11 +1740,11 @@
|
|
|
1738
1740
|
}
|
|
1739
1741
|
|
|
1740
1742
|
host.sendMessage=host.sendMessage||async function(text=''){
|
|
1741
|
-
|
|
1743
|
+
arcaneLogging.warn('html-import chat.html `host.sendMessage` method not implemented.\n\nThis can also be done by listening for the "chat-send-message" event.\n\nIt is still best practice to implement the `.sendMessage` method atleast with an empty function.\n\n')
|
|
1742
1744
|
}
|
|
1743
1745
|
|
|
1744
1746
|
host.languageChanged=host.languageChanged||async function(text=''){
|
|
1745
|
-
|
|
1747
|
+
arcaneLogging.warn('html-import chat.html `host.languageChanged` method not implemented.\n\nThis can also be done by listening for the "chat-language-changed" event.\n\nIt is still best practice to implement the `.languageChanged` method atleast with an empty function.\n\n')
|
|
1746
1748
|
}
|
|
1747
1749
|
|
|
1748
1750
|
host.requestAIActivation=host.requestAIActivation||function requestAIActivation(intent){
|
|
@@ -2381,7 +2383,7 @@
|
|
|
2381
2383
|
`The language model ${action} request failed.`
|
|
2382
2384
|
);
|
|
2383
2385
|
requestError=message;
|
|
2384
|
-
|
|
2386
|
+
arcaneLogging.error('Arcane language model activation request failed.',error);
|
|
2385
2387
|
publish(
|
|
2386
2388
|
'chat-ai-activation-error',
|
|
2387
2389
|
{request,error,message},
|
|
@@ -2420,7 +2422,7 @@
|
|
|
2420
2422
|
&&nextRole.error
|
|
2421
2423
|
&&nextRole.error!==role?.error
|
|
2422
2424
|
){
|
|
2423
|
-
|
|
2425
|
+
arcaneLogging.error('Arcane language model runtime failed.',nextRole.error);
|
|
2424
2426
|
}
|
|
2425
2427
|
if(role?.state!==nextRole.state
|
|
2426
2428
|
||role?.providerId!==nextRole.providerId
|
|
@@ -2501,7 +2503,7 @@
|
|
|
2501
2503
|
try{
|
|
2502
2504
|
controller.start();
|
|
2503
2505
|
}catch(error){
|
|
2504
|
-
|
|
2506
|
+
arcaneLogging.error('Arcane conversation timebox could not start.',error);
|
|
2505
2507
|
conversationTimeboxStatus.textContent='The elapsed timer could not start.';
|
|
2506
2508
|
conversationTimeboxPanel.dataset.error='true';
|
|
2507
2509
|
conversationTimeboxUnsubscribe?.();
|
|
@@ -2694,7 +2696,7 @@
|
|
|
2694
2696
|
}
|
|
2695
2697
|
}
|
|
2696
2698
|
);
|
|
2697
|
-
|
|
2699
|
+
arcaneLogging.error('The conversation timebox message could not be sent.',error);
|
|
2698
2700
|
return false;
|
|
2699
2701
|
}
|
|
2700
2702
|
);
|
|
@@ -2746,7 +2748,7 @@
|
|
|
2746
2748
|
async function streamMessage(text='', id='', isThinking){
|
|
2747
2749
|
if(typeof text!=='string'){
|
|
2748
2750
|
if(text instanceof Error){
|
|
2749
|
-
|
|
2751
|
+
arcaneLogging.error('Arcane chat stream delivered an Error as content.',text);
|
|
2750
2752
|
throw text;
|
|
2751
2753
|
}
|
|
2752
2754
|
const error=new TypeError(
|
|
@@ -2754,11 +2756,11 @@
|
|
|
2754
2756
|
{cause:text}
|
|
2755
2757
|
);
|
|
2756
2758
|
error.code='ARCANE_CHAT_STREAM_CONTENT_INVALID';
|
|
2757
|
-
|
|
2759
|
+
arcaneLogging.error('Arcane chat stream delivered invalid content.',error);
|
|
2758
2760
|
throw error;
|
|
2759
2761
|
}
|
|
2760
2762
|
if(!id){
|
|
2761
|
-
|
|
2763
|
+
arcaneLogging.warn('Streaming messages require ids, none specified.')
|
|
2762
2764
|
return false;
|
|
2763
2765
|
}
|
|
2764
2766
|
|
|
@@ -2949,7 +2951,7 @@
|
|
|
2949
2951
|
return;
|
|
2950
2952
|
}
|
|
2951
2953
|
host.language=language;
|
|
2952
|
-
|
|
2954
|
+
arcaneLogging.info("Language changed to:",host.language);
|
|
2953
2955
|
let result;
|
|
2954
2956
|
try{result=host.languageChanged(host.language);}
|
|
2955
2957
|
catch(error){result=Promise.reject(error);}
|
|
@@ -3266,13 +3268,13 @@
|
|
|
3266
3268
|
}else{
|
|
3267
3269
|
restoreRejectedStructuralDraft(messageId,context.operationId,text);
|
|
3268
3270
|
}
|
|
3269
|
-
|
|
3271
|
+
arcaneLogging.error('Arcane structural tool protocol failure.',error);
|
|
3270
3272
|
setSessionStatus(
|
|
3271
3273
|
pendingStructuralToolCalls.length?'tool':'ready',
|
|
3272
3274
|
pendingStructuralToolMessage||'Chat ready.'
|
|
3273
3275
|
);
|
|
3274
3276
|
}else if(!destroyed&&bindingGeneration===sessionBindingGeneration){
|
|
3275
|
-
|
|
3277
|
+
arcaneLogging.error('Arcane chat request failed.',error);
|
|
3276
3278
|
if(sessionRequestMessages.every(message=>message.role==='tool')){
|
|
3277
3279
|
const requestMessages=[...chatOutput.children].filter(
|
|
3278
3280
|
candidate=>candidate.dataset.operationId===context.operationId
|
|
@@ -3541,7 +3543,7 @@
|
|
|
3541
3543
|
if(destroyed||context.signal.aborted){
|
|
3542
3544
|
return false;
|
|
3543
3545
|
}
|
|
3544
|
-
|
|
3546
|
+
arcaneLogging.error(
|
|
3545
3547
|
internalStructuralToolFailure(error)
|
|
3546
3548
|
?'Arcane structural tool protocol failure.'
|
|
3547
3549
|
:'The chat message could not be submitted.',
|
|
@@ -3751,7 +3753,7 @@
|
|
|
3751
3753
|
}
|
|
3752
3754
|
}
|
|
3753
3755
|
);
|
|
3754
|
-
|
|
3756
|
+
arcaneLogging.error('Speech synthesis failed.',error);
|
|
3755
3757
|
return false;
|
|
3756
3758
|
}
|
|
3757
3759
|
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
<html-import id="configModal" class="modal" href="./arcane/components/modal.html?v=13"></html-import>
|
|
11
11
|
|
|
12
12
|
<script type="module">
|
|
13
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
14
|
+
|
|
13
15
|
const host=this;
|
|
14
16
|
const {default:waitForComponent}=await import('../modules/WaitForComponent.js');
|
|
15
17
|
const {
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
()=>openConfig().catch(
|
|
66
68
|
error=>{
|
|
67
69
|
if(!destroyed){
|
|
68
|
-
|
|
70
|
+
arcaneLogging.error('Unable to configure dashboard:',error);
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
),
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
<html-import id="maintenanceModal" class="modal" href="./arcane/components/modal.html?v=13"></html-import>
|
|
14
14
|
|
|
15
15
|
<script type="module">
|
|
16
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
17
|
+
|
|
16
18
|
const host=this;
|
|
17
19
|
const openButton=host.shadowRoot.querySelector('#openMaintenance');
|
|
18
20
|
const maintenanceModal=host.shadowRoot.querySelector('#maintenanceModal');
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
()=>openMaintenance().catch(
|
|
37
39
|
error=>{
|
|
38
40
|
if(!destroyed){
|
|
39
|
-
|
|
41
|
+
arcaneLogging.error('Unable to open maintenance:',error);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
),
|
|
@@ -127,7 +129,7 @@
|
|
|
127
129
|
return;
|
|
128
130
|
}
|
|
129
131
|
status.innerText='Unable to complete data maintenance.';
|
|
130
|
-
|
|
132
|
+
arcaneLogging.error('Unable to clear empty chats and memories:',error);
|
|
131
133
|
}finally{
|
|
132
134
|
if(!destroyed&&generation===clearGeneration){
|
|
133
135
|
clearButton.disabled=false;
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
<html-import id="dataModal" class="modal" href="./arcane/components/modal.html?v=13"></html-import>
|
|
15
15
|
|
|
16
16
|
<script type="module">
|
|
17
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
18
|
+
|
|
17
19
|
const host=this;
|
|
18
20
|
const openButton=host.shadowRoot.querySelector('#openData');
|
|
19
21
|
const dataModal=host.shadowRoot.querySelector('#dataModal');
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
()=>openData().catch(
|
|
40
42
|
error=>{
|
|
41
43
|
if(!destroyed){
|
|
42
|
-
|
|
44
|
+
arcaneLogging.error('Unable to open data view:',error);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
),
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<script type="module">
|
|
33
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
34
|
+
|
|
33
35
|
const host=this;
|
|
34
36
|
const root=host.shadowRoot;
|
|
35
37
|
const {default:DirectoryPicker}=await import('../modules/DirectoryPicker.js');
|
|
@@ -67,7 +69,7 @@
|
|
|
67
69
|
choose.addEventListener(
|
|
68
70
|
'click',
|
|
69
71
|
()=>select().catch(
|
|
70
|
-
error=>
|
|
72
|
+
error=>arcaneLogging.error('Unable to select a directory:',error)
|
|
71
73
|
),
|
|
72
74
|
{signal:lifecycleController.signal}
|
|
73
75
|
);
|
|
@@ -343,6 +343,8 @@
|
|
|
343
343
|
<html-import id="deleteModal" class="modal" href="./arcane/components/modal.html?v=13"></html-import>
|
|
344
344
|
|
|
345
345
|
<script type="module">
|
|
346
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
347
|
+
|
|
346
348
|
import('../modules/DBOPFS.js');
|
|
347
349
|
//importing Document at the end of the file to avoid blocking;
|
|
348
350
|
|
|
@@ -461,7 +463,7 @@
|
|
|
461
463
|
()=>uploadFiles().catch(
|
|
462
464
|
error=>{
|
|
463
465
|
if(!destroyed){
|
|
464
|
-
|
|
466
|
+
arcaneLogging.error('Unable to upload files:',error);
|
|
465
467
|
}
|
|
466
468
|
}
|
|
467
469
|
),
|
|
@@ -481,7 +483,7 @@
|
|
|
481
483
|
openDirectory(directoryElement.dataset.directory).catch(
|
|
482
484
|
error=>{
|
|
483
485
|
if(!destroyed){
|
|
484
|
-
|
|
486
|
+
arcaneLogging.error('Unable to open directory:',error);
|
|
485
487
|
}
|
|
486
488
|
}
|
|
487
489
|
);
|
|
@@ -1205,7 +1207,7 @@
|
|
|
1205
1207
|
false,
|
|
1206
1208
|
nextOperationId('open-error')
|
|
1207
1209
|
);
|
|
1208
|
-
|
|
1210
|
+
arcaneLogging.error('Unable to open file:',error);
|
|
1209
1211
|
}
|
|
1210
1212
|
return false;
|
|
1211
1213
|
}
|
|
@@ -1411,7 +1413,7 @@
|
|
|
1411
1413
|
()=>confirmDelete(directory,fileName,true).catch(
|
|
1412
1414
|
error=>{
|
|
1413
1415
|
if(!destroyed){
|
|
1414
|
-
|
|
1416
|
+
arcaneLogging.error('Unable to delete file:',error);
|
|
1415
1417
|
}
|
|
1416
1418
|
}
|
|
1417
1419
|
),
|
|
@@ -1455,7 +1457,7 @@
|
|
|
1455
1457
|
}catch(error){
|
|
1456
1458
|
if(!destroyed&&generation===fileOpenGeneration){
|
|
1457
1459
|
status.innerText='Unable to open this file.';
|
|
1458
|
-
|
|
1460
|
+
arcaneLogging.error('Unable to open file:',error);
|
|
1459
1461
|
}
|
|
1460
1462
|
return false;
|
|
1461
1463
|
}
|
|
@@ -1649,7 +1651,7 @@
|
|
|
1649
1651
|
}
|
|
1650
1652
|
|
|
1651
1653
|
openFile(directory,fileName).catch(
|
|
1652
|
-
error=>
|
|
1654
|
+
error=>arcaneLogging.error('Unable to open file:',error)
|
|
1653
1655
|
);
|
|
1654
1656
|
},
|
|
1655
1657
|
{signal:lifecycleController.signal}
|
|
@@ -1662,7 +1664,7 @@
|
|
|
1662
1664
|
}
|
|
1663
1665
|
|
|
1664
1666
|
confirmDelete(directory,fileName).catch(
|
|
1665
|
-
error=>
|
|
1667
|
+
error=>arcaneLogging.error('Unable to delete file:',error)
|
|
1666
1668
|
);
|
|
1667
1669
|
},
|
|
1668
1670
|
{signal:lifecycleController.signal}
|
|
@@ -1747,7 +1749,7 @@
|
|
|
1747
1749
|
message.innerText=`Unable to delete ${fileName}.`;
|
|
1748
1750
|
cancelButton.disabled=false;
|
|
1749
1751
|
deleteButton.disabled=false;
|
|
1750
|
-
|
|
1752
|
+
arcaneLogging.error('Unable to delete file:',error);
|
|
1751
1753
|
}
|
|
1752
1754
|
}
|
|
1753
1755
|
},
|
|
@@ -1850,7 +1852,7 @@
|
|
|
1850
1852
|
}catch(error){
|
|
1851
1853
|
if(!destroyed){
|
|
1852
1854
|
initialized=false;
|
|
1853
|
-
|
|
1855
|
+
arcaneLogging.error('Unable to initialize file manager:',error);
|
|
1854
1856
|
}
|
|
1855
1857
|
}
|
|
1856
1858
|
}
|
|
@@ -78,6 +78,8 @@
|
|
|
78
78
|
</header>
|
|
79
79
|
|
|
80
80
|
<script type="module">
|
|
81
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
82
|
+
|
|
81
83
|
import('../entities/User.js');
|
|
82
84
|
|
|
83
85
|
const host=this;
|
|
@@ -123,17 +125,17 @@
|
|
|
123
125
|
if (skin) {
|
|
124
126
|
document.body.className = skin;
|
|
125
127
|
} else {
|
|
126
|
-
|
|
128
|
+
arcaneLogging.log('No saved skin found. Using default.');
|
|
127
129
|
}
|
|
128
130
|
} catch (err) {
|
|
129
|
-
|
|
131
|
+
arcaneLogging.error('Failed to set global saved skin', err);
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
// Check if user can connect to the internet (make sure the cloud can be reached)
|
|
134
136
|
async function checkInternet() {
|
|
135
137
|
const online = navigator.onLine;
|
|
136
|
-
|
|
138
|
+
arcaneLogging.log(`Internet status: ${online ? 'Online' : 'Offline'}`);
|
|
137
139
|
host.shadowRoot.querySelector('.internet-status')
|
|
138
140
|
.classList
|
|
139
141
|
.toggle('online', online);
|
|
@@ -211,6 +211,8 @@
|
|
|
211
211
|
</section>
|
|
212
212
|
|
|
213
213
|
<script type="module">
|
|
214
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
215
|
+
|
|
214
216
|
const host=this;
|
|
215
217
|
host.ready=false;
|
|
216
218
|
|
|
@@ -883,7 +885,7 @@
|
|
|
883
885
|
Promise.resolve(options.onNavigate(detail,{signal:lifecycleController.signal,operationId})).catch(
|
|
884
886
|
error=>{
|
|
885
887
|
if(!destroyed){
|
|
886
|
-
|
|
888
|
+
arcaneLogging.error('Markdown document navigation callback failed.',error);
|
|
887
889
|
}
|
|
888
890
|
}
|
|
889
891
|
);
|
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
</section>
|
|
75
75
|
|
|
76
76
|
<script type="module">
|
|
77
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
78
|
+
|
|
77
79
|
const host=this;
|
|
78
80
|
const {default:MD}=await import('../modules/MD.js?v=2');
|
|
79
81
|
const {
|
|
@@ -229,7 +231,7 @@
|
|
|
229
231
|
emit('markdown-editor-change',detail,detail);
|
|
230
232
|
if(options.onChange){
|
|
231
233
|
Promise.resolve(options.onChange(detail)).catch(
|
|
232
|
-
error=>
|
|
234
|
+
error=>arcaneLogging.error('Markdown change callback failed:',error)
|
|
233
235
|
);
|
|
234
236
|
}
|
|
235
237
|
}
|
|
@@ -329,7 +331,7 @@
|
|
|
329
331
|
return false;
|
|
330
332
|
}
|
|
331
333
|
status.innerText=options.labels.saveError;
|
|
332
|
-
|
|
334
|
+
arcaneLogging.error('Unable to save Markdown content:',error);
|
|
333
335
|
return false;
|
|
334
336
|
}finally{
|
|
335
337
|
if(saveController===controller){
|
|
@@ -156,6 +156,8 @@
|
|
|
156
156
|
</dialog>
|
|
157
157
|
|
|
158
158
|
<script type="module">
|
|
159
|
+
const {arcaneLogging}=await import('arcane-os/logging');
|
|
160
|
+
|
|
159
161
|
const host=this;
|
|
160
162
|
const shadowRoot=host.shadowRoot;
|
|
161
163
|
const {createArcaneEventSource,projectArcaneDOMEvent}=await import('arcane-os/event-manager');
|
|
@@ -384,7 +386,7 @@
|
|
|
384
386
|
}catch(error){
|
|
385
387
|
rows[index].row.dataset.status='failed';
|
|
386
388
|
rows[index].status.innerText='Unable to complete';
|
|
387
|
-
|
|
389
|
+
arcaneLogging.error(`Unable to complete ${job.name}:`,error);
|
|
388
390
|
throw error;
|
|
389
391
|
}
|
|
390
392
|
}));
|