reflectt-node 0.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/LICENSE +178 -0
- package/README.md +188 -0
- package/dist/activationEvents.d.ts +110 -0
- package/dist/activationEvents.d.ts.map +1 -0
- package/dist/activationEvents.js +378 -0
- package/dist/activationEvents.js.map +1 -0
- package/dist/activity-signal.d.ts +30 -0
- package/dist/activity-signal.d.ts.map +1 -0
- package/dist/activity-signal.js +93 -0
- package/dist/activity-signal.js.map +1 -0
- package/dist/alert-integrity.d.ts +100 -0
- package/dist/alert-integrity.d.ts.map +1 -0
- package/dist/alert-integrity.js +333 -0
- package/dist/alert-integrity.js.map +1 -0
- package/dist/alert-preflight.d.ts +40 -0
- package/dist/alert-preflight.d.ts.map +1 -0
- package/dist/alert-preflight.js +235 -0
- package/dist/alert-preflight.js.map +1 -0
- package/dist/analytics.d.ts +131 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +371 -0
- package/dist/analytics.js.map +1 -0
- package/dist/artifact-mirror.d.ts +26 -0
- package/dist/artifact-mirror.d.ts.map +1 -0
- package/dist/artifact-mirror.js +170 -0
- package/dist/artifact-mirror.js.map +1 -0
- package/dist/artifact-resolver.d.ts +48 -0
- package/dist/artifact-resolver.d.ts.map +1 -0
- package/dist/artifact-resolver.js +164 -0
- package/dist/artifact-resolver.js.map +1 -0
- package/dist/assignment.d.ts +116 -0
- package/dist/assignment.d.ts.map +1 -0
- package/dist/assignment.js +475 -0
- package/dist/assignment.js.map +1 -0
- package/dist/auditLedger.d.ts +50 -0
- package/dist/auditLedger.d.ts.map +1 -0
- package/dist/auditLedger.js +136 -0
- package/dist/auditLedger.js.map +1 -0
- package/dist/boardHealthWorker.d.ts +134 -0
- package/dist/boardHealthWorker.d.ts.map +1 -0
- package/dist/boardHealthWorker.js +882 -0
- package/dist/boardHealthWorker.js.map +1 -0
- package/dist/bootstrap-team.d.ts +42 -0
- package/dist/bootstrap-team.d.ts.map +1 -0
- package/dist/bootstrap-team.js +111 -0
- package/dist/bootstrap-team.js.map +1 -0
- package/dist/buildInfo.d.ts +17 -0
- package/dist/buildInfo.d.ts.map +1 -0
- package/dist/buildInfo.js +56 -0
- package/dist/buildInfo.js.map +1 -0
- package/dist/calendar-events.d.ts +133 -0
- package/dist/calendar-events.d.ts.map +1 -0
- package/dist/calendar-events.js +615 -0
- package/dist/calendar-events.js.map +1 -0
- package/dist/calendar-ical.d.ts +41 -0
- package/dist/calendar-ical.d.ts.map +1 -0
- package/dist/calendar-ical.js +413 -0
- package/dist/calendar-ical.js.map +1 -0
- package/dist/calendar-reminder-engine.d.ts +10 -0
- package/dist/calendar-reminder-engine.d.ts.map +1 -0
- package/dist/calendar-reminder-engine.js +143 -0
- package/dist/calendar-reminder-engine.js.map +1 -0
- package/dist/calendar.d.ts +75 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +391 -0
- package/dist/calendar.js.map +1 -0
- package/dist/canvas-multiplexer.d.ts +44 -0
- package/dist/canvas-multiplexer.d.ts.map +1 -0
- package/dist/canvas-multiplexer.js +150 -0
- package/dist/canvas-multiplexer.js.map +1 -0
- package/dist/canvas-slots.d.ts +83 -0
- package/dist/canvas-slots.d.ts.map +1 -0
- package/dist/canvas-slots.js +144 -0
- package/dist/canvas-slots.js.map +1 -0
- package/dist/canvas-types.d.ts +56 -0
- package/dist/canvas-types.d.ts.map +1 -0
- package/dist/canvas-types.js +54 -0
- package/dist/canvas-types.js.map +1 -0
- package/dist/cf-keepalive.d.ts +40 -0
- package/dist/cf-keepalive.d.ts.map +1 -0
- package/dist/cf-keepalive.js +153 -0
- package/dist/cf-keepalive.js.map +1 -0
- package/dist/changeFeed.d.ts +38 -0
- package/dist/changeFeed.d.ts.map +1 -0
- package/dist/changeFeed.js +324 -0
- package/dist/changeFeed.js.map +1 -0
- package/dist/channels.d.ts +28 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +23 -0
- package/dist/channels.js.map +1 -0
- package/dist/chat-approval-detector.d.ts +47 -0
- package/dist/chat-approval-detector.d.ts.map +1 -0
- package/dist/chat-approval-detector.js +224 -0
- package/dist/chat-approval-detector.js.map +1 -0
- package/dist/chat.d.ts +119 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +666 -0
- package/dist/chat.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1142 -0
- package/dist/cli.js.map +1 -0
- package/dist/cloud.d.ts +45 -0
- package/dist/cloud.d.ts.map +1 -0
- package/dist/cloud.js +962 -0
- package/dist/cloud.js.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +33 -0
- package/dist/config.js.map +1 -0
- package/dist/connectivity.d.ts +59 -0
- package/dist/connectivity.d.ts.map +1 -0
- package/dist/connectivity.js +173 -0
- package/dist/connectivity.js.map +1 -0
- package/dist/contacts.d.ts +59 -0
- package/dist/contacts.d.ts.map +1 -0
- package/dist/contacts.js +183 -0
- package/dist/contacts.js.map +1 -0
- package/dist/content.d.ts +130 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +186 -0
- package/dist/content.js.map +1 -0
- package/dist/context-budget.d.ts +87 -0
- package/dist/context-budget.d.ts.map +1 -0
- package/dist/context-budget.js +459 -0
- package/dist/context-budget.js.map +1 -0
- package/dist/continuity-loop.d.ts +55 -0
- package/dist/continuity-loop.d.ts.map +1 -0
- package/dist/continuity-loop.js +267 -0
- package/dist/continuity-loop.js.map +1 -0
- package/dist/dashboard.d.ts +6 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/dashboard.js +2348 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/db.d.ts +44 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +648 -0
- package/dist/db.js.map +1 -0
- package/dist/doctor.d.ts +30 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +159 -0
- package/dist/doctor.js.map +1 -0
- package/dist/duplicateClosureGuard.d.ts +31 -0
- package/dist/duplicateClosureGuard.d.ts.map +1 -0
- package/dist/duplicateClosureGuard.js +83 -0
- package/dist/duplicateClosureGuard.js.map +1 -0
- package/dist/embeddings.d.ts +13 -0
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +78 -0
- package/dist/embeddings.js.map +1 -0
- package/dist/escalation.d.ts +80 -0
- package/dist/escalation.d.ts.map +1 -0
- package/dist/escalation.js +213 -0
- package/dist/escalation.js.map +1 -0
- package/dist/events.d.ts +130 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +382 -0
- package/dist/events.js.map +1 -0
- package/dist/executionSweeper.d.ts +97 -0
- package/dist/executionSweeper.d.ts.map +1 -0
- package/dist/executionSweeper.js +875 -0
- package/dist/executionSweeper.js.map +1 -0
- package/dist/experiments.d.ts +47 -0
- package/dist/experiments.d.ts.map +1 -0
- package/dist/experiments.js +133 -0
- package/dist/experiments.js.map +1 -0
- package/dist/feedback.d.ts +179 -0
- package/dist/feedback.d.ts.map +1 -0
- package/dist/feedback.js +397 -0
- package/dist/feedback.js.map +1 -0
- package/dist/files.d.ts +52 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +172 -0
- package/dist/files.js.map +1 -0
- package/dist/format-duration.d.ts +19 -0
- package/dist/format-duration.d.ts.map +1 -0
- package/dist/format-duration.js +33 -0
- package/dist/format-duration.js.map +1 -0
- package/dist/github-actor-auth.d.ts +20 -0
- package/dist/github-actor-auth.d.ts.map +1 -0
- package/dist/github-actor-auth.js +54 -0
- package/dist/github-actor-auth.js.map +1 -0
- package/dist/github-ci.d.ts +16 -0
- package/dist/github-ci.d.ts.map +1 -0
- package/dist/github-ci.js +37 -0
- package/dist/github-ci.js.map +1 -0
- package/dist/github-identity.d.ts +30 -0
- package/dist/github-identity.d.ts.map +1 -0
- package/dist/github-identity.js +96 -0
- package/dist/github-identity.js.map +1 -0
- package/dist/github-reviews.d.ts +24 -0
- package/dist/github-reviews.d.ts.map +1 -0
- package/dist/github-reviews.js +56 -0
- package/dist/github-reviews.js.map +1 -0
- package/dist/health.d.ts +391 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +1841 -0
- package/dist/health.js.map +1 -0
- package/dist/host-keepalive.d.ts +22 -0
- package/dist/host-keepalive.d.ts.map +1 -0
- package/dist/host-keepalive.js +126 -0
- package/dist/host-keepalive.js.map +1 -0
- package/dist/host-registry.d.ts +43 -0
- package/dist/host-registry.d.ts.map +1 -0
- package/dist/host-registry.js +93 -0
- package/dist/host-registry.js.map +1 -0
- package/dist/inbox.d.ts +87 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +410 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +306 -0
- package/dist/index.js.map +1 -0
- package/dist/insight-mutation.d.ts +32 -0
- package/dist/insight-mutation.d.ts.map +1 -0
- package/dist/insight-mutation.js +160 -0
- package/dist/insight-mutation.js.map +1 -0
- package/dist/insight-promotion.d.ts +89 -0
- package/dist/insight-promotion.d.ts.map +1 -0
- package/dist/insight-promotion.js +278 -0
- package/dist/insight-promotion.js.map +1 -0
- package/dist/insight-task-bridge.d.ts +77 -0
- package/dist/insight-task-bridge.d.ts.map +1 -0
- package/dist/insight-task-bridge.js +556 -0
- package/dist/insight-task-bridge.js.map +1 -0
- package/dist/insights.d.ts +222 -0
- package/dist/insights.d.ts.map +1 -0
- package/dist/insights.js +871 -0
- package/dist/insights.js.map +1 -0
- package/dist/intake-pipeline.d.ts +74 -0
- package/dist/intake-pipeline.d.ts.map +1 -0
- package/dist/intake-pipeline.js +199 -0
- package/dist/intake-pipeline.js.map +1 -0
- package/dist/intensity.d.ts +31 -0
- package/dist/intensity.d.ts.map +1 -0
- package/dist/intensity.js +94 -0
- package/dist/intensity.js.map +1 -0
- package/dist/knowledge-auto-index.d.ts +37 -0
- package/dist/knowledge-auto-index.d.ts.map +1 -0
- package/dist/knowledge-auto-index.js +149 -0
- package/dist/knowledge-auto-index.js.map +1 -0
- package/dist/knowledge-docs.d.ts +45 -0
- package/dist/knowledge-docs.d.ts.map +1 -0
- package/dist/knowledge-docs.js +188 -0
- package/dist/knowledge-docs.js.map +1 -0
- package/dist/lane-config.d.ts +25 -0
- package/dist/lane-config.d.ts.map +1 -0
- package/dist/lane-config.js +105 -0
- package/dist/lane-config.js.map +1 -0
- package/dist/lineage.d.ts +86 -0
- package/dist/lineage.d.ts.map +1 -0
- package/dist/lineage.js +303 -0
- package/dist/lineage.js.map +1 -0
- package/dist/logStore.d.ts +25 -0
- package/dist/logStore.d.ts.map +1 -0
- package/dist/logStore.js +83 -0
- package/dist/logStore.js.map +1 -0
- package/dist/manage.d.ts +12 -0
- package/dist/manage.d.ts.map +1 -0
- package/dist/manage.js +253 -0
- package/dist/manage.js.map +1 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +604 -0
- package/dist/mcp.js.map +1 -0
- package/dist/memory.d.ts +47 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +149 -0
- package/dist/memory.js.map +1 -0
- package/dist/mention-ack.d.ts +80 -0
- package/dist/mention-ack.d.ts.map +1 -0
- package/dist/mention-ack.js +175 -0
- package/dist/mention-ack.js.map +1 -0
- package/dist/messageRouter.d.ts +60 -0
- package/dist/messageRouter.d.ts.map +1 -0
- package/dist/messageRouter.js +309 -0
- package/dist/messageRouter.js.map +1 -0
- package/dist/mutationAlert.d.ts +44 -0
- package/dist/mutationAlert.d.ts.map +1 -0
- package/dist/mutationAlert.js +174 -0
- package/dist/mutationAlert.js.map +1 -0
- package/dist/noise-budget.d.ts +136 -0
- package/dist/noise-budget.d.ts.map +1 -0
- package/dist/noise-budget.js +340 -0
- package/dist/noise-budget.js.map +1 -0
- package/dist/notifications.d.ts +67 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +253 -0
- package/dist/notifications.js.map +1 -0
- package/dist/openclaw.d.ts +34 -0
- package/dist/openclaw.d.ts.map +1 -0
- package/dist/openclaw.js +208 -0
- package/dist/openclaw.js.map +1 -0
- package/dist/pause-controls.d.ts +31 -0
- package/dist/pause-controls.d.ts.map +1 -0
- package/dist/pause-controls.js +130 -0
- package/dist/pause-controls.js.map +1 -0
- package/dist/pidlock.d.ts +25 -0
- package/dist/pidlock.d.ts.map +1 -0
- package/dist/pidlock.js +179 -0
- package/dist/pidlock.js.map +1 -0
- package/dist/policy.d.ts +139 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +264 -0
- package/dist/policy.js.map +1 -0
- package/dist/polls.d.ts +47 -0
- package/dist/polls.d.ts.map +1 -0
- package/dist/polls.js +162 -0
- package/dist/polls.js.map +1 -0
- package/dist/portability.d.ts +55 -0
- package/dist/portability.d.ts.map +1 -0
- package/dist/portability.js +292 -0
- package/dist/portability.js.map +1 -0
- package/dist/pr-integrity.d.ts +45 -0
- package/dist/pr-integrity.d.ts.map +1 -0
- package/dist/pr-integrity.js +124 -0
- package/dist/pr-integrity.js.map +1 -0
- package/dist/prAutoMerge.d.ts +62 -0
- package/dist/prAutoMerge.d.ts.map +1 -0
- package/dist/prAutoMerge.js +493 -0
- package/dist/prAutoMerge.js.map +1 -0
- package/dist/preflight.d.ts +66 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/preflight.js +864 -0
- package/dist/preflight.js.map +1 -0
- package/dist/presence.d.ts +98 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +347 -0
- package/dist/presence.js.map +1 -0
- package/dist/provisioning.d.ts +101 -0
- package/dist/provisioning.d.ts.map +1 -0
- package/dist/provisioning.js +430 -0
- package/dist/provisioning.js.map +1 -0
- package/dist/reflection-automation.d.ts +59 -0
- package/dist/reflection-automation.d.ts.map +1 -0
- package/dist/reflection-automation.js +350 -0
- package/dist/reflection-automation.js.map +1 -0
- package/dist/reflections.d.ts +65 -0
- package/dist/reflections.d.ts.map +1 -0
- package/dist/reflections.js +306 -0
- package/dist/reflections.js.map +1 -0
- package/dist/release.d.ts +67 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +275 -0
- package/dist/release.js.map +1 -0
- package/dist/request-tracker.d.ts +36 -0
- package/dist/request-tracker.d.ts.map +1 -0
- package/dist/request-tracker.js +109 -0
- package/dist/request-tracker.js.map +1 -0
- package/dist/research.d.ts +75 -0
- package/dist/research.d.ts.map +1 -0
- package/dist/research.js +171 -0
- package/dist/research.js.map +1 -0
- package/dist/routing-approvals.d.ts +73 -0
- package/dist/routing-approvals.d.ts.map +1 -0
- package/dist/routing-approvals.js +88 -0
- package/dist/routing-approvals.js.map +1 -0
- package/dist/routing-override.d.ts +94 -0
- package/dist/routing-override.d.ts.map +1 -0
- package/dist/routing-override.js +290 -0
- package/dist/routing-override.js.map +1 -0
- package/dist/scope-routing.d.ts +18 -0
- package/dist/scope-routing.d.ts.map +1 -0
- package/dist/scope-routing.js +29 -0
- package/dist/scope-routing.js.map +1 -0
- package/dist/secrets.d.ts +77 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +287 -0
- package/dist/secrets.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +10887 -0
- package/dist/server.js.map +1 -0
- package/dist/service-probe.d.ts +53 -0
- package/dist/service-probe.d.ts.map +1 -0
- package/dist/service-probe.js +225 -0
- package/dist/service-probe.js.map +1 -0
- package/dist/shared-workspace-api.d.ts +73 -0
- package/dist/shared-workspace-api.d.ts.map +1 -0
- package/dist/shared-workspace-api.js +281 -0
- package/dist/shared-workspace-api.js.map +1 -0
- package/dist/shipped-heartbeat.d.ts +91 -0
- package/dist/shipped-heartbeat.d.ts.map +1 -0
- package/dist/shipped-heartbeat.js +272 -0
- package/dist/shipped-heartbeat.js.map +1 -0
- package/dist/starter-team.d.ts +23 -0
- package/dist/starter-team.d.ts.map +1 -0
- package/dist/starter-team.js +88 -0
- package/dist/starter-team.js.map +1 -0
- package/dist/suppression-ledger.d.ts +73 -0
- package/dist/suppression-ledger.d.ts.map +1 -0
- package/dist/suppression-ledger.js +125 -0
- package/dist/suppression-ledger.js.map +1 -0
- package/dist/system-loop-state.d.ts +4 -0
- package/dist/system-loop-state.d.ts.map +1 -0
- package/dist/system-loop-state.js +40 -0
- package/dist/system-loop-state.js.map +1 -0
- package/dist/taskCommentIngest.d.ts +43 -0
- package/dist/taskCommentIngest.d.ts.map +1 -0
- package/dist/taskCommentIngest.js +59 -0
- package/dist/taskCommentIngest.js.map +1 -0
- package/dist/taskPrecheck.d.ts +20 -0
- package/dist/taskPrecheck.d.ts.map +1 -0
- package/dist/taskPrecheck.js +329 -0
- package/dist/taskPrecheck.js.map +1 -0
- package/dist/taskStateSync.d.ts +8 -0
- package/dist/taskStateSync.d.ts.map +1 -0
- package/dist/taskStateSync.js +79 -0
- package/dist/taskStateSync.js.map +1 -0
- package/dist/tasks.d.ts +140 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +1281 -0
- package/dist/tasks.js.map +1 -0
- package/dist/team-config.d.ts +24 -0
- package/dist/team-config.d.ts.map +1 -0
- package/dist/team-config.js +221 -0
- package/dist/team-config.js.map +1 -0
- package/dist/team-doctor.d.ts +22 -0
- package/dist/team-doctor.d.ts.map +1 -0
- package/dist/team-doctor.js +270 -0
- package/dist/team-doctor.js.map +1 -0
- package/dist/team-pulse.d.ts +52 -0
- package/dist/team-pulse.d.ts.map +1 -0
- package/dist/team-pulse.js +176 -0
- package/dist/team-pulse.js.map +1 -0
- package/dist/telemetry.d.ts +74 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +256 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/test-task-filter.d.ts +21 -0
- package/dist/test-task-filter.d.ts.map +1 -0
- package/dist/test-task-filter.js +48 -0
- package/dist/test-task-filter.js.map +1 -0
- package/dist/types.d.ts +126 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/usage-tracking.d.ts +101 -0
- package/dist/usage-tracking.d.ts.map +1 -0
- package/dist/usage-tracking.js +325 -0
- package/dist/usage-tracking.js.map +1 -0
- package/dist/vector-store.d.ts +87 -0
- package/dist/vector-store.d.ts.map +1 -0
- package/dist/vector-store.js +247 -0
- package/dist/vector-store.js.map +1 -0
- package/dist/watchdog/idleNudgeLane.d.ts +22 -0
- package/dist/watchdog/idleNudgeLane.d.ts.map +1 -0
- package/dist/watchdog/idleNudgeLane.js +98 -0
- package/dist/watchdog/idleNudgeLane.js.map +1 -0
- package/dist/webhooks.d.ts +103 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +398 -0
- package/dist/webhooks.js.map +1 -0
- package/dist/working-contract.d.ts +42 -0
- package/dist/working-contract.d.ts.map +1 -0
- package/dist/working-contract.js +228 -0
- package/dist/working-contract.js.map +1 -0
- package/dist/ws-heartbeat.d.ts +66 -0
- package/dist/ws-heartbeat.d.ts.map +1 -0
- package/dist/ws-heartbeat.js +174 -0
- package/dist/ws-heartbeat.js.map +1 -0
- package/package.json +87 -0
- package/plugins/reflectt-channel/README.md +96 -0
- package/plugins/reflectt-channel/index.ts +789 -0
- package/plugins/reflectt-channel/openclaw.plugin.json +23 -0
- package/plugins/reflectt-channel/package.json +23 -0
- package/plugins/reflectt-channel/src/channel.ts +433 -0
- package/plugins/reflectt-channel/src/types.ts +29 -0
- package/public/avatars/echo.png +0 -0
- package/public/avatars/harmony.png +0 -0
- package/public/avatars/kai.png +0 -0
- package/public/avatars/link.png +0 -0
- package/public/avatars/pixel.png +0 -0
- package/public/avatars/rhythm.png +0 -0
- package/public/avatars/ryan.png +0 -0
- package/public/avatars/sage.png +0 -0
- package/public/avatars/scout.png +0 -0
- package/public/avatars/spark.png +0 -0
- package/public/dashboard-animations.css +381 -0
- package/public/dashboard.js +3479 -0
- package/public/docs.md +1062 -0
- package/public/file-upload-mock.html +1097 -0
- package/public/og-card.png +0 -0
- package/public/ui-kit.html +318 -0
- package/public/widget/feedback.js +194 -0
package/public/docs.md
ADDED
|
@@ -0,0 +1,1062 @@
|
|
|
1
|
+
# reflectt-node API Reference
|
|
2
|
+
|
|
3
|
+
Base URL: `http://localhost:4445`
|
|
4
|
+
|
|
5
|
+
## Quickstarts
|
|
6
|
+
|
|
7
|
+
- [Tasks API Quickstart](../docs/TASKS_API_QUICKSTART.md) — create → doing → validating → done with current status contract and curl examples.
|
|
8
|
+
- [Known Issues](../docs/KNOWN_ISSUES.md) — verified runtime/docs drift with repro, workaround, and owner.
|
|
9
|
+
- [Reviewer Handoff Bundle Template](../docs/REVIEWER_HANDOFF_BUNDLE_TEMPLATE.md) — reviewer-ready QA bundle format.
|
|
10
|
+
- [Task Creation Template](../docs/TASK_CREATION_TEMPLATE.md) — high-signal task spec + anti-patterns.
|
|
11
|
+
- [Reviewer-Ready Tasks Guide](../docs/REVIEWER_READY_TASKS_GUIDE.md) — short operational guide to reduce QA churn.
|
|
12
|
+
- [Dashboard Task Field Reference](../docs/DASHBOARD_TASK_FIELD_REFERENCE.md) — task-card field mapping, null semantics, and UI edge cases.
|
|
13
|
+
- [Task Comments API Quickstart](../docs/TASK_COMMENTS_API_QUICKSTART.md) — POST/GET task comments with QA checklist.
|
|
14
|
+
- [Release Endpoints Guide](../docs/RELEASE_ENDPOINTS_GUIDE.md) — /release/status, /release/notes, /release/deploy workflow.
|
|
15
|
+
- [Review Queue SOP](../docs/REVIEW_QUEUE_SOP.md) — validating queue workflow, SLA, and PASS/FAIL discipline.
|
|
16
|
+
- [Task-Close Gate Playbook](../docs/TASK_CLOSE_GATE_PLAYBOOK.md) — required close metadata with pass/fail examples.
|
|
17
|
+
- [Backlog Claim Troubleshooting](../docs/BACKLOG_CLAIM_TROUBLESHOOTING.md) — claim flow, metadata requirements, and common errors.
|
|
18
|
+
- [Health Endpoints Operator Cheat Sheet](../docs/HEALTH_ENDPOINTS_OPERATOR_CHEAT_SHEET.md) — compact endpoint-by-endpoint triage reference.
|
|
19
|
+
- [Health Endpoints Map](../docs/HEALTH_ENDPOINTS_MAP.md) — endpoint selector for /health, /health/team, /health/agents, and debug paths.
|
|
20
|
+
- [Watchdog Behavior Explainer](../docs/WATCHDOG_BEHAVIOR_EXPLAINER.md) — idle/cadence/mention rescue behavior with cooldown + debug flow.
|
|
21
|
+
- [OpenClaw 2026.2.13 Memory Search Rollout Note](../docs/OPENCLAW_2026_2_13_MEMORY_SEARCH_ROLLOUT_NOTE.md) — what changed, impact, caveats, and safe usage pattern.
|
|
22
|
+
- [Research Intake Handbook](../docs/RESEARCH_INTAKE_HANDBOOK.md) — requests/findings flow and handoff protocol.
|
|
23
|
+
- [Dashboard Panel Reference](../docs/DASHBOARD_PANEL_REFERENCE.md) — panel-to-endpoint mapping and refresh behavior.
|
|
24
|
+
- [API Docs Quality Checklist](../docs/API_DOCS_QUALITY_CHECKLIST.md) — pre-merge checks for endpoint-doc consistency.
|
|
25
|
+
- [Weekly Ship Log Template](../docs/WEEKLY_SHIP_LOG_TEMPLATE.md) — compact weekly status template.
|
|
26
|
+
- [Incident Writeup Template](../docs/INCIDENT_WRITEUP_TEMPLATE.md) — timeline/root-cause/fix/prevention structure.
|
|
27
|
+
- [Contributor Onboarding Script](../docs/CONTRIBUTOR_ONBOARDING_SCRIPT.md) — first-day workflow from clone to validated task.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## UI Pages
|
|
32
|
+
|
|
33
|
+
### `GET /ui-kit`
|
|
34
|
+
|
|
35
|
+
Living design system reference page. Shows all Reflectt design tokens rendered as interactive specimens: color swatches, typography scale, spacing, radii, shadows, buttons, links, badges, inputs, panels, and tables.
|
|
36
|
+
|
|
37
|
+
Returns `text/html`. No parameters.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Open in browser
|
|
41
|
+
open http://localhost:4445/ui-kit
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Error Envelope (all endpoints)
|
|
47
|
+
|
|
48
|
+
All API errors normalize to:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"success": false,
|
|
53
|
+
"error": "human-readable message",
|
|
54
|
+
"code": "BAD_REQUEST|NOT_FOUND|CONFLICT|...",
|
|
55
|
+
"status": 400,
|
|
56
|
+
"hint": "optional fix guidance"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For 4xx errors, `hint` is included by default to speed up client-side troubleshooting.
|
|
61
|
+
|
|
62
|
+
## Rate limiting (`429` / `Retry-After`)
|
|
63
|
+
|
|
64
|
+
Core `reflectt-node` routes do not currently apply built-in per-route throttling in-process.
|
|
65
|
+
|
|
66
|
+
Operationally:
|
|
67
|
+
- If you see `429 Too Many Requests`, it is typically from an upstream gateway/proxy layer.
|
|
68
|
+
- If `Retry-After` is present, follow that value before retrying.
|
|
69
|
+
- Retry strategy recommendation: exponential backoff + jitter for idempotent reads.
|
|
70
|
+
|
|
71
|
+
## Preflight
|
|
72
|
+
|
|
73
|
+
| Method | Path | Description |
|
|
74
|
+
|--------|------|-------------|
|
|
75
|
+
| GET | `/preflight` | Run BYOH preflight checks (auth, network, runtime). Returns JSON with per-check pass/fail, remediation guidance, and overall readiness status. Query: `cloudUrl`, `port`, `skipNetwork` |
|
|
76
|
+
| GET | `/preflight/text` | Run preflight checks and return a plain-text formatted report for CLI/terminal display. Same query params as GET. |
|
|
77
|
+
| POST | `/preflight` | Run preflight checks with custom config. Body: `{ cloudUrl?, port?, skipNetwork?, joinToken?, apiKey?, userId? }`. When `userId` is provided, emits `host_preflight_passed` or `host_preflight_failed` activation funnel events for onboarding drop-off tracking. |
|
|
78
|
+
|
|
79
|
+
## Hosts (registry)
|
|
80
|
+
|
|
81
|
+
Remote hosts (multi-host installs) phone-home via a lightweight heartbeat so the dashboard can show which machines are online.
|
|
82
|
+
|
|
83
|
+
| Method | Path | Description |
|
|
84
|
+
|--------|------|-------------|
|
|
85
|
+
| POST | `/hosts/heartbeat` | Upsert a host heartbeat. Body: `{ hostId (string, required), hostname?, os?, arch?, ip?, version?, agents? (string[]), metadata? (object) }`. Returns `{ success, host }`.
|
|
86
|
+
| GET | `/hosts` | List all known hosts. Query: `status=online|stale|offline` (optional). Returns `{ hosts, count }`.
|
|
87
|
+
| GET | `/hosts/:hostId` | Fetch one host by ID. Returns `{ host }` or `{ success:false, error:"Host not found" }`.
|
|
88
|
+
| DELETE | `/hosts/:hostId` | Remove a host from the registry. Returns `{ success, hostId }`.
|
|
89
|
+
| GET | `/hosts/keepalive` | Keepalive status for all managed hosts — last ping times, intervals, health. |
|
|
90
|
+
| POST | `/hosts/keepalive/ping` | Manually trigger a keepalive ping to all or a specific host. Body: `{ hostId? }`. Returns `{ success, results }`. |
|
|
91
|
+
|
|
92
|
+
## Health
|
|
93
|
+
|
|
94
|
+
| Method | Path | Description |
|
|
95
|
+
|--------|------|-------------|
|
|
96
|
+
| GET | `/health/errors` | Request error metrics: total errors, total requests, error rate, and last 20 errors for debugging. Returns `{ total_errors, total_requests, error_rate, recent[], timestamp }`. |
|
|
97
|
+
| GET | `/health/keepalive` | Self-keepalive status for CF/serverless: warm boot detection, ping state, cold start count, environment info. |
|
|
98
|
+
| GET | `/health/ping` | Ultra-lightweight keepalive — no DB access. Returns `{ status, uptime_seconds, ts }`. Use for cron triggers, load balancers, uptime monitors. |
|
|
99
|
+
| GET | `/health/watchdog` | Richer keepalive with cold_start flag, task/chat stats, boot_info, and remediation hints. For monitoring dashboards. See `docs/KEEPALIVE.md`. |
|
|
100
|
+
| GET | `/health` | System health — task counts, chat stats, inbox stats. Includes `cold_start` flag (true if uptime < 60s). Query: `include_test=1` to include test-harness tasks in stats (excluded by default). |
|
|
101
|
+
| GET | `/team/health` | Team config linter status for `~/.reflectt/TEAM.md`, `TEAM-ROLES.yaml`, `TEAM-STANDARDS.md` (issues, role coverage, last check timestamp) |
|
|
102
|
+
| GET | `/health/team` | Team health metrics with compliance + `staleDoing` snapshot. Per-agent rows include `activeTaskTitle` and `activeTaskPrLink` when an agent has a doing task with PR evidence. Flagged agents also include `actionable_reason` (last comment age, last transition, last mention age, suggested action). |
|
|
103
|
+
| GET | `/health/agents` | Per-agent health summary (`last_seen`, `active_task`, `heartbeat_age_ms`, `last_shipped_at`, `stale_reason`, state) |
|
|
104
|
+
| GET | `/health/compliance` | Compliance check results |
|
|
105
|
+
| GET | `/health/backlog` | Backlog readiness health by lane (ready counts, floor compliance, breach status, blocked/todo/doing/validating rollups). Query: `include_test=1` to include test-harness tasks. |
|
|
106
|
+
| GET | `/health/system` | System + loop/timer health (quiet-hours suppression, sweeper status, watchdog tick timestamps, uptime/memory) |
|
|
107
|
+
| GET | `/health/build` | Build/runtime identity (version, git SHA, branch, build timestamp, PID, uptime) |
|
|
108
|
+
| GET | `/health/deploy` | Deploy attestation payload for dashboards (`version`, `gitSha`, `branch`, `buildTimestamp`, `startedAt`, `pid`) |
|
|
109
|
+
| GET | `/health/team/summary` | Compact team health summary |
|
|
110
|
+
| GET | `/health/team/history` | Historical team health data |
|
|
111
|
+
| GET | `/health/workflow` | Unified per-agent workflow state: doing-task age, last shipped timestamp, blocker flag, artifact path, and linked PR state. Query: `include_test=1` to include test-harness tasks. |
|
|
112
|
+
| GET | `/health/reflection-pipeline` | Reflection→Insight→Promotion health signal. Returns recent reflection/insight/promotion counts, status (`healthy`\|`at_risk`\|`broken`), and alert timestamps. Triggers alert when reflections flow but insights remain zero past threshold. |
|
|
113
|
+
| GET | `/health/backlog` | Backlog readiness snapshot by lane/agent with ready-floor breach detection and stale-validating summary. Query: `include_test=1` to include test-harness tasks. |
|
|
114
|
+
| GET | `/health/alert-preflight` | Alert-preflight guard metrics: total checked, canary-flagged, suppressed, false-positive rate, mode (canary/enforce/off). |
|
|
115
|
+
| GET | `/health/mention-ack` | Mention-ack lifecycle metrics (pending, timeout, latency counters) |
|
|
116
|
+
| GET | `/health/mention-ack/recent` | Recent mention-ack entries for debugging. Query: `limit` (max 100) |
|
|
117
|
+
| GET | `/health/mention-ack/:agent` | Pending mention-ack entries for one agent |
|
|
118
|
+
| POST | `/health/mention-ack/check-timeouts` | Run timeout sweep and return timed-out mention entries |
|
|
119
|
+
| GET | `/health/idle-nudge/debug` | Idle-nudge watchdog debug state |
|
|
120
|
+
| GET | `/admin/task-comment-rejects` | Reject ledger for phantom task-comment IDs. Query: `limit` (max 200), `reason` (task_not_found\|invalid_task_refs), `author`, `since` (timestamp). Each row includes provenance (integration, sender_id, original_message_id). |
|
|
121
|
+
| POST | `/health/idle-nudge/tick` | Trigger idle-nudge evaluation |
|
|
122
|
+
| POST | `/health/cadence-watchdog/tick` | Trigger cadence watchdog |
|
|
123
|
+
| POST | `/health/mention-rescue/tick` | Trigger mention-rescue fallback |
|
|
124
|
+
| POST | `/health/working-contract/tick` | Evaluate working-contract enforcement: auto-requeue stale doing tasks (90m warning → 15m grace → auto todo) and fire alerts. |
|
|
125
|
+
| GET | `/health/working-contract/gate/:agent` | Dry-run claim gate check for an agent. Returns `{ allowed, reason }` — whether the agent can claim a new task given current WIP and contract status. |
|
|
126
|
+
|
|
127
|
+
### Quick system-loop check
|
|
128
|
+
|
|
129
|
+
Verify watchdogs are actually running (and whether they’re suppressed by quiet hours):
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
curl -s http://127.0.0.1:4445/health/system | jq
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Hosts (multi-host registry)
|
|
136
|
+
|
|
137
|
+
Remote hosts (Pis/robots/other machines) can phone-home to a central reflectt-node.
|
|
138
|
+
|
|
139
|
+
| Method | Path | Description |
|
|
140
|
+
|--------|------|-------------|
|
|
141
|
+
| POST | `/hosts/heartbeat` | Upsert a host heartbeat. Body: `{ hostId, hostname?, os?, arch?, ip?, version?, agents? (string[]), metadata? (object) }`. Returns `{ success, host }`. |
|
|
142
|
+
| GET | `/hosts` | List hosts. Query: `status` (optional). Returns `{ hosts, count }`. |
|
|
143
|
+
| GET | `/hosts/:hostId` | Fetch one host by id. Returns `{ host }` or `{ success:false, error }`. |
|
|
144
|
+
| DELETE | `/hosts/:hostId` | Remove a host from registry. Returns `{ success, hostId }`. |
|
|
145
|
+
|
|
146
|
+
### Team Pulse
|
|
147
|
+
|
|
148
|
+
| Method | Path | Description |
|
|
149
|
+
|--------|------|-------------|
|
|
150
|
+
| GET | `/health/team/pulse` | Current team pulse snapshot: per-agent activity summary, team velocity, and health signals |
|
|
151
|
+
| GET | `/health/team/pulse/config` | Read team pulse broadcast configuration |
|
|
152
|
+
| GET | `/health/team/pulse/history` | Historical pulse snapshots. Query: `limit`, `since` |
|
|
153
|
+
| PATCH | `/health/team/pulse/config` | Update pulse config. Fields: `intervalMs`, `channel`, `enabled` |
|
|
154
|
+
| POST | `/health/team/pulse` | Trigger immediate team pulse broadcast |
|
|
155
|
+
| GET | `/health/team/doctor` | Run team doctor diagnostics: checks node, database, agents, gateway, model auth, chat activity. Returns overall status + fix instructions |
|
|
156
|
+
| POST | `/team/starter` | Scaffold a starter team with default agents (builder + ops). Idempotent: skips existing agent directories |
|
|
157
|
+
|
|
158
|
+
### Quiet hours behavior (watchdogs)
|
|
159
|
+
|
|
160
|
+
Watchdog endpoints currently execute whenever called (manual or scheduled). Quiet-hours suppression is not enforced by these endpoints at the API layer yet.
|
|
161
|
+
|
|
162
|
+
If your deployment needs quiet-hours behavior today, enforce it in scheduler/gateway policy (for example: only trigger watchdog ticks during allowed windows).
|
|
163
|
+
|
|
164
|
+
## Tasks
|
|
165
|
+
|
|
166
|
+
| Method | Path | Description |
|
|
167
|
+
|--------|------|-------------|
|
|
168
|
+
| GET | `/tasks` | List tasks. Query: `status`, `assignee`, `agent`, `priority`, `limit`, `offset`, `q` (text search), `updatedSince`, `include_test=1|true` (include test-harness tasks; default excluded). Returns `{ tasks, total, offset, limit, hasMore }`. |
|
|
169
|
+
| GET | `/tasks/:id` | Get task by ID. Also accepts unambiguous ID prefixes. Ambiguous prefix returns `400` with full-ID suggestions. |
|
|
170
|
+
| GET | `/tasks/:id/artifacts` | Resolve all artifact references from task metadata. Returns accessibility status (file existence, URL validation), heartbeat status (last comment age, staleness). Heartbeat threshold: 30m for doing tasks. Query: `include=preview` (first 2000 chars) or `include=content` (full file, up to 400KB). Falls back to shared workspace (`~/.openclaw/workspace-shared`) when file is not in repo root. |
|
|
171
|
+
| GET | `/tasks/:id/history` | Status changelog for task lifecycle transitions. Returns `history[]` entries shaped as `{ status, changedBy, changedAt, metadata }` for each status transition. |
|
|
172
|
+
| GET | `/tasks/:id/comments` | List task discussion comments. Query: `includeSuppressed=true|1` to include suppressed (audit) comments. Returns `{ comments, count, includeSuppressed }` where each comment is `{ id, taskId, author, content, timestamp, category?, suppressed, suppressedReason?, suppressedRule? }`. |
|
|
173
|
+
| POST | `/tasks/:id/comments` | Add task comment. Body: `{ "author": "agent", "content": "text", "category"?: "restart|rollback_trigger|promote_due_verdict" }`. If task has `metadata.comms_policy.rule = silent_until_restart_or_promote_due`, missing/non-whitelisted categories are stored but suppressed from default feeds. Returns `{ success, comment }` (same fields as GET comments). |
|
|
174
|
+
| GET | `/tasks/:id/pr-review` | PR review quality panel data. Returns diff scope, CI checks, done criteria alignment. Requires PR URL in task metadata (`pr_url`, `qa_bundle.pr_link`, or in `artifacts`). |
|
|
175
|
+
| POST | `/tasks/:id/outcome` | Capture 48h checkpoint verdict for completed tasks. Body: `verdict` (`PASS`\|`NO-CHANGE`\|`REGRESSION`), optional `author`, `notes` |
|
|
176
|
+
| POST | `/tasks/:id/review-bundle` | Auto-build reviewer packet by resolving PR URL + CI + artifact evidence from task metadata. Returns normalized `verdict` (`pass`/`fail`) and reasons. Optional body: `author`, `strict` (default `true`, requires CI=`success`). |
|
|
177
|
+
| POST | `/tasks/:id/review` | Reviewer decision endpoint. Body: `{ "reviewer": "agent", "decision": "approve|reject", "comment": "..." }`. Only the assigned reviewer may submit. Approve auto-transitions validating→done. |
|
|
178
|
+
| GET | `/reviews/pending` | Pending reviews for a reviewer. Query: `reviewer` (required), `compact` (optional). Returns tasks in validating awaiting review (excludes already-approved). Each item: id, title, assignee, priority, age_minutes, review_state, pr_url, artifact_path. Sorted oldest-first. |
|
|
179
|
+
| POST | `/tasks` | Create task. Required: `title`, `createdBy`, `assignee`, `reviewer`, `done_criteria` (string[]), `eta`. Optional: `description`, `priority` (P0-P3), `status`, `tags`, `metadata`. **Reflection-origin invariant:** `metadata.source_reflection` or `metadata.source_insight` required (or `metadata.reflection_exempt=true` with `reflection_exempt_reason`). Status contract: `validating` also requires `metadata.artifact_path` under `process/`. |
|
|
180
|
+
| PATCH | `/tasks/:id` | Update task (partial). Any task field, plus optional `actor` for history attribution. Status contract: `doing` requires reviewer + `metadata.eta`; `validating` requires `metadata.artifact_path` under `process/` (workspace-agnostic). |
|
|
181
|
+
| DELETE | `/tasks/:id` | Delete task |
|
|
182
|
+
| GET | `/tasks/next` | Pull-based assignment. Query: `agent`, `compact` |
|
|
183
|
+
| GET | `/tasks/active` | Get active (doing) task for agent. Query: `agent`, `compact`. Returns null if no doing tasks. |
|
|
184
|
+
| GET | `/heartbeat/:agent` | Single compact heartbeat payload (~200 tokens). Returns active task, next task, slim inbox, queue counts, and suggested action. Replaces 3 separate API calls. |
|
|
185
|
+
| GET | `/bootstrap/heartbeat/:agent` | Generate optimal HEARTBEAT.md content for agent. References best endpoints. Includes version stamp and content hash for change detection. |
|
|
186
|
+
| POST | `/bootstrap/team` | Returns TEAM-ROLES.yaml schema, constraints, well-formed examples, and save endpoint. The calling agent composes the team itself. Body: `{ useCase?, maxAgents? }`. Returns `{ schema, constraints, examples[], saveEndpoint, nextSteps[] }`. |
|
|
187
|
+
| GET | `/manage/status` | Remote management: unified status (version + health + uptime). Auth: `x-manage-token` header or `Authorization: Bearer`. |
|
|
188
|
+
| GET | `/manage/config` | Remote management: config introspection with secrets redacted. Auth required. |
|
|
189
|
+
| GET | `/manage/logs` | Remote management: bounded log tail. Query: `level`, `since`, `limit`, `format=text`. Auth required. |
|
|
190
|
+
| POST | `/manage/restart` | Remote management: graceful restart (Docker/systemd/CLI). Auth required. |
|
|
191
|
+
| GET | `/manage/disk` | Remote management: data directory sizes. Auth required. |
|
|
192
|
+
| GET | `/capabilities` | Agent-facing endpoint discovery. Lists all endpoints grouped by purpose, compact support flags, and usage recommendations. |
|
|
193
|
+
| GET | `/version` | Current version + latest available from GitHub releases. Includes `update_available` boolean. Caches GitHub check for 15 minutes. |
|
|
194
|
+
| GET | `/me/:agent` | Agent "My Now" cockpit payload: assigned tasks, pending reviews, blockers, failing-check signals, since-last-seen changelog, and next action. Supports `compact`. |
|
|
195
|
+
| GET | `/tasks/intake-schema` | Task intake schema discovery — returns required/optional fields and per-type templates |
|
|
196
|
+
| GET | `/tasks/templates/:type` | Get task creation template for a specific type (e.g. `feature`, `bug`, `chore`) |
|
|
197
|
+
| GET | `/tasks/search` | Keyword search across task `title` + `description` (case-insensitive). Query: `q`, optional `limit`, `include_test=1|true` (include test-harness tasks; default excluded). |
|
|
198
|
+
| GET | `/tasks/analytics` | Task completion analytics and velocity |
|
|
199
|
+
| GET | `/tasks/instrumentation/lifecycle` | Reviewer/done-criteria gates + status-contract violations (`doing` missing ETA, `validating` missing artifact path) |
|
|
200
|
+
| POST | `/tasks/batch-create` | Batch create up to 20 tasks. Body: `{ "tasks": [...], "createdBy": "agent", "deduplicate": true, "dryRun": false }`. Each task follows the same schema as `POST /tasks`. Returns per-task results (created/duplicate/error) with summary counts. Deduplication checks exact title match + fuzzy word overlap (Jaccard >0.6) against active tasks. |
|
|
201
|
+
| GET | `/tasks/heartbeat-status` | All doing tasks with stale comment activity (>30m). Returns `{ threshold, doingTaskCount, staleCount, staleTasks[] }`. Use for monitoring status heartbeat discipline compliance. |
|
|
202
|
+
| GET | `/tasks/board-health` | Board-level health metrics for backlog replenishment. Returns per-agent breakdown (doing, validating, todo, active counts), `needsWork`/`lowWatermark` flags, and `replenishNeeded` trigger (fires when 2+ agents idle or <3 backlog tasks). Query: `include_test=1` to include test-harness tasks. |
|
|
203
|
+
| GET | `/agents/roles` | Agent role registry with live WIP status. Returns all agents with `name`, `displayName`, `role`, `affinityTags`, `protectedDomains`, `wipCap`, `wipCount`, `overCap`. |
|
|
204
|
+
| POST | `/config/identity` | Set an agent's display name. Body: `{ "agent": "agent-1", "displayName": "Juniper" }`. Persists to TEAM-ROLES.yaml, hot-reloads. Dashboard and mentions use display name. |
|
|
205
|
+
| GET | `/resolve/mention/:mention` | Resolve a mention string (name, displayName, or alias) to canonical agent ID. Returns `{ agent, displayName, role }`. |
|
|
206
|
+
| POST | `/tasks/suggest-assignee` | Suggest best assignee for a task. Body: `{ "title": "...", "tags": [...], "done_criteria": [...] }`. Returns `suggested` agent name, `scores` array with affinity/WIP/throughput breakdown, and `protectedMatch` if a protected domain applies. |
|
|
207
|
+
| GET | `/team/manifest` | Serve TEAM.md from `~/.reflectt/` (falls back to defaults). Returns `manifest` object with `raw_markdown`, parsed `sections` array, `version` (SHA-256 hash), `updated_at`, `path`, and `source`. |
|
|
208
|
+
|
|
209
|
+
### Lane-state transition metadata (required on guarded transitions)
|
|
210
|
+
|
|
211
|
+
`PATCH /tasks/:id` enforces transition metadata for lane-locked transitions:
|
|
212
|
+
|
|
213
|
+
- `doing -> blocked` requires:
|
|
214
|
+
- `metadata.transition.type = "pause"`
|
|
215
|
+
- `metadata.transition.reason`
|
|
216
|
+
- `blocked -> doing` requires:
|
|
217
|
+
- `metadata.transition.type = "resume"`
|
|
218
|
+
- `metadata.transition.reason`
|
|
219
|
+
- `doing -> doing` with assignee change (handoff) requires:
|
|
220
|
+
- `metadata.transition.type = "handoff"`
|
|
221
|
+
- `metadata.transition.reason`
|
|
222
|
+
- `metadata.transition.handoff_to` (must match new `assignee`)
|
|
223
|
+
|
|
224
|
+
If missing/invalid, API returns `400` with `Lane-state lock: ...` validation errors.
|
|
225
|
+
|
|
226
|
+
### Done-gate: PR merge verification
|
|
227
|
+
|
|
228
|
+
When closing a code-lane task (`product`/`frontend`/`backend`/`infra` lane or `code` tag), the API verifies:
|
|
229
|
+
|
|
230
|
+
1. **`artifacts` required** — at least one proof link (`gate: artifacts`)
|
|
231
|
+
2. **PR URL required** — at least one GitHub PR URL in artifacts (`gate: pr_link`)
|
|
232
|
+
3. **PR must be merged** — linked PRs are checked via GitHub API; open PRs block closure (`gate: pr_not_merged`)
|
|
233
|
+
4. **Reviewer sign-off** — assigned reviewer must approve (`gate: reviewer_signoff`)
|
|
234
|
+
|
|
235
|
+
Bypass: set `metadata.pr_waiver=true` + `metadata.pr_waiver_reason` to skip PR gates (hotfixes).
|
|
236
|
+
Graceful degradation: if GitHub API is unavailable, the merge check is skipped (does not block).
|
|
237
|
+
|
|
238
|
+
## GitHub approvals (per-agent identity routing)
|
|
239
|
+
|
|
240
|
+
Reflectt needs to occasionally **approve** GitHub PRs. GitHub blocks self-approval (you cannot approve your own PR), so we support per-actor tokens.
|
|
241
|
+
|
|
242
|
+
### Token configuration
|
|
243
|
+
Store fine-grained PATs in the Secret Vault:
|
|
244
|
+
|
|
245
|
+
- `github.pat.<actor>` (recommended, scope=`agent`)
|
|
246
|
+
- Example: `github.pat.harmony`, `github.pat.pixel`, `github.pat.kai`
|
|
247
|
+
- Optional fallback shared reviewer identity:
|
|
248
|
+
- `github.pat.reviewer` (scope=`host`)
|
|
249
|
+
|
|
250
|
+
Env var fallback is also supported:
|
|
251
|
+
- `GH_TOKEN_<ACTOR>` / `GITHUB_TOKEN_<ACTOR>`
|
|
252
|
+
- legacy: `GH_TOKEN` / `GITHUB_TOKEN`
|
|
253
|
+
|
|
254
|
+
### Endpoints
|
|
255
|
+
|
|
256
|
+
**Security:** These endpoints are **disabled by default**. Enable with:
|
|
257
|
+
- `REFLECTT_ENABLE_GITHUB_APPROVAL_API=true`
|
|
258
|
+
|
|
259
|
+
They are **localhost-only** and can be additionally protected by token:
|
|
260
|
+
- set `REFLECTT_GITHUB_APPROVAL_TOKEN=<token>`
|
|
261
|
+
- send `x-reflectt-admin-token: <token>` (or `Authorization: Bearer <token>`)
|
|
262
|
+
|
|
263
|
+
| Method | Path | Description |
|
|
264
|
+
|--------|------|-------------|
|
|
265
|
+
| GET | `/github/whoami/:actor` | Validate which GitHub user a given actor token maps to (never returns the token). |
|
|
266
|
+
| POST | `/github/pr/approve` | Approve a PR as a given actor. Body: `{ pr_url, actor, reason? }` |
|
|
267
|
+
|
|
268
|
+
## Recurring Tasks
|
|
269
|
+
|
|
270
|
+
| Method | Path | Description |
|
|
271
|
+
|--------|------|-------------|
|
|
272
|
+
| GET | `/tasks/recurring` | List recurring task definitions |
|
|
273
|
+
| POST | `/tasks/recurring` | Create recurring task definition |
|
|
274
|
+
| PATCH | `/tasks/recurring/:id` | Update recurring task definition (supports `enabled` toggle and schedule updates) |
|
|
275
|
+
| DELETE | `/tasks/recurring/:id` | Delete recurring task definition |
|
|
276
|
+
| POST | `/tasks/recurring/materialize` | Materialize due recurring tasks; skips creation when previous instance is still open. Query: `force=true` to override skip guard |
|
|
277
|
+
|
|
278
|
+
## Backlog (Self-Serve)
|
|
279
|
+
|
|
280
|
+
| Method | Path | Description |
|
|
281
|
+
|--------|------|-------------|
|
|
282
|
+
| GET | `/tasks/backlog` | Unassigned todo tasks ranked by priority then age. Returns `{ tasks, count }` |
|
|
283
|
+
| POST | `/tasks/:id/claim` | Self-assign a task → moves to "doing". Body: `{ "agent": "name" }`. Rejects if already assigned |
|
|
284
|
+
|
|
285
|
+
## Release / Deploy
|
|
286
|
+
|
|
287
|
+
| Method | Path | Description |
|
|
288
|
+
|--------|------|-------------|
|
|
289
|
+
| GET | `/release/status` | Compare startup code snapshot vs current repo state. Returns `stale` + reasons for code/server mismatch detection. |
|
|
290
|
+
| GET | `/release/notes` | Generate deploy changelog from completed tasks. Query: `since` (epoch ms), `limit`. Returns markdown + structured task list. |
|
|
291
|
+
| GET | `/release/diff` | Compare live SHA vs previous deploy SHA. Returns changed files, inferred endpoint changes, changed tests, commits, and PR links. Query: `from`, `to`, `commitLimit`. |
|
|
292
|
+
| POST | `/release/deploy` | Mark deploy timestamp + tracked commit SHA. Body (optional): `{ "deployedBy": "agent", "note": "text" }` |
|
|
293
|
+
|
|
294
|
+
## Chat
|
|
295
|
+
|
|
296
|
+
| Method | Path | Description |
|
|
297
|
+
|--------|------|-------------|
|
|
298
|
+
| GET | `/chat/ws` | WebSocket — real-time chat |
|
|
299
|
+
| GET | `/ws/stats` | WebSocket heartbeat stats (connections, ping/pong health, cleanup stats) |
|
|
300
|
+
| POST | `/chat/messages` | Post message. Body: `from` (required), `content` (required), `channel`, `replyTo` |
|
|
301
|
+
| GET | `/chat/messages` | Message history. Query: `channel`, `limit`, `before`, `after`, `compact` (slim: from/content/ts/ch only) |
|
|
302
|
+
| GET | `/chat/context/:agent` | Compact, deduplicated chat context for agent injection. Prioritizes mentions, deduplicates system alerts, slim format. Query: `limit` (default 30), `channel`, `since` (epoch ms, default 4h). |
|
|
303
|
+
| PATCH | `/chat/messages/:id` | Edit message (author-only). Body: `from`, `content` |
|
|
304
|
+
| DELETE | `/chat/messages/:id` | Delete message (author-only). Body: `from` |
|
|
305
|
+
| POST | `/chat/messages/:id/react` | React to message. Body: `emoji`, `agent`, `remove` |
|
|
306
|
+
| GET | `/chat/messages/:id/reactions` | Get reactions |
|
|
307
|
+
| GET | `/chat/channels` | List channels (includes `general`, `decisions`, `shipping`, `reviews`, `blockers`) |
|
|
308
|
+
| GET | `/chat/search` | Search messages. Query: `q`, `channel`, `from`, `limit` |
|
|
309
|
+
| GET | `/chat/messages/:id/thread` | Get thread replies |
|
|
310
|
+
| GET | `/chat/rooms` | List rooms |
|
|
311
|
+
| POST | `/chat/rooms` | Create room |
|
|
312
|
+
|
|
313
|
+
## Context (Budgeted Injection)
|
|
314
|
+
|
|
315
|
+
| Method | Path | Description |
|
|
316
|
+
|--------|------|-------------|
|
|
317
|
+
| GET | `/context/inject/:agent` | Budgeted context injection for an agent. Returns per-layer items + `context_budget` attribution (token estimates, top contributors) and memo reuse metadata. Query: `limit` (default 60, max 200), `channel` (optional; if omitted defaults to `general` → team scope), `since` (epoch ms, default 4h), `task_id` (optional), `peer` (optional), `scope_id` (explicit **session scope** override), `team_scope_id` (explicit **team_shared scope** override; default `team:default`). Default session scope routing (when `scope_id` not provided): `general/ops → team:default`, `task-* / task-comments → task:<taskId>`, `dm:* → user:<peer>`. |
|
|
318
|
+
| GET | `/context/budgets` | Current configured context budgets (per-layer caps + optional total) and autosummary flag. |
|
|
319
|
+
| GET | `/context/memo` | Read a persisted memo. Query: `scope_id` (required), `layer` (`session_local`\|`agent_persistent`\|`team_shared`). |
|
|
320
|
+
| POST | `/context/memo` | Create/overwrite a persisted memo (useful for bootstrapping `team_shared`). Body: `{ scope_id, layer, content, source_window? }`. |
|
|
321
|
+
|
|
322
|
+
### Noise Budget (control-plane rate limiting)
|
|
323
|
+
|
|
324
|
+
| Method | Path | Description |
|
|
325
|
+
|--------|------|-------------|
|
|
326
|
+
| GET | `/chat/noise-budget` | Current budget snapshot: per-channel ratios, window stats, enforcement state |
|
|
327
|
+
| GET | `/chat/suppression/stats` | Chat dedup suppression stats: total suppressed, by category (system/agent), active hash count, since timestamp. |
|
|
328
|
+
| POST | `/chat/suppression/prune` | Prune expired entries from the suppression ledger. Returns `{ pruned }`. |
|
|
329
|
+
| GET | `/chat/noise-budget/canary` | Canary rollback evaluation: ratio vs target, SLA miss delta, P95 response delta |
|
|
330
|
+
| GET | `/chat/noise-budget/suppression-log` | Audit trail of suppressed/digested messages |
|
|
331
|
+
| GET | `/chat/noise-budget/config` | Read current noise budget configuration |
|
|
332
|
+
| PATCH | `/chat/noise-budget/config` | Update config. Fields: `budgetPercent`, `dedupWindowMs`, `digestIntervalMs`, `channelBudgets` |
|
|
333
|
+
| POST | `/chat/noise-budget/activate` | Exit canary (log-only) mode and enable enforcement |
|
|
334
|
+
| POST | `/chat/noise-budget/flush-digest` | Force immediate digest flush |
|
|
335
|
+
|
|
336
|
+
Bypass: escalation, blocker, and critical-priority messages always pass through budget enforcement.
|
|
337
|
+
Budget enforcement requires minimum 10 messages in the rolling window before activating.
|
|
338
|
+
|
|
339
|
+
### Alert Integrity Guard (false-positive prevention)
|
|
340
|
+
|
|
341
|
+
| Method | Path | Description |
|
|
342
|
+
|--------|------|-------------|
|
|
343
|
+
| GET | `/chat/alert-integrity` | Current alert integrity stats: total checked, blocked false-positives, pass-through count |
|
|
344
|
+
| GET | `/chat/alert-integrity/audit` | Audit log of preflight decisions. Query: `limit`, `since` |
|
|
345
|
+
| GET | `/chat/alert-integrity/config` | Read alert integrity guard configuration |
|
|
346
|
+
| GET | `/chat/alert-integrity/rollback` | Rollback evaluation: false-positive rate, missed true-positives, preflight latency p95 |
|
|
347
|
+
| PATCH | `/chat/alert-integrity/config` | Update config. Fields: `enabled`, `canaryMode`, `maxPreflightMs`, `reconcileFields` |
|
|
348
|
+
| POST | `/chat/alert-integrity/activate` | Exit canary (log-only) mode and enable enforcement |
|
|
349
|
+
|
|
350
|
+
Preflight checks reconcile live task state (status, assignee, reviewer, recent comment timestamp, queue state hash) before publishing SLA/requeue/stale alerts. Idempotent alert key: `task_id + alert_type + state_hash`.
|
|
351
|
+
|
|
352
|
+
### Chat edit/delete contract
|
|
353
|
+
|
|
354
|
+
- `PATCH /chat/messages/:id` and `DELETE /chat/messages/:id` are author-only.
|
|
355
|
+
- Request body must include `from` matching the original message author.
|
|
356
|
+
- Non-author attempts return an error envelope (`403`), and unknown message IDs return `404`.
|
|
357
|
+
|
|
358
|
+
## Inbox
|
|
359
|
+
|
|
360
|
+
| Method | Path | Description |
|
|
361
|
+
|--------|------|-------------|
|
|
362
|
+
| GET | `/inbox/:agent` | Get inbox. Query: `limit`, `since` (epoch ms), `channel`, `compact` (strips id/reactions/replyCount) |
|
|
363
|
+
| POST | `/inbox/:agent/ack` | Acknowledge messages. Body: `{ "upTo": epochMs }` |
|
|
364
|
+
| POST | `/inbox/:agent/subscribe` | Replace channel subscriptions. Body: `{ "channels": ["reviews", "blockers"] }` |
|
|
365
|
+
| GET | `/inbox/:agent/subscriptions` | List subscriptions |
|
|
366
|
+
| GET | `/inbox/:agent/unread` | Unread count |
|
|
367
|
+
| GET | `/inbox/:agent/mentions` | Get @mentions |
|
|
368
|
+
|
|
369
|
+
## Presence
|
|
370
|
+
|
|
371
|
+
| Method | Path | Description |
|
|
372
|
+
|--------|------|-------------|
|
|
373
|
+
| GET | `/presence` | All agents' presence |
|
|
374
|
+
| GET | `/presence/:agent` | Single agent presence |
|
|
375
|
+
| POST | `/presence/:agent` | Update presence. Body: `{ "status": "working|idle|blocked|reviewing|offline" }` |
|
|
376
|
+
| GET | `/presence/:agent/focus` | Get agent focus state (active, level, expiry) |
|
|
377
|
+
| POST | `/presence/:agent/focus` | Toggle focus mode. Body: `{ "active": true, "level": "soft|deep", "durationMin": 60, "reason": "shipping PR" }`. Soft: suppresses system nudges, allows direct mentions. Deep: suppresses everything except blocker/review pings. |
|
|
378
|
+
|
|
379
|
+
## Memory
|
|
380
|
+
|
|
381
|
+
| Method | Path | Description |
|
|
382
|
+
|--------|------|-------------|
|
|
383
|
+
| GET | `/memory/:agent` | Get all memory files |
|
|
384
|
+
| POST | `/memory/:agent` | Save memory. Body: `{ "content": "..." }` |
|
|
385
|
+
| GET | `/memory/:agent/search` | Search memory. Query: `q` |
|
|
386
|
+
|
|
387
|
+
## Semantic Search
|
|
388
|
+
|
|
389
|
+
| Method | Path | Description |
|
|
390
|
+
|--------|------|-------------|
|
|
391
|
+
| GET | `/search/semantic` | Semantic search across indexed tasks and chat messages. Query: `q` (required), `limit`, `type` (`task`\|`chat`\|`reflection`\|`insight`\|`shared_file`) |
|
|
392
|
+
| GET | `/search/semantic/status` | Vector index status — availability and counts by source type (tasks, chat, reflections, insights, shared_files) |
|
|
393
|
+
| POST | `/search/semantic/reindex` | Bulk reindex all existing tasks, reflections, and insights for semantic search |
|
|
394
|
+
| GET | `/knowledge/search` | Unified knowledge search across all indexed content (tasks, chat, reflections, insights, shared files). Query: `q` (required), `limit`, `type` (optional filter). Returns results with source_type, snippet, similarity score, and deep link. |
|
|
395
|
+
| GET | `/knowledge/stats` | Knowledge index health — availability and counts per source type |
|
|
396
|
+
| POST | `/knowledge/reindex-shared` | Scan and index shared workspace files (process/, specs/, artifacts/, handoffs/, references/) for knowledge search |
|
|
397
|
+
| POST | `/knowledge/docs` | Create a knowledge document. Body: `{ title, content, category, author, tags?, related_task_ids?, related_insight_ids? }`. Categories: decision, runbook, architecture, lesson, how-to. Auto-indexed for search. |
|
|
398
|
+
| GET | `/knowledge/docs` | List documents. Query: `tag`, `category`, `author`, `search` (text), `limit`. |
|
|
399
|
+
| GET | `/knowledge/docs/:id` | Get single document. |
|
|
400
|
+
| PATCH | `/knowledge/docs/:id` | Update document (re-indexes in vector store). |
|
|
401
|
+
| DELETE | `/knowledge/docs/:id` | Delete document + vector entry. |
|
|
402
|
+
| POST | `/contacts` | Create a contact. Body: `name` (required); optional: `org`, `emails[]`, `handles{}` (discord/github/twitter), `tags[]`, `notes`, `source`, `owner`, `last_contact` (epoch ms), `related_task_ids[]`. Auto-indexed for knowledge search. |
|
|
403
|
+
| GET | `/contacts` | List contacts. Query: `name`, `org`, `tag`, `owner`, `q` (text search across name/org/notes/emails), `limit`, `offset`. |
|
|
404
|
+
| GET | `/contacts/:id` | Get a single contact by ID. |
|
|
405
|
+
| PATCH | `/contacts/:id` | Update a contact. Body: any field from create. Re-indexes on update. |
|
|
406
|
+
| DELETE | `/contacts/:id` | Delete a contact. Removes from vector index. |
|
|
407
|
+
|
|
408
|
+
## Experiments
|
|
409
|
+
|
|
410
|
+
| Method | Path | Description |
|
|
411
|
+
|--------|------|-------------|
|
|
412
|
+
| POST | `/experiments` | Create experiment |
|
|
413
|
+
| GET | `/experiments/active` | List active experiments |
|
|
414
|
+
|
|
415
|
+
## Research
|
|
416
|
+
|
|
417
|
+
| Method | Path | Description |
|
|
418
|
+
|--------|------|-------------|
|
|
419
|
+
| GET | `/research/requests` | List research requests. Query: `status`, `owner`, `category`, `limit` |
|
|
420
|
+
| POST | `/research/requests` | Create research request. Body: `title`, `question`, `requestedBy`; optional: `owner`, `category`, `priority`, `taskId`, `dueAt`, `slaHours` |
|
|
421
|
+
| GET | `/research/findings` | List findings. Query: `requestId`, `author`, `limit` |
|
|
422
|
+
| POST | `/research/findings` | Add finding linked to request. Body: `requestId`, `title`, `summary`, `author`; optional `artifactUrl`, `confidence`, `highlights[]` |
|
|
423
|
+
| POST | `/research/handoff` | Structured research→execution handoff that auto-creates a task. Required: `requestId`, `findingIds[]`, `title`, `summary`, `assignee`, `reviewer`, `eta`. Returns linked task + source metadata. |
|
|
424
|
+
|
|
425
|
+
## Content
|
|
426
|
+
|
|
427
|
+
| Method | Path | Description |
|
|
428
|
+
|--------|------|-------------|
|
|
429
|
+
| POST | `/content/published` | Record published content |
|
|
430
|
+
| GET | `/content/published` | List published content |
|
|
431
|
+
| GET | `/content/published/:id` | Get content piece |
|
|
432
|
+
| PATCH | `/content/published/:id/performance` | Update performance metrics |
|
|
433
|
+
| GET | `/content/calendar` | Calendar entries |
|
|
434
|
+
| POST | `/content/calendar` | Create calendar entry |
|
|
435
|
+
| GET | `/content/calendar/:id` | Get calendar entry |
|
|
436
|
+
| DELETE | `/content/calendar/:id` | Delete calendar entry |
|
|
437
|
+
| GET | `/content/stats` | Publishing statistics |
|
|
438
|
+
| GET | `/content/performance` | Overall performance metrics |
|
|
439
|
+
|
|
440
|
+
## Events (SSE)
|
|
441
|
+
|
|
442
|
+
| Method | Path | Description |
|
|
443
|
+
|--------|------|-------------|
|
|
444
|
+
| GET | `/events/subscribe` | SSE stream for real-time updates. Query: `agent`, `topics` (comma-separated), `types` (exact event type filter, comma-separated) |
|
|
445
|
+
| GET | `/events` | SSE alias of `/events/subscribe` (used by reflectt-channel plugin) |
|
|
446
|
+
| GET | `/events/types` | List valid event types for SSE `?types=` filtering |
|
|
447
|
+
| GET | `/events/status` | Event system status |
|
|
448
|
+
| GET | `/events/config` | Get event config |
|
|
449
|
+
| POST | `/events/config` | Update event config (`batchWindowMs`) |
|
|
450
|
+
|
|
451
|
+
## Analytics
|
|
452
|
+
|
|
453
|
+
| Method | Path | Description |
|
|
454
|
+
|--------|------|-------------|
|
|
455
|
+
| GET | `/agents/activity` | All agents activity summary |
|
|
456
|
+
| GET | `/agents/:agent/activity` | Single agent activity |
|
|
457
|
+
| GET | `/activity` | Global activity feed |
|
|
458
|
+
| GET | `/analytics/foragents` | forAgents.dev analytics |
|
|
459
|
+
| GET | `/metrics` | Operational metrics snapshot (tasks/chat/presence/activity rates + uptime) |
|
|
460
|
+
| GET | `/metrics/daily` | Daily funnel metrics by channel. Query: `timezone` (IANA tz, default `America/Vancouver`) |
|
|
461
|
+
| GET | `/metrics/summary` | Aggregated metrics |
|
|
462
|
+
| GET | `/logs` | Server logs. Query: `limit`, `level` |
|
|
463
|
+
|
|
464
|
+
## MCP
|
|
465
|
+
|
|
466
|
+
| Method | Path | Description |
|
|
467
|
+
|--------|------|-------------|
|
|
468
|
+
| GET | `/sse` | MCP SSE transport |
|
|
469
|
+
| POST | `/mcp/messages` | MCP message handler |
|
|
470
|
+
|
|
471
|
+
## Database
|
|
472
|
+
|
|
473
|
+
| Method | Path | Description |
|
|
474
|
+
|--------|------|-------------|
|
|
475
|
+
| GET | `/db/status` | SQLite database status (engine, WAL mode, schema version, table row counts including `sync_ledger`) |
|
|
476
|
+
|
|
477
|
+
## Cloud
|
|
478
|
+
|
|
479
|
+
| Method | Path | Description |
|
|
480
|
+
|--------|------|-------------|
|
|
481
|
+
| GET | `/cloud/status` | Cloud connection state (registered, heartbeat age, sync status). Only active when `REFLECTT_HOST_TOKEN` is set. |
|
|
482
|
+
| POST | `/cloud/reload` | Hot-reload cloud config from `~/.reflectt/config.json` without server restart. Updates env vars and restarts heartbeat/sync loops. Used by CLI after `host connect` enrollment. |
|
|
483
|
+
| GET | `/provisioning/status` | Host provisioning state: phase, enrollment, config/secrets pull status, webhook routes. Dashboard-safe (no credentials). |
|
|
484
|
+
| POST | `/provisioning/provision` | Full provisioning flow: enroll with cloud (join token or API key), pull config + secrets, configure webhooks. Body: `{ cloudUrl, hostName, joinToken?, apiKey?, capabilities? }`. |
|
|
485
|
+
| POST | `/provisioning/refresh` | Re-pull config + secrets + webhooks from cloud. Requires existing enrollment. |
|
|
486
|
+
| POST | `/provisioning/reset` | Reset provisioning state for re-enrollment. Clears hostId, credential, and all provisioning data. |
|
|
487
|
+
| GET | `/provisioning/webhooks` | List configured webhook routes for this host. |
|
|
488
|
+
| POST | `/provisioning/webhooks` | Add a webhook route. Body: `{ provider, path?, events?, active? }`. |
|
|
489
|
+
| DELETE | `/provisioning/webhooks/:id` | Remove a webhook route by ID. |
|
|
490
|
+
| POST | `/webhooks/incoming/:provider` | Receive incoming webhooks from external providers (GitHub, Stripe, etc.). Auto-routes through delivery engine to configured targets. Returns 202 Accepted. |
|
|
491
|
+
| POST | `/webhooks/deliver` | Enqueue a webhook for durable delivery. Body: `{ provider, eventType, payload, targetUrl, idempotencyKey?, metadata? }`. Returns event with idempotency key. |
|
|
492
|
+
| GET | `/webhooks/events` | List webhook events. Query: `status`, `provider`, `limit`, `offset`. |
|
|
493
|
+
| GET | `/webhooks/events/:id` | Get a webhook event by ID. |
|
|
494
|
+
| POST | `/webhooks/events/:id/replay` | Replay a webhook: re-enqueue with new idempotency key. Original preserved in audit trail. |
|
|
495
|
+
| GET | `/webhooks/dlq` | Dead letter queue: list permanently failed webhook deliveries. Query: `limit`. |
|
|
496
|
+
| GET | `/webhooks/stats` | Webhook delivery statistics: counts by status, config, oldest pending. |
|
|
497
|
+
| PATCH | `/webhooks/config` | Update webhook delivery config (maxAttempts, backoff, retention, timeout, concurrency). |
|
|
498
|
+
| GET | `/webhooks/idempotency/:key` | Lookup webhook event by idempotency key. |
|
|
499
|
+
## Host Registry
|
|
500
|
+
|
|
501
|
+
Multi-host management: remote hosts register via heartbeat and are tracked by status (online/stale/offline based on `last_seen_at`).
|
|
502
|
+
|
|
503
|
+
| Method | Path | Description |
|
|
504
|
+
|--------|------|-------------|
|
|
505
|
+
| POST | `/hosts/heartbeat` | Register or update a host. Body: `{ hostId, name?, version?, capabilities?, meta? }`. Requires `Authorization: Bearer <HEARTBEAT_SECRET>` header. Returns upserted host record. |
|
|
506
|
+
| GET | `/hosts` | List all registered hosts. Each includes computed `status` (online: <5min, stale: 5-15min, offline: >15min). Query: `status` filter. |
|
|
507
|
+
| GET | `/hosts/:hostId` | Get a single host by ID with computed status. |
|
|
508
|
+
| DELETE | `/hosts/:hostId` | Remove a host from the registry. |
|
|
509
|
+
|
|
510
|
+
| GET | `/portability/export` | One-click export: team config, server config (redacted), encrypted secrets, webhook routes, provisioning state. |
|
|
511
|
+
| GET | `/portability/export/download` | Download export bundle as JSON file attachment. |
|
|
512
|
+
| POST | `/portability/import` | Import from export bundle. Body: `{ bundle, overwrite?, skipSecrets?, skipConfig? }`. Rehydrates ~/.reflectt/ on a new host. |
|
|
513
|
+
| GET | `/portability/manifest` | Preview what would be exported (file list, counts, no content). |
|
|
514
|
+
| GET | `/notifications/preferences` | List all agents' notification preferences. |
|
|
515
|
+
| GET | `/notifications/preferences/:agent` | Get notification preferences for a specific agent. |
|
|
516
|
+
| PATCH | `/notifications/preferences/:agent` | Update notification preferences (partial). Body: `{ enabled?, deliveryMethod?, priorityThreshold?, quietHours?, eventFilters?, channelSubscriptions? }`. |
|
|
517
|
+
| DELETE | `/notifications/preferences/:agent` | Reset preferences to defaults. |
|
|
518
|
+
| POST | `/notifications/preferences/:agent/mute` | Mute notifications. Body: `{ durationMs? }` or `{ until? }`. Default: 1 hour. |
|
|
519
|
+
| POST | `/notifications/preferences/:agent/unmute` | Unmute notifications. |
|
|
520
|
+
| POST | `/notifications/route` | Check if notification should be delivered.
|
|
521
|
+
| GET | `/connectivity/status` | Cloud connectivity state: mode (connected/degraded/offline), failure counts, queue depth, transition history. |
|
|
522
|
+
| PATCH | `/connectivity/thresholds` | Update connectivity thresholds (degradedAfterFailures, offlineAfterMs, recoveryAfterSuccesses). |
|
|
523
|
+
| POST | `/connectivity/simulate-failure` | Simulate cloud failure for outage drill. Body: `{ reason?, count? }`. |
|
|
524
|
+
| POST | `/connectivity/simulate-success` | Simulate cloud success for recovery testing. Body: `{ count? }`. |
|
|
525
|
+
| POST | `/connectivity/reset` | Reset connectivity state to connected. |
|
|
526
|
+
| GET | `/board-health/status` | Board health worker status: config, running state, tick count, recent actions, rollbackable actions. |
|
|
527
|
+
| GET | `/board-health/audit-log` | Audit log of all automated board actions. Query: `?limit=N&since=timestamp&kind=auto-block-stale\|suggest-close\|digest-emitted`. |
|
|
528
|
+
| POST | `/board-health/tick` | Manually trigger board health tick. Query: `?dryRun=true` for preview. |
|
|
529
|
+
| POST | `/board-health/rollback/:actionId` | Rollback an automated action within the rollback window. Body: `{ by? }`. |
|
|
530
|
+
| PATCH | `/board-health/config` | Update worker config at runtime. Fields: enabled, intervalMs, staleDoingThresholdMin, suggestCloseThresholdMin, rollbackWindowMs, digestIntervalMs, digestChannel, quietHoursStart, quietHoursEnd, dryRun, maxActionsPerTick. |
|
|
531
|
+
| POST | `/board-health/prune` | Prune old audit log entries. Query: `?maxAgeDays=7`. |
|
|
532
|
+
| GET | `/feed/:agent` | Since-last-seen change feed. Query: `?since=timestamp&limit=100&kinds=task_status_changed,mention&includeGlobal=true`. Returns unified timeline of task changes, comments, mentions, PRs, deploys relevant to agent. |
|
|
533
|
+
| GET | `/policy` | Get unified policy config (quiet hours, idle nudge, cadence watchdog, board health, escalation thresholds). |
|
|
534
|
+
| PATCH | `/policy` | Update policy config at runtime (deep-merged, persisted to ~/.reflectt/policy.json). Propagates to running workers. |
|
|
535
|
+
| POST | `/policy/reset` | Reset policy to defaults + env overrides. |
|
|
536
|
+
| GET | `/routing/stats` | Message routing stats: total routed, by channel/category/severity, general vs ops count. |
|
|
537
|
+
| GET | `/approval-queue` | Pending tasks with confidence scores and agent suggestions. Returns `{ items[], total, highConfidenceCount, needsReviewCount }`. |
|
|
538
|
+
| POST | `/approval-queue/:taskId/approve` | Approve a task. Body: `{ assignedAgent?, priorityOverride?, note?, reviewedBy }`. |
|
|
539
|
+
| POST | `/approval-queue/:taskId/reject` | Reject a task. Body: `{ reason?, reviewedBy }`. |
|
|
540
|
+
| POST | `/approval-queue/batch-approve` | Batch approve high-confidence tasks. Body: `{ taskIds[], reviewedBy }`. |
|
|
541
|
+
| GET | `/routing-policy` | Current agent affinity maps from TEAM-ROLES.yaml. Returns `{ agents[], version, source }`. |
|
|
542
|
+
| PUT | `/routing-policy` | Update agent affinity maps. Body: `{ agents[{ agentId, affinityTags[], weight, ... }], updatedBy }`. Writes to `~/.reflectt/TEAM-ROLES.yaml`. |
|
|
543
|
+
| POST | `/feedback` | Submit user feedback. Body: `{ category: "bug"\|"feature"\|"general", message (10-1000 chars), email?, url?, siteToken, severity?, reporterType?, reporterAgent? }`. Rate limited 5/min/IP. |
|
|
544
|
+
| GET | `/feedback` | List feedback. Query: `status=new\|triaged\|archived\|all`, `category`, `severity`, `reporterType`, `sort=date\|votes\|severity`, `order`, `limit`, `offset`. |
|
|
545
|
+
| GET | `/feedback/:id` | Get single feedback record. |
|
|
546
|
+
| PATCH | `/feedback/:id` | Triage/update feedback metadata. Body: `{ status?, notes?, assignedTo? }`. |
|
|
547
|
+
| POST | `/feedback/:id/vote` | Upvote feedback. |
|
|
548
|
+
| GET | `/triage` | List untriaged feedback queue sorted by severity/date with suggested priorities. |
|
|
549
|
+
| POST | `/feedback/:id/triage` | Convert feedback into a task. Body: `{ triageAgent, priority?, assignee?, lane?, title? }`. |
|
|
550
|
+
| GET | `/widget/feedback.js` | Embeddable feedback widget (Shadow DOM, self-contained). Embed: `<script src="/widget/feedback.js" data-token="..." data-theme="auto">`. |
|
|
551
|
+
| GET | `/routing/log` | Recent routing decisions. Query: `?limit=50&since=timestamp&category=watchdog-alert&severity=warning`. |
|
|
552
|
+
| POST | `/routing/resolve` | Dry-run route resolution. Body: `{ from, content, severity?, category?, taskId?, mentions? }`. Returns where message would go. |
|
|
553
|
+
| POST | `/routing/overrides` | Create a routing override. Body: `CreateOverrideInput` with target, target_type, override config, TTL. Returns created override. |
|
|
554
|
+
| GET | `/routing/overrides` | List routing overrides. Query: `?target=agent&target_type=agent|role&status=active|expired&limit=N`. |
|
|
555
|
+
| GET | `/routing/overrides/:id` | Get a specific routing override by ID. |
|
|
556
|
+
| GET | `/routing/overrides/active/:target` | Find the currently active override for a target. Query: `?target_type=agent|role`. |
|
|
557
|
+
| POST | `/routing/overrides/tick` | Advance override lifecycle — expires stale overrides, applies TTL rules. |
|
|
558
|
+
| POST | `/tasks/:id/precheck` | Precheck task transition. Body: `{ targetStatus }`. Returns required fields, auto-defaults, and a PATCH template. |
|
|
559
|
+
| GET | `/health/watchdog/suppression` | Watchdog de-noise config: show all suppression rules, thresholds, and what activity types prevent re-firing. | Body: `{ agent, type, priority?, channel?, message? }`. Returns routing decision + reason. |
|
|
560
|
+
| GET | `/runtime/truth` | Canonical environment snapshot for operators: repo/branch/SHA, runtime host+port+PID+uptime, deploy drift, cloud registration/heartbeat, and `REFLECTT_HOME` path. |
|
|
561
|
+
|
|
562
|
+
## Reflections
|
|
563
|
+
|
|
564
|
+
| Method | Path | Description |
|
|
565
|
+
|--------|------|-------------|
|
|
566
|
+
| POST | `/reflections` | Create a structured reflection. Body: `{ pain, impact, evidence[] (array, min 1), went_well, suspected_why, proposed_fix, confidence (0-10), role_type, author }`. Optional: `severity` (low\|medium\|high\|critical), `task_id`, `tags[]`, `team_id`, `metadata {}`. Returns 400 with field-level errors on validation failure. |
|
|
567
|
+
| GET | `/reflections` | List reflections. Query: `author`, `role_type`, `severity`, `task_id`, `team_id`, `since`, `before`, `limit` (max 200), `offset`. |
|
|
568
|
+
| GET | `/reflections/:id` | Get single reflection by ID. |
|
|
569
|
+
| GET | `/reflections/stats` | Aggregate stats: total count, by role_type, by severity, average confidence. |
|
|
570
|
+
| GET | `/reflections/sla` | Reflection SLA status per agent: last reflection time, overdue hours, tasks done since last reflection. |
|
|
571
|
+
| POST | `/reflections/nudge/tick` | Manually trigger reflection nudge cycle (post-task + idle checks). |
|
|
572
|
+
| GET | `/reflections/tracking/:agent` | Debug endpoint: reflection tracking state for an agent. Returns tracking row, latest actual reflection, staleness flag, gate status (`gate_would_block`), and whether reconciliation is available. |
|
|
573
|
+
| GET | `/reflections/schema` | Machine-readable field reference (required/optional fields, enums, ranges). |
|
|
574
|
+
|
|
575
|
+
## Insights (Clustering Engine)
|
|
576
|
+
|
|
577
|
+
| Method | Path | Description |
|
|
578
|
+
|--------|------|-------------|
|
|
579
|
+
| POST | `/insights/ingest` | Ingest a reflection into clustering. Body: `{ reflection_id }`. Cluster key auto-derived from reflection tags/content. Promotion gate: 2 independent reflections (distinct authors) OR severity high/critical. 24h cooldown after promotion. |
|
|
580
|
+
| GET | `/insights` | List insights. Supports `compact=true` (slim: id/title/score/priority/status/task_id/independent_count). Query: `status` (candidate\|promoted\|pending_triage\|task_created\|cooldown\|closed), `priority` (P0-P3), `workflow_stage`, `failure_family`, `impacted_unit`, `limit`, `offset`. Sorted by score desc. |
|
|
581
|
+
| GET | `/insights/bridge/stats` | Insight→Task bridge stats: auto-created count, triaged count, duplicates skipped, errors. |
|
|
582
|
+
| GET | `/insights/bridge/config` | Current bridge config including ownership guardrail settings. |
|
|
583
|
+
| PATCH | `/insights/bridge/config` | Update bridge config. Body: partial config object (e.g. `{ ownershipGuardrail: { enabled: false } }`). |
|
|
584
|
+
| GET | `/insights/:id/assignment-preview` | Dry-run ownership guardrail for an insight. Returns `{ decision: { assignee, reviewer, reason, guardrailApplied, soleAuthorFallback, candidatesConsidered, insightAuthors } }`. Query: `team_id`. |
|
|
585
|
+
| GET | `/insights/triage` | List insights in `pending_triage` status (medium/low severity awaiting review). Query: `limit`. |
|
|
586
|
+
| POST | `/insights/:id/triage` | Triage a pending insight. Body: `{ action: "approve"\|"dismiss", assignee? (required for approve), reviewer?, rationale?, priority?, triaged_by? }`. Approve creates a linked task; dismiss closes the insight. Records audit decision with reviewer + rationale. |
|
|
587
|
+
| GET | `/insights/triage/audit` | Triage decision audit trail (all insights). Returns timestamped decisions with reviewer, rationale, action, outcome. Query: `limit`. |
|
|
588
|
+
| GET | `/insights/:id/triage/audit` | Triage audit trail for a specific insight. Returns full lifecycle: entry → decision → outcome. |
|
|
589
|
+
| GET | `/insights/:id` | Get single insight by ID. |
|
|
590
|
+
| PATCH | `/insights/:id` | **Admin-only** insight mutation (hygiene tooling). **Disabled by default.** Enable with `REFLECTT_ENABLE_INSIGHT_MUTATION_API=true`. Localhost-only. Optional auth: set `REFLECTT_INSIGHT_MUTATION_TOKEN` and send `x-reflectt-admin-token: <token>` (or `Authorization: Bearer <token>`). Body: `{ actor, reason, status?, cluster_key?, metadata?: { notes?, cluster_key_override? } }`. Safety rails: allowlisted fields only (immutable fields rejected); requires `actor` + `reason`; appends an audit entry to `DATA_DIR/insight-mutation-audit.jsonl` (override path via `REFLECTT_INSIGHT_MUTATION_AUDIT_FILE`). |
|
|
591
|
+
| GET | `/insights/stats` | Aggregate stats: by status, priority, failure family. |
|
|
592
|
+
| POST | `/insights/tick-cooldowns` | Advance cooldown state machine: promoted past deadline → cooldown, expired cooldown → archived. |
|
|
593
|
+
| POST | `/insights/:id/promote` | Promote insight to board task. Body: `{ contract: { owner, reviewer, eta, acceptance_check, artifact_proof_requirement, next_checkpoint_eta }, promoted_by }`. Optional: `title`, `description`, `priority`, `team_id`. Returns task_id + audit entry. |
|
|
594
|
+
| GET | `/insights/:id/audit` | Promotion audit trail for an insight. |
|
|
595
|
+
| GET | `/insights/promotions` | List all promotion audit entries. Query: `limit`. |
|
|
596
|
+
| GET | `/insights/recurring/candidates` | List recurring task candidates from insights with persistent patterns. Auto-suggests owner/lane per failure family. Template-first (no auto task spam). |
|
|
597
|
+
| GET | `/insights/top` | Top pain clusters by frequency within a time window. Query: `window` (e.g. `7d`, `24h`, `2w`; default `7d`), `limit` (1-50, default 10). Returns `{ clusters: [{ cluster_key, count, avg_score, last_seen_at, linked_task_ids }], window, since, limit }`. |
|
|
598
|
+
| GET | `/loop/summary` | Supports `compact=true` (strips evidence_refs, slim linked_task). Top signals from the reflection→insight→task loop. Returns insights ranked by score, each with linked task details and evidence status. Query: `limit` (1-100, default 20), `min_score` (minimum score threshold, default 0), `exclude_addressed=1` (skip insights in cooldown/closed status or whose linked task is done/validating). Response: `{ success, entries[], total, filters }`. Each entry: `insight_id`, `title`, `score`, `priority`, `status`, `workflow_stage`, `failure_family`, `impacted_unit`, `independent_count`, `authors[]`, `evidence_count`, `evidence_refs[]`, `linked_task { id, title, status, assignee }`, `addressed`, `created_at`, `updated_at`. |
|
|
599
|
+
|
|
600
|
+
### Example: `/insights/top`
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
curl "http://localhost:4445/insights/top?window=7d&limit=10"
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
```json
|
|
607
|
+
{
|
|
608
|
+
"clusters": [
|
|
609
|
+
{
|
|
610
|
+
"cluster_key": "runtime::crash::api-server",
|
|
611
|
+
"count": 5,
|
|
612
|
+
"avg_score": 7.6,
|
|
613
|
+
"last_seen_at": 1771987260456,
|
|
614
|
+
"linked_task_ids": ["task-abc123", "task-def456"]
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
"window": "7d",
|
|
618
|
+
"since": 1771382460456,
|
|
619
|
+
"limit": 10
|
|
620
|
+
}
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
## Scoring Engine Configuration
|
|
624
|
+
|
|
625
|
+
The insight scoring engine uses the following parameters (defined in `src/insights.ts`):
|
|
626
|
+
|
|
627
|
+
| Parameter | Default | Description |
|
|
628
|
+
|-----------|---------|-------------|
|
|
629
|
+
| `PROMOTION_THRESHOLD` | `2` | Minimum independent reflections (distinct authors) required for automatic promotion. Severity high/critical bypasses this gate. |
|
|
630
|
+
| `COOLDOWN_MS` | `86400000` (24h) | Cooldown period after promotion before the insight can be re-promoted. |
|
|
631
|
+
| `HYSTERESIS_BUFFER` | `0.3` | Score buffer zone around priority thresholds to prevent flapping. A score must exceed `threshold + buffer` to upgrade priority, or drop below `threshold - buffer` to downgrade. If within the buffer zone, previous priority is retained. |
|
|
632
|
+
| `SCORING_ENGINE_VERSION` | `1.1.0` | Semver tag included in all scoring output for audit lineage. |
|
|
633
|
+
|
|
634
|
+
### Priority thresholds (with hysteresis)
|
|
635
|
+
|
|
636
|
+
| Priority | Score threshold | Upgrade requires | Downgrade requires |
|
|
637
|
+
|----------|----------------|------------------|--------------------|
|
|
638
|
+
| P0 | ≥ 9 | score ≥ 9.3 | score < 8.7 |
|
|
639
|
+
| P1 | ≥ 7 | score ≥ 7.3 | score < 6.7 |
|
|
640
|
+
| P2 | ≥ 4 | score ≥ 4.3 | score < 3.7 |
|
|
641
|
+
| P3 | < 4 | — | — |
|
|
642
|
+
|
|
643
|
+
### Audit fields in scoring output
|
|
644
|
+
|
|
645
|
+
Every scored insight includes these audit fields:
|
|
646
|
+
|
|
647
|
+
- **`dedupe_cluster_id`** — Cluster key for deduplication across reflections
|
|
648
|
+
- **`promotion_band`** — Current priority band (P0–P3) after hysteresis
|
|
649
|
+
- **`decision_trace`** — Top contributing factors to the score (severity, author count, recency, etc.)
|
|
650
|
+
- **`version`** — Scoring engine version for reproducibility
|
|
651
|
+
- **`hysteresis_applied`** — Whether the buffer zone retained a previous priority
|
|
652
|
+
|
|
653
|
+
## Lineage Timeline (Debug/Audit)
|
|
654
|
+
|
|
655
|
+
Traces the full reflection → insight → task chain for debugging and audit. Each insight forms a chain; anomalies (missing links, stale promotions) are flagged automatically.
|
|
656
|
+
|
|
657
|
+
| Method | Path | Description |
|
|
658
|
+
|--------|------|-------------|
|
|
659
|
+
| GET | `/lineage` | List lineage entries (insight-centric chains). Each entry includes linked reflection, insight, task, promotion audit, timeline events, and anomaly flags. Query: `status` (insight status filter), `team_id`, `role_type`, `author`, `has_anomaly` (true\|false), `limit` (default 50, max 200), `offset`. Sorted by most recently updated. |
|
|
660
|
+
| GET | `/lineage/:id` | Get lineage chain by insight ID, reflection ID, or task ID. Resolves any ID type to its full chain. Returns 404 if no chain found. |
|
|
661
|
+
| GET | `/lineage/stats` | Lineage statistics: total chains, chains with tasks, chains with anomalies, anomaly type breakdown. |
|
|
662
|
+
|
|
663
|
+
**Anomaly types:** `missing_insight` (reflection not clustered), `missing_task` (task_id points to deleted task), `orphaned_insight` (insight with no reflections), `stale_promotion` (promoted >48h with no task), `missing_reflection` (reflection ID in insight but not in DB).
|
|
664
|
+
|
|
665
|
+
**Timeline events:** `reflection_created`, `insight_created`, `insight_promoted`, `task_created` — each with timestamp and actor.
|
|
666
|
+
|
|
667
|
+
## Intake Pipeline
|
|
668
|
+
|
|
669
|
+
| Method | Path | Description |
|
|
670
|
+
|--------|------|-------------|
|
|
671
|
+
| POST | `/intake` | Process a single reflection through the full intake pipeline (validate → create reflection → cluster into insight → auto-promote if gate met). Body: `{ reflection: { pain, impact, evidence[], went_well, suspected_why, proposed_fix, confidence, role_type, author }, auto_promote?: boolean, promotion_contract?: { owner, reviewer, eta, acceptance_checks[], artifact_proof_requirement, next_checkpoint_eta } }`. Returns pipeline result with reflection, insight, and optional promotion outcome. |
|
|
672
|
+
| POST | `/intake/batch` | Batch process multiple reflections through the intake pipeline. Body: `{ items: [{ reflection: {...}, auto_promote?: boolean, promotion_contract?: {...} }, ...] }`. Returns per-item results with summary counts (processed, promoted, errors). |
|
|
673
|
+
| GET | `/intake/stats` | Pipeline statistics: total processed, auto-promoted count, error count, last run timestamp. |
|
|
674
|
+
| POST | `/intake/maintenance` | Run pipeline maintenance: tick cooldowns, clean stale state, advance insight state machine. Returns maintenance summary. |
|
|
675
|
+
|
|
676
|
+
## Continuity Loop
|
|
677
|
+
|
|
678
|
+
Autonomous work-continuity system. Monitors agent queue floors and auto-replenishes by promoting qualified insights into tasks. Falls back to reflection nudges when no promotable insights exist.
|
|
679
|
+
|
|
680
|
+
| Method | Path | Description |
|
|
681
|
+
|--------|------|-------------|
|
|
682
|
+
| GET | `/continuity/stats` | Loop statistics: cycles run, insights promoted, reflection nudges fired, no-candidate cycles, last run timestamp. |
|
|
683
|
+
| GET | `/continuity/audit` | Persistent audit trail of all continuity actions. Query: `agent`, `limit`, `since` (epoch ms). Returns timestamped actions with kind, detail, linked insight/task IDs. |
|
|
684
|
+
| POST | `/continuity/tick` | Manually trigger one continuity cycle. Returns actions taken, agents checked, and replenishment count. Normally runs automatically via board health worker. |
|
|
685
|
+
|
|
686
|
+
### Shipped Heartbeat
|
|
687
|
+
|
|
688
|
+
| Method | Path | Description |
|
|
689
|
+
|--------|------|-------------|
|
|
690
|
+
| GET | `/shipped-heartbeat/stats` | Shipped-artifact heartbeat stats: messages sent, errors, last heartbeat timestamp. |
|
|
691
|
+
|
|
692
|
+
## Files
|
|
693
|
+
|
|
694
|
+
| Method | Path | Description |
|
|
695
|
+
|--------|------|-------------|
|
|
696
|
+
| POST | `/files` | Upload a file (multipart/form-data). Fields: `file` (required), `uploadedBy`, `tags` (JSON array). Returns `{ success, file }`. 50MB limit. |
|
|
697
|
+
| GET | `/files/:id` | Download file bytes with correct Content-Type. Images served inline, others as attachment. |
|
|
698
|
+
| GET | `/files/:id/meta` | File metadata only (no bytes). Returns `{ success, file }`. |
|
|
699
|
+
| GET | `/files` | List files. Query: `uploadedBy`, `tag`, `limit` (default 50), `offset`. Returns `{ files[], total }`. |
|
|
700
|
+
| DELETE | `/files/:id` | Delete file (disk + metadata). Returns `{ success }`. |
|
|
701
|
+
|
|
702
|
+
## Team
|
|
703
|
+
|
|
704
|
+
| Method | Path | Description |
|
|
705
|
+
|--------|------|-------------|
|
|
706
|
+
| GET | `/team/manifest` | Team charter manifest from `~/.reflectt/TEAM.md`. Returns parsed sections, version hash, update timestamp, and raw markdown. Returns `404` if TEAM.md is missing with creation hint. |
|
|
707
|
+
| POST | `/pause` | Pause an agent or team. Body: `{ target: "team"|"agent-name", durationMinutes?, reason?, pausedBy? }`. Auto-resumes when duration expires. |
|
|
708
|
+
| DELETE | `/pause` | Resume (unpause) an agent or team. Query: `target=team|agent-name`. |
|
|
709
|
+
| GET | `/pause/status` | Current pause status. Query: `agent` (optional). Returns paused flag, remaining time, reason. |
|
|
710
|
+
| POST | `/polls` | Create a poll. Body: `{ question, options[], createdBy, expiresInMinutes?, anonymous? }`. Returns `{ poll }`. |
|
|
711
|
+
| GET | `/polls` | List polls. Query: `status=active|closed|all`, `limit`. Returns `{ polls[], count }`. |
|
|
712
|
+
| GET | `/polls/:id` | Get poll with results. Returns `{ poll }` with vote counts and voter lists. |
|
|
713
|
+
| POST | `/polls/:id/vote` | Cast a vote. Body: `{ voter, choice }` (choice is 0-indexed). Allows changing vote. |
|
|
714
|
+
| POST | `/polls/:id/close` | Close a poll manually. |
|
|
715
|
+
| GET | `/team/roles` | TEAM-ROLES routing matrix — agent skills, affinity scores, WIP caps |
|
|
716
|
+
| GET | `/policy/intensity` | Current intensity preset + limits (wipLimit, maxPullsPerHour, batchIntervalMs). |
|
|
717
|
+
| PUT | `/policy/intensity` | Set intensity preset. Body: `{ preset: "low"|"normal"|"high", updatedBy? }`. Returns new state. |
|
|
718
|
+
|
|
719
|
+
## Other
|
|
720
|
+
|
|
721
|
+
| Method | Path | Description |
|
|
722
|
+
|--------|------|-------------|
|
|
723
|
+
| GET | `/` | Root redirect — redirects to `/dashboard`. |
|
|
724
|
+
| GET | `/dashboard` | HTML dashboard UI |
|
|
725
|
+
| GET | `/docs` | This API reference |
|
|
726
|
+
| GET | `/ui-kit` | Living design system reference page — colors, typography, spacing, buttons, links, badges, inputs, panels, tables with token names. |
|
|
727
|
+
| GET | `/artifacts/view` | In-browser artifact viewer (safe). Query: `path` (repo-relative). Guardrails: repo-root only, extension allowlist (`.md .txt .json .log .yml .yaml`), max 400KB. If `path` contains an embedded `http(s)://...`, redirects to that URL. |
|
|
728
|
+
| GET | `/shared/list` | List files in shared workspace directory. Query: `path` (default `process/`), `limit` (default 200, max 500). Security: prefix allowlist (`process/`), traversal protection, extension filter. |
|
|
729
|
+
| GET | `/shared/read` | Read file from shared workspace. Query: `path` (required), `include=preview` (truncated), `maxChars` (default 2000). Security: same as `/shared/list` + size cap (400KB). |
|
|
730
|
+
| GET | `/shared/view` | HTML viewer for shared workspace artifacts. Query: `path` (required). Dark-themed in-browser view. |
|
|
731
|
+
| GET | `/openclaw/status` | OpenClaw connection status |
|
|
732
|
+
| GET | `/secrets` | List all secrets (metadata only — no plaintext values) |
|
|
733
|
+
| POST | `/secrets` | Create/update a secret (encrypts locally, stores ciphertext) |
|
|
734
|
+
| GET | `/secrets/export` | Export all secrets as encrypted bundle for portability |
|
|
735
|
+
| GET | `/secrets/audit` | Secret access audit log |
|
|
736
|
+
| GET | `/secrets/:name` | Decrypt and return a secret value (audit logged) |
|
|
737
|
+
| DELETE | `/secrets/:name` | Revoke/delete a secret |
|
|
738
|
+
| POST | `/secrets/:name/rotate` | Rotate a secret's encryption key |
|
|
739
|
+
| GET | `/analytics/models` | Model performance analytics — tasks per model, avg cycle time, review pass rate |
|
|
740
|
+
| GET | `/analytics/agents` | Per-agent analytics — model used, performance stats |
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
*Manually curated from source routes. Base: http://localhost:4445*
|
|
745
|
+
| GET | `/telemetry` | Full telemetry snapshot (config + metrics) |
|
|
746
|
+
| GET | `/telemetry/config` | Telemetry configuration (safe — no secrets) |
|
|
747
|
+
| POST | `/api/telemetry/ingest` | Cloud telemetry ingest endpoint (receives snapshots from hosts) |
|
|
748
|
+
| POST | `/canvas/render` | Push content to a canvas slot (Screen Contract v0 validated) |
|
|
749
|
+
| GET | `/canvas/slots` | Current active (non-stale) slots |
|
|
750
|
+
| GET | `/canvas/slots/all` | All slots including stale (debug) |
|
|
751
|
+
| GET | `/canvas/history` | Recent render history (?slot=&limit=) |
|
|
752
|
+
| GET | `/canvas/rejections` | Recent contract validation rejections |
|
|
753
|
+
| GET | `/canvas/stream` | SSE stream of canvas render events |
|
|
754
|
+
| GET | `/execution-health` | Execution sweeper status: validating queue violations, SLA breaches, escalation tracking. |
|
|
755
|
+
| POST | `/pr-event` | PR state webhook. Body: `{ taskId, prState: "merged"|"closed", prUrl? }`. Auto-updates task artifacts on merge, auto-blocks on close. |
|
|
756
|
+
| GET | `/pr-automerge/status` | PR auto-merge attempt log: recent merge/close attempts with summary counts (attempted, success, failed, skipped, auto-close, close-gate-fail). |
|
|
757
|
+
| GET | `/drift-report` | Task/PR drift report: tasks with merged PRs still in validating, orphan PRs, state mismatches. |
|
|
758
|
+
| POST | `/activation/event` | Record activation funnel event. Body: `{ type, userId, metadata? }`. Events: signup_completed, host_preflight_passed, host_preflight_failed, workspace_ready, first_task_started, first_task_completed, first_team_message_sent, day2_return_action. |
|
|
759
|
+
| GET | `/activation/funnel` | Get funnel state. Query: `?userId=...` for single user, no params for aggregate summary. |
|
|
760
|
+
| GET | `/activation/dashboard` | Full onboarding telemetry dashboard: conversion funnel, failure distribution, weekly trends. Query: `?weeks=12`. |
|
|
761
|
+
| GET | `/activation/funnel/conversions` | Step-by-step conversion rates with per-step reach count, conversion rate, and median step timing. |
|
|
762
|
+
| GET | `/activation/funnel/failures` | Failure-reason distribution per step. Shows where users drop off and why (from event metadata). |
|
|
763
|
+
| GET | `/activation/funnel/weekly` | Weekly trend snapshots for planning. Query: `?weeks=12`. Exportable JSON with per-week step counts, new users, completion rate. |
|
|
764
|
+
| GET | `/audit/reviews` | Audit ledger for review-field mutations: actor trace, before/after diffs, timestamps. |
|
|
765
|
+
| GET | `/audit/mutation-alerts` | Suspicious mutation alert status and history. |
|
|
766
|
+
| GET | `/escalations` | List active escalations. |
|
|
767
|
+
| GET | `/escalations/:id` | Get escalation details by ID. |
|
|
768
|
+
| GET | `/feedback/:feedbackId/escalation` | Get escalation linked to feedback item. |
|
|
769
|
+
| GET | `/feedback/:id/sla` | SLA status for a feedback/support item. |
|
|
770
|
+
| GET | `/support/tiers` | Support tier SLA policy definitions. |
|
|
771
|
+
| POST | `/escalations` | Create a new escalation. |
|
|
772
|
+
| POST | `/escalations/:id/ack` | Acknowledge an escalation. |
|
|
773
|
+
| POST | `/escalations/:id/resolve` | Resolve an escalation. |
|
|
774
|
+
| POST | `/escalations/tick` | Trigger escalation timer tick (cron/manual). |
|
|
775
|
+
| POST | `/feedback/:id/respond` | Respond to a feedback/support item. |
|
|
776
|
+
|
|
777
|
+
## Reflection Automation
|
|
778
|
+
|
|
779
|
+
Team-wide nudging and SLA tracking for reflection cadence.
|
|
780
|
+
|
|
781
|
+
### Routes
|
|
782
|
+
|
|
783
|
+
| Method | Path | Description |
|
|
784
|
+
|--------|------|-------------|
|
|
785
|
+
| GET | `/reflections/sla` | Reflection SLA status for all tracked agents. |
|
|
786
|
+
| POST | `/reflections/nudge/tick` | Tick nudge engine: fire pending post-task and idle nudges. |
|
|
787
|
+
|
|
788
|
+
### How It Works
|
|
789
|
+
|
|
790
|
+
1. **Post-task nudges**: When a task moves to `done` or `blocked`, the assignee is queued for a reflection nudge (configurable delay, default 5min).
|
|
791
|
+
2. **Idle nudges**: Agents who haven't submitted a reflection within their cadence interval (default: 8h for humans, 2h for agents) receive a reminder.
|
|
792
|
+
3. **Never-reflected agents**: New agents are auto-seeded into tracking on first discovery. Once seeded long enough (≥ cadence interval), they receive their first nudge. Controlled by `nudgeNeverReflected` (default: true).
|
|
793
|
+
4. **SLA breach**: Agents overdue beyond 1.5× their cadence interval are marked as `overdue`.
|
|
794
|
+
5. **Cooldowns**: Nudges are throttled per-agent (default: 60min between nudges).
|
|
795
|
+
6. **Tracking resets**: Submitting a reflection via `POST /reflections` resets the agent's tasks-done counter and last-reflection timestamp.
|
|
796
|
+
7. **Agent filtering**: Test/system agents (names matching `test-*`, `proof-*`, `lane-*`, `unassigned`, `system`, `bot`) are auto-excluded from SLA reporting and nudges. Additional exclusions via `excludeAgents` config.
|
|
797
|
+
8. **SLA agent discovery**: Agents are discovered from both active tasks (doing/todo/validating) AND the tracking table (agents who have reflected before). This ensures agents who go idle aren't silently dropped from SLA tracking.
|
|
798
|
+
|
|
799
|
+
### SLA Statuses
|
|
800
|
+
|
|
801
|
+
- `healthy`: Reflected within cadence interval
|
|
802
|
+
- `due`: Past cadence interval but within breach threshold
|
|
803
|
+
- `overdue`: Beyond breach threshold (1.5× cadence)
|
|
804
|
+
|
|
805
|
+
### Configuration
|
|
806
|
+
|
|
807
|
+
Set via `reflectionNudge` in policy config:
|
|
808
|
+
|
|
809
|
+
```json
|
|
810
|
+
{
|
|
811
|
+
"reflectionNudge": {
|
|
812
|
+
"enabled": true,
|
|
813
|
+
"postTaskDelayMin": 5,
|
|
814
|
+
"idleReflectionHours": 8,
|
|
815
|
+
"cooldownMin": 60,
|
|
816
|
+
"agents": [],
|
|
817
|
+
"channel": "general",
|
|
818
|
+
"roleCadenceHours": { "link": 4, "sage": 8 },
|
|
819
|
+
"excludeAgents": [],
|
|
820
|
+
"nudgeNeverReflected": true
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
## Usage Tracking + Cost Guardrails
|
|
826
|
+
|
|
827
|
+
| Method | Endpoint | Description |
|
|
828
|
+
|--------|----------|-------------|
|
|
829
|
+
| POST | `/usage/report` | Record model usage event. Body: `{ agent, model, provider?, input_tokens, output_tokens, estimated_cost_usd?, category?, task_id?, team_id? }`. Auto-estimates cost if not provided. |
|
|
830
|
+
| POST | `/usage/report/batch` | Record batch of usage events. Body: `{ events: [...] }`. |
|
|
831
|
+
| GET | `/usage/summary` | Aggregated usage totals. Query: `since`, `until`, `agent`, `team_id`. |
|
|
832
|
+
| GET | `/usage/by-agent` | Per-agent cost breakdown. Query: `since`, `until`. |
|
|
833
|
+
| GET | `/usage/by-model` | Per-model cost breakdown. Query: `since`, `until`. |
|
|
834
|
+
| GET | `/usage/by-task` | Per-task cost attribution. Query: `since`, `until`, `limit`. |
|
|
835
|
+
| GET | `/usage/estimate` | Dry-run cost estimate (no storage). Query: `model`, `input_tokens`, `output_tokens`. |
|
|
836
|
+
| GET | `/usage/caps` | List active spend caps with current utilization status. |
|
|
837
|
+
| POST | `/usage/caps` | Create spend cap. Body: `{ scope: "global"\|"agent"\|"team", scope_id?, period: "daily"\|"weekly"\|"monthly", limit_usd, action: "warn"\|"throttle"\|"block" }`. |
|
|
838
|
+
| DELETE | `/usage/caps/:id` | Delete a spend cap. |
|
|
839
|
+
| GET | `/usage/routing-suggestions` | Smart routing savings suggestions (which low-stakes categories could use cheaper models). Query: `since`. |
|
|
840
|
+
|
|
841
|
+
### Model Pricing (built-in estimates, per 1M tokens)
|
|
842
|
+
| Model | Input | Output |
|
|
843
|
+
|-------|-------|--------|
|
|
844
|
+
| claude-opus-4-6 | $15.00 | $75.00 |
|
|
845
|
+
| claude-sonnet-4-6 | $3.00 | $15.00 |
|
|
846
|
+
| gpt-5.3 / gpt-5.3-codex | $2.00 | $8.00 |
|
|
847
|
+
| gpt-4o-mini | $0.15 | $0.60 |
|
|
848
|
+
|
|
849
|
+
### Spend Cap Events
|
|
850
|
+
- `usage:cap_warning` — emitted when spend reaches 80% of cap limit
|
|
851
|
+
- `usage:cap_breached` — emitted when spend exceeds cap limit
|
|
852
|
+
|
|
853
|
+
## Insight Reconciliation (Orphan Detection)
|
|
854
|
+
|
|
855
|
+
Ensures promoted insights always have task linkage. Detects and fixes orphaned insights.
|
|
856
|
+
|
|
857
|
+
| Method | Path | Description |
|
|
858
|
+
|--------|------|-------------|
|
|
859
|
+
| GET | `/insights/orphans` | List promoted/task_created insights with no `task_id`. Returns `orphans[]` with id, title, status, score, priority, authors. |
|
|
860
|
+
| POST | `/insights/reconcile` | Scan orphaned insights and create tasks for each. Query: `dry_run=true` for preview. Returns scanned/created/skipped counts + details per insight. |
|
|
861
|
+
|
|
862
|
+
## Alert-Integrity Guard (P0-2)
|
|
863
|
+
|
|
864
|
+
Preflight reconciliation for system alerts — verifies live state before publishing to prevent stale/false-positive alerts.
|
|
865
|
+
|
|
866
|
+
| Method | Path | Description |
|
|
867
|
+
|--------|------|-------------|
|
|
868
|
+
| GET | `/chat/alert-integrity` | Current guard snapshot: canary mode, total checked/rejected/passed, false-positive rate, rejection breakdown. |
|
|
869
|
+
| GET | `/chat/alert-integrity/audit` | Rejection audit log. Query: `limit` (default 50), `since` (timestamp). Returns rejected alerts with reason + state diff. |
|
|
870
|
+
| GET | `/chat/alert-integrity/config` | Read current guard config (enabled, canaryMode, reconcile checks, staleness thresholds). |
|
|
871
|
+
| PATCH | `/chat/alert-integrity/config` | Update guard config. Body: partial config object. |
|
|
872
|
+
| POST | `/chat/alert-integrity/activate` | Exit canary mode — start rejecting stale alerts (instead of log-only). |
|
|
873
|
+
| GET | `/chat/alert-integrity/rollback` | Rollback evaluation metrics: false-positive rate, critical misses, whether rollback trigger is tripped. |
|
|
874
|
+
|
|
875
|
+
## Routing Approvals
|
|
876
|
+
|
|
877
|
+
Explicit routing approval queue. Tasks enter ONLY when marked with `metadata.routing_approval=true` by the routing system. This is NOT derived from "all todo tasks."
|
|
878
|
+
|
|
879
|
+
**Routing approvals** (assignment suggestions) are distinct from **reviewer approvals** (code review sign-off).
|
|
880
|
+
|
|
881
|
+
### Metadata Contract
|
|
882
|
+
|
|
883
|
+
- `metadata.routing_approval: boolean` — marks task as needing routing review
|
|
884
|
+
- `metadata.routing_suggestion: { suggestedAssignee, confidence, reason, alternatives? }` — the routing system's suggestion
|
|
885
|
+
- `metadata.routing_decision: { approvedBy/rejectedBy, decision, assignee?, note? }` — auditable decision record
|
|
886
|
+
- `metadata.routing_rejected: boolean` — suppression flag (prevents reappearance after rejection)
|
|
887
|
+
|
|
888
|
+
| Method | Path | Description |
|
|
889
|
+
|--------|------|-------------|
|
|
890
|
+
| GET | `/routing/approvals` | List all tasks with `routing_approval=true`. Returns suggestion details + confidence. |
|
|
891
|
+
| POST | `/routing/approvals/:taskId/decide` | Approve or reject a routing suggestion. Body: `{ decision: 'approve'\|'reject', actor, assignee?, note? }`. Approve sets assignee + clears queue. Reject suppresses reappearance. |
|
|
892
|
+
| POST | `/routing/approvals/suggest` | Submit a routing suggestion for a task. Body: `{ taskId, suggestedAssignee, confidence, reason, alternatives? }`. Sets `routing_approval=true`. |
|
|
893
|
+
|
|
894
|
+
## Artifact Resolver (path normalization + GitHub fallback)
|
|
895
|
+
|
|
896
|
+
Artifact paths are normalized on PATCH to `validating` to prevent workspace-dependent paths from blocking reviewer access.
|
|
897
|
+
|
|
898
|
+
### Path Normalization
|
|
899
|
+
- Absolute paths with known workspace prefixes (e.g., `/Users/.../workspace-link/process/...`) are stripped to repo-relative (`process/...`)
|
|
900
|
+
- Relative workspace prefixes (`workspace-shared/`, `shared/`) are stripped
|
|
901
|
+
- Unknown absolute paths (e.g., `/etc/passwd`) are rejected
|
|
902
|
+
- Paths with `..` or null bytes are rejected
|
|
903
|
+
- Normalization metadata stamped: `metadata.artifact_normalization.{ normalized, warnings, rejected, normalizedAt }`
|
|
904
|
+
|
|
905
|
+
### GitHub Blob Fallback
|
|
906
|
+
- When `/tasks/:id/artifacts` can't find a local file but PR URL + commit SHA are available
|
|
907
|
+
- Builds `https://github.com/{owner/repo}/blob/{sha}/{path}` as fallback
|
|
908
|
+
- Returns `source: 'github-fallback'` + `rawUrl` for direct download
|
|
909
|
+
- Only applies to `process/` prefixed paths
|
|
910
|
+
|
|
911
|
+
### Artifact Path Guidance (for submitters)
|
|
912
|
+
- Always use repo-relative paths: `process/task-{id}-qa-bundle.md`
|
|
913
|
+
- Never use absolute paths or workspace-prefixed paths
|
|
914
|
+
- The normalizer will auto-fix common workspace prefixes but rejection is possible for unknown patterns
|
|
915
|
+
|
|
916
|
+
## Calendar
|
|
917
|
+
|
|
918
|
+
Shared time-awareness system for agents and humans. Supports availability blocks and (coming soon) full calendar events with iCal compatibility.
|
|
919
|
+
|
|
920
|
+
### Block Types
|
|
921
|
+
- `busy` — occupied but interruptible for normal+ urgency
|
|
922
|
+
- `focus` — deep work, only interruptible for high urgency
|
|
923
|
+
- `available` — explicitly free
|
|
924
|
+
- `ooo` — out of office, only interruptible for high urgency
|
|
925
|
+
|
|
926
|
+
### Recurring Blocks
|
|
927
|
+
Recurring blocks use day-of-week scheduling with minutes-from-midnight for start/end times. Days: `sun,mon,tue,wed,thu,fri,sat`. Timezone-aware evaluation.
|
|
928
|
+
|
|
929
|
+
### Ping Gating Rules
|
|
930
|
+
| Urgency | Free | Busy | Focus | OOO |
|
|
931
|
+
|---------|------|------|-------|-----|
|
|
932
|
+
| high | ✅ | ✅ | ✅ | ✅ |
|
|
933
|
+
| normal | ✅ | ✅ | ❌ | ❌ |
|
|
934
|
+
| low | ✅ | ❌ | ❌ | ❌ |
|
|
935
|
+
|
|
936
|
+
| Method | Path | Description |
|
|
937
|
+
|--------|------|-------------|
|
|
938
|
+
| POST | `/calendar/blocks` | Create a calendar block. Body: `{ agent, type, title, start, end, recurring?, timezone? }`. For one-off: start/end are epoch ms. For recurring: start/end are minutes from midnight (0-1439), recurring is comma-separated days. |
|
|
939
|
+
| GET | `/calendar/blocks` | List blocks. Query: `agent`, `type`, `from` (epoch ms), `to` (epoch ms). |
|
|
940
|
+
| GET | `/calendar/blocks/:id` | Get a single block by ID. |
|
|
941
|
+
| PATCH | `/calendar/blocks/:id` | Update a block. Body: partial block fields. |
|
|
942
|
+
| DELETE | `/calendar/blocks/:id` | Delete a block. |
|
|
943
|
+
| GET | `/calendar/busy` | Check if agent is busy. Query: `agent` (required). Returns busy/free status + current block details. |
|
|
944
|
+
| GET | `/calendar/availability` | Team-wide availability snapshot. Returns all agents with calendar blocks and their current status. |
|
|
945
|
+
| GET | `/calendar/should-ping` | Ping gating check. Query: `agent` (required), `urgency` (low/normal/high, default: normal). Returns should_ping boolean + reason + delay_until. |
|
|
946
|
+
|
|
947
|
+
## Calendar Events
|
|
948
|
+
|
|
949
|
+
Full calendar event system with iCal-compatible fields, attendees, RSVP, recurrence (RRULE), and reminders.
|
|
950
|
+
|
|
951
|
+
### Event Fields (iCal-aligned)
|
|
952
|
+
- `summary` — event title (SUMMARY)
|
|
953
|
+
- `description` — event description (DESCRIPTION)
|
|
954
|
+
- `dtstart`, `dtend` — epoch ms start/end (DTSTART, DTEND)
|
|
955
|
+
- `timezone` — IANA timezone (VTIMEZONE)
|
|
956
|
+
- `rrule` — RFC 5545 recurrence rule (e.g., `FREQ=WEEKLY;BYDAY=MO,WE,FR`)
|
|
957
|
+
- `organizer` — creator (agent or human name)
|
|
958
|
+
- `attendees[]` — participants with RSVP status (`accepted`, `declined`, `tentative`, `needs-action`)
|
|
959
|
+
- `location` — text or URL
|
|
960
|
+
- `categories[]` — tags
|
|
961
|
+
- `reminders[]` — `{ minutes_before, method: 'chat'|'inbox' }`
|
|
962
|
+
- `status` — `confirmed`, `tentative`, `cancelled`
|
|
963
|
+
- `uid` — RFC 5545 UID for iCal interop
|
|
964
|
+
|
|
965
|
+
### Supported RRULE frequencies
|
|
966
|
+
`DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY` with `INTERVAL`, `BYDAY`, `BYMONTHDAY`, `BYMONTH`, `COUNT`, `UNTIL`.
|
|
967
|
+
|
|
968
|
+
| Method | Path | Description |
|
|
969
|
+
|--------|------|-------------|
|
|
970
|
+
| POST | `/calendar/events` | Create event. Body: `{ summary, dtstart, dtend, organizer, description?, timezone?, rrule?, attendees?, location?, categories?, reminders?, status? }` |
|
|
971
|
+
| GET | `/calendar/events` | List events. Query: `organizer`, `attendee`, `status`, `from`, `to` (epoch ms), `categories` (comma-separated), `limit`. |
|
|
972
|
+
| GET | `/calendar/events/:id` | Get single event. |
|
|
973
|
+
| PATCH | `/calendar/events/:id` | Update event fields. |
|
|
974
|
+
| DELETE | `/calendar/events/:id` | Delete event + associated fired reminders. |
|
|
975
|
+
| POST | `/calendar/events/:id/rsvp` | RSVP to event. Body: `{ name, status }`. Adds attendee if not present. |
|
|
976
|
+
| GET | `/calendar/events/:id/occurrences` | Get occurrence timestamps for recurring events. Query: `from`, `to` (epoch ms, default: next 30 days). |
|
|
977
|
+
| GET | `/calendar/reminders/pending` | List reminders that should fire now (for reminder engine polling). |
|
|
978
|
+
| GET | `/calendar/events/current` | Check if agent is in an event right now. Query: `agent` (required). |
|
|
979
|
+
| GET | `/calendar/events/next` | Get agent's next upcoming event. Query: `agent` (required). |
|
|
980
|
+
|
|
981
|
+
## Calendar Reminder Engine
|
|
982
|
+
|
|
983
|
+
Polls for pending reminders every 30 seconds and delivers them via chat messages. Reminders are deduplicated across restarts via SQLite.
|
|
984
|
+
|
|
985
|
+
Reminder delivery: fires to `#calendar-reminders` channel AND `#general` with @mentions for recipients.
|
|
986
|
+
|
|
987
|
+
| Method | Path | Description |
|
|
988
|
+
|--------|------|-------------|
|
|
989
|
+
| GET | `/calendar/reminders/stats` | Reminder engine stats: running, poll_interval_ms, last_poll_at, total_polls, total_delivered. |
|
|
990
|
+
| GET | `/calendar/next-free` | When is agent next free? Query: `agent` (required). Returns free_now boolean + free_at timestamp. Checks both blocks and events. |
|
|
991
|
+
|
|
992
|
+
## Calendar iCal Import/Export (RFC 5545)
|
|
993
|
+
|
|
994
|
+
Standard iCalendar format support. Events can be imported from email invites, Google Calendar, Outlook, etc.
|
|
995
|
+
|
|
996
|
+
### Export
|
|
997
|
+
Exports produce RFC 5545 compliant `.ics` files with VEVENT, ATTENDEE (with PARTSTAT), VALARM (reminders), RRULE, CATEGORIES, and proper text escaping/line folding.
|
|
998
|
+
|
|
999
|
+
### Import
|
|
1000
|
+
Import parses VEVENT components and creates/updates events. If a VEVENT has a UID matching an existing event, it's updated instead of duplicated. VALARM maps to reminders, ATTENDEE maps to attendees with PARTSTAT.
|
|
1001
|
+
|
|
1002
|
+
### Round-trip
|
|
1003
|
+
Export → import preserves: summary, description, organizer, attendees, location, categories, reminders, RRULE, status.
|
|
1004
|
+
|
|
1005
|
+
| Method | Path | Description |
|
|
1006
|
+
|--------|------|-------------|
|
|
1007
|
+
| GET | `/calendar/export.ics` | Export events as .ics file. Query: `organizer`, `attendee`, `from`, `to`. Returns `text/calendar` with Content-Disposition. |
|
|
1008
|
+
| GET | `/calendar/events/:id/export.ics` | Export single event as .ics file. |
|
|
1009
|
+
| POST | `/calendar/import` | Import events from .ics content. Body: `{ ics: string, organizer?: string }` or raw .ics string. Returns created/updated events. UID-based dedup on re-import. |
|
|
1010
|
+
|
|
1011
|
+
## Remote Node Management
|
|
1012
|
+
|
|
1013
|
+
Auth-gated endpoints for managing a reflectt-node instance remotely. Provide `REFLECTT_MANAGE_TOKEN` env var; authenticate via `x-manage-token` header or `Authorization: Bearer <token>`. Loopback (localhost) access is always allowed.
|
|
1014
|
+
|
|
1015
|
+
| Method | Path | Description |
|
|
1016
|
+
|--------|------|-------------|
|
|
1017
|
+
| GET | `/manage/status` | Unified status: version, build info, health stats, uptime |
|
|
1018
|
+
| GET | `/manage/config` | Config introspection with secrets redacted (server config, auth token status, team files) |
|
|
1019
|
+
| GET | `/manage/logs` | Bounded log tail. Query: `level` (error/warn/info), `since` (epoch ms), `limit` (max 200), `format=text` for plain text |
|
|
1020
|
+
| POST | `/manage/restart` | Graceful restart. Works with Docker, systemd, and reflectt CLI (PID file). Returns 501 if unsupported. |
|
|
1021
|
+
| GET | `/manage/disk` | Data directory sizes for capacity monitoring |
|
|
1022
|
+
|
|
1023
|
+
### Example: Check Remote Node Status
|
|
1024
|
+
|
|
1025
|
+
```bash
|
|
1026
|
+
curl -s http://your-node:4445/manage/status \
|
|
1027
|
+
-H 'x-manage-token: YOUR_TOKEN' | jq .
|
|
1028
|
+
```
|
|
1029
|
+
|
|
1030
|
+
### Example: Tail Error Logs (Plain Text)
|
|
1031
|
+
|
|
1032
|
+
```bash
|
|
1033
|
+
curl -s 'http://your-node:4445/manage/logs?level=error&limit=20&format=text' \
|
|
1034
|
+
-H 'x-manage-token: YOUR_TOKEN'
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
### Example: Inspect Config (Secrets Redacted)
|
|
1038
|
+
|
|
1039
|
+
```bash
|
|
1040
|
+
curl -s http://your-node:4445/manage/config \
|
|
1041
|
+
-H 'x-manage-token: YOUR_TOKEN' | jq .
|
|
1042
|
+
```
|
|
1043
|
+
|
|
1044
|
+
## Bootstrap: Team Composition
|
|
1045
|
+
|
|
1046
|
+
`POST /bootstrap/team` recommends a team based on your use case. Returns agents, ready-to-create task payloads, HEARTBEAT.md snippets, and a TEAM-ROLES.yaml you can save directly.
|
|
1047
|
+
|
|
1048
|
+
### Example: Support Team
|
|
1049
|
+
|
|
1050
|
+
```bash
|
|
1051
|
+
curl -s -X POST http://127.0.0.1:4445/bootstrap/team \
|
|
1052
|
+
-H 'Content-Type: application/json' \
|
|
1053
|
+
-d '{"useCase": "managed node support team", "constraints": {"maxAgents": 3}}' | jq .
|
|
1054
|
+
```
|
|
1055
|
+
|
|
1056
|
+
### Example: Content Launch
|
|
1057
|
+
|
|
1058
|
+
```bash
|
|
1059
|
+
curl -s -X POST http://127.0.0.1:4445/bootstrap/team \
|
|
1060
|
+
-H 'Content-Type: application/json' \
|
|
1061
|
+
-d '{"useCase": "content and growth launch"}' | jq .
|
|
1062
|
+
```
|