@treeseed/cli 0.8.8 → 0.8.10

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.
@@ -128,7 +128,7 @@ function renderConfigResult(commandName, result) {
128
128
  const resourceInventoryByScope = payload.result?.resourceInventoryByScope ?? payload.resourceInventoryByScope ?? {};
129
129
  const secretSession = payload.secretSession;
130
130
  const sharedStorageMigrations = payload.result?.sharedStorageMigrations;
131
- const summary = payload.mode === "print-env-only" ? "Treeseed config environment report completed." : payload.mode === "rotate-machine-key" ? "Treeseed machine key rotated successfully." : payload.mode === "connect-market" ? "Knowledge Coop pairing completed successfully." : payload.mode === "bootstrap-preflight" ? "Treeseed bootstrap verification preflight completed." : payload.mode === "bootstrap" ? "Treeseed platform bootstrap completed successfully." : "Treeseed config completed successfully.";
131
+ const summary = payload.mode === "print-env-only" ? "Treeseed config environment report completed." : payload.mode === "rotate-machine-key" ? "Treeseed machine key rotated successfully." : payload.mode === "connect-market" ? "TreeSeed pairing completed successfully." : payload.mode === "bootstrap-preflight" ? "Treeseed bootstrap verification preflight completed." : payload.mode === "bootstrap" ? "Treeseed platform bootstrap completed successfully." : "Treeseed config completed successfully.";
132
132
  const market = payload.market;
133
133
  return guidedResult({
134
134
  command: commandName,
@@ -42,7 +42,8 @@ function resolveCoreDevEntrypoint(cwd) {
42
42
  }
43
43
  const handleDev = async (invocation, context) => {
44
44
  try {
45
- const watch = invocation.commandName === "dev:watch" || invocation.args.watch === true;
45
+ const feedback = typeof invocation.args.feedback === "string" ? invocation.args.feedback : void 0;
46
+ const watch = feedback !== "off";
46
47
  const passthroughArgs = [];
47
48
  const forwardStringOption = (name, flag) => {
48
49
  const value = invocation.args[name];
@@ -21,7 +21,7 @@ function related(name, why) {
21
21
  return { name, why };
22
22
  }
23
23
  const DEV_RUNTIME_OPTIONS = [
24
- { name: "surface", flags: "--surface <surface>", description: "Select the local dev surface to run.", kind: "enum", values: ["integrated", "web", "api", "manager", "worker", "services"] },
24
+ { name: "surface", flags: "--surface <surface>", description: "Select the local dev surface to run.", kind: "enum", values: ["integrated", "web", "api", "manager", "worker", "agents", "services"] },
25
25
  { name: "host", flags: "--host <host>", description: "Host for the web dev server.", kind: "string" },
26
26
  { name: "port", flags: "--port <port>", description: "Port for the web dev server.", kind: "string" },
27
27
  { name: "apiHost", flags: "--api-host <host>", description: "Host used to construct the local API URL.", kind: "string" },
@@ -939,14 +939,14 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
939
939
  { name: "printEnvOnly", flags: "--print-env-only", description: "Print resolved environment values, check provider connections, and exit without prompting or initializing remote resources.", kind: "boolean" },
940
940
  { name: "showSecrets", flags: "--show-secrets", description: "Print full secret values in environment reports instead of masking them.", kind: "boolean" },
941
941
  { name: "rotateMachineKey", flags: "--rotate-machine-key", description: "Regenerate the local home machine key and re-encrypt stored Treeseed secrets and remote auth sessions.", kind: "boolean" },
942
- { name: "connectMarket", flags: "--connect-market", description: "Pair the current local repo to a Knowledge Coop project and register the hybrid runner connection.", kind: "boolean" },
943
- { name: "marketBaseUrl", flags: "--market-base-url <url>", description: "Knowledge Coop control-plane base URL for --connect-market. Defaults to the active remote host.", kind: "string" },
944
- { name: "marketTeamId", flags: "--market-team-id <id>", description: "Team ID to record in the local Knowledge Coop pairing metadata.", kind: "string" },
945
- { name: "marketTeamSlug", flags: "--market-team-slug <slug>", description: "Team slug to record in the local Knowledge Coop pairing metadata.", kind: "string" },
942
+ { name: "connectMarket", flags: "--connect-market", description: "Pair the current local repo to a TreeSeed project and register the hybrid runner connection.", kind: "boolean" },
943
+ { name: "marketBaseUrl", flags: "--market-base-url <url>", description: "TreeSeed control-plane base URL for --connect-market. Defaults to the active remote host.", kind: "string" },
944
+ { name: "marketTeamId", flags: "--market-team-id <id>", description: "Team ID to record in the local TreeSeed pairing metadata.", kind: "string" },
945
+ { name: "marketTeamSlug", flags: "--market-team-slug <slug>", description: "Team slug to record in the local TreeSeed pairing metadata.", kind: "string" },
946
946
  { name: "marketProjectId", flags: "--market-project-id <id>", description: "Project ID to pair with when using --connect-market.", kind: "string" },
947
- { name: "marketProjectSlug", flags: "--market-project-slug <slug>", description: "Project slug to record in the local Knowledge Coop pairing metadata.", kind: "string" },
948
- { name: "marketProjectApiBaseUrl", flags: "--market-project-api-base-url <url>", description: "Override the project API base URL recorded on the Knowledge Coop project connection.", kind: "string" },
949
- { name: "marketAccessToken", flags: "--market-access-token <token>", description: "Explicit Knowledge Coop access token to use for pairing. Prefer an existing remote session when possible.", kind: "string" },
947
+ { name: "marketProjectSlug", flags: "--market-project-slug <slug>", description: "Project slug to record in the local TreeSeed pairing metadata.", kind: "string" },
948
+ { name: "marketProjectApiBaseUrl", flags: "--market-project-api-base-url <url>", description: "Override the project API base URL recorded on the TreeSeed project connection.", kind: "string" },
949
+ { name: "marketAccessToken", flags: "--market-access-token <token>", description: "Explicit TreeSeed access token to use for pairing. Prefer an existing remote session when possible.", kind: "string" },
950
950
  { name: "rotateRunnerToken", flags: "--rotate-runner-token", description: "Rotate the project runner credential while pairing the local hybrid repo.", kind: "boolean" },
951
951
  { name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
952
952
  ],
@@ -983,7 +983,7 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
983
983
  example("treeseed config --environment local --sync none --non-interactive", "Apply deterministic local config in automation", "Use the resolved current and suggested values without opening the interactive UI."),
984
984
  example("treeseed config --environment staging --print-env-only --show-secrets", "Inspect a resolved environment report", "Print the resolved staging environment with full secret visibility and exit."),
985
985
  example("treeseed config --rotate-machine-key", "Rotate the local secret encryption key", "Regenerate the machine key and re-encrypt locally stored Treeseed secrets."),
986
- example("treeseed config --connect-market --market-project-id kc_proj_123", "Pair a hybrid repo to Knowledge Coop", "Register the current local repo as the hybrid runner connection for an existing Knowledge Coop project.")
986
+ example("treeseed config --connect-market --market-project-id kc_proj_123", "Pair a hybrid repo to TreeSeed", "Register the current local repo as the hybrid runner connection for an existing TreeSeed project.")
987
987
  ],
988
988
  optionDetails: [
989
989
  detail("--full", "Enter the advanced editor directly instead of the startup wizard."),
@@ -1001,7 +1001,7 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1001
1001
  detail("--print-env", "Print the resolved environment values before remote initialization continues."),
1002
1002
  detail("--print-env-only", "Print the environment report and exit without interactive editing or remote initialization."),
1003
1003
  detail("--rotate-machine-key", "Rotate the local machine key used for encrypted Treeseed secret storage."),
1004
- detail("--connect-market", "Pair the current repo to a Knowledge Coop project and store the resulting market connection metadata locally.")
1004
+ detail("--connect-market", "Pair the current repo to a TreeSeed project and store the resulting market connection metadata locally.")
1005
1005
  ],
1006
1006
  automationNotes: [
1007
1007
  "Use `--json` for machine-readable automation, or `--non-interactive` when you want deterministic application without interactive UI.",
@@ -1162,15 +1162,15 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1162
1162
  })],
1163
1163
  ["dev", command({
1164
1164
  options: DEV_RUNTIME_OPTIONS,
1165
- examples: ["treeseed dev", "treeseed dev --reset", "treeseed dev --reset --plan --json", "treeseed dev --surface web --port 4322 --open off"],
1165
+ examples: ["treeseed dev", "treeseed dev --reset", "treeseed dev --reset --plan --json", "treeseed dev --surface api --plan --json", "treeseed dev --surface web --port 4322 --open off"],
1166
1166
  help: {
1167
1167
  longSummary: [
1168
1168
  "Dev starts the unified local Treeseed runtime as a foreground supervisor so you can work against the integrated web, API, and supporting local surfaces.",
1169
- "The command keeps streaming logs and dev events until you press Ctrl+C, receive SIGTERM, or a required surface fails; shutdown stops every service process group it started."
1169
+ "The command keeps streaming logs and dev events until you press Ctrl+C or receive SIGTERM. Required surface failures are restarted with backoff instead of ending the supervisor."
1170
1170
  ],
1171
1171
  beforeYouRun: [
1172
1172
  "Run from the tenant or workspace root you want to develop.",
1173
- "Use `--plan --json` when you want to inspect commands, setup steps, readiness checks, and watched paths without starting services.",
1173
+ "Use `--plan --json` when you want to inspect selected surfaces, commands, setup steps, readiness checks, watched paths, and restart policy without starting services.",
1174
1174
  "Use `--reset` when you want a fresh local D1 database, Mailpit inbox, generated worker bundle, and Wrangler temp output without deleting configuration.",
1175
1175
  "Keep the foreground process running while you test. Press Ctrl+C to stop the supervised stack and free the local ports."
1176
1176
  ],
@@ -1179,12 +1179,15 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1179
1179
  example("treeseed dev --reset", "Start from a fresh local runtime", "Clear disposable local dev state, rerun setup and D1 migrations, then start the dev supervisor."),
1180
1180
  example("treeseed dev --reset --plan --json", "Inspect reset actions", "Emit the reset, setup, readiness, command, and watch plan without deleting local state or starting services."),
1181
1181
  example("treeseed dev --plan --json", "Inspect the runtime plan", "Emit a structured plan with setup steps, commands, ports, URLs, readiness checks, and watch entries."),
1182
+ example("treeseed dev --surface api --plan --json", "Inspect the API surface", "Plan the local API runtime without the web UI."),
1183
+ example("treeseed dev --surface services", "Run processing services explicitly", "Start the API, manager, worker, and agents loop for local service development."),
1182
1184
  example("treeseed dev --surface web --port 4322 --open off", "Run only the web surface", "Start the Astro UI on a specific port without opening a browser."),
1183
1185
  example("trsd dev", "Use the short alias", "Start the same local runtime through the shorter entrypoint."),
1184
1186
  example("treeseed dev --json", "Stream dev events", "Emit newline-delimited events while the long-running dev process supervises local services.")
1185
1187
  ],
1186
1188
  outcomes: [
1187
1189
  "Starts the selected local surfaces, waits for readiness, and then remains attached as the live supervisor.",
1190
+ "Restarts required crashed surfaces with capped exponential backoff and keeps setup/readiness failures alive for retry.",
1188
1191
  "Stops watchers first and then terminates service process groups when the foreground command exits."
1189
1192
  ]
1190
1193
  },
@@ -1217,14 +1220,14 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
1217
1220
  ["test:unit", command({ examples: ["treeseed test:unit"], help: { longSummary: ["Test:unit runs workspace unit tests in dependency order."], examples: [example("treeseed test:unit", "Run unit tests", "Execute the package unit test flow."), example("trsd test:unit", "Use the short alias", "Run the same unit tests via the short entrypoint."), example("treeseed test:unit && treeseed check", "Unit tests then validation", "Combine focused tests with broader tenant validation.")] }, executionMode: "adapter" })],
1218
1221
  ["preflight", command({
1219
1222
  options: [
1220
- { name: "launch", flags: "--launch", description: "Validate managed Knowledge Coop launch prerequisites, provider auth, and required live configuration.", kind: "boolean" }
1223
+ { name: "launch", flags: "--launch", description: "Validate managed TreeSeed launch prerequisites, provider auth, and required live configuration.", kind: "boolean" }
1221
1224
  ],
1222
1225
  examples: ["treeseed preflight", "treeseed preflight --launch"],
1223
1226
  help: {
1224
1227
  longSummary: ["Preflight checks local prerequisites and authentication state before heavier workflows run."],
1225
1228
  examples: [
1226
1229
  example("treeseed preflight", "Run the preflight checklist", "Inspect local prerequisites and auth readiness."),
1227
- example("treeseed preflight --launch", "Validate live launch readiness", "Check managed Knowledge Coop launch prerequisites before creating live GitHub, Cloudflare, and Railway resources."),
1230
+ example("treeseed preflight --launch", "Validate live launch readiness", "Check managed TreeSeed launch prerequisites before creating live GitHub, Cloudflare, and Railway resources."),
1228
1231
  example("trsd preflight", "Use the short alias", "Run the same readiness check via the short entrypoint."),
1229
1232
  example("treeseed preflight && treeseed dev", "Validate before starting local runtime", "Confirm readiness before launching the integrated dev surface.")
1230
1233
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/cli",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "description": "Operator-facing Treeseed CLI package.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  "release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
46
46
  },
47
47
  "dependencies": {
48
- "@treeseed/sdk": "0.8.8",
48
+ "@treeseed/sdk": "0.8.10",
49
49
  "ink": "^7.0.0",
50
50
  "react": "^19.2.5"
51
51
  },