@wenathlan/saddle 2.1.6 → 2.1.8

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 (300) hide show
  1. package/Dockerfile +170 -66
  2. package/LICENSE +0 -0
  3. package/README.md +73 -58
  4. package/alternatives.ts +0 -0
  5. package/biome.jsonc +134 -0
  6. package/boards.json +2 -2
  7. package/browser.ts +482 -0
  8. package/cli.ts +274 -0
  9. package/compute.ts +4 -4
  10. package/cores.json +2 -2
  11. package/distribution.ts +731 -0
  12. package/docker.config +37 -9
  13. package/docs/.gitkeep +0 -0
  14. package/docs/actionrecorder.md +0 -0
  15. package/docs/actionsincident.md +0 -0
  16. package/docs/alternatives.md +0 -0
  17. package/docs/architecture.md +0 -0
  18. package/docs/{architecture-1.8.19.md → architecture1819.md} +0 -0
  19. package/docs/{architecture-1.8.19.mmd → architecture1819.mmd} +0 -0
  20. package/docs/artifactavailability.md +2 -2
  21. package/docs/{artifactresearch-1.8.9.md → artifactresearch189.md} +0 -0
  22. package/docs/{batches-1816-1820.md → batches1816to1820.md} +0 -0
  23. package/docs/{brancharchive-2026-08-18.md → brancharchive20260818.md} +0 -0
  24. package/docs/branchaudit.md +0 -0
  25. package/docs/browser.md +18 -1
  26. package/docs/capabilityreport.md +0 -0
  27. package/docs/comparativeaudit.md +0 -0
  28. package/docs/consolidation.md +0 -0
  29. package/docs/{containerplatforms-1.8.17.md → containerplatforms1817.md} +0 -0
  30. package/docs/{containerplatforms-2.1.0.md → containerplatforms210.md} +1 -1
  31. package/docs/{documentmap-1.8.12.md → documentmap1812.md} +1 -1
  32. package/docs/{e2ugh-engine.md → e2ughengine.md} +0 -0
  33. package/docs/ecosystemplan.md +0 -0
  34. package/docs/enginearchitecture.md +0 -0
  35. package/docs/extension.md +13 -2
  36. package/docs/featureaudit.md +0 -0
  37. package/docs/{flatbuildresearch-1.8.11.md → flatbuildresearch1811.md} +0 -0
  38. package/docs/gapmatrix.md +0 -0
  39. package/docs/hardware.md +0 -0
  40. package/docs/libraryapi.md +1 -1
  41. package/docs/{licenseaudit-1.8.12.md → licenseaudit1812.md} +0 -0
  42. package/docs/logs/examplesession.json +54 -0
  43. package/docs/memoryengine.md +0 -0
  44. package/docs/{mobileconversionresearch-1.8.10.md → mobileconversionresearch1810.md} +0 -0
  45. package/docs/modes.md +0 -0
  46. package/docs/{nativeidentityresearch-1.8.11.md → nativeidentityresearch1811.md} +0 -0
  47. package/docs/{native-wrappers.md → nativewrappers.md} +0 -0
  48. package/docs/ninetymodalities.md +191 -0
  49. package/docs/optimization.md +0 -0
  50. package/docs/packageaudit185.md +0 -0
  51. package/docs/performance.md +0 -0
  52. package/docs/{planning.1.8.18.md → planning1818.md} +0 -0
  53. package/docs/{planning.1.8.19.md → planning1819.md} +0 -0
  54. package/docs/planningengine.md +186 -0
  55. package/docs/planningninety.md +391 -0
  56. package/docs/platformpipelineaudit.md +0 -0
  57. package/docs/platformpipelines.md +0 -0
  58. package/docs/productindex.md +0 -0
  59. package/docs/registryresearch.md +0 -0
  60. package/docs/release.md +0 -0
  61. package/docs/release17notes.md +0 -0
  62. package/docs/release181notes.md +0 -0
  63. package/docs/release182notes.md +0 -0
  64. package/docs/release184notes.md +0 -0
  65. package/docs/release185notes.md +0 -0
  66. package/docs/release18notes.md +0 -0
  67. package/docs/releaseassets.md +0 -0
  68. package/docs/{releasenotes-1.8.12.md → releasenotes1812.md} +0 -0
  69. package/docs/{releasenotes-1.8.13.md → releasenotes1813.md} +2 -2
  70. package/docs/{releasenotes-1.8.14.md → releasenotes1814.md} +1 -1
  71. package/docs/{releasenotes-1.8.15.md → releasenotes1815.md} +0 -0
  72. package/docs/{releasenotes-1.8.16.md → releasenotes1816.md} +0 -0
  73. package/docs/{releasenotes-1.8.17.md → releasenotes1817.md} +0 -0
  74. package/docs/{releasenotes-1.8.18.md → releasenotes1818.md} +0 -0
  75. package/docs/{releasenotes-1.8.19.md → releasenotes1819.md} +0 -0
  76. package/docs/{reorganization-1.8.8.md → reorganization188.md} +0 -0
  77. package/docs/{reorganization-1.8.9.md → reorganization189.md} +0 -0
  78. package/docs/{repo-analysis-1.8.21.json → repoanalysis1821.json} +0 -0
  79. package/docs/{repo-candidates-1.8.21.jsonl → repocandidates1821.jsonl} +0 -0
  80. package/docs/{repo-research-1.8.16.md → reporesearch1816.md} +0 -0
  81. package/docs/{repo-research-1.8.21.md → reporesearch1821.md} +0 -0
  82. package/docs/{repo-selected-1.8.21.json → reposelected1821.json} +0 -0
  83. package/docs/{repo-synthesis-1.8.16.md → reposynthesis1816.md} +1 -1
  84. package/docs/{repo-synthesis-1.8.21.md → reposynthesis1821.md} +0 -0
  85. package/docs/{research-1.8.18-isolation.md → research1818isolation.md} +0 -0
  86. package/docs/{research-1.8.19-virtual-browser.md → research1819virtualbrowser.md} +0 -0
  87. package/docs/roadmapp2p3.md +0 -0
  88. package/docs/s3compatible.md +0 -0
  89. package/docs/{scanningresearch-1.8.11.md → scanningresearch1811.md} +0 -0
  90. package/docs/security.md +0 -0
  91. package/docs/{securityaudit-1.8.7.md → securityaudit187.md} +0 -0
  92. package/docs/{securityreferences-1.8.11.md → securityreferences1811.md} +0 -0
  93. package/docs/{securityresearch-1.8.11.md → securityresearch1811.md} +0 -0
  94. package/docs/{signingresearch-1.8.12.md → signingresearch1812.md} +0 -0
  95. package/docs/signingwithoutcertificates.md +0 -0
  96. package/docs/signpathapplication.md +0 -0
  97. package/docs/sitemap.md +0 -0
  98. package/docs/{tauri-glib-risk-1.8.11.md → tauriglibrisk1811.md} +0 -0
  99. package/docs/todo.md +2 -2
  100. package/docs/{todo-1.8.15.md → todo1815.md} +1 -1
  101. package/docs/{todo-1.8.16.md → todo1816.md} +5 -5
  102. package/docs/{todo-1.8.18.md → todo1818.md} +0 -0
  103. package/docs/{todo-1.8.19.md → todo1819.md} +0 -0
  104. package/docs/{toolchainresearch-1.8.9.md → toolchainresearch189.md} +0 -0
  105. package/docs/toolchains.md +0 -0
  106. package/docs/usage.md +0 -0
  107. package/docs/viability.md +0 -0
  108. package/docs/virtualization.md +0 -0
  109. package/docs/{web-duplicatecleanup.md → webduplicatecleanup.md} +0 -0
  110. package/docs/{web-ideas.md → webideas.md} +0 -0
  111. package/docs/{workflowimprovements-2026-08-19.md → workflowimprovements20260819.md} +0 -0
  112. package/docs/workflowinputs.md +0 -0
  113. package/docs/workflowoperations.md +0 -0
  114. package/docs/workloadlaw.md +104 -0
  115. package/execution.ts +677 -0
  116. package/foundation.ts +314 -0
  117. package/gpumonitor.cpp +0 -0
  118. package/gpus.json +1 -1
  119. package/index.ts +38 -29
  120. package/isolation.ts +84 -0
  121. package/modalityregistry.ts +1493 -0
  122. package/{dist/modes.js → modes.ts} +79 -62
  123. package/mttg.config +1 -1
  124. package/orchestrator.ts +54 -17
  125. package/package.json +245 -146
  126. package/passage.config +0 -0
  127. package/performance.ts +0 -0
  128. package/processors.json +1 -1
  129. package/qemu.config +2 -2
  130. package/qemubridge.py +0 -0
  131. package/quantum.ts +0 -0
  132. package/render.ts +0 -0
  133. package/sandbox.ts +2035 -0
  134. package/scheduler.ts +1 -1
  135. package/security.ts +0 -0
  136. package/server.ts +52 -0
  137. package/tiers.ts +9 -3
  138. package/tsconfig.json +22 -13
  139. package/virtual.ts +1105 -0
  140. package/virtualcpu.ts +1 -0
  141. package/virtualgpu.ts +2 -1
  142. package/virtualhardware.c +0 -0
  143. package/virtualhardware.json +2 -2
  144. package/virtualization.ts +1 -1
  145. package/virtualizationcore.cpp +0 -0
  146. package/virtualmemory.ts +0 -0
  147. package/vm.config.json +2 -2
  148. package/workloadlaw.ts +293 -0
  149. package/biome.json +0 -151
  150. package/dist/acquisition.d.ts +0 -359
  151. package/dist/acquisition.d.ts.map +0 -1
  152. package/dist/acquisition.js +0 -629
  153. package/dist/acquisition.js.map +0 -1
  154. package/dist/alternatives.d.ts +0 -509
  155. package/dist/alternatives.d.ts.map +0 -1
  156. package/dist/alternatives.js +0 -951
  157. package/dist/alternatives.js.map +0 -1
  158. package/dist/automation.d.ts +0 -426
  159. package/dist/automation.d.ts.map +0 -1
  160. package/dist/automation.js +0 -561
  161. package/dist/automation.js.map +0 -1
  162. package/dist/browser.d.ts +0 -562
  163. package/dist/browser.d.ts.map +0 -1
  164. package/dist/browser.js +0 -1057
  165. package/dist/browser.js.map +0 -1
  166. package/dist/cli.d.ts +0 -17
  167. package/dist/cli.d.ts.map +0 -1
  168. package/dist/cli.js +0 -169
  169. package/dist/cli.js.map +0 -1
  170. package/dist/communication.d.ts +0 -192
  171. package/dist/communication.d.ts.map +0 -1
  172. package/dist/communication.js +0 -418
  173. package/dist/communication.js.map +0 -1
  174. package/dist/compute.d.ts +0 -1161
  175. package/dist/compute.d.ts.map +0 -1
  176. package/dist/compute.js +0 -2273
  177. package/dist/compute.js.map +0 -1
  178. package/dist/distribution.d.ts +0 -529
  179. package/dist/distribution.d.ts.map +0 -1
  180. package/dist/distribution.js +0 -811
  181. package/dist/distribution.js.map +0 -1
  182. package/dist/docs/example-localjob.d.ts +0 -2
  183. package/dist/docs/example-localjob.d.ts.map +0 -1
  184. package/dist/docs/example-localjob.js +0 -15
  185. package/dist/docs/example-localjob.js.map +0 -1
  186. package/dist/docs/example-publicapi.d.ts +0 -2
  187. package/dist/docs/example-publicapi.d.ts.map +0 -1
  188. package/dist/docs/example-publicapi.js +0 -7
  189. package/dist/docs/example-publicapi.js.map +0 -1
  190. package/dist/execution.d.ts +0 -530
  191. package/dist/execution.d.ts.map +0 -1
  192. package/dist/execution.js +0 -761
  193. package/dist/execution.js.map +0 -1
  194. package/dist/format.d.ts +0 -19
  195. package/dist/format.d.ts.map +0 -1
  196. package/dist/format.js +0 -60
  197. package/dist/format.js.map +0 -1
  198. package/dist/foundation.d.ts +0 -176
  199. package/dist/foundation.d.ts.map +0 -1
  200. package/dist/foundation.js +0 -309
  201. package/dist/foundation.js.map +0 -1
  202. package/dist/index.d.ts +0 -735
  203. package/dist/index.d.ts.map +0 -1
  204. package/dist/index.js +0 -1020
  205. package/dist/index.js.map +0 -1
  206. package/dist/integration.d.ts +0 -236
  207. package/dist/integration.d.ts.map +0 -1
  208. package/dist/integration.js +0 -236
  209. package/dist/integration.js.map +0 -1
  210. package/dist/intelligence.d.ts +0 -94
  211. package/dist/intelligence.d.ts.map +0 -1
  212. package/dist/intelligence.js +0 -145
  213. package/dist/intelligence.js.map +0 -1
  214. package/dist/isolation.d.ts +0 -129
  215. package/dist/isolation.d.ts.map +0 -1
  216. package/dist/isolation.js +0 -96
  217. package/dist/isolation.js.map +0 -1
  218. package/dist/media.d.ts +0 -344
  219. package/dist/media.d.ts.map +0 -1
  220. package/dist/media.js +0 -986
  221. package/dist/media.js.map +0 -1
  222. package/dist/modes.d.ts +0 -359
  223. package/dist/modes.d.ts.map +0 -1
  224. package/dist/modes.js.map +0 -1
  225. package/dist/operations.d.ts +0 -67
  226. package/dist/operations.d.ts.map +0 -1
  227. package/dist/operations.js +0 -94
  228. package/dist/operations.js.map +0 -1
  229. package/dist/orchestrator.d.ts +0 -1339
  230. package/dist/orchestrator.d.ts.map +0 -1
  231. package/dist/orchestrator.js +0 -4308
  232. package/dist/orchestrator.js.map +0 -1
  233. package/dist/packager/targetcli.js +0 -4
  234. package/dist/performance.d.ts +0 -416
  235. package/dist/performance.d.ts.map +0 -1
  236. package/dist/performance.js +0 -827
  237. package/dist/performance.js.map +0 -1
  238. package/dist/quantum.d.ts +0 -810
  239. package/dist/quantum.d.ts.map +0 -1
  240. package/dist/quantum.js +0 -2073
  241. package/dist/quantum.js.map +0 -1
  242. package/dist/render.d.ts +0 -381
  243. package/dist/render.d.ts.map +0 -1
  244. package/dist/render.js +0 -1073
  245. package/dist/render.js.map +0 -1
  246. package/dist/scheduler.d.ts +0 -596
  247. package/dist/scheduler.d.ts.map +0 -1
  248. package/dist/scheduler.js +0 -1259
  249. package/dist/scheduler.js.map +0 -1
  250. package/dist/security.d.ts +0 -501
  251. package/dist/security.d.ts.map +0 -1
  252. package/dist/security.js +0 -1170
  253. package/dist/security.js.map +0 -1
  254. package/dist/server.d.ts +0 -21
  255. package/dist/server.d.ts.map +0 -1
  256. package/dist/server.js +0 -52
  257. package/dist/server.js.map +0 -1
  258. package/dist/tiers.d.ts +0 -1002
  259. package/dist/tiers.d.ts.map +0 -1
  260. package/dist/tiers.js +0 -2165
  261. package/dist/tiers.js.map +0 -1
  262. package/dist/virtual.d.ts +0 -641
  263. package/dist/virtual.d.ts.map +0 -1
  264. package/dist/virtual.js +0 -1285
  265. package/dist/virtual.js.map +0 -1
  266. package/dist/virtualcpu.d.ts +0 -316
  267. package/dist/virtualcpu.d.ts.map +0 -1
  268. package/dist/virtualcpu.js +0 -1180
  269. package/dist/virtualcpu.js.map +0 -1
  270. package/dist/virtualgpu.d.ts +0 -345
  271. package/dist/virtualgpu.d.ts.map +0 -1
  272. package/dist/virtualgpu.js +0 -1000
  273. package/dist/virtualgpu.js.map +0 -1
  274. package/dist/virtualization.d.ts +0 -607
  275. package/dist/virtualization.d.ts.map +0 -1
  276. package/dist/virtualization.js +0 -1187
  277. package/dist/virtualization.js.map +0 -1
  278. package/dist/virtualmemory.d.ts +0 -818
  279. package/dist/virtualmemory.d.ts.map +0 -1
  280. package/dist/virtualmemory.js +0 -1796
  281. package/dist/virtualmemory.js.map +0 -1
  282. package/dist/vitest.config.d.ts +0 -3
  283. package/dist/vitest.config.d.ts.map +0 -1
  284. package/dist/vitest.config.js +0 -26
  285. package/dist/vitest.config.js.map +0 -1
  286. package/dist/webscrape.d.ts +0 -720
  287. package/dist/webscrape.d.ts.map +0 -1
  288. package/dist/webscrape.js +0 -2697
  289. package/dist/webscrape.js.map +0 -1
  290. package/docs/CONVERSA.txt +0 -1523
  291. package/docs/architecture-1.8.19.png +0 -0
  292. package/docs/assets/architecture.svg +0 -45
  293. package/docs/assets/saddlemark.svg +0 -13
  294. package/docs/example-localjob.ts +0 -15
  295. package/docs/example-publicapi.ts +0 -7
  296. package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
  297. package/media.ts +0 -1337
  298. package/web/manifest.json +0 -30
  299. package/web/readme.md +0 -383
  300. package/web/tsconfig.json +0 -25
