modkh 0.0.0-stage → 0.1.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 (256) hide show
  1. package/README.md +24 -2
  2. package/dist/agent/bundled-skills.d.ts +13 -0
  3. package/dist/agent/bundled-skills.js +95 -0
  4. package/dist/agent/images.d.ts +10 -0
  5. package/dist/agent/images.js +33 -0
  6. package/dist/agent/loop.d.ts +56 -0
  7. package/dist/agent/loop.js +155 -0
  8. package/dist/agent/skills.d.ts +20 -0
  9. package/dist/agent/skills.js +169 -0
  10. package/dist/agent/types.d.ts +132 -0
  11. package/dist/agent/types.js +12 -0
  12. package/dist/cli/agents.d.ts +8 -0
  13. package/dist/cli/agents.js +12 -0
  14. package/dist/cli/approval.d.ts +27 -0
  15. package/dist/cli/approval.js +62 -0
  16. package/dist/cli/catalog.d.ts +39 -0
  17. package/dist/cli/catalog.js +76 -0
  18. package/dist/cli/chat.d.ts +18 -0
  19. package/dist/cli/chat.js +733 -0
  20. package/dist/cli/clipboard.d.ts +9 -0
  21. package/dist/cli/clipboard.js +54 -0
  22. package/dist/cli/color.d.ts +42 -0
  23. package/dist/cli/color.js +176 -0
  24. package/dist/cli/config.d.ts +41 -0
  25. package/dist/cli/config.js +188 -0
  26. package/dist/cli/editor.d.ts +16 -0
  27. package/dist/cli/editor.js +77 -0
  28. package/dist/cli/keys.d.ts +18 -0
  29. package/dist/cli/keys.js +82 -0
  30. package/dist/cli/language.d.ts +1 -0
  31. package/dist/cli/language.js +105 -0
  32. package/dist/cli/limits.d.ts +13 -0
  33. package/dist/cli/limits.js +19 -0
  34. package/dist/cli/lines.d.ts +18 -0
  35. package/dist/cli/lines.js +80 -0
  36. package/dist/cli/models.d.ts +4 -0
  37. package/dist/cli/models.js +69 -0
  38. package/dist/cli/permissions.d.ts +25 -0
  39. package/dist/cli/permissions.js +30 -0
  40. package/dist/cli/plugins.d.ts +1 -0
  41. package/dist/cli/plugins.js +53 -0
  42. package/dist/cli/providers.d.ts +46 -0
  43. package/dist/cli/providers.js +76 -0
  44. package/dist/cli/terminal.d.ts +143 -0
  45. package/dist/cli/terminal.js +742 -0
  46. package/dist/cli/usage.d.ts +29 -0
  47. package/dist/cli/usage.js +75 -0
  48. package/dist/index.d.ts +11 -0
  49. package/dist/index.js +164 -0
  50. package/dist/language/catalog.d.ts +44 -0
  51. package/dist/language/catalog.js +100 -0
  52. package/dist/language/commonlisp-bundled.d.ts +11 -0
  53. package/dist/language/commonlisp-bundled.js +22 -0
  54. package/dist/language/commonlisp-dependencies.d.ts +16 -0
  55. package/dist/language/commonlisp-dependencies.js +68 -0
  56. package/dist/language/commonlisp-install.d.ts +14 -0
  57. package/dist/language/commonlisp-install.js +213 -0
  58. package/dist/language/commonlisp-reader.d.ts +17 -0
  59. package/dist/language/commonlisp-reader.js +47 -0
  60. package/dist/language/commonlisp-systems.d.ts +3 -0
  61. package/dist/language/commonlisp-systems.js +32 -0
  62. package/dist/language/commonlisp-tls.d.ts +10 -0
  63. package/dist/language/commonlisp-tls.js +51 -0
  64. package/dist/language/detect.d.ts +29 -0
  65. package/dist/language/detect.js +103 -0
  66. package/dist/language/grammars/LICENSE +24 -0
  67. package/dist/language/grammars/manifest.json +76 -0
  68. package/dist/language/grammars/tree-sitter-c.wasm +0 -0
  69. package/dist/language/grammars/tree-sitter-cpp.wasm +0 -0
  70. package/dist/language/grammars/tree-sitter-css.wasm +0 -0
  71. package/dist/language/grammars/tree-sitter-html.wasm +0 -0
  72. package/dist/language/grammars/tree-sitter-javascript.wasm +0 -0
  73. package/dist/language/grammars/tree-sitter-php.wasm +0 -0
  74. package/dist/language/grammars/tree-sitter-python.wasm +0 -0
  75. package/dist/language/grammars/tree-sitter-ruby.wasm +0 -0
  76. package/dist/language/grammars/tree-sitter-rust.wasm +0 -0
  77. package/dist/language/grammars/tree-sitter-swift.wasm +0 -0
  78. package/dist/language/grammars/tree-sitter-tsx.wasm +0 -0
  79. package/dist/language/grammars/tree-sitter-typescript.wasm +0 -0
  80. package/dist/language/install.d.ts +50 -0
  81. package/dist/language/install.js +293 -0
  82. package/dist/language/lsp/client.d.ts +97 -0
  83. package/dist/language/lsp/client.js +337 -0
  84. package/dist/language/lsp/pool.d.ts +67 -0
  85. package/dist/language/lsp/pool.js +122 -0
  86. package/dist/language/lsp/service.d.ts +46 -0
  87. package/dist/language/lsp/service.js +138 -0
  88. package/dist/language/native.d.ts +8 -0
  89. package/dist/language/native.js +100 -0
  90. package/dist/language/platform.d.ts +14 -0
  91. package/dist/language/platform.js +20 -0
  92. package/dist/language/positions.d.ts +20 -0
  93. package/dist/language/positions.js +46 -0
  94. package/dist/language/syntax/assets.d.ts +9 -0
  95. package/dist/language/syntax/assets.js +73 -0
  96. package/dist/language/syntax/parser.d.ts +24 -0
  97. package/dist/language/syntax/parser.js +144 -0
  98. package/dist/language/typescript-capability.d.ts +6 -0
  99. package/dist/language/typescript-capability.js +42 -0
  100. package/dist/lisp/config.d.ts +16 -0
  101. package/dist/lisp/config.js +159 -0
  102. package/dist/lisp/routing.d.ts +5 -0
  103. package/dist/lisp/routing.js +24 -0
  104. package/dist/lisp/runtime.d.ts +21 -0
  105. package/dist/lisp/runtime.js +83 -0
  106. package/dist/memory/kiokuko.d.ts +32 -0
  107. package/dist/memory/kiokuko.js +102 -0
  108. package/dist/memory/mcp.d.ts +38 -0
  109. package/dist/memory/mcp.js +211 -0
  110. package/dist/model/ai-sdk.d.ts +27 -0
  111. package/dist/model/ai-sdk.js +180 -0
  112. package/dist/model/chatgpt/login.d.ts +42 -0
  113. package/dist/model/chatgpt/login.js +180 -0
  114. package/dist/model/chatgpt/responses.d.ts +41 -0
  115. package/dist/model/chatgpt/responses.js +202 -0
  116. package/dist/model/chatgpt/tokens.d.ts +11 -0
  117. package/dist/model/chatgpt/tokens.js +50 -0
  118. package/dist/model/connection.d.ts +6 -0
  119. package/dist/model/connection.js +65 -0
  120. package/dist/model/context.d.ts +9 -0
  121. package/dist/model/context.js +69 -0
  122. package/dist/model/factory.d.ts +25 -0
  123. package/dist/model/factory.js +88 -0
  124. package/dist/model/fixed.d.ts +17 -0
  125. package/dist/model/fixed.js +41 -0
  126. package/dist/model/reasoning.d.ts +16 -0
  127. package/dist/model/reasoning.js +62 -0
  128. package/dist/plugins/api.d.ts +60 -0
  129. package/dist/plugins/api.js +1 -0
  130. package/dist/plugins/manager.d.ts +34 -0
  131. package/dist/plugins/manager.js +261 -0
  132. package/dist/plugins/package.d.ts +13 -0
  133. package/dist/plugins/package.js +99 -0
  134. package/dist/plugins/registry.d.ts +8 -0
  135. package/dist/plugins/registry.js +14 -0
  136. package/dist/session/store.d.ts +82 -0
  137. package/dist/session/store.js +285 -0
  138. package/dist/session/workspace.d.ts +19 -0
  139. package/dist/session/workspace.js +73 -0
  140. package/dist/subagents/processes.d.ts +18 -0
  141. package/dist/subagents/processes.js +73 -0
  142. package/dist/subagents/request.d.ts +4 -0
  143. package/dist/subagents/request.js +21 -0
  144. package/dist/subagents/service.d.ts +39 -0
  145. package/dist/subagents/service.js +352 -0
  146. package/dist/subagents/settings.d.ts +10 -0
  147. package/dist/subagents/settings.js +32 -0
  148. package/dist/subagents/types.d.ts +43 -0
  149. package/dist/subagents/types.js +1 -0
  150. package/dist/subagents/verification.d.ts +31 -0
  151. package/dist/subagents/verification.js +178 -0
  152. package/dist/tools/diff.d.ts +6 -0
  153. package/dist/tools/diff.js +82 -0
  154. package/dist/tools/edit.d.ts +3 -0
  155. package/dist/tools/edit.js +152 -0
  156. package/dist/tools/files.d.ts +6 -0
  157. package/dist/tools/files.js +96 -0
  158. package/dist/tools/formal.d.ts +8 -0
  159. package/dist/tools/formal.js +77 -0
  160. package/dist/tools/guard.d.ts +7 -0
  161. package/dist/tools/guard.js +48 -0
  162. package/dist/tools/job-tools.d.ts +19 -0
  163. package/dist/tools/job-tools.js +148 -0
  164. package/dist/tools/jobs.d.ts +77 -0
  165. package/dist/tools/jobs.js +181 -0
  166. package/dist/tools/language.d.ts +6 -0
  167. package/dist/tools/language.js +174 -0
  168. package/dist/tools/registry.d.ts +28 -0
  169. package/dist/tools/registry.js +105 -0
  170. package/dist/tools/run.d.ts +13 -0
  171. package/dist/tools/run.js +159 -0
  172. package/dist/tools/search.d.ts +2 -0
  173. package/dist/tools/search.js +156 -0
  174. package/dist/tools/shell-process.d.ts +115 -0
  175. package/dist/tools/shell-process.js +286 -0
  176. package/dist/tools/skills.d.ts +2 -0
  177. package/dist/tools/skills.js +46 -0
  178. package/dist/tools/web.d.ts +24 -0
  179. package/dist/tools/web.js +386 -0
  180. package/docs/ci-repair-20261116.md +30 -0
  181. package/docs/commonlisp-provider-migration.md +22 -0
  182. package/docs/commonlisp-qlot-recovery.md +28 -0
  183. package/docs/commonlisp-tls-recovery.md +28 -0
  184. package/docs/context-efficiency.md +100 -0
  185. package/docs/input.md +66 -0
  186. package/docs/languages.md +117 -0
  187. package/docs/models.md +85 -0
  188. package/docs/modkh-evidence.json +641 -0
  189. package/docs/modkh-failure-comparison.json +675 -0
  190. package/docs/modkh-namespace.md +39 -0
  191. package/docs/modkh-qlot-evidence.json +37 -0
  192. package/docs/modkh-verification.md +173 -0
  193. package/docs/modkh.md +124 -0
  194. package/docs/presets.md +19 -0
  195. package/docs/setup.md +112 -0
  196. package/docs/subagents.md +134 -0
  197. package/docs/web.md +57 -0
  198. package/experiments/presets/common-lisp.lisp +38 -0
  199. package/experiments/presets/css.lisp +38 -0
  200. package/experiments/presets/formal.lisp +7 -0
  201. package/experiments/presets/html.lisp +38 -0
  202. package/experiments/presets/js.lisp +38 -0
  203. package/experiments/presets/php.lisp +38 -0
  204. package/experiments/presets/svelte.lisp +38 -0
  205. package/experiments/presets/tailwindcss.lisp +24 -0
  206. package/experiments/presets/ts.lisp +38 -0
  207. package/package.json +49 -4
  208. package/plugins/modkh-explorer/index.mjs +3 -0
  209. package/plugins/modkh-explorer/plugin.json +1 -0
  210. package/plugins/modkh-worker/index.mjs +3 -0
  211. package/plugins/modkh-worker/plugin.json +1 -0
  212. package/skills/kiokuko-dsh/LICENSE +21 -0
  213. package/skills/kiokuko-dsh/coding-ideal-routine-skill/SKILL.md +106 -0
  214. package/skills/kiokuko-dsh/japanese-translation-for-oss-models/SKILL.md +65 -0
  215. package/skills/kiokuko-dsh/kiokuko-architecture/SKILL.md +20 -0
  216. package/skills/kiokuko-dsh/kiokuko-architecture/references/cases.md +11 -0
  217. package/skills/kiokuko-dsh/kiokuko-benchmark/SKILL.md +20 -0
  218. package/skills/kiokuko-dsh/kiokuko-benchmark/references/cases.md +11 -0
  219. package/skills/kiokuko-dsh/kiokuko-investigate/SKILL.md +20 -0
  220. package/skills/kiokuko-dsh/kiokuko-investigate/references/cases.md +11 -0
  221. package/skills/kiokuko-dsh/kiokuko-lisp/SKILL.md +390 -0
  222. package/skills/kiokuko-dsh/kiokuko-review/SKILL.md +20 -0
  223. package/skills/kiokuko-dsh/kiokuko-review/references/cases.md +11 -0
  224. package/skills/kiokuko-dsh/kiokuko-simple-work/SKILL.md +70 -0
  225. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/SKILL.md +79 -0
  226. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/boundaries-and-ownership.md +52 -0
  227. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/domain-and-types.md +48 -0
  228. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/effects-and-data.md +43 -0
  229. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/kiokuko-patterns.md +314 -0
  230. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/problem-shaping-and-language.md +90 -0
  231. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/protocols-and-idempotency.md +42 -0
  232. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/review-checklist.md +92 -0
  233. package/skills/kiokuko-dsh/kiokuko-single-purpose-functions/references/verification.md +45 -0
  234. package/skills/kiokuko-dsh/kiokuko-skill-authoring/SKILL.md +20 -0
  235. package/skills/kiokuko-dsh/kiokuko-skill-authoring/references/cases.md +11 -0
  236. package/skills/kiokuko-dsh/kiokuko-soul/SKILL.md +25 -0
  237. package/skills/kiokuko-dsh/kiokuko-technical-writing/SKILL.md +20 -0
  238. package/skills/kiokuko-dsh/kiokuko-technical-writing/references/cases.md +11 -0
  239. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/SKILL.md +64 -0
  240. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/accessibility-and-navigation.md +31 -0
  241. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/async-recovery.md +49 -0
  242. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/forms-and-controls.md +35 -0
  243. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/interaction-feedback.md +34 -0
  244. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/responsive-and-platform.md +38 -0
  245. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/safety-and-review.md +43 -0
  246. package/skills/kiokuko-dsh/kiokuko-ui-design-soul/references/ui-checklist.md +75 -0
  247. package/skills/kiokuko-dsh/kiokuko-verification/SKILL.md +20 -0
  248. package/skills/kiokuko-dsh/kiokuko-verification/references/cases.md +11 -0
  249. package/skills/kiokuko-dsh/manifest.json +168 -0
  250. package/skills/kiokuko-dsh/memory-reasoning/SKILL.md +44 -0
  251. package/skills/kiokuko-dsh/one-shot-software-completion/SKILL.md +113 -0
  252. package/skills/kiokuko-dsh/one-shot-software-completion/references/boundaries-and-lifecycle.md +70 -0
  253. package/skills/kiokuko-dsh/one-shot-software-completion/references/discovery-and-scope.md +71 -0
  254. package/skills/kiokuko-dsh/one-shot-software-completion/references/failure-recovery.md +43 -0
  255. package/skills/kiokuko-dsh/one-shot-software-completion/references/verification-and-completion.md +73 -0
  256. package/skills/kiokuko-dsh/veteran-programmer-skill/SKILL.md +66 -0
