reflectt-node 0.1.8 → 0.1.12
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/defaults/TEAM-ROLES.yaml +317 -5
- package/dist/agent-config.d.ts +51 -0
- package/dist/agent-config.d.ts.map +1 -0
- package/dist/agent-config.js +129 -0
- package/dist/agent-config.js.map +1 -0
- package/dist/agent-config.test.d.ts +2 -0
- package/dist/agent-config.test.d.ts.map +1 -0
- package/dist/agent-config.test.js +91 -0
- package/dist/agent-config.test.js.map +1 -0
- package/dist/agent-memories.d.ts +58 -0
- package/dist/agent-memories.d.ts.map +1 -0
- package/dist/agent-memories.js +168 -0
- package/dist/agent-memories.js.map +1 -0
- package/dist/agent-memories.test.d.ts +2 -0
- package/dist/agent-memories.test.d.ts.map +1 -0
- package/dist/agent-memories.test.js +327 -0
- package/dist/agent-memories.test.js.map +1 -0
- package/dist/agent-messaging.d.ts +50 -0
- package/dist/agent-messaging.d.ts.map +1 -0
- package/dist/agent-messaging.js +103 -0
- package/dist/agent-messaging.js.map +1 -0
- package/dist/agent-messaging.test.d.ts +2 -0
- package/dist/agent-messaging.test.d.ts.map +1 -0
- package/dist/agent-messaging.test.js +105 -0
- package/dist/agent-messaging.test.js.map +1 -0
- package/dist/agent-runs.d.ts +158 -0
- package/dist/agent-runs.d.ts.map +1 -0
- package/dist/agent-runs.js +514 -0
- package/dist/agent-runs.js.map +1 -0
- package/dist/agent-runs.test.d.ts +2 -0
- package/dist/agent-runs.test.d.ts.map +1 -0
- package/dist/agent-runs.test.js +386 -0
- package/dist/agent-runs.test.js.map +1 -0
- package/dist/approval-queue.test.d.ts +2 -0
- package/dist/approval-queue.test.d.ts.map +1 -0
- package/dist/approval-queue.test.js +118 -0
- package/dist/approval-queue.test.js.map +1 -0
- package/dist/artifact-store.d.ts +55 -0
- package/dist/artifact-store.d.ts.map +1 -0
- package/dist/artifact-store.js +128 -0
- package/dist/artifact-store.js.map +1 -0
- package/dist/artifact-store.test.d.ts +2 -0
- package/dist/artifact-store.test.d.ts.map +1 -0
- package/dist/artifact-store.test.js +119 -0
- package/dist/artifact-store.test.js.map +1 -0
- package/dist/boardHealthWorker.d.ts +28 -0
- package/dist/boardHealthWorker.d.ts.map +1 -1
- package/dist/boardHealthWorker.js +33 -1
- package/dist/boardHealthWorker.js.map +1 -1
- package/dist/canvas-input.test.d.ts +2 -0
- package/dist/canvas-input.test.d.ts.map +1 -0
- package/dist/canvas-input.test.js +96 -0
- package/dist/canvas-input.test.js.map +1 -0
- package/dist/canvas-render.test.d.ts +2 -0
- package/dist/canvas-render.test.d.ts.map +1 -0
- package/dist/canvas-render.test.js +95 -0
- package/dist/canvas-render.test.js.map +1 -0
- package/dist/capabilities/browser.d.ts +75 -0
- package/dist/capabilities/browser.d.ts.map +1 -0
- package/dist/capabilities/browser.js +172 -0
- package/dist/capabilities/browser.js.map +1 -0
- package/dist/channels.d.ts +1 -1
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/cloud.d.ts +2 -0
- package/dist/cloud.d.ts.map +1 -1
- package/dist/cloud.js +135 -3
- package/dist/cloud.js.map +1 -1
- package/dist/cost-enforcement.d.ts +38 -0
- package/dist/cost-enforcement.d.ts.map +1 -0
- package/dist/cost-enforcement.js +84 -0
- package/dist/cost-enforcement.js.map +1 -0
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +8 -0
- package/dist/dashboard.js.map +1 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +131 -0
- package/dist/db.js.map +1 -1
- package/dist/e2e-loop-proof.test.d.ts +2 -0
- package/dist/e2e-loop-proof.test.d.ts.map +1 -0
- package/dist/e2e-loop-proof.test.js +104 -0
- package/dist/e2e-loop-proof.test.js.map +1 -0
- package/dist/email-sms-send.test.d.ts +2 -0
- package/dist/email-sms-send.test.d.ts.map +1 -0
- package/dist/email-sms-send.test.js +96 -0
- package/dist/email-sms-send.test.js.map +1 -0
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +2 -0
- package/dist/events.js.map +1 -1
- package/dist/fingerprint.d.ts.map +1 -1
- package/dist/fingerprint.js +5 -10
- package/dist/fingerprint.js.map +1 -1
- package/dist/github-webhook-chat.d.ts +75 -0
- package/dist/github-webhook-chat.d.ts.map +1 -0
- package/dist/github-webhook-chat.js +108 -0
- package/dist/github-webhook-chat.js.map +1 -0
- package/dist/handoff-state.test.d.ts +2 -0
- package/dist/handoff-state.test.d.ts.map +1 -0
- package/dist/handoff-state.test.js +102 -0
- package/dist/handoff-state.test.js.map +1 -0
- package/dist/health.d.ts +9 -0
- package/dist/health.d.ts.map +1 -1
- package/dist/health.js +18 -0
- package/dist/health.js.map +1 -1
- package/dist/host-error-correlation.d.ts +65 -0
- package/dist/host-error-correlation.d.ts.map +1 -0
- package/dist/host-error-correlation.js +123 -0
- package/dist/host-error-correlation.js.map +1 -0
- package/dist/index.js +39 -10
- package/dist/index.js.map +1 -1
- package/dist/notificationDedupeGuard.d.ts +4 -0
- package/dist/notificationDedupeGuard.d.ts.map +1 -1
- package/dist/notificationDedupeGuard.js +8 -4
- package/dist/notificationDedupeGuard.js.map +1 -1
- package/dist/presence.d.ts +37 -5
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +127 -16
- package/dist/presence.js.map +1 -1
- package/dist/review-sla.d.ts +9 -0
- package/dist/review-sla.d.ts.map +1 -0
- package/dist/review-sla.js +51 -0
- package/dist/review-sla.js.map +1 -0
- package/dist/routing-enforcement.test.d.ts +2 -0
- package/dist/routing-enforcement.test.d.ts.map +1 -0
- package/dist/routing-enforcement.test.js +86 -0
- package/dist/routing-enforcement.test.js.map +1 -0
- package/dist/run-retention.test.d.ts +2 -0
- package/dist/run-retention.test.d.ts.map +1 -0
- package/dist/run-retention.test.js +57 -0
- package/dist/run-retention.test.js.map +1 -0
- package/dist/run-stream.test.d.ts +2 -0
- package/dist/run-stream.test.d.ts.map +1 -0
- package/dist/run-stream.test.js +70 -0
- package/dist/run-stream.test.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1301 -75
- package/dist/server.js.map +1 -1
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +45 -0
- package/dist/tasks.js.map +1 -1
- package/dist/todoHoardingGuard.d.ts +17 -0
- package/dist/todoHoardingGuard.d.ts.map +1 -1
- package/dist/todoHoardingGuard.js +25 -2
- package/dist/todoHoardingGuard.js.map +1 -1
- package/dist/webhook-storage.d.ts +50 -0
- package/dist/webhook-storage.d.ts.map +1 -0
- package/dist/webhook-storage.js +102 -0
- package/dist/webhook-storage.js.map +1 -0
- package/dist/webhook-storage.test.d.ts +2 -0
- package/dist/webhook-storage.test.d.ts.map +1 -0
- package/dist/webhook-storage.test.js +86 -0
- package/dist/webhook-storage.test.js.map +1 -0
- package/dist/workflow-templates.d.ts +44 -0
- package/dist/workflow-templates.d.ts.map +1 -0
- package/dist/workflow-templates.js +154 -0
- package/dist/workflow-templates.js.map +1 -0
- package/dist/workflow-templates.test.d.ts +2 -0
- package/dist/workflow-templates.test.d.ts.map +1 -0
- package/dist/workflow-templates.test.js +76 -0
- package/dist/workflow-templates.test.js.map +1 -0
- package/package.json +3 -1
- package/public/dashboard.js +76 -1
- package/public/design-tokens-platform.md +118 -0
- package/public/design-tokens.css +195 -0
- package/public/docs.md +131 -2
- package/public/presence-loop-demo.html +473 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
2
|
+
Reflectt Design Tokens v0
|
|
3
|
+
═══════════════════════════════════════════════════════════════════════
|
|
4
|
+
Single source of truth for all visual values across web, iOS, Android.
|
|
5
|
+
Platform implementations should map these to native equivalents:
|
|
6
|
+
- iOS: UIColor extensions + CGFloat constants
|
|
7
|
+
- Android: colors.xml + dimens.xml + attrs.xml
|
|
8
|
+
- Web: CSS custom properties (this file)
|
|
9
|
+
|
|
10
|
+
Usage: @import url('/design-tokens.css');
|
|
11
|
+
Or: <link rel="stylesheet" href="/design-tokens.css">
|
|
12
|
+
═══════════════════════════════════════════════════════════════════════ */
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
/* ── Brand Colors ─────────────────────────────────────────────────── */
|
|
16
|
+
--color-brand-primary: #7C3AED; /* Purple 600 — main brand */
|
|
17
|
+
--color-brand-primary-light: #A78BFA; /* Purple 400 — hover/active */
|
|
18
|
+
--color-brand-primary-dark: #5B21B6; /* Purple 800 — pressed */
|
|
19
|
+
--color-brand-accent: #8B5CF6; /* Purple 500 — secondary accent */
|
|
20
|
+
|
|
21
|
+
/* ── Semantic Colors ──────────────────────────────────────────────── */
|
|
22
|
+
--color-success: #10B981; /* Emerald 500 */
|
|
23
|
+
--color-success-bg: #D1FAE5; /* Emerald 100 */
|
|
24
|
+
--color-warning: #F59E0B; /* Amber 500 */
|
|
25
|
+
--color-warning-bg: #FEF3C7; /* Amber 100 */
|
|
26
|
+
--color-error: #EF4444; /* Red 500 */
|
|
27
|
+
--color-error-bg: #FEE2E2; /* Red 100 */
|
|
28
|
+
--color-info: #3B82F6; /* Blue 500 */
|
|
29
|
+
--color-info-bg: #DBEAFE; /* Blue 100 */
|
|
30
|
+
|
|
31
|
+
/* ── Canvas State Colors ──────────────────────────────────────────── */
|
|
32
|
+
/* Maps to the 8-state machine from interface-os-v0-state-machine.html */
|
|
33
|
+
--color-state-floor: #1F2937; /* Gray 800 — resting */
|
|
34
|
+
--color-state-listening: #7C3AED; /* Purple 600 — active listening */
|
|
35
|
+
--color-state-thinking: #6366F1; /* Indigo 500 — processing */
|
|
36
|
+
--color-state-rendering: #8B5CF6; /* Purple 500 — outputting */
|
|
37
|
+
--color-state-ambient: #374151; /* Gray 700 — passive monitoring */
|
|
38
|
+
--color-state-decision: #F59E0B; /* Amber 500 — needs human input */
|
|
39
|
+
--color-state-urgent: #EF4444; /* Red 500 — critical alert */
|
|
40
|
+
--color-state-handoff: #10B981; /* Emerald 500 — transferring control */
|
|
41
|
+
|
|
42
|
+
/* ── Trust Indicator ──────────────────────────────────────────────── */
|
|
43
|
+
--color-trust-mic: #F87171; /* Red 400 — visible without alarming */ /* Red — microphone active */
|
|
44
|
+
--color-trust-camera: #F87171; /* Red — camera active */
|
|
45
|
+
--color-trust-mic-camera: #EF4444; /* Red 500 — both sensors escalated */ /* Red 600 — both active */
|
|
46
|
+
--trust-indicator-size: 10px;
|
|
47
|
+
--trust-indicator-position-top: env(safe-area-inset-top, 8px);
|
|
48
|
+
--trust-indicator-position-left: 12px;
|
|
49
|
+
--trust-indicator-z-index: 9999;
|
|
50
|
+
|
|
51
|
+
/* ── Surface / Background ─────────────────────────────────────────── */
|
|
52
|
+
--color-bg-primary: #FFFFFF;
|
|
53
|
+
--color-bg-secondary: #F9FAFB; /* Gray 50 */
|
|
54
|
+
--color-bg-tertiary: #F3F4F6; /* Gray 100 */
|
|
55
|
+
--color-bg-elevated: #FFFFFF;
|
|
56
|
+
--color-bg-overlay: rgba(0, 0, 0, 0.5);
|
|
57
|
+
--color-bg-canvas: #0F0F0F; /* Near-black for canvas surface */
|
|
58
|
+
|
|
59
|
+
/* ── Text ─────────────────────────────────────────────────────────── */
|
|
60
|
+
--color-text-primary: #111827; /* Gray 900 */
|
|
61
|
+
--color-text-secondary: #6B7280; /* Gray 500 */
|
|
62
|
+
--color-text-tertiary: #9CA3AF; /* Gray 400 */
|
|
63
|
+
--color-text-inverse: #FFFFFF;
|
|
64
|
+
--color-text-link: #7C3AED;
|
|
65
|
+
--color-text-on-brand: #FFFFFF;
|
|
66
|
+
|
|
67
|
+
/* ── Borders ──────────────────────────────────────────────────────── */
|
|
68
|
+
--color-border-default: #E5E7EB; /* Gray 200 */
|
|
69
|
+
--color-border-hover: #D1D5DB; /* Gray 300 */
|
|
70
|
+
--color-border-focus: #7C3AED;
|
|
71
|
+
--color-border-error: #EF4444;
|
|
72
|
+
|
|
73
|
+
/* ── Typography ───────────────────────────────────────────────────── */
|
|
74
|
+
--font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
75
|
+
--font-family-mono: 'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Code', Menlo, monospace;
|
|
76
|
+
|
|
77
|
+
--font-size-xs: 0.75rem; /* 12px */
|
|
78
|
+
--font-size-sm: 0.875rem; /* 14px */
|
|
79
|
+
--font-size-base: 1rem; /* 16px */
|
|
80
|
+
--font-size-lg: 1.125rem; /* 18px */
|
|
81
|
+
--font-size-xl: 1.25rem; /* 20px */
|
|
82
|
+
--font-size-2xl: 1.5rem; /* 24px */
|
|
83
|
+
--font-size-3xl: 1.875rem; /* 30px */
|
|
84
|
+
|
|
85
|
+
--font-weight-normal: 400;
|
|
86
|
+
--font-weight-medium: 500;
|
|
87
|
+
--font-weight-semibold: 600;
|
|
88
|
+
--font-weight-bold: 700;
|
|
89
|
+
|
|
90
|
+
--line-height-tight: 1.25;
|
|
91
|
+
--line-height-normal: 1.5;
|
|
92
|
+
--line-height-relaxed: 1.75;
|
|
93
|
+
|
|
94
|
+
/* ── Spacing ──────────────────────────────────────────────────────── */
|
|
95
|
+
--space-0: 0;
|
|
96
|
+
--space-1: 0.25rem; /* 4px */
|
|
97
|
+
--space-2: 0.5rem; /* 8px */
|
|
98
|
+
--space-3: 0.75rem; /* 12px */
|
|
99
|
+
--space-4: 1rem; /* 16px */
|
|
100
|
+
--space-5: 1.25rem; /* 20px */
|
|
101
|
+
--space-6: 1.5rem; /* 24px */
|
|
102
|
+
--space-8: 2rem; /* 32px */
|
|
103
|
+
--space-10: 2.5rem; /* 40px */
|
|
104
|
+
--space-12: 3rem; /* 48px */
|
|
105
|
+
--space-16: 4rem; /* 64px */
|
|
106
|
+
|
|
107
|
+
/* ── Border Radius ────────────────────────────────────────────────── */
|
|
108
|
+
--radius-sm: 4px;
|
|
109
|
+
--radius-md: 8px;
|
|
110
|
+
--radius-lg: 12px;
|
|
111
|
+
--radius-xl: 16px;
|
|
112
|
+
--radius-2xl: 24px;
|
|
113
|
+
--radius-full: 9999px;
|
|
114
|
+
|
|
115
|
+
/* ── Shadows ──────────────────────────────────────────────────────── */
|
|
116
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
117
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
118
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
119
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
120
|
+
--shadow-glow-brand: 0 0 20px rgba(124, 58, 237, 0.3);
|
|
121
|
+
--shadow-glow-urgent: 0 0 20px rgba(239, 68, 68, 0.4);
|
|
122
|
+
|
|
123
|
+
/* ── Transitions ──────────────────────────────────────────────────── */
|
|
124
|
+
--transition-fast: 150ms;
|
|
125
|
+
--transition-base: 250ms;
|
|
126
|
+
--transition-slow: 350ms;
|
|
127
|
+
--transition-canvas: 500ms; /* Canvas state transitions */
|
|
128
|
+
|
|
129
|
+
--easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
|
|
130
|
+
--easing-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
131
|
+
--easing-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
132
|
+
--easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
133
|
+
--easing-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
134
|
+
|
|
135
|
+
/* ── Z-Index Scale ────────────────────────────────────────────────── */
|
|
136
|
+
--z-base: 0;
|
|
137
|
+
--z-dropdown: 100;
|
|
138
|
+
--z-sticky: 200;
|
|
139
|
+
--z-overlay: 300;
|
|
140
|
+
--z-modal: 400;
|
|
141
|
+
--z-popover: 500;
|
|
142
|
+
--z-toast: 600;
|
|
143
|
+
--z-override-bar: 800; /* Persistent controls */
|
|
144
|
+
--z-trust-indicator: 9999; /* Non-dismissable, always on top */
|
|
145
|
+
|
|
146
|
+
/* ── Interactive Elements ─────────────────────────────────────────── */
|
|
147
|
+
--tap-target-min: 44px; /* WCAG minimum */
|
|
148
|
+
--tap-target-urgent: 52px; /* Enlarged in urgent state */
|
|
149
|
+
--focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.4);
|
|
150
|
+
|
|
151
|
+
/* ── Canvas / Orb ─────────────────────────────────────────────────── */
|
|
152
|
+
--orb-size-idle: 64px;
|
|
153
|
+
--orb-size-active: 64px;
|
|
154
|
+
--orb-size-transcript: 44px; /* Shrinks when transcript appears */
|
|
155
|
+
--orb-glow-duration: 1.8s;
|
|
156
|
+
--orb-color: var(--color-brand-primary);
|
|
157
|
+
|
|
158
|
+
/* ── Override Bar ─────────────────────────────────────────────────── */
|
|
159
|
+
--override-bar-height: 52px;
|
|
160
|
+
--override-bar-bg: rgba(0, 0, 0, 0.85);
|
|
161
|
+
--override-bar-blur: 20px;
|
|
162
|
+
|
|
163
|
+
/* ── Presence Dot ─────────────────────────────────────────────────── */
|
|
164
|
+
--presence-dot-size: 8px;
|
|
165
|
+
--presence-dot-active: #10B981; /* Online */
|
|
166
|
+
--presence-dot-idle: #F59E0B; /* Away */
|
|
167
|
+
--presence-dot-offline: #6B7280; /* Disconnected */
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* ── Dark Mode ──────────────────────────────────────────────────────── */
|
|
171
|
+
@media (prefers-color-scheme: dark) {
|
|
172
|
+
:root {
|
|
173
|
+
--color-bg-primary: #111827;
|
|
174
|
+
--color-bg-secondary: #1F2937;
|
|
175
|
+
--color-bg-tertiary: #374151;
|
|
176
|
+
--color-bg-elevated: #1F2937;
|
|
177
|
+
--color-bg-overlay: rgba(0, 0, 0, 0.7);
|
|
178
|
+
|
|
179
|
+
--color-text-primary: #F9FAFB;
|
|
180
|
+
--color-text-secondary: #9CA3AF;
|
|
181
|
+
--color-text-tertiary: #6B7280;
|
|
182
|
+
|
|
183
|
+
--color-border-default: #374151;
|
|
184
|
+
--color-border-hover: #4B5563;
|
|
185
|
+
|
|
186
|
+
--color-success-bg: rgba(16, 185, 129, 0.15);
|
|
187
|
+
--color-warning-bg: rgba(245, 158, 11, 0.15);
|
|
188
|
+
--color-error-bg: rgba(239, 68, 68, 0.15);
|
|
189
|
+
--color-info-bg: rgba(59, 130, 246, 0.15);
|
|
190
|
+
|
|
191
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
192
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
|
|
193
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
|
|
194
|
+
}
|
|
195
|
+
}
|
package/public/docs.md
CHANGED
|
@@ -111,7 +111,7 @@ Remote hosts (multi-host installs) phone-home via a lightweight heartbeat so the
|
|
|
111
111
|
| GET | `/health/watchdog` | Richer keepalive with cold_start flag, task/chat stats, boot_info, and remediation hints. For monitoring dashboards. See `docs/KEEPALIVE.md`. |
|
|
112
112
|
| 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). |
|
|
113
113
|
| GET | `/team/health` | Team config linter status for `~/.reflectt/TEAM.md`, `TEAM-ROLES.yaml`, `TEAM-STANDARDS.md` (issues, role coverage, last check timestamp) |
|
|
114
|
-
| GET | `/health/team` |
|
|
114
|
+
| GET | `/health/team` | Host-local team health metrics with compliance + `staleDoing` snapshot. Response now includes `scope` metadata (`kind: "host-local"`, `hostName`, `label`, `message`, `orgHealthUrl`) so operators can see which host they are inspecting and, when cloud is configured, follow the org-health pointer for cross-host truth. 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). |
|
|
115
115
|
| GET | `/health/agents` | Per-agent health summary (`last_seen`, `active_task`, `heartbeat_age_ms`, `last_shipped_at`, `stale_reason`, state) |
|
|
116
116
|
| GET | `/health/compliance` | Compliance check results |
|
|
117
117
|
| GET | `/compliance/violations` | State-read-before-assertion compliance violations. Query: `agent`, `severity`, `limit` (max 1000), `since` (epoch ms). Returns `{ violations, count, summary, query }`. |
|
|
@@ -182,6 +182,8 @@ If your deployment needs quiet-hours behavior today, enforce it in scheduler/gat
|
|
|
182
182
|
|--------|------|-------------|
|
|
183
183
|
| 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 }`. |
|
|
184
184
|
| GET | `/tasks/:id` | Get task by ID. Also accepts unambiguous ID prefixes. Ambiguous prefix returns `400` with full-ID suggestions. |
|
|
185
|
+
| GET | `/tasks/:id/handoff` | Get handoff state for a task (reviewed_by, decision, next_owner). |
|
|
186
|
+
| PUT | `/tasks/:id/handoff` | Set handoff state. Body: `{ reviewed_by (required), decision: "approved"\|"rejected"\|"needs_changes"\|"escalated" (required), next_owner? }`. Also settable via PATCH /tasks/:id metadata.handoff_state. |
|
|
185
187
|
| 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. |
|
|
186
188
|
| GET | `/tasks/:id/history` | Status changelog for task lifecycle transitions. Returns `history[]` entries shaped as `{ status, changedBy, changedAt, metadata }` for each status transition. |
|
|
187
189
|
| 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? }`. |
|
|
@@ -197,7 +199,7 @@ If your deployment needs quiet-hours behavior today, enforce it in scheduler/gat
|
|
|
197
199
|
| DELETE | `/tasks/:id` | Delete task |
|
|
198
200
|
| GET | `/tasks/next` | Pull-based assignment. Query: `agent`, `compact`, `claim=1` (auto-transitions todo→doing on pull) |
|
|
199
201
|
| GET | `/tasks/active` | Get active (doing) task for agent. Query: `agent`, `compact`. Returns null if no doing tasks. |
|
|
200
|
-
| GET | `/heartbeat/:agent` | Single compact heartbeat payload (~200 tokens). Returns active task, next task, slim inbox, queue counts,
|
|
202
|
+
| GET | `/heartbeat/:agent` | Single compact heartbeat payload (~200 tokens). Returns active task, next task, slim inbox, queue counts, suggested action, boot context (recent memories top 5, active agent_run). Replaces 3+ separate API calls. |
|
|
201
203
|
| GET | `/bootstrap/heartbeat/:agent` | Generate optimal HEARTBEAT.md content for agent. References best endpoints. Includes version stamp and content hash for change detection. |
|
|
202
204
|
| 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[] }`. |
|
|
203
205
|
| GET | `/manage/status` | Remote management: unified status (version + health + uptime). Auth: `x-manage-token` header or `Authorization: Bearer`. |
|
|
@@ -205,6 +207,16 @@ If your deployment needs quiet-hours behavior today, enforce it in scheduler/gat
|
|
|
205
207
|
| GET | `/manage/logs` | Remote management: bounded log tail. Query: `level`, `since`, `limit`, `format=text`. Auth required. |
|
|
206
208
|
| POST | `/manage/restart` | Remote management: graceful restart (Docker/systemd/CLI). Auth required. |
|
|
207
209
|
| GET | `/manage/disk` | Remote management: data directory sizes. Auth required. |
|
|
210
|
+
| GET | `/browser/config` | Browser capability configuration (max sessions, rate limits, viewport). |
|
|
211
|
+
| POST | `/browser/sessions` | Create a new isolated browser session. Body: `{ agent, url?, headless?, viewport? }`. Returns session object. |
|
|
212
|
+
| GET | `/browser/sessions` | List all browser sessions (active and recent). |
|
|
213
|
+
| GET | `/browser/sessions/:id` | Get browser session by ID. |
|
|
214
|
+
| DELETE | `/browser/sessions/:id` | Close and cleanup a browser session. |
|
|
215
|
+
| POST | `/browser/sessions/:id/act` | Execute a natural language browser action. Body: `{ instruction }`. |
|
|
216
|
+
| POST | `/browser/sessions/:id/extract` | Extract structured data from current page. Body: `{ instruction, schema? }`. |
|
|
217
|
+
| POST | `/browser/sessions/:id/observe` | Discover available actions on current page. Body: `{ instruction }`. |
|
|
218
|
+
| POST | `/browser/sessions/:id/navigate` | Navigate to a URL. Body: `{ url }`. |
|
|
219
|
+
| GET | `/browser/sessions/:id/screenshot` | Take a screenshot of the current page. Returns `{ base64, mimeType }`. |
|
|
208
220
|
| GET | `/capabilities` | Agent-facing endpoint discovery. Lists all endpoints grouped by purpose, compact support flags, and usage recommendations. |
|
|
209
221
|
| GET | `/version` | Current version + latest available from GitHub releases. Includes `update_available` boolean. Caches GitHub check for 15 minutes. |
|
|
210
222
|
| 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`. |
|
|
@@ -554,6 +566,7 @@ Multi-host management: remote hosts register via heartbeat and are tracked by st
|
|
|
554
566
|
| POST | `/board-health/rollback/:actionId` | Rollback an automated action within the rollback window. Body: `{ by? }`. |
|
|
555
567
|
| PATCH | `/board-health/config` | Update worker config at runtime. Fields: enabled, intervalMs, staleDoingThresholdMin, suggestCloseThresholdMin, rollbackWindowMs, digestIntervalMs, digestChannel, quietHoursStart, quietHoursEnd, dryRun, maxActionsPerTick. |
|
|
556
568
|
| POST | `/board-health/prune` | Prune old audit log entries. Query: `?maxAgeDays=7`. |
|
|
569
|
+
| POST | `/board-health/quiet-window` | Reset the quiet window — suppresses ready-queue alerts for `restartQuietWindowMs` (default 5 min). Call after gateway restart/reconnect. |
|
|
557
570
|
| 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. |
|
|
558
571
|
| GET | `/policy` | Get unified policy config (quiet hours, idle nudge, cadence watchdog, board health, escalation thresholds). |
|
|
559
572
|
| PATCH | `/policy` | Update policy config at runtime (deep-merged, persisted to ~/.reflectt/policy.json). Propagates to running workers. |
|
|
@@ -865,6 +878,10 @@ Set via `reflectionNudge` in policy config:
|
|
|
865
878
|
| GET | `/usage/caps` | List active spend caps with current utilization status. |
|
|
866
879
|
| POST | `/usage/caps` | Create spend cap. Body: `{ scope: "global"\|"agent"\|"team", scope_id?, period: "daily"\|"weekly"\|"monthly", limit_usd, action: "warn"\|"throttle"\|"block" }`. |
|
|
867
880
|
| DELETE | `/usage/caps/:id` | Delete a spend cap. |
|
|
881
|
+
| GET | `/agents/:agentId/spend` | Get current spend totals for a specific agent. Returns `{ agentId, totalCost, inputTokens, outputTokens, periodStart }`. |
|
|
882
|
+
| POST | `/agents/:agentId/enforce-cost` | Trigger cost enforcement check for agent. Evaluates active caps and applies configured action (warn/throttle/block). Body: `{}`. |
|
|
883
|
+
| POST | `/usage/record` | Record a single usage event. Body: `{ agentId, inputTokens, outputTokens, cost?, model?, taskId? }`. |
|
|
884
|
+
| POST | `/usage/purge` | Purge old usage records. Body: `{ maxAgeDays? }` (default 90). |
|
|
868
885
|
| GET | `/usage/routing-suggestions` | Smart routing savings suggestions (which low-stakes categories could use cheaper models). Query: `since`. |
|
|
869
886
|
| GET | `/costs` | Cost dashboard — aggregated spend for COO/PM monitoring. Query: `days` (1–90, default 7). Returns: `daily_by_model` (spend per model per day), `daily_totals` (per-day rolled-up for threshold alerting), `avg_cost_by_lane` (avg cost per closed task by `qa_bundle.lane`, 30-day floor), `avg_cost_by_agent` (avg cost per closed task per agent + `top_model`, 30-day floor), `top_tasks_by_cost` (top 20 most expensive tasks in window), `summary` (total tokens + cost), `lane_agent_window_days` (actual window used for lane/agent averages). |
|
|
870
887
|
|
|
@@ -1064,6 +1081,118 @@ Auth-gated endpoints for managing a reflectt-node instance remotely. Provide `RE
|
|
|
1064
1081
|
| POST | `/manage/restart` | Graceful restart. Works with Docker, systemd, and reflectt CLI (PID file). Returns 501 if unsupported. |
|
|
1065
1082
|
| GET | `/manage/disk` | Data directory sizes for capacity monitoring |
|
|
1066
1083
|
|
|
1084
|
+
### Agent Runs & Events
|
|
1085
|
+
|
|
1086
|
+
| Method | Path | Description |
|
|
1087
|
+
|--------|------|-------------|
|
|
1088
|
+
| POST | `/agents/:agentId/runs` | Create a new agent run. Body: `{ objective, teamId?, taskId?, parentRunId? }` |
|
|
1089
|
+
| GET | `/agents/:agentId/runs` | List runs. Query: `?status=&teamId=&limit=` |
|
|
1090
|
+
| GET | `/agents/:agentId/runs/current` | Get active (non-terminal) run. Query: `?teamId=` |
|
|
1091
|
+
| PATCH | `/agents/:agentId/runs/:runId` | Update run. Body: `{ status?, contextSnapshot?, artifacts? }` |
|
|
1092
|
+
| POST | `/agents/:agentId/events` | Append an event (immutable). Body: `{ eventType, runId?, payload? }` |
|
|
1093
|
+
| GET | `/agents/:agentId/events` | List events. Query: `?runId=&type=&since=&limit=` |
|
|
1094
|
+
| GET | `/approvals/pending` | List pending approvals (review_requested events needing action). Query: `?agentId=&limit=` |
|
|
1095
|
+
| POST | `/approvals/:eventId/decide` | Submit approval decision. Body: `{ decision: "approve"|"reject", reviewer (required), comment? }`. Auto-unblocks run on approve. |
|
|
1096
|
+
| GET | `/agents/:agentId/runs/:runId/stream` | SSE stream for a specific run. Sends snapshot (run + recent events), then real-time events as they occur. Heartbeat every 15s. |
|
|
1097
|
+
| GET | `/agents/:agentId/stream` | SSE stream for all events for an agent. Sends snapshot (active run + recent events), then real-time events. Heartbeat every 15s. |
|
|
1098
|
+
| GET | `/workflows` | List available workflow templates. |
|
|
1099
|
+
| GET | `/workflows/:id` | Get template details (name, description, steps). |
|
|
1100
|
+
| POST | `/workflows/:id/run` | Execute a workflow. Body: `{ agentId?, teamId?, objective?, taskId?, reviewer?, prUrl?, title?, urgency?, nextOwner?, summary? }`. Returns step-by-step results with timing. Currently available: `pr-review` (6 steps: create → work → review → approve → handoff → complete). |
|
|
1101
|
+
| POST | `/canvas/input` | Human→agent control seam for Presence Layer. Body: `{ action: "decision"\|"interrupt"\|"pause"\|"resume"\|"mute"\|"unmute", actor (required), targetRunId?, decisionId?, choice?: "approve"\|"deny"\|"defer", comment? }`. Emits canvas_input SSE event. |
|
|
1102
|
+
| GET | `/canvas/input/schema` | Discovery: lists valid actions and field descriptions for canvas input. |
|
|
1103
|
+
| POST | `/canvas/state` | Agent emits Presence Layer state transition. Body: `{ state: "floor"\|"listening"\|"thinking"\|"rendering"\|"ambient"\|"decision"\|"urgent"\|"handoff", sensors: null\|"mic"\|"camera"\|"mic+camera", agentId (required), payload?: { text?, media?, decision?: { question, decisionId, expiresAt?, autoAction? }, agents?: [{ name, state, task? }], summary?: { headline, items?, cost?, duration? } } }`. Emits canvas_render SSE event. |
|
|
1104
|
+
| GET | `/canvas/state` | Current Presence Layer state for agents. Params: `agentId?` (single agent) or all agents. |
|
|
1105
|
+
| GET | `/canvas/states` | Discovery: valid states, sensors, and payload schema. |
|
|
1106
|
+
| GET | `/agents/:agentId/config` | Get agent config (model preference, cost caps, settings). |
|
|
1107
|
+
| PUT | `/agents/:agentId/config` | Upsert agent config. Body: `{ model?, fallbackModel?, costCapDaily?, costCapMonthly?, maxTokensPerCall?, teamId?, settings? }`. |
|
|
1108
|
+
| DELETE | `/agents/:agentId/config` | Remove agent config. |
|
|
1109
|
+
| GET | `/agent-configs` | List all agent configs. Params: `teamId?`. |
|
|
1110
|
+
| GET | `/agents/:agentId/cost-check` | Runtime cost enforcement check. Params: `dailySpend?`, `monthlySpend?`. Returns: allowed, action (allow\|warn\|downgrade\|deny), remaining budgets, model/fallback. |
|
|
1111
|
+
| POST | `/events/routing/validate` | Validate routing semantics for an event payload. Body: `{ eventType, payload }`. Returns: valid, errors[], warnings[]. Actionable events (review_requested, approval_requested, escalation, handoff) require: action_required, urgency (low\|normal\|high\|critical), owner. |
|
|
1112
|
+
| GET | `/agents/:name/identity` | Host-native agent identity resolution. Resolves by name, alias, or display name without requiring OpenClaw gateway. Returns: agentId, displayName, role, aliases, capabilities, model, costCap. Merges YAML roles + agent_config table. |
|
|
1113
|
+
| POST | `/agents/:agentId/messages/send` | Send message to another agent. Body: `{ to (required), content (required), channel?, metadata? }`. Emits message_posted SSE event. |
|
|
1114
|
+
| GET | `/agents/:agentId/messages` | Inbox — list messages for an agent. Params: `channel?`, `unread?` (true), `since?`, `limit?`. Returns messages + unreadCount. |
|
|
1115
|
+
| GET | `/agents/:agentId/messages/sent` | Sent messages. Params: `limit?`. |
|
|
1116
|
+
| POST | `/agents/:agentId/messages/read` | Mark messages as read. Body: `{ messageIds?: string[] }` (omit for mark all). |
|
|
1117
|
+
| GET | `/messages/channel/:channel` | List messages in a channel. Params: `since?`, `limit?`. |
|
|
1118
|
+
| GET | `/runs/retention/stats` | Preview retention: total runs, terminal runs, how many would be archived. Params: `maxAgeDays?`, `maxCompletedRuns?`. |
|
|
1119
|
+
| POST | `/runs/retention/apply` | Apply retention policy. Body: `{ maxAgeDays? (default 30), maxCompletedRuns? (default 100), deleteArchived? (default false), agentId?, dryRun? }`. Returns: archived, deleted, eventsDeleted counts. |
|
|
1120
|
+
| POST | `/agents/:agentId/artifacts` | Upload artifact. Body: `{ name (required), content (required), encoding? ("base64"), mimeType?, runId?, taskId?, metadata? }`. Stores file on disk + metadata in DB. |
|
|
1121
|
+
| GET | `/agents/:agentId/artifacts` | List artifacts for agent. Params: `runId?`, `taskId?`, `limit?`. Returns artifacts + usage. |
|
|
1122
|
+
| GET | `/artifacts/:artifactId` | Get artifact metadata. |
|
|
1123
|
+
| GET | `/artifacts/:artifactId/content` | Download artifact content (returns file with correct MIME type). |
|
|
1124
|
+
| DELETE | `/artifacts/:artifactId` | Delete artifact (removes file + DB row). |
|
|
1125
|
+
| GET | `/agents/:agentId/storage` | Get storage usage (totalBytes, count). |
|
|
1126
|
+
| POST | `/webhooks/ingest` | Store inbound webhook payload. Body: `{ source (required), eventType (required), body (required), agentId? }`. Captures request headers automatically. |
|
|
1127
|
+
| GET | `/webhooks/payloads` | List stored payloads. Params: `source?`, `agentId?`, `unprocessed?` (true), `since?`, `limit?`. Returns payloads + unprocessedCount. |
|
|
1128
|
+
| GET | `/webhooks/payloads/:payloadId` | Get single payload with full body + headers. |
|
|
1129
|
+
| POST | `/webhooks/payloads/:payloadId/process` | Mark payload as processed. |
|
|
1130
|
+
| POST | `/webhooks/purge` | Delete old processed payloads. Body: `{ maxAgeDays? }` (default 30). |
|
|
1131
|
+
| POST | `/agents/:agent/waiting` | Set agent to waiting state (blocked on human). Body: `{ reason (required), waitingFor?, taskId?, expiresAt? }`. Shows in heartbeat response. |
|
|
1132
|
+
| DELETE | `/agents/:agent/waiting` | Clear waiting state — agent is unblocked. |
|
|
1133
|
+
| GET | `/approval-queue` | Unified approval queue — everything needing human decision. Params: `agentId?`, `category?` (review\|agent_action), `includeExpired?` (true), `limit?`. Returns: items[], count, hasExpired. Each item: id, category, title, description, urgency, owner, expiresAt, autoAction, isExpired. |
|
|
1134
|
+
| POST | `/approval-queue/:approvalId/decide` | Resolve an approval. Body: `{ decision: "approve"\|"reject"\|"defer", actor (required), comment? }`. Emits canvas_input SSE event. |
|
|
1135
|
+
| POST | `/email/send` | Send email via cloud relay. Body: `{ from, to, subject, html/text (required), replyTo?, cc?, bcc?, agentId?, teamId? }`. Requires cloud connection. |
|
|
1136
|
+
| POST | `/sms/send` | Send SMS via cloud relay. Body: `{ to, body (required), from?, agentId?, teamId? }`. Requires cloud connection. |
|
|
1137
|
+
|
|
1138
|
+
**Run statuses**: `idle`, `working`, `blocked`, `waiting_review`, `completed`, `failed`, `cancelled`
|
|
1139
|
+
|
|
1140
|
+
**Event types**: `run_created`, `task_attached`, `tool_invoked`, `artifact_produced`, `review_requested`, `review_approved`, `review_rejected`, `blocked`, `handed_off`, `completed`, `failed`
|
|
1141
|
+
|
|
1142
|
+
### Agent Memories
|
|
1143
|
+
|
|
1144
|
+
Persistent key-value store with tags, namespaces, and expiration. Survives node restarts.
|
|
1145
|
+
|
|
1146
|
+
| Method | Path | Description |
|
|
1147
|
+
|--------|------|-------------|
|
|
1148
|
+
| PUT | `/agents/:agentId/memories` | Set (upsert) a memory. Body: `{ key, content, namespace?, tags?, expiresAt? }` |
|
|
1149
|
+
| GET | `/agents/:agentId/memories/:key` | Get a memory by key. Query: `?namespace=` |
|
|
1150
|
+
| GET | `/agents/:agentId/memories` | List memories. Query: `?namespace=&tag=&search=&limit=` |
|
|
1151
|
+
| DELETE | `/agents/:agentId/memories/:key` | Delete a memory by key. Query: `?namespace=` |
|
|
1152
|
+
| GET | `/agents/:agentId/memories/count` | Count memories. Query: `?namespace=` |
|
|
1153
|
+
| POST | `/agents/memories/purge` | Purge all expired memories (housekeeping) |
|
|
1154
|
+
|
|
1155
|
+
Events are **append-only** — no updates, no deletes.
|
|
1156
|
+
|
|
1157
|
+
### Browser Capability
|
|
1158
|
+
|
|
1159
|
+
| Method | Path | Description |
|
|
1160
|
+
|--------|------|-------------|
|
|
1161
|
+
| GET | `/browser/config` | Browser capability config (limits, viewport, idle timeout) |
|
|
1162
|
+
| POST | `/browser/sessions` | Create isolated browser session. Body: `{ agent, url?, headless?, viewport? }` |
|
|
1163
|
+
| GET | `/browser/sessions` | List all sessions |
|
|
1164
|
+
| GET | `/browser/sessions/:id` | Get session details |
|
|
1165
|
+
| DELETE | `/browser/sessions/:id` | Close session |
|
|
1166
|
+
| POST | `/browser/sessions/:id/act` | Natural language action. Body: `{ instruction }` |
|
|
1167
|
+
| POST | `/browser/sessions/:id/extract` | Extract data. Body: `{ instruction, schema? }` |
|
|
1168
|
+
| POST | `/browser/sessions/:id/observe` | Discover actions. Body: `{ instruction }` |
|
|
1169
|
+
| POST | `/browser/sessions/:id/navigate` | Go to URL. Body: `{ url }` |
|
|
1170
|
+
| GET | `/browser/sessions/:id/screenshot` | Screenshot as base64 PNG |
|
|
1171
|
+
|
|
1172
|
+
**Example: Create session and act**
|
|
1173
|
+
|
|
1174
|
+
```bash
|
|
1175
|
+
# Create a session
|
|
1176
|
+
SESSION=$(curl -s -X POST http://127.0.0.1:4445/browser/sessions \
|
|
1177
|
+
-H 'Content-Type: application/json' \
|
|
1178
|
+
-d '{"agent":"link","url":"https://example.com"}' | jq -r .id)
|
|
1179
|
+
|
|
1180
|
+
# Act on the page
|
|
1181
|
+
curl -s -X POST "http://127.0.0.1:4445/browser/sessions/$SESSION/act" \
|
|
1182
|
+
-H 'Content-Type: application/json' \
|
|
1183
|
+
-d '{"instruction":"click the More Information link"}'
|
|
1184
|
+
|
|
1185
|
+
# Extract data
|
|
1186
|
+
curl -s -X POST "http://127.0.0.1:4445/browser/sessions/$SESSION/extract" \
|
|
1187
|
+
-H 'Content-Type: application/json' \
|
|
1188
|
+
-d '{"instruction":"extract the main heading text"}'
|
|
1189
|
+
|
|
1190
|
+
# Close when done
|
|
1191
|
+
curl -s -X DELETE "http://127.0.0.1:4445/browser/sessions/$SESSION"
|
|
1192
|
+
```
|
|
1193
|
+
|
|
1194
|
+
Sessions auto-close after 5 minutes of inactivity. Max 3 concurrent sessions, 10 per agent per hour.
|
|
1195
|
+
|
|
1067
1196
|
### Example: Check Remote Node Status
|
|
1068
1197
|
|
|
1069
1198
|
```bash
|