@decibelsystems/tools 2.2.0-beta.0 → 3.1.0
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/CHANGELOG.md +226 -0
- package/dist/agentCommands.d.ts +0 -1
- package/dist/agentCommands.d.ts.map +1 -1
- package/dist/agentCommands.js +19 -8
- package/dist/agentCommands.js.map +1 -1
- package/dist/agentPresence.d.ts +82 -0
- package/dist/agentPresence.d.ts.map +1 -1
- package/dist/agentPresence.js +194 -26
- package/dist/agentPresence.js.map +1 -1
- package/dist/agentic/index.d.ts +18 -8
- package/dist/agentic/index.d.ts.map +1 -1
- package/dist/agentic/index.js +18 -144
- package/dist/agentic/index.js.map +1 -1
- package/dist/agentic/types.d.ts +106 -0
- package/dist/agentic/types.d.ts.map +1 -1
- package/dist/agentic/types.js +77 -1
- package/dist/agentic/types.js.map +1 -1
- package/dist/architectAdrs.d.ts +27 -3
- package/dist/architectAdrs.d.ts.map +1 -1
- package/dist/architectAdrs.js +92 -4
- package/dist/architectAdrs.js.map +1 -1
- package/dist/artifacts.d.ts +60 -0
- package/dist/artifacts.d.ts.map +1 -0
- package/dist/artifacts.js +208 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/asks.d.ts +93 -0
- package/dist/asks.d.ts.map +1 -0
- package/dist/asks.js +383 -0
- package/dist/asks.js.map +1 -0
- package/dist/chat.d.ts +47 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +288 -0
- package/dist/chat.js.map +1 -0
- package/dist/client/transports.d.ts.map +1 -1
- package/dist/client/transports.js +13 -3
- package/dist/client/transports.js.map +1 -1
- package/dist/daemon.d.ts +33 -3
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +225 -52
- package/dist/daemon.js.map +1 -1
- package/dist/daemonConfig.d.ts +46 -0
- package/dist/daemonConfig.d.ts.map +1 -1
- package/dist/daemonConfig.js +57 -12
- package/dist/daemonConfig.js.map +1 -1
- package/dist/decibelPaths.d.ts.map +1 -1
- package/dist/decibelPaths.js +39 -6
- package/dist/decibelPaths.js.map +1 -1
- package/dist/domain/issue.d.ts +81 -0
- package/dist/domain/issue.d.ts.map +1 -0
- package/dist/domain/issue.js +106 -0
- package/dist/domain/issue.js.map +1 -0
- package/dist/domain/issueCodec.d.ts +39 -0
- package/dist/domain/issueCodec.d.ts.map +1 -0
- package/dist/domain/issueCodec.js +308 -0
- package/dist/domain/issueCodec.js.map +1 -0
- package/dist/domain/issueRepository.d.ts +124 -0
- package/dist/domain/issueRepository.d.ts.map +1 -0
- package/dist/domain/issueRepository.js +296 -0
- package/dist/domain/issueRepository.js.map +1 -0
- package/dist/domain/uid.d.ts +16 -0
- package/dist/domain/uid.d.ts.map +1 -0
- package/dist/domain/uid.js +43 -0
- package/dist/domain/uid.js.map +1 -0
- package/dist/facades/definitions.d.ts +0 -1
- package/dist/facades/definitions.d.ts.map +1 -1
- package/dist/facades/definitions.js +140 -116
- package/dist/facades/definitions.js.map +1 -1
- package/dist/facades/index.d.ts +2 -1
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/facades/index.js.map +1 -1
- package/dist/facades/types.d.ts +17 -0
- package/dist/facades/types.d.ts.map +1 -1
- package/dist/hq/defineAgent.d.ts.map +1 -1
- package/dist/hq/defineAgent.js +7 -11
- package/dist/hq/defineAgent.js.map +1 -1
- package/dist/httpArgs.d.ts +11 -0
- package/dist/httpArgs.d.ts.map +1 -0
- package/dist/httpArgs.js +39 -0
- package/dist/httpArgs.js.map +1 -0
- package/dist/httpServer.d.ts +1 -12
- package/dist/httpServer.d.ts.map +1 -1
- package/dist/httpServer.js +298 -144
- package/dist/httpServer.js.map +1 -1
- package/dist/identity.d.ts +123 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +312 -0
- package/dist/identity.js.map +1 -0
- package/dist/kernel.d.ts +46 -1
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +334 -26
- package/dist/kernel.js.map +1 -1
- package/dist/killSwitch.d.ts +117 -0
- package/dist/killSwitch.d.ts.map +1 -0
- package/dist/killSwitch.js +161 -0
- package/dist/killSwitch.js.map +1 -0
- package/dist/lib/agent-services/assumptions.d.ts.map +1 -1
- package/dist/lib/agent-services/assumptions.js +8 -2
- package/dist/lib/agent-services/assumptions.js.map +1 -1
- package/dist/lib/atomicWrite.d.ts +49 -0
- package/dist/lib/atomicWrite.d.ts.map +1 -0
- package/dist/lib/atomicWrite.js +157 -0
- package/dist/lib/atomicWrite.js.map +1 -0
- package/dist/lib/envelope.d.ts +31 -0
- package/dist/lib/envelope.d.ts.map +1 -0
- package/dist/lib/envelope.js +80 -0
- package/dist/lib/envelope.js.map +1 -0
- package/dist/lib/fileLock.d.ts +38 -0
- package/dist/lib/fileLock.d.ts.map +1 -0
- package/dist/lib/fileLock.js +124 -0
- package/dist/lib/fileLock.js.map +1 -0
- package/dist/lib/recordIdAllocator.d.ts +102 -0
- package/dist/lib/recordIdAllocator.d.ts.map +1 -0
- package/dist/lib/recordIdAllocator.js +179 -0
- package/dist/lib/recordIdAllocator.js.map +1 -0
- package/dist/orgId.d.ts +23 -0
- package/dist/orgId.d.ts.map +1 -0
- package/dist/orgId.js +73 -0
- package/dist/orgId.js.map +1 -0
- package/dist/pairCli.d.ts +2 -0
- package/dist/pairCli.d.ts.map +1 -0
- package/dist/pairCli.js +97 -0
- package/dist/pairCli.js.map +1 -0
- package/dist/peerBroker.d.ts +40 -0
- package/dist/peerBroker.d.ts.map +1 -0
- package/dist/peerBroker.js +70 -0
- package/dist/peerBroker.js.map +1 -0
- package/dist/peerBrokerSupervisor.d.ts +21 -0
- package/dist/peerBrokerSupervisor.d.ts.map +1 -0
- package/dist/peerBrokerSupervisor.js +131 -0
- package/dist/peerBrokerSupervisor.js.map +1 -0
- package/dist/projectPaths.d.ts.map +1 -1
- package/dist/projectPaths.js +1 -19
- package/dist/projectPaths.js.map +1 -1
- package/dist/projectRegistry.d.ts +22 -0
- package/dist/projectRegistry.d.ts.map +1 -1
- package/dist/projectRegistry.js +69 -2
- package/dist/projectRegistry.js.map +1 -1
- package/dist/pty/boundary.d.ts +39 -0
- package/dist/pty/boundary.d.ts.map +1 -0
- package/dist/pty/boundary.js +100 -0
- package/dist/pty/boundary.js.map +1 -0
- package/dist/pty/errors.d.ts +6 -0
- package/dist/pty/errors.d.ts.map +1 -0
- package/dist/pty/errors.js +12 -0
- package/dist/pty/errors.js.map +1 -0
- package/dist/pty/fleet.d.ts +159 -0
- package/dist/pty/fleet.d.ts.map +1 -0
- package/dist/pty/fleet.js +543 -0
- package/dist/pty/fleet.js.map +1 -0
- package/dist/pty/launchProfile.d.ts +45 -0
- package/dist/pty/launchProfile.d.ts.map +1 -0
- package/dist/pty/launchProfile.js +149 -0
- package/dist/pty/launchProfile.js.map +1 -0
- package/dist/pty/openTerminal.d.ts +48 -0
- package/dist/pty/openTerminal.d.ts.map +1 -0
- package/dist/pty/openTerminal.js +185 -0
- package/dist/pty/openTerminal.js.map +1 -0
- package/dist/pty/pairDialog.d.ts +16 -0
- package/dist/pty/pairDialog.d.ts.map +1 -0
- package/dist/pty/pairDialog.js +121 -0
- package/dist/pty/pairDialog.js.map +1 -0
- package/dist/pty/pairing.d.ts +86 -0
- package/dist/pty/pairing.d.ts.map +1 -0
- package/dist/pty/pairing.js +351 -0
- package/dist/pty/pairing.js.map +1 -0
- package/dist/pty/routes.d.ts +49 -0
- package/dist/pty/routes.d.ts.map +1 -0
- package/dist/pty/routes.js +624 -0
- package/dist/pty/routes.js.map +1 -0
- package/dist/pty/sessions.d.ts +167 -0
- package/dist/pty/sessions.d.ts.map +1 -0
- package/dist/pty/sessions.js +513 -0
- package/dist/pty/sessions.js.map +1 -0
- package/dist/pty/tmux.d.ts +109 -0
- package/dist/pty/tmux.d.ts.map +1 -0
- package/dist/pty/tmux.js +271 -0
- package/dist/pty/tmux.js.map +1 -0
- package/dist/roster.d.ts +37 -0
- package/dist/roster.d.ts.map +1 -0
- package/dist/roster.js +126 -0
- package/dist/roster.js.map +1 -0
- package/dist/runtime/circuitBreaker.d.ts +95 -0
- package/dist/runtime/circuitBreaker.d.ts.map +1 -0
- package/dist/runtime/circuitBreaker.js +178 -0
- package/dist/runtime/circuitBreaker.js.map +1 -0
- package/dist/runtime/daemonMeta.d.ts +53 -0
- package/dist/runtime/daemonMeta.d.ts.map +1 -0
- package/dist/runtime/daemonMeta.js +121 -0
- package/dist/runtime/daemonMeta.js.map +1 -0
- package/dist/runtime/ensureRuntime.d.ts +103 -0
- package/dist/runtime/ensureRuntime.d.ts.map +1 -0
- package/dist/runtime/ensureRuntime.js +276 -0
- package/dist/runtime/ensureRuntime.js.map +1 -0
- package/dist/runtime/extensions.d.ts +57 -0
- package/dist/runtime/extensions.d.ts.map +1 -0
- package/dist/runtime/extensions.js +216 -0
- package/dist/runtime/extensions.js.map +1 -0
- package/dist/runtime/localHttp.d.ts +24 -0
- package/dist/runtime/localHttp.d.ts.map +1 -0
- package/dist/runtime/localHttp.js +84 -0
- package/dist/runtime/localHttp.js.map +1 -0
- package/dist/runtime/projectResolution.d.ts +29 -0
- package/dist/runtime/projectResolution.d.ts.map +1 -0
- package/dist/runtime/projectResolution.js +67 -0
- package/dist/runtime/projectResolution.js.map +1 -0
- package/dist/runtime/protocol.d.ts +62 -0
- package/dist/runtime/protocol.d.ts.map +1 -0
- package/dist/runtime/protocol.js +74 -0
- package/dist/runtime/protocol.js.map +1 -0
- package/dist/sentinelIssues.d.ts +42 -2
- package/dist/sentinelIssues.d.ts.map +1 -1
- package/dist/sentinelIssues.js +167 -65
- package/dist/sentinelIssues.js.map +1 -1
- package/dist/server.js +123 -15
- package/dist/server.js.map +1 -1
- package/dist/toolConfig.d.ts.map +1 -1
- package/dist/toolConfig.js +12 -0
- package/dist/toolConfig.js.map +1 -1
- package/dist/tools/agentic/agentQueue.d.ts.map +1 -1
- package/dist/tools/agentic/agentQueue.js +4 -0
- package/dist/tools/agentic/agentQueue.js.map +1 -1
- package/dist/tools/agentic/index.d.ts.map +1 -1
- package/dist/tools/agentic/index.js +28 -2
- package/dist/tools/agentic/index.js.map +1 -1
- package/dist/tools/architect/index.d.ts +1 -0
- package/dist/tools/architect/index.d.ts.map +1 -1
- package/dist/tools/architect/index.js +52 -3
- package/dist/tools/architect/index.js.map +1 -1
- package/dist/tools/architect.d.ts.map +1 -1
- package/dist/tools/architect.js +59 -8
- package/dist/tools/architect.js.map +1 -1
- package/dist/tools/artifacts.d.ts +5 -0
- package/dist/tools/artifacts.d.ts.map +1 -0
- package/dist/tools/artifacts.js +89 -0
- package/dist/tools/artifacts.js.map +1 -0
- package/dist/tools/asks.d.ts +6 -0
- package/dist/tools/asks.d.ts.map +1 -0
- package/dist/tools/asks.js +104 -0
- package/dist/tools/asks.js.map +1 -0
- package/dist/tools/context.d.ts +10 -5
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +45 -18
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/coordinator/coordinator.d.ts.map +1 -1
- package/dist/tools/coordinator/coordinator.js +48 -19
- package/dist/tools/coordinator/coordinator.js.map +1 -1
- package/dist/tools/coordinator/index.d.ts +1 -0
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +42 -2
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/crit.d.ts +2 -1
- package/dist/tools/crit.d.ts.map +1 -1
- package/dist/tools/crit.js +19 -4
- package/dist/tools/crit.js.map +1 -1
- package/dist/tools/data-inspector.d.ts +1 -1
- package/dist/tools/data-inspector.d.ts.map +1 -1
- package/dist/tools/data-inspector.js +1 -1
- package/dist/tools/data-inspector.js.map +1 -1
- package/dist/tools/designer/index.d.ts.map +1 -1
- package/dist/tools/designer/index.js +4 -3
- package/dist/tools/designer/index.js.map +1 -1
- package/dist/tools/designer/lateral-tools.d.ts.map +1 -1
- package/dist/tools/designer/lateral-tools.js +4 -2
- package/dist/tools/designer/lateral-tools.js.map +1 -1
- package/dist/tools/designer.d.ts +2 -1
- package/dist/tools/designer.d.ts.map +1 -1
- package/dist/tools/designer.js +24 -12
- package/dist/tools/designer.js.map +1 -1
- package/dist/tools/dojo/index.d.ts.map +1 -1
- package/dist/tools/dojo/index.js +52 -3
- package/dist/tools/dojo/index.js.map +1 -1
- package/dist/tools/dojo.d.ts +65 -3
- package/dist/tools/dojo.d.ts.map +1 -1
- package/dist/tools/dojo.js +148 -23
- package/dist/tools/dojo.js.map +1 -1
- package/dist/tools/friction.d.ts.map +1 -1
- package/dist/tools/friction.js +16 -6
- package/dist/tools/friction.js.map +1 -1
- package/dist/tools/guardian.d.ts +7 -0
- package/dist/tools/guardian.d.ts.map +1 -1
- package/dist/tools/guardian.js +152 -11
- package/dist/tools/guardian.js.map +1 -1
- package/dist/tools/hygiene/oracle-hygiene.d.ts.map +1 -1
- package/dist/tools/hygiene/oracle-hygiene.js +8 -2
- package/dist/tools/hygiene/oracle-hygiene.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +33 -18
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/killswitch/index.d.ts +13 -0
- package/dist/tools/killswitch/index.d.ts.map +1 -0
- package/dist/tools/killswitch/index.js +138 -0
- package/dist/tools/killswitch/index.js.map +1 -0
- package/dist/tools/learnings.d.ts +2 -1
- package/dist/tools/learnings.d.ts.map +1 -1
- package/dist/tools/learnings.js +31 -15
- package/dist/tools/learnings.js.map +1 -1
- package/dist/tools/oracle/index.d.ts.map +1 -1
- package/dist/tools/oracle/index.js +8 -0
- package/dist/tools/oracle/index.js.map +1 -1
- package/dist/tools/oracle.d.ts +7 -0
- package/dist/tools/oracle.d.ts.map +1 -1
- package/dist/tools/oracle.js +41 -12
- package/dist/tools/oracle.js.map +1 -1
- package/dist/tools/policy.d.ts +2 -1
- package/dist/tools/policy.d.ts.map +1 -1
- package/dist/tools/policy.js +28 -9
- package/dist/tools/policy.js.map +1 -1
- package/dist/tools/postoffice/index.d.ts +10 -0
- package/dist/tools/postoffice/index.d.ts.map +1 -0
- package/dist/tools/postoffice/index.js +218 -0
- package/dist/tools/postoffice/index.js.map +1 -0
- package/dist/tools/postoffice.d.ts +78 -0
- package/dist/tools/postoffice.d.ts.map +1 -0
- package/dist/tools/postoffice.js +199 -0
- package/dist/tools/postoffice.js.map +1 -0
- package/dist/tools/provenance.d.ts +18 -2
- package/dist/tools/provenance.d.ts.map +1 -1
- package/dist/tools/provenance.js +68 -40
- package/dist/tools/provenance.js.map +1 -1
- package/dist/tools/registry/index.d.ts.map +1 -1
- package/dist/tools/registry/index.js +24 -0
- package/dist/tools/registry/index.js.map +1 -1
- package/dist/tools/sentinel/index.d.ts +1 -0
- package/dist/tools/sentinel/index.d.ts.map +1 -1
- package/dist/tools/sentinel/index.js +142 -6
- package/dist/tools/sentinel/index.js.map +1 -1
- package/dist/tools/sentinel.d.ts +152 -1
- package/dist/tools/sentinel.d.ts.map +1 -1
- package/dist/tools/sentinel.js +609 -328
- package/dist/tools/sentinel.js.map +1 -1
- package/dist/tools/shared/index.d.ts +2 -1
- package/dist/tools/shared/index.d.ts.map +1 -1
- package/dist/tools/shared/index.js +2 -1
- package/dist/tools/shared/index.js.map +1 -1
- package/dist/tools/shared/response.d.ts +24 -0
- package/dist/tools/shared/response.d.ts.map +1 -1
- package/dist/tools/shared/response.js +61 -7
- package/dist/tools/shared/response.js.map +1 -1
- package/dist/tools/shared/runTracker.d.ts +2 -0
- package/dist/tools/shared/runTracker.d.ts.map +1 -1
- package/dist/tools/shared/runTracker.js +38 -0
- package/dist/tools/shared/runTracker.js.map +1 -1
- package/dist/tools/shared/storeRead.d.ts +153 -0
- package/dist/tools/shared/storeRead.d.ts.map +1 -0
- package/dist/tools/shared/storeRead.js +242 -0
- package/dist/tools/shared/storeRead.js.map +1 -0
- package/dist/tools/swarm.d.ts +3 -1
- package/dist/tools/swarm.d.ts.map +1 -1
- package/dist/tools/swarm.js +6 -12
- package/dist/tools/swarm.js.map +1 -1
- package/dist/tools/testSpec.d.ts +3 -2
- package/dist/tools/testSpec.d.ts.map +1 -1
- package/dist/tools/testSpec.js +51 -14
- package/dist/tools/testSpec.js.map +1 -1
- package/dist/tools/vector.d.ts +33 -1
- package/dist/tools/vector.d.ts.map +1 -1
- package/dist/tools/vector.js +31 -5
- package/dist/tools/vector.js.map +1 -1
- package/dist/tools/voice/index.d.ts +1 -0
- package/dist/tools/voice/index.d.ts.map +1 -1
- package/dist/tools/voice/index.js +33 -2
- package/dist/tools/voice/index.js.map +1 -1
- package/dist/tools/voice.d.ts +48 -1
- package/dist/tools/voice.d.ts.map +1 -1
- package/dist/tools/voice.js +63 -3
- package/dist/tools/voice.js.map +1 -1
- package/dist/tools/zoom/index.d.ts +15 -0
- package/dist/tools/zoom/index.d.ts.map +1 -0
- package/dist/tools/zoom/index.js +174 -0
- package/dist/tools/zoom/index.js.map +1 -0
- package/dist/tools/zoom.d.ts +234 -0
- package/dist/tools/zoom.d.ts.map +1 -0
- package/dist/tools/zoom.js +627 -0
- package/dist/tools/zoom.js.map +1 -0
- package/dist/transports/bridge.d.ts +1 -1
- package/dist/transports/bridge.d.ts.map +1 -1
- package/dist/transports/bridge.js +4 -1
- package/dist/transports/bridge.js.map +1 -1
- package/dist/transports/http.d.ts +1 -1
- package/dist/transports/http.d.ts.map +1 -1
- package/dist/transports/http.js +3 -1
- package/dist/transports/http.js.map +1 -1
- package/dist/transports/index.d.ts +1 -0
- package/dist/transports/index.d.ts.map +1 -1
- package/dist/transports/index.js +1 -0
- package/dist/transports/index.js.map +1 -1
- package/dist/transports/mcp.d.ts +1 -1
- package/dist/transports/mcp.d.ts.map +1 -1
- package/dist/transports/mcp.js +9 -4
- package/dist/transports/mcp.js.map +1 -1
- package/dist/transports/stdio.d.ts +1 -1
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +2 -0
- package/dist/transports/stdio.js.map +1 -1
- package/dist/transports/thinStdio.d.ts +22 -0
- package/dist/transports/thinStdio.d.ts.map +1 -0
- package/dist/transports/thinStdio.js +218 -0
- package/dist/transports/thinStdio.js.map +1 -0
- package/dist/transports/types.d.ts +8 -1
- package/dist/transports/types.d.ts.map +1 -1
- package/dist/types/agent-services.d.ts +7 -0
- package/dist/types/agent-services.d.ts.map +1 -1
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +23 -0
- package/dist/version.js.map +1 -0
- package/package.json +20 -4
- package/templates/AGENT.md +3 -0
- package/templates/CLAUDE-decibel.md +11 -0
- package/templates/com.decibel.daemon.plist +6 -1
- package/dist/tools/deck.d.ts +0 -11
- package/dist/tools/deck.d.ts.map +0 -1
- package/dist/tools/deck.js +0 -1656
- package/dist/tools/deck.js.map +0 -1
- package/dist/tools/mother.d.ts +0 -11
- package/dist/tools/mother.d.ts.map +0 -1
- package/dist/tools/mother.js +0 -503
- package/dist/tools/mother.js.map +0 -1
- package/dist/tools/registry.d.ts +0 -3
- package/dist/tools/registry.d.ts.map +0 -1
- package/dist/tools/registry.js +0 -189
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/senken.d.ts +0 -11
- package/dist/tools/senken.d.ts.map +0 -1
- package/dist/tools/senken.js +0 -482
- package/dist/tools/senken.js.map +0 -1
- package/dist/tools/terminal.d.ts +0 -17
- package/dist/tools/terminal.d.ts.map +0 -1
- package/dist/tools/terminal.js +0 -968
- package/dist/tools/terminal.js.map +0 -1
- package/dist/tools/toolsIndex.d.ts +0 -5
- package/dist/tools/toolsIndex.d.ts.map +0 -1
- package/dist/tools/toolsIndex.js +0 -37
- package/dist/tools/toolsIndex.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.1.0 — 2026-10-17
|
|
4
|
+
|
|
5
|
+
3.0 made Decibel one runtime. 3.1 lets that runtime host the work: the daemon
|
|
6
|
+
spawns and restores Claude Code sessions, a browser can pair with it, and agents
|
|
7
|
+
can ask a person a question and get the answer back. This is the release the HQ
|
|
8
|
+
private beta installs.
|
|
9
|
+
|
|
10
|
+
### Changed — check these if you upgrade
|
|
11
|
+
|
|
12
|
+
- **An HQ-connected daemon refuses to start without `DECIBEL_ORG_ID`** (#90,
|
|
13
|
+
ADR-0014). With Supabase credentials set and no org, it used to fall back to a
|
|
14
|
+
hardcoded default org. There is no default any more. A daemon with no HQ
|
|
15
|
+
credentials is unaffected.
|
|
16
|
+
- **Run tracking is off by default** (#77). `.decibel/runs/` is no longer written
|
|
17
|
+
unless you turn it on.
|
|
18
|
+
- **Core tables are service-role only** (#95, #96). `voice_inbox` and the swarm
|
|
19
|
+
tables no longer accept the public anon key, which had let anyone read and
|
|
20
|
+
write them. Writes go through the daemon.
|
|
21
|
+
- **Spawned sessions no longer inherit the daemon's environment** (#100). The
|
|
22
|
+
daemon's credentials (`SUPABASE_SERVICE_KEY` and any `*_KEY`, `*_TOKEN`,
|
|
23
|
+
`*_SECRET`) and `NODE_ENV=production` are kept out of the Claude sessions it
|
|
24
|
+
starts, and are removed from its tmux server's environment. `ANTHROPIC_*` is
|
|
25
|
+
kept.
|
|
26
|
+
|
|
27
|
+
### Hosted sessions and HQ
|
|
28
|
+
|
|
29
|
+
- **Hosted Claude Code sessions** (#84): the daemon spawns and attaches sessions
|
|
30
|
+
in its own tmux, for HQ's terminal pane. HQ chat and teams (#84, #85).
|
|
31
|
+
- **Browser pairing** (#84): a page pairs with a non-extractable key and signs
|
|
32
|
+
every request, and the daemon holds only public keys. No HTTP route can
|
|
33
|
+
approve a pairing. **On macOS the approval is a native dialog** showing the
|
|
34
|
+
origin and code (#103, ADR-0016). Elsewhere it's
|
|
35
|
+
`decibel-tools pair approve <code>`.
|
|
36
|
+
- **Fleet restore** (#92, decibel-hq ADR-0018): the daemon records which
|
|
37
|
+
sessions were live per repo, and `GET /sessions/last-fleet` plus
|
|
38
|
+
`POST /sessions/restore` bring last night's fleet back. A launch profile in
|
|
39
|
+
`~/.decibel/launch.json` sets permission mode, dev channels and tmux options.
|
|
40
|
+
`scripts/fleet.py` is a terminal stand-in for HQ's `decibel fleet`.
|
|
41
|
+
- **Open in Ghostty** (#94): `POST /sessions/open-terminal` opens live sessions
|
|
42
|
+
as Ghostty tabs or windows, titled by repo through tmux.
|
|
43
|
+
- **Scrolling** (#97, #99): scroll frames on the attach socket, then mouse on,
|
|
44
|
+
50k lines of scrollback (`launch.json` `tmux` block) and clickable links.
|
|
45
|
+
- **Asks** (#98, decibel-hq ADR-0015): `asks.create` puts a question in a
|
|
46
|
+
person's HQ Inbox (or on a guest's page, drafts only until approved), and the
|
|
47
|
+
daemon brings the answer back into `.decibel/asks/` and tells the asking
|
|
48
|
+
session. New `guest:` identity.
|
|
49
|
+
- **Artifacts** (#91): published pages registered in HQ's library.
|
|
50
|
+
- **Voice** (#101): `voice.inbox_discard`.
|
|
51
|
+
- **ADR status from HQ** (#102): `architect.update_adr` changes an ADR's status
|
|
52
|
+
(proposed, accepted, superseded, deprecated, and the new rejected), matching the id
|
|
53
|
+
exactly.
|
|
54
|
+
|
|
55
|
+
### Reliability
|
|
56
|
+
|
|
57
|
+
- The daemon supervises the claude-peers broker (#86). Only the daemon
|
|
58
|
+
advertises in `daemon.meta`, and a dead advertisement is not followed (#80).
|
|
59
|
+
- Records are created atomically, so a kill can't leave an empty issue (#88).
|
|
60
|
+
A re-close keeps the first resolution (#79). ADRs get a stable identity (#81).
|
|
61
|
+
- The global config directory is not a project (#78). A kill switch gives
|
|
62
|
+
RUN/STOP for unattended work (#76).
|
|
63
|
+
- Secret guards, and guardian no longer prints the secrets it finds (#87).
|
|
64
|
+
- The torture sandbox no longer reaches live services (#89, #74).
|
|
65
|
+
- Dependencies: npm audit fix, including @modelcontextprotocol/sdk 1.32.1 (#93).
|
|
66
|
+
- MCP clients are told the real server version. The stdio and bridge adapters
|
|
67
|
+
had `2.0.0` hardcoded in their serverInfo.
|
|
68
|
+
|
|
69
|
+
## 3.0.0 — 2026-09-06
|
|
70
|
+
|
|
71
|
+
Decibel Tools stopped being a daemon, an MCP server, a CLI, a store and a VS Code
|
|
72
|
+
extension that happen to share a repo. It is **one runtime with several adapters**.
|
|
73
|
+
An adapter translates transport and establishes project context; it does not
|
|
74
|
+
instantiate its own store, caches, project registry, or write path.
|
|
75
|
+
|
|
76
|
+
That is the whole of 3.0. Everything below follows from it.
|
|
77
|
+
|
|
78
|
+
### Breaking
|
|
79
|
+
|
|
80
|
+
- **`DECIBEL_APPS=1` is gone, and no environment variable replaces it.** The
|
|
81
|
+
apps-tier facades (`senken`, `deck`, `mother`, `terminal`) are no longer compiled
|
|
82
|
+
into the package. They load at boot as extensions, from `extensions.allow` in
|
|
83
|
+
`~/.decibel/config.yaml`, **by absolute path only** — a bare specifier would
|
|
84
|
+
resolve against `node_modules`, which would hand facade selection to whoever can
|
|
85
|
+
write a package. An extension may not shadow a registered facade name.
|
|
86
|
+
|
|
87
|
+
Config-file state the owner edits beats environment state a generator has to
|
|
88
|
+
remember: a regenerated launchd plist silently dropped those four facades once,
|
|
89
|
+
and `/health` reported `status: ok` with no indication four were missing.
|
|
90
|
+
|
|
91
|
+
- **The public package no longer describes private facades.** It previously shipped
|
|
92
|
+
compiled `senken.js` and `deck.js` — a description of a live trading Postgres and
|
|
93
|
+
a wallet-spending tool it could never reach. `S7` now asserts their absence from
|
|
94
|
+
the tarball on every run.
|
|
95
|
+
|
|
96
|
+
- **An unregistered facade is a hard error, not an empty success.** Fail-closed by
|
|
97
|
+
absence is only safe if absence is loud. A call to something that was never
|
|
98
|
+
registered returns `ok: false` / `TOOL_ERROR`; it does not return zero rows.
|
|
99
|
+
|
|
100
|
+
- **Issue records are canonical markdown.** All 58 remaining bare-YAML records were
|
|
101
|
+
converted; the store is markdown-only. Timestamp-slug *filenames* are deliberately
|
|
102
|
+
kept (ADR-0010) — 49 provenance events and 2 ADRs reference them, and provenance
|
|
103
|
+
events are immutable audit records. Identity is the `id:` field, which is already
|
|
104
|
+
how records resolve.
|
|
105
|
+
|
|
106
|
+
- **Adapters do not silently become writers.** There is no in-process fallback for
|
|
107
|
+
mutations. A thin client auto-starts the runtime, retries briefly, then fails with
|
|
108
|
+
an actionable error.
|
|
109
|
+
|
|
110
|
+
### The surface
|
|
111
|
+
|
|
112
|
+
| Tier | Facades | Actions | How it loads |
|
|
113
|
+
|---|---|---|---|
|
|
114
|
+
| core | 26 | 183 | always |
|
|
115
|
+
| + pro | 31 | 224 | license-gated at runtime |
|
|
116
|
+
| + apps | — | — | extensions, absolute-path allowlist, not in the package |
|
|
117
|
+
|
|
118
|
+
### Store integrity
|
|
119
|
+
|
|
120
|
+
- **One writer.** `sentinelIssues.createIssue` delegates to `FsIssueRepository`;
|
|
121
|
+
there is no longer a second implementation emitting a different format into the
|
|
122
|
+
same directory.
|
|
123
|
+
- **Id allocation is serialized across processes.** A file lock spans allocation
|
|
124
|
+
*through successful write* — serializing only the id scan leaves the race intact,
|
|
125
|
+
since both processes still compute the same number before either file lands — and
|
|
126
|
+
the write itself is `O_EXCL` as a second, independent defence against callers that
|
|
127
|
+
never take the lock. Applies to issues **and epics**; epics were still racing
|
|
128
|
+
until the S5 sweep found it (ISS-0158).
|
|
129
|
+
- **Structured fields are parsed, mutated, serialized and atomically renamed**, never
|
|
130
|
+
edited by regex. Values containing `#`, `:`, `---` or a markdown heading survive
|
|
131
|
+
read-back.
|
|
132
|
+
- **Repair, once.** `degraded` went 10 → 0, duplicate ids 4 groups → 0, wrong
|
|
133
|
+
`project` values 18 → 0. All three are now invariants CI can fail on. Most of the
|
|
134
|
+
degraded records carried a completed resolution and were open only because an old
|
|
135
|
+
status write had failed — the correct repair was to close them, not reformat them.
|
|
136
|
+
- **Status is no longer stored twice by hand.** Markdown records mirror status into
|
|
137
|
+
the body; 16 had drifted from frontmatter, reading `open` to a person while every
|
|
138
|
+
tool reported them correctly. `close_issue` rewrote the mirror and `updateIssue`
|
|
139
|
+
never did. No test caught it because every test asserted through frontmatter, which
|
|
140
|
+
was never wrong.
|
|
141
|
+
|
|
142
|
+
### Reads state absence honestly
|
|
143
|
+
|
|
144
|
+
Thirty-one store-backed reads can now tell an **empty** store apart from an
|
|
145
|
+
**unreadable** one, an **unparseable** one, and a **project that does not resolve**.
|
|
146
|
+
Previously `if (!parsed) continue` and `catch {}` turned every one of those into
|
|
147
|
+
`[]`.
|
|
148
|
+
|
|
149
|
+
Reads that skip a record now carry `store_status` and `unreadable_count`. Three
|
|
150
|
+
paths fail loudly instead, because a partial answer would have been dishonest:
|
|
151
|
+
context's whole-file `facts.json` and `events.json`, and `auditPolicies` — where one
|
|
152
|
+
bad policy used to abort the audit and report `summary.fail: 0`.
|
|
153
|
+
|
|
154
|
+
### Runtime and daemon
|
|
155
|
+
|
|
156
|
+
- `ensureRuntime({projectRoot, protocolVersion})` — one lifecycle primitive shared by
|
|
157
|
+
every caller (MCP, CLI, VS Code, hooks). Arbitration is the socket bind or an
|
|
158
|
+
atomic startup lock, never a PID file.
|
|
159
|
+
- Protocol negotiation refuses a version-skewed runtime at handshake rather than
|
|
160
|
+
per-call. `/health` carries runtime version, protocol version, tier,
|
|
161
|
+
`extensions.loaded` and `extensions.rejected` with per-entry reasons.
|
|
162
|
+
- **Error isolation**: no facade fault escapes `dispatch()`, including throws from
|
|
163
|
+
parameter coercion and facade resolution (which the transports would otherwise turn
|
|
164
|
+
into an MCP protocol fault rather than a failed tool call), and including dispatch
|
|
165
|
+
event listeners, which run synchronously on the call path.
|
|
166
|
+
- **Per-facade circuit breaker.** The signal is *unresponsiveness*, not unhappiness:
|
|
167
|
+
a throw always counts, an `isError` slower than 2s counts, a fast `isError` leaves
|
|
168
|
+
the counters untouched. Five consecutive faults open a facade for 30s, then exactly
|
|
169
|
+
one probe at a time — a recovering database gets one connection attempt, not six.
|
|
170
|
+
Facade and direct-tool calls share one circuit, so `senken.trade_summary` and
|
|
171
|
+
`senken_trade_summary` cannot each burn a budget against the same pool.
|
|
172
|
+
- Daemon hardening: timing-safe auth, body limits, rate limiting, log rotation,
|
|
173
|
+
graceful drain, crash-loop protection.
|
|
174
|
+
|
|
175
|
+
### New
|
|
176
|
+
|
|
177
|
+
- **guardian** (core) — dependency, secret, HTTP and config scanning with A–F grading.
|
|
178
|
+
- **postoffice** (EPIC-0037) — model-agnostic agent-to-agent messaging, all seven
|
|
179
|
+
verbs, two-way threaded exchange.
|
|
180
|
+
- **conductor** — run/dryrun/trace/cost/egress/routing.
|
|
181
|
+
- **zoom** (EPIC-0036) — meeting-summary ingestion, gated behind `DECIBEL_ZOOM=1`.
|
|
182
|
+
**Not yet run against a live Zoom account.** It ships dark: unreachable unless
|
|
183
|
+
explicitly enabled.
|
|
184
|
+
|
|
185
|
+
### The release gate
|
|
186
|
+
|
|
187
|
+
`@decibelsystems/tools@3.0.0` is the first release blocked on the **tool torture
|
|
188
|
+
test** (`.decibel/specs/2026-09-02-tool-torture-test.md`) — eight generated sweeps
|
|
189
|
+
over the whole surface across four transports, built on one observation:
|
|
190
|
+
|
|
191
|
+
> Every failure this project has actually shipped returned `ok: true`.
|
|
192
|
+
|
|
193
|
+
A voice inbox dead for five and a half hours read as `voice 0`. A regenerated plist
|
|
194
|
+
dropped four facades while `/health` said `status: ok`. `/batch` answered
|
|
195
|
+
`{ok: true}` for a facade that does not exist.
|
|
196
|
+
|
|
197
|
+
| Sweep | Gate |
|
|
198
|
+
|---|---|
|
|
199
|
+
| S0 enumeration | no unclaimed actions, no dangling actions, no expired waivers |
|
|
200
|
+
| S1 envelope | every action answers in a well-formed envelope |
|
|
201
|
+
| S2 absence | every read distinguishes the four situations above |
|
|
202
|
+
| S3 round-trip | hostile values survive write → read |
|
|
203
|
+
| S4 transports | stdio, thin, http-call and http-batch agree, differences declared |
|
|
204
|
+
| S5 concurrency | 50 concurrent creates across 10 processes; crash mid-write |
|
|
205
|
+
| S6 tier/extension | the apps boundary holds, and no env var reopens it |
|
|
206
|
+
| S7 artifact | the packed tarball, not the repo |
|
|
207
|
+
|
|
208
|
+
The surface is **generated from the kernel's own registries**, never enumerated by
|
|
209
|
+
hand: adding a tool without giving it coverage turns the build red. Every action is
|
|
210
|
+
claimed by a sweep or waived in `waivers.yaml` with a reason, an owner, and an
|
|
211
|
+
expiry. Waivers expire, and an expired waiver fails the build.
|
|
212
|
+
|
|
213
|
+
Six of the eighteen findings in S2 were the harness lying — fixtures planted at paths
|
|
214
|
+
no reader globs, so tools that handled absence correctly were reported broken. S5's
|
|
215
|
+
first crash test reported four successful `SIGKILL`s while all four victims kept
|
|
216
|
+
running. Every sweep now carries a calibration probe that asserts it can see a
|
|
217
|
+
deliberately broken tool before it is believed about the healthy ones.
|
|
218
|
+
|
|
219
|
+
881 tests.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 2.x
|
|
224
|
+
|
|
225
|
+
Not tracked in this file. See the git history and `.decibel/sentinel/` for the
|
|
226
|
+
issue-level record.
|
package/dist/agentCommands.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentCommands.d.ts","sourceRoot":"","sources":["../src/agentCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agentCommands.d.ts","sourceRoot":"","sources":["../src/agentCommands.ts"],"names":[],"mappings":"AAsRA;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GAAG,QAAQ,EACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACvC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACpB,OAAO,CAAC,OAAO,CAAC,CASlB;AAED,mGAAmG;AACnG,wBAAgB,sBAAsB,IAAI,MAAM,IAAI,CAenD"}
|
package/dist/agentCommands.js
CHANGED
|
@@ -31,13 +31,17 @@
|
|
|
31
31
|
// ============================================================================
|
|
32
32
|
import { createClient } from '@supabase/supabase-js';
|
|
33
33
|
import { log } from './config.js';
|
|
34
|
+
import { requireOrgId, orgOrLog } from './orgId.js';
|
|
35
|
+
import { getHumanPeerId } from './peerBroker.js';
|
|
34
36
|
import { withRetryResult } from './supabaseRetry.js';
|
|
35
37
|
import { enqueueCommand } from './agentInbox.js';
|
|
36
38
|
import { resolveHost } from './agentPresence.js';
|
|
37
39
|
const BROKER_URL = `http://127.0.0.1:${process.env.CLAUDE_PEERS_PORT ?? '7899'}`;
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
|
|
40
|
+
// The org is read lazily, never at import time (ADR-0014): importing this module
|
|
41
|
+
// must not fail on a local-only install that has no DECIBEL_ORG_ID. The daemon's
|
|
42
|
+
// startup gate (assertOrgForHqConnection) has already refused to start an
|
|
43
|
+
// HQ-connected process without one, so a throw here means that gate was skipped.
|
|
44
|
+
const orgId = () => requireOrgId();
|
|
41
45
|
const POLL_MS = 5_000;
|
|
42
46
|
const ALLOWED_KINDS = new Set(['message', 'request_status']);
|
|
43
47
|
// Ben-scoped staged rollout: the FIRST run dispatches request_status ONLY so he can
|
|
@@ -84,7 +88,12 @@ async function brokerSend(to, message) {
|
|
|
84
88
|
// untrusted-channel DATA, not an auto-executed instruction). Human provenance
|
|
85
89
|
// rides in `text` ("HQ · <issuer>: ..."). FK is off in the broker so any
|
|
86
90
|
// from_id delivers; if FK is ever enabled, register decibel-daemon then.
|
|
87
|
-
|
|
91
|
+
// Sent FROM the HQ chat peer when it is registered (src/chat.ts), so an
|
|
92
|
+
// agent's reply to from_id reaches a real inbox. 'decibel-daemon' was
|
|
93
|
+
// never a registered peer, and every reply to it failed with "Peer
|
|
94
|
+
// decibel-daemon not found" and was lost. Still a plain, non-privileged
|
|
95
|
+
// peer: the text is data to the receiver, as before.
|
|
96
|
+
body: JSON.stringify({ from_id: getHumanPeerId() ?? 'decibel-daemon', to_id: to, text: message }),
|
|
88
97
|
signal: AbortSignal.timeout(3000),
|
|
89
98
|
});
|
|
90
99
|
const body = (await res.json().catch(() => ({})));
|
|
@@ -101,7 +110,7 @@ async function settle(client, id, patch) {
|
|
|
101
110
|
patch = { ...patch, completed_at: new Date().toISOString() };
|
|
102
111
|
}
|
|
103
112
|
// org_id-scoped settle too — never update a row outside our authorized org.
|
|
104
|
-
const { error } = await client.from('agent_commands').update(patch).eq('id', id).eq('org_id',
|
|
113
|
+
const { error } = await client.from('agent_commands').update(patch).eq('id', id).eq('org_id', orgId());
|
|
105
114
|
if (error)
|
|
106
115
|
log(`Commands: settle ${id} failed: ${error.message}`);
|
|
107
116
|
}
|
|
@@ -181,7 +190,7 @@ async function tick(client) {
|
|
|
181
190
|
const { data, error } = await withRetryResult(() => client
|
|
182
191
|
.from('agent_commands')
|
|
183
192
|
.select('id,org_id,target_session_key,target_host,kind,payload,expires_at,status')
|
|
184
|
-
.eq('org_id',
|
|
193
|
+
.eq('org_id', orgId())
|
|
185
194
|
.eq('status', 'pending')
|
|
186
195
|
.eq('target_host', host), 'commands.poll');
|
|
187
196
|
if (error) {
|
|
@@ -214,7 +223,7 @@ async function loadSdkSessions(client, host) {
|
|
|
214
223
|
const { data, error } = await withRetryResult(() => client
|
|
215
224
|
.from('agent_sessions')
|
|
216
225
|
.select('session_key,runtime,status')
|
|
217
|
-
.eq('org_id',
|
|
226
|
+
.eq('org_id', orgId())
|
|
218
227
|
.eq('host', host)
|
|
219
228
|
.eq('status', 'active')
|
|
220
229
|
.neq('runtime', 'claude-code'), 'commands.sdkSessions');
|
|
@@ -254,7 +263,9 @@ export function startCommandDispatcher() {
|
|
|
254
263
|
log('Commands: SUPABASE_URL/SERVICE_KEY not set — agent-command dispatcher disabled.');
|
|
255
264
|
return () => { };
|
|
256
265
|
}
|
|
257
|
-
|
|
266
|
+
if (!orgOrLog('Commands'))
|
|
267
|
+
return () => { };
|
|
268
|
+
log(`Commands: dispatcher started (5s poll of hq.agent_commands, host ${resolveHost()}, org ${orgId()}).`);
|
|
258
269
|
const run = () => {
|
|
259
270
|
tick(client).catch((e) => log(`Commands: tick error: ${e instanceof Error ? e.message : String(e)}`));
|
|
260
271
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentCommands.js","sourceRoot":"","sources":["../src/agentCommands.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qEAAqE;AACrE,+EAA+E;AAC/E,oEAAoE;AACpE,iFAAiF;AACjF,wEAAwE;AACxE,kFAAkF;AAClF,kFAAkF;AAClF,qDAAqD;AACrD,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,6BAA6B;AAC7B,EAAE;AACF,iEAAiE;AACjE,kFAAkF;AAClF,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,iFAAiF;AACjF,kFAAkF;AAClF,mFAAmF;AACnF,gFAAgF;AAChF,gCAAgC;AAChC,EAAE;AACF,oBAAoB;AACpB,yEAAyE;AACzE,wEAAwE;AACxE,iFAAiF;AACjF,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,UAAU,GAAG,oBAAoB,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,MAAM,EAAE,CAAC;AACjF,
|
|
1
|
+
{"version":3,"file":"agentCommands.js","sourceRoot":"","sources":["../src/agentCommands.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qEAAqE;AACrE,+EAA+E;AAC/E,oEAAoE;AACpE,iFAAiF;AACjF,wEAAwE;AACxE,kFAAkF;AAClF,kFAAkF;AAClF,qDAAqD;AACrD,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,6BAA6B;AAC7B,EAAE;AACF,iEAAiE;AACjE,kFAAkF;AAClF,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,i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AAsB;IACpC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,GAAG,CAAC,iFAAiF,CAAC,CAAC;QACvF,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAC3C,GAAG,CAAC,oEAAoE,WAAW,EAAE,SAAS,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3G,MAAM,GAAG,GAAG,GAAG,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxG,CAAC,CAAC;IACF,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,OAAQ,EAA6B,CAAC,KAAK,KAAK,UAAU;QAAG,EAA4B,CAAC,KAAK,EAAE,CAAC;IACtG,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/agentPresence.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { fetchPeers, type BrokerPeer } from './peerBroker.js';
|
|
2
|
+
export { fetchPeers, type BrokerPeer };
|
|
1
3
|
/**
|
|
2
4
|
* The daemon's host identity for presence + command targeting. Defaults to
|
|
3
5
|
* os.hostname() but is overridable via DECIBEL_PRESENCE_HOST — needed where the
|
|
@@ -7,6 +9,86 @@
|
|
|
7
9
|
* value the presence writer stamps. Shared by the dispatcher (agentCommands.ts).
|
|
8
10
|
*/
|
|
9
11
|
export declare function resolveHost(): string;
|
|
12
|
+
export declare function serviceClient(): import("@supabase/supabase-js").SupabaseClient<any, "public", "hq", any, any> | null;
|
|
13
|
+
export type DbClient = NonNullable<ReturnType<typeof serviceClient>>;
|
|
14
|
+
export declare function resolveProjectId(client: DbClient, cwd: string): Promise<string | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Derive the DURABLE address for a session.
|
|
17
|
+
*
|
|
18
|
+
* Must be stable across restarts, so anything process-scoped is disqualified:
|
|
19
|
+
* not the session key, not a PID, not a TTY. The claude-peers broker id looks
|
|
20
|
+
* stable but is not — it carries a random suffix (`decibel-hq-nby9`), so a
|
|
21
|
+
* restart would silently mint a second agent and split the thread history.
|
|
22
|
+
*
|
|
23
|
+
* Repo identity + runtime is the stable pair: the same checkout on the same
|
|
24
|
+
* runtime is the same logical agent, session after session.
|
|
25
|
+
*
|
|
26
|
+
* DELIBERATELY NOT caller-supplied. `reg.agent` is an untrusted display label
|
|
27
|
+
* from a local process, and a local caller that could name its own durable
|
|
28
|
+
* address could claim an EXISTING agent's name — resolve_agent_session picks
|
|
29
|
+
* the most recently seen session, so a frequent heartbeater would capture that
|
|
30
|
+
* agent's inbound mail. That is the principal-not-label gap (EPIC-0007) which
|
|
31
|
+
* Ben accepted as risk for EPIC-0037; accepting it is not a reason to widen it.
|
|
32
|
+
* An operator can still set the name explicitly via DECIBEL_AGENT_NAME, which
|
|
33
|
+
* is daemon-scoped env (trusted) rather than per-request payload.
|
|
34
|
+
*/
|
|
35
|
+
export declare function deriveAgentName(input: {
|
|
36
|
+
gitRoot?: string | null;
|
|
37
|
+
cwd?: string | null;
|
|
38
|
+
runtime: string;
|
|
39
|
+
host: string;
|
|
40
|
+
}): string;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve (or create) the durable hq.agents row for `name` and return its id.
|
|
43
|
+
*
|
|
44
|
+
* Returns null rather than throwing when the table is absent — this ships
|
|
45
|
+
* BEFORE decibel-hq applies the post-office migration, and presence writing
|
|
46
|
+
* must keep working untouched in the meantime. When the migration lands the
|
|
47
|
+
* same code starts populating agent_id with no redeploy.
|
|
48
|
+
*
|
|
49
|
+
* `runtime` is written as a self-declared LABEL only. HQ's schema comment is
|
|
50
|
+
* explicit that it is never a trust signal, so nothing here gates on it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveAgentId(client: DbClient, name: string, runtime: string): Promise<string | null>;
|
|
53
|
+
/** Test seam: drop memoised ids so a test can observe a fresh resolve. */
|
|
54
|
+
export declare function __resetAgentIdCache(): void;
|
|
55
|
+
export interface AgentRosterEntry {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
runtime: string;
|
|
59
|
+
role: string | null;
|
|
60
|
+
capabilities: string[];
|
|
61
|
+
/** Durable lifecycle from hq.agents: 'active' | 'retired'. NOT liveness. */
|
|
62
|
+
status: string;
|
|
63
|
+
/** Liveness: does a live session currently resolve for this agent? */
|
|
64
|
+
online: boolean;
|
|
65
|
+
/** The session a message would be delivered into right now, or null. */
|
|
66
|
+
session_key: string | null;
|
|
67
|
+
last_seen_at: string | null;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The agents.list roster: hq.agents LEFT JOIN liveness.
|
|
71
|
+
*
|
|
72
|
+
* The roster is the DURABLE agents, each annotated with whether a live session
|
|
73
|
+
* resolves. An agent that exists but is offline MUST appear, marked offline,
|
|
74
|
+
* rather than vanish — a roster built from live sessions would silently drop
|
|
75
|
+
* exactly the agent you are trying and failing to reach, which is the same
|
|
76
|
+
* failure class as addressing a dead session.
|
|
77
|
+
*
|
|
78
|
+
* Two queries and a join in memory rather than one call to
|
|
79
|
+
* hq.resolve_agent_session per agent, which would be N round trips to render
|
|
80
|
+
* one board.
|
|
81
|
+
*
|
|
82
|
+
* CLOCK CAVEAT, and it is why this is a DISPLAY path only: the cutoff below is
|
|
83
|
+
* computed from the daemon's clock, while resolve_agent_session uses the
|
|
84
|
+
* database's now(). Skew between them can disagree at the 60s boundary. The
|
|
85
|
+
* authoritative answer at DELIVERY time is HQ's function, never this. Do not
|
|
86
|
+
* route a message using this roster's `online`.
|
|
87
|
+
*
|
|
88
|
+
* Returns null (not an empty roster) when the table is absent, so a caller can
|
|
89
|
+
* distinguish "no agents" from "post office not deployed yet".
|
|
90
|
+
*/
|
|
91
|
+
export declare function listAgentRoster(client: DbClient): Promise<AgentRosterEntry[] | null>;
|
|
10
92
|
export interface LocalAgentRegistration {
|
|
11
93
|
session_key: string;
|
|
12
94
|
runtime: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentPresence.d.ts","sourceRoot":"","sources":["../src/agentPresence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agentPresence.d.ts","sourceRoot":"","sources":["../src/agentPresence.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,CAAC;AAKvC;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAKD,wBAAgB,aAAa,yFAQ5B;AACD,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AAYrE,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAM5F;AAqBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,MAAM,CAWT;AASD;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,M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