dal-code 0.1.10 → 1.0.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 (28) hide show
  1. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  2. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  3. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  4. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  5. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  6. package/dist/node_modules/@dalcode/dal-lsp/package.json +3 -3
  7. package/dist/node_modules/@dalcode/dal-mcp/package.json +5 -5
  8. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.d.ts.map +1 -1
  9. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +5 -0
  10. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js.map +1 -1
  11. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  12. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.ts +5 -0
  13. package/dist/node_modules/@dalcode/dal-skills/package.json +5 -4
  14. package/dist/node_modules/@dalcode/dal-skills/src/index.ts +38 -1
  15. package/dist/node_modules/@dalcode/dal-skills/src/packages.ts +92 -0
  16. package/dist/node_modules/@dalcode/dal-subagent/package.json +3 -3
  17. package/dist/node_modules/@dalcode/dal-telemetry/package.json +2 -2
  18. package/dist/node_modules/@dalcode/deepailab/package.json +2 -2
  19. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +1 -1
  20. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  21. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  22. package/dist/node_modules/@earendil-works/pi-ai/package.json +1 -1
  23. package/dist/node_modules/@earendil-works/pi-client/package.json +1 -1
  24. package/dist/node_modules/@earendil-works/pi-protocol/package.json +1 -1
  25. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  26. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  27. package/npm-shrinkwrap.json +2 -2
  28. package/package.json +1 -1
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Extensions recommended on the user's DeepAILab account.
3
+ *
4
+ * Deliberately a list and not an installation. A hosted MCP server can be
5
+ * pushed safely because the worst it does is answer requests; an extension is
6
+ * code that runs on the user's machine with their permissions, and there is no
7
+ * equivalent restriction that makes pushing one safe. So the account remembers
8
+ * what someone chose, every machine they sign in from is told about it, and the
9
+ * install itself stays a deliberate command they type.
10
+ *
11
+ * That also means this file never shells out. It reads a list and compares.
12
+ */
13
+
14
+ import { readFileSync } from "node:fs";
15
+ import { join } from "node:path";
16
+
17
+ export interface AccountPackage {
18
+ readonly source: string;
19
+ readonly name: string;
20
+ readonly description: string;
21
+ }
22
+
23
+ /** Bounded: this runs at session start, before the first turn. */
24
+ const TIMEOUT_MS = 8_000;
25
+
26
+ /** Sources we are willing to repeat back. Anything else is a misconfiguration. */
27
+ function isPublishableSource(source: string): boolean {
28
+ return source.startsWith("npm:") || source.startsWith("git:") || source.startsWith("https://");
29
+ }
30
+
31
+ export async function fetchAccountPackages(apiBase: string, vk: string): Promise<readonly AccountPackage[]> {
32
+ const controller = new AbortController();
33
+ const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
34
+ try {
35
+ const res = await fetch(`${apiBase}/portal/packages`, {
36
+ headers: { "x-bf-vk": vk, Accept: "application/json" },
37
+ signal: controller.signal,
38
+ });
39
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
40
+ const body = (await res.json()) as { packages?: Array<Partial<AccountPackage>> };
41
+ return (body.packages ?? [])
42
+ .filter(
43
+ (p): p is AccountPackage =>
44
+ typeof p?.source === "string" && p.source.length > 0 && isPublishableSource(p.source),
45
+ )
46
+ .map((p) => ({
47
+ source: p.source,
48
+ name: typeof p.name === "string" && p.name ? p.name : p.source,
49
+ description: typeof p.description === "string" ? p.description : "",
50
+ }));
51
+ } finally {
52
+ clearTimeout(timer);
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Which of the account's packages this machine does not have yet.
58
+ *
59
+ * Installed sources arrive in the shapes settings.json allows — a bare string,
60
+ * or an object with `source` — so both are normalised before comparing.
61
+ */
62
+ /**
63
+ * Package sources this machine already has.
64
+ *
65
+ * Read from settings.json directly: ExtensionContext exposes no settings
66
+ * accessor, and this only needs one array. A missing or malformed file means
67
+ * "nothing installed", which at worst shows a recommendation the user already
68
+ * has — the failure mode of guessing the other way is staying silent forever.
69
+ */
70
+ export function readInstalledSources(agentDir: string): readonly (string | { source?: string })[] {
71
+ try {
72
+ const parsed = JSON.parse(readFileSync(join(agentDir, "settings.json"), "utf8")) as {
73
+ packages?: (string | { source?: string })[];
74
+ };
75
+ return Array.isArray(parsed.packages) ? parsed.packages : [];
76
+ } catch {
77
+ return [];
78
+ }
79
+ }
80
+
81
+ export function missingPackages(
82
+ account: readonly AccountPackage[],
83
+ installed: readonly (string | { source?: string })[],
84
+ ): readonly AccountPackage[] {
85
+ const have = new Set(
86
+ installed
87
+ .map((entry) => (typeof entry === "string" ? entry : entry?.source))
88
+ .filter((s): s is string => typeof s === "string")
89
+ .map((s) => s.trim().toLowerCase()),
90
+ );
91
+ return account.filter((p) => !have.has(p.source.trim().toLowerCase()));
92
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/dal-subagent",
3
- "version": "0.1.10",
3
+ "version": "1.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -17,8 +17,8 @@
17
17
  ]
18
18
  },
19
19
  "dependencies": {
20
- "@dalcode/dal-pi-kit": "0.1.10",
21
- "@dalcode/dal-guard": "0.1.10",
20
+ "@dalcode/dal-pi-kit": "1.0.0",
21
+ "@dalcode/dal-guard": "1.0.0",
22
22
  "@earendil-works/pi-agent-core": "^0.1.2",
23
23
  "@earendil-works/pi-ai": "^0.1.2",
24
24
  "typebox": "1.3.7"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/dal-telemetry",
3
- "version": "0.1.10",
3
+ "version": "1.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -20,7 +20,7 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@dalcode/dal-pi-kit": "0.1.10"
23
+ "@dalcode/dal-pi-kit": "1.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@earendil-works/pi-coding-agent": "^0.1.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/deepailab",
3
- "version": "0.1.10",
3
+ "version": "1.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -19,7 +19,7 @@
19
19
  ]
20
20
  },
