@agent-team-foundation/first-tree-hub 0.14.0 → 0.14.2

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.
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import "../observability-BAScT_5S-BcW9HgkG.mjs";
3
- import { $ as formatStaleReason, A as checkDocker, B as isServiceSupported, C as createApiNameResolver, D as checkBackgroundService, E as checkAgentConfigs, F as checkWebSocket, H as restartClientService, I as printResults, J as stopPostgres, L as reconcileAgentConfigs, M as checkServerConfig, N as checkServerHealth, O as checkClientConfig, P as checkServerReachable, Q as findStaleAliases, R as getClientServiceStatus, S as runHomeMigration, T as runMigrations, U as startClientService, W as stopClientService, X as handleClientOrgMismatch, Y as ClientRuntime, _ as formatCheckReport, a as declineUpdate, at as fail, b as onboardCreate, c as detectInstallMode, ct as ClientUserMismatchError, d as startServer, dt as SessionRegistry, et as removeLocalAgent, f as reconcileLocalRuntimeProviders, ft as cleanWorkspaces, g as promptMissingFields, h as promptAddAgent, ht as configureClientLoggerForService, i as createExecuteUpdate, it as resolveSenderName, j as checkNodeVersion, k as checkDatabase, l as fetchLatestVersion, lt as FirstTreeHubSDK, m as isInteractive, mt as applyClientLoggerConfig, o as promptUpdate, ot as success, p as uploadClientCapabilities, pt as probeCapabilities, r as registerSaaSConnectCommand, rt as resolveReplyToFromEnv, s as PACKAGE_NAME, st as ClientOrgMismatchError, tt as createOwner, u as installGlobalLatest, ut as SdkError, v as loadOnboardState, w as migrateLocalAgentDirs, x as saveOnboardState, y as onboardCheck, z as installClientService } from "../saas-connect-DX3-nDs9.mjs";
3
+ import { $ as formatStaleReason, A as checkDocker, B as isServiceSupported, C as createApiNameResolver, D as checkBackgroundService, E as checkAgentConfigs, F as checkWebSocket, H as restartClientService, I as printResults, J as stopPostgres, L as reconcileAgentConfigs, M as checkServerConfig, N as checkServerHealth, O as checkClientConfig, P as checkServerReachable, Q as findStaleAliases, R as getClientServiceStatus, S as runHomeMigration, T as runMigrations, U as startClientService, W as stopClientService, X as handleClientOrgMismatch, Y as ClientRuntime, _ as formatCheckReport, a as declineUpdate, at as fail, b as onboardCreate, c as detectInstallMode, ct as ClientUserMismatchError, d as startServer, dt as SessionRegistry, et as removeLocalAgent, f as reconcileLocalRuntimeProviders, ft as cleanWorkspaces, g as promptMissingFields, h as promptAddAgent, ht as configureClientLoggerForService, i as createExecuteUpdate, it as resolveSenderName, j as checkNodeVersion, k as checkDatabase, l as fetchLatestVersion, lt as FirstTreeHubSDK, m as isInteractive, mt as applyClientLoggerConfig, o as promptUpdate, ot as success, p as uploadClientCapabilities, pt as probeCapabilities, r as registerSaaSConnectCommand, rt as resolveReplyToFromEnv, s as PACKAGE_NAME, st as ClientOrgMismatchError, tt as createOwner, u as installGlobalLatest, ut as SdkError, v as loadOnboardState, w as migrateLocalAgentDirs, x as saveOnboardState, y as onboardCheck, z as installClientService } from "../saas-connect-DgCSZ8Yk.mjs";
4
4
  import "../logger-core-BTmvdflj-DjW8FM4T.mjs";
5
5
  import { C as resetConfigMeta, E as setConfigValue, S as resetConfig, T as serverConfigSchema, _ as getConfigValue, a as ensureFreshAdminToken, c as resolveServerUrl, d as DEFAULT_CONFIG_DIR, f as DEFAULT_DATA_DIR, h as clientConfigSchema, i as ensureFreshAccessToken, l as saveAgentConfig, m as agentConfigSchema, o as loadCredentials, p as DEFAULT_HOME_DIR, v as initConfig, w as resolveConfigReadonly, x as readConfigFile, y as loadAgents } from "../bootstrap-C15ZBOCC.mjs";
6
6
  import { a as print, n as CLI_USER_AGENT, o as setJsonMode, r as COMMAND_VERSION, t as cliFetch } from "../cli-fetch--tiwKm5S.mjs";
