@agent-team-foundation/first-tree-hub 0.3.2 → 0.3.3

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.
@@ -167,7 +167,7 @@ function buildZodSchema(shape) {
167
167
  const zodShape = {};
168
168
  for (const [key, value] of Object.entries(shape)) if (isFieldDef(value)) zodShape[key] = value.schema;
169
169
  else if (isOptionalGroup(value)) zodShape[key] = buildZodSchema(value.shape).optional();
170
- else if (typeof value === "object" && value !== null) zodShape[key] = buildZodSchema(value).default({});
170
+ else if (typeof value === "object" && value !== null) zodShape[key] = buildZodSchema(value).prefault({});
171
171
  return z.object(zodShape);
172
172
  }
173
173
  function resetConfigMeta() {}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { _ as resetConfig, b as serverConfigSchema, c as DEFAULT_CONFIG_DIR, d as clientConfigSchema, g as readConfigFile, h as loadAgents, l as DEFAULT_DATA_DIR, m as initConfig, o as resolveAgentToken, p as getConfigValue, s as resolveServerUrl, t as bootstrapToken, u as agentConfigSchema, v as resetConfigMeta, x as setConfigValue } from "../bootstrap-B9JsJR3Z.mjs";
3
- import { A as ClientRuntime, B as registerBuiltinHandlers, C as checkWebSocket, F as SdkError, I as SessionRegistry, L as cleanWorkspaces, M as AgentSlot, N as DEFAULT_WORKSPACE_TTL_MS, P as FirstTreeHubSDK, R as getHandlerFactory, S as checkServerReachable, V as createAdminUser, _ as checkDocker, a as formatCheckReport, b as checkServerConfig, c as onboardContinue, d as runMigrations, f as checkAgentConfigs, g as checkDatabase, h as checkContextTreeRepo, i as promptMissingFields, j as AgentRuntime, k as stopPostgres, l as onboardCreate, m as checkClientConfig, n as isInteractive, o as loadOnboardState, p as checkAgentTokens, r as promptAddAgent, s as onboardCheck, t as startServer, u as saveOnboardState, v as checkGitHubToken, w as printResults, x as checkServerHealth, y as checkNodeVersion, z as loadRuntimeConfig } from "../core-vR5jYKHZ.mjs";
2
+ import { _ as resetConfig, b as serverConfigSchema, c as DEFAULT_CONFIG_DIR, d as clientConfigSchema, g as readConfigFile, h as loadAgents, l as DEFAULT_DATA_DIR, m as initConfig, o as resolveAgentToken, p as getConfigValue, s as resolveServerUrl, t as bootstrapToken, u as agentConfigSchema, v as resetConfigMeta, x as setConfigValue } from "../bootstrap-waEJYq3g.mjs";
3
+ import { A as ClientRuntime, B as registerBuiltinHandlers, C as checkWebSocket, F as SdkError, I as SessionRegistry, L as cleanWorkspaces, M as AgentSlot, N as DEFAULT_WORKSPACE_TTL_MS, P as FirstTreeHubSDK, R as getHandlerFactory, S as checkServerReachable, V as createAdminUser, _ as checkDocker, a as formatCheckReport, b as checkServerConfig, c as onboardContinue, d as runMigrations, f as checkAgentConfigs, g as checkDatabase, h as checkContextTreeRepo, i as promptMissingFields, j as AgentRuntime, k as stopPostgres, l as onboardCreate, m as checkClientConfig, n as isInteractive, o as loadOnboardState, p as checkAgentTokens, r as promptAddAgent, s as onboardCheck, t as startServer, u as saveOnboardState, v as checkGitHubToken, w as printResults, x as checkServerHealth, y as checkNodeVersion, z as loadRuntimeConfig } from "../core-Bl6djdPd.mjs";
4
4
  import { n as bindFeishuUser, t as bindFeishuBot } from "../feishu-Y4m2zFc3.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import { Command } from "commander";
