opencode-swarm 7.88.4 → 7.90.0

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.
@@ -14,6 +14,15 @@ export interface ProjectIdentity {
14
14
  * Path: {platform-config-dir}/projects/{projectHash}/identity.json
15
15
  */
16
16
  export declare function resolveIdentityPath(projectHash: string): string;
17
+ /**
18
+ * Derive a deterministic project hash from a directory.
19
+ * Uses git remote URL if available, otherwise falls back to absolute path.
20
+ *
21
+ * Worktrees of the same repository share a git remote, so they derive the same
22
+ * hash — which is what lets `/swarm link` (with no name) tie them to one shared
23
+ * knowledge store by default.
24
+ */
25
+ export declare function deriveProjectHash(directory: string): string;
17
26
  /**
18
27
  * Read existing identity.json or return null if it doesn't exist.
19
28
  */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Worktree link suggestion (auto-detect + manual confirm).
3
+ *
4
+ * When a session starts in a repository that has more than one git worktree and
5
+ * this worktree is NOT yet linked to a shared knowledge store, emit a one-time,
6
+ * non-blocking suggestion to run `/swarm link`. Detection is advisory only —
7
+ * sharing is never enabled automatically; the user confirms with `/swarm link`.
8
+ *
9
+ * Safety (AGENTS.md Invariants 1, 3, 8):
10
+ * - Fully fail-open: any error is swallowed; never throws.
11
+ * - Bounded subprocess: array-form `git`, explicit `-C <dir>`, timeout, no shell.
12
+ * - Off the init critical path: callers invoke this fire-and-forget (not awaited).
13
+ * - Suggested-once per session, tracked in a FIFO-bounded module map.
14
+ */
15
+ /** Count worktrees via `git worktree list --porcelain`. Returns 0 on any failure. */
16
+ declare function countWorktrees(directory: string): Promise<number>;
17
+ /**
18
+ * Best-effort, once-per-session suggestion to link this worktree. Never throws.
19
+ * Intended to be called fire-and-forget (not awaited) from the session-start path.
20
+ */
21
+ export declare function maybeSuggestWorktreeLink(directory: string, sessionId: string): Promise<void>;
22
+ export declare const _internals: {
23
+ maybeSuggestWorktreeLink: typeof maybeSuggestWorktreeLink;
24
+ countWorktrees: typeof countWorktrees;
25
+ resetSuggested: () => void;
26
+ };
27
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.88.4",
3
+ "version": "7.90.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,6 +61,10 @@
61
61
  ".opencode/skills/execute",
62
62
  ".opencode/skills/phase-wrap",
63
63
  ".opencode/skills/loop",
64
+ ".opencode/skills/writing-tests",
65
+ ".opencode/skills/running-tests",
66
+ ".opencode/skills/engineering-conventions",
67
+ ".opencode/skills/commit-pr",
64
68
  "tests/fixtures/memory-recall",
65
69
  "README.md",
66
70
  "LICENSE"
@@ -71,6 +75,7 @@
71
75
  "typecheck": "tsc --noEmit",
72
76
  "test": "bun test",
73
77
  "lint": "biome lint .",
78
+ "drift:check": "bun run scripts/drift-check.ts",
74
79
  "format": "biome format . --write",
75
80
  "check": "biome check --write .",
76
81
  "dev": "bun run build && opencode",