instar 1.3.1978 → 1.3.1980
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +9 -7
- package/dist/commands/server.js.map +1 -1
- package/dist/core/AppConversationService.d.ts +2 -1
- package/dist/core/AppConversationService.d.ts.map +1 -1
- package/dist/core/AppConversationService.js +24 -7
- package/dist/core/AppConversationService.js.map +1 -1
- package/dist/core/AppConversationStore.d.ts +34 -0
- package/dist/core/AppConversationStore.d.ts.map +1 -1
- package/dist/core/AppConversationStore.js +232 -5
- package/dist/core/AppConversationStore.js.map +1 -1
- package/dist/core/AppConversationsReplicatedStore.js +1 -1
- package/dist/core/AppConversationsReplicatedStore.js.map +1 -1
- package/dist/core/AppCreationContext.d.ts +23 -0
- package/dist/core/AppCreationContext.d.ts.map +1 -0
- package/dist/core/AppCreationContext.js +80 -0
- package/dist/core/AppCreationContext.js.map +1 -0
- package/dist/core/ChiefOfStaffLoop.d.ts +6 -17
- package/dist/core/ChiefOfStaffLoop.d.ts.map +1 -1
- package/dist/core/ChiefOfStaffLoop.js +6 -0
- package/dist/core/ChiefOfStaffLoop.js.map +1 -1
- package/dist/core/ConversationRegistry.d.ts +2 -0
- package/dist/core/ConversationRegistry.d.ts.map +1 -1
- package/dist/core/ConversationRegistry.js +5 -0
- package/dist/core/ConversationRegistry.js.map +1 -1
- package/dist/core/CreationPlacementSnapshot.d.ts +24 -0
- package/dist/core/CreationPlacementSnapshot.d.ts.map +1 -0
- package/dist/core/CreationPlacementSnapshot.js +85 -0
- package/dist/core/CreationPlacementSnapshot.js.map +1 -0
- package/dist/core/WorkBoardRuntime.d.ts +25 -1
- package/dist/core/WorkBoardRuntime.d.ts.map +1 -1
- package/dist/core/WorkBoardRuntime.js +80 -3
- package/dist/core/WorkBoardRuntime.js.map +1 -1
- package/dist/core/ownerWords.d.ts +9 -2
- package/dist/core/ownerWords.d.ts.map +1 -1
- package/dist/core/ownerWords.js +19 -1
- package/dist/core/ownerWords.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/install/accountChoice.d.ts.map +1 -1
- package/dist/install/accountChoice.js +8 -6
- package/dist/install/accountChoice.js.map +1 -1
- package/dist/messaging/TelegramAdapter.d.ts +5 -0
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +8 -0
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/monitoring/contextBudgetMetrics.d.ts +1 -1
- package/dist/monitoring/contextLayers/h3Builder.d.ts +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 +31 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/appCreationHierarchy.d.ts +64 -0
- package/dist/server/appCreationHierarchy.d.ts.map +1 -0
- package/dist/server/appCreationHierarchy.js +273 -0
- package/dist/server/appCreationHierarchy.js.map +1 -0
- package/dist/server/mobileConversationRoutes.d.ts +9 -0
- package/dist/server/mobileConversationRoutes.d.ts.map +1 -1
- package/dist/server/mobileConversationRoutes.js +99 -6
- package/dist/server/mobileConversationRoutes.js.map +1 -1
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +3 -0
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +31 -5
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/awareness/conversation-creation-context.md +6 -0
- package/src/data/builtin-manifest.json +47 -47
- 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.1979.md +22 -0
- package/upgrades/1.3.1980.md +34 -0
- package/upgrades/side-effects/account-choice-never-silent.eli16.md +19 -0
- package/upgrades/side-effects/account-choice-never-silent.md +53 -0
- package/upgrades/side-effects/conversation-creation-context.md +63 -0
- package/upgrades/side-effects/owner-words-owner-unknown.md +30 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Side Effects: Generated App Chat Origins
|
|
2
|
+
|
|
3
|
+
Spec: docs/specs/conversation-creation-context.md. Principle reference: docs/signal-vs-authority.md.
|
|
4
|
+
|
|
5
|
+
## Change And Scope
|
|
6
|
+
|
|
7
|
+
New App creation paths record optional historical source and parent evidence. Owner list readers receive verified hierarchy and a read-only existing-chat preview. This does not delete, move, hide or rename existing chats and does not grant access. The Chief explicitly narrowed the increment in handoff1b9a32d3; transferable author proof and competing Work Board creates remain tracked as wc_d3ce8fd1ba6a5cde and wc_baa561764dcb692b.
|
|
8
|
+
|
|
9
|
+
## Over-Block
|
|
10
|
+
|
|
11
|
+
Unverifiable, conflicting, unreadable or incomplete evidence suppresses only historical fallback placement, not the authorized conversation itself. Existing explicit placement always wins; an unreadable explicit parent remains authoritative but its reference is omitted. Older replicas may show unknown/unplaced because their codec stripped metadata. Existing shared-readable parents retain current authorization rather than requiring common ownership.
|
|
12
|
+
|
|
13
|
+
## Under-Block
|
|
14
|
+
|
|
15
|
+
This does not establish transferable original-author authentication or guarantee context recovery while the creator is offline. Existing upstream competing-create loss can hide a conflicting history that never reaches this replica; no title guess fills that gap. Observed conflicts are retained durably before duplicate suppression and stay unresolved through index rebuild.
|
|
16
|
+
|
|
17
|
+
## Level Of Abstraction
|
|
18
|
+
|
|
19
|
+
Immutable creation context belongs in App created events and the derived index. Work Board supplies immutable source evidence. The list/preview share a reader-scoped projection; the existing Chief tree remains current placement authority. Complete tree reads are cached outside HTTP, not implemented by polling the mutable dashboard graph or flushing a journal in a read route.
|
|
20
|
+
|
|
21
|
+
## Signal Versus Authority
|
|
22
|
+
|
|
23
|
+
Source/project observations are evidence. Existing access controls and explicit owner-confirmed placement hold authority. Missing evidence yields uncertainty and no mutation. The preview is structurally dryRun:true/canApply:false and has no mutation endpoint. Schema identities and permission boundaries remain deterministic invariants; uncertain placement does not hide a chat or block ordinary messaging.
|
|
24
|
+
|
|
25
|
+
## Interactions
|
|
26
|
+
|
|
27
|
+
Reservation/recovery persists the historical context before creation and reuses original caller intent. A retry after the event was durably appended does not manufacture a new timestamp under its existing event id. Existing owner winner remains unchanged; a differing context-owner winner cannot expose provenance. All device event reads remove raw creationContext. All normal/pinned list paths use final scoped enrichment. Source signatures include current Chief streams/pending state, creation evidence, registry mappings, Telegram topic identity, card evidence and reader authorization.
|
|
28
|
+
|
|
29
|
+
## External Surfaces
|
|
30
|
+
|
|
31
|
+
Optional parent input on App person/session creation; optional owner list metadata; exact owner-only signed/Bearer GET /mobile/conversations/parent-preview. Existing clients ignore additive fields. Team and managed-person devices retain current metadata audience. Apple owns native presentation and release; exact native/user-channel proof is required before card completion.
|
|
32
|
+
|
|
33
|
+
## Multi-Machine Posture
|
|
34
|
+
|
|
35
|
+
Optional context travels with existing authenticated App event replication. Updated codecs preserve it; old codecs retain the chat while dropping unknown context, reported honestly as unknown/unplaced. Durable local received-evidence observations preserve observable conflict across rebuild and do not claim all-machine commitment. No credentials/message text are newly replicated. No companion stream, receipt protocol or offline-recovery promise ships here.
|
|
36
|
+
|
|
37
|
+
## Rollback Cost
|
|
38
|
+
|
|
39
|
+
A source revert stops recording/enrichment/preview. Optional JSONL and derived nullable column can remain safely. Received creation-evidence observations can remain; rollback does not delete user content or require rewriting old chats. Existing update/open path adds the column idempotently; awareness file refresh reaches existing agents.
|
|
40
|
+
|
|
41
|
+
## Verification
|
|
42
|
+
|
|
43
|
+
Focused checks passed for creation/storage and mixed-version observations, Work Board immutable provenance, service restart/recovery, complete snapshot pending/read behavior, awareness and production wiring. Session-create HTTP (11), neighboring list-pin HTTP (6), and a real AgentServer session-create/preview lifecycle (1) passed. Scoped hierarchy unit tests passed12/12; new owner/create/preview HTTP passed8/8 and existing native-conversation HTTP passed12/12. Source TypeScript and whitespace checks passed. The throwaway test-as-self --no-roundtrip deployment passed startup/verification and tore down its processes. Full exact-head suites go through the normal throughput verification queue; no manual full suite pass is claimed.
|
|
44
|
+
|
|
45
|
+
## Second-pass review
|
|
46
|
+
|
|
47
|
+
**Reviewer:** context_spec_security (independent source reviewer; personally confirmed the prior review, exact-head corrections and identical shared Node24 lifecycle-fixture adoption).
|
|
48
|
+
|
|
49
|
+
## Independent Review
|
|
50
|
+
|
|
51
|
+
Independent security/correctness review concurred after verifying source validation, current authorization, cache identity and DTO redaction. Performance review concurred after a second pass verified pending-write completeness, unfiltered graph inventory and one source per response. Adversarial/gaps review concurred after verifying optional invalid Work Board source handling through a real store and current-child checks on completed create retries. The runtime audit records both the corrected findings and the clean second pass; these reviews do not replace full queue verification.
|
|
52
|
+
|
|
53
|
+
## Operator-Surface Quality
|
|
54
|
+
|
|
55
|
+
The owner sees readable placement states and preview reasons. No raw token, JSON template or technical identifier entry is added to native user flows; the app supplies validated parent references. The preview cannot execute changes. Agent Proposes, Operator Approves: this increment offers evidence for later placement decisions, not a new approval or authority grant. It preserves current owner-only parent metadata and never silently broadens who can see or change a chat.
|
|
56
|
+
|
|
57
|
+
## Self-Action Scope
|
|
58
|
+
|
|
59
|
+
The unbounded-self-action class is not introduced: background refresh is coalesced and triggered by source changes, the existing Chief tick or an explicit external read, and never schedules itself after success/failure. Unknown source versions do not repeatedly self-retry. Existing full verification admission is respected.
|
|
60
|
+
|
|
61
|
+
## Shared Fixture Correction Provenance
|
|
62
|
+
|
|
63
|
+
The native Node24 diagnostic proved a disconnected test page retained its real polling lock. The shared N79 owner corrected fixture lifecycle disposal and obtained one newly allocated whole-file run:29passed on actualNode24.14.1 with real SQLite. This branch adopts exact tested blob473d0d1ed9c91a249c01cea530f84130927426f5; independent review confirmed unchanged assertions/deadlines and identical dashboard source. No duplicate focused/full suite is claimed. The earlier wait-only correction was insufficient for this native lock lifetime. Production behavior is unchanged.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Side effects: no known owner means nobody's Telegram words teach (SEC-105)
|
|
2
|
+
|
|
3
|
+
## What changes for running agents
|
|
4
|
+
- An agent with a configured owner or a verified operator: no change (`learningOwnerId` returns that id first).
|
|
5
|
+
- An agent with no owner and exactly one allowed Telegram sender: no change (that sender is used as the owner).
|
|
6
|
+
- An agent with no owner and several allowed senders: Telegram messages stop feeding correction capture, learned preferences and the Jev correction shadow. That is the fix. These learners are signal-only, so nothing that already happened is undone, and no message is refused or delayed. The owner can restore learning by setting an owner or by becoming the verified operator.
|
|
7
|
+
- An agent with an open allowlist (no `authorizedUserIds`): the first verified sender becomes the verified operator, and so the verified owner (`everVerifiedOperatorUids`). From then on learning continues as before. Only messages that arrive before that first verification stop counting.
|
|
8
|
+
- The allowed list is compared as exact strings, the same way `TelegramAdapter.isAuthorized` compares, and duplicates count once. So `[5, "5"]` still names 5, while `" 5 "` or `"05"` names nobody.
|
|
9
|
+
- App messages: unchanged.
|
|
10
|
+
|
|
11
|
+
## Signal vs authority
|
|
12
|
+
The learners are signals. This narrows whose words feed them and gates nothing else. The owner-only rules elsewhere (Chief of Staff, approval buttons) already read `getVerifiedOwner()` and are untouched.
|
|
13
|
+
|
|
14
|
+
## Not changed here
|
|
15
|
+
- Skill learning (`SeamFilter` / `SkillLearningSentinel`) admits the topic's verified OPERATOR, not the owner. On a multi-sender agent, a non-owner bound as a topic's operator can still feed skill-learning PROPOSALS. A new skill stays pending until the owner's PIN-gated tap. This is reported back to the security ledger as a separate item.
|
|
16
|
+
- The Human-as-Detector link logs every user message as a guardian-miss signal, with no owner gate. That affects metrics only, never preferences.
|
|
17
|
+
|
|
18
|
+
## Rollback
|
|
19
|
+
Revert the commit. No stored data changes.
|
|
20
|
+
|
|
21
|
+
## Follow-up after Local Verify (2026-11-22)
|
|
22
|
+
The first full run (head 995242067, merged with main ecdfa223a) failed five end-to-end cases in `tests/e2e/jev-correction-shadow-lifecycle.test.ts`. Line 81 pinned the old wiring line (`telegram.getVerifiedOwner()`). The other cases built a `TelegramAdapter` with no owner and called `shadow.observe(entry)` with no owner id. Under this change that correctly means nobody's words count, so the shadow never checked anything. This is the fix working, not a defect. The fixtures now wire the owner the way `server.ts` does: the adapter allows one sender (4242, the sender of the test messages), and the fixture calls `observe(entry, adapter.getLearningOwner())`. The line-81 check now expects `getLearningOwner()`. Two new end-to-end cases prove the rule: with no allowed-sender list and no verified owner, and with two allowed senders, a development agent makes no check (`checks: 0`, no vendor call). `tests/integration/jev-correction-shadow-routes.test.ts` had the same owner-less fixture and got the same wiring before it could fail. No assertion was loosened and no product code changed. The branch was also brought up to date with main by a merge.
|
|
23
|
+
|
|
24
|
+
## Second follow-up (2026-11-22, targeted end-to-end run)
|
|
25
|
+
The lifecycle file's new "no owner known" case failed: it expected no vendor call and saw one. The cause was the test, not the product. The helper's last parameter defaulted to `[4242]`, and passing `undefined` explicitly takes the default in JavaScript, so that case ran with 4242 as the one allowed sender and a check correctly ran. The parameter now takes `null` for "no allowed-sender list", so the case really has no owner. No outside address was reached: the "vendor call" is the test's own mocked `fetchImpl`, which records the vendor URL it was given. The two-sender case was already correct. No assertion was changed.
|
|
26
|
+
|
|
27
|
+
## Second-pass review
|
|
28
|
+
**Reviewer:** independent second-pass subagent (fresh context, read-only). It found nothing blocking. Both learning callers are switched, every other `onMessageLogged` path was swept, and the owner-authority checks rightly stay on `getVerifiedOwner()`. All of its non-blocking notes were taken. The allowed-id match is now an exact string compare like `isAuthorized`, duplicates are removed, edge tests cover `0`, negative group ids, `" 5 "`, `"05"`, `[5, 5]` and `[5, "5"]`, and adapter tests cover owner precedence, a single sender, two senders and a second sender added at runtime. This document was corrected on the open allowlist and on scope.
|
|
29
|
+
|
|
30
|
+
**Follow-up review (2026-11-22): CONCUR.** A fresh Claude Sonnet subagent, read-only, traced every end-to-end and integration case by hand. It confirmed that the owner-less fixture was the root cause of all five failures. A bare adapter has no verified owner, and `authorizedUserIds` does not change how inbound messages are logged. Each case now passes for the right reason: the new no-owner and two-sender cases make no check. No assertion was loosened, the wiring matches `server.ts`, and no other test relies on "no owner means anyone".
|