{"_id":"@autosk/merge-to-current","_rev":"3-04034093efe4a0bbe008c4a27609e25a","name":"@autosk/merge-to-current","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@autosk/merge-to-current","version":"0.1.0","keywords":["autosk","autosk-extension","workflow","merge-to-current","git-merge"],"author":{"name":"wierdbytes"},"license":"MIT","_id":"@autosk/merge-to-current@0.1.0","maintainers":[{"name":"wierdbytes","email":"wb@xff.pw"}],"homepage":"https://github.com/wierdbytes/autosk#readme","bugs":{"url":"https://github.com/wierdbytes/autosk/issues"},"dist":{"shasum":"c3b97bb41e243364852eed6149288b0be2ac371e","tarball":"https://registry.npmjs.org/@autosk/merge-to-current/-/merge-to-current-0.1.0.tgz","fileCount":6,"integrity":"sha512-BNveL0Dl3zAahtnfmHJKyXdmoWBbHzTkj9UysNrLlh3+yy31XnpiNK1knUgZaa/ROdB82+iReAhwbQjel3FwXw==","signatures":[{"sig":"MEUCIQDuGhb9UFg0YPnZYEzfHh6uJb5RI7SWFh6hX+tVh7dnfgIgW+nBT14VfKdm/qU0Txupi8QTUG/AicugRWLHLXl6hBM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23663},"type":"module","types":"./index.ts","autosk":{"extensions":["./index.ts"]},"exports":{".":"./index.ts"},"gitHead":"56f204d80575dd94c3232ebe5f76ef4dd507fd4b","scripts":{"typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"wierdbytes","email":"wb@xff.pw"},"repository":{"url":"git+https://github.com/wierdbytes/autosk.git","type":"git","directory":"daemon/extensions/merge-to-current"},"_npmVersion":"11.9.0","description":"Single-step workflow: merge the autosk-managed branch `autosk/<task-id>` into the project's CURRENT branch (non-isolated, fast-forward when possible).","directories":{},"_nodeVersion":"25.6.1","dependencies":{"@autosk/sdk":"^0.1.0","@autosk/pi-agent":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/merge-to-current_0.1.0_1781538853130_0.22727443332302055","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@autosk/merge-to-current","version":"0.1.1","keywords":["autosk","autosk-extension","workflow","merge-to-current","git-merge"],"author":{"name":"wierdbytes"},"license":"MIT","_id":"@autosk/merge-to-current@0.1.1","maintainers":[{"name":"wierdbytes","email":"wb@xff.pw"}],"homepage":"https://github.com/wierdbytes/autosk#readme","bugs":{"url":"https://github.com/wierdbytes/autosk/issues"},"dist":{"shasum":"13105c2be1f01df032a13fd5270f49bfad7748da","tarball":"https://registry.npmjs.org/@autosk/merge-to-current/-/merge-to-current-0.1.1.tgz","fileCount":6,"integrity":"sha512-Yr/sFwnSOdG+P83jlNUqd5kyONc/RfuKF7NkquHJn332BmRly/9ss2Z9MJ8Jl2KrCkFvOMxVhAdpgDcMPNwp5w==","signatures":[{"sig":"MEQCIAhevoE4EeE8Gbpd/3iat9uNtsuvIyBuSHj7PHwNiatlAiBO3Oq25TwJdC61cFMQ+PipSrQ1+zm11LT0G5ln8ZunUw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22412},"type":"module","types":"./index.ts","autosk":{"extensions":["./index.ts"]},"exports":{".":"./index.ts"},"gitHead":"ae74ee0f649fb1769b8d3aa4921bb2acd4c92e8b","scripts":{"typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"wierdbytes","email":"wb@xff.pw"},"repository":{"url":"git+https://github.com/wierdbytes/autosk.git","type":"git","directory":"daemon/extensions/merge-to-current"},"_npmVersion":"11.9.0","description":"Single-step workflow: merge the autosk-managed branch `autosk/<task-id>` into the project's CURRENT branch (non-isolated, fast-forward when possible).","directories":{},"_nodeVersion":"25.6.1","dependencies":{"@autosk/sdk":"^0.1.0","@autosk/pi-agent":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/merge-to-current_0.1.1_1781541601067_0.9458759795179263","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@autosk/merge-to-current","version":"0.1.2","description":"Single-step workflow: merge the autosk-managed branch `autosk/<task-id>` into the project's CURRENT branch (non-isolated, fast-forward when possible).","license":"MIT","author":{"name":"wierdbytes"},"homepage":"https://github.com/wierdbytes/autosk#readme","repository":{"type":"git","url":"git+https://github.com/wierdbytes/autosk.git","directory":"daemon/extensions/merge-to-current"},"bugs":{"url":"https://github.com/wierdbytes/autosk/issues"},"keywords":["autosk","autosk-extension","autosk-workflow"],"type":"module","publishConfig":{"access":"public"},"exports":{".":"./index.ts"},"types":"./index.ts","autosk":{"extensions":["./index.ts"]},"dependencies":{"@autosk/pi-agent":"^0.1.0","@autosk/sdk":"^0.1.0"},"scripts":{"typecheck":"tsc --noEmit -p tsconfig.json"},"gitHead":"6e4189216039fd42317f92d84106b7415ac1e9dd","_id":"@autosk/merge-to-current@0.1.2","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-GyclPwrnRDLNd85lyHVre05Msa2UcfDtMkUukBRG6SbDYJNhFn/Wlj0qYyB+i8dT5fo0kWM6LVVJLNLn5B83LQ==","shasum":"8f78b21197c53feedfea8d6a45763fb0b36d5357","tarball":"https://registry.npmjs.org/@autosk/merge-to-current/-/merge-to-current-0.1.2.tgz","fileCount":6,"unpackedSize":22435,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCAWR6A2cHPShP9hKG+QXkIHqh3hW0FjsaUyoAvtQUolwIhAJUcti8ntQm1yWnVNcstinShgkBmUJ8lhqzBRSFi4ZHe"}]},"_npmUser":{"name":"wierdbytes","email":"wb@xff.pw"},"directories":{},"maintainers":[{"name":"wierdbytes","email":"wb@xff.pw"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/merge-to-current_0.1.2_1782167559486_0.9264747642920477"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T15:54:12.954Z","modified":"2026-06-22T22:32:39.830Z","0.1.0":"2026-06-15T15:54:13.339Z","0.1.1":"2026-06-15T16:40:01.224Z","0.1.2":"2026-06-22T22:32:39.649Z"},"bugs":{"url":"https://github.com/wierdbytes/autosk/issues"},"author":{"name":"wierdbytes"},"license":"MIT","homepage":"https://github.com/wierdbytes/autosk#readme","keywords":["autosk","autosk-extension","autosk-workflow"],"repository":{"type":"git","url":"git+https://github.com/wierdbytes/autosk.git","directory":"daemon/extensions/merge-to-current"},"description":"Single-step workflow: merge the autosk-managed branch `autosk/<task-id>` into the project's CURRENT branch (non-isolated, fast-forward when possible).","maintainers":[{"name":"wierdbytes","email":"wb@xff.pw"}],"readme":"# @autosk/merge-to-current\n\nA single-step autoskd v2 workflow that merges a task's autosk-managed branch\n`autosk/<task-id>` **into the branch the operator currently has checked out**\n(the CURRENT branch), running **non-isolated** in the project's working tree.\n\nIt is the v2 port of the v1 `merge-to-main` export, with one change: the\ndestination is no longer the mainline branch (`main`/`master`) but whatever\n`HEAD` points at — there is no `main`/`master` detection and no branch switch.\n\n## The workflow\n\n```text\nmerge ──▶ done      (the branch landed cleanly on the current branch)\n   └────▶ human     (rolled back; a human must take over)\n```\n\n| Step    | Kind                       | Notes                                                                |\n| ------- | -------------------------- | ------------------------------------------------------------------- |\n| `merge` | `piAgent` (name `merge`)   | first/only step; integrates `autosk/<task-id>` into the current branch |\n\n`done` and `human` are terminal/park statuses the agent transitions to directly\n(they are always-available targets — there is no separate `statusStep`).\n\n- **Sandbox:** none — no agent step passes a `sandbox`, so `merge` runs on the\n  host at the project root and operates directly on the operator's working tree\n  (the whole point of a merge step is to touch the real branch).\n- **Thinking:** the `merge` agent runs at `thinking: \"high\"` (matches the v1\n  export's agent params).\n\n## What the `merge` step does\n\nThe prompt ([`prompts/merge.md`](./prompts/merge.md)) drives `git` directly and\nnever touches the network (no `fetch`/`pull`/`push`):\n\n1. **Verify** the task branch `autosk/<task-id>` exists.\n2. **Auto-commit** any pending edits in the task's worktree onto the task branch\n   first (the worktree is located via `git worktree list --porcelain`). These\n   auto-commits are intentionally **preserved** even if the merge later rolls\n   back.\n3. **Snapshot** the current branch (`DEST = git symbolic-ref --short HEAD`) and\n   **refuse** if HEAD is detached or the project root has a dirty tree. Refuse\n   too if the current branch *is* the task branch.\n4. **Overlap analysis** between the two diff sets; any non-trivial reconciliation\n   parks the task for a human before any merge work.\n5. **Merge:** fast-forward (`git merge --ff-only`) when the current branch has\n   not moved since the fork; otherwise a `--no-ff` merge commit\n   (`git merge --no-commit --no-ff`, with only trivial conflict resolutions\n   allowed).\n6. On success the merge lands on the current branch and the task transitions to\n   `done`; on any failure the current branch is reset to its starting SHA and the\n   task transitions to `human`.\n\nBecause the destination is the current branch, `DEST` is **both** the merge\ntarget and the rollback target — HEAD never leaves it.\n\n## Discovery\n\nThis package is an **npm extension** (declared via\n`package.json#autosk.extensions`). It is **not** part of the first-run bootstrap\n(only `feature-dev` is), so install it explicitly to make the workflow available:\n\n```\nautosk ext add npm:@autosk/merge-to-current  # add to ~/.autosk/settings.json + install\nautosk enroll <task-id> --workflow merge-to-current\n```\n\nA project- or global-level extension that registers a workflow of the same name\n**overrides** the npm one (first-registered wins).\n\n## Configuration\n\nThis package exposes no per-step config knobs of its own — the agent behaviour is\nconfigured on the inline [`@autosk/pi-agent`](../pi-agent) step value (model,\nthinking, extra args, …) inside `mergeToCurrentWorkflow()`. To customise, copy\nthis extension into `~/.autosk/extensions/` (or your project's\n`.autosk/extensions/`) and edit the `piAgent({...})` call or the prompt under\n`prompts/`; your copy then overrides the npm one.\n\n## Exports\n\n- default export — the extension factory (registers the workflow, whose single\n  step carries the inline `merge` agent).\n- `mergeToCurrentWorkflow()` → `WorkflowDefinition`.\n","readmeFilename":"README.md"}