@myclaw163/clawclaw-cli 0.8.26 → 0.8.27
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/docs/custom-modules/README.md +3 -0
- package/docs/custom-modules/api-reference.md +43 -1
- package/docs/custom-modules/behavior.md +3 -0
- package/docs/custom-modules/examples/task-reminder.ts +17 -0
- package/docs/custom-modules/perception.md +7 -1
- package/docs/custom-modules/reminders.md +147 -0
- package/package.json +1 -1
- package/skills/clawclaw/SKILL.md +21 -16
- package/skills/clawclaw/references/BEHAVIORS.md +2 -2
- package/skills/clawclaw/references/CUSTOM-BEHAVIOR-DEVELOPMENT.md +3 -0
- package/skills/clawclaw/references/CUSTOM-MODULE-API.md +43 -1
- package/skills/clawclaw/references/CUSTOM-MODULES.md +3 -0
- package/skills/clawclaw/references/CUSTOM-PERCEPTION-DEVELOPMENT.md +11 -5
- package/skills/clawclaw/references/CUSTOM-REMINDER-DEVELOPMENT.md +147 -0
- package/skills/clawclaw/references/HUB.md +14 -0
- package/skills/clawclaw/references/TACTICS.md +17 -15
- package/src/cli.ts +2 -14
- package/src/commands/capability.ts +5 -2
- package/src/commands/hub.ts +5 -4
- package/src/commands/load.ts +13 -1
- package/src/lib/capability-cloud-sync.ts +11 -2
- package/src/lib/capability-load-diagnostics.ts +1 -1
- package/src/lib/command-error.ts +22 -0
- package/src/lib/hub-client.ts +26 -2
- package/src/lib/hub-errors.ts +60 -0
- package/src/lib/perception-config.ts +1 -1
- package/src/runtime/clawclaw/owner.ts +3 -1
- package/src/runtime/clawclaw/plugins/assembly.ts +17 -2
- package/src/runtime/clawclaw/plugins/behavior-input-source.ts +10 -0
- package/src/runtime/clawclaw/plugins/derived-event/reminder-plugin.ts +137 -0
- package/src/runtime/clawclaw/plugins/derived-event/reminder-rules.ts +1 -0
- package/src/runtime/clawclaw/plugins/derived-event/reminder-runner.ts +59 -0
- package/src/runtime/clawclaw/plugins/derived-event/reminder-worker.ts +33 -0
- package/src/runtime/clawclaw/plugins/mailbox/agent-mailbox-coordinator.ts +7 -3
- package/src/runtime/clawclaw/plugins/perception/perception-plugin.ts +1 -1
- package/src/runtime/clawclaw/plugins/perception/perception-source.ts +17 -1
- package/src/runtime/clawclaw/reminder-manifest.ts +28 -0
- package/src/runtime/clawclaw/runtime.ts +3 -0
- package/src/runtime/clawclaw-event-catalog.ts +4 -1
- package/src/runtime/framework/events/event-repository.ts +1 -0
- package/src/runtime/framework/events/memory-event-repository.ts +14 -0
- package/src/runtime/framework/events/sqlite-event-repository.ts +16 -0
- package/src/runtime/framework/events/types.ts +6 -0
- package/src/runtime/framework/persistence/memory-first-persistence.ts +3 -0
- package/src/runtime/framework/plugins/contracts.ts +3 -0
- package/src/runtime/framework/plugins/runtime-plugin-scheduler.ts +19 -0
- package/src/runtime/framework/runtime.ts +1 -0
- package/src/sdk/perception-plugin/index.ts +2 -0
- package/src/sdk/perception-plugin/reminder-rules.ts +41 -0
- package/src/sdk/perception-plugin/reminder.ts +40 -0
|
@@ -46,6 +46,7 @@ export type ClawclawRuntimeOptions = Omit<
|
|
|
46
46
|
durableStateSnapshot?: AtomicJsonAgentStateSnapshotStore<Record<string, any>> | false;
|
|
47
47
|
/** Frozen delivery policy for visual Events produced by Perception. */
|
|
48
48
|
visualEventDelivery?: ClawclawVisualEventDelivery;
|
|
49
|
+
reminderDelivery?: boolean;
|
|
49
50
|
/** Visual Event types declared by the selected perception modules. */
|
|
50
51
|
visualEventTypes?: readonly string[];
|
|
51
52
|
/** Event types declared by enabled Intent and Strategy modules at startup. */
|
|
@@ -95,6 +96,7 @@ export function createClawclawRuntime(
|
|
|
95
96
|
stateFreshnessPolicy: configuredFreshness = {},
|
|
96
97
|
stateFreshnessPolicyResolver: configuredResolver,
|
|
97
98
|
visualEventDelivery,
|
|
99
|
+
reminderDelivery,
|
|
98
100
|
visualEventTypes,
|
|
99
101
|
behaviorEventTypes,
|
|
100
102
|
...runtimeOptions
|
|
@@ -143,6 +145,7 @@ export function createClawclawRuntime(
|
|
|
143
145
|
accountId: getRuntimeAccountId(profile),
|
|
144
146
|
eventCatalog: createClawclawEventCatalog({
|
|
145
147
|
visualEventDelivery,
|
|
148
|
+
reminderDelivery,
|
|
146
149
|
visualEventTypes,
|
|
147
150
|
behaviorEventTypes,
|
|
148
151
|
}),
|
|
@@ -30,6 +30,8 @@ export type ClawclawVisualEventDelivery = EventDeliveryClass
|
|
|
30
30
|
| Readonly<Partial<Record<string, EventDeliveryClass>>>;
|
|
31
31
|
|
|
32
32
|
export interface ClawclawEventCatalogOptions {
|
|
33
|
+
/** Task changes start hidden until their ordered reminder rule resolves delivery. */
|
|
34
|
+
reminderDelivery?: boolean;
|
|
33
35
|
/** Defaults to monitor_and_events so visual facts wake the default Agent surface. */
|
|
34
36
|
visualEventDelivery?: ClawclawVisualEventDelivery;
|
|
35
37
|
/** Additional visual Event types declared by selected user perception modules. */
|
|
@@ -267,7 +269,8 @@ function entries(options: ClawclawEventCatalogOptions = {}): EventCatalogEntry[]
|
|
|
267
269
|
...CLAWCLAW_LOCAL_AGENT_EVENT_TYPES.map((type) => ({
|
|
268
270
|
type,
|
|
269
271
|
producer: 'local_synth' as const,
|
|
270
|
-
deliveryClass: '
|
|
272
|
+
deliveryClass: options.reminderDelivery && type === 'tasks_changed'
|
|
273
|
+
? 'internal_only' as const : 'monitor_and_events' as const,
|
|
271
274
|
})),
|
|
272
275
|
...CLAWCLAW_INTERNAL_BACKEND_EVENT_TYPES.map((type) => ({
|
|
273
276
|
type,
|
|
@@ -28,6 +28,7 @@ export interface EventRepository {
|
|
|
28
28
|
latestScope(account: EventAccountScope, options?: LatestEventScopeOptions): CurrentEventScope | null;
|
|
29
29
|
|
|
30
30
|
commitEvent(request: CommitEventRequest): CommitEventResult;
|
|
31
|
+
resolveEventDelivery(decision: import('./types.js').EventDeliveryDecision): void;
|
|
31
32
|
eventById(eventId: string): CanonicalEvent | null;
|
|
32
33
|
latestEventByType(sessionId: string, type: string, segmentId?: string): CanonicalEvent | null;
|
|
33
34
|
highWaterCommitSeq(sessionId: string, segmentId?: string): number;
|
|
@@ -292,6 +292,20 @@ export class MemoryEventRepository implements EventRepository, MailboxRepository
|
|
|
292
292
|
return segment ? { session: cloneRecord(session), segment: cloneRecord(segment) } : null;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
resolveEventDelivery(decision: import('./types.js').EventDeliveryDecision): void {
|
|
296
|
+
const event = this.events.get(decision.eventId);
|
|
297
|
+
if (!event) throw new Error('Unknown delivery decision Event.');
|
|
298
|
+
if (event.deliveryClass === decision.deliveryClass) return;
|
|
299
|
+
const rows = [...this.deliveries.entries()].filter(([, row]) => row.eventId === event.eventId);
|
|
300
|
+
if (rows.some(([, row]) => row.monitorAttemptCount > 0 || row.monitorState === 'notified'
|
|
301
|
+
|| row.detailState === 'delivered')
|
|
302
|
+
|| [...this.mailboxItems.values()].some(row => row.eventId === event.eventId)) {
|
|
303
|
+
throw new Error('Cannot change delivery after admission.');
|
|
304
|
+
}
|
|
305
|
+
event.deliveryClass = decision.deliveryClass;
|
|
306
|
+
for (const [key, row] of rows) this.deliveries.set(key, this.initialDelivery(event, row.consumerId));
|
|
307
|
+
}
|
|
308
|
+
|
|
295
309
|
commitEvent(request: CommitEventRequest): CommitEventResult {
|
|
296
310
|
const draft = cloneRecord(request.event);
|
|
297
311
|
if (!this.sessions.has(draft.sessionId)) {
|
|
@@ -542,6 +542,22 @@ export class SqliteEventRepository implements EventRepository, MailboxRepository
|
|
|
542
542
|
return segmentRow ? { session, segment: segmentFromRow(segmentRow) } : null;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
+
resolveEventDelivery(decision: import('./types.js').EventDeliveryDecision): void {
|
|
546
|
+
this.transaction(() => {
|
|
547
|
+
const event = this.eventById(decision.eventId);
|
|
548
|
+
if (!event) throw new Error('Unknown delivery decision Event.');
|
|
549
|
+
if (event.deliveryClass === decision.deliveryClass) return;
|
|
550
|
+
const delivered = this.db.prepare(`SELECT 1 FROM event_deliveries WHERE event_id = ?
|
|
551
|
+
AND (monitor_attempt_count > 0 OR monitor_state = 'notified' OR detail_state = 'delivered')`).get(event.eventId);
|
|
552
|
+
const admitted = this.db.prepare('SELECT 1 FROM mailbox_items WHERE event_id = ?').get(event.eventId);
|
|
553
|
+
if (delivered || admitted) throw new Error('Cannot change delivery after admission.');
|
|
554
|
+
const consumers = this.db.prepare('SELECT consumer_id FROM event_deliveries WHERE event_id = ?').all(event.eventId);
|
|
555
|
+
this.db.prepare('UPDATE events SET delivery_class = ? WHERE event_id = ?').run(decision.deliveryClass, event.eventId);
|
|
556
|
+
this.db.prepare('DELETE FROM event_deliveries WHERE event_id = ?').run(event.eventId);
|
|
557
|
+
for (const row of consumers) this.insertInitialDelivery({ ...event, deliveryClass: decision.deliveryClass }, String(row.consumer_id));
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
|
|
545
561
|
commitEvent(request: CommitEventRequest): CommitEventResult {
|
|
546
562
|
return this.transaction(() => {
|
|
547
563
|
const duplicateById = request.event.sourceEventId
|
|
@@ -7,6 +7,12 @@ export type EventDeliveryClass =
|
|
|
7
7
|
| 'events_only'
|
|
8
8
|
| 'internal_only';
|
|
9
9
|
|
|
10
|
+
/** Delivery metadata may be resolved before Ready; factual identity/payload never change. */
|
|
11
|
+
export interface EventDeliveryDecision {
|
|
12
|
+
eventId: string;
|
|
13
|
+
deliveryClass: EventDeliveryClass;
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
export type MonitorDeliveryState =
|
|
11
17
|
| 'not_applicable'
|
|
12
18
|
| 'pending'
|
|
@@ -272,6 +272,9 @@ class MemoryFirstEventRepository extends MirroredStore implements EventRepositor
|
|
|
272
272
|
currentScope(account?: EventAccountScope) { return this.memory.currentScope(account); }
|
|
273
273
|
latestScope(account: EventAccountScope, options?: LatestEventScopeOptions) { return this.memory.latestScope(account, options); }
|
|
274
274
|
commitEvent(value: CommitEventRequest) { const result = this.memory.commitEvent(value); this.persist('events', 'commitEvent', value); return result; }
|
|
275
|
+
resolveEventDelivery(value: import('../events/types.js').EventDeliveryDecision) {
|
|
276
|
+
this.memory.resolveEventDelivery(value); this.persist('events', 'resolveEventDelivery', value);
|
|
277
|
+
}
|
|
275
278
|
eventById(eventId: string) { return this.memory.eventById(eventId); }
|
|
276
279
|
latestEventByType(sessionId: string, type: string, segmentId?: string) { return this.memory.latestEventByType(sessionId, type, segmentId); }
|
|
277
280
|
highWaterCommitSeq(sessionId: string, segmentId?: string) { return this.memory.highWaterCommitSeq(sessionId, segmentId); }
|
|
@@ -128,6 +128,7 @@ export type RuntimeEpochPluginOutcome = 'processed' | 'noop' | 'failed' | 'coale
|
|
|
128
128
|
export type RuntimeDiagnosticSeverity = 'debug' | 'info' | 'warn' | 'error';
|
|
129
129
|
|
|
130
130
|
export interface RuntimeEpochPluginResult {
|
|
131
|
+
readonly eventDeliveries?: readonly import('../events/types.js').EventDeliveryDecision[];
|
|
131
132
|
readonly outcome: 'processed' | 'noop';
|
|
132
133
|
readonly reason?: string;
|
|
133
134
|
/**
|
|
@@ -184,6 +185,8 @@ export interface RuntimeEpochPluginInput<
|
|
|
184
185
|
|
|
185
186
|
export interface RuntimeEpochPlugin<TState = Record<string, unknown>, TEvent = Record<string, unknown>>
|
|
186
187
|
extends RuntimePluginIdentity<'epoch'> {
|
|
188
|
+
/** Only these existing Event types may have their pre-Ready delivery metadata resolved. */
|
|
189
|
+
readonly controlsEventDelivery?: readonly string[];
|
|
187
190
|
readonly consumes?: {
|
|
188
191
|
readonly states?: readonly string[];
|
|
189
192
|
readonly events?: readonly string[];
|
|
@@ -62,6 +62,7 @@ export interface RuntimePluginSchedulerOptions<
|
|
|
62
62
|
types?: readonly string[];
|
|
63
63
|
}): CanonicalEvent[];
|
|
64
64
|
highWaterCommitSeq(scope: RuntimeScope): number;
|
|
65
|
+
resolveEventDelivery?(decision: import('../events/types.js').EventDeliveryDecision): void;
|
|
65
66
|
currentSegment?: RuntimeEpochPluginContext<TState>['currentSegment'];
|
|
66
67
|
capabilitiesFor?(
|
|
67
68
|
plugin: RuntimeEpochPlugin<TState, TEvent>,
|
|
@@ -401,6 +402,7 @@ function validateComputationResult(
|
|
|
401
402
|
}
|
|
402
403
|
if (
|
|
403
404
|
result.states !== undefined
|
|
405
|
+
|| result.eventDeliveries !== undefined
|
|
404
406
|
|| result.events !== undefined
|
|
405
407
|
|| result.checkpoint !== undefined
|
|
406
408
|
|| result.consumeEventsThroughCommitSeq !== undefined
|
|
@@ -478,6 +480,7 @@ export class RuntimePluginScheduler<
|
|
|
478
480
|
private readonly stateHistory: StateFrameHistoryReader<TState>;
|
|
479
481
|
private readonly commitInputEvents: RuntimePluginSchedulerOptions<TState, TEvent>['commitInputEvents'];
|
|
480
482
|
private readonly publishEvent: RuntimePluginSchedulerOptions<TState, TEvent>['publishEvent'];
|
|
483
|
+
private readonly resolveEventDelivery: RuntimePluginSchedulerOptions<TState, TEvent>['resolveEventDelivery'];
|
|
481
484
|
private readonly listEvents: RuntimePluginSchedulerOptions<TState, TEvent>['listEvents'];
|
|
482
485
|
private readonly highWaterCommitSeq: RuntimePluginSchedulerOptions<TState, TEvent>['highWaterCommitSeq'];
|
|
483
486
|
private readonly currentSegment: RuntimeEpochPluginContext<TState>['currentSegment'];
|
|
@@ -517,6 +520,7 @@ export class RuntimePluginScheduler<
|
|
|
517
520
|
this.stateHistory = options.stateHistory;
|
|
518
521
|
this.commitInputEvents = options.commitInputEvents;
|
|
519
522
|
this.publishEvent = options.publishEvent;
|
|
523
|
+
this.resolveEventDelivery = options.resolveEventDelivery;
|
|
520
524
|
this.listEvents = options.listEvents;
|
|
521
525
|
this.highWaterCommitSeq = options.highWaterCommitSeq;
|
|
522
526
|
this.currentSegment = options.currentSegment ?? (() => ({ kind: 'unknown' }));
|
|
@@ -1222,6 +1226,21 @@ export class RuntimePluginScheduler<
|
|
|
1222
1226
|
topic: state.topic,
|
|
1223
1227
|
value: cloneCanonical(state.value),
|
|
1224
1228
|
}));
|
|
1229
|
+
const deliveryFacts = result.eventDeliveries?.length ? this.listEvents({
|
|
1230
|
+
scope: work.epoch.scope, afterCommitSeq: invocation.cursorBefore,
|
|
1231
|
+
maxCommitSeq: invocation.maxEventWatermark, maxEpochSeq: work.epoch.epochSeq,
|
|
1232
|
+
}) : [];
|
|
1233
|
+
for (const decision of result.eventDeliveries ?? []) {
|
|
1234
|
+
const fact = deliveryFacts.find(event => event.eventId === decision.eventId);
|
|
1235
|
+
if (!fact || !plugin.controlsEventDelivery?.includes(fact.type)
|
|
1236
|
+
|| !['monitor_and_events', 'events_only', 'internal_only'].includes(decision.deliveryClass)) {
|
|
1237
|
+
throw new Error(`Runtime Epoch Plugin ${plugin.id} returned an unauthorized delivery decision.`);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
for (const decision of result.eventDeliveries ?? []) {
|
|
1241
|
+
if (!this.resolveEventDelivery) throw new Error('Event delivery decisions are unsupported.');
|
|
1242
|
+
this.resolveEventDelivery(decision);
|
|
1243
|
+
}
|
|
1225
1244
|
for (const [proposalIndex, proposal] of (result.events ?? []).entries()) {
|
|
1226
1245
|
await this.publishEvent(plugin.id, work.epoch, proposal, proposalIndex);
|
|
1227
1246
|
eventCount += 1;
|
|
@@ -466,6 +466,7 @@ implements RuntimeSourceContext<Record<string, any>, Record<string, unknown>> {
|
|
|
466
466
|
publishEvent: (pluginId, epoch, proposal, proposalIndex) => this.eventIngress.publish(
|
|
467
467
|
this.pluginEventInput(pluginId, epoch, proposal, proposalIndex),
|
|
468
468
|
),
|
|
469
|
+
resolveEventDelivery: (decision) => this.repository.resolveEventDelivery(decision),
|
|
469
470
|
highWaterCommitSeq: (scope) => this.repository.highWaterCommitSeq(
|
|
470
471
|
scope.sessionId,
|
|
471
472
|
),
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReminderInput, ReminderMode, ReminderResult, ReminderTopic } from './reminder.js';
|
|
2
|
+
|
|
3
|
+
export const REMINDER_FACT_TYPES = [
|
|
4
|
+
'ability.ready', 'ability.remaining_uses_changed', 'ability.exhausted', 'tasks_changed',
|
|
5
|
+
'task_started', 'task_progress', 'task_assigned', 'task_completed', 'task_interrupted', 'task_sabotaged',
|
|
6
|
+
'role_assigned', 'emergency_started', 'emergency_resolved', 'emergency_interrupted', 'meeting_briefing',
|
|
7
|
+
] as const;
|
|
8
|
+
// The four fixed countdown/ability events remain entirely CCL-owned.
|
|
9
|
+
export const REMINDER_CONTROLLED_TYPES = ['tasks_changed'] as const;
|
|
10
|
+
export const REMINDER_TOPICS: readonly ReminderTopic[] = ['tasks'];
|
|
11
|
+
export function deliveryClass(mode: ReminderMode) {
|
|
12
|
+
return mode === 'notify' ? 'monitor_and_events' : mode === 'query' ? 'events_only' : 'internal_only';
|
|
13
|
+
}
|
|
14
|
+
export function isReminderMode(value: unknown): value is ReminderMode {
|
|
15
|
+
return value === 'notify' || value === 'query' || value === 'off';
|
|
16
|
+
}
|
|
17
|
+
export function defaultConfig(topic: ReminderTopic): Record<string, unknown> {
|
|
18
|
+
if (topic !== 'tasks') throw new Error('Unsupported reminder topic; countdown and ability notifications are owned by CCL.');
|
|
19
|
+
return { started: 'off', added: 'notify', updated: 'notify' };
|
|
20
|
+
}
|
|
21
|
+
export function validateDefaultConfig(topic: ReminderTopic, input: unknown): Record<string, unknown> {
|
|
22
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) throw new Error('Reminder config must be an object.');
|
|
23
|
+
const defaults = defaultConfig(topic);
|
|
24
|
+
for (const key of Object.keys(input)) if (!Object.hasOwn(defaults, key)) throw new Error('Unknown reminder option: ' + key);
|
|
25
|
+
const value = { ...defaults, ...input };
|
|
26
|
+
if (!Object.values(value).every(isReminderMode)) throw new Error('Reminder mode must be notify, query, or off.');
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
export function taskChangeMode(payload: Record<string, unknown>, config: Record<string, unknown>): ReminderMode {
|
|
30
|
+
const delta = Array.isArray(payload.delta) ? payload.delta as Record<string, unknown>[] : [];
|
|
31
|
+
const modes = delta.map(change => change.change === 'status_changed' && change.from_status === 'normal'
|
|
32
|
+
&& change.to_status === 'in_progress' ? config.started : change.change === 'added' ? config.added : config.updated);
|
|
33
|
+
return modes.includes('notify') ? 'notify' : modes.includes('query') ? 'query' : 'off';
|
|
34
|
+
}
|
|
35
|
+
export function defaultReminder(topic: ReminderTopic, input: ReminderInput): ReminderResult {
|
|
36
|
+
const config = validateDefaultConfig(topic, input.config);
|
|
37
|
+
return { deliveries: input.facts.filter(f => f.type === 'tasks_changed'
|
|
38
|
+
&& ['task_state_changed', 'task_assigned'].includes(String(f.payload.reason))).map(f => ({
|
|
39
|
+
eventId: f.eventId, mode: taskChangeMode(f.payload as Record<string, unknown>, config),
|
|
40
|
+
})) };
|
|
41
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { GameEvent, GameState, ObservationFrame } from '../module-input/index.js';
|
|
2
|
+
import type { BehaviorInputFieldSpec } from '../behavior-plugin/index.js';
|
|
3
|
+
|
|
4
|
+
/** Reminder classes use the same public Perception API version and resource lifecycle. */
|
|
5
|
+
export const REMINDER_PLUGIN_API_VERSION = 2 as const;
|
|
6
|
+
export type ReminderTopic = 'tasks';
|
|
7
|
+
export type ReminderMode = 'notify' | 'query' | 'off';
|
|
8
|
+
export interface ReminderFact extends GameEvent { readonly producer: 'backend_push' | 'local_synth' }
|
|
9
|
+
export interface ReminderInput {
|
|
10
|
+
readonly scope: Readonly<{ sessionId: string; segmentId: string }>;
|
|
11
|
+
readonly frame: Readonly<ObservationFrame> | null;
|
|
12
|
+
readonly gameState: Readonly<GameState> | null;
|
|
13
|
+
readonly facts: readonly Readonly<ReminderFact>[];
|
|
14
|
+
readonly config: Readonly<Record<string, unknown>>;
|
|
15
|
+
/** Host-persisted state from the previous completed update; never use instance fields for recovery. */
|
|
16
|
+
readonly state: unknown;
|
|
17
|
+
readonly nowMs: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ReminderResult {
|
|
20
|
+
readonly state?: unknown;
|
|
21
|
+
readonly deliveries?: readonly { readonly eventId: string; readonly mode: ReminderMode }[];
|
|
22
|
+
}
|
|
23
|
+
export interface ClawclawReminderManifest {
|
|
24
|
+
readonly apiVersion: typeof REMINDER_PLUGIN_API_VERSION;
|
|
25
|
+
readonly kind: 'reminder';
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly description: string;
|
|
28
|
+
readonly name?: string;
|
|
29
|
+
readonly localizations?: import('../resource-metadata.js').ClawclawResourceLocalizations;
|
|
30
|
+
readonly topic: ReminderTopic;
|
|
31
|
+
readonly consumes: readonly string[];
|
|
32
|
+
/** Optional validation schema for parameters carried in this module's own manifest. */
|
|
33
|
+
readonly inputs?: readonly BehaviorInputFieldSpec[];
|
|
34
|
+
readonly config?: Readonly<Record<string, unknown>>;
|
|
35
|
+
}
|
|
36
|
+
/** Non-visual perception rule. Runtime supplies durable state and bounds the Worker. */
|
|
37
|
+
export abstract class ClawclawReminder {
|
|
38
|
+
static readonly manifest?: ClawclawReminderManifest;
|
|
39
|
+
abstract update(input: Readonly<ReminderInput>): ReminderResult | Promise<ReminderResult>;
|
|
40
|
+
}
|