@rubytech/create-realagent-code 0.1.603 → 0.1.605

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.
Files changed (133) hide show
  1. package/dist/__tests__/email-sampler-unit.test.js +22 -0
  2. package/dist/index.js +3 -0
  3. package/dist/port-resolution.js +9 -1
  4. package/package.json +1 -1
  5. package/payload/platform/lib/routine-templates/dist/roster.d.ts +46 -2
  6. package/payload/platform/lib/routine-templates/dist/roster.d.ts.map +1 -1
  7. package/payload/platform/lib/routine-templates/dist/roster.js +84 -32
  8. package/payload/platform/lib/routine-templates/dist/roster.js.map +1 -1
  9. package/payload/platform/lib/routine-templates/src/__tests__/roster.test.ts +0 -0
  10. package/payload/platform/lib/routine-templates/src/__tests__/seed.test.ts +48 -2
  11. package/payload/platform/lib/routine-templates/src/roster.ts +133 -35
  12. package/payload/platform/lib/telegram-store-read/dist/index.d.ts +59 -0
  13. package/payload/platform/lib/telegram-store-read/dist/index.d.ts.map +1 -0
  14. package/payload/platform/lib/telegram-store-read/dist/index.js +219 -0
  15. package/payload/platform/lib/telegram-store-read/dist/index.js.map +1 -0
  16. package/payload/platform/lib/telegram-store-read/src/__tests__/fold.test.ts +124 -0
  17. package/payload/platform/lib/telegram-store-read/src/index.ts +262 -0
  18. package/payload/platform/lib/telegram-store-read/tsconfig.json +9 -0
  19. package/payload/platform/lib/telegram-store-read/vitest.config.ts +9 -0
  20. package/payload/platform/package.json +2 -2
  21. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +39 -6
  22. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +11 -0
  23. package/payload/platform/plugins/connector/PLUGIN.md +9 -1
  24. package/payload/platform/plugins/connector/mcp/dist/__tests__/queue-descriptor.test.d.ts +2 -0
  25. package/payload/platform/plugins/connector/mcp/dist/__tests__/queue-descriptor.test.d.ts.map +1 -0
  26. package/payload/platform/plugins/connector/mcp/dist/__tests__/queue-descriptor.test.js +67 -0
  27. package/payload/platform/plugins/connector/mcp/dist/__tests__/queue-descriptor.test.js.map +1 -0
  28. package/payload/platform/plugins/connector/mcp/dist/index.js +36 -5
  29. package/payload/platform/plugins/connector/mcp/dist/index.js.map +1 -1
  30. package/payload/platform/plugins/connector/mcp/dist/lib/store.d.ts +35 -0
  31. package/payload/platform/plugins/connector/mcp/dist/lib/store.d.ts.map +1 -1
  32. package/payload/platform/plugins/connector/mcp/dist/lib/store.js +33 -0
  33. package/payload/platform/plugins/connector/mcp/dist/lib/store.js.map +1 -1
  34. package/payload/platform/plugins/connector/mcp/package.json +4 -2
  35. package/payload/platform/plugins/connector/mcp/vitest.config.ts +8 -0
  36. package/payload/platform/plugins/docs/references/admin-ui.md +2 -2
  37. package/payload/platform/plugins/docs/references/outlook-guide.md +21 -2
  38. package/payload/platform/plugins/docs/references/telegram-guide.md +15 -1
  39. package/payload/platform/plugins/email/PLUGIN.md +14 -1
  40. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/retention.test.d.ts +2 -0
  41. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/retention.test.d.ts.map +1 -0
  42. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/retention.test.js +233 -0
  43. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/retention.test.js.map +1 -0
  44. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/sample-mailbox.test.js +30 -0
  45. package/payload/platform/plugins/email/mcp/dist/sampler/__tests__/sample-mailbox.test.js.map +1 -1
  46. package/payload/platform/plugins/email/mcp/dist/sampler/main.js +68 -3
  47. package/payload/platform/plugins/email/mcp/dist/sampler/main.js.map +1 -1
  48. package/payload/platform/plugins/email/mcp/dist/sampler/retention-sources.d.ts +3 -0
  49. package/payload/platform/plugins/email/mcp/dist/sampler/retention-sources.d.ts.map +1 -0
  50. package/payload/platform/plugins/email/mcp/dist/sampler/retention-sources.js +146 -0
  51. package/payload/platform/plugins/email/mcp/dist/sampler/retention-sources.js.map +1 -0
  52. package/payload/platform/plugins/email/mcp/dist/sampler/retention.d.ts +150 -0
  53. package/payload/platform/plugins/email/mcp/dist/sampler/retention.d.ts.map +1 -0
  54. package/payload/platform/plugins/email/mcp/dist/sampler/retention.js +199 -0
  55. package/payload/platform/plugins/email/mcp/dist/sampler/retention.js.map +1 -0
  56. package/payload/platform/plugins/email/mcp/dist/sampler/sample-mailbox.d.ts +5 -0
  57. package/payload/platform/plugins/email/mcp/dist/sampler/sample-mailbox.d.ts.map +1 -1
  58. package/payload/platform/plugins/email/mcp/dist/sampler/sample-mailbox.js +10 -5
  59. package/payload/platform/plugins/email/mcp/dist/sampler/sample-mailbox.js.map +1 -1
  60. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.js +11 -0
  61. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.js.map +1 -1
  62. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
  63. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +8 -0
  64. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
  65. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sample-outlook-mailbox.test.d.ts +2 -0
  66. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sample-outlook-mailbox.test.d.ts.map +1 -0
  67. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sample-outlook-mailbox.test.js +324 -0
  68. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sample-outlook-mailbox.test.js.map +1 -0
  69. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-cursor.test.d.ts +2 -0
  70. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-cursor.test.d.ts.map +1 -0
  71. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-cursor.test.js +102 -0
  72. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-cursor.test.js.map +1 -0
  73. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-enumerate.test.d.ts +2 -0
  74. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-enumerate.test.d.ts.map +1 -0
  75. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-enumerate.test.js +125 -0
  76. package/payload/platform/plugins/outlook/mcp/dist/__tests__/sampler-enumerate.test.js.map +1 -0
  77. package/payload/platform/plugins/outlook/mcp/dist/sampler/arm.d.ts +2 -0
  78. package/payload/platform/plugins/outlook/mcp/dist/sampler/arm.d.ts.map +1 -0
  79. package/payload/platform/plugins/outlook/mcp/dist/sampler/arm.js +109 -0
  80. package/payload/platform/plugins/outlook/mcp/dist/sampler/arm.js.map +1 -0
  81. package/payload/platform/plugins/outlook/mcp/dist/sampler/cursor.d.ts +25 -0
  82. package/payload/platform/plugins/outlook/mcp/dist/sampler/cursor.d.ts.map +1 -0
  83. package/payload/platform/plugins/outlook/mcp/dist/sampler/cursor.js +94 -0
  84. package/payload/platform/plugins/outlook/mcp/dist/sampler/cursor.js.map +1 -0
  85. package/payload/platform/plugins/outlook/mcp/dist/sampler/enumerate.d.ts +41 -0
  86. package/payload/platform/plugins/outlook/mcp/dist/sampler/enumerate.d.ts.map +1 -0
  87. package/payload/platform/plugins/outlook/mcp/dist/sampler/enumerate.js +122 -0
  88. package/payload/platform/plugins/outlook/mcp/dist/sampler/enumerate.js.map +1 -0
  89. package/payload/platform/plugins/outlook/mcp/dist/sampler/sample-outlook-mailbox.d.ts +73 -0
  90. package/payload/platform/plugins/outlook/mcp/dist/sampler/sample-outlook-mailbox.d.ts.map +1 -0
  91. package/payload/platform/plugins/outlook/mcp/dist/sampler/sample-outlook-mailbox.js +162 -0
  92. package/payload/platform/plugins/outlook/mcp/dist/sampler/sample-outlook-mailbox.js.map +1 -0
  93. package/payload/platform/plugins/scheduling/PLUGIN.md +8 -1
  94. package/payload/platform/plugins/scheduling/mcp/dist/index.js +1 -1
  95. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  96. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-flag.test.d.ts +2 -0
  97. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-flag.test.d.ts.map +1 -0
  98. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-flag.test.js +90 -0
  99. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-flag.test.js.map +1 -0
  100. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.js +26 -4
  101. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.js.map +1 -1
  102. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate-flag.d.ts +78 -0
  103. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate-flag.d.ts.map +1 -0
  104. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate-flag.js +76 -0
  105. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate-flag.js.map +1 -0
  106. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.d.ts +8 -0
  107. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.d.ts.map +1 -1
  108. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.js +9 -1
  109. package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.js.map +1 -1
  110. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.js +15 -0
  111. package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.js.map +1 -1
  112. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts +12 -1
  113. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts.map +1 -1
  114. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js +34 -1
  115. package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js.map +1 -1
  116. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +9 -1
  117. package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
  118. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.js +40 -0
  119. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.js.map +1 -1
  120. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.js +435 -5
  121. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.js.map +1 -1
  122. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.d.ts.map +1 -1
  123. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js +21 -1
  124. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js.map +1 -1
  125. package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.d.ts +294 -6
  126. package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.d.ts.map +1 -1
  127. package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.js +553 -11
  128. package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.js.map +1 -1
  129. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -1
  130. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  131. package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
  132. package/payload/server/public/operator.html +1 -1
  133. package/payload/server/server.js +69 -5