@@ -0,0 +1,213 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { download } from "./native.js";
4
+ import { installBundledCommonLisp, CL_LSP_REPOSITORY } from "./commonlisp-bundled.js";
5
+ import { hostPlatform } from "./platform.js";
6
+ import { executeBounded, privateEnvironment, sha256 } from "../lisp/runtime.js";
7
+ import { LspServer } from "./lsp/client.js";
8
+ /** Official Roswell Lisp filenames include '+' (for example install+sigsegv.lisp). */
9
+ export function validateRoswellArchivePaths(output) {
10
+ const names = output.replace(/\n$/, '').split('\n');
11
+ if (names.length > 2000)
12
+ throw new Error('Roswell archive exceeds 2000 entries');
13
+ for (const name of names) {
14
+ if (!/^roswell\/[A-Za-z0-9._+/-]*$/.test(name) || name.split('/').includes('..')) {
15
+ throw new Error(`Unsafe Roswell archive path: ${JSON.stringify(name)}`);
16
+ }
17
+ }
18
+ }
19
+ export function roswellAsset(assets, platform, glibc) {
20
+ const arch = platform.arch === 'arm64' ? 'arm64' : platform.os === 'darwin' ? 'x86-64' : 'x86_64';
21
+ const suffix = platform.os === 'darwin' ? new RegExp(`-darwin-${arch}\\.tar\\.bz2$`) : new RegExp(`-linux-${arch}-glibc([0-9]+\\.[0-9]+)\\.tar\\.bz2$`);
22
+ const candidates = assets.filter(a => {
23
+ const match = suffix.exec(a.name);
24
+ if (!match)
25
+ return false;
26
+ if (platform.os === 'linux') {
27
+ if (!glibc)
28
+ return false;
29
+ const actual = glibc.split('.').map(Number), required = match[1].split('.').map(Number);
30
+ if (actual[0] < required[0] || actual[0] === required[0] && actual[1] < required[1])
31
+ return false;
32
+ }
33
+ return true;
34
+ });
35
+ if (candidates.length !== 1)
36
+ throw new Error(`No unambiguous compatible official Roswell asset: ${platform.os}/${arch}, glibc=${glibc ?? 'unknown'}`);
37
+ const asset = candidates[0], url = new URL(asset.browser_download_url);
38
+ if (url.protocol !== 'https:' || url.hostname !== 'github.com' || !url.pathname.startsWith('/roswell/roswell/releases/download/') || !/^sha256:[a-f0-9]{64}$/.test(asset.digest ?? ''))
39
+ throw new Error('Official Roswell origin and SHA256 metadata required');
40
+ if (!Number.isSafeInteger(asset.size) || asset.size < 1 || asset.size > 64 * 1024 * 1024)
41
+ throw new Error('Invalid Roswell archive size');
42
+ return asset;
43
+ }
44
+ const repositories = [CL_LSP_REPOSITORY];
45
+ const failure = (error) => {
46
+ if (!(error instanceof Error))
47
+ return String(error);
48
+ const cause = error.cause;
49
+ return `${error.name}: ${error.message}${cause ? ` (${cause.code ?? ''}: ${cause.message ?? ''})` : ''}`;
50
+ };
51
+ const quote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
52
+ /** Called under install.ts's per-language lock. Every attempt owns a new non-relocated prefix. */
53
+ export async function installCommonLisp(target, signal) {
54
+ const platform = hostPlatform();
55
+ if (!platform)
56
+ throw new Error('Unsupported Common Lisp host');
57
+ fs.mkdirSync(target, { recursive: true, mode: 0o700 });
58
+ const space = fs.statfsSync(target);
59
+ if (space.bavail * space.bsize < 2 * 1024 ** 3)
60
+ throw new Error('Insufficient disk space: CL bootstrap needs 2 GiB reserve');
61
+ const root = fs.realpathSync(fs.mkdtempSync(path.join(target, 'attempt-')));
62
+ const home = path.join(root, 'home'), rosHome = path.join(root, 'roswell-home'), prefix = path.join(root, 'runtime');
63
+ for (const dir of [home, rosHome, prefix])
64
+ fs.mkdirSync(dir, { mode: 0o700 });
65
+ const env = { ...privateEnvironment(home), ROSWELL_HOME: rosHome, PATH: `${prefix}/bin:${rosHome}/bin:${process.env.PATH ?? '/usr/bin:/bin'}`,
66
+ CL_SOURCE_REGISTRY: `(:source-registry (:tree ${JSON.stringify(path.join(rosHome, 'local-projects') + '/')}) :inherit-configuration)`,
67
+ GIT_CONFIG_NOSYSTEM: '1', GIT_CONFIG_GLOBAL: '/dev/null', GIT_TERMINAL_PROMPT: '0' };
68
+ const stages = [], revisions = {};
69
+ const report = { platform, startedAt: new Date().toISOString(), stages, revisions, status: 'installing',
70
+ provenance: 'Verification policy: Roswell archive must match official SHA256 metadata; completed Git checkouts record commits. Consult stage results for actual verification. Quicklisp transitive downloads are upstream-managed, not independently authenticated by this installer.' };
71
+ let settled = true, succeeded = false;
72
+ const deadline = AbortSignal.any([AbortSignal.timeout(20 * 60_000), ...(signal ? [signal] : [])]);
73
+ const record = () => fs.writeFileSync(path.join(root, 'install-receipt.json'), JSON.stringify(report, null, 2));
74
+ const stage = async (name, action) => {
75
+ const entry = { name, state: 'running' };
76
+ stages.push(entry);
77
+ record();
78
+ try {
79
+ const value = await action(entry);
80
+ entry.state = 'passed';
81
+ record();
82
+ return value;
83
+ }
84
+ catch (e) {
85
+ entry.state = 'failed';
86
+ entry.detail = failure(e);
87
+ record();
88
+ throw new Error(`Common Lisp ${name}: ${failure(e)}`);
89
+ }
90
+ };
91
+ const run = (name, command, args, cwd = root) => stage(name, async (entry) => {
92
+ const receipt = await executeBounded(command, args, { cwd, env, inputDigest: sha256(JSON.stringify([command, args])), timeoutMs: 20 * 60_000, maxOutputBytes: 512 * 1024, signal: deadline });
93
+ entry.receipt = receipt;
94
+ settled &&= receipt.cleanup === 'settled';
95
+ if (receipt.state !== 'exited' || receipt.exitCode !== 0 || receipt.cleanup !== 'settled')
96
+ throw new Error(`${receipt.state}/${receipt.exitCode} cleanup=${receipt.cleanup}: stderr=${receipt.stderr.slice(-1500)} stdout=${receipt.stdout.slice(-1500)}`);
97
+ return receipt.stdout;
98
+ });
99
+ try {
100
+ await run('compiler-capability', 'cc', ['--version']);
101
+ const metadata = await stage('release-metadata', async () => JSON.parse((await download('https://api.github.com/repos/roswell/roswell/releases/latest', 2 * 1024 ** 2, deadline)).toString('utf8')));
102
+ if (!Array.isArray(metadata.assets) || typeof metadata.tag_name !== 'string')
103
+ throw new Error('Invalid Roswell metadata');
104
+ const glibc = process.report.getReport().header.glibcVersionRuntime;
105
+ const asset = roswellAsset(metadata.assets, platform, glibc);
106
+ report.release = metadata.tag_name;
107
+ report.asset = asset;
108
+ const archive = path.join(root, 'roswell.tar.bz2');
109
+ await stage('release-download', async () => {
110
+ const bytes = await download(asset.browser_download_url, asset.size, deadline);
111
+ if (bytes.length !== asset.size || `sha256:${sha256(bytes)}` !== asset.digest)
112
+ throw new Error('Roswell SHA256/size mismatch');
113
+ fs.writeFileSync(archive, bytes, { flag: 'wx', mode: 0o600 });
114
+ });
115
+ const names = await run('archive-paths', '/usr/bin/tar', ['-tjf', archive]);
116
+ await stage('archive-layout', async () => validateRoswellArchivePaths(names));
117
+ const listing = (await run('archive-types', '/usr/bin/tar', ['-tvjf', archive])).trim().split('\n');
118
+ if (listing.some(n => !/^[-d]/.test(n)))
119
+ throw new Error('Roswell links/special files unsupported');
120
+ await run('archive-extract', '/usr/bin/tar', ['-xjf', archive, '--no-same-owner']);
121
+ await run('roswell-private-install', 'make', [`prefix=${prefix}`, 'install'], path.join(root, 'roswell'));
122
+ const ros = path.join(prefix, 'bin/ros');
123
+ await run('sbcl-quicklisp-setup', ros, ['setup']);
124
+ await run('asdf-bootstrap', ros, ['install', 'asdf']);
125
+ const projects = path.join(rosHome, 'local-projects');
126
+ fs.mkdirSync(projects, { recursive: true });
127
+ for (const repo of repositories) {
128
+ const destination = path.join(projects, repo.split('/')[1]);
129
+ await run(`source:${repo}`, 'git', ['-c', 'protocol.file.allow=never', 'clone', '--depth=1', `https://github.com/${repo}.git`, destination]);
130
+ revisions[repo] = (await run(`revision:${repo}`, 'git', ['rev-parse', 'HEAD'], destination)).trim();
131
+ }
132
+ report.repository = CL_LSP_REPOSITORY;
133
+ const bundled = await installBundledCommonLisp(root, path.join(projects, 'cl-lsp'), ros, run);
134
+ report.bundled = bundled;
135
+ // Both frontend and backend receive only this installation's private environment.
136
+ const command = path.join(root, 'cl-lsp');
137
+ fs.writeFileSync(command, `#!/bin/sh\ncd ${quote(root)} || exit 1\nexec /usr/bin/env -i ${Object.entries(env).filter(([, v]) => v !== undefined).map(([k, v]) => quote(`${k}=${v}`)).join(' ')} ${quote(bundled.command)} --stdio\n`, { mode: 0o700 });
138
+ const fixture = path.join(root, 'probe.lisp'), text = '(let ((value 1)) value)\n';
139
+ fs.writeFileSync(fixture, text);
140
+ const server = new LspServer({ id: 'commonlisp', command, args: [], root, requestTimeoutMs: 15000, inheritEnv: false, env: env });
141
+ try {
142
+ await stage('lsp-initialize', async () => { await server.start(deadline); report.capabilities = server.capabilities; });
143
+ await stage('lsp-synchronize', async () => { report.synchronization = await server.synchronize(fixture, text); });
144
+ await stage('lexical-definition', async () => {
145
+ const definitions = await server.definition(fixture, { line: 0, character: text.lastIndexOf('value') });
146
+ report.lexicalDefinitions = definitions;
147
+ if (!definitions.some(d => d.file === fixture && d.line === 1 && d.character === 8))
148
+ throw new Error('No matching lexical definition response');
149
+ });
150
+ await stage('unevaluated-global-observation', async () => {
151
+ const file = path.join(root, 'global.lisp'), source = '(defun modkh-unloaded () 1)\n(modkh-unloaded)\n';
152
+ fs.writeFileSync(file, source);
153
+ await server.synchronize(file, source);
154
+ report.unevaluatedGlobalDefinitions = await server.definition(file, { line: 1, character: 2 });
155
+ });
156
+ await stage('diagnostic-observation', async () => {
157
+ const invalid = path.join(root, 'invalid.lisp');
158
+ fs.writeFileSync(invalid, '(defun broken (');
159
+ const result = await server.synchronize(invalid, '(defun broken (');
160
+ report.diagnostics = { ...result, channels: server.diagnosticEvidence, verified: result.status === 'observed' && result.diagnostics.some(d => d.severity === 'error') };
161
+ });
162
+ }
163
+ finally {
164
+ try {
165
+ await server.dispose();
166
+ }
167
+ catch (e) {
168
+ settled = false;
169
+ throw e;
170
+ }
171
+ }
172
+ report.launcherSha256 = sha256(fs.readFileSync(command));
173
+ report.status = 'ready-for-lexical-definition';
174
+ report.finishedAt = new Date().toISOString();
175
+ record();
176
+ succeeded = true;
177
+ return { command, args: [], version: `cl-lsp@${revisions[CL_LSP_REPOSITORY]}`, digest: sha256(fs.readFileSync(command)), receipt: report };
178
+ }
179
+ finally {
180
+ if (!succeeded) {
181
+ report.status = 'failed';
182
+ report.finishedAt = new Date().toISOString();
183
+ record();
184
+ // Keep diagnostic evidence before deleting this failed attempt's private caches.
185
+ const diagnostics = {};
186
+ for (const name of fs.readdirSync(home)) {
187
+ if (!/^[A-Za-z0-9_-]+\.log$/.test(name))
188
+ continue;
189
+ const file = path.join(home, name), stat = fs.lstatSync(file);
190
+ if (stat.isFile() && stat.size <= 2 * 1024 * 1024)
191
+ diagnostics[name] = fs.readFileSync(file, 'utf8');
192
+ }
193
+ report.diagnostics = diagnostics;
194
+ record();
195
+ fs.copyFileSync(path.join(root, 'install-receipt.json'), path.join(target, 'last-failure.json'));
196
+ if (settled)
197
+ fs.rmSync(root, { recursive: true, force: true });
198
+ }
199
+ }
200
+ }
201
+ /** A partial directory or modified launcher is never a reusable managed installation. */
202
+ export function reusableCommonLisp(command, digest) {
203
+ try {
204
+ const receipt = JSON.parse(fs.readFileSync(path.join(path.dirname(command), 'install-receipt.json'), 'utf8'));
205
+ return receipt.repository === CL_LSP_REPOSITORY && receipt.status === 'ready-for-lexical-definition' && receipt.launcherSha256 === digest
206
+ && sha256(fs.readFileSync(command)) === digest
207
+ && receipt.stages.some((s) => s.name === 'lsp-initialize' && s.state === 'passed')
208
+ && receipt.stages.some((s) => s.name === 'lexical-definition' && s.state === 'passed');
209
+ }
210
+ catch {
211
+ return false;
212
+ }
213
+ }
@@ -0,0 +1,17 @@
1
+ import { type ExecutionReceipt } from '../lisp/runtime.ts';
2
+ export interface ReaderDiagnostic {
3
+ provider: 'SBCL reader';
4
+ scope: 'reader syntax only; no evaluation, macro expansion, type or project-package checking';
5
+ status: 'syntax-error' | 'readable' | 'unverified';
6
+ line?: number;
7
+ column?: number;
8
+ detail: string;
9
+ sourceSha256: string;
10
+ receipt?: ExecutionReceipt;
11
+ }
12
+ /** A supplemental reader check, never a substitute for CL-LSP semantic diagnostics. */
13
+ export declare function commonLispReader(text: string, options?: {
14
+ sbcl?: string;
15
+ signal?: AbortSignal;
16
+ timeoutMs?: number;
17
+ }): Promise<ReaderDiagnostic>;
@@ -0,0 +1,47 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { executeBounded, privateEnvironment, sha256, temporaryDirectory } from "../lisp/runtime.js";
4
+ /** A supplemental reader check, never a substitute for CL-LSP semantic diagnostics. */
5
+ export async function commonLispReader(text, options = {}) {
6
+ const base = { provider: 'SBCL reader', scope: 'reader syntax only; no evaluation, macro expansion, type or project-package checking', status: 'unverified', detail: '', sourceSha256: sha256(text) };
7
+ if (Buffer.byteLength(text) > 256 * 1024)
8
+ return { ...base, detail: 'Reader input exceeds 256 KiB' };
9
+ const root = temporaryDirectory('modkh-cl-reader-');
10
+ // Only fixed host code is evaluated. Project forms are read as data with #. disabled.
11
+ const driver = `(define-condition blocked-read-eval (error) ())
12
+ (let ((*read-eval* nil) (*readtable* (copy-readtable nil)) (*package* (find-package :cl-user)))
13
+ (set-dispatch-macro-character #\\# #\\. (lambda (stream char argument)
14
+ (declare (ignore stream char argument)) (error (quote blocked-read-eval))))
15
+ (with-open-file (in "input.lisp" :external-format :utf-8)
16
+ (let* ((text (with-output-to-string (out) (loop for c = (read-char in nil nil) while c do (write-char c out))))
17
+ (stream (make-string-input-stream text)) (end (gensym)))
18
+ (handler-case
19
+ (progn (loop for form = (read stream nil end) until (eq form end)) (format t "MODKH_READER_READABLE"))
20
+ (blocked-read-eval () (format t "MODKH_READER_UNVERIFIED") (princ "Read-time evaluation is disabled" *error-output*))
21
+ (package-error (e) (format t "MODKH_READER_UNVERIFIED") (princ e *error-output*))
22
+ (end-of-file (e) (format t "MODKH_READER_ERROR ~D" (file-position stream)) (princ e *error-output*))
23
+ (reader-error (e) (format t "MODKH_READER_ERROR ~D" (file-position stream)) (princ e *error-output*))
24
+ (error (e) (format t "MODKH_READER_UNVERIFIED") (princ e *error-output*))))))`;
25
+ let receipt;
26
+ try {
27
+ fs.writeFileSync(path.join(root, 'input.lisp'), text, { mode: 0o600 });
28
+ fs.writeFileSync(path.join(root, 'reader.lisp'), driver, { mode: 0o600 });
29
+ receipt = await executeBounded(options.sbcl ?? 'sbcl', ['--noinform', '--no-sysinit', '--no-userinit', '--disable-debugger', '--script', 'reader.lisp'], { cwd: root, env: privateEnvironment(root), inputDigest: base.sourceSha256, timeoutMs: options.timeoutMs ?? 5000, maxOutputBytes: 16384, signal: options.signal });
30
+ if (receipt.state !== 'exited' || receipt.exitCode !== 0)
31
+ return { ...base, receipt, detail: `Reader ${receipt.state}: ${receipt.stderr}` };
32
+ if (receipt.stdout === 'MODKH_READER_READABLE')
33
+ return { ...base, receipt, status: 'readable', detail: 'Reader accepted the input; semantic diagnostics remain unverified' };
34
+ const error = /^MODKH_READER_ERROR (\d+)$/.exec(receipt.stdout);
35
+ if (error) {
36
+ // SBCL string offsets count Unicode code points; public columns are UTF-16.
37
+ const prefix = Array.from(text).slice(0, Number(error[1])).join('');
38
+ const lines = prefix.split('\n');
39
+ return { ...base, receipt, status: 'syntax-error', line: lines.length, column: lines.at(-1).length + 1, detail: receipt.stderr };
40
+ }
41
+ return { ...base, receipt, detail: receipt.stderr || 'No valid reader completion receipt' };
42
+ }
43
+ finally {
44
+ if (receipt?.cleanup !== 'unknown')
45
+ fs.rmSync(root, { recursive: true, force: true });
46
+ }
47
+ }
@@ -0,0 +1,3 @@
1
+ /** Explicitly selected, trusted dependency sources, never an implicit project root. */
2
+ export declare function commonLispRegistry(projects: string): string;
3
+ export declare function commonLispSystemProbe(registry: string): string;
@@ -0,0 +1,32 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ /** Explicitly selected, trusted dependency sources, never an implicit project root. */
4
+ export function commonLispRegistry(projects) {
5
+ const root = fs.realpathSync(projects);
6
+ const directories = new Set();
7
+ let visited = 0;
8
+ const visit = (directory) => {
9
+ if (++visited > 10000)
10
+ throw new Error('Common Lisp dependency directory limit exceeded');
11
+ for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
12
+ if (entry.isSymbolicLink())
13
+ continue;
14
+ if (entry.isDirectory() && !['.git', 'node_modules', '.qlot'].includes(entry.name))
15
+ visit(path.join(directory, entry.name));
16
+ else if (entry.isFile() && entry.name.endsWith('.asd'))
17
+ directories.add(directory + path.sep);
18
+ }
19
+ };
20
+ visit(root);
21
+ // Explicit directories also work when an upstream tree ships an incomplete ASDF search cache.
22
+ const lispString = (s) => '"' + s.replaceAll('\\', '\\\\').replaceAll('"', '\\"') + '"';
23
+ return `(:source-registry ${[...directories].sort().map(dir => `(:directory ${lispString(dir)})`).join(' ')} :inherit-configuration)`;
24
+ }
25
+ export function commonLispSystemProbe(registry) {
26
+ return `(progn (require :asdf) (asdf:clear-source-registry) (asdf:initialize-source-registry '${registry})
27
+ (dolist (name '("cl-lsp" "lem-language-server/cli" "lem/core" "micros" "lem-mailbox" "lem-extension-manager" "async-process" "jsonrpc"))
28
+ (let ((system (asdf:find-system name nil)))
29
+ (unless system (error "MODKH_MISSING_ASDF_SYSTEM ~A" name))
30
+ (format t "MODKH_ASDF_SYSTEM ~A ~A~%" name (asdf:system-source-file system))))
31
+ (write-line "MODKH_ASDF_DISCOVERY_OK"))`;
32
+ }
@@ -0,0 +1,10 @@
1
+ type Run = (name: string, command: string, args: string[], cwd?: string) => Promise<string>;
2
+ export declare function opensslCandidates(opt: string): string[];
3
+ export declare const tlsProbeSource = "#include <dlfcn.h>\n#include <stdio.h>\nint main(int argc, char **argv) {\n if (argc != 3) return 2;\n void *crypto = dlopen(argv[1], RTLD_NOW | RTLD_LOCAL);\n void *ssl = dlopen(argv[2], RTLD_NOW | RTLD_LOCAL);\n if (!crypto || !ssl) { puts(\"MODKH_TLS_UNAVAILABLE\"); return 0; }\n if (!dlsym(crypto, \"ASN1_STRING_data\") || !dlsym(crypto, \"ASN1_STRING_length\") ||\n !dlsym(ssl, \"SSL_new\") || !dlsym(ssl, \"TLS_method\")) {\n puts(\"MODKH_TLS_MISSING_SYMBOLS\"); return 0;\n }\n puts(\"MODKH_TLS_COMPATIBLE\"); return 0;\n}\n";
4
+ export declare function tlsConfiguration(lib: string): string;
5
+ /** Explicit CL+SSL configuration; never relink Homebrew or change global loader settings. */
6
+ export declare function prepareDarwinTls(root: string, run: Run): Promise<{
7
+ file: string;
8
+ libraryDirectory: string;
9
+ }>;
10
+ export {};
@@ -0,0 +1,51 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ export function opensslCandidates(opt) {
4
+ if (!fs.existsSync(opt))
5
+ return [];
6
+ return fs.readdirSync(opt).filter(name => /^openssl(?:@[\w.]+)?$/.test(name))
7
+ .sort((a, b) => a === 'openssl' ? -1 : b === 'openssl' ? 1 : b.localeCompare(a, undefined, { numeric: true }))
8
+ .map(name => path.join(opt, name, 'lib'))
9
+ .filter(dir => ['libcrypto.dylib', 'libssl.dylib'].every(name => fs.existsSync(path.join(dir, name))));
10
+ }
11
+ // Test loaded symbols, not a version number or the presence of a dylib filename.
12
+ export const tlsProbeSource = `#include <dlfcn.h>
13
+ #include <stdio.h>
14
+ int main(int argc, char **argv) {
15
+ if (argc != 3) return 2;
16
+ void *crypto = dlopen(argv[1], RTLD_NOW | RTLD_LOCAL);
17
+ void *ssl = dlopen(argv[2], RTLD_NOW | RTLD_LOCAL);
18
+ if (!crypto || !ssl) { puts("MODKH_TLS_UNAVAILABLE"); return 0; }
19
+ if (!dlsym(crypto, "ASN1_STRING_data") || !dlsym(crypto, "ASN1_STRING_length") ||
20
+ !dlsym(ssl, "SSL_new") || !dlsym(ssl, "TLS_method")) {
21
+ puts("MODKH_TLS_MISSING_SYMBOLS"); return 0;
22
+ }
23
+ puts("MODKH_TLS_COMPATIBLE"); return 0;
24
+ }
25
+ `;
26
+ export function tlsConfiguration(lib) {
27
+ return `(let ((*standard-output* *error-output*) (*trace-output* *error-output*))
28
+ (ql:quickload "cl+ssl/config" :silent t))
29
+ (cl+ssl/config:define-libcrypto-path ${JSON.stringify(fs.realpathSync(path.join(lib, 'libcrypto.dylib')))})
30
+ (cl+ssl/config:define-libssl-path ${JSON.stringify(fs.realpathSync(path.join(lib, 'libssl.dylib')))})
31
+ (let ((*standard-output* *error-output*) (*trace-output* *error-output*))
32
+ (ql:quickload "cl+ssl" :silent t)
33
+ (asdf:load-system "cl+ssl" :force t))
34
+ `;
35
+ }
36
+ /** Explicit CL+SSL configuration; never relink Homebrew or change global loader settings. */
37
+ export async function prepareDarwinTls(root, run) {
38
+ const source = path.join(root, 'probe-tls.c'), command = path.join(root, 'probe-tls');
39
+ fs.writeFileSync(source, tlsProbeSource, { flag: 'wx' });
40
+ await run('tls-probe-build', 'cc', [source, '-o', command]);
41
+ const candidates = [...opensslCandidates('/opt/homebrew/opt'), ...opensslCandidates('/usr/local/opt')];
42
+ for (const [index, lib] of candidates.entries()) {
43
+ const output = await run(`tls-library:${index}`, command, [path.join(lib, 'libcrypto.dylib'), path.join(lib, 'libssl.dylib')]);
44
+ if (!output.split(/\r?\n/).includes('MODKH_TLS_COMPATIBLE'))
45
+ continue;
46
+ const file = path.join(root, 'configure-tls.lisp');
47
+ fs.writeFileSync(file, tlsConfiguration(lib), { flag: 'wx' });
48
+ return { file, libraryDirectory: fs.realpathSync(lib) };
49
+ }
50
+ throw new Error('No installed Homebrew OpenSSL pair provides the CL+SSL APIs (ASN1_STRING_data, SSL_new, TLS_method). Install a compatible OpenSSL package; global libraries were not changed.');
51
+ }
@@ -0,0 +1,29 @@
1
+ import { type LanguageDefinition, type LanguageId } from './catalog.ts';
2
+ export interface Detection {
3
+ language: LanguageDefinition;
4
+ /** Absolute, real project root chosen from manifest proximity. */
5
+ root: string;
6
+ /** Manifest that justified the root, if any. */
7
+ manifest?: string;
8
+ }
9
+ /** Detection is limited to the named file plus a bounded manifest scan; no project code is executed. */
10
+ export declare function detectLanguage(file: string, workspaceRoot: string): Detection | undefined;
11
+ /** Languages suggested by manifests in the workspace root, used by `modkh language status`. */
12
+ export declare function detectedLanguages(workspaceRoot: string): LanguageDefinition[];
13
+ export interface LanguageSettings {
14
+ autoInstall: boolean;
15
+ disabled: LanguageId[];
16
+ /** Milliseconds allowed for an install before it is reported as preparing. */
17
+ installTimeoutMs: number;
18
+ /** Milliseconds allowed for a server to answer a single request. */
19
+ requestTimeoutMs: number;
20
+ /** Languages the user explicitly configured a server path for. */
21
+ servers: Partial<Record<LanguageId, {
22
+ command: string;
23
+ args?: string[];
24
+ }>>;
25
+ }
26
+ export declare const DEFAULT_LANGUAGE_SETTINGS: LanguageSettings;
27
+ export declare function languageHome(): string;
28
+ /** Parse an untrusted settings object; unknown keys and invalid values fall back to defaults. */
29
+ export declare function parseLanguageSettings(raw: unknown): LanguageSettings;
@@ -0,0 +1,103 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { configDir } from "../cli/config.js";
4
+ import { LANGUAGES, languageById, languageForPath } from "./catalog.js";
5
+ const MAX_SCAN_ENTRIES = 400;
6
+ /** Walk up from the file until a manifest for that language appears; stop at the workspace root. */
7
+ function findRoot(file, workspaceRoot, language) {
8
+ let current = path.dirname(file);
9
+ const stop = path.resolve(workspaceRoot);
10
+ for (let depth = 0; depth < 24; depth++) {
11
+ for (const name of language.manifests) {
12
+ if (name.includes('*')) {
13
+ try {
14
+ const match = fs.readdirSync(current).find(entry => entry.endsWith(name.slice(name.indexOf('*') + 1)));
15
+ if (match)
16
+ return { root: current, manifest: match };
17
+ }
18
+ catch { /* unreadable directory: keep walking up */ }
19
+ }
20
+ else if (fs.existsSync(path.join(current, name))) {
21
+ return { root: current, manifest: name };
22
+ }
23
+ }
24
+ const parent = path.dirname(current);
25
+ if (parent === current || path.relative(stop, parent).startsWith('..'))
26
+ break;
27
+ current = parent;
28
+ }
29
+ return { root: stop };
30
+ }
31
+ /** Detection is limited to the named file plus a bounded manifest scan; no project code is executed. */
32
+ export function detectLanguage(file, workspaceRoot) {
33
+ const language = languageForPath(file);
34
+ if (!language)
35
+ return undefined;
36
+ const { root, manifest } = findRoot(file, workspaceRoot, language);
37
+ return { language, root, ...(manifest ? { manifest } : {}) };
38
+ }
39
+ /** Languages suggested by manifests in the workspace root, used by `modkh language status`. */
40
+ export function detectedLanguages(workspaceRoot) {
41
+ let entries = [];
42
+ try {
43
+ entries = fs.readdirSync(workspaceRoot).slice(0, MAX_SCAN_ENTRIES);
44
+ }
45
+ catch {
46
+ return [];
47
+ }
48
+ const found = new Set();
49
+ for (const language of LANGUAGES) {
50
+ if (language.manifests.length === 0)
51
+ continue;
52
+ for (const name of language.manifests) {
53
+ const hit = name.includes('*')
54
+ ? entries.some(entry => entry.endsWith(name.slice(name.indexOf('*') + 1)))
55
+ : entries.includes(name);
56
+ if (hit) {
57
+ found.add(language.id);
58
+ break;
59
+ }
60
+ }
61
+ }
62
+ return [...found].map(id => languageById(id)).filter(Boolean);
63
+ }
64
+ export const DEFAULT_LANGUAGE_SETTINGS = {
65
+ autoInstall: true,
66
+ disabled: [],
67
+ installTimeoutMs: 180_000,
68
+ requestTimeoutMs: 20_000,
69
+ servers: {},
70
+ };
71
+ export function languageHome() {
72
+ return path.join(configDir(), 'language');
73
+ }
74
+ /** Parse an untrusted settings object; unknown keys and invalid values fall back to defaults. */
75
+ export function parseLanguageSettings(raw) {
76
+ if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
77
+ return DEFAULT_LANGUAGE_SETTINGS;
78
+ const value = raw;
79
+ const disabled = Array.isArray(value['disabled'])
80
+ ? value['disabled'].filter((id) => typeof id === 'string' && languageById(id) !== undefined)
81
+ : [];
82
+ const servers = {};
83
+ if (value['servers'] && typeof value['servers'] === 'object' && !Array.isArray(value['servers'])) {
84
+ for (const [id, entry] of Object.entries(value['servers'])) {
85
+ if (languageById(id) === undefined || !entry || typeof entry !== 'object')
86
+ continue;
87
+ const command = entry['command'];
88
+ const args = entry['args'];
89
+ if (typeof command !== 'string' || command.length === 0 || command.length > 4096)
90
+ continue;
91
+ const list = Array.isArray(args) ? args.filter((a) => typeof a === 'string').slice(0, 32) : [];
92
+ servers[id] = { command, args: list };
93
+ }
94
+ }
95
+ const positive = (input, fallback) => typeof input === 'number' && Number.isSafeInteger(input) && input > 0 && input <= 3_600_000 ? input : fallback;
96
+ return {
97
+ autoInstall: value['autoInstall'] !== false,
98
+ disabled,
99
+ installTimeoutMs: positive(value['installTimeoutMs'], DEFAULT_LANGUAGE_SETTINGS.installTimeoutMs),
100
+ requestTimeoutMs: positive(value['requestTimeoutMs'], DEFAULT_LANGUAGE_SETTINGS.requestTimeoutMs),
101
+ servers,
102
+ };
103
+ }
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>
@@ -0,0 +1,76 @@
1
+ {
2
+ "schema": 1,
3
+ "source": "tree-sitter-wasms@0.1.13",
4
+ "packageMetadataSha256": "d08bdba4e2f2d9c90d9bcaa65df6fee733cfa280edcf6762ca60516c32bf96f5",
5
+ "license": {
6
+ "file": "LICENSE",
7
+ "sha256": "6b0382b16279f26ff69014300541967a356a666eb0b91b422f6862f6b7dad17e"
8
+ },
9
+ "provenance": "Installed npm package and lockfile; grammar upstream revisions are not supplied by this package. Digests identify bytes, not independent upstream authentication.",
10
+ "unavailable": [
11
+ "commonlisp",
12
+ "svelte"
13
+ ],
14
+ "grammars": [
15
+ {
16
+ "id": "typescript",
17
+ "bytes": 2342690,
18
+ "sha256": "8515404dceed38e1ed86aa34b09fcf3379fff1b4ff9dd3967bcd6d1eb5ac3d8f"
19
+ },
20
+ {
21
+ "id": "tsx",
22
+ "bytes": 2411272,
23
+ "sha256": "6aa3b2c70e76f5d48eafef1093e9c4de383e13f2fdde2f4e9b98a378f6a8f1b6"
24
+ },
25
+ {
26
+ "id": "javascript",
27
+ "bytes": 647334,
28
+ "sha256": "63812b9e275d26851264734868d27a1656bd44a2ef6eb3e85e6b03728c595ab5"
29
+ },
30
+ {
31
+ "id": "html",
32
+ "bytes": 18468,
33
+ "sha256": "11b3405c1543fb012f5ed7f8ee73125076dce8b168301e1e787e4c717da6b456"
34
+ },
35
+ {
36
+ "id": "css",
37
+ "bytes": 98133,
38
+ "sha256": "5fc615467b1b98420ed7517e5bf9e1f88468132dd903d842dfb13714f6a1cb0c"
39
+ },
40
+ {
41
+ "id": "python",
42
+ "bytes": 476105,
43
+ "sha256": "9056d0fb0c337810d019fae350e8167786119da98f0f282aceae7ab89ee8253b"
44
+ },
45
+ {
46
+ "id": "rust",
47
+ "bytes": 818756,
48
+ "sha256": "4409921a70d0aa5bec7d1d7ce809a557a8ee1cf6ace901e3ac6a76e62cfea903"
49
+ },
50
+ {
51
+ "id": "c",
52
+ "bytes": 792959,
53
+ "sha256": "056b25072382f72deee2c64ec238ffc4bb8cf42844ef21502c0e70f03a8a0d66"
54
+ },
55
+ {
56
+ "id": "cpp",
57
+ "bytes": 4662978,
58
+ "sha256": "f6afdf53bfd6de76557bb7edb624a3a3869e14d9a83b78433f93617ecee42527"
59
+ },
60
+ {
61
+ "id": "ruby",
62
+ "bytes": 2106447,
63
+ "sha256": "93a5022855314cdb45458c7bb026a24a0ebc3a5ff6439e542e881f14dfa13a39"
64
+ },
65
+ {
66
+ "id": "swift",
67
+ "bytes": 3147876,
68
+ "sha256": "41c4fdb2249a3aa6d87eed0d383081ff09725c2248b4977043a43825980ffcc7"
69
+ },
70
+ {
71
+ "id": "php",
72
+ "bytes": 812594,
73
+ "sha256": "55bb617b6f01e14bab997861f0b20a2420cf6ba3199ffeb295b9ec398966d8a3"
74
+ }
75
+ ]
76
+ }