21
21
  "dependencies": {
22
- "@dalcode/dal-pi-kit": "0.1.10",
22
+ "@dalcode/dal-pi-kit": "1.0.0",
23
23
  "@earendil-works/pi-ai": "^0.1.2"
24
24
  },
25
25
  "peerDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-agent-core",
3
- "version": "0.1.10",
3
+ "version": "1.0.0",
4
4
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +1 @@
1
- {"schemaVersion":3,"generatedAt":"2026-09-13T06:34:16.438Z","structureHash":"0391de1594a7ee3a37d882f2a09c66c924fbf8fd20ea444378fe626cc0b6e9cf","files":{"amazon-bedrock.json":"071c7bc23767d6c5c5b4f9fb3c94fbd103473f899a1f9b52024945e42275a98e","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"c0e1cfcef8531b5d0852c0e74790290f130dbcb4591b6578bb0d8a4b464231c0","azure-openai-responses.json":"2f42741e47dbebd8491cf40bff1de313fc2221f55e16bc02fd6e5d50b5f8fefe","baseten.json":"d155c434294b5167244cffb6dea6793f9669e91e8ab65b564f9510d81b330e37","cerebras.json":"9eaa554e1b02f3665f8f63e6432d253bf81351af7c72001054dd8108aa528a52","cloudflare-ai-gateway.json":"eb2bf274394a157714072a2726675fbdfd2cc370e359b6665fa6aca409617089","cloudflare-workers-ai.json":"07ef63208ff7517fd1a80962f18143e21de399640423329490b157f459ccf995","deepseek.json":"8cc5e02a8eb3f1ead25da01d6ebac7dbd9aa5134c561026de2076cc990eb3349","fireworks.json":"e7a91f879dae810ebccbc800526ad498ca5189a4a0e6a27489ffbc3f30f02123","github-copilot.json":"5ddbd26a51c3d60975dfc41c685f65ee0964b94352379f9f3dac77715f389004","google-vertex.json":"e1631109172dc1f7d7977570420a5bb86258bdd1088427e244a2c51545c4f24d","google.json":"7619bf03edd2a7acb06a2274a14b13c3a61354288abe029a758401d4de36a8fd","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"a488b6f175b382277ccf7d487f877ef0c698994576bb55d2410838bf9c8c7c41","kimi-coding.json":"5e28e32e5b16df506a3a1c620ed7870fa7e5e57d8ede4a2aa44dbb24ecf1ba2f","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"63f77de8782dce6a8d4649b6075ee04c9732863ae85561e0867871220c558bde","moonshotai.json":"2a8dfb97eb905e991c22081dc09bd4a61c05b7fa9ac0d5c72d6930f601f490f1","nvidia.json":"d9fbf18e811fcf04521c3dad7bd8a31c6716938611de392548319acc560c1e0c","openai-codex.json":"a10bfcfd34db6bcb98d8ee46175e154cab30530a137dbf31ac1434020ed3ffdd","openai.json":"775d3b7d95d14b741d0b287b1153d40f051a9ea03035a82b487889acc7fa69e2","opencode-go.json":"274c4fb1a4e99c286860174700b0b38997df62839efd2b76a8884db1d8dc331a","opencode.json":"7b878f5fb48e9fce68af0c3b507ddafd88a07b5ec7a8c06e9b99cf85b27324ac","openrouter.json":"634108dfb572b210ef604cd26afc313151c00c58f36f465c90397d75b4f68bd2","qwen-token-plan-cn.json":"d24c5318361ae5395866faaaffde5e52341be58e607def0cc219cae49326492a","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"0545c9881decb710a9535f67960174089b04f607c1200335cdad9de4670ec92a","together.json":"927c707d06f2236cdab13f14c870fb58bce0614ba7287bbcd57cc9fd66d191ed","vercel-ai-gateway.json":"f86a64fb30252dc8b1f8f828b274190a11bc7806032fa2d6b4395130c07efb14","xai.json":"037bde3de5ea72814c3f0b79da8b244c89feb708cc0cbf8596cdfac7682477b6","xiaomi-token-plan-ams.json":"a36446cb9e3cb4f7054617676fd711092245a74f703ba89573f21d2673b85fa8","xiaomi-token-plan-cn.json":"c295dadf4097b5d86af15e924fb2a1a6342bae9e0a9a5839c9fca216308c51e5","xiaomi-token-plan-sgp.json":"93d359575c2348c97d79a2b14e1e9437199bd4aee948d58611b3fbab75cd9fb3","xiaomi.json":"f06f1011d606d22311b1f4c50eb36d38b8cd99abf5760faee657d5559e87452b","zai-coding-cn.json":"d3c969020a7ab978497837a3301c7bca364d704082832221cfe61e6596333e56","zai.json":"f42790c77fb4681a656897a9d860b939916c0ddf979a5f16856bce9573cdf64e"}}
1
+ {"schemaVersion":3,"generatedAt":"2026-09-13T07:08:04.528Z","structureHash":"0391de1594a7ee3a37d882f2a09c66c924fbf8fd20ea444378fe626cc0b6e9cf","files":{"amazon-bedrock.json":"071c7bc23767d6c5c5b4f9fb3c94fbd103473f899a1f9b52024945e42275a98e","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"c0e1cfcef8531b5d0852c0e74790290f130dbcb4591b6578bb0d8a4b464231c0","azure-openai-responses.json":"2f42741e47dbebd8491cf40bff1de313fc2221f55e16bc02fd6e5d50b5f8fefe","baseten.json":"d155c434294b5167244cffb6dea6793f9669e91e8ab65b564f9510d81b330e37","cerebras.json":"9eaa554e1b02f3665f8f63e6432d253bf81351af7c72001054dd8108aa528a52","cloudflare-ai-gateway.json":"eb2bf274394a157714072a2726675fbdfd2cc370e359b6665fa6aca409617089","cloudflare-workers-ai.json":"07ef63208ff7517fd1a80962f18143e21de399640423329490b157f459ccf995","deepseek.json":"8cc5e02a8eb3f1ead25da01d6ebac7dbd9aa5134c561026de2076cc990eb3349","fireworks.json":"e7a91f879dae810ebccbc800526ad498ca5189a4a0e6a27489ffbc3f30f02123","github-copilot.json":"5ddbd26a51c3d60975dfc41c685f65ee0964b94352379f9f3dac77715f389004","google-vertex.json":"e1631109172dc1f7d7977570420a5bb86258bdd1088427e244a2c51545c4f24d","google.json":"7619bf03edd2a7acb06a2274a14b13c3a61354288abe029a758401d4de36a8fd","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"a488b6f175b382277ccf7d487f877ef0c698994576bb55d2410838bf9c8c7c41","kimi-coding.json":"5e28e32e5b16df506a3a1c620ed7870fa7e5e57d8ede4a2aa44dbb24ecf1ba2f","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"63f77de8782dce6a8d4649b6075ee04c9732863ae85561e0867871220c558bde","moonshotai.json":"2a8dfb97eb905e991c22081dc09bd4a61c05b7fa9ac0d5c72d6930f601f490f1","nvidia.json":"d9fbf18e811fcf04521c3dad7bd8a31c6716938611de392548319acc560c1e0c","openai-codex.json":"a10bfcfd34db6bcb98d8ee46175e154cab30530a137dbf31ac1434020ed3ffdd","openai.json":"775d3b7d95d14b741d0b287b1153d40f051a9ea03035a82b487889acc7fa69e2","opencode-go.json":"274c4fb1a4e99c286860174700b0b38997df62839efd2b76a8884db1d8dc331a","opencode.json":"7b878f5fb48e9fce68af0c3b507ddafd88a07b5ec7a8c06e9b99cf85b27324ac","openrouter.json":"1d229919fd787a9cde9ea5a6c86433fbf3fe107f7b5d67fd44ea4066d338dab7","qwen-token-plan-cn.json":"d24c5318361ae5395866faaaffde5e52341be58e607def0cc219cae49326492a","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"0545c9881decb710a9535f67960174089b04f607c1200335cdad9de4670ec92a","together.json":"927c707d06f2236cdab13f14c870fb58bce0614ba7287bbcd57cc9fd66d191ed","vercel-ai-gateway.json":"f86a64fb30252dc8b1f8f828b274190a11bc7806032fa2d6b4395130c07efb14","xai.json":"037bde3de5ea72814c3f0b79da8b244c89feb708cc0cbf8596cdfac7682477b6","xiaomi-token-plan-ams.json":"a36446cb9e3cb4f7054617676fd711092245a74f703ba89573f21d2673b85fa8","xiaomi-token-plan-cn.json":"c295dadf4097b5d86af15e924fb2a1a6342bae9e0a9a5839c9fca216308c51e5","xiaomi-token-plan-sgp.json":"93d359575c2348c97d79a2b14e1e9437199bd4aee948d58611b3fbab75cd9fb3","xiaomi.json":"f06f1011d606d22311b1f4c50eb36d38b8cd99abf5760faee657d5559e87452b","zai-coding-cn.json":"d3c969020a7ab978497837a3301c7bca364d704082832221cfe61e6596333e56","zai.json":"f42790c77fb4681a656897a9d860b939916c0ddf979a5f16856bce9573cdf64e"}}