instar 1.3.2008 → 1.3.2009
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/conversationGraphRead.d.ts +63 -0
- package/dist/core/conversationGraphRead.d.ts.map +1 -1
- package/dist/core/conversationGraphRead.js +142 -27
- package/dist/core/conversationGraphRead.js.map +1 -1
- package/dist/core/workFrontDoorsGraph.d.ts +13 -0
- package/dist/core/workFrontDoorsGraph.d.ts.map +1 -1
- package/dist/core/workFrontDoorsGraph.js +16 -0
- package/dist/core/workFrontDoorsGraph.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/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +7 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/ConversationGraphSurface.d.ts.map +1 -1
- package/dist/server/ConversationGraphSurface.js +4 -1
- package/dist/server/ConversationGraphSurface.js.map +1 -1
- package/dist/server/conversationGraphRoutes.d.ts +7 -1
- package/dist/server/conversationGraphRoutes.d.ts.map +1 -1
- package/dist/server/conversationGraphRoutes.js +23 -0
- package/dist/server/conversationGraphRoutes.js.map +1 -1
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +2 -0
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/awareness/phone-conversation-tree.md +4 -0
- package/src/data/builtin-manifest.json +2 -2
- 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.2009.md +26 -0
- package/upgrades/side-effects/work-front-doors-stage2-mobile-hierarchy.md +60 -0
package/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The phone shows the Conversations tree
|
|
3
|
+
---
|
|
4
|
+
The owner's phone can read the whole Conversations tree in one request, not only the flat conversation list: `GET /mobile/conversation-graph/tree` (device-signed, owner phone only) returns each top-level group with its front door, its conversations and nested groups, any proposed card conversations, and a Project label with the project's name when the group holds a project the Chief of Staff tracks. A node cut short says `childrenComplete: false`, and the phone opens it with `GET /mobile/conversation-graph/nodes/:ref` for the rest. A member's or guest's phone is refused (`hierarchy-owner-only`) and keeps the flat list it may read, so group names, project names and counts never reach someone the owner has not shared them with. When the owner asks whether the app can show their groups, say yes for their own phone once the app has the screen, and that the tree comes from the same groups they see in the dashboard's Conversations page.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-11-24T17:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-11-24T17:57:32.763Z",
|
|
5
|
+
"instarVersion": "1.3.2009",
|
|
6
6
|
"entryCount": 210,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -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.2009",
|
|
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": "bc9405c539ad635314ef80278fbbb5c272ba52387cc5858fdf0c77edbbc013d0",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.2009"
|
|
5
5
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Work-front-doors stage 2, "Mobile hierarchy routes" (`docs/specs/work-front-doors.md` §7; `docs/specs/conversation-effort-hierarchy-v3.md` §7.4).
|
|
9
|
+
|
|
10
|
+
- New `GET /mobile/conversation-graph/tree` (owner phone, device-signed): the owner's top-level groups with their front door, conversations and nested groups in one read, from the same viewer-filtered projection as the existing roots and node reads. Each node carries a `routeRef` for `GET /mobile/conversation-graph/nodes/:ref`; a node cut at 4 levels, 20 children or 400 nodes says `childrenComplete: false`. Proposed card conversations ride along as on the node read.
|
|
11
|
+
- A group holding a project the Chief of Staff tracks carries `project {title, conversationKey}` (the console's Project rule); `projects: known|unknown` says whether projects could be read.
|
|
12
|
+
- Member and guest phones are refused (`hierarchy-owner-only`) and keep the flat conversation list, as hierarchy v3 §7.4 requires.
|
|
13
|
+
|
|
14
|
+
## What to Tell Your User
|
|
15
|
+
|
|
16
|
+
Your phone app can now be shown your conversations as groups and projects, the same tree you see in the dashboard, instead of only one long list. The app screen comes with the next app update; nothing to do now. People you share the agent with still see only the conversations they may read, never your group or project names.
|
|
17
|
+
|
|
18
|
+
## Summary of New Capabilities
|
|
19
|
+
|
|
20
|
+
- `GET /mobile/conversation-graph/tree` (owner phone): the Conversations tree in one read, with front doors, nested groups and Project labels.
|
|
21
|
+
|
|
22
|
+
## Evidence
|
|
23
|
+
|
|
24
|
+
- Unit: `tests/unit/conversation-graph-tree.test.ts` (13 tests).
|
|
25
|
+
- Integration: `tests/integration/conversation-graph-tree-device.test.ts` (4 tests, real device auth).
|
|
26
|
+
- E2E: `tests/e2e/conversation-graph-tree-alive.test.ts` (production AgentServer, signed phone).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Side-Effects Review — Work front doors, stage 2: the phone tree of Conversations
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `work-front-doors-stage2-mobile-hierarchy`
|
|
4
|
+
**Date:** `2026-11-20`
|
|
5
|
+
**Author:** `Echo`
|
|
6
|
+
**Second-pass reviewer:** `independent reviewer subagent (see below)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Spec `docs/specs/work-front-doors.md` §7 stage 2, "Mobile hierarchy routes (hierarchy v3 §7.4), so the phone shows the tree, not only the flat list". What already existed on main: device-signed, owner-only `GET /mobile/conversation-graph/roots` and `/nodes/:ref` (one level per request). What the phone lacked: the tree itself without one request per group, and the console's Project label (which the console works out in the browser from `/work/projects`).
|
|
11
|
+
|
|
12
|
+
- `ConversationGraphReadModel.tree(viewer, {cursor, projects})` (`src/core/conversationGraphRead.ts`): the viewer's root efforts, paged with the existing signed, viewer-bound snapshot cursor (own scope `tree`), each with its visible children nested to 4 levels, at most 20 children a node and 400 nodes a response; a cut node says `childrenComplete: false` and is opened with the existing node read. Each node: `ref`, `routeRef`, `title`, `kind`, `role`, `placedBy`, `state`, `source`, `sourceFreshness`, `visibleChildCount`, `frontDoor` (efforts), `project` (efforts), `children`, `childrenComplete`, `proposed`. The Chief of Staff root conversation heads the first page as `root`. Envelope as roots (`revision`, `asOf`, `partial`, `partialReasons`, `replicationState`, `capabilities`) plus `projects: known|unknown` and `limits`.
|
|
13
|
+
- The card-proposal computation in `node()` moved unchanged into a private `proposedFor()` that both reads use.
|
|
14
|
+
- Project label: an effort is labelled when its front door, else a conversation directly in it, is a Chief of Staff project's conversation (the console's rule from PR #3547). Source: the projects the suggestion service already receives (`options.suggestions.projects` in `ConversationGraphSurface`), converted by `treeProjects()` in `src/core/workFrontDoorsGraph.ts` to `{ref, title, conversationKey}`. Unreadable projects → `projects: 'unknown'` and no labels.
|
|
15
|
+
- Route `GET /mobile/conversation-graph/tree` in `src/server/conversationGraphRoutes.ts` (phone only; the dashboard keeps composing roots/nodes) and its device rule in `src/server/mobilePairingRoutes.ts` (`ownerOnly`, bucket `conversation-graph-reads`, 30/min, no body).
|
|
16
|
+
- Capability index entry `mobileConversationTree` (no new prefix) and awareness entry `src/data/awareness/phone-conversation-tree.md`.
|
|
17
|
+
|
|
18
|
+
## Decision-point inventory
|
|
19
|
+
No new decision point. Who may read is decided by the existing device-auth owner rule and the existing owner viewer resolver (`conversationGraphViewer.ts`); what is visible by the existing projection `mayView` filter. The new route adds neither.
|
|
20
|
+
|
|
21
|
+
## 1. Over-block
|
|
22
|
+
A member (MSP) or guest phone gets 403 `hierarchy-owner-only`. That is the spec, not an over-block: hierarchy v3 §7.4 says an MSP "does not receive the owner's effort tree" in v1, and work-front-doors stage 2 requires "a member's Work door working with no tree and no project names". Members keep the flat `GET /mobile/conversations`. A Slack project conversation gets no Project label (no Work-page key exists for it yet; same as the console).
|
|
23
|
+
|
|
24
|
+
## 2. Under-block
|
|
25
|
+
The response is bounded: at most 50 root efforts (one page) plus the root conversation, and nested children and proposals together draw on one 400-node budget (proposals are also capped at 50 an effort by the existing cap). A cut of children says `childrenComplete: false`; a cut of proposals says `proposedComplete: false`. The card record is read once per tree request. A very wide tree is cut, and says so per node; nothing is silently dropped. Hidden nodes: the projection filter runs before nesting, counting, proposals and labels, so a hidden conversation never shows, never counts, and never labels an effort as a project (unit test with a hidden front door and a hidden project conversation).
|
|
26
|
+
|
|
27
|
+
## 3. Level-of-abstraction fit
|
|
28
|
+
The tree is one more read on the shared read model, built from the same single projection per request (`scoped`), as hierarchy v3 §7.1 asks ("The app and dashboard consume one shared projection module"). The route sits in the existing graph router beside roots/nodes and reuses `authorizedSend` (re-resolves the viewer before sending; grant change → 409).
|
|
29
|
+
|
|
30
|
+
## 4. Signal vs authority compliance
|
|
31
|
+
A read. No blocking authority, no brittle check (docs/signal-vs-authority.md): authority stays with the existing owner admission.
|
|
32
|
+
|
|
33
|
+
## 5. Interactions
|
|
34
|
+
- `node()` behaviour is unchanged (the proposal logic moved verbatim; existing read tests pass).
|
|
35
|
+
- The tree's cursor scope is `tree`; a roots or children cursor is refused (409 `cursor-invalid`), and vice versa.
|
|
36
|
+
- `projects()` is the same function the suggestion service calls; it reads the Chief of Staff loop in memory. A throwing source is caught (`@silent-fallback-ok`, reported as `projects: 'unknown'` in the body).
|
|
37
|
+
- PR #3374 adds suggestion routes to the same router family and the same device-rule table; this change adds one rule line and one route block, no shared lines edited.
|
|
38
|
+
|
|
39
|
+
## 6. External surfaces
|
|
40
|
+
One new device-signed GET for the owner's phone. No app screen ships here (app builds are on hold); the iPhone, Android and Mac apps can draw the tree from this one read. Agent instructions gain one feature note.
|
|
41
|
+
|
|
42
|
+
## 6b. Operator-surface quality
|
|
43
|
+
No operator surface in this change (a server read). The field names and the plain words the awareness entry uses ("group", "Project") match the console.
|
|
44
|
+
|
|
45
|
+
## 7. Multi-machine posture
|
|
46
|
+
Proxied by design through replication already in place: the graph events, the conversation inventory and the Chief of Staff tree replicate, and every machine builds the same projection; replica lag is reported (`partial`, `replicationState: pending`) exactly as on roots. The device rule and rate bucket are per machine like every phone route. Snapshot cursors are machine-local (a cursor from another machine is refused as expired, and the phone starts again), the same as roots/nodes.
|
|
47
|
+
|
|
48
|
+
## 8. Rollback cost
|
|
49
|
+
Revert the commit. No stored data, no migration, no config. A phone build that uses the route would fall back to roots/nodes.
|
|
50
|
+
|
|
51
|
+
## Evidence
|
|
52
|
+
- Unit: `tests/unit/conversation-graph-tree.test.ts` (13): 503 before projecting; nesting with front door, roles and route refs; Project label from front door then child, `unknown` labels nothing; hidden conversations never nested/counted/labelled; hidden effort hides its subtree; per-node and depth cuts; response-budget cut with separate childrenComplete and proposedComplete, card record read once; viewer-bound paging, root on page 1 only, foreign-scope cursor refused; proposals only with a visible project conversation; `treeProjects`; router owner-only, phone-only, throwing projects, bad cursor. `tests/unit/mobile-session-terminal.test.ts` names the new owner-only rule.
|
|
53
|
+
- Integration: `tests/integration/conversation-graph-tree-device.test.ts` (4): real device-auth middleware, ledger and owner resolver: owner phone gets the nested tree with Project label; bearer, member and forged requests refused before the inventory is read; revoked 401; 503 until ready; dashboard proof does not open it.
|
|
54
|
+
- E2E: `tests/e2e/conversation-graph-tree-alive.test.ts` (1): production AgentServer with Conversations on, the owned graph started by a real PIN visit; a signed phone builds a parent and nested group and reads them nested from the tree, opens the nested node by its `routeRef`, and is refused once revoked.
|
|
55
|
+
|
|
56
|
+
## Second-pass review (if required)
|
|
57
|
+
|
|
58
|
+
**Reviewer:** independent reviewer subagent (Opus 5.5). **Independent read: Concur with the review.** Traced: only an owner phone reaches the body (ownerOnly device rule → 403 hierarchy-owner-only for member/MSP/guest; not a browser route; resolveViewer requires a current signature admission, so bearer and revoked fail; viewer re-resolved in authorizedSend; dashboard path 404). Every field comes from the one viewer-filtered projection; project labels need `projection.has`; proposals keep the both-ends check. Tree cursor scope `tree` is refused by roots/children and vice versa, and bound to viewer and grant. `proposedFor()` is a verbatim move. Minor notes: (a) `cardPlacements()` was scanned once per effort; (b) a proposal cut set `childrenComplete:false` though all children were present; (c) on later pages an effort moved between reads could appear twice (same snapshot behaviour as roots, cosmetic); (d) §2 wording on the proposal cap was loose.
|
|
59
|
+
|
|
60
|
+
**Author:** (a) the card record is now read once per tree request; (b) a proposal cut now sets its own `proposedComplete: false`; (d) §2 reworded. (c) left as is: it matches the existing roots snapshot contract (§7.3: unrelated graph events do not invalidate a cursor).
|