@voidlabs.gg/voidshift-agents 0.4.5 → 0.5.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.
package/README.md CHANGED
@@ -127,9 +127,18 @@ vsf memory status # the vault and where recall is on
127
127
  vsf memory search WORDS # notes recall would bring up
128
128
  vsf memory try "a prompt" # exactly what recall would add to that prompt
129
129
  vsf memory check # notes missing from INDEX.md, broken links
130
+ vsf memory sync # pull and push the vault through its git remote
130
131
  vsf memory on | off # turn recall on or off
131
132
  ```
132
133
 
134
+ To share the vault between machines, make it a git repository with a remote
135
+ named `origin` (any host; a private repository). `vsf memory sync` commits new
136
+ notes, rebases onto the remote and pushes. It also runs in the background from
137
+ the recall hook when the last sync is over ten minutes old, and the agents
138
+ runner syncs before and after every run. When a note changed on both sides,
139
+ the remote's version stays and this machine's copy is saved beside it as
140
+ `note.conflict-<machine>-<time>.md`, so nothing is lost.
141
+
133
142
  Setup creates a vault at `~/memory` or uses one you already have. Codex asks you
134
143
  to trust the recall hook once: run `/hooks` in Codex.
135
144
 
@@ -180,8 +189,12 @@ pnpm test
180
189
  node packages/cli/src/main.ts
181
190
  ```
182
191
 
183
- Node 22.18 or newer runs the TypeScript sources directly. Releases are cut by
184
- pushing a `v*` tag; CI publishes every package at that version.
192
+ Node 22.18 or newer runs the TypeScript sources directly. Each package
193
+ releases on its own: bump its `package.json` and push `agents-v0.5.0` (or
194
+ `cli-v`, `memory-v`, `awake-v`), and CI publishes only that package. A plain
195
+ `v*` tag publishes all four at one version. Tools declare the CLI contract
196
+ they were built for; a CLI that is too old refuses to load them and says to
197
+ run `vsf update`.
185
198
 
186
199
  ## License
187
200
 
package/dist/index.js CHANGED
@@ -1042,6 +1042,7 @@ const homeCommands = {
1042
1042
  const sameModels = (a, b) => a.dev === b.dev && a.review === b.review;
1043
1043
  const agents = {
1044
1044
  name: 'agents',
1045
+ contract: 1,
1045
1046
  summary: 'Agents for Claude Code and Codex that plan, build and QA Linear cards',
1046
1047
  config: {
1047
1048
  read: (dir) => readAgentsConfig(dir),
package/dist/memory.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare function vaultPath(configDir: string): string | undefined;
2
2
  export declare function recall(selfCommand: string[], configDir: string, text: string): string;
3
+ export declare function syncMemory(selfCommand: string[], configDir: string): string;
package/dist/memory.js CHANGED
@@ -35,3 +35,15 @@ export function recall(selfCommand, configDir, text) {
35
35
  return '';
36
36
  }
37
37
  }
38
+ // Brings the vault up to date through its git remote, or shares the notes
39
+ // agents wrote. Never fails a run: returns a line worth logging, or ''.
40
+ export function syncMemory(selfCommand, configDir) {
41
+ if (!vaultPath(configDir) || !selfCommand.length)
42
+ return '';
43
+ const [cmd, ...args] = selfCommand;
44
+ const r = spawnSync(cmd, [...args, 'memory', 'sync', '--quiet'], { encoding: 'utf8', timeout: 90_000 });
45
+ const out = `${r.stdout ?? ''}${r.stderr ?? ''}`.trim();
46
+ if (r.error)
47
+ return `memory sync did not run (${r.error.message})`;
48
+ return r.status === 0 ? out : out || 'memory sync failed';
49
+ }
package/dist/runner.js CHANGED
@@ -6,7 +6,7 @@ import { lastDue, parseCron } from "./cron.js";
6
6
  import { runAgent, stopAgents } from "./engine.js";
7
7
  import { commitsAhead, enforceCommitPolicy, defaultBranch, ensureDraftPr, ensureWorktree, headSha, markReady, push, resetWorktree, waitForChecks, waitForPrHead } from "./git.js";
8
8
  import { noTracker } from "./tracker.js";
9
- import { recall, vaultPath } from "./memory.js";
9
+ import { recall, syncMemory, vaultPath } from "./memory.js";
10
10
  import { claudeSettingsFile, readRules, rulesSection } from "./profile.js";
11
11
  import { bootTime, clearCurrent, isPaused, ours, readCurrent, readPending, writeCurrent, writePending, writeRun, readCronState, writeCronState } from "./state.js";
12
12
  const stamp = () => new Date().toISOString().replace(/[:.]/g, '-');
@@ -156,6 +156,10 @@ export async function runCard(card, trigger, workflowName, workflow, project, rc
156
156
  throw new Park(`Your agent profile's Claude settings are broken: ${err.message}`);
157
157
  }
158
158
  const rules = rulesSection(readRules(rc.configDir));
159
+ // Latest notes from every machine before recall reads them.
160
+ const pulled = syncMemory(rc.selfCommand, rc.configDir);
161
+ if (pulled)
162
+ say(pulled);
159
163
  const known = [recall(rc.selfCommand, rc.configDir, `${workflow.project} ${card.title}\n${card.description ?? ''}`), vault ? memoryNote(vault) : '', rules].filter(Boolean).join('\n\n');
160
164
  const worktree = join(agentsDir(rc.configDir), 'worktrees', card.identifier);
161
165
  ensureWorktree(project.path, worktree, card.branchName, base);
@@ -336,6 +340,10 @@ export async function runCard(card, trigger, workflowName, workflow, project, rc
336
340
  }
337
341
  finally {
338
342
  active = null;
343
+ // Share whatever notes the agents wrote, whatever the outcome.
344
+ const shared = syncMemory(rc.selfCommand, rc.configDir);
345
+ if (shared)
346
+ say(shared);
339
347
  }
340
348
  }
341
349
  // A scheduled run's stand-in for a card: the task, on a branch of its own.
package/dist/types.d.ts CHANGED
@@ -40,6 +40,7 @@ export type ToolCommand = (args: string[], ctx: ToolContext) => Promise<number>;
40
40
  export interface Tool {
41
41
  name: string;
42
42
  summary: string;
43
+ contract?: number;
43
44
  install(ctx: ToolContext): Promise<void>;
44
45
  uninstall(ctx: ToolContext): Promise<void>;
45
46
  checks(ctx: ToolContext): Promise<Check[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidlabs.gg/voidshift-agents",
3
- "version": "0.4.5",
3
+ "version": "0.5.0",
4
4
  "description": "Agents for Claude Code and Codex that plan, build and QA Linear cards, chained and run in the background.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {