arcane-os 0.3.0 → 0.3.2

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 (153) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +86 -117
  3. package/bin/arcane-test.mjs +170 -46
  4. package/browser-runtime/ai/browser-speech-artifacts.mjs +887 -909
  5. package/browser-runtime/ai/browser-speech-providers.mjs +96 -152
  6. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +627 -819
  7. package/browser-runtime/ai/browser-wasm.mjs +24 -35
  8. package/browser-runtime/ai/browser-wllama-runtime.mjs +64 -316
  9. package/browser-runtime/ai/model-controller.mjs +584 -181
  10. package/browser-runtime/ai/speech-worker-client.mjs +8 -146
  11. package/browser-runtime/ai/speech-worker-runtime.mjs +643 -363
  12. package/browser-runtime/dom-event-instrumentation.mjs +55 -147
  13. package/browser-runtime/event-manager.mjs +239 -624
  14. package/package.json +5 -6
  15. package/runtime/arcane/components/app-bar.html +3 -15
  16. package/runtime/arcane/components/assistant-panel.html +10 -10
  17. package/runtime/arcane/components/calculator.html +1 -1
  18. package/runtime/arcane/components/chat.html +1359 -135
  19. package/runtime/arcane/components/conversation-view.html +2 -2
  20. package/runtime/arcane/components/document-inspector.html +11 -17
  21. package/runtime/arcane/components/file-manager.html +13 -56
  22. package/runtime/arcane/components/markdown-document.html +82 -281
  23. package/runtime/arcane/components/markdown-editor.html +7 -10
  24. package/runtime/arcane/components/media-embed.html +6 -6
  25. package/runtime/arcane/components/screen-capture.html +4 -4
  26. package/runtime/arcane/components/source-explanation.html +2 -2
  27. package/runtime/arcane/components/speech.html +112 -68
  28. package/runtime/arcane/components/terminal-workspace.html +4 -4
  29. package/runtime/arcane/components/theme-editor.html +1 -1
  30. package/runtime/arcane/components/unified-inbox.html +2 -2
  31. package/runtime/arcane/components/voice-transcription.html +31 -21
  32. package/runtime/arcane/entities/Calculation.js +2 -3
  33. package/runtime/arcane/entities/Chat.js +228 -43
  34. package/runtime/arcane/entities/Preference.js +3 -5
  35. package/runtime/arcane/entities/Weather.js +5 -5
  36. package/runtime/arcane/modules/AI.js +1050 -427
  37. package/runtime/arcane/modules/AIProviderRuntime.js +658 -363
  38. package/runtime/arcane/modules/AIResponseLength.js +9 -19
  39. package/runtime/arcane/modules/AIRuntimeState.js +109 -72
  40. package/runtime/arcane/modules/ArcaneNavigationPolicy.js +45 -32
  41. package/runtime/arcane/modules/BrowserTestSuite.js +78 -122
  42. package/runtime/arcane/modules/CalculatorEngine.js +9 -9
  43. package/runtime/arcane/modules/CommunicationAppController.js +3 -7
  44. package/runtime/arcane/modules/ComponentContracts.js +30 -32
  45. package/runtime/arcane/modules/ConfiguredAIChatSession.js +281 -230
  46. package/runtime/arcane/modules/ConversationActionItems.js +26 -59
  47. package/runtime/arcane/modules/ConversationClosingReport.js +34 -61
  48. package/runtime/arcane/modules/ConversationTimebox.js +27 -15
  49. package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +152 -344
  50. package/runtime/arcane/modules/DocumentLexicalSearch.js +25 -91
  51. package/runtime/arcane/modules/HTMLImport.js +54 -1
  52. package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +40 -203
  53. package/runtime/arcane/modules/LocalAIReadiness.js +40 -60
  54. package/runtime/arcane/modules/LocalAIReadinessController.js +15 -13
  55. package/runtime/arcane/modules/MD.js +1 -45
  56. package/runtime/arcane/modules/Mail.js +51 -103
  57. package/runtime/arcane/modules/MailOutbox.mjs +95 -193
  58. package/runtime/arcane/modules/MailTransport.mjs +36 -57
  59. package/runtime/arcane/modules/ModelDefinition.js +22 -106
  60. package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +39 -101
  61. package/runtime/arcane/modules/PersistentAIChatSession.js +281 -18
  62. package/runtime/arcane/modules/PreferenceStore.js +102 -30
  63. package/runtime/arcane/modules/RiskSignalAnalyzer.js +8 -9
  64. package/runtime/arcane/modules/ScopedOPFSCache.js +7 -42
  65. package/runtime/arcane/modules/ScreenCapture.js +175 -128
  66. package/runtime/arcane/modules/SpeechPlayback.js +46 -149
  67. package/runtime/arcane/modules/StaticDocumentCatalog.js +173 -407
  68. package/runtime/arcane/modules/ToolCallRouter.js +25 -12
  69. package/runtime/arcane/modules/YouTubeMedia.js +6 -5
  70. package/schemas/arcane-app-bundle.schema.json +13 -78
  71. package/schemas/arcane-app.schema.json +9 -25
  72. package/schemas/arcane-lock.schema.json +18 -151
  73. package/schemas/arcane-package.schema.json +2 -16
  74. package/schemas/native-build-plan.schema.json +119 -122
  75. package/src/app-descriptor.mjs +75 -132
  76. package/src/application-tests.mjs +200 -0
  77. package/src/cli/main.mjs +27 -46
  78. package/src/constants.mjs +3 -4
  79. package/src/dev-server.mjs +30 -324
  80. package/src/doctor.mjs +92 -154
  81. package/src/dom-event-instrumentation.mjs +55 -147
  82. package/src/errors.mjs +2 -3
  83. package/src/event-manager.mjs +239 -624
  84. package/src/event-queue.mjs +3 -3
  85. package/src/import-map.mjs +273 -1028
  86. package/src/index.mjs +14 -16
  87. package/src/installed-sdk-runtime.mjs +40 -62
  88. package/src/integrated-provider-loader.mjs +53 -382
  89. package/src/mail-api.mjs +0 -2
  90. package/src/mail-server.mjs +224 -580
  91. package/src/mail.mjs +4 -10
  92. package/src/native-plan.mjs +163 -598
  93. package/src/native-provider-loader.mjs +104 -1063
  94. package/src/packager/core.mjs +485 -3229
  95. package/src/process.mjs +5 -10
  96. package/src/release-bundle.mjs +292 -2405
  97. package/src/runtime.mjs +76 -396
  98. package/src/scaffold.mjs +30 -80
  99. package/src/sdk-browser-runtime.mjs +70 -626
  100. package/src/source-server.mjs +588 -0
  101. package/src/targets/index.mjs +78 -188
  102. package/src/templates/workspace-template.mjs +19 -135
  103. package/src/testing-loader.mjs +164 -0
  104. package/src/testing.mjs +1 -1
  105. package/src/toolchain.mjs +131 -544
  106. package/src/update-check.mjs +26 -64
  107. package/src/workspace-operation-lock.mjs +139 -430
  108. package/src/workspace-runtime.mjs +112 -779
  109. package/src/workspace.mjs +40 -302
  110. package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +0 -218
  111. package/browser-runtime/ai/ARCANE_AI_BROWSER_SPEECH_COMPONENTS.json +0 -203
  112. package/browser-runtime/ai/ARCANE_AI_BROWSER_WASM_COMPONENTS.json +0 -80
  113. package/browser-runtime/ai/internal/sha256.mjs +0 -166
  114. package/docs/architecture.md +0 -344
  115. package/docs/compatibility.md +0 -36
  116. package/docs/event-manager.md +0 -294
  117. package/docs/platform-targets.md +0 -108
  118. package/docs/publishing.md +0 -201
  119. package/docs/reference/README.md +0 -187
  120. package/docs/reference/ai/browser-speech-package-authority.json +0 -835
  121. package/docs/reference/ai/browser-speech.md +0 -1252
  122. package/docs/reference/ai/browser-wasm.md +0 -530
  123. package/docs/reference/arcane-ollama.md +0 -288
  124. package/docs/reference/availability-and-normalization.md +0 -183
  125. package/docs/reference/behavioral-testing.md +0 -133
  126. package/docs/reference/cli.md +0 -779
  127. package/docs/reference/core/README.md +0 -62
  128. package/docs/reference/core/arcane-ai-contracts.md +0 -907
  129. package/docs/reference/core/arcane-api.md +0 -601
  130. package/docs/reference/core/arcane-entities.md +0 -65
  131. package/docs/reference/core/arcane-events.md +0 -134
  132. package/docs/reference/core/ollama-module.md +0 -181
  133. package/docs/reference/core/reference/arcane-api/ai-and-ollama.md +0 -1909
  134. package/docs/reference/core/reference/arcane-api/applications-terminal-capabilities.md +0 -1057
  135. package/docs/reference/core/reference/arcane-api/core-and-events.md +0 -320
  136. package/docs/reference/core/reference/arcane-api/filesystem-storage-preferences-appearance.md +0 -610
  137. package/docs/reference/core/reference/arcane-api/namespaces.md +0 -1157
  138. package/docs/reference/core/reference/arcane-api/platform-installation-users-system.md +0 -1423
  139. package/docs/reference/core/reference/arcane-api/session-provisioning-diagnostics-development.md +0 -315
  140. package/docs/reference/event-manager.md +0 -1511
  141. package/docs/reference/inventory/package-api.json +0 -3284
  142. package/docs/reference/inventory/runtime-components.json +0 -1011
  143. package/docs/reference/inventory/runtime-entities.json +0 -26
  144. package/docs/reference/inventory/runtime-modules.json +0 -1431
  145. package/docs/reference/mail.md +0 -316
  146. package/docs/reference/protocols.md +0 -677
  147. package/docs/reference/runtime-components.md +0 -1366
  148. package/docs/reference/runtime-entities.md +0 -303
  149. package/docs/reference/runtime-modules.md +0 -2960
  150. package/docs/reference/sdk-api.md +0 -6694
  151. package/docs/roadmap.md +0 -79
  152. package/docs/work-amplification.md +0 -129
  153. package/runtime/ARCANE_RUNTIME_RELEASE.json +0 -826
