instar 1.3.614 → 1.3.615
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 +58 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +4 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/AccountFollowMeRevocationStore.d.ts +34 -0
- package/dist/core/AccountFollowMeRevocationStore.d.ts.map +1 -0
- package/dist/core/AccountFollowMeRevocationStore.js +76 -0
- package/dist/core/AccountFollowMeRevocationStore.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts +9 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +30 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/accountFollowMeCooperativeWipe.d.ts +66 -0
- package/dist/core/accountFollowMeCooperativeWipe.d.ts.map +1 -0
- package/dist/core/accountFollowMeCooperativeWipe.js +179 -0
- package/dist/core/accountFollowMeCooperativeWipe.js.map +1 -0
- 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 +6 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +42 -1
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/upgrades/1.3.615.md +35 -0
- package/upgrades/side-effects/ws52-account-follow-me-revocation-wiring.md +104 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO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AC,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
|
@@ -9938,6 +9938,63 @@ export async function startServer(options) {
|
|
|
9938
9938
|
}, config.subscriptionPool?.enrollment?.reissueSweepMs ?? 5 * 60_000);
|
|
9939
9939
|
if (enrollReissueTimer.unref)
|
|
9940
9940
|
enrollReissueTimer.unref();
|
|
9941
|
+
// ── WS5.2 R12 — Account Follow-Me revocation data-plane wiring (PER-SERVER model, OQ6) ──
|
|
9942
|
+
// The operator revokes the `account-follow-me` mandate on the TARGET machine's OWN dashboard,
|
|
9943
|
+
// so when /mandate/:id/revoke fires here, THIS machine IS the target — the data-plane wipe is
|
|
9944
|
+
// LOCAL (cooperative-online posture), never a cross-machine wipe-instruction. The pure executor
|
|
9945
|
+
// (AccountFollowMeRevocation) is constructed once with REAL deps:
|
|
9946
|
+
// - cooperativeWipe: framework logout against the account's CLAUDE_CONFIG_DIR + delete the
|
|
9947
|
+
// per-account config slot (SafeFsExecutor) + SubscriptionPool.remove(accountId) — FAIL-CLOSED
|
|
9948
|
+
// (a step that throws surfaces as not-done, never a silent "removed").
|
|
9949
|
+
// - pendingStore: a DURABLE JSON ledger (survives restarts) — offline targets get a bounded
|
|
9950
|
+
// pending wipe that fires on reconnect or escalates to revocation-FAILED at the deadline.
|
|
9951
|
+
// - emitRevocationFailed: the real attention emitter (HIGH item, one running item per pair).
|
|
9952
|
+
// - enabled: the SAME dev-gate as the rest of accountFollowMe (LIVE on a dev agent / DARK on
|
|
9953
|
+
// the fleet), read LIVE per-call so a config flip is honored without a restart.
|
|
9954
|
+
// Everything is DARK behind `multiMachine.accountFollowMe`: when the gate resolves OFF, revoke()
|
|
9955
|
+
// is a strict no-op (the route trigger does nothing) and sweepDeadlines() returns [].
|
|
9956
|
+
const { AccountFollowMeRevocation } = await import('../core/AccountFollowMeRevocation.js');
|
|
9957
|
+
const { DurablePendingWipeStore } = await import('../core/AccountFollowMeRevocationStore.js');
|
|
9958
|
+
const { buildCooperativeWipe } = await import('../core/accountFollowMeCooperativeWipe.js');
|
|
9959
|
+
const accountFollowMeRevocationEnabled = () => resolveDevAgentGate(config.multiMachine?.accountFollowMe?.enabled, config);
|
|
9960
|
+
const accountFollowMeRevocation = new AccountFollowMeRevocation({
|
|
9961
|
+
enabled: accountFollowMeRevocationEnabled,
|
|
9962
|
+
cooperativeWipe: buildCooperativeWipe({
|
|
9963
|
+
pool: subscriptionPool,
|
|
9964
|
+
log: (m) => console.log(m),
|
|
9965
|
+
}),
|
|
9966
|
+
pendingStore: new DurablePendingWipeStore({ stateDir: config.stateDir }),
|
|
9967
|
+
emitRevocationFailed: (item) => {
|
|
9968
|
+
if (!telegram)
|
|
9969
|
+
return;
|
|
9970
|
+
void telegram.createAttentionItem({
|
|
9971
|
+
id: item.id,
|
|
9972
|
+
title: item.title,
|
|
9973
|
+
summary: item.body,
|
|
9974
|
+
description: item.body,
|
|
9975
|
+
category: 'account-follow-me',
|
|
9976
|
+
priority: 'HIGH',
|
|
9977
|
+
sourceContext: 'account-follow-me-revocation',
|
|
9978
|
+
});
|
|
9979
|
+
},
|
|
9980
|
+
reconnectDeadlineMs: () => config
|
|
9981
|
+
.multiMachine?.accountFollowMe?.revocationReconnectDeadlineMs ?? 6 * 60 * 60_000,
|
|
9982
|
+
log: (m) => console.log(m),
|
|
9983
|
+
});
|
|
9984
|
+
// R12.iii — periodic deadline sweep so an offline-pending wipe past its reconnect-deadline
|
|
9985
|
+
// ESCALATES to the LOUD revocation-FAILED attention item (resume-queue give-up discipline).
|
|
9986
|
+
// sweepDeadlines() is a strict no-op while the feature resolves dark (the gate lives INSIDE it),
|
|
9987
|
+
// so the timer can always run. Reentrancy is irrelevant (synchronous); unref'd so it never holds
|
|
9988
|
+
// the process open. Cleared on shutdown alongside the other subscription timers.
|
|
9989
|
+
const accountFollowMeRevocationSweepTimer = setInterval(() => {
|
|
9990
|
+
try {
|
|
9991
|
+
accountFollowMeRevocation.sweepDeadlines();
|
|
9992
|
+
}
|
|
9993
|
+
catch (e) {
|
|
9994
|
+
console.warn(`[account-follow-me] revocation deadline sweep error: ${e instanceof Error ? e.message : String(e)}`);
|
|
9995
|
+
}
|
|
9996
|
+
}, 5 * 60_000);
|
|
9997
|
+
accountFollowMeRevocationSweepTimer.unref?.();
|
|
9941
9998
|
// Commitment Sentinel — LLM-powered scanner that finds unregistered commitments.
|
|
9942
9999
|
let commitmentSentinel;
|
|
9943
10000
|
if (sharedIntelligence) {
|
|
@@ -16941,7 +16998,7 @@ export async function startServer(options) {
|
|
|
16941
16998
|
}
|
|
16942
16999
|
: null;
|
|
16943
17000
|
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 machines = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl); if (machines.length === 0)
|
|
16944
|
-
return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => machines.map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl })), fetchImpl: fetch, authToken: config.authToken ?? '' }); }, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, 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, 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, replicatedRecordEmitter, 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, poolPollCache: _poolPollCache ?? 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, autonomousLivenessReconciler, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
17001
|
+
return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => machines.map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl })), 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, 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, replicatedRecordEmitter, 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, poolPollCache: _poolPollCache ?? 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, autonomousLivenessReconciler, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
16945
17002
|
// wired before the server existed; from here on inbound binds use the
|
|
16946
17003
|
// server's own store instance.
|
|
16947
17004
|
_agentServerRef = server;
|