7
- import "../dist-1XGLJMOq.mjs";
8
- import { n as bindFeishuUser, t as bindFeishuBot } from "../feishu-BGx71p5s.mjs";
9
- import "../errors-LPcARA4K-Dbrptiyz.mjs";
7
+ import "../dist-DmYxT5Kb.mjs";
8
+ import { n as bindFeishuUser, t as bindFeishuBot } from "../feishu-CCWd-JE4.mjs";
9
+ import "../uuid-DbS_4vFh-iFghv4zA.mjs";
10
10
  import "../src-DNBS5Yjj.mjs";
11
- import "../client-RM_03B_l-DiEIa9xe.mjs";
12
- import "../invitation-DZO4NX3P-BPxTeHf-.mjs";
11
+ import "../client-CZ_VnbEc-CBF46cJd.mjs";
12
+ import "../invitation-D_ENPHyj-5ETiae5r.mjs";
13
13
  import { join } from "node:path";
14
14
  import { existsSync, mkdirSync, readFileSync, readdirSync } from "node:fs";
15
15
  import * as semver from "semver";
@@ -797,7 +797,7 @@ async function resolveAgent(serverUrl, adminToken, agentName) {
797
797
  }
798
798
  function registerChatCommands(program) {
799
799
  const chat = program.command("chat").description("Chats and messaging — list, history, send, open");
800
- chat.command("send <target> [message]").description("Send a message to an agent or chat").option("-f, --format <format>", "Message format (text|markdown|card)", "text").option("--chat", "Treat target as chat ID instead of agent ID").option("-m, --metadata <json>", "JSON metadata to attach").option("--reply-to <messageId>", "Message ID to reply to").option("--reply-to-inbox <inboxId>", "Cross-chat reply target inbox").option("--reply-to-chat <chatId>", "Cross-chat reply target chat").option("--agent <name>", "Agent name on the Hub (default: first configured on this client)").action(async (target, message, options) => {
800
+ chat.command("send <agentName> [message]").description("Send a message to an agent. Defaults to your current chat; use --direct for a side conversation.").option("-f, --format <format>", "Message format (text|markdown|card)", "text").option("--direct", "Open or reuse a direct chat with the recipient (bypass member check). Use only when intentionally starting a side conversation with a non-member.").option("-m, --metadata <json>", "JSON metadata to attach").option("--reply-to <messageId>", "Message ID to reply to").option("--reply-to-inbox <inboxId>", "Cross-chat reply target inbox").option("--reply-to-chat <chatId>", "Cross-chat reply target chat").option("--agent <name>", "Agent name on the Hub (default: first configured on this client)").action(async (agentName, message, options) => {
801
801
  try {
802
802
  const content = message ?? await readStdin();
803
803
  if (!content) fail("NO_MESSAGE", "No message provided. Pass as argument or pipe via stdin.", 2);
@@ -811,21 +811,13 @@ function registerChatCommands(program) {
811
811
  replyToInbox: options.replyToInbox,
812
812
  replyToChat: options.replyToChat
813
813
  });
814
- const sdk = createSdk(options.agent);
815
- if (options.chat) success(await sdk.sendMessage(target, {
814
+ success(await createSdk(options.agent).sendToAgent(agentName, {
816
815
  format: options.format,
817
816
  content,
818
817
  metadata,
819
- inReplyTo: options.replyTo,
820
818
  replyToInbox,
821
- replyToChat
822
- }));
823
- else success(await sdk.sendToAgent(target, {
824
- format: options.format,
825
- content,
826
- metadata,
827
- replyToInbox,
828
- replyToChat
819
+ replyToChat,
820
+ direct: options.direct ?? false
829
821
  }));
830
822
  } catch (error) {
831
823
  handleSdkError(error);
@@ -1,7 +1,7 @@
1
1
  import "./observability-BAScT_5S-BcW9HgkG.mjs";
2
2
  import "./logger-core-BTmvdflj-DjW8FM4T.mjs";
3
- import "./dist-1XGLJMOq.mjs";
4
- import "./errors-LPcARA4K-Dbrptiyz.mjs";
3
+ import "./dist-DmYxT5Kb.mjs";
4
+ import "./uuid-DbS_4vFh-iFghv4zA.mjs";
5
5
  import "./src-DNBS5Yjj.mjs";
6
- import { J as listMyPinnedAgents } from "./client-RM_03B_l-DiEIa9xe.mjs";
6
+ import { St as listMyPinnedAgents } from "./client-CZ_VnbEc-CBF46cJd.mjs";
7
7
  export { listMyPinnedAgents };