@@ -1,3 +1,4 @@
1
+ import { type UnflaggedLabel, type UnflaggedSet } from "../lib/gate-flag.js";
1
2
  export interface MailCheck {
2
3
  type: "mail";
3
4
  /** The mailbox address, as stored on its `:EmailAccount` node. */
@@ -72,7 +73,136 @@ export interface GraphCheck {
72
73
  type: "graph";
73
74
  scope: "appointments";
74
75
  }
75
- export type GateCheck = MailCheck | D1Check | WhatsappCheck | CalendarCheck | TelegramCheck | GraphCheck;
76
+ /**
77
+ * Task 2684 — nodes of one label that THIS routine has not yet flagged
78
+ * processed.
79
+ *
80
+ * Every check above compares its source against one stored position, and a
81
+ * position can skip: a record arriving between the probe and the promote sorts
82
+ * below the mark just written and is never reported again (Tasks 2471 / 2654 /
83
+ * 2664). This check holds no position at all. "Outstanding for this routine" is
84
+ * an exact set, so a node the probe did not count is simply still unflagged next
85
+ * fire, and the routine's memory lives on the nodes rather than in a file.
86
+ *
87
+ * `label` is a closed enum for the reason `GraphCheck`'s `scope` is: a label
88
+ * cannot be a Cypher parameter, so it reaches the statement by interpolation.
89
+ * The accepted set is single-sourced in `lib/gate-flag.ts`, which the flag
90
+ * writer resolves through too, so the reader and the writer cannot drift.
91
+ */
92
+ export interface GraphUnflaggedCheck {
93
+ type: "graph-unflagged";
94
+ label: UnflaggedLabel;
95
+ }
96
+ /** Task 2688 — which routine watches a registered connector's queue. */
97
+ export type ConnectorQueueKind = "operational" | "accounting";
98
+ /**
99
+ * Task 2688 — the queue descriptor, as it is held on the connector plugin's own
100
+ * registry record and returned by `connector-list`.
101
+ *
102
+ * Redeclared here rather than imported: no plugin in this tree imports another
103
+ * plugin's source, and the shape arrives as JSON off a tool call. The connector
104
+ * plugin's `queueFromArgs` is the one place the shape is judged at the write;
105
+ * this side only reads what that guard already accepted.
106
+ */
107
+ export interface ConnectorQueue {
108
+ kind: ConnectorQueueKind;
109
+ /** Path under the connector's registered base URL. */
110
+ path: string;
111
+ /** The query parameter that carries the watermark. */
112
+ changedSinceParam: string;
113
+ /** Top-level response field holding the array of changed records. */
114
+ itemsField: string;
115
+ }
116
+ /** One registered connector this check will read. `name` is also its watermark
117
+ * key, because the registry is keyed by it and an account may hold several. */
118
+ export interface ConnectorQueueBinding {
119
+ name: string;
120
+ queue: ConnectorQueue;
121
+ }
122
+ /**
123
+ * Task 2688 — records changed in a connector this account registered, since
124
+ * this routine last woke.
125
+ *
126
+ * `scope` is a KIND of connector, never a connector's name. A shipped routine
127
+ * template can carry no per-account value (Task 2389), so the template names
128
+ * the kind and the account names the queue, once, on the connector's own
129
+ * registry record. That is also why this check has no path and no credential:
130
+ * the connector plugin owns both, along with the host binding and the SSRF
131
+ * guard, and answers on its own tools.
132
+ *
133
+ * It is the only check whose source can fail and still answer "no work". A
134
+ * connector that is not registered, or whose credential is refused, is a fact
135
+ * about the account rather than an outage, and waking a model to rediscover it
136
+ * every fire is what this task removes. Every other failure still counts as
137
+ * work, and each quiet answer writes its own line, because a gate that mutes
138
+ * itself silently is the Task 2313 class.
139
+ */
140
+ export interface ConnectorCheck {
141
+ type: "connector";
142
+ scope: ConnectorQueueKind;
143
+ }
144
+ /**
145
+ * Task 2689 — the memory sweep's own state, for `graph-health`.
146
+ *
147
+ * No fields: an account has exactly one sweep, one orphan queue and one
148
+ * citation queue, so there is nothing to name. What is compared is a digest
149
+ * over the two queue counts and whether the sweep has stopped running, never
150
+ * the newest report's identity — see `digestSweepState`.
151
+ */
152
+ export interface SweepCheck {
153
+ type: "sweep";
154
+ }
155
+ /**
156
+ * Task 2689 — growth under the account's own directory, for
157
+ * `filesystem-health`.
158
+ *
159
+ * A growth threshold rather than a size: the routine reports what ACCUMULATED
160
+ * since it last spoke, and an account that is large and stable has nothing new
161
+ * to say.
162
+ */
163
+ export interface FilesystemCheck {
164
+ type: "filesystem";
165
+ /** Bytes of growth since the last accepted wake. Absent means
166
+ * `FS_DEFAULT_MIN_GROWTH_BYTES`. */
167
+ minGrowthBytes?: number;
168
+ }
169
+ export type GateCheck = MailCheck | D1Check | WhatsappCheck | CalendarCheck | TelegramCheck | GraphCheck | GraphUnflaggedCheck | ConnectorCheck | SweepCheck | FilesystemCheck;
170
+ /**
171
+ * Task 2689 — how long after its newest report the memory sweep counts as
172
+ * stale.
173
+ *
174
+ * The sweep runs hourly and `graph-health`'s own silence condition is "the
175
+ * sweep ran within the past day", so 26 hours gives it two missed runs of slack
176
+ * before the routine is woken.
177
+ */
178
+ export declare const SWEEP_STALE_AFTER_MS: number;
179
+ /**
180
+ * Task 2689 — one week of growth worth a person's attention on a Pi-class disk.
181
+ *
182
+ * The shipped `filesystem-health` template names its threshold explicitly; a
183
+ * gate written by hand that omits the field inherits this.
184
+ */
185
+ export declare const FS_DEFAULT_MIN_GROWTH_BYTES: number;
186
+ /**
187
+ * Task 2689 — the most files one account-directory measurement walks.
188
+ *
189
+ * A bound, not a budget. A directory above it is exactly what
190
+ * `filesystem-health` exists to report, and the walk that stopped there has
191
+ * measured a floor rather than a total, so the check reports work and records
192
+ * no position.
193
+ */
194
+ export declare const FS_WALK_ENTRY_CAP = 200000;
195
+ /**
196
+ * Task 2684 — the most node ids one `graph-unflagged` check hands over per fire.
197
+ *
198
+ * A cap is needed because the ids travel to the dispatcher inside the tool's
199
+ * `structuredContent`, and a routine bound against an account that already holds
200
+ * a large archive would otherwise put every one of them on the wire on its first
201
+ * fire. It fails in the only safe direction: nodes above the cap stay unflagged,
202
+ * so the next fire counts them again and the backlog drains over several fires.
203
+ * Nothing is skipped — that is the whole property this check exists for.
204
+ */
205
+ export declare const UNFLAGGED_ID_CAP = 500;
76
206
  /**
77
207
  * Task 2653 — the accepted `type` values, in one place.
78
208
  *
@@ -82,7 +212,16 @@ export type GateCheck = MailCheck | D1Check | WhatsappCheck | CalendarCheck | Te
82
212
  * time. A second hand-maintained copy is how a type accepted by the writer
83
213
  * becomes a type the prober cannot answer.
84
214
  */
85
- export declare const ACCEPTED_CHECK_TYPES: readonly ["mail", "d1", "whatsapp", "calendar", "telegram", "graph"];
215
+ export declare const ACCEPTED_CHECK_TYPES: readonly ["mail", "d1", "whatsapp", "calendar", "telegram", "graph", "graph-unflagged", "connector", "sweep", "filesystem"];
216
+ /**
217
+ * Task 2688 — the accepted `scope` values on a `connector` check, in one place.
218
+ *
219
+ * The same single-sourcing `ACCEPTED_MAIL_PROVIDERS` has: the probe asks the
220
+ * registry for queues of this kind, and `validateGate` refuses anything outside
221
+ * it at write time. A scope outside the set matches no queue, so the gate would
222
+ * answer quiet on every fire and the routine could never run.
223
+ */
224
+ export declare const ACCEPTED_CONNECTOR_SCOPES: readonly ["operational", "accounting"];
86
225
  /**
87
226
  * Task 2657 — the accepted `provider` values on a `mail` check, in one place.
88
227
  *
@@ -172,6 +311,22 @@ export interface SchedulingGateResult {
172
311
  * a position for it would let the dispatcher advance past work never seen.
173
312
  */
174
313
  observed: GateWatermarks;
314
+ /**
315
+ * Task 2684 — the outstanding nodes each `graph-unflagged` check counted, for
316
+ * the dispatcher to flag once the inject route accepts the wake.
317
+ *
318
+ * The parallel of `observed` for a check whose state is a per-node flag rather
319
+ * than a position, and it travels for the same reason: the value written must
320
+ * be the value the gate read. Re-deriving the set at write time would flag a
321
+ * node that arrived after the probe, marking as handled work no turn was ever
322
+ * given — which is the skip this check type exists to remove.
323
+ *
324
+ * One entry per check that ANSWERED and found something, in `params.checks`
325
+ * order. A check that found nothing has nothing to flag; a check that THREW
326
+ * contributes none for the stronger reason its watermark twin does — it knows
327
+ * nothing about its source, so a set for it would flag nodes never counted.
328
+ */
329
+ unflagged: UnflaggedSet[];
175
330
  }