@@ -1,18 +1,31 @@
1
1
  function parseArguments(value,name=''){
2
- if(value&&typeof value==='object'){
3
- return value;
4
- }
5
-
6
- if(typeof value!=='string'){
7
- throw new Error(`Tool ${name} did not provide valid arguments.`);
2
+ let parsed=value;
3
+ if(typeof parsed==='string'){
4
+ try{
5
+ parsed=JSON.parse(parsed);
6
+ }catch(error){
7
+ console.warn(error);
8
+ throw new Error(`Tool ${name} returned invalid JSON arguments.`);
9
+ }
8
10
  }
9
-
10
- try{
11
- return JSON.parse(value);
12
- }catch(error){
13
- console.warn(error);
14
- throw new Error(`Tool ${name} returned invalid JSON arguments.`);
11
+ const prototype=parsed&&typeof parsed==='object'
12
+ ?Object.getPrototypeOf(parsed)
13
+ :undefined;
14
+ if(
15
+ !parsed
16
+ ||typeof parsed!=='object'
17
+ ||Array.isArray(parsed)
18
+ ||(prototype!==Object.prototype&&prototype!==null)
19
+ ||typeof parsed.message!=='string'
20
+ ||!parsed.message.trim()
21
+ ){
22
+ const error=new Error(
23
+ `Tool ${name} must provide a nonempty user-facing message in its arguments.`
24
+ );
25
+ error.code='AI_TOOL_MESSAGE_REQUIRED';
26
+ throw error;
15
27
  }
28
+ return parsed;
16
29
  }
17
30
 
18
31
  function getResponseCalls(response={}){
@@ -1,7 +1,8 @@
1
- const ID=/^[A-Za-z0-9_-]{6,64}$/;
1
+ const RAW_ID=/^[A-Za-z0-9_-]+$/;
2
2
  export function parseYouTubeMedia(value){
3
3
  const raw=String(value||'').trim();if(!raw)throw new TypeError('Enter a YouTube video or playlist URL.');let url;
4
- try{url=new URL(raw.includes('://')?raw:`https://${raw}`)}catch{if(ID.test(raw))return Object.freeze({type:'video',id:raw});throw new TypeError('YouTube address is invalid.')}
4
+ if(RAW_ID.test(raw))return {type:'video',id:raw};
5
+ try{url=new URL(raw.includes('://')?raw:`https://${raw}`)}catch{throw new TypeError('YouTube address is invalid.')}
5
6
  const host=url.hostname.replace(/^www\./,'');let video='',playlist=url.searchParams.get('list')||'';
6
7
  if(host==='youtu.be')video=url.pathname.split('/').filter(Boolean)[0]||'';
7
8
  else if(['youtube.com','music.youtube.com','m.youtube.com','youtube-nocookie.com'].includes(host)){
@@ -9,8 +10,8 @@ export function parseYouTubeMedia(value){
9
10
  else if(url.pathname.startsWith('/embed/'))video=url.pathname.split('/')[2]||'';
10
11
  else if(url.pathname.startsWith('/shorts/'))video=url.pathname.split('/')[2]||'';
11
12
  }else throw new TypeError('Only YouTube and YouTube Music addresses are supported.');
12
- if(video&&ID.test(video))return Object.freeze({type:'video',id:video,playlist:ID.test(playlist)?playlist:''});
13
- if(ID.test(playlist))return Object.freeze({type:'playlist',id:playlist});
13
+ if(video)return {type:'video',id:video,playlist};
14
+ if(playlist)return {type:'playlist',id:playlist};
14
15
  throw new TypeError('The address does not contain a supported video or playlist id.');
15
16
  }
16
- export function youtubeEmbedUrl(locator,{privacyEnhanced=true}={}){const item=typeof locator==='string'?parseYouTubeMedia(locator):locator;const origin=privacyEnhanced?'https://www.youtube-nocookie.com':'https://www.youtube.com';if(item.type==='playlist')return `${origin}/embed?listType=playlist&list=${encodeURIComponent(item.id)}`;const url=new URL(`${origin}/embed/${encodeURIComponent(item.id)}`);if(item.playlist)url.searchParams.set('list',item.playlist);url.searchParams.set('playsinline','1');return url.href;}
17
+ export function youtubeEmbedUrl(locator,{privacyEnhanced=false}={}){const item=typeof locator==='string'?parseYouTubeMedia(locator):locator;const origin=privacyEnhanced?'https://www.youtube-nocookie.com':'https://www.youtube.com';if(item.type==='playlist')return `${origin}/embed?listType=playlist&list=${encodeURIComponent(item.id)}`;const url=new URL(`${origin}/embed/${encodeURIComponent(item.id)}`);if(item.playlist)url.searchParams.set('list',item.playlist);url.searchParams.set('playsinline','1');return url.href;}
@@ -2,9 +2,8 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/TheWizardNexus/arcane-os-sdk/schemas/arcane-app-bundle.schema.json",
4
4
  "title": "Arcane external application release bundle",
5
- "description": "Deterministic USTAR+gzip envelope binding one authored schema-2 descriptor to one verified Arcane browser release.",
5
+ "description": "Structural manifest for one complete USTAR+gzip application bundle.",
6
6
  "type": "object",
7
- "additionalProperties": false,
8
7
  "required": [
9
8
  "schemaVersion",
10
9
  "kind",
@@ -13,7 +12,7 @@
13
12
  "app",
14
13
  "descriptor",
15
14
  "release",
16
- "payload"
15
+ "files"
17
16
  ],
18
17
  "properties": {
19
18
  "schemaVersion": { "const": 1 },
@@ -21,7 +20,6 @@
21
20
  "format": { "const": "ustar+gzip" },
22
21
  "sdk": {
23
22
  "type": "object",
24
- "additionalProperties": false,
25
23
  "required": ["name", "version"],
26
24
  "properties": {
27
25
  "name": { "const": "arcane-os" },
@@ -30,96 +28,33 @@
30
28
  },
31
29
  "app": {
32
30
  "type": "object",
33
- "additionalProperties": false,
34
31
  "required": ["id", "version"],
35
32
  "properties": {
36
33
  "id": { "$ref": "#/$defs/appId" },
37
34
  "version": { "$ref": "#/$defs/semver" }
38
35
  }
39
36
  },
40
- "descriptor": {
41
- "type": "object",
42
- "additionalProperties": false,
43
- "required": [
44
- "path",
45
- "schemaVersion",
46
- "canonicalSha256",
47
- "packageSha256",
48
- "fileSha256",
49
- "bytes"
50
- ],
51
- "properties": {
52
- "path": { "const": "arcane-app.json" },
53
- "schemaVersion": { "const": 2 },
54
- "canonicalSha256": { "$ref": "#/$defs/sha256" },
55
- "packageSha256": { "$ref": "#/$defs/sha256" },
56
- "fileSha256": { "$ref": "#/$defs/sha256" },
57
- "bytes": { "type": "integer", "minimum": 1, "maximum": 4194304 }
58
- }
59
- },
60
- "release": {
61
- "type": "object",
62
- "additionalProperties": false,
63
- "required": [
64
- "path",
65
- "schemaVersion",
66
- "builder",
67
- "policySha256",
68
- "manifestSha256",
69
- "contentSha256",
70
- "fileCount",
71
- "totalBytes"
72
- ],
73
- "properties": {
74
- "path": { "const": "payload/ARCANE_APP_RELEASE.json" },
75
- "schemaVersion": { "const": 1 },
76
- "builder": { "const": "arcane-app-packager-v1" },
77
- "policySha256": { "$ref": "#/$defs/sha256" },
78
- "manifestSha256": { "$ref": "#/$defs/sha256" },
79
- "contentSha256": { "$ref": "#/$defs/sha256" },
80
- "fileCount": { "type": "integer", "minimum": 1, "maximum": 16381 },
81
- "totalBytes": { "type": "integer", "minimum": 1, "maximum": 1073741824 }
82
- }
83
- },
84
- "payload": {
85
- "type": "object",
86
- "additionalProperties": false,
87
- "required": ["root", "fileCount", "totalBytes", "files"],
88
- "properties": {
89
- "root": { "const": "payload" },
90
- "fileCount": { "type": "integer", "minimum": 1, "maximum": 16381 },
91
- "totalBytes": { "type": "integer", "minimum": 1, "maximum": 1073741824 },
92
- "files": {
93
- "type": "array",
94
- "minItems": 1,
95
- "maxItems": 16381,
96
- "items": { "$ref": "#/$defs/file" }
97
- }
98
- }
37
+ "descriptor": { "const": "arcane-app.json" },
38
+ "release": { "const": "payload/ARCANE_APP_RELEASE.json" },
39
+ "files": {
40
+ "type": "array",
41
+ "uniqueItems": true,
42
+ "items": { "$ref": "#/$defs/relativePath" }
99
43
  }
100
44
  },
101
45
  "$defs": {
102
- "appId": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" },
46
+ "appId": {
47
+ "type": "string",
48
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
49
+ },
103
50
  "semver": {
104
51
  "type": "string",
105
52
  "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
106
53
  },
107
- "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
108
54
  "relativePath": {
109
55
  "type": "string",
110
56
  "minLength": 1,
111
- "maxLength": 256,
112
- "pattern": "^(?!.*\\\\)(?!.*:)(?!.*[<>\"|?*])(?!.*(?:^|/)(?:\\.{1,2}|(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Ll][Oo][Cc][Kk]\\$|[Cc][Oo][Nn][Ii][Nn]\\$|[Cc][Oo][Nn][Oo][Uu][Tt]\\$|[Cc][Oo][Mm][1-9¹²³]|[Ll][Pp][Tt][1-9¹²³])(?:\\.[^/]*)?)(?:/|$))(?!.*[. ](?:/|$))[^/\\u0000-\\u001f\\u007f]+(?:/[^/\\u0000-\\u001f\\u007f]+)*$"
113
- },
114
- "file": {
115
- "type": "object",
116
- "additionalProperties": false,
117
- "required": ["path", "bytes", "sha256"],
118
- "properties": {
119
- "path": { "$ref": "#/$defs/relativePath" },
120
- "bytes": { "type": "integer", "minimum": 0, "maximum": 536870912 },
121
- "sha256": { "$ref": "#/$defs/sha256" }
122
- }
57
+ "pattern": "^(?![A-Za-z]:)(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)[^\\u0000]+$"
123
58
  }
124
59
  }
125
60
  }
@@ -13,8 +13,6 @@
13
13
  "version",
14
14
  "publisher",
15
15
  "package",
16
- "permissions",
17
- "security",
18
16
  "native",
19
17
  "requirements",
20
18
  "targets"
@@ -47,7 +45,6 @@
47
45
  "shared": {
48
46
  "type": "array",
49
47
  "minItems": 1,
50
- "maxItems": 64,
51
48
  "uniqueItems": true,
52
49
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }
53
50
  },
@@ -69,7 +66,6 @@
69
66
  "permissions": {
70
67
  "type": "object",
71
68
  "additionalProperties": false,
72
- "required": ["capabilities", "methods"],
73
69
  "properties": {
74
70
  "capabilities": {
75
71
  "allOf": [
@@ -90,7 +86,6 @@
90
86
  "security": {
91
87
  "type": "object",
92
88
  "additionalProperties": false,
93
- "required": ["connectOrigins", "frameOrigins", "mediaOrigins"],
94
89
  "properties": {
95
90
  "connectOrigins": { "$ref": "#/$defs/connectOriginList" },
96
91
  "frameOrigins": { "$ref": "#/$defs/frameOriginList" },
@@ -107,10 +102,9 @@
107
102
  "description": "A safe raster image path. Native targets require a non-null value. Coverage by package.include is enforced by the runtime validator because JSON Schema cannot compare property values or path prefixes.",
108
103
  "oneOf": [{ "$ref": "#/$defs/rasterIcon" }, { "type": "null" }]
109
104
  },
110
- "order": { "type": "integer", "minimum": 0, "maximum": 10000 },
105
+ "order": { "type": "integer", "minimum": 0 },
111
106
  "bundledApps": {
112
107
  "type": "array",
113
- "maxItems": 16,
114
108
  "uniqueItems": true,
115
109
  "items": { "$ref": "#/$defs/appId" }
116
110
  },
@@ -123,7 +117,7 @@
123
117
  "destination": { "$ref": "#/$defs/relativePath" },
124
118
  "originals": { "$ref": "#/$defs/relativePath" },
125
119
  "manifest": { "type": "string", "pattern": "^[^/\\\\]+\\.json$" },
126
- "expectedCount": { "type": "integer", "minimum": 1, "maximum": 512 }
120
+ "expectedCount": { "type": "integer", "minimum": 1 }
127
121
  },
128
122
  "allOf": [
129
123
  {
@@ -141,13 +135,12 @@
141
135
  "requirements": {
142
136
  "type": "object",
143
137
  "additionalProperties": false,
144
- "required": ["arcaneProtocol", "minimumCoreVersion", "features"],
138
+ "required": ["arcaneProtocol", "features"],
145
139
  "properties": {
146
140
  "arcaneProtocol": { "const": "arcane/1" },
147
141
  "minimumCoreVersion": { "$ref": "#/$defs/semver" },
148
142
  "features": {
149
143
  "type": "array",
150
- "maxItems": 128,
151
144
  "uniqueItems": true,
152
145
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$" }
153
146
  }
@@ -156,7 +149,6 @@
156
149
  "targets": {
157
150
  "type": "array",
158
151
  "minItems": 1,
159
- "maxItems": 6,
160
152
  "uniqueItems": true,
161
153
  "items": {
162
154
  "enum": ["android-arm64", "browser", "linux-arm64", "linux-x64", "portable", "windows-x64"]
@@ -178,9 +170,12 @@
178
170
  "icon": { "$ref": "#/$defs/rasterIcon" }
179
171
  },
180
172
  "required": ["icon"]
173
+ },
174
+ "requirements": {
175
+ "required": ["minimumCoreVersion"]
181
176
  }
182
177
  },
183
- "required": ["native"]
178
+ "required": ["native", "requirements"]
184
179
  }
185
180
  },
186
181
  {
@@ -224,8 +219,7 @@
224
219
  },
225
220
  "required": ["frameOrigins"]
226
221
  }
227
- },
228
- "required": ["security"]
222
+ }
229
223
  }
230
224
  }
231
225
  ],
@@ -234,13 +228,11 @@
234
228
  "presentationText": {
235
229
  "type": "string",
236
230
  "minLength": 1,
237
- "maxLength": 160,
238
231
  "pattern": "^(?=.*\\S)[^<>\\u0000-\\u001f\\u007f]+$"
239
232
  },
240
233
  "description": {
241
234
  "type": "string",
242
235
  "minLength": 1,
243
- "maxLength": 500,
244
236
  "pattern": "^(?=.*\\S)[^<>\\u0000-\\u001f\\u007f]+$"
245
237
  },
246
238
  "semver": {
@@ -256,14 +248,12 @@
256
248
  "allOf": [
257
249
  { "$ref": "#/$defs/relativePath" },
258
250
  {
259
- "maxLength": 160,
260
251
  "pattern": "\\.(?:[Ii][Cc][Oo]|[Jj][Pp][Ee]?[Gg]|[Pp][Nn][Gg]|[Ww][Ee][Bb][Pp])$"
261
252
  }
262
253
  ]
263
254
  },
264
255
  "pathList": {
265
256
  "type": "array",
266
- "maxItems": 512,
267
257
  "uniqueItems": true,
268
258
  "items": { "$ref": "#/$defs/relativePath" }
269
259
  },
@@ -272,19 +262,16 @@
272
262
  },
273
263
  "permissionList": {
274
264
  "type": "array",
275
- "maxItems": 256,
276
265
  "uniqueItems": true,
277
266
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*)+$" }
278
267
  },
279
268
  "methodList": {
280
269
  "type": "array",
281
- "maxItems": 512,
282
270
  "uniqueItems": true,
283
271
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-zA-Z0-9]*)+$" }
284
272
  },
