@runeya/runeya 2.0.64 → 2.0.65

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/index.js CHANGED
@@ -270,7 +270,7 @@ function listenWithRetry(server, port, host, wss, maxRetries = 20, delay = 500)
270
270
  });
271
271
  }
272
272
  async function main() {
273
- const { createLocalServer, pullEnv, PullEnvError, registerInstance } = await import("./src-RN7TATWK.js");
273
+ const { createLocalServer, pullEnv, PullEnvError, registerInstance } = await import("./src-YPQEXOFN.js");
274
274
  if (isPullEnv) {
275
275
  if (!serviceArg) {
276
276
  console.error("Error: --service (-s) is required with --pull-env");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeya/runeya",
3
- "version": "2.0.64",
3
+ "version": "2.0.65",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "runeya": "./index.js"
@@ -2497,9 +2497,11 @@ async function resolveAgentCwd(target) {
2497
2497
  }
2498
2498
 
2499
2499
  // ../server/src/trpc/routers/service.ts
2500
- var LOCAL_AGENT_ID = "local-agent";
2501
2500
  async function resolveEffectiveAgentId(service) {
2502
- const known = new Set((await agentStore.list()).map((a) => a.id));
2501
+ const known = /* @__PURE__ */ new Set([
2502
+ ...agentManager.listAgents().map((a) => a.config.id),
2503
+ ...(await agentStore.list()).map((a) => a.id)
2504
+ ]);
2503
2505
  if (service.agentId && known.has(service.agentId)) return service.agentId;
2504
2506
  const projects = await projectStore.list();
2505
2507
  const project = projects.find((p) => p.serviceIds.includes(service.id));
@@ -2507,7 +2509,7 @@ async function resolveEffectiveAgentId(service) {
2507
2509
  const activeEnv = await environmentStore.get(project.activeEnvironmentId);
2508
2510
  if (activeEnv?.agentId && known.has(activeEnv.agentId)) return activeEnv.agentId;
2509
2511
  }
2510
- return known.has(LOCAL_AGENT_ID) ? LOCAL_AGENT_ID : null;
2512
+ return agentManager.getDefaultAgentId();
2511
2513
  }
2512
2514
  async function resolveServiceVariables(service) {
2513
2515
  const projects = await projectStore.list();
@@ -17289,4 +17291,4 @@ export {
17289
17291
  pullEnv,
17290
17292
  registerInstance
17291
17293
  };
17292
- //# sourceMappingURL=src-RN7TATWK.js.map
17294
+ //# sourceMappingURL=src-YPQEXOFN.js.map