instar 1.3.1598 → 1.3.1600

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.
Files changed (136) hide show
  1. package/dashboard/console/console.css +3 -0
  2. package/dashboard/console/console.js +3 -0
  3. package/dashboard/console/ideas-model.js +48 -0
  4. package/dashboard/console/ideas.js +99 -0
  5. package/dist/commands/server.d.ts.map +1 -1
  6. package/dist/commands/server.js +39 -1
  7. package/dist/commands/server.js.map +1 -1
  8. package/dist/core/ClaudeCliIntelligenceProvider.d.ts +1 -1
  9. package/dist/core/ClaudeCliIntelligenceProvider.d.ts.map +1 -1
  10. package/dist/core/ClaudeCliIntelligenceProvider.js +4 -2
  11. package/dist/core/ClaudeCliIntelligenceProvider.js.map +1 -1
  12. package/dist/core/CodexCliIntelligenceProvider.d.ts.map +1 -1
  13. package/dist/core/CodexCliIntelligenceProvider.js +6 -3
  14. package/dist/core/CodexCliIntelligenceProvider.js.map +1 -1
  15. package/dist/core/CoherenceJournal.d.ts +1 -1
  16. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  17. package/dist/core/CoherenceJournal.js +7 -2
  18. package/dist/core/CoherenceJournal.js.map +1 -1
  19. package/dist/core/DesktopHelperRetention.d.ts +5 -1
  20. package/dist/core/DesktopHelperRetention.d.ts.map +1 -1
  21. package/dist/core/DesktopHelperRetention.js.map +1 -1
  22. package/dist/core/DesktopProbeReadiness.d.ts.map +1 -1
  23. package/dist/core/DesktopProbeReadiness.js +4 -1
  24. package/dist/core/DesktopProbeReadiness.js.map +1 -1
  25. package/dist/core/MacDesktopHost.d.ts +4 -0
  26. package/dist/core/MacDesktopHost.d.ts.map +1 -1
  27. package/dist/core/MacDesktopHost.js +17 -1
  28. package/dist/core/MacDesktopHost.js.map +1 -1
  29. package/dist/core/PostUpdateMigrator.d.ts +5 -0
  30. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  31. package/dist/core/PostUpdateMigrator.js +20 -0
  32. package/dist/core/PostUpdateMigrator.js.map +1 -1
  33. package/dist/core/RenderedPlanStore.d.ts +1 -1
  34. package/dist/core/RenderedPlanStore.d.ts.map +1 -1
  35. package/dist/core/RenderedPlanStore.js.map +1 -1
  36. package/dist/core/ReplicatedStoreReconcilerWiring.d.ts.map +1 -1
  37. package/dist/core/ReplicatedStoreReconcilerWiring.js +1 -0
  38. package/dist/core/ReplicatedStoreReconcilerWiring.js.map +1 -1
  39. package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
  40. package/dist/core/WriteDomainRegistry.js +11 -0
  41. package/dist/core/WriteDomainRegistry.js.map +1 -1
  42. package/dist/core/componentCategories.d.ts.map +1 -1
  43. package/dist/core/componentCategories.js +1 -0
  44. package/dist/core/componentCategories.js.map +1 -1
  45. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  46. package/dist/core/devGatedFeatures.js +6 -0
  47. package/dist/core/devGatedFeatures.js.map +1 -1
  48. package/dist/core/types.d.ts +26 -0
  49. package/dist/core/types.d.ts.map +1 -1
  50. package/dist/core/types.js.map +1 -1
  51. package/dist/data/llmBenchCoverage.d.ts.map +1 -1
  52. package/dist/data/llmBenchCoverage.js +5 -0
  53. package/dist/data/llmBenchCoverage.js.map +1 -1
  54. package/dist/data/provenanceCoverage.d.ts.map +1 -1
  55. package/dist/data/provenanceCoverage.js +7 -0
  56. package/dist/data/provenanceCoverage.js.map +1 -1
  57. package/dist/data/standards-guard-index.json +1 -1
  58. package/dist/data/standards-guard-index.meta.json +2 -2
  59. package/dist/data/standards-registry.meta.json +1 -1
  60. package/dist/ecosystem/EcosystemIdeaService.d.ts +220 -0
  61. package/dist/ecosystem/EcosystemIdeaService.d.ts.map +1 -0
  62. package/dist/ecosystem/EcosystemIdeaService.js +757 -0
  63. package/dist/ecosystem/EcosystemIdeaService.js.map +1 -0
  64. package/dist/ecosystem/EcosystemIdeasReplicatedStore.d.ts +14 -0
  65. package/dist/ecosystem/EcosystemIdeasReplicatedStore.d.ts.map +1 -0
  66. package/dist/ecosystem/EcosystemIdeasReplicatedStore.js +38 -0
  67. package/dist/ecosystem/EcosystemIdeasReplicatedStore.js.map +1 -0
  68. package/dist/ecosystem/EcosystemLedger.d.ts +55 -0
  69. package/dist/ecosystem/EcosystemLedger.d.ts.map +1 -0
  70. package/dist/ecosystem/EcosystemLedger.js +357 -0
  71. package/dist/ecosystem/EcosystemLedger.js.map +1 -0
  72. package/dist/ecosystem/buildEcosystemIdeas.d.ts +41 -0
  73. package/dist/ecosystem/buildEcosystemIdeas.d.ts.map +1 -0
  74. package/dist/ecosystem/buildEcosystemIdeas.js +123 -0
  75. package/dist/ecosystem/buildEcosystemIdeas.js.map +1 -0
  76. package/dist/ecosystem/frameworkAdmission.d.ts +11 -0
  77. package/dist/ecosystem/frameworkAdmission.d.ts.map +1 -0
  78. package/dist/ecosystem/frameworkAdmission.js +50 -0
  79. package/dist/ecosystem/frameworkAdmission.js.map +1 -0
  80. package/dist/ecosystem/ideaBands.d.ts +28 -0
  81. package/dist/ecosystem/ideaBands.d.ts.map +1 -0
  82. package/dist/ecosystem/ideaBands.js +121 -0
  83. package/dist/ecosystem/ideaBands.js.map +1 -0
  84. package/dist/ecosystem/ideaPrompts.d.ts +42 -0
  85. package/dist/ecosystem/ideaPrompts.d.ts.map +1 -0
  86. package/dist/ecosystem/ideaPrompts.js +155 -0
  87. package/dist/ecosystem/ideaPrompts.js.map +1 -0
  88. package/dist/ecosystem/projectFetch.d.ts +46 -0
  89. package/dist/ecosystem/projectFetch.d.ts.map +1 -0
  90. package/dist/ecosystem/projectFetch.js +207 -0
  91. package/dist/ecosystem/projectFetch.js.map +1 -0
  92. package/dist/ecosystem/sourceSearch.d.ts +57 -0
  93. package/dist/ecosystem/sourceSearch.d.ts.map +1 -0
  94. package/dist/ecosystem/sourceSearch.js +169 -0
  95. package/dist/ecosystem/sourceSearch.js.map +1 -0
  96. package/dist/ecosystem/types.d.ts +185 -0
  97. package/dist/ecosystem/types.d.ts.map +1 -0
  98. package/dist/ecosystem/types.js +22 -0
  99. package/dist/ecosystem/types.js.map +1 -0
  100. package/dist/native/instar-desktop-host +0 -0
  101. package/dist/scaffold/templates.d.ts.map +1 -1
  102. package/dist/scaffold/templates.js +2 -1
  103. package/dist/scaffold/templates.js.map +1 -1
  104. package/dist/server/AgentServer.d.ts +8 -0
  105. package/dist/server/AgentServer.d.ts.map +1 -1
  106. package/dist/server/AgentServer.js +66 -1
  107. package/dist/server/AgentServer.js.map +1 -1
  108. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  109. package/dist/server/CapabilityIndex.js +9 -0
  110. package/dist/server/CapabilityIndex.js.map +1 -1
  111. package/dist/server/ecosystemIdeaRoutes.d.ts +11 -0
  112. package/dist/server/ecosystemIdeaRoutes.d.ts.map +1 -0
  113. package/dist/server/ecosystemIdeaRoutes.js +232 -0
  114. package/dist/server/ecosystemIdeaRoutes.js.map +1 -0
  115. package/dist/server/routes.d.ts +4 -0
  116. package/dist/server/routes.d.ts.map +1 -1
  117. package/dist/server/routes.js +2 -0
  118. package/dist/server/routes.js.map +1 -1
  119. package/dist/testing/selfActionRegistry.d.ts.map +1 -1
  120. package/dist/testing/selfActionRegistry.js +50 -0
  121. package/dist/testing/selfActionRegistry.js.map +1 -1
  122. package/package.json +2 -2
  123. package/scripts/lint-ecosystem-adoption.mjs +155 -0
  124. package/src/data/builtin-manifest.json +64 -64
  125. package/src/data/llmBenchCoverage.ts +5 -0
  126. package/src/data/provenanceCoverage.ts +8 -0
  127. package/src/data/standards-guard-index.json +1 -1
  128. package/src/data/standards-guard-index.meta.json +2 -2
  129. package/src/data/standards-registry.meta.json +1 -1
  130. package/src/data/state-coherence-registry.json +18 -0
  131. package/src/scaffold/templates.ts +2 -1
  132. package/upgrades/1.3.1599.md +20 -0
  133. package/upgrades/1.3.1600.md +34 -0
  134. package/upgrades/eli16/kept-helper-both-permissions.md +25 -0
  135. package/upgrades/side-effects/ecosystem-idea-pipeline.md +87 -0
  136. package/upgrades/side-effects/kept-helper-both-permissions.md +38 -0
