arcane-os 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/NOTICE +5 -3
  3. package/README.md +73 -24
  4. package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +67 -18
  5. package/browser-runtime/ai/ARCANE_AI_BROWSER_WASM_COMPONENTS.json +16 -5
  6. package/browser-runtime/ai/browser-kokoro-worker.mjs +3 -0
  7. package/browser-runtime/ai/browser-speech-artifacts.mjs +1108 -0
  8. package/browser-runtime/ai/browser-speech-providers.mjs +475 -0
  9. package/browser-runtime/ai/browser-speech.mjs +9 -0
  10. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +1537 -167
  11. package/browser-runtime/ai/browser-wasm.mjs +46 -1
  12. package/browser-runtime/ai/browser-whisper-worker.mjs +3 -0
  13. package/browser-runtime/ai/browser-wllama-runtime.mjs +677 -132
  14. package/browser-runtime/ai/model-controller.mjs +138 -12
  15. package/browser-runtime/ai/speech-worker-client.mjs +207 -0
  16. package/browser-runtime/ai/speech-worker-runtime.mjs +516 -0
  17. package/browser-runtime/ai/wllama/index.mjs +389 -0
  18. package/docs/architecture.md +132 -22
  19. package/docs/reference/README.md +8 -5
  20. package/docs/reference/ai/browser-wasm.md +394 -0
  21. package/docs/reference/availability-and-normalization.md +31 -0
  22. package/docs/reference/behavioral-testing.md +21 -0
  23. package/docs/reference/cli.md +4 -4
  24. package/docs/reference/inventory/package-api.json +84 -4
  25. package/docs/reference/protocols.md +9 -8
  26. package/docs/reference/sdk-api.md +238 -4
  27. package/docs/work-amplification.md +8 -4
  28. package/package.json +7 -3
  29. package/runtime/ARCANE_RUNTIME_RELEASE.json +50 -20
  30. package/runtime/arcane/components/chat.html +280 -62
  31. package/runtime/arcane/components/speech.html +1113 -265
  32. package/runtime/arcane/entities/Chat.js +246 -43
  33. package/runtime/arcane/modules/AI.js +713 -162
  34. package/runtime/arcane/modules/AIProviderRuntime.js +2289 -0
  35. package/runtime/arcane/modules/AIRuntimeState.js +872 -0
  36. package/runtime/arcane/modules/ConfiguredAIChatSession.js +293 -27
  37. package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +682 -0
  38. package/runtime/arcane/modules/DocumentLexicalSearch.js +292 -0
  39. package/runtime/arcane/modules/PersistentAIChatSession.js +268 -0
  40. package/runtime/arcane/modules/StaticDocumentCatalog.js +25 -206
  41. package/schemas/arcane-lock.schema.json +6 -4
  42. package/src/cli/main.mjs +14 -2
  43. package/src/constants.mjs +1 -1
  44. package/src/dev-server.mjs +246 -14
  45. package/src/doctor.mjs +1 -1
  46. package/src/import-map.mjs +59 -1
  47. package/src/packager/core.mjs +2 -2
  48. package/src/runtime.mjs +14 -4
  49. package/src/sdk-browser-runtime.mjs +28 -75
  50. package/src/templates/workspace-template.mjs +4 -4
  51. package/src/toolchain.mjs +3 -0
  52. package/src/workspace-runtime.mjs +1 -1
  53. package/src/workspace.mjs +1 -1
@@ -47,7 +47,7 @@ export function workspaceTemplate({
47
47
  const name=displayName||`Arcane ${titleCase(appId)}`;
48
48
  const packageName=`arcane-${appId}`;
49
49
  const runtimeContentSha256=runtimeRelease?.contentSha256;
50
- const upstreamCommit=runtimeRelease?.source?.commit;
50
+ const upstreamCommit=runtimeRelease?.source?.legacyProjection?.commit;
51
51
  const browserManifestSha256=sdkBrowserRuntimeRelease?.manifestSha256;
52
52
  const browserContentSha256=sdkBrowserRuntimeRelease?.contentSha256;
53
53
  const browserSource=sdkBrowserRuntimeRelease?.source;
@@ -153,15 +153,15 @@ appropriate.
153
153
  files.set('AGENTS.md',`# ${name} development instructions
154
154
 
155
155
  - Use plain JavaScript, HTML, and CSS; do not introduce TypeScript or TSX.
156
- - Keep reusable mechanisms in Arcane OS and app-specific behavior under \`apps/${appId}/\`.
156
+ - Keep reusable portable mechanisms in the Arcane SDK and app-specific behavior under \`apps/${appId}/\`.
157
157
  - Keep \`arcane/css/theme.css\` before app styles and import \`arcane/ThemeBootstrap\` before app code runs.
158
158
  - Use \`rgb(...)\` or \`rgba(...)\` for new CSS colors.
159
159
  - Build one named app and one explicit target at a time. Native targets may be unavailable until their adapters are installed.
160
- - Run \`npm run check\` before committing.
160
+ - Run tests and checks only when the user explicitly selects verification or a distribution artifact requires it.
161
161
  `);
162
162
  files.set('README.md',`# ${name}
163
163
 
164
- This repository contains the Arcane OS application \`${appId}\`. Its source stays outside the Arcane OS repository and uses the \`${SDK_NAME}\` toolchain.
164
+ This repository contains the portable Arcane application \`${appId}\`. It embeds immutable SDK runtime bytes for distribution and has no runtime dependency on an Arcane OS source checkout.
165
165
 
166
166
  ## Start
167
167
 
package/src/toolchain.mjs CHANGED
@@ -791,6 +791,9 @@ export async function developApplication(options={}){
791
791
  mode:'source',
792
792
  workspaceRuntimeReceipt:prepared.workspaceRuntimeReceipt,
793
793
  workspaceMode:prepared.workspaceMode,
794
+ ...(options.sdkRuntimeSourceRoot===undefined?{}:{
795
+ sdkRuntimeSourceRoot:options.sdkRuntimeSourceRoot
796
+ }),
794
797
  host:options.host,
795
798
  port:options.port,
796
799
  signal:options.signal,
@@ -543,7 +543,7 @@ export async function verifyWorkspaceRuntime({
543
543
  sdkVersion:runtimeReceipt.sdkVersion,
544
544
  sources:Object.freeze({
545
545
  arcane:Object.freeze({
546
- authority:'arcane-os-upstream',
546
+ authority:'arcane-os-sdk',
547
547
  location:runtimeReceipt.canonicalLocation,
548
548
  manifestSha256:runtimeReceipt.manifestSha256,
549
549
  contentSha256:runtimeReceipt.contentSha256,
package/src/workspace.mjs CHANGED
@@ -633,7 +633,7 @@ export async function validateWorkspace({
633
633
  'installed SDK runtime manifest'
634
634
  );
635
635
  if(installed.contentSha256!==lock.runtime.contentSha256
636
- ||installed.source?.commit!==lock.runtime.upstreamCommit){
636
+ ||installed.source?.legacyProjection?.commit!==lock.runtime.upstreamCommit){
637
637
  fail('Installed SDK runtime does not match arcane.lock.json.');
638
638
  }
639
639
  const browserManifestPath=path.join(