@agiflowai/agent-cli 0.2.7 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.8
4
+ Fix:
5
+ - Fix organization id missing from direct execution.
6
+
3
7
  ## 0.2.7
4
8
  Fix:
5
9
  - Fix websocket url error.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { bw as z, bm as H, bx as P, bn as M } from "./index-CQkCZNRM.mjs";
2
+ import { bw as z, bm as H, bx as P, bn as M } from "./index-B_WqaHDe.mjs";
3
3
  import Q from "node:events";
4
4
  import X from "node:child_process";
5
5
  import Z from "node:path";
package/dist/daemon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as i, Fragment as F } from "react/jsx-runtime";
2
- import { bi as b, bj as V, bk as Y, bl as $, bm as S, bn as D, bo as X, bp as H, bq as J, br as Z, bs as ee, bt as re, bu as ne, bv as oe } from "./index-CQkCZNRM.mjs";
2
+ import { bi as b, bj as V, bk as Y, bl as $, bm as S, bn as D, bo as X, bp as H, bq as J, br as Z, bs as ee, bt as re, bu as ne, bv as oe } from "./index-B_WqaHDe.mjs";
3
3
  import { useQueryClient as ie, useQuery as te, useMutation as M, QueryClientProvider as ce, QueryClient as le } from "@tanstack/react-query";
4
4
  import { useDispatch as de, useSelector as u, shallowEqual as ae, Provider as se } from "react-redux";
5
5
  import P, { useRef as L, useEffect as _, useState as C, useCallback as ue, useMemo as he } from "react";
@@ -14669,7 +14669,8 @@ let Zo = class {
14669
14669
  };
14670
14670
  }
14671
14671
  async getOrganizationId() {
14672
- return (await this.load())?.organizationId || null;
14672
+ const t = await this.load();
14673
+ return t?.organizationId ? t.organizationId : process.env.AGENT_ORGANIZATION_ID ? process.env.AGENT_ORGANIZATION_ID : this.subEnvManager?.organizationId ? this.subEnvManager.organizationId : null;
14673
14674
  }
14674
14675
  async getDeviceId() {
14675
14676
  return (await this.load())?.deviceId || null;
@@ -19714,7 +19715,7 @@ let Bu = class {
19714
19715
  const t = this.agentConfigService.getStoredAgentSessionId();
19715
19716
  if (t)
19716
19717
  try {
19717
- const { createGetAgentStatus: e } = await Promise.resolve().then(() => gT), { createSendAgentStatus: r } = await Promise.resolve().then(() => hI), { AGENT_STATUS: i } = await import("./index-C3bjyLFC.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
19718
+ const { createGetAgentStatus: e } = await Promise.resolve().then(() => gT), { createSendAgentStatus: r } = await Promise.resolve().then(() => hI), { AGENT_STATUS: i } = await import("./index-BoyNKd-d.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
19718
19719
  await this.multiplexClient.publish(
19719
19720
  r(t, {
19720
19721
  agentType: this.agentConfigService.getAgentType() ?? void 0,
@@ -20964,7 +20965,7 @@ let Mu = class {
20964
20965
  * Returns environment variables configured in the agent profile
20965
20966
  */
20966
20967
  async fetchAgentProfileEnvironment(t) {
20967
- const e = await this.getAuthHeaders(), r = await this.context.getOrganizationId();
20968
+ const e = await this.getAuthHeaders(), r = this.agentConfig.getOrganizationId() || await this.context.getOrganizationId();
20968
20969
  if (!r)
20969
20970
  throw new Error("Organization ID is required for fetching agent profile environment");
20970
20971
  try {
@@ -21641,7 +21642,7 @@ let Qo = class {
21641
21642
  * Middleware layers wrap around this with setup (BEFORE) and cleanup (AFTER)
21642
21643
  */
21643
21644
  async launchPty(t) {
21644
- const { AGENT_STATUS: e } = await import("./index-C3bjyLFC.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
21645
+ const { AGENT_STATUS: e } = await import("./index-BoyNKd-d.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
21645
21646
  if (!r)
21646
21647
  throw new Error("launchPty requires metadata.agentCommand to be set by middleware");
21647
21648
  const n = await this.getAgentEnvironmentVariablesForContext(t);
@@ -22792,7 +22793,7 @@ class TT extends cy {
22792
22793
  if (!e.length) return;
22793
22794
  const i = (/* @__PURE__ */ new Date()).toISOString();
22794
22795
  try {
22795
- const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-CJ3v4aki.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => Bi), a = e.map((_) => ({ label: _.text, value: _.number, selected: !!_.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
22796
+ const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-C3DrOR0R.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => Bi), a = e.map((_) => ({ label: _.text, value: _.number, selected: !!_.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
22796
22797
  toolName: "selectOption",
22797
22798
  toolArgs: { timestamp: i, options: a },
22798
22799
  input: c
@@ -42737,4 +42738,4 @@ export {
42737
42738
  fw as y,
42738
42739
  Iv as z
42739
42740
  };
42740
- //# sourceMappingURL=index-CQkCZNRM.mjs.map
42741
+ //# sourceMappingURL=index-B_WqaHDe.mjs.map