@agentsignalnet/claude-plugin 0.2.101 → 0.2.102
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/package.json
CHANGED
package/scripts/inbox-daemon.mjs
CHANGED
|
@@ -202,6 +202,23 @@ function identities() {
|
|
|
202
202
|
dir,
|
|
203
203
|
spool: join(dir, 'inbox-spool.json'),
|
|
204
204
|
handle: stored.handle ?? null,
|
|
205
|
+
/*
|
|
206
|
+
THE CHECKOUT THIS IDENTITY BELONGS TO, and the reason this line is
|
|
207
|
+
worth a comment is that its absence is the drift state.mjs exists
|
|
208
|
+
to prevent.
|
|
209
|
+
|
|
210
|
+
That file says so in its own header: three copies of "where do
|
|
211
|
+
identities live" drifted apart and each drift failed the same
|
|
212
|
+
silent way. This function is a fourth copy, and it had been missing
|
|
213
|
+
`repo` while state.mjs carried it -- so the responder read
|
|
214
|
+
`identity.repo`, got undefined, and ran every session in the plugin
|
|
215
|
+
data directory instead of the code. Nothing failed; `act` mode just
|
|
216
|
+
could not see anything.
|
|
217
|
+
|
|
218
|
+
Unifying the two is the real repair and is not this change: this
|
|
219
|
+
copy has a by-hand branch above that state.mjs has no notion of.
|
|
220
|
+
*/
|
|
221
|
+
repo: stored.repo ?? null,
|
|
205
222
|
});
|
|
206
223
|
}
|
|
207
224
|
} catch {
|
|
@@ -387,7 +404,37 @@ async function considerResponding(watched) {
|
|
|
387
404
|
title: message.title ?? null });
|
|
388
405
|
say(`responder answering ${message.delivery_id} (${config.mode}) from ${verdict.peer ?? 'unknown'}`);
|
|
389
406
|
|
|
390
|
-
|
|
407
|
+
/*
|
|
408
|
+
WHERE THE WORK IS, not where the credential is.
|
|
409
|
+
|
|
410
|
+
This passed `identity.dir`, which is the plugin's data directory --
|
|
411
|
+
`~/.claude/plugins/data/.../agents/AgentSignal-<id>/`, holding agent.json
|
|
412
|
+
and the spool and nothing else. In `answer` mode that is invisible,
|
|
413
|
+
because the session cannot reach a file anyway. In `act` mode it is the
|
|
414
|
+
whole feature: a session told "you may read, search and run commands to
|
|
415
|
+
establish the answer" was sitting in a folder with two JSON files in it,
|
|
416
|
+
unable to see a single line of the code it was asked about.
|
|
417
|
+
|
|
418
|
+
`agent.json` has recorded `repo` all along -- the checkout the identity
|
|
419
|
+
was created in -- and `identities()` surfaces it. It was simply never
|
|
420
|
+
used. Checked before it is trusted, because a repo can be moved or
|
|
421
|
+
deleted after an agent joined, and a cwd that does not exist fails the
|
|
422
|
+
spawn outright rather than degrading.
|
|
423
|
+
*/
|
|
424
|
+
let where = identity.dir;
|
|
425
|
+
if (identity.repo) {
|
|
426
|
+
try {
|
|
427
|
+
if (statSync(identity.repo).isDirectory()) where = identity.repo;
|
|
428
|
+
else complain(`${identity.repo} is not a directory; answering from ${identity.dir}`);
|
|
429
|
+
} catch {
|
|
430
|
+
complain(
|
|
431
|
+
`the repo this agent joined from (${identity.repo}) is gone; ` +
|
|
432
|
+
`answering from ${identity.dir}, where it can see nothing`,
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const child = spawnResponder(message, config, where);
|
|
391
438
|
|
|
392
439
|
/*
|
|
393
440
|
READ WHAT IT SAYS, for two reasons and the second is worse.
|