@@ -460,7 +460,7 @@ function registerHistoryCommand(program) {
460
460
  async function promptMissing(args) {
461
461
  let ghUsername = null;
462
462
  try {
463
- const { getGitHubUsername } = await import("../bootstrap-B9JsJR3Z.mjs").then((n) => n.n);
463
+ const { getGitHubUsername } = await import("../bootstrap-waEJYq3g.mjs").then((n) => n.n);
464
464
  ghUsername = getGitHubUsername();
465
465
  } catch {}
466
466
  if (!args.id) {
@@ -518,7 +518,7 @@ async function promptMissing(args) {
518
518
  }
519
519
  }
520
520
  if (!args.server) try {
521
- const { resolveServerUrl } = await import("../bootstrap-B9JsJR3Z.mjs").then((n) => n.n);
521
+ const { resolveServerUrl } = await import("../bootstrap-waEJYq3g.mjs").then((n) => n.n);
522
522
  resolveServerUrl();
523
523
  } catch {
524
524
  args.server = await input({ message: "Hub server URL:" });
@@ -1,4 +1,4 @@
1
- import { a as getGitHubUsername, b as serverConfigSchema, c as DEFAULT_CONFIG_DIR, d as clientConfigSchema, f as collectMissingPrompts, h as loadAgents, m as initConfig, r as checkBootstrapStatus, s as resolveServerUrl, t as bootstrapToken$1, u as agentConfigSchema, x as setConfigValue, y as resolveConfigReadonly } from "./bootstrap-B9JsJR3Z.mjs";
1
+ import { a as getGitHubUsername, b as serverConfigSchema, c as DEFAULT_CONFIG_DIR, d as clientConfigSchema, f as collectMissingPrompts, h as loadAgents, m as initConfig, r as checkBootstrapStatus, s as resolveServerUrl, t as bootstrapToken$1, u as agentConfigSchema, x as setConfigValue, y as resolveConfigReadonly } from "./bootstrap-waEJYq3g.mjs";
2
2
  import { ZodError, z } from "zod";
3
3
  import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join, resolve } from "node:path";
@@ -1451,12 +1451,12 @@ const sessionConfigSchema = z.object({
1451
1451
  const agentSlotConfigSchema = z.object({
1452
1452
  token: z.string().min(1),
1453
1453
  type: z.string().min(1),
1454
- session: sessionConfigSchema.default({}),
1454
+ session: sessionConfigSchema.prefault({}),
1455
1455
  concurrency: z.number().int().positive().default(5)
1456
1456
  });
1457
1457
  const runtimeConfigSchema = z.object({
1458
- server: z.string().url().default("http://localhost:8000"),
1459
- agents: z.record(agentSlotConfigSchema).refine((agents) => Object.keys(agents).length > 0, "At least one agent must be defined")
1458
+ server: z.url().default("http://localhost:8000"),
1459
+ agents: z.record(z.string(), agentSlotConfigSchema).refine((agents) => Object.keys(agents).length > 0, "At least one agent must be defined")
1460
1460
  });
1461
1461
  function expandEnvVars(value) {
1462
1462
  return value.replace(/\$\{([^}]+)\}/g, (_, name) => {
@@ -2813,12 +2813,12 @@ const adapterStatusSchema = z.enum(["active", "inactive"]);
2813
2813
  const createAdapterConfigSchema = z.object({
2814
2814
  platform: adapterPlatformSchema,
2815
2815
  agentId: z.string().min(1),
2816
- credentials: z.record(z.unknown()),
2816
+ credentials: z.record(z.string(), z.unknown()),
2817
2817
  status: adapterStatusSchema.default("active")
2818
2818
  });
2819
2819
  const updateAdapterConfigSchema = z.object({
2820
2820
  agentId: z.string().min(1).optional(),
2821
- credentials: z.record(z.unknown()).optional(),
2821
+ credentials: z.record(z.string(), z.unknown()).optional(),
2822
2822
  status: adapterStatusSchema.optional()
2823
2823
  });
2824
2824
  z.object({
@@ -2917,7 +2917,7 @@ z.object({
2917
2917
  type: agentTypeSchema,
2918
2918
  displayName: z.string().max(200).optional(),
2919
2919
  organizationId: z.string().max(100).optional(),
2920
- metadata: z.record(z.unknown()).optional()
2920
+ metadata: z.record(z.string(), z.unknown()).optional()
2921
2921
  });
2922
2922
  z.object({
2923
2923
  syncedAt: z.string(),
@@ -2946,7 +2946,7 @@ z.object({
2946
2946
  treePath: z.string().nullable(),
2947
2947
  inboxId: z.string(),
2948
2948
  status: z.string(),
2949
- metadata: z.record(z.unknown()),
2949
+ metadata: z.record(z.string(), z.unknown()),
2950
2950
  presenceStatus: presenceStatusSchema.optional(),
2951
2951
  createdAt: z.string(),
2952
2952
  updatedAt: z.string()
@@ -2983,7 +2983,7 @@ const createChatSchema = z.object({
2983
2983
  type: chatTypeSchema,
2984
2984
  topic: z.string().max(500).optional(),
2985
2985
  participantIds: z.array(z.string()).min(1),
2986
- metadata: z.record(z.unknown()).optional()
2986
+ metadata: z.record(z.string(), z.unknown()).optional()
2987
2987
  });
2988
2988
  const chatParticipantSchema = z.object({
2989
2989
  agentId: z.string(),
@@ -2997,7 +2997,7 @@ z.object({
2997
2997
  type: z.string(),
2998
2998
  topic: z.string().nullable(),
2999
2999
  lifecyclePolicy: z.string().nullable().optional(),
3000
- metadata: z.record(z.unknown()),
3000
+ metadata: z.record(z.string(), z.unknown()),
3001
3001
  createdAt: z.string(),
3002
3002
  updatedAt: z.string()
3003
3003
  }).extend({ participants: z.array(chatParticipantSchema) });
@@ -3020,7 +3020,7 @@ const messageFormatSchema = z.enum([
3020
3020
  const sendMessageSchema = z.object({
3021
3021
  format: messageFormatSchema.default("text"),
3022
3022
  content: z.unknown(),
3023
- metadata: z.record(z.unknown()).optional(),
3023
+ metadata: z.record(z.string(), z.unknown()).optional(),
3024
3024
  inReplyTo: z.string().optional(),
3025
3025
  replyToInbox: z.string().optional(),
3026
3026
  replyToChat: z.string().optional()
@@ -3028,7 +3028,7 @@ const sendMessageSchema = z.object({
3028
3028
  const sendToAgentSchema = z.object({
3029
3029
  format: messageFormatSchema.default("text"),
3030
3030
  content: z.unknown(),
3031
- metadata: z.record(z.unknown()).optional(),
3031
+ metadata: z.record(z.string(), z.unknown()).optional(),
3032
3032
  replyToInbox: z.string().optional(),
3033
3033
  replyToChat: z.string().optional()
3034
3034
  });
@@ -3038,7 +3038,7 @@ const messageSchema = z.object({
3038
3038
  senderId: z.string(),
3039
3039
  format: z.string(),
3040
3040
  content: z.unknown(),
3041
- metadata: z.record(z.unknown()),
3041
+ metadata: z.record(z.string(), z.unknown()),
3042
3042
  replyToInbox: z.string().nullable(),
3043
3043
  replyToChat: z.string().nullable(),
3044
3044
  inReplyTo: z.string().nullable(),
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as getGitHubUsername, i as getGitHubToken, o as resolveAgentToken, r as checkBootstrapStatus, s as resolveServerUrl, t as bootstrapToken } from "./bootstrap-B9JsJR3Z.mjs";
2
- import { A as ClientRuntime, C as checkWebSocket, D as ensurePostgres, E as status, F as SdkError, H as hasAdminUser, O as isDockerAvailable, P as FirstTreeHubSDK, S as checkServerReachable, T as blank, V as createAdminUser, _ as checkDocker, a as formatCheckReport, b as checkServerConfig, c as onboardContinue, d as runMigrations, f as checkAgentConfigs, g as checkDatabase, h as checkContextTreeRepo, i as promptMissingFields, k as stopPostgres, l as onboardCreate, m as checkClientConfig, n as isInteractive, p as checkAgentTokens, r as promptAddAgent, s as onboardCheck, t as startServer, v as checkGitHubToken, w as printResults, x as checkServerHealth, y as checkNodeVersion } from "./core-vR5jYKHZ.mjs";
1
+ import { a as getGitHubUsername, i as getGitHubToken, o as resolveAgentToken, r as checkBootstrapStatus, s as resolveServerUrl, t as bootstrapToken } from "./bootstrap-waEJYq3g.mjs";
2
+ import { A as ClientRuntime, C as checkWebSocket, D as ensurePostgres, E as status, F as SdkError, H as hasAdminUser, O as isDockerAvailable, P as FirstTreeHubSDK, S as checkServerReachable, T as blank, V as createAdminUser, _ as checkDocker, a as formatCheckReport, b as checkServerConfig, c as onboardContinue, d as runMigrations, f as checkAgentConfigs, g as checkDatabase, h as checkContextTreeRepo, i as promptMissingFields, k as stopPostgres, l as onboardCreate, m as checkClientConfig, n as isInteractive, p as checkAgentTokens, r as promptAddAgent, s as onboardCheck, t as startServer, v as checkGitHubToken, w as printResults, x as checkServerHealth, y as checkNodeVersion } from "./core-Bl6djdPd.mjs";
3
3
  import { n as bindFeishuUser, t as bindFeishuBot } from "./feishu-Y4m2zFc3.mjs";
4
4
  export { ClientRuntime, FirstTreeHubSDK, SdkError, bindFeishuBot, bindFeishuUser, blank, bootstrapToken, checkAgentConfigs, checkAgentTokens, checkBootstrapStatus, checkClientConfig, checkContextTreeRepo, checkDatabase, checkDocker, checkGitHubToken, checkNodeVersion, checkServerConfig, checkServerHealth, checkServerReachable, checkWebSocket, createAdminUser, ensurePostgres, formatCheckReport, getGitHubToken, getGitHubUsername, hasAdminUser, isDockerAvailable, isInteractive, onboardCheck, onboardContinue, onboardCreate, printResults, promptAddAgent, promptMissingFields, resolveAgentToken, resolveServerUrl, runMigrations, startServer, status, stopPostgres };