instar 1.3.1997 → 1.3.1998
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/dist/core/AgentLinks.d.ts +70 -0
- package/dist/core/AgentLinks.d.ts.map +1 -0
- package/dist/core/AgentLinks.js +206 -0
- package/dist/core/AgentLinks.js.map +1 -0
- package/dist/core/types.d.ts +8 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +20 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/agentLinkRoutes.d.ts +20 -0
- package/dist/server/agentLinkRoutes.d.ts.map +1 -0
- package/dist/server/agentLinkRoutes.js +48 -0
- package/dist/server/agentLinkRoutes.js.map +1 -0
- package/dist/server/mobilePairingRoutes.d.ts +2 -0
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +49 -0
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/awareness/agent-links.md +9 -0
- package/src/data/builtin-manifest.json +3 -3
- package/src/data/feature-ladders.json +2 -1
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1998.md +30 -0
- package/upgrades/side-effects/permanent-agent-links.md +114 -0
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Permanent agent links
|
|
3
|
+
---
|
|
4
|
+
Optional and off by default: with `agentLinks.enabled: true` in the config (read live, no restart), I can make a link on instar.sh that names this agent by its identity, not by a machine's address, and opens a page (home, a document, or a conversation) in the Instar app on a paired iPhone or Mac. Make one with `curl -s -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"target":"conversation","ref":"<app conversation id or Telegram topic number>"}' http://localhost:{{port}}/agent-links` (targets: `home`, `doc` with `ref` = document id and an optional `comment` key, `conversation`); share the returned `url` like any link.
|
|
5
|
+
|
|
6
|
+
- A link only opens a page. It grants no access: the person needs their own pairing, and the agent still checks access when the page opens.
|
|
7
|
+
- instar.sh stores nothing and never sees which agent or page: that part sits after the `#`. Anyone holding the link (and the chat app that carries it) can read its agent and page ids. A `comment` key also shows who wrote that comment, so add it only when it is needed.
|
|
8
|
+
- A browser without the app gets a page with an "Open in Instar" button; nothing redirects.
|
|
9
|
+
- `warning: split-identity` in the answer means some of my machines hold a different identity, so the link won't open through phones paired only to those machines.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-11-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-11-24T11:08:21.117Z",
|
|
5
|
+
"instarVersion": "1.3.1998",
|
|
6
6
|
"entryCount": 210,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -1596,7 +1596,7 @@
|
|
|
1596
1596
|
"type": "subsystem",
|
|
1597
1597
|
"domain": "server",
|
|
1598
1598
|
"sourcePath": "src/server/AgentServer.ts",
|
|
1599
|
-
"contentHash": "
|
|
1599
|
+
"contentHash": "4b884d805a2a0bd41ea182414ad99b8b457dbb61fc9eba64e93b871366de1c08",
|
|
1600
1600
|
"since": "2025-01-01"
|
|
1601
1601
|
},
|
|
1602
1602
|
"subsystem:session-manager": {
|
|
@@ -254,6 +254,7 @@
|
|
|
254
254
|
{"id": "toneGate.siblingReach", "title": "The outbound check knows what the agent's other machines hold", "flag": {"path": "toneGate.siblingReach.enabled"}, "disposition": "ladder", "final": "default-on", "risk": "standard", "tracking": {"state": "measured", "plan": "Every hint attached to a B21, every override or revision after it, and every overturned or unconfirmed B17 writes one fired row to the shared evidence log from src/server/routes.ts; the fleet decision hand-checks every b17-overturned / b17-unconfirmed row (docs/specs/sibling-machine-reach.md, Maturation plan)."}, "rungs": {"dev-agent-live": {"soakDays": 14, "advance": {"kind": "code"}, "metrics": [{"id": "fired", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "toneGate.siblingReach", "kind": "fired"}, "of": {"featureId": "toneGate.siblingReach"}, "value": "count"}, "direction": "at-least", "threshold": 5, "minSamples": 5, "windowDays": 14}, {"id": "error-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "toneGate.siblingReach", "kind": "error"}, "of": {"featureId": "toneGate.siblingReach"}, "value": "ratio"}, "direction": "at-most", "threshold": 0.1, "minSamples": 10, "windowDays": 14}]}, "fleet": {"soakDays": 14, "advance": {"kind": "code"}, "metrics": [{"id": "fired", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "toneGate.siblingReach", "kind": "fired"}, "of": {"featureId": "toneGate.siblingReach"}, "value": "count"}, "direction": "at-least", "threshold": 5, "minSamples": 5, "windowDays": 14}, {"id": "error-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "toneGate.siblingReach", "kind": "error"}, "of": {"featureId": "toneGate.siblingReach"}, "value": "ratio"}, "direction": "at-most", "threshold": 0.1, "minSamples": 10, "windowDays": 14}]}}, "aliases": []},
|
|
255
255
|
{"id": "local-verify-borrowed-unit-slices", "title": "Borrowed machines practise unit-test slices in a sandbox (shadow only)", "flag": {"path": "monitoring.localVerify.helper.enabled"}, "disposition": "ladder", "final": "default-off-by-preference", "preference": {"decidedBy": "Chief of Staff (maintainer approval of the spec, 2026-11-18 15:08 PST)", "decidedAt": "2026-11-18", "reason": "A helper is someone's personal machine: only its owner enables the helper role, after a plain four-part ask; a maturation score never turns it on.", "ref": "docs/specs/local-verify-borrowed-unit-slices.md Maturation plan (fleet)"}, "risk": "sensitive", "restartNeeded": false, "tracking": {"state": "needed", "plan": "Shadow runs write borrowed-shadow rows (agreement, canary false-green, owner impact) to .instar/logs/local-verify.jsonl. After 20 counted shadow runs per helper (fallback 3 weeks) echo reports to Justin and the throughput session; there is no automatic graduation, and counting results is a separate later spec."}, "rungs": {"dev-agent-live": {"soakDays": 7, "advance": {"kind": "code"}, "metrics": [{"id": "shadow-runs", "role": "ran", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "borrowed-shadow"}, "value": "count"}, "direction": "at-least", "threshold": 20, "minSamples": 1, "windowDays": 21}, {"id": "shadow-client-errors", "role": "harm", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "borrowed-shadow-error"}, "value": "count"}, "direction": "at-most", "threshold": 3, "minSamples": 1, "windowDays": 21}]}}, "aliases": ["monitoring.localVerify.borrowed"]},
|
|
256
256
|
{"id": "local-verify-peer-works-through-restart", "title": "Local Verify helper machine keeps working while the coordinator restarts", "flag": {"path": "monitoring.localVerify.peerWorksThroughRestart.enabled"}, "disposition": "ladder", "final": "default-on", "risk": "sensitive", "restartNeeded": false, "tracking": {"state": "measured", "plan": "The coordinator writes peer-attempt-adopted, lease-changed:* abandons and restart-episode-ended rows to .instar/logs/local-verify.jsonl. The development rung is reviewed after 10 qualifying restart episodes against the 11-16..11-18 baseline (docs/specs/local-verify-peer-works-through-restart.md, Maturation plan); a red main verify after an adopted-import merge raises the review at once."}, "rungs": {"dev-agent-live": {"soakDays": 3, "advance": {"kind": "code"}, "metrics": [{"id": "adopted", "role": "ran", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "peer-attempt-adopted"}, "value": "count"}, "direction": "at-least", "threshold": 1, "minSamples": 1, "windowDays": 14}, {"id": "adoption-wait-lost", "role": "harm", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "peer-attempt-abandoned", "reason": "lease-changed:wait-run-bound"}, "value": "count"}, "direction": "at-most", "threshold": 3, "minSamples": 1, "windowDays": 14}]}, "fleet": {"soakDays": 7, "advance": {"kind": "code"}, "metrics": [{"id": "adopted", "role": "ran", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "peer-attempt-adopted"}, "value": "count"}, "direction": "at-least", "threshold": 1, "minSamples": 1, "windowDays": 14}, {"id": "adoption-wait-lost", "role": "harm", "source": "jsonl-log", "ref": {"file": ".instar/logs/local-verify.jsonl", "where": {"event": "peer-attempt-abandoned", "reason": "lease-changed:wait-run-bound"}, "value": "count"}, "direction": "at-most", "threshold": 3, "minSamples": 1, "windowDays": 14}]}}, "aliases": []},
|
|
257
|
-
{"id": "credentialScrub", "title": "Live keys masked where the agent keeps text (logs, new incoming messages, transcript copies, session records)", "aliases": ["security.credentialScrub.inPlace"], "flag": {"path": "security.credentialScrub.enabled"}, "disposition": "ladder", "final": "default-on", "risk": "sensitive", "tracking": {"state": "needed", "plan": "Dev-gated: live on the development agent, dark on the fleet; the sweeper stays in dry run until inPlace is on. Not yet measured: a later SEC-164 slice adds a featureEvidence fired row per mask (kinds and counts only) and an error row per failed check. Wrong masks are judged by the review script (25 reviewed events, two machines, none wrong), which gates each owner step. Owner: security session."}, "rungs": {"dev-agent-live": {"soakDays": 7, "advance": {"kind": "owner-driver", "driver": "Security session turns inPlace on per machine once pre-flip evidence holds"}, "metrics": [{"id": "masked", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "fired"}, "of": {"featureId": "credentialScrub"}, "value": "count"}, "direction": "at-least", "threshold": 25, "minSamples": 25, "windowDays": 14}, {"id": "failed-check-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "error"}, "of": {"featureId": "credentialScrub"}, "value": "ratio"}, "direction": "at-most", "threshold": 0, "minSamples": 25, "windowDays": 14}]}, "fleet": {"soakDays": 7, "advance": {"kind": "owner-driver", "driver": "Justin's yes on the security session's SEC-164 fleet packet"}, "metrics": [{"id": "masked", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "fired"}, "of": {"featureId": "credentialScrub"}, "value": "count"}, "direction": "at-least", "threshold": 25, "minSamples": 25, "windowDays": 14}, {"id": "failed-check-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "error"}, "of": {"featureId": "credentialScrub"}, "value": "ratio"}, "direction": "at-most", "threshold": 0, "minSamples": 25, "windowDays": 14}]}}}
|
|
257
|
+
{"id": "credentialScrub", "title": "Live keys masked where the agent keeps text (logs, new incoming messages, transcript copies, session records)", "aliases": ["security.credentialScrub.inPlace"], "flag": {"path": "security.credentialScrub.enabled"}, "disposition": "ladder", "final": "default-on", "risk": "sensitive", "tracking": {"state": "needed", "plan": "Dev-gated: live on the development agent, dark on the fleet; the sweeper stays in dry run until inPlace is on. Not yet measured: a later SEC-164 slice adds a featureEvidence fired row per mask (kinds and counts only) and an error row per failed check. Wrong masks are judged by the review script (25 reviewed events, two machines, none wrong), which gates each owner step. Owner: security session."}, "rungs": {"dev-agent-live": {"soakDays": 7, "advance": {"kind": "owner-driver", "driver": "Security session turns inPlace on per machine once pre-flip evidence holds"}, "metrics": [{"id": "masked", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "fired"}, "of": {"featureId": "credentialScrub"}, "value": "count"}, "direction": "at-least", "threshold": 25, "minSamples": 25, "windowDays": 14}, {"id": "failed-check-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "error"}, "of": {"featureId": "credentialScrub"}, "value": "ratio"}, "direction": "at-most", "threshold": 0, "minSamples": 25, "windowDays": 14}]}, "fleet": {"soakDays": 7, "advance": {"kind": "owner-driver", "driver": "Justin's yes on the security session's SEC-164 fleet packet"}, "metrics": [{"id": "masked", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "fired"}, "of": {"featureId": "credentialScrub"}, "value": "count"}, "direction": "at-least", "threshold": 25, "minSamples": 25, "windowDays": 14}, {"id": "failed-check-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "credentialScrub", "kind": "error"}, "of": {"featureId": "credentialScrub"}, "value": "ratio"}, "direction": "at-most", "threshold": 0, "minSamples": 25, "windowDays": 14}]}}},
|
|
258
|
+
{"id": "agentLinks", "title": "Permanent agent links on instar.sh", "flag": {"path": "agentLinks.enabled"}, "disposition": "ladder", "final": "default-off-by-preference", "preference": {"decidedBy": "Justin (operator)", "reason": "An optional extra that leans on instar.sh, an outside service; Instar never requires one, so each agent's owner turns it on.", "decidedAt": "2026-11-17", "ref": "topic 141385, 2026-11-17 15:21 ('an additional option ... obviously not required'); docs/specs/permanent-agent-links.md section 2"}, "risk": "standard", "restartNeeded": false, "tracking": {"state": "measured", "plan": "The identity route records fired 'served' per proof sent and error per refused identity read, and the link builder records fired per link built, in logs/feature-evidence.jsonl under agentLinks (docs/specs/permanent-agent-links.md section 2a). Advance is code: only an owner turns it on."}, "rungs": {"dev-agent-live": {"soakDays": 14, "advance": {"kind": "code"}, "metrics": [{"id": "served", "role": "ran", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "agentLinks", "kind": "fired"}, "of": {"featureId": "agentLinks"}, "value": "count"}, "direction": "at-least", "threshold": 5, "minSamples": 5, "windowDays": 14}, {"id": "error-rate", "role": "harm", "source": "jsonl-log", "ref": {"file": "logs/feature-evidence.jsonl", "where": {"featureId": "agentLinks", "kind": "error"}, "of": {"featureId": "agentLinks"}, "value": "ratio"}, "direction": "at-most", "threshold": 0, "minSamples": 5, "windowDays": 14}]}}, "aliases": []}
|
|
258
259
|
]
|
|
259
260
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "source-tree",
|
|
4
4
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
5
|
-
"packageVersion": "1.3.
|
|
5
|
+
"packageVersion": "1.3.1998",
|
|
6
6
|
"guards": [
|
|
7
7
|
{
|
|
8
8
|
"ref": "docs/audits/phase-b/f10-triage.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sha256": "
|
|
2
|
+
"sha256": "5c7b4651be3b06ff5bd36858c91e19607bea3afb7e876bf20c16decab515166e",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.1998"
|
|
5
5
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Permanent agent links (spec `docs/specs/permanent-agent-links.md`). This adds an optional link that names an agent by its identity, not by one machine's address: `https://instar.sh/a#v=1&i=<agent id>&t=home|doc|conversation[&r=…]`. Everything after `#` stays on the device, so instar.sh stores nothing and never learns which agent or page.
|
|
9
|
+
|
|
10
|
+
- New setting `agentLinks.enabled` (default off, read live). Off or absent, nothing changes.
|
|
11
|
+
- `GET /mobile/agent-link/identity?nonce=…` (device-signed). It returns the agent's id and public key, plus a signature over a fixed transcript that binds the id to this device, the host the device signed for, and its nonce. With that, the app can prove a paired agent really holds the id before it opens links for it. The route never creates, repairs or rewrites an identity, and refuses `identity-split`, `identity-key-locked`, `identity-unreadable` and `no-agent-identity`.
|
|
12
|
+
- `POST /agent-links` (Bearer) builds a link from `{target, ref?, comment?}`. It adds `warning: split-identity` when one of the agent's machines publishes a different identity.
|
|
13
|
+
- instar.sh: a static `/a` page with an "Open in Instar" button. It makes no network request and never redirects. Apple's link file now lists `/a` for the iPhone app and adds the Mac app.
|
|
14
|
+
- One `agentLinks` evidence row per outcome in `logs/feature-evidence.jsonl`. Ladder entry `agentLinks`, set to default-off-by-preference.
|
|
15
|
+
|
|
16
|
+
## What to Tell Your User
|
|
17
|
+
|
|
18
|
+
If you'd like, your agent can now hand out links that always open the right place in the Instar app on your iPhone or Mac, even when its machines change addresses. Just ask it to turn on permanent links. The links hold no password or access: opening one still needs your own paired app.
|
|
19
|
+
|
|
20
|
+
## Summary of New Capabilities
|
|
21
|
+
|
|
22
|
+
- `agentLinks.enabled` (default off).
|
|
23
|
+
- `POST /agent-links`: build a permanent link to home, a document or a conversation.
|
|
24
|
+
- `GET /mobile/agent-link/identity`: the app's identity proof.
|
|
25
|
+
|
|
26
|
+
## Evidence
|
|
27
|
+
|
|
28
|
+
- Unit: `tests/unit/agent-links.test.ts` (51 cases; grammar vectors shared with the site page).
|
|
29
|
+
- Integration: `tests/integration/agent-link-routes.test.ts`.
|
|
30
|
+
- E2E: `tests/e2e/agent-links-alive.test.ts` (production server, a real paired phone, the proof verifies over the phone's own transcript; off gives `agent-links-off`).
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Side-Effects Review — Permanent agent links (instar.sh/a), server and site
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `permanent-agent-links`
|
|
4
|
+
**Date:** `2026-11-17`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `not required (no gate, sentinel, watchdog, session-lifecycle or messaging block/allow surface; the identity-proof design had two cross-family security reviews and six spec-review rounds)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This adds an optional link that names an agent by its canonical identity (SHA-256 over its Ed25519 public key) and a page: `https://instar.sh/a#v=1&i=<id>&t=home|doc|conversation[&r=…][&c=…]`. Spec: `docs/specs/permanent-agent-links.md`, converged in 6 rounds and approved through the design approval.
|
|
11
|
+
|
|
12
|
+
Server side:
|
|
13
|
+
- `src/core/AgentLinks.ts`: the v1 grammar parser and builder, the strict identity read, and the proof transcript and signature.
|
|
14
|
+
- `GET /mobile/agent-link/identity` in `src/server/mobilePairingRoutes.ts`. It is device-signed and active-only, with a guest tier, an allowlist entry and evidence rows. It returns the id, the public key, and an Ed25519 signature over `instar-agent-link-proof-v1\n<id>\n<deviceId>\n<verified host>\n<nonce>`.
|
|
15
|
+
- `POST /agent-links` in `src/server/agentLinkRoutes.ts`. It is Bearer-only and returns `{url, appUrl}`, plus a `split-identity` warning built from the identity-coherence health.
|
|
16
|
+
- Config type `agentLinks.enabled`. It defaults to off, is read live, and is wired in `AgentServer.ts`.
|
|
17
|
+
- Awareness entry `src/data/awareness/agent-links.md`.
|
|
18
|
+
- Ladder entry `agentLinks`, set to `default-off-by-preference`.
|
|
19
|
+
|
|
20
|
+
Site side:
|
|
21
|
+
- A static `site/public/a/index.html` (a plain file, so the site build injects no script into it) with a same-origin `site/public/a.js`. It makes no network request and never redirects.
|
|
22
|
+
- AASA: `/a` and `/a/` for the iPhone app, and a new Mac app entry.
|
|
23
|
+
|
|
24
|
+
The app handlers (iPhone and Mac) are a separate change in the app repo, built against this spec.
|
|
25
|
+
|
|
26
|
+
**Size and effort:** about 12 files, about 900 lines including tests. Tier 2: identity and a published link format. 6 spec review rounds, with a flat one-item-per-round tail from round 3 on, stopped under the 80/20 rule.
|
|
27
|
+
|
|
28
|
+
## Decision-point inventory
|
|
29
|
+
|
|
30
|
+
- Link parser accept/reject (`parseAgentLink`, server and page): **add**. Pure syntax over a frozen finite grammar. An invalid link opens nothing.
|
|
31
|
+
- Identity route outcomes (off → nonce → verified host → identity → sign): **add**. Each step is a fixed refusal with no judgment involved.
|
|
32
|
+
- Identity file choice (`readLinkIdentity`): **add**. It is strict and refuses rather than guess, and it never writes.
|
|
33
|
+
- Device middleware (`DEVICE_ALLOWLIST`, `TEAM_ROUTE_TIERS`): **pass-through**. There is one new allowlisted GET at guest tier, and the middleware logic is unchanged.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 1. Over-block
|
|
38
|
+
|
|
39
|
+
The parser refuses some links a human might consider valid:
|
|
40
|
+
- a `%`-encoded character other than `:` in `r`/`c`, such as an app that encodes every character;
|
|
41
|
+
- Slack conversation ids;
|
|
42
|
+
- topic ids above 2^53.
|
|
43
|
+
|
|
44
|
+
All of these are documented in the spec, and none is produced by the builder. The identity route refuses an agent whose `identity.json` is unusable even when the legacy Threadline file is fine (`identity-unreadable`). That is deliberate: it avoids serving an id peers don't know. The feature stays off for that agent until its identity is repaired.
|
|
45
|
+
|
|
46
|
+
## 2. Under-block
|
|
47
|
+
|
|
48
|
+
- A link holds no access, so a leaked link discloses only the agent id and page id, as the privacy statement says. A comment key also discloses its author key, so the builder includes it only when asked.
|
|
49
|
+
- The page's no-network guarantee depends on instar.sh serving the page unmodified. That is stated in the spec.
|
|
50
|
+
- Two agents running as the same OS user can read each other's identity file. This change leaves that unchanged; it is stated as out of scope.
|
|
51
|
+
|
|
52
|
+
## 3. Level-of-abstraction fit
|
|
53
|
+
|
|
54
|
+
The proof reuses the existing device-signature middleware for authentication and its verified host (`instarDeviceHost`), and it adds no second host-normalization rule. Identity is read through the existing validating reader (`readIdentityKeyFile`, with `repair:false`). The split warning reads the existing `IdentityCoherenceDetector.health()` rather than probing peers itself. Evidence goes through `featureEvidence`, the same log the pairing routes use. Nothing here re-implements an existing primitive.
|
|
55
|
+
|
|
56
|
+
## 4. Signal vs authority compliance
|
|
57
|
+
|
|
58
|
+
- [x] No — this change has no block/allow surface over agent behavior or information flow.
|
|
59
|
+
|
|
60
|
+
The only refusals are syntactic (grammar) and cryptographic (identity possession). A judgment at either point would itself be the vulnerability. The split-identity warning is a signal on the builder's answer and blocks nothing.
|
|
61
|
+
|
|
62
|
+
## 4b. Judgment-point check
|
|
63
|
+
|
|
64
|
+
No new static heuristic sits at a competing-signals decision point on the server. The app-side choice among several matching pairing rows is a judgment-candidate whose arbiter is the person, as declared in the spec's decision table. That choice lives in the app change, not here.
|
|
65
|
+
|
|
66
|
+
## 5. Interactions
|
|
67
|
+
|
|
68
|
+
- Adds one route to the device middleware's allowlist and team tiers. Existing routes are unaffected.
|
|
69
|
+
- The identity route signs with the agent's identity key under a domain-separated prefix that no other Instar signing format uses: not rotation, recovery, ASP or Threadline. It cannot act as a signing oracle, because callers choose only the 32-byte nonce.
|
|
70
|
+
- `featureEvidence` rows are keyed per outcome and device and limited to one per 60 s, the same window the pairing evidence uses.
|
|
71
|
+
- The identity read happens per request and never writes a file, so it cannot race the identity adoption or repair writers.
|
|
72
|
+
|
|
73
|
+
## 6. External surfaces
|
|
74
|
+
|
|
75
|
+
- A new public link format on instar.sh (`/a`). Its AASA file now names the Mac app id. The page is static, with a CSP of `connect-src 'none'`, and it does not redirect.
|
|
76
|
+
- Two new agent routes; the phone route is off unless `agentLinks.enabled` is true.
|
|
77
|
+
- No timing dependencies. The page works when the agent is offline (it only hands off to the app).
|
|
78
|
+
|
|
79
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
80
|
+
|
|
81
|
+
- **The identity** is unified across machines through the existing identity handover. This change stores no identity state. A machine with a split identity serves its own id, and the builder warns `split-identity` using the coherence detector's observed fingerprints; unknown peers produce no warning.
|
|
82
|
+
- **`agentLinks.enabled`** is machine-local config, like all config. If it is off on one machine, that machine's phone rows go `off`, and links resolve through machines where it is on.
|
|
83
|
+
- **Generated URLs** name the agent, never a machine, so they survive address changes and machines being added or removed. Whether a target exists on the machine the app picks is the target feature's own replication; that is documented in the spec's table.
|
|
84
|
+
- **Notices:** none emitted.
|
|
85
|
+
- **Durable state:** none on the server. App bindings are device-local, in the app change.
|
|
86
|
+
- **Status surfaces:** no `/status`, `/health`, `/capabilities` or `/channels` answer changes. Evidence is in `logs/feature-evidence.jsonl` per machine, which is the existing per-machine log.
|
|
87
|
+
|
|
88
|
+
## 8. Rollback cost
|
|
89
|
+
|
|
90
|
+
Set `agentLinks.enabled: false`. It is read live, so no restart is needed, and both routes then answer `agent-links-off`. Rows already bound in apps go `off` at their next refresh; until then a tap only navigates, and the server checks access. Reverting the site commit removes `/a` and the AASA entries. No data migration is needed and no state needs repair.
|
|
91
|
+
|
|
92
|
+
## Conclusion
|
|
93
|
+
|
|
94
|
+
The change is safe to ship dark. It is opt-in per agent, adds no block/allow authority, and every refusal is syntactic or cryptographic. The app handlers and the live proof follow in the app repo before the feature is called done.
|
|
95
|
+
|
|
96
|
+
## Second-pass review (if required)
|
|
97
|
+
|
|
98
|
+
Not required. See the header.
|
|
99
|
+
|
|
100
|
+
## Evidence pointers
|
|
101
|
+
|
|
102
|
+
- Unit: `tests/unit/agent-links.test.ts` (grammar vectors shared with `site/public/a.js` in `tests/fixtures/agent-link-vectors.json`, builder, strict identity read with each refusal, nonce, transcript, proof verify and refuse).
|
|
103
|
+
- E2E: `tests/e2e/agent-links-alive.test.ts` (production `AgentServer`, a real paired phone, the proof verifies over the phone's own transcript, a wrong host fails, Bearer gets 403, the builder works, off gives `agent-links-off`, one evidence row per outcome).
|
|
104
|
+
- Ladder registry tests: `feature-ladders-coverage`, `MaturationLadder`, `FeatureMaturationPlanGate-ladder`.
|
|
105
|
+
- Identity single-writer guard: `tests/unit/threadline/identity-single-writer.test.ts` names `core/AgentLinks.ts` as a read-only importer of the key-file module and asserts it reads with `repair: false` and has no write call (Local Verify fix 2026-11-18: the guard's fixed importer list had not been updated for the new reader).
|
|
106
|
+
- `tsc --noEmit` clean.
|
|
107
|
+
|
|
108
|
+
## Refresh against main
|
|
109
|
+
|
|
110
|
+
The merge keeps current server imports and adds the agent link routes. It preserves all current feature ladder entries and adds the existing default-off agent link entry. The independent review found no change to identity verification, bearer authentication, the signed-device requirement or the default-off setting. Focused checks passed: 53 unit, 4 HTTP and 3 production server tests.
|
|
111
|
+
|
|
112
|
+
## Composition with the iPhone computer-link website
|
|
113
|
+
|
|
114
|
+
The iPhone association retains pairing and document paths and includes the computer-link path from the merged website change. Both native apps retain the two permanent-link paths. The Mac association stays scoped to permanent links. The two browser fallbacks are byte-identical to their respective parent branches. This merge changes association metadata and its exact-path test. The approval and QR emission code stays with its existing rollout owners.
|