@treeseed/cli 0.4.7 → 0.4.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/README.md CHANGED
@@ -19,6 +19,14 @@ npm install @treeseed/cli @treeseed/core @treeseed/sdk
19
19
 
20
20
  `@treeseed/cli` is a thin installable wrapper over `@treeseed/sdk` workflow and operations interfaces plus the `@treeseed/core` runtime namespaces. `treeseed dev` and `treeseed agents ...` resolve and delegate to the tenant-installed or sibling-workspace `@treeseed/core` runtime. In normal consumer installs, npm resolves the runtime dependencies automatically.
21
21
 
22
+ Workflow guarantees:
23
+
24
+ - `treeseed init`, `treeseed config`, and `treeseed release` resolve the project from nested directories and do not rely on the currently checked-out task branch.
25
+ - `treeseed switch` requires a clean worktree before leaving the current branch and creates new task branches from the latest `staging`.
26
+ - `treeseed save` is the canonical checkpoint command: it syncs the current branch with origin, succeeds even when no new changes exist, and can create or refresh preview deployments with `--preview`.
27
+ - `treeseed stage` and `treeseed close` auto-save meaningful uncommitted task-branch changes before merge or cleanup, then leave the repository on `staging`.
28
+ - `treeseed release` completes on `staging` after promoting `staging` into `main` and pushing the release tag.
29
+
22
30
  After installation, the published binary is available as:
23
31
 