@@ -765,6 +765,9 @@ button.run-mark:focus-visible { outline: 2px solid var(--accent); outline-offset
765
765
  /* ── Development (under-the-hood.md: Shipping + Feedback + Pace) ─────────── */
766
766
  .tiles-dev { margin-top: var(--s-3); }
767
767
  .dev-page .need-card { margin-bottom: var(--s-3); }
768
+ .ideas-page .need-card { margin: var(--s-3) 0; }
769
+ .ideas-page .need-sub { margin: 0; }
770
+ .ideas-page .need-sub:empty { display: none; }
768
771
  .dev-page .older-line { margin: 0 0 var(--s-2); }
769
772
  .authority-card .plan-text { margin: 0; }
770
773
  .plan-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; color: var(--text-strong); padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline-strong); background: var(--surface-raised); }
@@ -27,6 +27,7 @@ import { renderInside } from './inside.js';
27
27
  import { renderFiles } from './files.js';
28
28
  import { renderSessions } from './sessions.js';
29
29
  import { renderMaturation, maturationTile } from './maturation-board.js';
30
+ import { renderIdeas, ideasTile } from './ideas.js';
30
31
  import { paceCard } from './pace.js';
31
32
  import { sheetIsOpen, closeSheet, unlockCheck } from './ui.js';
