@adhdev/daemon-standalone 0.9.82-rc.536 → 0.9.82-rc.538

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-standalone",
3
- "version": "0.9.82-rc.536",
3
+ "version": "0.9.82-rc.538",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -37,7 +37,7 @@
37
37
  "license": "AGPL-3.0-or-later",
38
38
  "dependencies": {
39
39
  "@adhdev/ghostty-vt-node": "*",
40
- "@adhdev/session-host-core": "0.9.82-rc.536",
40
+ "@adhdev/session-host-core": "0.9.82-rc.538",
41
41
  "@xterm/addon-serialize": "^0.14.0",
42
42
  "@xterm/xterm": "^6.0.0",
43
43
  "chalk": "^5.3.0",
@@ -2784,8 +2784,21 @@ function readProviderPriority(policy) {
2784
2784
  const raw = policy?.providerPriority;
2785
2785
  return Array.isArray(raw) ? raw.map((type) => typeof type === "string" ? type.trim() : "").filter(Boolean) : [];
2786
2786
  }
2787
+ function readNodeSupportedProviders(policy) {
2788
+ const seen = /* @__PURE__ */ new Set();
2789
+ const out = [];
2790
+ const push = (type) => {
2791
+ const trimmed = typeof type === "string" ? type.trim() : "";
2792
+ if (!trimmed || seen.has(trimmed)) return;
2793
+ seen.add(trimmed);
2794
+ out.push(trimmed);
2795
+ };
2796
+ for (const slot of normalizeNodeCapabilitySlots(policy?.slots)) push(slot.provider);
2797
+ for (const type of readProviderPriority(policy)) push(type);
2798
+ return out;
2799
+ }
2787
2800
  function buildNodeCapabilityExposure(node) {
2788
- const providers = readProviderPriority(node.policy);
2801
+ const providers = readNodeSupportedProviders(node.policy);
2789
2802
  const capabilityTags = (0, import_daemon_core3.buildMeshNodeCapabilityTags)(node);
2790
2803
  const exposure = { capabilityTags };
2791
2804
  if (providers.length) {
@@ -6699,7 +6712,21 @@ async function meshLaunchSession(ctx, args) {
6699
6712
  const bootstrapBlock = getWorktreeBootstrapLaunchBlock(node, ctx.mesh.policy);
6700
6713
  if (bootstrapBlock) return JSON.stringify(bootstrapBlock, null, 2);
6701
6714
  {
6702
- let resolvedProviderType = typeof args.type === "string" && args.type.trim() ? args.type : "";
6715
+ const requestedType = typeof args.type === "string" && args.type.trim() ? args.type.trim() : "";
6716
+ let resolvedProviderType = requestedType;
6717
+ if (requestedType) {
6718
+ const slotProviders = normalizeNodeCapabilitySlots(node.policy?.slots).map((s) => s.provider);
6719
+ if (slotProviders.length && !slotProviders.includes(requestedType)) {
6720
+ return JSON.stringify({
6721
+ success: false,
6722
+ code: "mesh_provider_type_unsupported",
6723
+ error: `Node '${args.node_id}' does not support provider '${requestedType}'. Its capability slots (policy.slots) declare: ${slotProviders.join(", ")}. Configure a slot for '${requestedType}' via mesh_node_slots_set, or launch with one of the supported types.`,
6724
+ nodeId: args.node_id,
6725
+ requestedType,
6726
+ supportedProviders: slotProviders
6727
+ }, null, 2);
6728
+ }
6729
+ }
6703
6730
  if (!resolvedProviderType) {
6704
6731
  const providerPriority = readProviderPriority(node.policy);
6705
6732
  if (!providerPriority.length) {