@agent-team-foundation/first-tree-hub 0.3.2 → 0.3.4
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/dist/{bootstrap-B9JsJR3Z.mjs → bootstrap-CPdLNPme.mjs} +5 -5
- package/dist/cli/index.mjs +231 -341
- package/dist/{core-vR5jYKHZ.mjs → core-CZjUVAU-.mjs} +57 -238
- package/dist/index.mjs +2 -2
- package/dist/web/assets/index-BHn3RVzY.js +272 -0
- package/dist/web/index.html +1 -1
- package/package.json +2 -2
- package/dist/web/assets/index-B1dQmYGJ.js +0 -234
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-twds-ZHy.mjs";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
4
3
|
import { dirname, join } from "node:path";
|
|
5
|
-
import { parse, stringify } from "yaml";
|
|
6
4
|
import { randomBytes } from "node:crypto";
|
|
7
|
-
import { homedir } from "node:os";
|
|
8
5
|
import { execSync } from "node:child_process";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { parse, stringify } from "yaml";
|
|
8
|
+
import { homedir } from "node:os";
|
|
9
9
|
//#region ../shared/dist/config/index.mjs
|
|
10
10
|
/** Declare a config field with a Zod schema and optional metadata. */
|
|
11
11
|
function field(schema, options) {
|
|
@@ -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).
|
|
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() {}
|
|
@@ -544,7 +544,7 @@ async function bootstrapToken(serverUrl, agentId, options = {}) {
|
|
|
544
544
|
}
|
|
545
545
|
const data = await res.json();
|
|
546
546
|
if (options.saveTo === "agent" || !options.saveTo) {
|
|
547
|
-
const configDir = join(
|
|
547
|
+
const configDir = join(DEFAULT_CONFIG_DIR, "agents", agentId);
|
|
548
548
|
const configPath = `${configDir}/agent.yaml`;
|
|
549
549
|
mkdirSync(configDir, {
|
|
550
550
|
recursive: true,
|