instar 0.28.20 → 0.28.22
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/.claude/skills/setup-wizard/SKILL.md +20 -24
- package/dist/commands/init.js +2 -2
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +27 -22
- package/dist/commands/server.js.map +1 -1
- package/dist/core/CoherenceGate.d.ts +7 -0
- package/dist/core/CoherenceGate.d.ts.map +1 -1
- package/dist/core/CoherenceGate.js +57 -3
- package/dist/core/CoherenceGate.js.map +1 -1
- package/dist/core/CoherenceReviewer.d.ts +2 -0
- package/dist/core/CoherenceReviewer.d.ts.map +1 -1
- package/dist/core/CoherenceReviewer.js.map +1 -1
- package/dist/core/SendGateway.d.ts +13 -3
- package/dist/core/SendGateway.d.ts.map +1 -1
- package/dist/core/SendGateway.js +107 -4
- package/dist/core/SendGateway.js.map +1 -1
- package/dist/core/reviewers/claim-provenance.d.ts.map +1 -1
- package/dist/core/reviewers/claim-provenance.js +11 -1
- package/dist/core/reviewers/claim-provenance.js.map +1 -1
- package/dist/core/reviewers/url-validity.d.ts.map +1 -1
- package/dist/core/reviewers/url-validity.js +12 -1
- package/dist/core/reviewers/url-validity.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -2
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/routes.d.ts +4 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +98 -22
- package/dist/server/routes.js.map +1 -1
- package/dist/threadline/ThreadlineMCPServer.d.ts +4 -0
- package/dist/threadline/ThreadlineMCPServer.d.ts.map +1 -1
- package/dist/threadline/ThreadlineMCPServer.js +7 -1
- package/dist/threadline/ThreadlineMCPServer.js.map +1 -1
- package/dist/threadline/ThreadlineRouter.d.ts +17 -1
- package/dist/threadline/ThreadlineRouter.d.ts.map +1 -1
- package/dist/threadline/ThreadlineRouter.js +64 -5
- package/dist/threadline/ThreadlineRouter.js.map +1 -1
- package/dist/threadline/mcp-stdio-entry.js +2 -0
- package/dist/threadline/mcp-stdio-entry.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +51 -51
- package/upgrades/0.28.10.md +0 -19
- package/upgrades/0.28.11.md +0 -19
- package/upgrades/0.28.13.md +0 -11
- package/upgrades/0.28.15.md +0 -11
- package/upgrades/0.28.20.md +0 -19
- package/upgrades/0.28.5.md +0 -17
- package/upgrades/0.28.7.md +0 -24
- package/upgrades/0.28.8.md +0 -21
- package/upgrades/NEXT.md +0 -17
- /package/upgrades/{0.28.18.md → 0.28.22.md} +0 -0
|
@@ -142,37 +142,25 @@ If they type something else → interpret conversationally and route.
|
|
|
142
142
|
|
|
143
143
|
#### If gh_status="auth-needed"
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Walk the user through auth FIRST:
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
>
|
|
147
|
+
> Let me check if you have agents backed up on GitHub.
|
|
148
|
+
> I need to sign you into GitHub — this opens your browser.
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
```bash
|
|
151
|
+
gh auth login --web --git-protocol https
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
After auth, re-scan and present results.
|
|
151
155
|
|
|
152
156
|
#### If gh_status="unavailable"
|
|
153
157
|
|
|
154
|
-
|
|
155
|
-
> Have you used Instar before on another machine?
|
|
158
|
+
Ask:
|
|
159
|
+
> Have you used Instar before on another machine?
|
|
156
160
|
|
|
157
|
-
If yes:
|
|
161
|
+
If yes: Show install guidance for the platform. After install → auth → scan.
|
|
158
162
|
If no: Continue to fresh install.
|
|
159
163
|
|
|
160
|
-
#### GitHub Device-Code Auth Flow (use this everywhere `gh auth login` is needed)
|
|
161
|
-
|
|
162
|
-
**DO NOT run `gh auth login` synchronously in Bash** — it blocks waiting for the user to visit a URL and the Bash tool buffer hides the prompt. The user will see a frozen command and have no idea what to do.
|
|
163
|
-
|
|
164
|
-
Instead:
|
|
165
|
-
|
|
166
|
-
1. Start `gh auth login --web --git-protocol https` with `run_in_background: true`.
|
|
167
|
-
2. Poll the background output every 2 seconds (BashOutput tool) until you see a line matching `! First copy your one-time code: XXXX-XXXX` and a line containing `https://github.com/login/device`.
|
|
168
|
-
3. Extract the code and URL, then present them to the user conversationally — NOT as raw Bash output:
|
|
169
|
-
> To sign in, visit **https://github.com/login/device** and enter this code: **XXXX-XXXX**
|
|
170
|
-
> I'll wait here until you're done.
|
|
171
|
-
4. Poll `gh auth status` every 5 seconds (foreground, fast). When it exits 0, the user has finished. Stop polling the background process and let it complete on its own.
|
|
172
|
-
5. Confirm: "You're signed in as <username>. Let me check for your agents now."
|
|
173
|
-
|
|
174
|
-
If 5 minutes pass with no auth completion, ask the user if they want to keep waiting or skip GitHub for now.
|
|
175
|
-
|
|
176
164
|
#### Normal fresh install options
|
|
177
165
|
|
|
178
166
|
**If inside a git repo:**
|
|
@@ -1921,7 +1909,15 @@ Wait for user to install, then re-check.
|
|
|
1921
1909
|
gh auth status 2>&1
|
|
1922
1910
|
```
|
|
1923
1911
|
|
|
1924
|
-
If not authenticated,
|
|
1912
|
+
If not authenticated, walk them through it:
|
|
1913
|
+
|
|
1914
|
+
> I need to connect to your GitHub account. This opens your browser for a secure sign-in.
|
|
1915
|
+
|
|
1916
|
+
```bash
|
|
1917
|
+
gh auth login --web --git-protocol https
|
|
1918
|
+
```
|
|
1919
|
+
|
|
1920
|
+
This is an interactive command that opens the browser — run it with `stdio: 'inherit'` so the user sees the auth flow. Wait for it to complete.
|
|
1925
1921
|
|
|
1926
1922
|
**Step 3: Create private repo**
|
|
1927
1923
|
|
package/dist/commands/init.js
CHANGED
|
@@ -1178,7 +1178,7 @@ curl -X POST http://localhost:${port}/feedback \\
|
|
|
1178
1178
|
-d '{"type":"bug","title":"Short description","description":"Full details with context"}'
|
|
1179
1179
|
\`\`\`
|
|
1180
1180
|
|
|
1181
|
-
This routes feedback to the Instar maintainers automatically. Valid types: \`bug\`, \`feature\`, \`improvement\`, \`question\`.
|
|
1181
|
+
This routes feedback to the Instar maintainers automatically. Valid types: \`bug\`, \`feature\`, \`improvement\`, \`question\`, \`hallucination\`.
|
|
1182
1182
|
|
|
1183
1183
|
**NEVER use \`gh issue\`, \`gh api\`, or GitHub CLI to file issues.** The feedback API is your channel.
|
|
1184
1184
|
- View submitted feedback: \`curl http://localhost:${port}/feedback\`
|
|
@@ -3275,7 +3275,7 @@ curl -s -X POST http://localhost:${port}/feedback \\
|
|
|
3275
3275
|
-d '{"type":"bug","title":"CONCISE_TITLE","description":"FULL_CONTEXT_WITH_ERROR_MESSAGES"}'
|
|
3276
3276
|
\`\`\`
|
|
3277
3277
|
|
|
3278
|
-
Types: \`bug\`, \`feature\`, \`improvement\`, \`question\`
|
|
3278
|
+
Types: \`bug\`, \`feature\`, \`improvement\`, \`question\`, \`hallucination\`
|
|
3279
3279
|
|
|
3280
3280
|
**Do not wait for the user to notice.** If a hook throws an error, report it. If a job fails, report it. If the server returns unexpected data, report it. You are not just using instar — you are part of its immune system.
|
|
3281
3281
|
`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA6zCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA6zCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAipItE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -4658,7 +4658,8 @@ export async function startServer(options) {
|
|
|
4658
4658
|
},
|
|
4659
4659
|
});
|
|
4660
4660
|
// Threadline Router — handles threaded cross-agent conversations via relay
|
|
4661
|
-
const threadlineRouter = new ThreadlineRouter(messageRouter, spawnManager, threadResumeMap, messageStore, { localAgent: config.projectName, localMachine: os.hostname() }
|
|
4661
|
+
const threadlineRouter = new ThreadlineRouter(messageRouter, spawnManager, threadResumeMap, messageStore, { localAgent: config.projectName, localMachine: os.hostname() }, null, // autonomyGate
|
|
4662
|
+
messageDelivery);
|
|
4662
4663
|
// Listener Session Manager — warm session for fast relay responses (Phase 2)
|
|
4663
4664
|
const listenerManager = config.threadline?.relayEnabled
|
|
4664
4665
|
? new ListenerSessionManager(config.stateDir, config.authToken ?? '', config.threadline)
|
|
@@ -4873,30 +4874,34 @@ export async function startServer(options) {
|
|
|
4873
4874
|
}
|
|
4874
4875
|
// Check if this message resolves a pending waitForReply request.
|
|
4875
4876
|
// Skip auto-ack messages (they're from us, not a real reply).
|
|
4876
|
-
//
|
|
4877
|
-
// agent name
|
|
4877
|
+
// PR-3: Waiters are now keyed by threadId (unique per conversation)
|
|
4878
|
+
// rather than sender fingerprint or agent name. Fall back to the
|
|
4879
|
+
// legacy fingerprint/name lookup only if no threadId is present,
|
|
4880
|
+
// for compatibility with older senders.
|
|
4878
4881
|
const isAutoAck = textContent.startsWith('Message received.') || textContent.startsWith('Message received,');
|
|
4879
|
-
let waiter = threadlineReplyWaiters.get(
|
|
4882
|
+
let waiter = msg.threadId ? threadlineReplyWaiters.get(msg.threadId) : undefined;
|
|
4880
4883
|
if (!waiter) {
|
|
4881
|
-
//
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4884
|
+
// Legacy fallback: try by sender fingerprint, then by resolved name
|
|
4885
|
+
waiter = threadlineReplyWaiters.get(senderFingerprint);
|
|
4886
|
+
if (!waiter) {
|
|
4887
|
+
const resolvedName = (() => {
|
|
4888
|
+
try {
|
|
4889
|
+
const kaPath = path.join(config.stateDir, 'threadline', 'known-agents.json');
|
|
4890
|
+
const kaData = JSON.parse(fs.readFileSync(kaPath, 'utf-8'));
|
|
4891
|
+
const agents = kaData.agents ?? kaData;
|
|
4892
|
+
if (Array.isArray(agents)) {
|
|
4893
|
+
const match = agents.find((a) => a.publicKey === senderFingerprint || a.publicKey?.startsWith(senderFingerprint));
|
|
4894
|
+
return match?.name ?? null;
|
|
4895
|
+
}
|
|
4896
|
+
return null;
|
|
4891
4897
|
}
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
waiter = threadlineReplyWaiters.get(resolvedName);
|
|
4898
|
+
catch {
|
|
4899
|
+
return null;
|
|
4900
|
+
}
|
|
4901
|
+
})();
|
|
4902
|
+
if (resolvedName)
|
|
4903
|
+
waiter = threadlineReplyWaiters.get(resolvedName);
|
|
4904
|
+
}
|
|
4900
4905
|
}
|
|
4901
4906
|
if (waiter && !isAutoAck) {
|
|
4902
4907
|
waiter.resolve(textContent);
|