instar 1.3.526 → 1.3.528
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 +135 -2
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +27 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CoherenceJournal.d.ts +1 -1
- package/dist/core/CoherenceJournal.d.ts.map +1 -1
- package/dist/core/CoherenceJournal.js +23 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +43 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/PreferencesReplicatedStore.d.ts +212 -0
- package/dist/core/PreferencesReplicatedStore.d.ts.map +1 -0
- package/dist/core/PreferencesReplicatedStore.js +330 -0
- package/dist/core/PreferencesReplicatedStore.js.map +1 -0
- package/dist/core/PreferencesSync.d.ts +8 -0
- package/dist/core/PreferencesSync.d.ts.map +1 -1
- package/dist/core/PreferencesSync.js +8 -0
- package/dist/core/PreferencesSync.js.map +1 -1
- package/dist/core/RelationshipManager.d.ts +61 -1
- package/dist/core/RelationshipManager.d.ts.map +1 -1
- package/dist/core/RelationshipManager.js +86 -2
- package/dist/core/RelationshipManager.js.map +1 -1
- package/dist/core/RelationshipsReplicatedStore.d.ts +298 -0
- package/dist/core/RelationshipsReplicatedStore.d.ts.map +1 -0
- package/dist/core/RelationshipsReplicatedStore.js +660 -0
- package/dist/core/RelationshipsReplicatedStore.js.map +1 -0
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +10 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +3 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts +4 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +1 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts +7 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +19 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/scaffold/templates.ts +3 -1
- package/upgrades/1.3.527.md +31 -0
- package/upgrades/1.3.528.md +34 -0
- package/upgrades/side-effects/ws21-preferences-replicated-store.md +91 -0
- package/upgrades/side-effects/ws23-relationships.md +150 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAuBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAsBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAm1CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAuBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAsBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAm1CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgmatE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -3296,6 +3296,27 @@ export async function startServer(options) {
|
|
|
3296
3296
|
// registry the advert is `{}` (non-participant for every store): the correct
|
|
3297
3297
|
// single-machine / no-store-yet behavior (a strict no-op).
|
|
3298
3298
|
const replicatedKindRegistry = new ReplicatedKindRegistry();
|
|
3299
|
+
// WS2.1 (multi-machine-replicated-store-foundation §4/§13) — register the FIRST
|
|
3300
|
+
// concrete replicated kind, `pref-record`, onto the registry. This is the
|
|
3301
|
+
// DUAL-REGISTRY's dynamic half (the static half is CoherenceJournal.JOURNAL_KINDS,
|
|
3302
|
+
// which now lists 'pref-record'). With the registry no longer empty, the
|
|
3303
|
+
// stateSyncReceive advert self-reports `preferences:true` IFF the store is
|
|
3304
|
+
// enabled (selfStateSyncReceive below), the rollback-unmerge resolves the store's
|
|
3305
|
+
// contributing kind via getByStore, and the /state/* routes have a real store to
|
|
3306
|
+
// serve. Registration itself is INERT — emission/serve/pull stay gated behind
|
|
3307
|
+
// `multiMachine.stateSync.preferences.enabled` (default false ⇒ strict no-op).
|
|
3308
|
+
const { PREF_KIND_REGISTRATION } = await import('../core/PreferencesReplicatedStore.js');
|
|
3309
|
+
replicatedKindRegistry.register(PREF_KIND_REGISTRATION);
|
|
3310
|
+
// WS2.3 (ws23-relationships-userregistry-security) — register the SECOND concrete
|
|
3311
|
+
// replicated kind, `relationship-record`, onto the registry: the FIRST PII kind.
|
|
3312
|
+
// Dual-registry's dynamic half (the static half is CoherenceJournal.JOURNAL_KINDS,
|
|
3313
|
+
// which now lists 'relationship-record'). Registration is INERT — emission/serve/
|
|
3314
|
+
// pull stay gated behind `multiMachine.stateSync.relationships.enabled` (default
|
|
3315
|
+
// false ⇒ strict no-op, NO PII ever crosses a machine boundary). With it registered,
|
|
3316
|
+
// selfStateSyncReceive self-reports `relationships:true` IFF the store is enabled,
|
|
3317
|
+
// and the rollback-unmerge resolves its contributing kind via getByStore.
|
|
3318
|
+
const { RELATIONSHIP_KIND_REGISTRATION } = await import('../core/RelationshipsReplicatedStore.js');
|
|
3319
|
+
replicatedKindRegistry.register(RELATIONSHIP_KIND_REGISTRATION);
|
|
3299
3320
|
// Snapshot-then-tail engine (Component 4 / build-order step 3,
|
|
3300
3321
|
// multi-machine-replicated-store-foundation §6). The cache (FIXED ceiling,
|
|
3301
3322
|
// §8.2 — NOT pool-scaled), the per-peer rebuild breaker (§6.3), and the engine
|
|
@@ -3371,6 +3392,89 @@ export async function startServer(options) {
|
|
|
3371
3392
|
void rollbackUnmerge;
|
|
3372
3393
|
void conflictStore;
|
|
3373
3394
|
void droppedOriginRegistry; // consumed by the /state/* routes + the store PRs (WS2.1+)
|
|
3395
|
+
// WS2.1 — the bypass-proof union reader for the `preferences` store. The single
|
|
3396
|
+
// funnel every replicated preference read routes through (§7.2), so no caller
|
|
3397
|
+
// can read the raw store around the no-clobber rule. `loadOriginRecords` reads
|
|
3398
|
+
// the OWN preference store as the single origin today; when the journal apply
|
|
3399
|
+
// path lands peer `pref-record` replicas (a later rollout stage), the seam
|
|
3400
|
+
// extends to read those peer namespaces too. With only the own origin the union
|
|
3401
|
+
// is a strict no-op (= that one local record), so a single-machine / pre-apply
|
|
3402
|
+
// agent is byte-identical to the legacy read. tierOf returns HIGH (append-both-
|
|
3403
|
+
// and-flag never silently clobbers). The reader is consulted by
|
|
3404
|
+
// /preferences/session-context ONLY when stateSync.preferences.enabled is true.
|
|
3405
|
+
const { ReplicatedStoreReader } = await import('../core/ReplicatedStoreReader.js');
|
|
3406
|
+
const { PreferencesManager: _PMForUnion } = await import('../core/PreferencesManager.js');
|
|
3407
|
+
const { prefEntryToOriginRecord, prefTierOf, PREF_STORE_KEY } = await import('../core/PreferencesReplicatedStore.js');
|
|
3408
|
+
const preferencesUnionReader = new ReplicatedStoreReader({
|
|
3409
|
+
registry: replicatedKindRegistry,
|
|
3410
|
+
stores: config.multiMachine?.stateSync,
|
|
3411
|
+
tierOf: prefTierOf,
|
|
3412
|
+
loadOriginRecords: (store, recordKey) => {
|
|
3413
|
+
if (store !== PREF_STORE_KEY || _meshSelfId === null)
|
|
3414
|
+
return [];
|
|
3415
|
+
const mgr = new _PMForUnion(config.stateDir);
|
|
3416
|
+
const own = mgr.getAllForSync().find((p) => p.dedupeKey === recordKey);
|
|
3417
|
+
return own ? [prefEntryToOriginRecord(own, _meshSelfId)] : [];
|
|
3418
|
+
},
|
|
3419
|
+
listRecordKeys: (store) => {
|
|
3420
|
+
if (store !== PREF_STORE_KEY)
|
|
3421
|
+
return [];
|
|
3422
|
+
const mgr = new _PMForUnion(config.stateDir);
|
|
3423
|
+
return mgr.getAllForSync().map((p) => p.dedupeKey);
|
|
3424
|
+
},
|
|
3425
|
+
droppedOrigins: droppedOriginRegistry,
|
|
3426
|
+
conflictStore,
|
|
3427
|
+
});
|
|
3428
|
+
// preferencesUnionReader is passed into AgentServer below (consumed by
|
|
3429
|
+
// /preferences/session-context's foundation path).
|
|
3430
|
+
// WS2.3 — the relationships manager handle is declared here (assigned later, at
|
|
3431
|
+
// its construction site) so the union-reader closures below can reference it. The
|
|
3432
|
+
// closures only deref it at request time (well after assignment), so the forward
|
|
3433
|
+
// reference is safe.
|
|
3434
|
+
let relationships;
|
|
3435
|
+
// WS2.3 — the bypass-proof union reader for the `relationships` store (REQ-M7).
|
|
3436
|
+
// The single funnel every replicated relationship read routes through, so no
|
|
3437
|
+
// caller reads a raw replica around the no-clobber rule. `loadOriginRecords`
|
|
3438
|
+
// materializes the OWN relationship store as the single origin today (via
|
|
3439
|
+
// relationshipToOriginRecord, keyed on the channel-set identity surface — the
|
|
3440
|
+
// local UUID is NEVER replicated); when the journal apply path lands peer
|
|
3441
|
+
// `relationship-record` replicas (a later rollout stage), the seam extends to read
|
|
3442
|
+
// those peer namespaces too. With only the own origin the union is a strict no-op
|
|
3443
|
+
// (= that one local record). tierOf returns HIGH (append-both-and-flag never
|
|
3444
|
+
// silently clobbers two divergent people). Consulted by the relationships peer-read
|
|
3445
|
+
// surface ONLY when stateSync.relationships.enabled is true.
|
|
3446
|
+
const { relationshipTierOf, relationshipToOriginRecord, deriveRelationshipRecordKey, mergeUnionToRelationships, renderForeignRelationshipContext, RELATIONSHIP_STORE_KEY } = await import('../core/RelationshipsReplicatedStore.js');
|
|
3447
|
+
const relationshipsUnionReader = new ReplicatedStoreReader({
|
|
3448
|
+
registry: replicatedKindRegistry,
|
|
3449
|
+
stores: config.multiMachine?.stateSync,
|
|
3450
|
+
tierOf: relationshipTierOf,
|
|
3451
|
+
loadOriginRecords: (store, recordKey) => {
|
|
3452
|
+
if (store !== RELATIONSHIP_STORE_KEY || _meshSelfId === null || !relationships)
|
|
3453
|
+
return [];
|
|
3454
|
+
// Own-origin materialization: find the local record whose channel-set identity
|
|
3455
|
+
// surface matches this recordKey (mirrors the manager's channel-collision logic).
|
|
3456
|
+
for (const r of relationships.getAll()) {
|
|
3457
|
+
if (deriveRelationshipRecordKey(r.channels) === recordKey) {
|
|
3458
|
+
const o = relationshipToOriginRecord(r, _meshSelfId);
|
|
3459
|
+
return o ? [o] : [];
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
return [];
|
|
3463
|
+
},
|
|
3464
|
+
listRecordKeys: (store) => {
|
|
3465
|
+
if (store !== RELATIONSHIP_STORE_KEY || !relationships)
|
|
3466
|
+
return [];
|
|
3467
|
+
const keys = [];
|
|
3468
|
+
for (const r of relationships.getAll()) {
|
|
3469
|
+
const k = deriveRelationshipRecordKey(r.channels);
|
|
3470
|
+
if (k !== null)
|
|
3471
|
+
keys.push(k);
|
|
3472
|
+
}
|
|
3473
|
+
return keys;
|
|
3474
|
+
},
|
|
3475
|
+
droppedOrigins: droppedOriginRegistry,
|
|
3476
|
+
conflictStore,
|
|
3477
|
+
});
|
|
3374
3478
|
// Read local signing key for machine route authentication
|
|
3375
3479
|
let localSigningKeyPem = '';
|
|
3376
3480
|
if (coordinator.enabled && coordinator.identity) {
|
|
@@ -4151,7 +4255,6 @@ export async function startServer(options) {
|
|
|
4151
4255
|
: 'provenance + patterns only (no LLM review)';
|
|
4152
4256
|
console.log(pc.green(` Input Guard: enabled (action: ${guardConfig.action ?? 'warn'}, ${reviewBackend})`));
|
|
4153
4257
|
}
|
|
4154
|
-
let relationships;
|
|
4155
4258
|
if (config.relationships) {
|
|
4156
4259
|
// Wire LLM intelligence for identity resolution. Subscription path only —
|
|
4157
4260
|
// direct Anthropic API is forbidden per Rule 2 of the path constraints.
|
|
@@ -4186,6 +4289,36 @@ export async function startServer(options) {
|
|
|
4186
4289
|
relationships = new RelationshipManager(config.relationships);
|
|
4187
4290
|
const count = relationships.getAll().length;
|
|
4188
4291
|
console.log(pc.green(` Relationships loaded: ${count} tracked (${intelligenceMode})`));
|
|
4292
|
+
// WS2.3 — inject the union-read seam (REQ-M7/M14). The peer-read surface (what
|
|
4293
|
+
// my OTHER machines know about this person) resolves THROUGH the bypass-proof
|
|
4294
|
+
// union reader and returns FOREIGN, READ-ONLY, neutralized context blocks
|
|
4295
|
+
// (each wrapped in `<replicated-untrusted-data>`). It is DISTINCT from the
|
|
4296
|
+
// local-authoritative resolveByChannel/getContextForPerson — identity
|
|
4297
|
+
// RESOLUTION of an inbound principal stays local-only. The seam is a strict
|
|
4298
|
+
// no-op while `multiMachine.stateSync.relationships.enabled` is false (the reader
|
|
4299
|
+
// returns nothing for a disabled store), so a single-machine / dark agent sees
|
|
4300
|
+
// an empty peer view. The emit seam (the `put`/tombstone funnel) is wired in a
|
|
4301
|
+
// later rollout stage on the same machinery — registered + dark here.
|
|
4302
|
+
relationships.setPeerReadSeam({
|
|
4303
|
+
peerContextForChannels: (channels) => {
|
|
4304
|
+
const recordKey = deriveRelationshipRecordKey(channels);
|
|
4305
|
+
if (recordKey === null)
|
|
4306
|
+
return [];
|
|
4307
|
+
const result = relationshipsUnionReader.read(RELATIONSHIP_STORE_KEY, recordKey);
|
|
4308
|
+
const views = mergeUnionToRelationships(new Map([[recordKey, result]]));
|
|
4309
|
+
// Only FOREIGN origins are surfaced (the local record is already the
|
|
4310
|
+
// authoritative getContextForPerson answer); render each as untrusted data.
|
|
4311
|
+
const out = [];
|
|
4312
|
+
for (const v of views) {
|
|
4313
|
+
if (v.origin === _meshSelfId)
|
|
4314
|
+
continue;
|
|
4315
|
+
const block = renderForeignRelationshipContext(v);
|
|
4316
|
+
if (block)
|
|
4317
|
+
out.push(block);
|
|
4318
|
+
}
|
|
4319
|
+
return out;
|
|
4320
|
+
},
|
|
4321
|
+
});
|
|
4189
4322
|
}
|
|
4190
4323
|
// Set up quota tracking if enabled
|
|
4191
4324
|
let quotaTracker;
|
|
@@ -14707,7 +14840,7 @@ export async function startServer(options) {
|
|
|
14707
14840
|
carrier: _topicProfileCarrier,
|
|
14708
14841
|
}
|
|
14709
14842
|
: null;
|
|
14710
|
-
const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographer: cartographer ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? 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, localSigningKeyPem, leaseTransport, 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, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, getInboundQueue: () => _inboundQueue, meshRpcDispatcher, workingSetPullCoordinator, commitmentReplicaStore, preferenceReplicaStore, conflictStore, rollbackUnmerge, droppedOriginRegistry, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? 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, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, poolLink: _poolLink ?? undefined, sessionPoolE2EResultStore, proxyCoordinator, topicIntentStore, topicIntentArcCheck, usherSignalStore, intelligence: sharedIntelligence ?? undefined, telegramBridgeConfig, telegramBridge: telegramBridge ?? undefined, threadlineObservability, briefDeps, workingMemory, taskFlowRegistry, threadlineFlowBridge, sessionReaper, agentWorktreeReaper, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
14843
|
+
const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographer: cartographer ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? 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, localSigningKeyPem, leaseTransport, 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, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, getInboundQueue: () => _inboundQueue, meshRpcDispatcher, workingSetPullCoordinator, commitmentReplicaStore, preferenceReplicaStore, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? 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, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, poolLink: _poolLink ?? undefined, sessionPoolE2EResultStore, proxyCoordinator, topicIntentStore, topicIntentArcCheck, usherSignalStore, intelligence: sharedIntelligence ?? undefined, telegramBridgeConfig, telegramBridge: telegramBridge ?? undefined, threadlineObservability, briefDeps, workingMemory, taskFlowRegistry, threadlineFlowBridge, sessionReaper, agentWorktreeReaper, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
14711
14844
|
// wired before the server existed; from here on inbound binds use the
|
|
14712
14845
|
// server's own store instance.
|
|
14713
14846
|
_agentServerRef = server;
|