instar 1.3.168 → 1.3.169
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-31T12:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-31T12:50:17.982Z",
|
|
5
|
+
"instarVersion": "1.3.169",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What to Tell Your User
|
|
7
|
+
|
|
8
|
+
If you run your agent across more than one machine and move a conversation to another one,
|
|
9
|
+
follow-up messages now continue in the same moved conversation instead of starting a new,
|
|
10
|
+
forgetful one each time. Only relevant when the multi-machine session pool is on;
|
|
11
|
+
single-machine agents are unaffected. Nothing to configure.
|
|
12
|
+
|
|
13
|
+
## Summary of New Capabilities
|
|
14
|
+
|
|
15
|
+
- The owner-side forwarded-message handler injects a follow-up into the already-running
|
|
16
|
+
moved session (with the standard message prefix the session expects) instead of
|
|
17
|
+
re-spawning.
|
|
18
|
+
- A session is spawned only when none is running, always under a clean topic-derived
|
|
19
|
+
name, never the already-prefixed stored name.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
- Confirmed in code: the stored session name was the already-prefixed tmux name, which
|
|
24
|
+
the spawn function prefixed again, so an existing session was never found and a
|
|
25
|
+
duplicate was spawned on every follow-up.
|
|
26
|
+
- Wiring, tests/unit/session-pool-activation-wiring.test.ts: the owner-side handler
|
|
27
|
+
injects into a live session before any spawn, uses the Telegram-aware inject plus
|
|
28
|
+
injection tracking, and spawns under a clean topic-derived name.
|
|
29
|
+
- 52 session-pool and adapter tests pass; tsc --noEmit clean.
|
|
30
|
+
- Note: unit-verified; the live confirmation that a moved session answers a follow-up
|
|
31
|
+
correctly follows once the second machine's CLI is logged in.
|
|
32
|
+
- Spec, docs/specs/owner-side-followup-inject.md plus the .eli16.md sibling.
|
|
33
|
+
|
|
34
|
+
## What Changed — a moved conversation now advances on follow-ups instead of duplicating
|
|
35
|
+
|
|
36
|
+
A correctness fix for the multi-machine "move this conversation to my other machine"
|
|
37
|
+
feature. After a conversation moved to the backup machine, the backup correctly started
|
|
38
|
+
it. But the very next message you sent — a normal follow-up — was handled by code that
|
|
39
|
+
always tried to start a session, even though one was already running. Because of how the
|
|
40
|
+
session name was stored and then re-prefixed, it could not find the running session and
|
|
41
|
+
spawned a duplicate instead. So follow-ups landed in fresh, confused sessions rather than
|
|
42
|
+
the moved conversation.
|
|
43
|
+
|
|
44
|
+
This release makes the receiving machine behave like the normal single-machine path: if a
|
|
45
|
+
session for the conversation is already running, the follow-up is delivered straight into
|
|
46
|
+
it; a new session is started only when there isn't one, and always under a clean name so
|
|
47
|
+
the re-prefix problem cannot recur.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Side-Effects Review — owner-side follow-up injects, not re-spawns (bug #13)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `owner-side-followup-inject`
|
|
4
|
+
**Date:** `2026-05-31`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
On the owner machine, the forwarded-message handler (`server.ts` `onAccepted`) now
|
|
11
|
+
injects a follow-up into the already-running moved session instead of unconditionally
|
|
12
|
+
re-spawning. If a live session exists for the topic it calls `injectTelegramMessage` +
|
|
13
|
+
`trackMessageInjection` and returns; otherwise it spawns under a clean
|
|
14
|
+
`topic-${topicId}` name (never the prefixed `getSessionForTopic` value). Closes audit
|
|
15
|
+
#13 (every follow-up spawned a double-prefixed duplicate session, so the moved
|
|
16
|
+
conversation never advanced).
|
|
17
|
+
|
|
18
|
+
## Decision-point inventory
|
|
19
|
+
|
|
20
|
+
- **live session for topic?** `existing && sessionManager.isSessionAlive(existing)` →
|
|
21
|
+
inject + return; else → spawn. Both sides covered by the wiring test (the inject
|
|
22
|
+
decision must precede the spawn IIFE).
|
|
23
|
+
- **spawn name** — always `topic-${topicId}` (clean). The prefixed `getSessionForTopic`
|
|
24
|
+
value is never reused as a spawn name (that was the double-prefix defect).
|
|
25
|
+
|
|
26
|
+
## 1. Over-block
|
|
27
|
+
|
|
28
|
+
**What legitimate inputs does this reject?** None. The single-machine inbound path is
|
|
29
|
+
untouched (this is the `onAccepted` forwarded path, gated past `'dark'`). The first
|
|
30
|
+
forwarded message for a topic still spawns exactly as before (no live session →
|
|
31
|
+
spawn). The only behavior change is that the 2nd+ follow-up now reaches the running
|
|
32
|
+
session instead of spawning a duplicate.
|
|
33
|
+
|
|
34
|
+
## 2. Under-block
|
|
35
|
+
|
|
36
|
+
**What does this still miss?** The injected follow-up carries the topic name but not
|
|
37
|
+
the originating sender's first-name/user-id (the forwarded payload is text-only), so a
|
|
38
|
+
multi-user topic's moved session sees a generic sender on follow-ups. Acceptable for
|
|
39
|
+
continuity; a richer forwarded payload is a separate, smaller gap. Still NOT
|
|
40
|
+
live-verified — the moved session can't run until the mini's Claude is logged in (bug
|
|
41
|
+
#12, pending the user).
|
|
42
|
+
|
|
43
|
+
## 3. Level-of-abstraction fit
|
|
44
|
+
|
|
45
|
+
**Right layer?** Yes. It mirrors the normal inbound dispatch's alive-session branch
|
|
46
|
+
(`injectTelegramMessage`) in the one owner-side place a forwarded message is handled.
|
|
47
|
+
No new method; reuses `isSessionAlive` / `injectTelegramMessage` / `trackMessageInjection`.
|
|
48
|
+
|
|
49
|
+
## 4. Signal vs authority compliance
|
|
50
|
+
|
|
51
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
52
|
+
|
|
53
|
+
No blocking authority. It routes a message to a running session or spawns one; it
|
|
54
|
+
gates nothing and blocks nothing. The spawn IIFE remains best-effort/fail-safe.
|
|
55
|
+
|
|
56
|
+
## 5. Interactions
|
|
57
|
+
|
|
58
|
+
Pairs with bug #2 (the spawn branch still fetches the router's relayed history) and
|
|
59
|
+
bug #7/#8/#11 (forward + ownership). The inject branch short-circuits before the bug-#2
|
|
60
|
+
fetch (a running session already has its context). Idempotent: each follow-up either
|
|
61
|
+
injects into the live session or spawns when there is none.
|
|
62
|
+
|
|
63
|
+
## 6. External surfaces
|
|
64
|
+
|
|
65
|
+
None new. Same cross-machine GET (bug #2) only on the spawn branch. No new route,
|
|
66
|
+
config, or notification. Visible effect: a moved conversation advances on follow-ups
|
|
67
|
+
instead of spawning duplicates.
|
|
68
|
+
|
|
69
|
+
## 7. Rollback cost
|
|
70
|
+
|
|
71
|
+
Low. Revert the `onAccepted` branch to the prior unconditional `spawnSessionForTopic`
|
|
72
|
+
call. No schema, state, or migration.
|
|
73
|
+
|
|
74
|
+
## Conclusion
|
|
75
|
+
|
|
76
|
+
Targeted owner-side dispatch fix; mirrors the proven single-machine alive-session
|
|
77
|
+
inject; removes the double-prefix duplicate-spawn; gated past `'dark'` + fail-safe;
|
|
78
|
+
single-machine path untouched; cheap revert. Honestly scoped: unit-verified, live
|
|
79
|
+
follow-up confirmation pending the mini's Claude login.
|
|
80
|
+
|
|
81
|
+
## Second-pass review (if required)
|
|
82
|
+
|
|
83
|
+
Not required — additive owner-side branch mirroring an already-proven pattern,
|
|
84
|
+
gated + fail-safe, single-machine path unchanged, reversible, no authority. The live
|
|
85
|
+
move-then-follow-up check is the Tier-3 gate after the user's mini login.
|
|
86
|
+
|
|
87
|
+
## Evidence pointers
|
|
88
|
+
|
|
89
|
+
- `tests/unit/session-pool-activation-wiring.test.ts` — inject precedes spawn;
|
|
90
|
+
`injectTelegramMessage` + `trackMessageInjection`; spawn name `topic-${topicId}`;
|
|
91
|
+
no prefixed `getSessionForTopic` spawn name.
|
|
92
|
+
- 52 session-pool + adapter tests green; `tsc --noEmit` clean.
|
|
93
|
+
- Confirmed in code: `registerTopicSession` stores the prefixed tmux name →
|
|
94
|
+
`getSessionForTopic` returns it → `spawnInteractiveSession` re-prefixes →
|
|
95
|
+
`tmuxSessionExists` misses → duplicate spawn per follow-up.
|
|
96
|
+
- Spec: `docs/specs/owner-side-followup-inject.md` (+ `.eli16.md`).
|