trekoon 0.2.4 → 0.2.6

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.
@@ -42,6 +42,15 @@ Fail fast if the envelope reports `recoveryRequired`, a storage mismatch, or any
42
42
  bootstrap error. In linked worktrees, `sharedStorageRoot` may differ from
43
43
  `worktreeRoot`; that is expected because the repo shares one DB across checkouts.
44
44
 
45
+ If the session envelope shows `behind > 0`, pull before claiming any task:
46
+
47
+ ```bash
48
+ trekoon --toon sync pull --from main
49
+ ```
50
+
51
+ This syncs tracker events (not git commits) from the source branch so task
52
+ states, dependencies, and subtrees are up to date before you start work.
53
+
45
54
  ### 2. Claim work explicitly
46
55
 
47
56
  ```bash
package/README.md CHANGED
@@ -608,16 +608,18 @@ Path behavior:
608
608
  - `--to <path>` overrides the editor root for link creation only.
609
609
  - `--to` does **not** move or copy `SKILL.md` to that path.
610
610
  - By default, link targets must resolve inside the current working directory root.
611
+ - Editor symlinks are written with relative targets so repo-local links survive
612
+ moving the repository.
611
613
  - Use `--allow-outside-repo` only for intentional external links.
612
614
  - When override is used, install prints a warning and includes confirmation
613
615
  fields in machine output.
614
616
  - Re-running install is idempotent: it refreshes `SKILL.md` and reuses/replaces
615
617
  the same symlink target.
616
618
  - `trekoon skills update` is idempotent: it refreshes canonical
617
- `.agents/skills/trekoon/SKILL.md` and reports default link states for
618
- opencode/claude/pi as `missing`, `valid`, or `conflict`.
619
- - Update does not mutate default links; conflicts are reported with actionable
620
- path context.
619
+ `.agents/skills/trekoon/SKILL.md` and creates or refreshes default editor
620
+ links when their config directories exist.
621
+ - Update skips editors with no config dir and leaves conflicts untouched while
622
+ reporting actionable path context.
621
623
  - If the link destination exists as a non-link path, install fails with an
622
624
  actionable conflict error.
623
625
 
@@ -628,7 +630,7 @@ How `--to` works (step-by-step):
628
630
  2. If `--link` is present, Trekoon creates a `trekoon` symlink directory entry.
629
631
  3. `--to <path>` sets the symlink root directory.
630
632
  4. Final link path is:
631
- - `<resolved-to-path>/trekoon -> <cwd>/.agents/skills/trekoon`
633
+ - `<resolved-to-path>/trekoon -> <relative path to <cwd>/.agents/skills/trekoon>`
632
634
 
633
635
  Example:
634
636
 
@@ -640,7 +642,7 @@ This produces:
640
642
 
641
643
  - `<cwd>/.agents/skills/trekoon/SKILL.md` (copied file)
642
644
  - `<cwd>/.custom-editor/skills/trekoon` (symlink)
643
- - symlink target: `<cwd>/.agents/skills/trekoon`
645
+ - symlink target: relative path to `<cwd>/.agents/skills/trekoon`
644
646
 
645
647
  Trekoon does not mutate global editor config directories.
646
648
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trekoon",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "AI-first local issue tracker CLI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -215,6 +215,11 @@ function resolveDefaultLinkPath(cwd: string, editor: EditorName): string {
215
215
  return join(resolveLinkRoot(cwd, editor, undefined), "trekoon");
216
216
  }
217
217
 
218
+ function toRelativeSymlinkTarget(linkPath: string, targetPath: string): string {
219
+ const relativeTarget: string = relative(dirname(linkPath), resolve(targetPath));
220
+ return relativeTarget === "" ? "." : relativeTarget;
221
+ }
222
+
218
223
  function resolveEditorConfigDir(cwd: string, editor: EditorName): string {
219
224
  if (editor === "opencode") {
220
225
  return join(cwd, ".opencode");
@@ -279,13 +284,15 @@ function replaceOrCreateSymlink(
279
284
  repoRoot: string,
280
285
  allowOutsideRepo: boolean,
281
286
  ): CliResult | null {
287
+ const symlinkTarget: string = toRelativeSymlinkTarget(linkPath, targetPath);
288
+
282
289
  if (!existsSync(linkPath)) {
283
290
  mkdirSync(dirname(linkPath), { recursive: true });
284
291
  const boundaryFailure = revalidateLinkParentBoundary(repoRoot, linkPath, allowOutsideRepo);
285
292
  if (boundaryFailure) {
286
293
  return boundaryFailure;
287
294
  }
288
- symlinkSync(targetPath, linkPath, "dir");
295
+ symlinkSync(symlinkTarget, linkPath, "dir");
289
296
  return null;
290
297
  }
291
298
 
@@ -331,7 +338,7 @@ function replaceOrCreateSymlink(
331
338
  if (boundaryFailure) {
332
339
  return boundaryFailure;
333
340
  }
334
- symlinkSync(targetPath, linkPath, "dir");
341
+ symlinkSync(symlinkTarget, linkPath, "dir");
335
342
  return null;
336
343
  }
337
344
 
@@ -489,6 +496,7 @@ function updateEditorLink(
489
496
  ): UpdateLinkEntry {
490
497
  const linkPath: string = resolveDefaultLinkPath(cwd, editor);
491
498
  const expectedTarget: string = resolve(installedDir);
499
+ const symlinkTarget: string = toRelativeSymlinkTarget(linkPath, expectedTarget);
492
500
  const editorConfigDir: string = resolveEditorConfigDir(cwd, editor);
493
501
 
494
502
  if (!existsSync(editorConfigDir)) {
@@ -504,7 +512,7 @@ function updateEditorLink(
504
512
 
505
513
  if (!existsSync(linkPath)) {
506
514
  mkdirSync(dirname(linkPath), { recursive: true });
507
- symlinkSync(expectedTarget, linkPath, "dir");
515
+ symlinkSync(symlinkTarget, linkPath, "dir");
508
516
  return {
509
517
  editor,
510
518
  linkPath,
@@ -542,7 +550,7 @@ function updateEditorLink(
542
550
  }
543
551
 
544
552
  rmSync(linkPath, { force: true });
545
- symlinkSync(expectedTarget, linkPath, "dir");
553
+ symlinkSync(symlinkTarget, linkPath, "dir");
546
554
  return {
547
555
  editor,
548
556
  linkPath,