285
273
  "connectOriginList": {
286
274
  "type": "array",
287
- "maxItems": 16,
288
275
  "uniqueItems": true,
289
276
  "items": {
290
277
  "type": "string",
@@ -293,13 +280,11 @@
293
280
  },
294
281
  "httpsOriginList": {
295
282
  "type": "array",
296
- "maxItems": 16,
297
283
  "uniqueItems": true,
298
284
  "items": { "type": "string", "pattern": "^https://[^/?#]+$" }
299
285
  },
300
286
  "frameOriginList": {
301
287
  "type": "array",
302
- "maxItems": 16,
303
288
  "uniqueItems": true,
304
289
  "items": { "type": "string", "pattern": "^(?:https:|https://[^/?#]+)$" }
305
290
  },
@@ -311,14 +296,13 @@
311
296
  "verified_only": { "type": "boolean" },
312
297
  "models": {
313
298
  "type": "array",
314
- "maxItems": 64,
315
299
  "uniqueItems": true,
316
300
  "items": {
317
301
  "type": "object",
318
302
  "additionalProperties": false,
319
303
  "required": ["name", "definition"],
320
304
  "properties": {
321
- "name": { "type": "string", "minLength": 1, "maxLength": 256 },
305
+ "name": { "type": "string", "minLength": 1 },
322
306
  "definition": { "$ref": "#/$defs/relativePath" }
323
307
  }
324
308
  }
@@ -2,185 +2,52 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/TheWizardNexus/arcane-os-sdk/schemas/arcane-lock.schema.json",
4
4
  "title": "Arcane SDK workspace lock",
5
- "description": "Pins an authored workspace to one SDK runtime and protocol state.",
5
+ "description": "Identifies the installed SDK roots and public protocol versions used by an authored workspace without byte identities or security admission.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "sdk",
11
- "runtime",
12
- "sdkBrowserRuntime",
13
- "protocols"
14
- ],
8
+ "required": ["schemaVersion", "sdk", "runtime", "sdkBrowserRuntime", "protocols"],
15
9
  "properties": {
16
- "schemaVersion": {
17
- "const": 1
18
- },
10
+ "schemaVersion": {"const": 1},
19
11
  "sdk": {
20
12
  "type": "object",
21
13
  "additionalProperties": false,
22
- "required": [
23
- "name",
24
- "version"
25
- ],
14
+ "required": ["name", "version"],
26
15
  "properties": {
27
- "name": {
28
- "const": "arcane-os"
29
- },
30
- "version": {
31
- "const": "0.3.0"
32
- }
16
+ "name": {"const": "arcane-os"},
17
+ "version": {"const": "0.3.2"}
33
18
  }
34
19
  },
35
20
  "runtime": {
36
21
  "type": "object",
37
22
  "additionalProperties": false,
38
- "required": [
39
- "manifest",
40
- "contentSha256",
41
- "upstreamCommit"
42
- ],
43
- "properties": {
44
- "manifest": {
45
- "type": "string",
46
- "pattern": "^node_modules/(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*/runtime/ARCANE_RUNTIME_RELEASE\\.json$"
47
- },
48
- "contentSha256": {
49
- "$ref": "#/$defs/sha256"
50
- },
51
- "upstreamCommit": {
52
- "type": "string",
53
- "pattern": "^[0-9a-f]{40}$"
54
- }
55
- }
23
+ "required": ["root"],
24
+ "properties": {"root": {"$ref": "#/$defs/runtimeRoot"}}
56
25
  },
57
26
  "sdkBrowserRuntime": {
58
27
  "type": "object",
59
28
  "additionalProperties": false,
60
- "required": [
61
- "manifest",
62
- "manifestSha256",
63
- "contentSha256",
64
- "builder",
65
- "sdkVersion",
66
- "source"
67
- ],
68
- "properties": {
69
- "manifest": {
70
- "type": "string",
71
- "pattern": "^node_modules/(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*/browser-runtime/ARCANE_SDK_BROWSER_RELEASE\\.json$"
72
- },
73
- "manifestSha256": {
74
- "type": "string",
75
- "pattern": "^[a-f0-9]{64}$"
76
- },
77
- "contentSha256": {
78
- "type": "string",
79
- "pattern": "^[a-f0-9]{64}$"
80
- },
81
- "builder": {
82
- "const": "arcane-sdk-browser-runtime-v1"
83
- },
84
- "sdkVersion": {
85
- "const": "0.3.0"
86
- },
87
- "source": {
88
- "type": "object",
89
- "additionalProperties": false,
90
- "required": [
91
- "authority",
92
- "repository",
93
- "protocol",
94
- "browserEntry",
95
- "dependencies"
96
- ],
97
- "properties": {
98
- "authority": {
99
- "const": "arcane-os-sdk"
100
- },
101
- "repository": {
102
- "const": "https://github.com/TheWizardNexus/arcane-os-sdk.git"
103
- },
104
- "protocol": {
105
- "const": "arcane-sdk-browser-runtime/1"
106
- },
107
- "browserEntry": {
108
- "const": "arcane-os/event-manager"
109
- },
110
- "dependencies": {
111
- "type": "array",
112
- "minItems": 3,
113
- "maxItems": 3,
114
- "prefixItems": [
115
- {
116
- "type": "object",
117
- "additionalProperties": false,
118
- "required": ["name", "version", "resolved", "integrity"],
119
- "properties": {
120
- "name": {"const": "event-pubsub"},
121
- "version": {"const": "6.1.0"},
122
- "resolved": {"const": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-6.1.0.tgz"},
123
- "integrity": {"const": "sha512-FEMlhTxwqGM0hztTixG6FhVFXqp7Eq1ltk5mSreK6Mhy3xWWpLAzEUR6OMvMdNqT3jgSxA8JDhnhyAG3X4Xy7Q=="}
124
- }
125
- },
126
- {
127
- "type": "object",
128
- "additionalProperties": false,
129
- "required": ["name", "version", "resolved", "integrity"],
130
- "properties": {
131
- "name": {"const": "strong-type"},
132
- "version": {"const": "2.0.0"},
133
- "resolved": {"const": "https://registry.npmjs.org/strong-type/-/strong-type-2.0.0.tgz"},
134
- "integrity": {"const": "sha512-HHrY9qYC7yn+5mlewiI3k9RQM9gZqGQsqbomZcd10Ks0h4RlX01nnkWbCe4AsVPCI6KaFvpkWm1nHMD+Ykup6g=="}
135
- }
136
- },
137
- {
138
- "type": "object",
139
- "additionalProperties": false,
140
- "required": ["name", "version", "resolved", "integrity"],
141
- "properties": {
142
- "name": {"const": "@wllama/wllama"},
143
- "version": {"const": "3.6.0"},
144
- "resolved": {"const": "https://registry.npmjs.org/@wllama/wllama/-/wllama-3.6.0.tgz"},
145
- "integrity": {"const": "sha512-NN3ZBXqaaUwGXTQubkNvsCaLPjN2XVa0bVS40OYCE8zquYmRc2W3oHYEgwvuSWWDB8aUqTLyMioySCXNkcnD1w=="}
146
- }
147
- }
148
- ],
149
- "items": false
150
- }
151
- }
152
- }
153
- }
29
+ "required": ["root"],
30
+ "properties": {"root": {"$ref": "#/$defs/browserRuntimeRoot"}}
154
31
  },
155
32
  "protocols": {
156
33
  "type": "object",
157
34
  "additionalProperties": false,
158
- "required": [
159
- "arcane",
160
- "cliEvents",
161
- "targetAdapter"
162
- ],
35
+ "required": ["arcane", "cliEvents", "targetAdapter"],
163
36
  "properties": {
164
- "arcane": {
165
- "const": "arcane/1"
166
- },
167
- "cliEvents": {
168
- "const": "arcane-cli-events/1"
169
- },
170
- "targetAdapter": {
171
- "const": "arcane-target-adapter/1"
172
- }
37
+ "arcane": {"const": "arcane/1"},
38
+ "cliEvents": {"const": "arcane-cli-events/1"},
39
+ "targetAdapter": {"const": "arcane-target-adapter/1"}
173
40
  }
174
41
  }
175
42
  },
176
43
  "$defs": {
177
- "semver": {
44
+ "runtimeRoot": {
178
45
  "type": "string",
179
- "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
46
+ "pattern": "^node_modules/(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*/runtime$"
180
47
  },
181
- "sha256": {
48
+ "browserRuntimeRoot": {
182
49
  "type": "string",
183
- "pattern": "^[0-9a-f]{64}$"
50
+ "pattern": "^node_modules/(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*/browser-runtime$"
184
51
  }
185
52
  }
186
53
  }
@@ -12,7 +12,6 @@
12
12
  "version",
13
13
  "entry",
14
14
  "strategy",
15
- "security",
16
15
  "include",
17
16
  "shared"
18
17
  ],
@@ -26,7 +25,6 @@
26
25
  "displayName": {
27
26
  "type": "string",
28
27
  "minLength": 1,
29
- "maxLength": 160,
30
28
  "pattern": "^(?=.*\\S)[^<>\\u0000-\\u001f\\u007f]+$"
31
29
  },
32
30
  "version": {
@@ -48,11 +46,6 @@
48
46
  "security": {
49
47
  "type": "object",
50
48
  "additionalProperties": false,
51
- "required": [
52
- "connectOrigins",
53
- "frameOrigins",
54
- "mediaOrigins"
55
- ],
56
49
  "properties": {
57
50
  "connectOrigins": {
58
51
  "$ref": "#/$defs/connectOriginList"
@@ -145,7 +138,6 @@
145
138
  },
146
139
  "pathList": {
147
140
  "type": "array",
148
- "maxItems": 512,
149
141
  "uniqueItems": true,
150
142
  "items": {
151
143
  "$ref": "#/$defs/literalRelativePath"
@@ -153,7 +145,6 @@
153
145
  },
154
146
  "connectOriginList": {
155
147
  "type": "array",
156
- "maxItems": 16,
157
148
  "uniqueItems": true,
158
149
  "items": {
159
150
  "type": "string",
@@ -162,7 +153,6 @@
162
153
  },
163
154
  "httpsOriginList": {
164
155
  "type": "array",
165
- "maxItems": 16,
166
156
  "uniqueItems": true,
167
157
  "items": {
168
158
  "type": "string",
@@ -171,7 +161,6 @@
171
161
  },
172
162
  "frameOriginList": {
173
163
  "type": "array",
174
- "maxItems": 16,
175
164
  "uniqueItems": true,
176
165
  "items": {
177
166
  "type": "string",
@@ -191,7 +180,6 @@
191
180
  },
192
181
  "models": {
193
182
  "type": "array",
194
- "maxItems": 64,
195
183
  "uniqueItems": true,
196
184
  "items": {
197
185
  "type": "object",
@@ -204,16 +192,14 @@
204
192
  "name": {
205
193
  "type": "string",
206
194
  "minLength": 1,
207
- "maxLength": 256,
208
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,191}(?::[A-Za-z0-9][A-Za-z0-9._-]{0,63})?$",
195
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*(?::[A-Za-z0-9][A-Za-z0-9._-]*)?$",
209
196
  "not": {
210
197
  "pattern": "^[Oo][Pp][Ee][Nn][Aa][Ii]$"
211
198
  }
212
199
  },
213
200
  "definition": {
214
201
  "type": "string",
215
- "maxLength": 128,
216
- "pattern": "^(?:Modelfile|[A-Za-z0-9][A-Za-z0-9._-]{0,118}\\.Modelfile)$"
202
+ "pattern": "^(?:Modelfile|[A-Za-z0-9][A-Za-z0-9._-]*\\.Modelfile)$"
217
203
  }
218
204
  }
219
205
  }