instar 1.3.773 → 1.3.775
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 +95 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +7 -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 +9 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +175 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +15 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/WorkingSetArtifactManager.d.ts +104 -0
- package/dist/core/WorkingSetArtifactManager.d.ts.map +1 -0
- package/dist/core/WorkingSetArtifactManager.js +174 -0
- package/dist/core/WorkingSetArtifactManager.js.map +1 -0
- package/dist/core/WorkingSetArtifactReplicatedStore.d.ts +203 -0
- package/dist/core/WorkingSetArtifactReplicatedStore.d.ts.map +1 -0
- package/dist/core/WorkingSetArtifactReplicatedStore.js +384 -0
- package/dist/core/WorkingSetArtifactReplicatedStore.js.map +1 -0
- package/dist/core/WorkingSetManifest.d.ts +5 -0
- package/dist/core/WorkingSetManifest.d.ts.map +1 -1
- package/dist/core/WorkingSetManifest.js +10 -0
- package/dist/core/WorkingSetManifest.js.map +1 -1
- package/dist/core/WorkingSetPull.d.ts +5 -0
- package/dist/core/WorkingSetPull.d.ts.map +1 -1
- package/dist/core/WorkingSetPull.js +1 -0
- package/dist/core/WorkingSetPull.js.map +1 -1
- package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
- package/dist/core/WriteDomainRegistry.js +12 -0
- package/dist/core/WriteDomainRegistry.js.map +1 -1
- package/dist/server/AgentServer.d.ts +1 -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 +104 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +66 -66
- package/src/templates/hooks/settings-template.json +10 -0
- package/upgrades/1.3.774.md +39 -0
- package/upgrades/1.3.775.md +44 -0
- package/upgrades/side-effects/idle-zombie-veto-key-consistency.md +67 -0
- package/upgrades/side-effects/intelligent-working-set-lazy-sync.md +220 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwDH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAyBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AA6H7D,OAAO,KAAK,EAAW,oBAAoB,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAgFtD;;;;;;;;;;;;;;;;;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,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I,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -3710,6 +3710,13 @@ export async function startServer(options) {
|
|
|
3710
3710
|
// the mesh client) can reference it lazily; constructed in the mesh-wiring
|
|
3711
3711
|
// block ONLY under the same explicit replication gate.
|
|
3712
3712
|
let workingSetPullCoordinator;
|
|
3713
|
+
// Source-3 interactive-artifact manager (intelligent-working-set-lazy-sync). File-backed
|
|
3714
|
+
// (.instar/working-set/artifacts.json), hoisted so ONE instance is shared by the read-side
|
|
3715
|
+
// (WorkingSetPullServer), the replication emit-side (setReplicationEmitter), AND the recorder
|
|
3716
|
+
// route (POST /coherence/working-set/record). Sharing matters: the emit seam attaches to this
|
|
3717
|
+
// instance, so an artifact recorded via the route replicates when the flag is enabled.
|
|
3718
|
+
// Assigned lazily (??=) at whichever of those sites runs first; undefined ⇒ the routes 503.
|
|
3719
|
+
let workingSetArtifactManager;
|
|
3713
3720
|
// Commitments-coherence receive side (COMMITMENTS-COHERENCE-SPEC §3.2) —
|
|
3714
3721
|
// same explicit replication gate; undefined = dark (verb answers
|
|
3715
3722
|
// 'disabled', merge layer returns own rows only).
|
|
@@ -3788,9 +3795,21 @@ export async function startServer(options) {
|
|
|
3788
3795
|
const wsReaderMod = await import('../core/CoherenceJournalReader.js');
|
|
3789
3796
|
const wsReader = new wsReaderMod.CoherenceJournalReader({ stateDir: config.stateDir });
|
|
3790
3797
|
const ws = cjCfg?.workingSet;
|
|
3798
|
+
// Source 3 (intelligent-working-set-lazy-sync): the interactive-artifact manager.
|
|
3799
|
+
// File-backed, so this read-side instance sees the same artifacts.json the
|
|
3800
|
+
// replication-side instance (constructed later for the emit seam) writes. Only
|
|
3801
|
+
// READY rows nominate; each relPath is re-jailed by the canonical validator here
|
|
3802
|
+
// AND re-jailed + scanned inside computeWorkingSet (defense in depth).
|
|
3803
|
+
const wsArtStoreMod = await import('../core/WorkingSetArtifactReplicatedStore.js');
|
|
3804
|
+
const wsArtMgrMod = await import('../core/WorkingSetArtifactManager.js');
|
|
3805
|
+
const wsArtifactMgrServe = (workingSetArtifactManager ??= new wsArtMgrMod.WorkingSetArtifactManager(config.stateDir));
|
|
3791
3806
|
workingSetPullServer = new wsMod.WorkingSetPullServer({
|
|
3792
3807
|
stateDir: config.stateDir,
|
|
3793
3808
|
readRuns: (topic) => wsReader.readOwnAutonomousRuns(topic, cjMachineId),
|
|
3809
|
+
readInteractiveArtifacts: (topic) => wsArtifactMgrServe
|
|
3810
|
+
.getReadyRows(topic)
|
|
3811
|
+
.map((r) => r.relPath)
|
|
3812
|
+
.filter((rel) => wsArtStoreMod.jailValidateRelPath(rel) !== null),
|
|
3794
3813
|
caps: {
|
|
3795
3814
|
...(ws?.maxFileBytes != null ? { maxFileBytes: ws.maxFileBytes } : {}),
|
|
3796
3815
|
...(ws?.headlineFileBytes != null ? { headlineFileBytes: ws.headlineFileBytes } : {}),
|
|
@@ -3965,6 +3984,18 @@ export async function startServer(options) {
|
|
|
3965
3984
|
// the file body), keyed on a content fingerprint (KnowledgeReplicatedStore.deriveKnowledgeRecordKey).
|
|
3966
3985
|
const { KNOWLEDGE_KIND_REGISTRATION } = await import('../core/KnowledgeReplicatedStore.js');
|
|
3967
3986
|
replicatedKindRegistry.register(KNOWLEDGE_KIND_REGISTRATION);
|
|
3987
|
+
// intelligent-working-set-lazy-sync — register the `working-set-artifact` replicated
|
|
3988
|
+
// kind (a per-topic index of files the agent wrote INTERACTIVELY under the .instar/
|
|
3989
|
+
// jail, so an interactive artifact follows a conversation across machines — the case
|
|
3990
|
+
// the computed WorkingSetManifest engine misses). Dual-registry's dynamic half (the
|
|
3991
|
+
// static half is CoherenceJournal.JOURNAL_KINDS, which now lists 'working-set-artifact').
|
|
3992
|
+
// Registration is INERT — emission/serve/pull stay gated behind
|
|
3993
|
+
// `multiMachine.stateSync.workingSetArtifact.enabled` (default false ⇒ strict no-op).
|
|
3994
|
+
// Only the row METADATA crosses (relPath/contentHash/state), keyed on a NON-path-shaped
|
|
3995
|
+
// sha256(jailedRelPath)+':'+producer surface; the file BODY is fetched by the existing
|
|
3996
|
+
// working-set engine, never replicated here.
|
|
3997
|
+
const { WORKING_SET_ARTIFACT_KIND_REGISTRATION } = await import('../core/WorkingSetArtifactReplicatedStore.js');
|
|
3998
|
+
replicatedKindRegistry.register(WORKING_SET_ARTIFACT_KIND_REGISTRATION);
|
|
3968
3999
|
// WS2.5 (multi-machine-replicated-store-foundation) — register the FIFTH concrete
|
|
3969
4000
|
// replicated kind, `evolution-action-record`, onto the registry: the FOURTH memory-family
|
|
3970
4001
|
// kind (after WS2.4 knowledge + WS2.2 learnings + WS2.3 relationships). Dual-registry's
|
|
@@ -10546,6 +10577,69 @@ export async function startServer(options) {
|
|
|
10546
10577
|
emitDelete: (title, url, type, deletedAt) => emitter.emit(KNOWLEDGE_STORE_KEY, deriveKnowledgeRecordKey(title, url, type), (hlc, origin, observed) => buildKnowledgeTombstoneData({ title, url, type, hlc, origin, deletedAt, observed })),
|
|
10547
10578
|
});
|
|
10548
10579
|
}
|
|
10580
|
+
// intelligent-working-set-lazy-sync — the union reader for the `workingSetArtifact`
|
|
10581
|
+
// store. loadOriginRecords materializes the OWN interactive-artifact rows (via
|
|
10582
|
+
// workingSetArtifactToOriginRecord, keyed on the NON-path-shaped
|
|
10583
|
+
// sha256(jailedRelPath)+':'+producer surface); peer replicas land via the journal-apply
|
|
10584
|
+
// path (a later rollout stage). With only the own origin the union is a strict no-op.
|
|
10585
|
+
// tierOf HIGH (append-both-and-flag; the READ layer is advisory). The emit seam is
|
|
10586
|
+
// attached ONLY when stateSync.workingSetArtifact.enabled is true (default false ⇒ NOT
|
|
10587
|
+
// injected ⇒ strict no-op). The manager is ALSO the recorder route's write target.
|
|
10588
|
+
const { workingSetArtifactTierOf, workingSetArtifactToOriginRecord, deriveWorkingSetArtifactRecordKey, buildWorkingSetArtifactData, buildWorkingSetArtifactTombstoneData, WORKING_SET_ARTIFACT_STORE_KEY, } = await import('../core/WorkingSetArtifactReplicatedStore.js');
|
|
10589
|
+
const { WorkingSetArtifactManager } = await import('../core/WorkingSetArtifactManager.js');
|
|
10590
|
+
// Consolidate onto the hoisted instance (shared with the read-side + the recorder route).
|
|
10591
|
+
// The local alias carries the definite type for use inside the reader/emit closures.
|
|
10592
|
+
const wsArtMgr = (workingSetArtifactManager ??= new WorkingSetArtifactManager(config.stateDir));
|
|
10593
|
+
// Boot-time record GC (intelligent-working-set-lazy-sync F3): purge interactive-artifact
|
|
10594
|
+
// rows older than the record TTL so the metadata catalog stays bounded across restarts
|
|
10595
|
+
// (a LOCAL cleanup, not a tombstone — a peer's copy ages out under its own TTL). Distinct
|
|
10596
|
+
// from the engine's 7d pending-pull TTL.
|
|
10597
|
+
try {
|
|
10598
|
+
const wsTtlDays = config.coherenceJournal?.workingSet?.recordTtlDays;
|
|
10599
|
+
const wsTtlMs = (typeof wsTtlDays === 'number' && wsTtlDays > 0 ? wsTtlDays : 30) * 24 * 60 * 60 * 1000;
|
|
10600
|
+
const wsPurged = wsArtMgr.gc(wsTtlMs);
|
|
10601
|
+
if (wsPurged > 0)
|
|
10602
|
+
console.log(pc.dim(` [ws-artifact] GC purged ${wsPurged} record(s) older than ${Math.round(wsTtlMs / 86400000)}d`));
|
|
10603
|
+
}
|
|
10604
|
+
catch { /* @silent-fallback-ok: record GC is best-effort housekeeping, never fails boot */ }
|
|
10605
|
+
const workingSetArtifactUnionReader = new ReplicatedStoreReader({
|
|
10606
|
+
registry: replicatedKindRegistry,
|
|
10607
|
+
stores: _stateSyncStoresResolved,
|
|
10608
|
+
tierOf: workingSetArtifactTierOf,
|
|
10609
|
+
loadOriginRecords: (store, recordKey) => {
|
|
10610
|
+
if (store !== WORKING_SET_ARTIFACT_STORE_KEY || _meshSelfId === null)
|
|
10611
|
+
return [];
|
|
10612
|
+
for (const r of wsArtMgr.getAllRows()) {
|
|
10613
|
+
if (deriveWorkingSetArtifactRecordKey(r.relPath, _meshSelfId) === recordKey) {
|
|
10614
|
+
const o = workingSetArtifactToOriginRecord({ ...r, producerMachineId: _meshSelfId }, _meshSelfId);
|
|
10615
|
+
return o ? [o] : [];
|
|
10616
|
+
}
|
|
10617
|
+
}
|
|
10618
|
+
return [];
|
|
10619
|
+
},
|
|
10620
|
+
listRecordKeys: (store) => {
|
|
10621
|
+
if (store !== WORKING_SET_ARTIFACT_STORE_KEY || _meshSelfId === null)
|
|
10622
|
+
return [];
|
|
10623
|
+
const keys = [];
|
|
10624
|
+
for (const r of wsArtMgr.getAllRows()) {
|
|
10625
|
+
const k = deriveWorkingSetArtifactRecordKey(r.relPath, _meshSelfId);
|
|
10626
|
+
if (k !== null)
|
|
10627
|
+
keys.push(k);
|
|
10628
|
+
}
|
|
10629
|
+
return keys;
|
|
10630
|
+
},
|
|
10631
|
+
droppedOrigins: droppedOriginRegistry,
|
|
10632
|
+
conflictStore,
|
|
10633
|
+
});
|
|
10634
|
+
void workingSetArtifactUnionReader;
|
|
10635
|
+
if (replicatedRecordEmitter && _meshSelfId !== null) {
|
|
10636
|
+
const emitter = replicatedRecordEmitter;
|
|
10637
|
+
const selfId = _meshSelfId;
|
|
10638
|
+
wsArtMgr.setReplicationEmitter({
|
|
10639
|
+
emitPut: (row) => emitter.emit(WORKING_SET_ARTIFACT_STORE_KEY, deriveWorkingSetArtifactRecordKey(row.relPath, selfId), (hlc, origin, observed) => buildWorkingSetArtifactData({ row, hlc, origin, observed })),
|
|
10640
|
+
emitDelete: (d) => emitter.emit(WORKING_SET_ARTIFACT_STORE_KEY, deriveWorkingSetArtifactRecordKey(d.relPath, d.producerMachineId), (hlc, origin, observed) => buildWorkingSetArtifactTombstoneData({ relPath: d.relPath, producerMachineId: d.producerMachineId, hlc, origin, deletedAt: d.deletedAt, observed })),
|
|
10641
|
+
});
|
|
10642
|
+
}
|
|
10549
10643
|
// WS2.5 — the bypass-proof union reader for the `evolutionActions` store. The single
|
|
10550
10644
|
// funnel every replicated action read routes through, so no caller reads a raw replica
|
|
10551
10645
|
// around the no-clobber rule. `loadOriginRecords` materializes the OWN action queue (the
|
|
@@ -21118,7 +21212,7 @@ export async function startServer(options) {
|
|
|
21118
21212
|
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, accountFollowMePeerViews: async () => { const nickById = new Map((_listPoolMachines?.() ?? []).map((m) => [m.machineId, m.nickname ?? m.machineId])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? p.machineId, url: p.url })); if (peers.length === 0) {
|
|
21119
21213
|
peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl }));
|
|
21120
21214
|
} if (peers.length === 0)
|
|
21121
|
-
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, 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, conversationFollowThrough, 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, 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, meshRpcDispatcher, workingSetPullCoordinator, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? undefined, topicPinSkewQuarantine: _topicPinSkewQuarantine ?? undefined, topicPinFoldView: _topicPinFoldView ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, staleOwnerEngine: _staleOwnerEngine ?? 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, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, 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, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
21215
|
+
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, 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, conversationFollowThrough, 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, 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, meshRpcDispatcher, workingSetPullCoordinator, workingSetArtifactManager, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? undefined, topicPinSkewQuarantine: _topicPinSkewQuarantine ?? undefined, topicPinFoldView: _topicPinFoldView ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, staleOwnerEngine: _staleOwnerEngine ?? 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, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, 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, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
21122
21216
|
// wired before the server existed; from here on inbound binds use the
|
|
21123
21217
|
// server's own store instance.
|
|
21124
21218
|
_agentServerRef = server;
|