24
32
  ```bash
@@ -34,7 +42,7 @@ The main workflow commands exposed by the current CLI are:
34
42
  - `treeseed tasks [--json]`
35
43
  - `treeseed switch <branch-name> [--preview]`
36
44
  - `treeseed dev`
37
- - `treeseed save "<commit message>"`
45
+ - `treeseed save [--preview] "<commit message>"`
38
46
  - `treeseed stage "<resolution message>"`
39
47
  - `treeseed close "<close reason>"`
40
48
  - `treeseed release --major|--minor|--patch`
@@ -51,7 +59,7 @@ treeseed status
51
59
  treeseed config
52
60
  treeseed switch feature/search-improvements --preview
53
61
  treeseed dev
54
- treeseed save "feat: add search filters"
62
+ treeseed save --preview "feat: add search filters"
55
63
  treeseed stage "feat: add search filters"
56
64
  treeseed release --patch
57
65
  treeseed status --json
@@ -11,8 +11,10 @@ const handleClose = async (invocation, context) => {
11
11
  summary: "Treeseed close completed successfully.",
12
12
  facts: [
13
13
  { label: "Closed branch", value: payload.branchName },
14
+ { label: "Auto-saved", value: payload.autoSaved ? "yes" : "no" },
14
15
  { label: "Deprecated tag", value: payload.deprecatedTag.tagName },
15
- { label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" }
16
+ { label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" },
17
+ { label: "Final branch", value: payload.finalBranch }
16
18
  ],
17
19
  nextSteps: renderWorkflowNextSteps(result),
18
20
  report: payload
@@ -14,7 +14,9 @@ const handleRelease = async (invocation, context) => {
14
14
  { label: "Release level", value: payload.level },
15
15
  { label: "Root version", value: payload.rootVersion },
16
16
  { label: "Release tag", value: payload.releaseTag },
17
- { label: "Updated packages", value: payload.touchedPackages.length }
17
+ { label: "Released commit", value: payload.releasedCommit.slice(0, 12) },
18
+ { label: "Updated packages", value: payload.touchedPackages.length },
19
+ { label: "Final branch", value: payload.finalBranch }
18
20
  ],
19
21
  nextSteps: renderWorkflowNextSteps(result),
20
22
  report: payload
@@ -4,18 +4,20 @@ const handleSave = async (invocation, context) => {
4
4
  try {
5
5
  const result = await createWorkflowSdk(context).save({
6
6
  message: invocation.positionals.join(" ").trim(),
7
- hotfix: invocation.args.hotfix === true
7
+ hotfix: invocation.args.hotfix === true,
8
+ preview: invocation.args.preview === true
8
9
  });
9
10
  const payload = result.payload;
10
11
  return guidedResult({
11
12
  command: invocation.commandName || "save",
12
- summary: "Treeseed save completed successfully.",
13
+ summary: payload.noChanges ? "Treeseed save found no new changes and confirmed branch sync." : "Treeseed save completed successfully.",
13
14
  facts: [
14
15
  { label: "Branch", value: payload.branch },
15
16
  { label: "Environment scope", value: payload.scope },
16
17
  { label: "Hotfix", value: payload.hotfix ? "yes" : "no" },
17
18
  { label: "Commit", value: payload.commitSha.slice(0, 12) },
18
- { label: "Preview refreshed", value: payload.previewRefresh ? "yes" : "no" }
19
+ { label: "Commit created", value: payload.commitCreated ? "yes" : "no" },
20
+ { label: "Preview action", value: payload.previewAction?.status ?? "skipped" }
19
21
  ],
20
22
  nextSteps: renderWorkflowNextSteps(result),
21
23
  report: payload
@@ -12,9 +12,11 @@ const handleStage = async (invocation, context) => {
12
12
  facts: [
13
13
  { label: "Merged branch", value: payload.branchName },
14
14
  { label: "Merge target", value: payload.mergeTarget },
15
+ { label: "Auto-saved", value: payload.autoSaved ? "yes" : "no" },
15
16
  { label: "Deprecated tag", value: payload.deprecatedTag.tagName },
16
17
  { label: "Staging wait", value: payload.stagingWait.status },
17
- { label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" }
18
+ { label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" },
19
+ { label: "Final branch", value: payload.finalBranch }
18
20
  ],
19
21
  nextSteps: renderWorkflowNextSteps(result),
20
22
  report: payload
@@ -34,13 +34,14 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
34
34
  handlerName: "switch"
35
35
  })],
36
36
  ["save", command({
37
- usage: "treeseed save [--hotfix] <message> [--json]",
37
+ usage: "treeseed save [--hotfix] [--preview] <message> [--json]",
38
38
  arguments: [{ name: "message", description: "Git commit message for the save operation.", required: true, kind: "message_tail" }],
39
39
  options: [
40
40
  { name: "hotfix", flags: "--hotfix", description: "Allow save on main for an explicit hotfix.", kind: "boolean" },
41
+ { name: "preview", flags: "--preview", description: "Create or refresh the branch preview during save.", kind: "boolean" },
41
42
  { name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
42
43
  ],
43
- examples: ['treeseed save "feat: add search filters"', 'treeseed save --hotfix "fix: unblock production form submit"'],
44
+ examples: ['treeseed save "feat: add search filters"', 'treeseed save --preview "feat: add search filters"', 'treeseed save --hotfix "fix: unblock production form submit"'],
44
45
  executionMode: "handler",
45
46
  handlerName: "save"
46
47
  })],
@@ -49,6 +50,7 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
49
50
  arguments: [{ name: "message", description: "Reason for closing the task without staging it.", required: true, kind: "message_tail" }],
50
51
  options: [{ name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }],
51
52
  examples: ['treeseed close "superseded by feature/search-v2"'],
53
+ notes: ["Auto-saves meaningful uncommitted task-branch changes before cleanup unless disabled in the workflow API."],
52
54
  executionMode: "handler",
53
55
  handlerName: "close"
54
56
  })],
@@ -57,6 +59,7 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
57
59
  arguments: [{ name: "message", description: "Resolution message for the staged task.", required: true, kind: "message_tail" }],
58
60
  options: [{ name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }],
59
61
  examples: ['treeseed stage "feat: add search filters"'],
62
+ notes: ["Auto-saves meaningful uncommitted task-branch changes before merging into staging."],
60
63
  executionMode: "handler",
61
64
  handlerName: "stage"
62
65
  })],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/cli",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Operator-facing Treeseed CLI package.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
44
44
  },
45
45
  "dependencies": {
46
- "@treeseed/sdk": "^0.4.6"
46
+ "@treeseed/sdk": "^0.4.7"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^24.6.0",