176
331
  export interface GateWatermarks {
177
332
  /** Keyed `<mailbox>|<folder>`, so two folders of one mailbox never collide. */
@@ -224,6 +379,38 @@ export interface GateWatermarks {
224
379
  graph?: {
225
380
  updatedAt: string;
226
381
  };
382
+ /** Task 2689 — the sweep-state digest the model has already reported on.
383
+ * Not a position in a stream: it is a value that changes when a review queue
384
+ * moves or the sweep stops running, compared exactly as the calendar digest
385
+ * is. */
386
+ sweep?: {
387
+ digest: string;
388
+ };
389
+ /** Task 2689 — the bytes under the account's own directory the model has
390
+ * already reported on. Growth is measured from here, and the dispatcher
391
+ * promotes it only on an accepted wake, so "since the last report" is
392
+ * literal rather than "since the last fire". */
393
+ filesystem?: {
394
+ bytes: number;
395
+ };
396
+ /**
397
+ * Task 2688 — per registered connector, the instant this gate last read that
398
+ * connector's queue.
399
+ *
400
+ * Keyed by connector name because one account may register several, and each
401
+ * is a separate stream: sharing one position would let a quiet connector
402
+ * inherit a mark taken across a busy one, which is the collision the mail
403
+ * watermark's `<mailbox>|<folder>` key exists to avoid.
404
+ *
405
+ * The value is the instant the PROBE started, not a timestamp read off a
406
+ * record, because the descriptor names no per-record timestamp field. A
407
+ * record created while the probe is in flight carries an instant at or after
408
+ * that mark and is therefore reported again on the next fire. Repeat is the
409
+ * safe direction; skip is the Tasks 2471/2654/2664 class.
410
+ */
411
+ connector?: Record<string, {
412
+ changedSince: string;
413
+ }>;
227
414
  /**
228
415
  * Task 2699 — the sorted set of unreachable sources last REPORTED to the
229
416
  * operator, and when it was reported.
@@ -334,6 +521,20 @@ export type MarkSlot = {
334
521
  kind: "calendar";
335
522
  } | {
336
523
  kind: "graph";
524
+ }
525
+ /** Task 2688 — `key` is the registered connector's name. One `connector`
526
+ * check observes one slot per connector of its kind, so a check carries a
527
+ * list of these rather than a single slot. */
528
+ | {
529
+ kind: "connector";
530
+ key: string;
531
+ }
532
+ /** Task 2689 — one sweep and one account directory per account, so neither
533
+ * slot carries a key. */
534
+ | {
535
+ kind: "sweep";
536
+ } | {
537
+ kind: "filesystem";
337
538
  };
338
539
  /**
339
540
  * The name this slot answers to in `advanced` and in `op=commit … positions=`.
@@ -404,14 +605,22 @@ export declare function promoteSlot(slot: MarkSlot, from: GateWatermarks, into:
404
605
  * watermark (`d1`, and `whatsapp` in `status` scope) returns null, because its
405
606
  * answer is a property of the present rather than a position in a stream.
406
607
  */
608
+ export interface ProbeMark {
609
+ slot: MarkSlot;
610
+ write: (m: GateWatermarks) => void;
611
+ }
407
612
  export interface ProbeOutcome {
408
613
  hasWork: boolean;
409
- mark: {
410
- slot: MarkSlot;
411
- write: (m: GateWatermarks) => void;
412
- } | null;
614
+ /** Task 2688 — a LIST is accepted as well as a single mark, because one
615
+ * `connector` check reads one position per registered connector of its kind.
616
+ * Every other check contributes at most one and passes it unchanged. */
617
+ mark: ProbeMark | ProbeMark[] | null;
413
618
  /** Set when the source could not be read; the caller logs it and counts work. */
414
619
  error?: string;
620
+ /** Task 2684 — the outstanding nodes this check counted, for the dispatcher to
621
+ * flag on an accepted wake. Only `graph-unflagged` sets it; it is this
622
+ * check's `mark`, held on the nodes rather than in the watermark file. */
623
+ unflagged?: UnflaggedSet;
415
624
  }
416
625
  /** Every source the four checks read, injectable so each can be tested alone. */
417
626
  export interface GateSources {
@@ -447,7 +656,86 @@ export interface GateSources {
447
656
  graphActivity: (accountId: string, scope: GraphCheck["scope"]) => Promise<{
448
657
  newestActivityAt: string | null;
449
658
  }>;
659
+ /** Task 2684 — up to `limit` ids of nodes carrying `label` that `flagKey` has
660
+ * not yet flagged processed. Ids, not a count: the dispatcher flags exactly
661
+ * this set, so the answer has to name its members. */
662
+ graphUnflagged: (accountId: string, label: UnflaggedLabel, flagKey: string, limit: number) => Promise<{
663
+ ids: string[];
664
+ }>;
665
+ /** Task 2688 — the account's registered connectors carrying a queue of
666
+ * `kind`. `pluginPresent` is false when the connector plugin is not
667
+ * installed at all, which is an ANSWER (nothing registered can have moved)
668
+ * rather than a failure, and is therefore reported rather than thrown. */
669
+ connectorQueues: (accountId: string, kind: ConnectorQueueKind) => Promise<{
670
+ pluginPresent: boolean;
671
+ bindings: ConnectorQueueBinding[];
672
+ }>;
673
+ /** Task 2688 — one queue read. Returns the HTTP status the connector answered
674
+ * and how many records it listed above `changedSince`. `truncated` is the
675
+ * connector capping the body: the records cannot be counted, but the cap
676
+ * itself is proof the queue moved, so `items` is 0 and the probe treats it
677
+ * as work. Throws on a transport failure, a body that is not JSON, or an
678
+ * items field that is not an array, each of which the probe counts as work
679
+ * through the error arm. */
680
+ connectorQueueRead: (accountId: string, binding: ConnectorQueueBinding, changedSince: string) => Promise<{
681
+ status: number;
682
+ items: number;
683
+ truncated: boolean;
684
+ }>;
685
+ /** Task 2689 — the memory sweep's newest report instant, or null when it has
686
+ * never run, plus the two review-queue counts. One timestamp and two
687
+ * numbers, no content — the contract every probe here carries. */
688
+ sweepState: (accountId: string) => Promise<{
689
+ newestReportAt: string | null;
690
+ orphans: number;
691
+ citations: number;
692
+ }>;
693
+ /** Task 2689 — the bytes under the account's own directory, and whether the
694
+ * walk stopped at its cap. A capped answer is a floor, not a total. */
695
+ filesystemBytes: (accountId: string) => Promise<{
696
+ bytes: number;
697
+ capped: boolean;
698
+ }>;
450
699
  }
700
+ /**
701
+ * Task 2689 — the memory sweep's state as one comparable value.
702
+ *
703
+ * The two review-queue counts and a staleness flag, never the newest report's
704
+ * identity. The sweep runs hourly and `graph-health` is proposed weekly, so a
705
+ * digest carrying the report id would differ on essentially every fire and the
706
+ * gate could never go quiet. A digest over the queue counts alone would go
707
+ * quiet correctly, but a sweep that STOPPED running moves no queue, so the
708
+ * routine could never report the one failure it exists to catch. The flag gives
709
+ * both: a constant value while the sweep is healthy, one change at the
710
+ * transition into staleness, and one more on the way out.
711
+ *
712
+ * `now` is a parameter rather than a `Date.now()` read inside, so the boundary
713
+ * is testable without moving the clock. A `newestReportAt` this cannot parse
714
+ * throws, through `instantOf`, and a throw counts as work.
715
+ */
716
+ export declare function digestSweepState(state: {
717
+ newestReportAt: string | null;
718
+ orphans: number;
719
+ citations: number;
720
+ }, now: number): string;
721
+ /**
722
+ * Task 2689 — total bytes of the regular files under `root`.
723
+ *
724
+ * A symlink is never followed, so the walk cannot leave the account directory
725
+ * even when something inside points out of it — the rule the filesystem
726
+ * plugin's own walker holds to, and the reason this does not shell out to `du`.
727
+ *
728
+ * A vanished entry (`ENOENT` on a stat, or on a nested directory read) is
729
+ * SKIPPED: an account directory is written to continuously, and a file deleted
730
+ * between the read and the stat contributes nothing to a size. Every other
731
+ * error propagates. The ROOT is read outside that rule, so a missing account
732
+ * directory throws: a wrongly derived root that read zero would answer "nothing
733
+ * grew" for ever, which is the permanent mute this design forbids.
734
+ */
735
+ export declare function measureAccountBytes(root: string, cap: number): {
736
+ bytes: number;
737
+ capped: boolean;
738
+ };
451
739
  /**
452
740
  * D1: the first column of the first row of a single count query.
453
741
  *
@@ -1 +1 @@
1
- {"version":3,"file":"scheduling-gate.d.ts","sourceRoot":"","sources":["../../src/tools/scheduling-gate.ts"],"names":[],"mappings":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