@@ -1,94 +0,0 @@
1
- /**
2
- * intelligence.ts — AI planning, provenance, retrieval and observable metrics.
3
- *
4
- * This file is the v2.0.0 grand-merge consolidation of the former nested
5
- * folders of the repository (ai) into the single
6
- * root-level domain file of the saddle family standard: one optimized
7
- * TypeScript file per correlated domain, ordinal sections, JSDoc on every
8
- * block, intra-domain imports dissolved, cross-domain imports rewritten to
9
- * ./<domain>.js. Every capability of every source file is preserved here;
10
- * the pure re-export barrels (none in this domain) folded their surface into this file directly.
11
- */
12
- /**
13
- * context provenance links retrieved chunks to source, query and transformation metadata.
14
- */
15
- /** Creates a serializable retrieval record for an agent context result. */
16
- export declare function provenance(input?: {}): {
17
- version: number;
18
- source: any;
19
- sourceurl: any;
20
- documentid: any;
21
- query: any;
22
- retrievedat: number;
23
- chunks: any;
24
- metadata: any;
25
- };
26
- /** Merges provenance records while deduplicating chunk identifiers. */
27
- export declare function mergeprovenance(records?: any[]): {
28
- version: number;
29
- sources: any[];
30
- chunks: any[];
31
- mergedat: number;
32
- };
33
- export declare function estimatetokens(text: any, model?: string): number;
34
- export declare function fitscontext(text: any, context: any, model?: string): boolean;
35
- export declare function tokenbudget(text: any, options?: {}): {
36
- tokens: number;
37
- context: any;
38
- fits: boolean;
39
- remaining: number;
40
- };
41
- export declare function settokenratios(values?: {}): {
42
- default: 4;
43
- gpt: 3.5;
44
- claude: 3.2;
45
- gemini: 3.5;
46
- };
47
- /**
48
- * markdown chunking preserves heading paths and uses paragraph boundaries before hard cuts.
49
- */
50
- export declare function chunkmarkdown(markdown: any, options?: {}): any[];
51
- /**
52
- * rag manifests connect chunks to embedding stores without forcing a vendor client.
53
- */
54
- export declare function ragmanifest(input?: {}): Promise<{
55
- documentid: string;
56
- source: any;
57
- chunks: any[];
58
- embeddingmodel: any;
59
- embeddingdimensions: any;
60
- createdat: number;
61
- }>;
62
- export declare function vectorrecord(chunk: any, vector: any, options?: {}): {
63
- id: string;
64
- vector: any;
65
- metadata: {
66
- headingpath: any;
67
- contenthash: any;
68
- sourceurl: any;
69
- tokencount: any;
70
- contenttype: any;
71
- language: any;
72
- embeddingmodel: any;
73
- embeddingdimensions: any;
74
- };
75
- };
76
- /**
77
- * llms text generation creates compact absolute links for agent consumption.
78
- */
79
- export declare function llmstxt(options?: {}): string;
80
- export declare function llmsfull(options?: {}): any;
81
- /**
82
- * metrics keeps low-cardinality counters and durations without requiring a telemetry vendor.
83
- */
84
- /** Creates an in-memory metric collector with bounded names and labels. */
85
- export declare function metricstore(options?: {}): {
86
- count: (name: any, amount?: number, labels?: {}) => any;
87
- observe: (name: any, milliseconds: any, labels?: {}) => number;
88
- snapshot: () => {
89
- counters: any;
90
- durations: any;
91
- };
92
- reset: () => void;
93
- };
94
- //# sourceMappingURL=intelligence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH;;GAEG;AAEH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,KAAK,KAAK;IAE1B,OAAO;IAAK,MAAM;IAAmC,SAAS;IAAmB,UAAU;IAAoB,KAAK;IAAe,WAAW;IAA2C,MAAM;IAA6T,QAAQ;EAC9gB;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,OAAO,QAAK;;;;;EAM3C;AAUD,wBAAgB,cAAc,CAAC,IAAI,KAAA,EAAE,KAAK,SAAY,UAAyG;AAC/J,wBAAgB,WAAW,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,KAAK,SAAY,WAAoD;AAChH,wBAAgB,WAAW,CAAC,IAAI,KAAA,EAAE,OAAO,KAAK;;;;;EAAmQ;AACjT,wBAAgB,cAAc,CAAC,MAAM,KAAK;;;;;EAA0D;AAKpG;;GAEG;AAEH,wBAAgB,aAAa,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAK,SAgBnD;AAKD;;GAEG;AACH,wBAAsB,WAAW,CAAC,KAAK,KAAK;;;;;;;GAM3C;AAED,wBAAgB,YAAY,CAAC,KAAK,KAAA,EAAE,MAAM,KAAA,EAAE,OAAO,KAAK;;;;QAAwE,WAAW;QAAqB,WAAW;QAAqB,SAAS;QAAqB,UAAU;QAAoB,WAAW;QAAiC,QAAQ;QAA4B,cAAc;QAA0B,mBAAmB;;EAAuB;AAO9Z;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,KAAK,UAMnC;AAED,wBAAgB,QAAQ,CAAC,OAAO,KAAK,OAAgN;AAKrP;;GAEG;AAEH,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,OAAO,KAAK;;;;QAOP,QAAQ;QAA8B,SAAS;;;EAG/E"}
@@ -1,145 +0,0 @@
1
- /**
2
- * intelligence.ts — AI planning, provenance, retrieval and observable metrics.
3
- *
4
- * This file is the v2.0.0 grand-merge consolidation of the former nested
5
- * folders of the repository (ai) into the single
6
- * root-level domain file of the saddle family standard: one optimized
7
- * TypeScript file per correlated domain, ordinal sections, JSDoc on every
8
- * block, intra-domain imports dissolved, cross-domain imports rewritten to
9
- * ./<domain>.js. Every capability of every source file is preserved here;
10
- * the pure re-export barrels (none in this domain) folded their surface into this file directly.
11
- */
12
- /* ════════════════════════════════════════════════════════════════════ */
13
- /* Section 1: ai/provenance.ts — context provenance links retrieved chunks to source, query and transformation metadata. */
14
- /* ════════════════════════════════════════════════════════════════════ */
15
- /**
16
- * context provenance links retrieved chunks to source, query and transformation metadata.
17
- */
18
- /** Creates a serializable retrieval record for an agent context result. */
19
- export function provenance(input = {}) {
20
- if (!input.source && !input.sourceurl)
21
- throw new TypeError("provenance requires a source");
22
- return { version: 1, source: input.source ?? input.sourceurl, sourceurl: input.sourceurl, documentid: input.documentid, query: input.query, retrievedat: Number(input.retrievedat ?? Date.now()), chunks: Array.isArray(input.chunks) ? input.chunks.map((chunk, index) => ({ id: String(chunk.id ?? index), contenthash: chunk.contenthash, score: chunk.score === undefined ? undefined : Number(chunk.score), headingpath: chunk.headingpath, tokencount: chunk.tokencount, citation: chunk.citation ?? input.sourceurl })) : [], metadata: { ...(input.metadata ?? {}) } };
23
- }
24
- /** Merges provenance records while deduplicating chunk identifiers. */
25
- export function mergeprovenance(records = []) {
26
- const valid = records.filter(Boolean);
27
- const chunks = [];
28
- const seen = new Set();
29
- for (const record of valid)
30
- for (const chunk of record.chunks ?? []) {
31
- const key = `${record.documentid ?? record.source}:${chunk.id}`;
32
- if (seen.has(key))
33
- continue;
34
- seen.add(key);
35
- chunks.push({ ...chunk, source: record.source, documentid: record.documentid });
36
- }
37
- return { version: 1, sources: [...new Set(valid.map((record) => record.source))], chunks, mergedat: Date.now() };
38
- }
39
- /* ════════════════════════════════════════════════════════════════════ */
40
- /* Section 2: ai/tokens.ts — token helpers use configurable model ratios and never require a provider tokenizer. */
41
- /* ════════════════════════════════════════════════════════════════════ */
42
- /**
43
- * token helpers use configurable model ratios and never require a provider tokenizer.
44
- */
45
- const ratios = Object.freeze({ default: 4, gpt: 3.5, claude: 3.2, gemini: 3.5 });
46
- export function estimatetokens(text, model = "default") { const ratio = ratios[model] ?? ratios.default; return Math.ceil(String(text ?? "").length / ratio); }
47
- export function fitscontext(text, context, model = "default") { return estimatetokens(text, model) <= context; }
48
- export function tokenbudget(text, options = {}) { const tokens = estimatetokens(text, options.model); return { tokens, context: options.context ?? null, fits: options.context == null ? true : tokens <= options.context, remaining: options.context == null ? null : Math.max(0, options.context - tokens) }; }
49
- export function settokenratios(values = {}) { Object.assign(ratios, values); return { ...ratios }; }
50
- /* ════════════════════════════════════════════════════════════════════ */
51
- /* Section 3: ai/chunk.ts — markdown chunking preserves heading paths and uses paragraph boundaries before hard cuts. */
52
- /* ════════════════════════════════════════════════════════════════════ */
53
- /**
54
- * markdown chunking preserves heading paths and uses paragraph boundaries before hard cuts.
55
- */
56
- export function chunkmarkdown(markdown, options = {}) {
57
- const maxtokens = options.maxtokens ?? 512;
58
- const overlap = options.overlaptokens ?? 50;
59
- const lines = String(markdown ?? "").split(/\r?\n/);
60
- const chunks = [];
61
- let headingpath = [];
62
- let buffer = [];
63
- function flush() { if (!buffer.length)
64
- return; const content = buffer.join("\n").trim(); if (content)
65
- chunks.push({ content, headingpath: [...headingpath], tokencount: estimatetokens(content, options.model) }); buffer = []; }
66
- for (const line of lines) {
67
- const heading = line.match(/^(#{1,6})[ \t]+(\S.*)$/);
68
- if (heading) {
69
- flush();
70
- const level = heading[1].length;
71
- headingpath = headingpath.slice(0, level - 1);
72
- headingpath[level - 1] = heading[2].trim();
73
- buffer.push(line);
74
- continue;
75
- }
76
- buffer.push(line);
77
- if (estimatetokens(buffer.join("\n"), options.model) > maxtokens) {
78
- const last = buffer.pop();
79
- flush();
80
- const overlaptext = buffer.slice(-overlap).join("\n");
81
- buffer = overlaptext ? [overlaptext, last] : [last];
82
- }
83
- }
84
- flush();
85
- return chunks.map((chunk, index) => ({ ...chunk, id: `chunk${index}` }));
86
- }
87
- /* ════════════════════════════════════════════════════════════════════ */
88
- /* Section 4: ai/rag.ts — rag manifests connect chunks to embedding stores without forcing a vendor client. */
89
- /* ════════════════════════════════════════════════════════════════════ */
90
- /**
91
- * rag manifests connect chunks to embedding stores without forcing a vendor client.
92
- */
93
- export async function ragmanifest(input = {}) {
94
- const chunks = input.chunks ?? [];
95
- const unique = [];
96
- const hashes = new Set();
97
- for (const chunk of chunks) {
98
- const hash = await hashtext(chunk.content);
99
- if (hashes.has(hash))
100
- continue;
101
- hashes.add(hash);
102
- unique.push({ ...chunk, contenthash: hash, documentid: hash.slice(0, 16), metadata: { ...(input.metadata ?? {}), ...(chunk.metadata ?? {}) } });
103
- }
104
- return { documentid: (await hashtext(input.source ?? unique.map((chunk) => chunk.content).join("\n"))).slice(0, 16), source: input.source, chunks: unique, embeddingmodel: input.embeddingmodel, embeddingdimensions: input.embeddingdimensions, createdat: Date.now() };
105
- }
106
- export function vectorrecord(chunk, vector, options = {}) { return { id: `${chunk.documentid}-${chunk.id}`, vector, metadata: { headingpath: chunk.headingpath, contenthash: chunk.contenthash, sourceurl: options.sourceurl, tokencount: chunk.tokencount, contenttype: options.contenttype ?? "text", language: options.language ?? "en", embeddingmodel: options.embeddingmodel, embeddingdimensions: vector?.length } }; }
107
- async function hashtext(text) { const bytes = new TextEncoder().encode(String(text)); if (globalThis.crypto?.subtle) {
108
- const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
109
- return [...new Uint8Array(digest)].map((value) => value.toString(16).padStart(2, "0")).join("");
110
- } return Array.from(bytes).map((value) => value.toString(16).padStart(2, "0")).join("").slice(0, 64).padEnd(64, "0"); }
111
- /* ════════════════════════════════════════════════════════════════════ */
112
- /* Section 5: ai/llmstxt.ts — llms text generation creates compact absolute links for agent consumption. */
113
- /* ════════════════════════════════════════════════════════════════════ */
114
- /**
115
- * llms text generation creates compact absolute links for agent consumption.
116
- */
117
- export function llmstxt(options = {}) {
118
- const title = options.title ?? "saddle";
119
- const description = options.description ?? "binary computing engine and browser automation library";
120
- const pages = (options.pages ?? []).filter((page) => page?.url && /^https:\/\//.test(page.url)).slice(0, options.limit ?? 100);
121
- const lines = [`# ${title}`, `> ${description}`, "", "## pages", "", ...pages.map((page) => `- [${page.title ?? page.url}](${page.url}): ${(page.description ?? "").slice(0, 100)}`)];
122
- return `${lines.join("\n")}\n`;
123
- }
124
- export function llmsfull(options = {}) { return (options.pages ?? []).filter((page) => page?.url && /^https:\/\//.test(page.url)).map((page) => `# ${page.title ?? page.url}\n\nsource: ${page.url}\n\n${page.content ?? ""}`).join("\n\n---\n\n"); }
125
- /* ════════════════════════════════════════════════════════════════════ */
126
- /* Section 6: ai/metrics.ts — metrics keeps low-cardinality counters and durations without requiring a telemetry vendor. */
127
- /* ════════════════════════════════════════════════════════════════════ */
128
- /**
129
- * metrics keeps low-cardinality counters and durations without requiring a telemetry vendor.
130
- */
131
- /** Creates an in-memory metric collector with bounded names and labels. */
132
- export function metricstore(options = {}) {
133
- const maxnames = Number(options.maxnames ?? 256);
134
- const values = new Map();
135
- const durations = new Map();
136
- function key(name, labels = {}) { const sorted = Object.entries(labels).slice(0, 8).sort(([left], [right]) => left.localeCompare(right)); return `${String(name)}|${JSON.stringify(sorted)}`; }
137
- function count(name, amount = 1, labels = {}) { if (values.size >= maxnames && !values.has(key(name, labels)))
138
- throw new Error("metric cardinality limit reached"); const metric = key(name, labels); values.set(metric, (values.get(metric) ?? 0) + Number(amount)); return values.get(metric); }
139
- function observe(name, milliseconds, labels = {}) { const metric = key(name, labels); const list = durations.get(metric) ?? []; if (list.length < 1000)
140
- list.push(Number(milliseconds)); durations.set(metric, list); return Number(milliseconds); }
141
- function snapshot() { return { counters: Object.fromEntries(values), durations: Object.fromEntries([...durations].map(([name, list]) => [name, { count: list.length, total: list.reduce((sum, value) => sum + value, 0), max: Math.max(0, ...list) }])) }; }
142
- function reset() { values.clear(); durations.clear(); }
143
- return { count, observe, snapshot, reset };
144
- }
145
- //# sourceMappingURL=intelligence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intelligence.js","sourceRoot":"","sources":["../intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,0EAA0E;AAC1E,2HAA2H;AAC3H,0EAA0E;AAC1E;;GAEG;AAEH,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAC,KAAK,GAAG,EAAE;IACnC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS;QAAE,MAAM,IAAI,SAAS,CAAC,8BAA8B,CAAC,CAAC;IAC3F,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW,IA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C,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5P,SAAS,KAAK,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACvD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC7C,CAAC"}
@@ -1,129 +0,0 @@
1
- /**
2
- * isolation.ts — isolation contracts describe effect boundaries without
3
- * executing binaries, touching hosts, or calling providers.
4
- *
5
- * This file is the v2.0.0 grand-merge carrier of the former
6
- * isolation/contracts.ts: the browser-safe boundary contract surface of the
7
- * virtual domain. It stays its own root file (the one deliberate split of
8
- * the domain) because the web interface bundles exactly these contracts —
9
- * the whole file is import-free and browser-loadable, while the node-side
10
- * implementations of the domain live in virtual.ts.
11
- */
12
- /**
13
- * isolation contracts describe effect boundaries without executing binaries, touching hosts, or calling providers.
14
- */
15
- /** Validates a bounded request for a privileged effect without performing it. */
16
- export declare function executionrequest(input?: {}): Readonly<{
17
- version: 1;
18
- id: string;
19
- effect: string;
20
- target: string;
21
- source: string;
22
- budget: Readonly<{
23
- maxbytes: number;
24
- maxmilliseconds: number;
25
- network: boolean;
26
- }>;
27
- state: "requested";
28
- }>;
29
- /** Evaluates a requested effect against explicit policy, approval, and adapter declarations. */
30
- export declare function executiondecision(request: any, input?: {}): Readonly<{
31
- version: 1;
32
- request: Readonly<{
33
- version: 1;
34
- id: string;
35
- effect: string;
36
- target: string;
37
- source: string;
38
- budget: Readonly<{
39
- maxbytes: number;
40
- maxmilliseconds: number;
41
- network: boolean;
42
- }>;
43
- state: "requested";
44
- }>;
45
- state: "caller-delegates" | "denied";
46
- reasons: readonly any[];
47
- adapter: Readonly<{
48
- owner: string;
49
- capabilities: readonly string[];
50
- }>;
51
- effects: readonly any[];
52
- }>;
53
- /** Renders a side-effect-free handoff and never invokes an adapter. */
54
- export declare function executionhandoff(input?: {}): Readonly<{
55
- version: 1;
56
- state: "execution-disabled";
57
- code: "EXECUTION_POLICY_DENIED";
58
- decision: Readonly<{
59
- version: 1;
60
- request: Readonly<{
61
- version: 1;
62
- id: string;
63
- effect: string;
64
- target: string;
65
- source: string;
66
- budget: Readonly<{
67
- maxbytes: number;
68
- maxmilliseconds: number;
69
- network: boolean;
70
- }>;
71
- state: "requested";
72
- }>;
73
- state: "caller-delegates" | "denied";
74
- reasons: readonly any[];
75
- adapter: Readonly<{
76
- owner: string;
77
- capabilities: readonly string[];
78
- }>;
79
- effects: readonly any[];
80
- }>;
81
- effects: readonly any[];
82
- }> | Readonly<{
83
- version: 1;
84
- state: "caller-delegates";
85
- code: "CALLER_ADAPTER_REQUIRED";
86
- decision: Readonly<{
87
- version: 1;
88
- request: Readonly<{
89
- version: 1;
90
- id: string;
91
- effect: string;
92
- target: string;
93
- source: string;
94
- budget: Readonly<{
95
- maxbytes: number;
96
- maxmilliseconds: number;
97
- network: boolean;
98
- }>;
99
- state: "requested";
100
- }>;
101
- state: "caller-delegates" | "denied";
102
- reasons: readonly any[];
103
- adapter: Readonly<{
104
- owner: string;
105
- capabilities: readonly string[];
106
- }>;
107
- effects: readonly any[];
108
- }>;
109
- effects: readonly any[];
110
- }>;
111
- /** Validates a serializable envelope for a unified web internal API boundary. */
112
- export declare function internalenvelope(input?: {}): Readonly<{
113
- version: 1;
114
- boundary: string;
115
- requestid: string;
116
- payload: any;
117
- }>;
118
- /** Creates pure internal API handlers for planning, policy, handoff, and evidence projections. */
119
- export declare function internalapi(input?: {}): Readonly<{
120
- handle: (envelope: any) => Readonly<{
121
- version: 1;
122
- boundary: any;
123
- requestid: any;
124
- state: any;
125
- data: any;
126
- effects: readonly any[];
127
- }>;
128
- }>;
129
- //# sourceMappingURL=isolation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isolation.d.ts","sourceRoot":"","sources":["../isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AAMH,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,KAAK,KAAK;;;;;;;;;;;;GAK1C;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,OAAO,KAAA,EAAE,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;GAgBpD;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI1C;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,KAAK,KAAK;;;;;GAG1C;AAED,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,KAAK,KAAK;;;;;;;;;GAarC"}
package/dist/isolation.js DELETED
@@ -1,96 +0,0 @@
1
- /**
2
- * isolation.ts — isolation contracts describe effect boundaries without
3
- * executing binaries, touching hosts, or calling providers.
4
- *
5
- * This file is the v2.0.0 grand-merge carrier of the former
6
- * isolation/contracts.ts: the browser-safe boundary contract surface of the
7
- * virtual domain. It stays its own root file (the one deliberate split of
8
- * the domain) because the web interface bundles exactly these contracts —
9
- * the whole file is import-free and browser-loadable, while the node-side
10
- * implementations of the domain live in virtual.ts.
11
- */
12
- // @ts-nocheck
13
- /**
14
- * isolation contracts describe effect boundaries without executing binaries, touching hosts, or calling providers.
15
- */
16
- const boundaries = new Set(["gateway", "planning", "policy", "materialization", "execution", "persistence", "evidence"]);
17
- const effects = new Set(["binary-execution", "host-bridge", "remote-dispatch", "provider-access", "local-storage", "browser-session", "database", "network"]);
18
- const targets = new Set(["local", "remote", "provider", "browser", "storage"]);
19
- /** Validates a bounded request for a privileged effect without performing it. */
20
- export function executionrequest(input = {}) {
21
- const effect = valid(input.effect, effects, "execution effect");
22
- const target = valid(input.target, targets, "execution target");
23
- const source = digest(input.source, "execution source");
24
- return Object.freeze({ version: 1, id: nonempty(input.id, "execution id"), effect, target, source, budget: budget(input.budget), state: "requested" });
25
- }
26
- /** Evaluates a requested effect against explicit policy, approval, and adapter declarations. */
27
- export function executiondecision(request, input = {}) {
28
- const normalized = executionrequest(request);
29
- const policy = normalizedlist(input.policy?.alloweffects);
30
- const policytargets = normalizedlist(input.policy?.allowtargets);
31
- const approval = normalizedlist(input.approval?.effects);
32
- const approvaltargets = normalizedlist(input.approval?.targets);
33
- const capabilities = normalizedlist(input.adapter?.capabilities);
34
- const reasons = [];
35
- if (!policy.includes(normalized.effect))
36
- reasons.push("policy-effect");
37
- if (!policytargets.includes(normalized.target))
38
- reasons.push("policy-target");
39
- if (!approval.includes(normalized.effect))
40
- reasons.push("approval-effect");
41
- if (!approvaltargets.includes(normalized.target))
42
- reasons.push("approval-target");
43
- if (!capabilities.includes(normalized.effect))
44
- reasons.push("adapter-capability");
45
- if (!String(input.adapter?.owner ?? ""))
46
- reasons.push("adapter-owner");
47
- const allowed = reasons.length === 0;
48
- return Object.freeze({ version: 1, request: normalized, state: allowed ? "caller-delegates" : "denied", reasons: Object.freeze(reasons), adapter: allowed ? Object.freeze({ owner: String(input.adapter.owner), capabilities: Object.freeze(capabilities) }) : null, effects: Object.freeze([]) });
49
- }
50
- /** Renders a side-effect-free handoff and never invokes an adapter. */
51
- export function executionhandoff(input = {}) {
52
- const decision = executiondecision(input.request, input.configuration);
53
- if (decision.state !== "caller-delegates")
54
- return Object.freeze({ version: 1, state: "execution-disabled", code: "EXECUTION_POLICY_DENIED", decision, effects: Object.freeze([]) });
55
- return Object.freeze({ version: 1, state: "caller-delegates", code: "CALLER_ADAPTER_REQUIRED", decision, effects: Object.freeze([]) });
56
- }
57
- /** Validates a serializable envelope for a unified web internal API boundary. */
58
- export function internalenvelope(input = {}) {
59
- const boundary = valid(input.boundary, boundaries, "internal api boundary");
60
- return Object.freeze({ version: 1, boundary, requestid: nonempty(input.requestid, "internal api requestid"), payload: freezeobject(input.payload ?? {}) });
61
- }
62
- /** Creates pure internal API handlers for planning, policy, handoff, and evidence projections. */
63
- export function internalapi(input = {}) {
64
- const configuration = freezeobject(input.configuration ?? {});
65
- function handle(envelope) {
66
- const request = internalenvelope(envelope);
67
- if (request.boundary === "gateway")
68
- return response(request, "accepted", { requestid: request.requestid });
69
- if (request.boundary === "planning")
70
- return response(request, "planned", { request: executionrequest(request.payload) });
71
- if (request.boundary === "policy")
72
- return response(request, "evaluated", { decision: executiondecision(request.payload.request, request.payload.configuration ?? configuration) });
73
- if (request.boundary === "execution")
74
- return response(request, "projected", { handoff: executionhandoff({ request: request.payload.request, configuration: request.payload.configuration ?? configuration }) });
75
- if (request.boundary === "materialization")
76
- return response(request, "planned", { state: "no-materialization", effects: Object.freeze([]) });
77
- if (request.boundary === "persistence")
78
- return response(request, "projected", { state: "ephemeral-fixture", effects: Object.freeze([]) });
79
- return response(request, "recorded", { receipt: Object.freeze({ version: 1, state: String(request.payload.state ?? "unknown"), effects: Object.freeze([]) }) });
80
- }
81
- return Object.freeze({ handle });
82
- }
83
- function response(request, state, data) { return Object.freeze({ version: 1, boundary: request.boundary, requestid: request.requestid, state, data: freezeobject(data), effects: Object.freeze([]) }); }
84
- function budget(input = {}) { return Object.freeze({ maxbytes: positive(input.maxbytes ?? 1, "execution budget maxbytes"), maxmilliseconds: positive(input.maxmilliseconds ?? 1, "execution budget maxmilliseconds"), network: input.network === true }); }
85
- function normalizedlist(value) { return Object.freeze([...new Set(Array.isArray(value) ? value.map((entry) => String(entry)) : [])].sort()); }
86
- function freezeobject(value) { if (!value || typeof value !== "object" || Array.isArray(value))
87
- throw new TypeError("internal api payload must be an object"); return Object.freeze({ ...value }); }
88
- function valid(value, collection, name) { const output = String(value ?? ""); if (!collection.has(output))
89
- throw new TypeError(`${name} is invalid`); return output; }
90
- function digest(value, name) { const output = String(value ?? "").toLowerCase(); if (!/^[a-f0-9]{64}$/.test(output))
91
- throw new TypeError(`${name} sha256 is invalid`); return output; }
92
- function nonempty(value, name) { const output = String(value ?? ""); if (!output)
93
- throw new TypeError(`${name} is required`); return output; }
94
- function positive(value, name) { const output = Number(value); if (!Number.isSafeInteger(output) || output < 1)
95
- throw new TypeError(`${name} must be a positive safe integer`); return output; }
96
- //# sourceMappingURL=isolation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isolation.js","sourceRoot":"","sources":["../isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc;AACd;;GAEG;AAEH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AACzH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAC9J,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE/E,iFAAiF;AACjF,MAAM,UAAU,gBAAgB,CAAC,KAAK,GAAG,EAAE;IACzC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC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