32
33
 
@@ -538,6 +539,7 @@ function renderGroup(main, g) {
538
539
  el('div', { class: 'tiles' }, g.tabs.map((t) => tile(t))),
539
540
  ...groupExtras(g, { get }), // the Development tile (Work, maintainer mode only) and the developer-tools switch (Settings)
540
541
  ...(g.id === 'work' ? [maturationTile(get)] : []), // shown only when /maturation/board answers
542
+ ...(g.id === 'work' ? [ideasTile(get)] : []), // shown only when /ecosystem-ideas answers
541
543
  ...(g.id === 'work' ? [paceCard(get)] : []), // the Pace card: shown only when /queue-pace answers
542
544
  ];
543
545
  if (g.hood && g.hood.length) {
@@ -567,6 +569,7 @@ const NATIVE = {
567
569
  'work/schedule': renderSchedule,
568
570
  'work/development': renderDevelopment,
569
571
  'work/maturation': renderMaturation,
572
+ 'work/ideas': renderIdeas,
570
573
  'work/sessions': renderSessions,
571
574
  'capacity/machines': renderMachines,
572
575
  'capacity/accounts': renderAccounts,
@@ -0,0 +1,48 @@
1
+ // Ecosystem ideas page: pure wording (docs/specs/ecosystem-idea-pipeline.md §9–§10).
2
+ // Every string that came from a model or another project is written with textContent by the view.
3
+
4
+ export const BANDS = [
5
+ { id: 'now', label: 'Ready to act on', note: 'Checked by two AI families, clear fit, evidence available or cheap.' },
6
+ { id: 'plan', label: 'Worth planning', note: 'Real value, with evidence still to gather.' },
7
+ { id: 'watch', label: 'Watching', note: 'Promising, but young or unproven where it came from.' },
8
+ { id: 'unranked', label: 'Not ranked', note: 'Still in review, or the checks disagreed.' },
9
+ { id: 'stopped', label: 'Stopped', note: 'Kept on record so the same idea is not argued twice.' },
10
+ ];
11
+
12
+ export function ideasInBand(ideas, band) { return ideas.filter((i) => i.band === band); }
13
+
14
+ export function headline(summary) {
15
+ if (summary.neverRun) return 'The weekly review has not run yet.';
16
+ const f = summary.funnel;
17
+ if (f.bands.now > 0) return `${f.bands.now} idea${f.bands.now === 1 ? ' is' : 's are'} ready to act on.`;
18
+ return `Nothing is ready to act on. ${f.seen} seen so far, ${f.adopted} adopted.`;
19
+ }
20
+
21
+ export function funnelLine(f) {
22
+ const last = f.lastAdoptionAt ? `last adopted ${f.lastAdoptionAt.slice(0, 10)}` : 'nothing adopted yet';
23
+ const audit = f.audited ? `, ${f.overturnedInAudit} of ${f.audited} rechecked verdicts overturned` : '';
24
+ return `Seen ${f.seen}, verified ${f.verified}, decided ${f.decided}, adopted ${f.adopted}; ${last}${audit}.`;
25
+ }
26
+
27
+ export function admissionLine(admission) {
28
+ if (!admission.length) return 'No AI service has been tested yet.';
29
+ return admission.map((a) => `${a.framework}: ${a.admitted ? 'allowed to read outside text' : 'refused'}`).join(' · ');
30
+ }
31
+
32
+ const CLASS_WORDS = {
33
+ 'additive-dark': 'New and off by default',
34
+ 'behaviour-changing': 'Changes what agents do',
35
+ 'reduces-capability': 'Takes something away, so it needs a blind trial',
36
+ };
37
+ export function classWords(c) { return CLASS_WORDS[c] || 'Risk not judged yet'; }
38
+
39
+ export function projectLine(w) {
40
+ if (w.stalled) return `Stalled after three failed weeks. ${w.lastError || ''}`.trim();
41
+ if (w.lastError) return `Last try failed, and it will try again. ${w.lastError}`;
42
+ if (!w.lastCheckedAt) return 'Not checked yet.';
43
+ return `Checked ${w.lastCheckedAt.slice(0, 10)}.`;
44
+ }
45
+
46
+ export function planRequest(action, idea, extra = {}) {
47
+ return { action, ...(idea ? { ideaId: idea.id } : {}), ...extra };
48
+ }
@@ -0,0 +1,99 @@
1
+ // Ecosystem ideas page (docs/specs/ecosystem-idea-pipeline.md §9). Advice only: it builds nothing.
2
+ // Every value is written with textContent via el(). Decisions go through the PIN plan and commit.
3
+
4
+ import { el, pageHead, cantTell, askPin, note } from './ui.js';
5
+ import { BANDS, ideasInBand, headline, funnelLine, admissionLine, classWords, projectLine, planRequest } from './ideas-model.js';
6
+
7
+ let probeResult = null;
8
+
9
+ function bearer() { try { return localStorage.getItem('instar_token') || ''; } catch { return ''; } }
10
+
11
+ async function send(path, body) {
12
+ const headers = { Authorization: `Bearer ${bearer()}`, 'Content-Type': 'application/json', 'X-Instar-Request': '1' };
13
+ try {
14
+ const r = await fetch(path, { method: 'POST', headers, body: JSON.stringify(body) });
15
+ return { status: r.status, data: await r.json().catch(() => ({})) };
16
+ } catch { return { status: 0, data: {} }; }
17
+ }
18
+
19
+ /** Render the server's own wording, then spend the PIN on exactly that. */
20
+ async function decide(request, status, refresh) {
21
+ status.textContent = 'Working…';
22
+ const planned = await send('/ecosystem-ideas/plan', request);
23
+ if (planned.status !== 200) { status.textContent = planned.data.detail || planned.data.error || 'That could not be prepared.'; return; }
24
+ const pin = await askPin({ title: 'Confirm', explain: planned.data.renderedText });
25
+ if (!pin) { status.textContent = ''; return; }
26
+ const done = await send('/ecosystem-ideas/commit', { pin: pin.pin, planId: planned.data.planId, nonce: planned.data.nonce });
27
+ pin.pin = '';
28
+ status.textContent = done.status === 200 ? 'Done.' : (done.data.error || 'That did not go through.');
29
+ if (done.status === 200) setTimeout(refresh, 600);
30
+ }
31
+
32
+ function ideaCard(idea, refresh) {
33
+ const status = el('p', { class: 'need-sub', role: 'status' });
34
+ const button = (label, action, extra) => {
35
+ const b = el('button', { class: `${action === 'start-spec' && (idea.band === 'now' || idea.band === 'plan') ? 'btn-primary' : 'btn-quiet'} btn-inline`, type: 'button', text: label });
36
+ b.addEventListener('click', () => decide(planRequest(action, idea, extra), status, refresh));
37
+ return b;
38
+ };
39
+ const actions = idea.band === 'stopped' && idea.declined ? [] : [button('Start a spec', 'start-spec'), button('Decline', 'decline'), button('Later', 'later')];
40
+ return el('div', { class: idea.band === 'now' || idea.band === 'plan' ? 'need-card' : 'need-card muted-card' },
41
+ el('span', { class: 'need-title', text: idea.claim }),
42
+ el('p', { class: 'need-sub', text: `From ${idea.project}. ${idea.bandReason}.` }),
43
+ el('p', { class: 'need-sub', text: classWords(idea.effectClass) }),
44
+ idea.goal ? el('p', { class: 'need-sub', text: `A model's reading, not a measurement. Cost of not adopting: ${idea.goal.costOfNotAdopting}` }) : null,
45
+ el('div', { class: 'confirm-row' }, actions),
46
+ status);
47
+ }
48
+
49
+ export async function renderIdeas(main, api) {
50
+ const refresh = () => renderIdeas(main, api);
51
+ const r = await api.get('/ecosystem-ideas?scope=pool', 12_000);
52
+ if (!r.ok) {
53
+ main.replaceChildren(r.reason === 'switched off on this agent'
54
+ ? el('section', {}, el('div', { class: 'eyebrow', text: 'Ideas' }), el('h1', { text: 'The idea review is not switched on for this agent.' }))
55
+ : cantTell(r.reason));
56
+ return;
57
+ }
58
+ const s = r.data;
59
+ const parts = [
60
+ pageHead({ eyebrow: 'Ideas', headline: headline(s), sub: 'A weekly look at similar projects. Advice only: nothing here changes any agent.' }),
61
+ el('p', { text: funnelLine(s.funnel) }),
62
+ el('p', { class: 'need-sub', text: admissionLine(s.admission) }),
63
+ ];
64
+ for (const band of BANDS) {
65
+ const ideas = ideasInBand(s.ideas, band.id);
66
+ if (!ideas.length) continue;
67
+ parts.push(el('h2', { class: 'eyebrow section-label', text: `${band.label} (${ideas.length})` }), el('p', { class: 'need-sub', text: band.note }), ...ideas.map((i) => ideaCard(i, refresh)));
68
+ }
69
+ parts.push(el('h2', { class: 'eyebrow section-label', text: 'Projects we review' }));
70
+ for (const w of s.watchlist) {
71
+ const status = el('p', { class: 'need-sub', role: 'status' });
72
+ const row = [el('span', { class: 'need-title', text: w.repo }), el('p', { class: 'need-sub', text: projectLine(w) })];
73
+ if (w.stalled) {
74
+ const retry = el('button', { class: 'btn-quiet btn-inline', type: 'button', text: 'Try again' });
75
+ retry.addEventListener('click', async () => { const d = await send('/ecosystem-ideas/projects/retry', { repo: w.repo }); status.textContent = d.status === 200 ? 'It will try at the next round.' : 'That did not go through.'; });
76
+ row.push(retry);
77
+ }
78
+ parts.push(el('div', { class: 'need-card muted-card' }, row, status));
79
+ }
80
+ for (const p of s.proposals) {
81
+ const status = el('p', { class: 'need-sub', role: 'status' });
82
+ const add = el('button', { class: 'btn-primary btn-inline', type: 'button', text: 'Add to the list' });
83
+ add.addEventListener('click', () => decide({ action: 'watchlist-add', repo: p.repo, reason: p.reason }, status, refresh));
84
+ parts.push(el('div', { class: 'need-card' }, el('span', { class: 'need-title', text: `Suggested: ${p.repo}` }), el('p', { class: 'need-sub', text: p.reason }), add, status));
85
+ }
86
+ if (s.lastTickError) parts.push(note(`The last round had a problem: ${s.lastTickError}`));
87
+ main.replaceChildren(el('div', { class: 'ideas-page' }, parts));
88
+ }
89
+
90
+ export function ideasTile(get) {
91
+ const a = el('a', { class: 'tile', href: '#/work/ideas' },
92
+ el('span', { class: 't-icon', icon: 'layers' }),
93
+ el('span', {}, el('span', { class: 't-name', text: 'Ideas from other projects' }),
94
+ el('span', { class: 't-desc', text: 'What a weekly look at similar projects found, ranked.' })));
95
+ const host = el('div', { class: 'tiles', hidden: true }, a);
96
+ if (!probeResult) probeResult = get('/ecosystem-ideas').then((r) => r.ok).catch(() => false);
97
+ probeResult.then((ok) => { host.h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= null;
988
988
  /** Native app conversations (mobile-native-conversations, increment 1) — late-bound for the replication observers. */
989
989
  let _appConversationService = null;
990
+ let _ecosystemLedger = null;
990
991
  // trustworthy-machine-load C5: one fixed holding notice per topic per overload
991
992
  // episode when EVERY machine refuses new work (30-min cooldown; the message
992
993
  // itself is already in durable custody, this only tells the user why it waits).
@@ -4744,6 +4745,9 @@ export async function startServer(options) {
4744
4745
  // are on (no separate switch: for a native conversation the store is the only copy).
4745
4746
  const { APP_CONVERSATIONS_KIND_REGISTRATION } = await import('../core/AppConversationsReplicatedStore.js');
4746
4747
  replicatedKindRegistry.register(APP_CONVERSATIONS_KIND_REGISTRATION);
4748
+ // docs/specs/ecosystem-idea-pipeline.md: inert registration; the store is injected below whenever the pipeline is on.
4749
+ const { ECOSYSTEM_IDEAS_KIND_REGISTRATION } = await import('../ecosystem/EcosystemIdeasReplicatedStore.js');
4750
+ replicatedKindRegistry.register(ECOSYSTEM_IDEAS_KIND_REGISTRATION);
4747
4751
  // mobile-native-conversations §4.8 — the `mobileDeviceKeyLedger` kind (inert registration; on
4748
4752
  // whenever native app conversations are on, so a signed record can be checked on any machine).
4749
4753
  const { DEVICE_KEY_LEDGER_KIND_REGISTRATION } = await import('../core/MobileDeviceKeyLedgerReplicatedStore.js');
@@ -4933,6 +4937,11 @@ export async function startServer(options) {
4933
4937
  _appConversationService?.ingestReplicated(entries.map((e) => appEventFromReplicatedData(e.data)));
4934
4938
  }).catch(() => { });
4935
4939
  }
4940
+ // The idea ledger: peers' events land once, re-validated by the ledger.
4941
+ if (kind === 'ecosystem-idea-event' && _ecosystemLedger) {
4942
+ for (const e of entries)
4943
+ _ecosystemLedger.ingestReplicated(e.data.event);
4944
+ }
4936
4945
  // Device-key ledger rows: each lands only when it verifies under the pinned key of the machine it names.
4937
4946
  if (kind === 'mobile-device-key-ledger-row' && _appConversationService?.deps.keyLedger) {
4938
4947
  const ledger = _appConversationService.deps.keyLedger;
@@ -5050,6 +5059,8 @@ export async function startServer(options) {
5050
5059
  let s = _stateSyncStoresBase ?? {};
5051
5060
  if (_appNativeOn)
5052
5061
  s = { ...s, appConversations: { enabled: true }, mobileDeviceKeyLedger: { enabled: true } };
5062
+ if (resolveDevAgentGate(config.ecosystemIdeas?.enabled, config))
5063
+ s = { ...s, ecosystemIdeas: { enabled: true } };
5053
5064
  if (_accountFollowMeEnabled)
5054
5065
  s = { ...s, subscriptionAccountMeta: { enabled: true } };
5055
5066
  if (_pinReplicateEnabled)
@@ -8725,6 +8736,33 @@ export async function startServer(options) {
8725
8736
  console.warn(` [app-conversations] wiring failed: ${err instanceof Error ? err.message : String(err)}`);
8726
8737
  }
8727
8738
  }
8739
+ // docs/specs/ecosystem-idea-pipeline.md: the ledger is built here so its events replicate; AgentServer builds the service.
8740
+ if (resolveDevAgentGate(config.ecosystemIdeas?.enabled, config)) {
8741
+ try {
8742
+ const { EcosystemLedger } = await import('../ecosystem/EcosystemLedger.js');
8743
+ const { ecosystemDir } = await import('../ecosystem/buildEcosystemIdeas.js');
8744
+ const ecoRepl = await import('../ecosystem/EcosystemIdeasReplicatedStore.js');
8745
+ const ledger = new EcosystemLedger({ dir: ecosystemDir(config.stateDir), machineId: () => cjOwnMachineId ?? config.projectName });
8746
+ if (replicatedRecordEmitter) {
8747
+ const emitter = replicatedRecordEmitter;
8748
+ ledger.setReplicationHook((event) => emitter.emit(ecoRepl.ECOSYSTEM_IDEAS_STORE_KEY, ecoRepl.deriveEcosystemRecordKey(event.eventId), ecoRepl.buildEcosystemRecordData(event)));
8749
+ }
8750
+ if (replicatedPeerStreamReader && cjOwnMachineId) {
8751
+ const reader = replicatedPeerStreamReader;
8752
+ for (const rk of reader.listRecordKeys(ecoRepl.ECOSYSTEM_IDEAS_STORE_KEY)) {
8753
+ for (const r of reader.loadOriginRecords(ecoRepl.ECOSYSTEM_IDEAS_STORE_KEY, rk)) {
8754
+ if (r.origin !== cjOwnMachineId)
8755
+ ledger.ingestReplicated(r.data.event);
8756
+ }
8757
+ }
8758
+ }
8759
+ _ecosystemLedger = ledger;
8760
+ }
8761
+ catch (err) {
8762
+ // @silent-fallback-ok: reported; AgentServer builds a local ledger, or the routes answer 503
8763
+ console.warn(` [ecosystem-ideas] ledger wiring failed: ${err instanceof Error ? err.message : String(err)}`);
8764
+ }
8765
+ }
8728
8766
  // ── durable-conversation-identity §5 funnel + §6.1 step-2 wiring (increment 2) ──
8729
8767
  // followThrough gate: dark-on-fleet / live-on-dev via the developmentAgent
8730
8768
  // gate (config OMITS `enabled` → resolveDevAgentGate resolves it), dryRun
@@ -29340,7 +29378,7 @@ export async function startServer(options) {
29340
29378
  console.warn('[instar] Windows desktop bootstrap diagnostic could not be persisted');
29341
29379
  }
29342
29380
  }
29343
- const server = new AgentServer({ config, singleInstanceLock, agentIdentity: _agentIdentityDeps, terminateSessionAuthority: terminateWithAuthority, subscriptionEmailBinding: credentialLocationLedger, subscriptionEmailBarrier, subscriptionIdentityOracle, sessionManager, llmQueue: sharedLlmQueue, state, scheduler, telegram, telegramOrigin: telegramOriginBoot?.runtime, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, jobAnomalySendAutomationReply: sendAutomationReply, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographerRoots: cartographerRoots ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, accountFollowMePeerViews: async () => { const nickById = new Map((_listPoolMachines?.() ?? []).map((m) => [m.machineId, verifiedEntityName(m.machineId, m.nickname) ?? ''])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? '', url: p.url })); if (peers.length === 0) {
29381
+ const server = new AgentServer({ config, ecosystemLedger: _ecosystemLedger ?? undefined, singleInstanceLock, agentIdentity: _agentIdentityDeps, terminateSessionAuthority: terminateWithAuthority, subscriptionEmailBinding: credentialLocationLedger, subscriptionEmailBarrier, subscriptionIdentityOracle, sessionManager, llmQueue: sharedLlmQueue, state, scheduler, telegram, telegramOrigin: telegramOriginBoot?.runtime, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, jobAnomalySendAutomationReply: sendAutomationReply, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographerRoots: cartographerRoots ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, accountFollowMePeerViews: async () => { const nickById = new Map((_listPoolMachines?.() ?? []).map((m) => [m.machineId, verifiedEntityName(m.machineId, m.nickname) ?? ''])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? '', url: p.url })); if (peers.length === 0) {
29344
29382
  peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: verifiedEntityName(m.machineId, m.nickname) ?? '', url: m.lastKnownUrl }));
29345
29383
  } if (peers.length === 0)
29346
29384
  return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => peers, fetchImpl: fetch, authToken: config.authToken ?? '' }); }, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, accountFollowMeRevocation, credentialRepointing, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? undefined, localVerify: localVerifyService ?? undefined, localVerifyStatus: localVerifyStatus ?? undefined, guardLatchStore: guardLatchStore ?? undefined, messageRouter, summarySentinel, spawnManager, systemReviewer, capabilityMapper, selfKnowledgeTree, coverageAuditor, topicResumeMap: _topicResumeMap ?? undefined, topicProfile: _topicProfileCtx ?? undefined, sessionRefresh: _sessionRefresh ?? undefined, autonomyManager, trustElevationTracker, autonomousEvolution, coordinator: coordinator.enabled ? coordinator : undefined, meshBindActive: coordinator.managers.identityManager.hasIdentity() && config.multiMachine?.meshTransport?.enabled !== false, localSigningKeyPem, leaseTransport, peerEndpointRecorder, getSelfMeshEndpoints, onLeasePullRequest: () => leaseCoordinatorRef?.currentLease() ?? null, liveTailReceiver, handoffWireTransport, onHandoffBegin, onHandoffInitiate: handoffInitiate, handoffInProgress: handoffSentinelInProgress, messageLedger, currentInboundByTopic, replyMarkerTransport, onReplyMarker: messageLedger ? (marker) => { const m = marker; messageLedger.applyRemoteReplyMarker(m.dedupeKey, { platform: m.platform, replyIdempotencyKey: m.replyIdempotencyKey, epoch: m.epoch, topic: m.topic ?? null }); } : undefined, whatsapp: whatsappAdapter, slack: slackAdapter, imessage: imessageAdapter, conversationRegistry, conversationBindAuth, appConversations: _appConversationService ?? undefined, conversationFollowThrough, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, peerHomebaseRelay, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, pairingInvites: threadlinePairingInvites, getLastRelayEvent: threadlineGetLastRelayEvent, a2aRelayForward: _a2aRelayForwardCtx ?? undefined, threadlineReplyWaiters, threadlineMcpHttp, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, relayVerdictCounters: threadlineRelayClient ? (() => ({ ...threadlineRelayClient.relayVerdictCounters, expiredMismatchIgnored: a2aDeliveryTracker?.expiredMismatchIgnored ?? 0 })) : undefined, inboundIdLedger: _inboundIdLedger ?? undefined, inboundIdLedgerDaemonDeferred: () => _inboundIdLedgerDaemonDeferred, responseReviewGate, reviewCanaryBattery, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, ropeHealthMonitor, writeAdmission: writeAdmission ?? undefined, getInboundQueue: () => _inboundQueue, getMachineCoherence: () => _machineCoherenceSentinel, getSingleMachineFailoverGap: () => _singleMachineFailoverGap, getMissingLoginSession: () => _missingLoginSession, getSessionPoolFailoverRunner: () => _sessionPoolFailoverRunnerDriver?.status() ?? null, sessionPoolPromotionActivation: _sessionPoolPromotionActivation, meshRpcDispatcher, deliverA2aToMachine: _deliverA2aToMachine ?? undefined, workingSetPullCoordinator, workingSetArtifactManager, orchestratorPoller, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, replicatedStoreReconciler, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, jevMemoryPicker, forwardCommitmentMutate, sessionOwnershipRegistry, sendDrain: _sendDrain ?? undefined, topicPinStore: _topicPinStore ?? undefined, topicPinSkewQuarantine: _topicPinSkewQuarantine ?? undefined, topicPinFoldView: _topicPinFoldView ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, staleOwnerEngine: _staleOwnerEngine ?? undefined, duplicateReconciler: _duplicateReconciler ?? undefined, ownerDarkLadder: _ownerDarkLadder ?? undefined, spawnAdmission: _spawnAdmission ?? undefined, judgmentProvenance: _judgmentProvenance ?? undefined, leaseHandback: _leaseHandbackCtx ?? undefined, streamTicketStore: _streamTicketStore ?? undefined, poolStreamAllowRemoteInput: config.dashboard?.poolStream?.allowRemoteInput ?? false, poolStreamConnector: _poolStreamConnector ?? undefined, secretSync: _secretSyncHandle ?? undefined, meshSelfId: _meshSelfId ?? undefined, resolveRouterUrl: _resolveRouterUrl ?? undefined, resolvePeerUrls: _resolvePeerUrls ?? undefined, recordRopeResult: _recordRopeResult ?? undefined, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, passkeyRevokeOutbox: _passkeyRevokeOutbox ? () => _passkeyRevokeOutbox : undefined, passkeyPeerOnline: _passkeyPeerOnline, passkeyPoolReader: _passkeyPoolReader ? () => _passkeyPoolReader : undefined, passkeyProofBrowser: async (profileDir) => { const { ChromeCdpReloginBrowser } = await import('../core/ChromeCdpReloginBrowser.js'); return new ChromeCdpReloginBrowser({ userDataDir: profileDir, passkeyMode: true, headless: true, launchTimeoutMs: 30_000, operationTimeoutMs: 20_000 }); }, poolLink: _poolLink ?? undefined, poolPollCache: _poolPollCache ?? undefined, sessionPoolE2EResultStore, proxyCoordinator, topicIntentStore, topicIntentArcCheck, usherSignalStore, intelligence: sharedIntelligence ?? undefined, telegramBridgeConfig, telegramBridge: telegramBridge ?? undefined, threadlineObservability, briefDeps, workingMemory, taskFlowRegistry, threadlineFlowBridge, sessionReaper, agentWorktreeReaper, externalHogSentinel, orphanedWorkSentinel, mcpProcessReaper, codexArmSessionSweeper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, standDownRegistry: _standDownRegistry ?? undefined, standDownAudit: _standDownAudit ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was