@cogitator-ai/cli 0.15.0 → 0.16.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/README.md CHANGED
@@ -64,6 +64,9 @@ cogitator run -m ollama/llama3.1:8b "What is the capital of France?"
64
64
  | `cogitator deploy` | Deploy with Docker or Fly.io (see [`@cogitator-ai/deploy`](https://www.npmjs.com/package/@cogitator-ai/deploy)) |
65
65
  | `cogitator rewind` | Rewind a thread's conversation, memory and files to an entry, a dry run first |
66
66
  | `cogitator plugin <cmd>` | Install, update, enable, disable and validate plugins and marketplaces, run plugin evals (experimental) |
67
+ | `cogitator schedule <cmd>` | List, add, run now, pause, resume and remove the schedules of routines (experimental) |
68
+ | `cogitator inbox` | Read the inbox of routines: results, failures and questions (experimental) |
69
+ | `cogitator trigger <cmd>` | Fire an API trigger of a running server, issue a trigger token (experimental) |
67
70
 
68
71
  Every command ends with examples in its `--help`.
69
72
 
@@ -328,6 +331,38 @@ Every subcommand that changes something takes `--json` and then prints one objec
328
331
 
329
332
  `plugin eval` writes `aggregate-result.json` and a self-contained `report.html` under `<eval dir>/results/<timestamp>/` and exits as `claude plugin eval` does: `0` when every case met `--threshold`, `1` for a case below it, a case that failed to load or a run that ended on a provider error, `2` for a partial run (the `--max-cost-usd` ceiling), `130` when interrupted and `143` when terminated. A command-line error (an unknown option, a wrong value) exits `1`, not `2`, and `--mocks off` and `--allow-real-servers` exit `1` since real plugin MCP servers are not started. `--json` prints its result document instead of the object above.
330
333
 
334
+ ### cogitator schedule, inbox and trigger
335
+
336
+ Manage the [routines](https://cogitator.app/docs/core/triggers) a runtime keeps in files (experimental): `experimental_fileTriggerStores()` puts the routine store, the schedules and the inbox in `.cogitator/triggers` (`COGITATOR_TRIGGERS_DIR`, `--dir`), the runtime polls them while the CLI changes them, and file locks keep the two from losing each other's writes.
337
+
338
+ ```bash
339
+ cogitator schedule add digest --cron "0 9 * * 1-5" --timezone Europe/Moscow --agent assistant --prompt "Summarize the news"
340
+ cogitator schedule list
341
+ cogitator schedule run digest # due now: the runtime runs it on its next poll
342
+ cogitator schedule pause digest.cron # one trigger, or a whole routine by its id
343
+ cogitator schedule resume digest
344
+ cogitator schedule rm digest
345
+ cogitator inbox --unread
346
+ cogitator inbox show inbox_abc
347
+ cogitator inbox archive inbox_abc
348
+ cogitator trigger token digest.api # shown once, the store keeps its SHA-256
349
+ cogitator trigger fire digest.api --text "Breaking news" --url http://localhost:3000/cogitator
350
+ ```
351
+
352
+ | Subcommand | Description |
353
+ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
354
+ | `schedule list` (`ls`) | The routines of the store with their triggers, and every pending schedule, those of routines in code and the tasks agents gave themselves included |
355
+ | `schedule add <id>` | A routine of the store on `--cron` (5 or 6 fields or a preset), `--timezone`, `--agent` or `--workflow`, `--prompt`, `--catch-up`, `--overlap` |
356
+ | `schedule run <id>` | Makes the schedule due now. Triggers without a schedule fire through their API |
357
+ | `schedule pause <id>`, `resume <id>` | A schedule, a routine or `<routine>.<trigger>`, kept in the trigger state so a restart keeps it. A resumed schedule goes on from its next occurrence |
358
+ | `schedule rm <id>` | A routine of the store with its schedules, or a schedule entry. Routines in code are paused, not removed |
359
+ | `inbox [--unread\|--all\|--archived] [--kind <kind>]` | Unread and read items by default, newest first |
360
+ | `inbox show\|read\|unread\|archive <id>` | One item in full, or its status |
361
+ | `trigger fire <id>` | `POST /triggers/<id>/fire` with `--text`, `--url` or `COGITATOR_URL`, `--token` or `COGITATOR_TRIGGER_TOKEN`, `--idempotency-key` |
362
+ | `trigger token <id>` | A new token for an API trigger of a routine of the store, the one before stops working |
363
+
364
+ Every subcommand takes `--json`.
365
+
331
366
  ### cogitator skill
332
367
 
333
368
  ```bash
@@ -408,16 +443,18 @@ The model, memory and `deploy:` section all come from one config file: the `-c`
408
443
 
409
444
  ## Environment Variables
410
445
 
411
- | Variable | Used by | Description |
412
- | ------------------------------------------------------- | ------------------------- | ----------------------------------- |
413
- | `COGITATOR_CONFIG` | `run` | Config file path |
414
- | `COGITATOR_MODEL` | `run` | Default model |
415
- | `COGITATOR_PLUGINS_DIR` | `plugin`, runtime | Where installed plugins are kept |
416
- | `OLLAMA_URL` / `OLLAMA_HOST` | `run`, `models`, `status` | Ollama endpoint |
417
- | `OLLAMA_API_KEY` | `run`, `models`, `wizard` | Ollama Cloud / authenticated Ollama |
418
- | `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY` | `run`, `init`, `wizard` | Provider keys |
419
- | `COGITATOR_DEBUG` | all | Print stack traces |
420
- | `COGITATOR_TELEMETRY_DISABLED`, `DO_NOT_TRACK` | `init` | Send no anonymous usage event |
446
+ | Variable | Used by | Description |
447
+ | ------------------------------------------------------- | --------------------------------------- | ------------------------------------------ |
448
+ | `COGITATOR_CONFIG` | `run` | Config file path |
449
+ | `COGITATOR_MODEL` | `run` | Default model |
450
+ | `COGITATOR_PLUGINS_DIR` | `plugin`, runtime | Where installed plugins are kept |
451
+ | `COGITATOR_TRIGGERS_DIR` | `schedule`, `inbox`, `trigger`, runtime | Where the file stores of routines are kept |
452
+ | `COGITATOR_URL`, `COGITATOR_TRIGGER_TOKEN` | `trigger fire` | The server and the trigger's token |
453
+ | `OLLAMA_URL` / `OLLAMA_HOST` | `run`, `models`, `status` | Ollama endpoint |
454
+ | `OLLAMA_API_KEY` | `run`, `models`, `wizard` | Ollama Cloud / authenticated Ollama |
455
+ | `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY` | `run`, `init`, `wizard` | Provider keys |
456
+ | `COGITATOR_DEBUG` | all | Print stack traces |
457
+ | `COGITATOR_TELEMETRY_DISABLED`, `DO_NOT_TRACK` | `init` | Send no anonymous usage event |
421
458
 
422
459
  See [`@cogitator-ai/config`](https://www.npmjs.com/package/@cogitator-ai/config) and the [configuration guide](https://cogitator.app/docs/getting-started/configuration) for every `COGITATOR_*` variable.
423
460
 
@@ -0,0 +1,72 @@
1
+ /**
2
+ * cogitator schedule, cogitator inbox and cogitator trigger: the routines, schedules and inbox a
3
+ * runtime keeps in files (`experimental_fileTriggerStores`, `.cogitator/triggers` by default),
4
+ * changed while the runtime runs, and the API triggers of a running server
5
+ */
6
+ import { Command } from 'commander';
7
+ import { type FileTriggerStores } from '@cogitator-ai/core';
8
+ import type { InboxItemKind, InboxItemStatus } from '@cogitator-ai/types';
9
+ /** Where the commands print */
10
+ export interface TriggersIo {
11
+ print(line: string): void;
12
+ }
13
+ /** What the commands work on: the stores, how to print, how to reach a server */
14
+ export interface TriggersContext {
15
+ io: TriggersIo;
16
+ stores: (dir: string | undefined) => FileTriggerStores;
17
+ fetch: typeof fetch;
18
+ env: NodeJS.ProcessEnv;
19
+ }
20
+ interface Flags {
21
+ dir?: string;
22
+ json?: boolean;
23
+ }
24
+ /** cogitator schedule list */
25
+ export declare function runScheduleList(flags: Flags, context?: TriggersContext): Promise<number>;
26
+ export interface ScheduleAddFlags extends Flags {
27
+ cron: string;
28
+ timezone?: string;
29
+ agent?: string;
30
+ workflow?: string;
31
+ prompt: string;
32
+ name?: string;
33
+ catchUp?: 'latest' | 'none' | 'all';
34
+ overlap?: 'skip' | 'queue' | 'parallel' | 'replace';
35
+ }
36
+ /** cogitator schedule add <id> */
37
+ export declare function runScheduleAdd(id: string, flags: ScheduleAddFlags, context?: TriggersContext): Promise<number>;
38
+ /** cogitator schedule rm <id> */
39
+ export declare function runScheduleRemove(id: string, flags: Flags, context?: TriggersContext): Promise<number>;
40
+ /** cogitator schedule pause|resume <id> */
41
+ export declare function runSchedulePause(id: string, enabled: boolean, flags: Flags, context?: TriggersContext): Promise<number>;
42
+ /** cogitator schedule run <id> */
43
+ export declare function runScheduleRun(id: string, flags: Flags, context?: TriggersContext): Promise<number>;
44
+ export interface InboxFlags extends Flags {
45
+ unread?: boolean;
46
+ all?: boolean;
47
+ archived?: boolean;
48
+ kind?: InboxItemKind;
49
+ limit?: number;
50
+ }
51
+ /** cogitator inbox */
52
+ export declare function runInboxList(flags: InboxFlags, context?: TriggersContext): Promise<number>;
53
+ /** cogitator inbox read|unread|archive <id> */
54
+ export declare function runInboxMark(id: string, status: InboxItemStatus, flags: Flags, context?: TriggersContext): Promise<number>;
55
+ /** cogitator inbox show <id> */
56
+ export declare function runInboxShow(id: string, flags: Flags, context?: TriggersContext): Promise<number>;
57
+ export interface FireFlags {
58
+ text?: string;
59
+ url?: string;
60
+ token?: string;
61
+ idempotencyKey?: string;
62
+ json?: boolean;
63
+ }
64
+ /** cogitator trigger fire <id>: POSTs to the API trigger of a running server */
65
+ export declare function runTriggerFire(id: string, flags: FireFlags, context?: TriggersContext): Promise<number>;
66
+ /** cogitator trigger token <id>: issues a new token for an API trigger of a routine of the store */
67
+ export declare function runTriggerToken(id: string, flags: Flags, context?: TriggersContext): Promise<number>;
68
+ export declare const scheduleCommand: Command;
69
+ export declare const inboxCommand: Command;
70
+ export declare const triggerCommand: Command;
71
+ export {};
72
+ //# sourceMappingURL=triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../src/commands/triggers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAE1D,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAEV,aAAa,EACb,eAAe,EAIhB,MAAM,qBAAqB,CAAC;AAG7B,+BAA+B;AAC/B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,iBAAiB,CAAC;IACvD,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC,UAAU,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AA4BJ,eAAO,MAAM,cAAc,SAYxB,CAAC"}
@@ -0,0 +1,510 @@
1
+ /**
2
+ * cogitator schedule, cogitator inbox and cogitator trigger: the routines, schedules and inbox a
3
+ * runtime keeps in files (`experimental_fileTriggerStores`, `.cogitator/triggers` by default),
4
+ * changed while the runtime runs, and the API triggers of a running server
5
+ */
6
+ import { Command, InvalidArgumentError } from 'commander';
7
+ import chalk from 'chalk';
8
+ import { experimental_fileTriggerStores, experimental_Scheduler, experimental_TriggerManager, splitTriggerId, } from '@cogitator-ai/core';
9
+ import { channelsCron } from '@cogitator-ai/channels';
10
+ import { CommandError, examplesHelp, printJson, reportFailure, UsageError } from '../utils/cli.js';
11
+ const defaultContext = () => ({
12
+ io: { print: (line) => console.log(line) },
13
+ stores: (dir) => experimental_fileTriggerStores(dir),
14
+ fetch,
15
+ env: process.env,
16
+ });
17
+ /** A runtime that runs nothing: the CLI only changes what the stores hold */
18
+ const storesOnly = {
19
+ start: () => {
20
+ throw new CommandError('The CLI does not run routines: the runtime that polls the store does');
21
+ },
22
+ resume: () => Promise.reject(new CommandError('The CLI does not resume runs')),
23
+ notify: async () => undefined,
24
+ durable: false,
25
+ };
26
+ function managerOf(stores) {
27
+ return new experimental_TriggerManager({ store: stores.store, schedules: stores.schedules, inbox: stores.inbox, cron: channelsCron }, storesOnly);
28
+ }
29
+ function schedulerOf(stores) {
30
+ return new experimental_Scheduler({
31
+ store: stores.schedules,
32
+ cron: channelsCron,
33
+ fire: () => {
34
+ throw new CommandError('The CLI does not fire schedules');
35
+ },
36
+ });
37
+ }
38
+ /** Runs `work`, prints its lines or its JSON, and turns a failure into the exit code */
39
+ async function respond(command, flags, context, work) {
40
+ try {
41
+ const result = await work();
42
+ if (flags.json) {
43
+ printJson({ command, outcome: 'ok', ...result.json });
44
+ }
45
+ else {
46
+ for (const line of result.lines ?? [])
47
+ context.io.print(line);
48
+ if (result.message)
49
+ context.io.print(`${chalk.green('✓')} ${result.message}`);
50
+ }
51
+ return 0;
52
+ }
53
+ catch (error) {
54
+ if (flags.json) {
55
+ const code = error.code;
56
+ printJson({
57
+ command,
58
+ outcome: 'failed',
59
+ message: error instanceof Error ? error.message : String(error),
60
+ ...(typeof code === 'string' && { failureCode: code }),
61
+ });
62
+ return 1;
63
+ }
64
+ return reportFailure(error, { json: false });
65
+ }
66
+ }
67
+ function when(at) {
68
+ return at === undefined ? '-' : new Date(at).toISOString().replace('.000Z', 'Z');
69
+ }
70
+ function entryLine(entry) {
71
+ const what = entry.trigger?.routineId
72
+ ? `${entry.trigger.routineId}.${entry.trigger.triggerId ?? '?'}`
73
+ : entry.trigger?.agent
74
+ ? `task of ${entry.trigger.agent}: ${String(entry.metadata?.description ?? entry.name ?? '')}`
75
+ : String(entry.metadata?.description ?? entry.name ?? entry.workflowId);
76
+ const timing = entry.cron
77
+ ? `${entry.cron}${entry.timezone ? ` ${entry.timezone}` : ''}`
78
+ : entry.interval
79
+ ? `every ${entry.interval} ms`
80
+ : 'once';
81
+ const paused = entry.enabled === false ? chalk.yellow(' paused') : '';
82
+ return ` ${entry.id} ${what} ${chalk.dim(timing)} next ${when(entry.firesAt)}${paused}`;
83
+ }
84
+ function routineLine(info) {
85
+ const target = 'agent' in info.routine.target
86
+ ? `agent ${String(info.routine.target.agent)}`
87
+ : `workflow ${String(info.routine.target.workflow)}`;
88
+ return [
89
+ ` ${chalk.bold(info.routine.id)} ${chalk.dim(target)}${info.routine.enabled === false ? chalk.yellow(' disabled') : ''}`,
90
+ ...info.triggers.map((trigger) => ` ${trigger.id} ${trigger.kind}${trigger.enabled ? '' : chalk.yellow(' paused')}${trigger.nextFireAt !== undefined ? ` next ${when(trigger.nextFireAt)}` : ''} fired ${trigger.state.fireCount}`),
91
+ ];
92
+ }
93
+ /** cogitator schedule list */
94
+ export async function runScheduleList(flags, context = defaultContext()) {
95
+ return respond('schedule list', flags, context, async () => {
96
+ const stores = context.stores(flags.dir);
97
+ const routines = await managerOf(stores).list();
98
+ const entries = await schedulerOf(stores).list();
99
+ return {
100
+ lines: [
101
+ chalk.bold(`Routines kept in ${stores.dir}`),
102
+ ...(routines.length > 0 ? routines.flatMap(routineLine) : [chalk.dim(' none')]),
103
+ chalk.bold('Schedules'),
104
+ ...(entries.length > 0 ? entries.map(entryLine) : [chalk.dim(' none')]),
105
+ ],
106
+ json: { dir: stores.dir, routines, schedules: entries },
107
+ };
108
+ });
109
+ }
110
+ /** cogitator schedule add <id> */
111
+ export async function runScheduleAdd(id, flags, context = defaultContext()) {
112
+ return respond('schedule add', flags, context, async () => {
113
+ if ((flags.agent === undefined) === (flags.workflow === undefined)) {
114
+ throw new UsageError('Give exactly one of --agent and --workflow');
115
+ }
116
+ const routine = {
117
+ id,
118
+ prompt: flags.prompt,
119
+ target: flags.agent !== undefined ? { agent: flags.agent } : { workflow: flags.workflow },
120
+ triggers: [
121
+ { kind: 'cron', cron: flags.cron, ...(flags.timezone && { timezone: flags.timezone }) },
122
+ ],
123
+ ...(flags.name && { name: flags.name }),
124
+ ...(flags.catchUp && { catchUp: flags.catchUp }),
125
+ ...(flags.overlap && { overlap: flags.overlap }),
126
+ };
127
+ const info = await managerOf(context.stores(flags.dir)).create(routine);
128
+ const next = info.triggers[0]?.nextFireAt;
129
+ return {
130
+ message: `Routine ${id} added, next run ${when(next)}`,
131
+ json: { routine: info },
132
+ };
133
+ });
134
+ }
135
+ /** The pending schedule entries an id names: an entry, a routine's or one trigger's */
136
+ async function entriesOf(stores, id) {
137
+ const pending = await stores.schedules.getPending();
138
+ const exact = pending.filter((entry) => entry.id === id);
139
+ if (exact.length > 0)
140
+ return exact;
141
+ const split = splitTriggerId(id);
142
+ return pending.filter((entry) => entry.trigger?.routineId === id ||
143
+ (split !== undefined &&
144
+ entry.trigger?.routineId === split.routineId &&
145
+ entry.trigger.triggerId === split.triggerId));
146
+ }
147
+ /** cogitator schedule rm <id> */
148
+ export async function runScheduleRemove(id, flags, context = defaultContext()) {
149
+ return respond('schedule rm', flags, context, async () => {
150
+ const stores = context.stores(flags.dir);
151
+ if (await managerOf(stores).remove(id)) {
152
+ return { message: `Routine ${id} removed with its schedules`, json: { removed: id } };
153
+ }
154
+ const entries = await entriesOf(stores, id);
155
+ if (entries.length === 0)
156
+ throw new CommandError(`No routine of the store or schedule ${id}`);
157
+ if (entries.some((entry) => entry.trigger?.routineId !== undefined)) {
158
+ throw new CommandError(`${id} is a schedule of a routine defined in code`, {
159
+ hints: ['Remove the trigger from the code, or pause it: cogitator schedule pause'],
160
+ });
161
+ }
162
+ for (const entry of entries)
163
+ await stores.schedules.cancel(entry.id);
164
+ return { message: `Schedule ${id} removed`, json: { removed: id } };
165
+ });
166
+ }
167
+ /** cogitator schedule pause|resume <id> */
168
+ export async function runSchedulePause(id, enabled, flags, context = defaultContext()) {
169
+ const command = enabled ? 'schedule resume' : 'schedule pause';
170
+ return respond(command, flags, context, async () => {
171
+ const stores = context.stores(flags.dir);
172
+ const entries = await entriesOf(stores, id);
173
+ const triggerIds = new Set();
174
+ for (const entry of entries) {
175
+ const { routineId, triggerId } = entry.trigger ?? {};
176
+ if (routineId !== undefined && triggerId !== undefined) {
177
+ triggerIds.add(`${routineId}.${triggerId}`);
178
+ }
179
+ }
180
+ const split = splitTriggerId(id);
181
+ if (split && entries.length === 0)
182
+ triggerIds.add(id);
183
+ if (entries.length === 0 && triggerIds.size === 0) {
184
+ throw new CommandError(`No schedule, routine or trigger ${id}`);
185
+ }
186
+ for (const triggerId of triggerIds) {
187
+ const routineId = splitTriggerId(triggerId).routineId;
188
+ await stores.store.patchTriggerState(triggerId, routineId, { enabled });
189
+ }
190
+ const scheduler = schedulerOf(stores);
191
+ for (const entry of entries) {
192
+ if (enabled)
193
+ await scheduler.resume(entry.id);
194
+ else
195
+ await scheduler.pause(entry.id);
196
+ }
197
+ return {
198
+ message: `${id} ${enabled ? 'resumed' : 'paused'}`,
199
+ json: { id, enabled, schedules: entries.map((entry) => entry.id) },
200
+ };
201
+ });
202
+ }
203
+ /** cogitator schedule run <id> */
204
+ export async function runScheduleRun(id, flags, context = defaultContext()) {
205
+ return respond('schedule run', flags, context, async () => {
206
+ const stores = context.stores(flags.dir);
207
+ const entries = await entriesOf(stores, id);
208
+ if (entries.length === 0) {
209
+ throw new CommandError(`No schedule ${id}`, {
210
+ hints: ['A trigger without a schedule fires through its API: cogitator trigger fire'],
211
+ });
212
+ }
213
+ const scheduler = schedulerOf(stores);
214
+ for (const entry of entries)
215
+ await scheduler.runNow(entry.id);
216
+ return {
217
+ message: `${id} is due now: the runtime polling ${stores.dir} runs it on its next poll`,
218
+ json: { schedules: entries.map((entry) => entry.id) },
219
+ };
220
+ });
221
+ }
222
+ function itemLine(item) {
223
+ const mark = item.kind === 'failure'
224
+ ? chalk.red('failed')
225
+ : item.kind === 'result'
226
+ ? chalk.green('result')
227
+ : chalk.yellow(item.kind);
228
+ const unread = item.status === 'unread' ? chalk.bold('* ') : ' ';
229
+ return [
230
+ `${unread}${item.id} ${mark} ${chalk.bold(item.title)} ${chalk.dim(when(item.createdAt))}`,
231
+ ...(item.summary ? [` ${item.summary}`] : []),
232
+ ];
233
+ }
234
+ /** cogitator inbox */
235
+ export async function runInboxList(flags, context = defaultContext()) {
236
+ return respond('inbox', flags, context, async () => {
237
+ const stores = context.stores(flags.dir);
238
+ const status = flags.unread
239
+ ? ['unread']
240
+ : flags.archived
241
+ ? ['archived']
242
+ : flags.all
243
+ ? ['unread', 'read', 'archived']
244
+ : ['unread', 'read'];
245
+ const items = await stores.inbox.list({
246
+ status,
247
+ ...(flags.kind && { kind: flags.kind }),
248
+ limit: flags.limit ?? 50,
249
+ });
250
+ return {
251
+ lines: items.length > 0 ? items.flatMap(itemLine) : [chalk.dim('The inbox is empty')],
252
+ json: { items },
253
+ };
254
+ });
255
+ }
256
+ /** cogitator inbox read|unread|archive <id> */
257
+ export async function runInboxMark(id, status, flags, context = defaultContext()) {
258
+ return respond(`inbox ${status === 'archived' ? 'archive' : status}`, flags, context, async () => {
259
+ const item = await context.stores(flags.dir).inbox.update(id, { status });
260
+ if (!item)
261
+ throw new CommandError(`No inbox item ${id}`);
262
+ return { message: `${id} is ${status}`, json: { item } };
263
+ });
264
+ }
265
+ /** cogitator inbox show <id> */
266
+ export async function runInboxShow(id, flags, context = defaultContext()) {
267
+ return respond('inbox show', flags, context, async () => {
268
+ const item = await context.stores(flags.dir).inbox.get(id);
269
+ if (!item)
270
+ throw new CommandError(`No inbox item ${id}`);
271
+ return {
272
+ lines: [
273
+ ...itemLine(item),
274
+ ...(item.body ? ['', item.body] : []),
275
+ '',
276
+ chalk.dim([
277
+ item.routineId && `routine ${item.routineId}`,
278
+ item.runId && `run ${item.runId}`,
279
+ item.threadId && `thread ${item.threadId}`,
280
+ ]
281
+ .filter(Boolean)
282
+ .join(' ')),
283
+ ],
284
+ json: { item },
285
+ };
286
+ });
287
+ }
288
+ /** cogitator trigger fire <id>: POSTs to the API trigger of a running server */
289
+ export async function runTriggerFire(id, flags, context = defaultContext()) {
290
+ return respond('trigger fire', flags, context, async () => {
291
+ const base = flags.url ?? context.env.COGITATOR_URL;
292
+ const token = flags.token ?? context.env.COGITATOR_TRIGGER_TOKEN;
293
+ if (!base) {
294
+ throw new UsageError('Where is the server? Pass --url or set COGITATOR_URL', [
295
+ 'The URL the server adapter is mounted at, such as http://localhost:3000/cogitator',
296
+ ]);
297
+ }
298
+ if (!token) {
299
+ throw new UsageError('Pass --token or set COGITATOR_TRIGGER_TOKEN', [
300
+ 'Issue one with: cogitator trigger token <id>',
301
+ ]);
302
+ }
303
+ const response = await context.fetch(`${base.replace(/\/+$/, '')}/triggers/${encodeURIComponent(id)}/fire`, {
304
+ method: 'POST',
305
+ headers: {
306
+ 'content-type': 'application/json',
307
+ authorization: `Bearer ${token}`,
308
+ ...(flags.idempotencyKey && { 'idempotency-key': flags.idempotencyKey }),
309
+ },
310
+ body: JSON.stringify(flags.text !== undefined ? { text: flags.text } : {}),
311
+ });
312
+ const text = await response.text();
313
+ let body;
314
+ try {
315
+ body = JSON.parse(text);
316
+ }
317
+ catch {
318
+ body = text;
319
+ }
320
+ if (!response.ok) {
321
+ const message = body?.error?.message ?? String(text);
322
+ throw new CommandError(`The server answered ${response.status}: ${message}`);
323
+ }
324
+ const result = body;
325
+ return {
326
+ message: `${id}: ${result.status ?? 'sent'}${result.runId ? ` (run ${result.runId})` : ''}${result.reason ? `, ${result.reason}` : ''}`,
327
+ json: { result: body },
328
+ };
329
+ });
330
+ }
331
+ /** cogitator trigger token <id>: issues a new token for an API trigger of a routine of the store */
332
+ export async function runTriggerToken(id, flags, context = defaultContext()) {
333
+ return respond('trigger token', flags, context, async () => {
334
+ const { token, hint } = await managerOf(context.stores(flags.dir)).issueToken(id);
335
+ return {
336
+ lines: [
337
+ token,
338
+ chalk.dim('Shown once: the store keeps only its SHA-256. A token issued before stops working.'),
339
+ ],
340
+ json: { token, hint },
341
+ };
342
+ });
343
+ }
344
+ function positiveInt(value) {
345
+ const number = Number(value);
346
+ if (!Number.isInteger(number) || number <= 0) {
347
+ throw new InvalidArgumentError('Expected a positive whole number.');
348
+ }
349
+ return number;
350
+ }
351
+ function oneOf(allowed) {
352
+ return (value) => {
353
+ if (allowed.includes(value))
354
+ return value;
355
+ throw new InvalidArgumentError(`Expected ${allowed.join(', ')}.`);
356
+ };
357
+ }
358
+ const dirOption = [
359
+ '--dir <path>',
360
+ 'the folder of the stores (default: COGITATOR_TRIGGERS_DIR, else .cogitator/triggers)',
361
+ ];
362
+ const jsonOption = ['--json', 'print one JSON object'];
363
+ export const scheduleCommand = new Command('schedule')
364
+ .alias('schedules')
365
+ .description('List, add, pause, resume, run now and remove the schedules of routines')
366
+ .addHelpText('after', examplesHelp([
367
+ ['cogitator schedule list', 'routines of the store and every schedule'],
368
+ [
369
+ 'cogitator schedule add digest --cron "0 9 * * 1-5" --timezone Europe/Moscow --agent assistant --prompt "Summarize the news"',
370
+ 'a routine that runs on weekdays at 9',
371
+ ],
372
+ ['cogitator schedule run digest', 'make it due now, the runtime runs it'],
373
+ ['cogitator schedule pause digest.cron', 'pause one trigger'],
374
+ ]));
375
+ scheduleCommand
376
+ .command('list')
377
+ .alias('ls')
378
+ .description('List the routines of the store and every pending schedule')
379
+ .option(...dirOption)
380
+ .option(...jsonOption)
381
+ .action(async (flags) => {
382
+ process.exitCode = await runScheduleList(flags);
383
+ });
384
+ scheduleCommand
385
+ .command('add')
386
+ .description('Add a routine to the store that runs on a cron schedule')
387
+ .argument('<id>', 'the routine id: lowercase letters, digits, "_", ":" and "-"')
388
+ .requiredOption('--cron <expression>', '5 or 6 fields, or a preset such as @daily')
389
+ .requiredOption('--prompt <text>', 'the task the routine runs')
390
+ .option('--timezone <zone>', 'IANA time zone of the cron expression')
391
+ .option('--agent <name>', 'an agent of experimental_triggers.agents')
392
+ .option('--workflow <name>', 'a workflow of experimental_triggers.workflows')
393
+ .option('--name <name>', 'a name to show')
394
+ .option('--catch-up <mode>', 'latest, none or all', oneOf(['latest', 'none', 'all']))
395
+ .option('--overlap <mode>', 'skip, queue, parallel or replace', oneOf(['skip', 'queue', 'parallel', 'replace']))
396
+ .option(...dirOption)
397
+ .option(...jsonOption)
398
+ .action(async (id, flags) => {
399
+ process.exitCode = await runScheduleAdd(id, flags);
400
+ });
401
+ scheduleCommand
402
+ .command('rm')
403
+ .alias('remove')
404
+ .description('Remove a routine of the store with its schedules, or a schedule entry')
405
+ .argument('<id>', 'a routine id or a schedule id')
406
+ .option(...dirOption)
407
+ .option(...jsonOption)
408
+ .action(async (id, flags) => {
409
+ process.exitCode = await runScheduleRemove(id, flags);
410
+ });
411
+ scheduleCommand
412
+ .command('run')
413
+ .description('Make a schedule due now: the runtime polling the store runs it')
414
+ .argument('<id>', 'a schedule id, a routine id or <routine>.<trigger>')
415
+ .option(...dirOption)
416
+ .option(...jsonOption)
417
+ .action(async (id, flags) => {
418
+ process.exitCode = await runScheduleRun(id, flags);
419
+ });
420
+ scheduleCommand
421
+ .command('pause')
422
+ .description('Pause a schedule, a routine or one trigger of it')
423
+ .argument('<id>', 'a schedule id, a routine id or <routine>.<trigger>')
424
+ .option(...dirOption)
425
+ .option(...jsonOption)
426
+ .action(async (id, flags) => {
427
+ process.exitCode = await runSchedulePause(id, false, flags);
428
+ });
429
+ scheduleCommand
430
+ .command('resume')
431
+ .description('Resume what pause paused, from its next occurrence')
432
+ .argument('<id>', 'a schedule id, a routine id or <routine>.<trigger>')
433
+ .option(...dirOption)
434
+ .option(...jsonOption)
435
+ .action(async (id, flags) => {
436
+ process.exitCode = await runSchedulePause(id, true, flags);
437
+ });
438
+ export const inboxCommand = new Command('inbox')
439
+ .description('Read the inbox: results, failures and questions of routines')
440
+ .option('--unread', 'only unread items')
441
+ .option('--archived', 'only archived items')
442
+ .option('--all', 'archived items too')
443
+ .option('--kind <kind>', 'result, approval, question or failure', oneOf(['result', 'approval', 'question', 'failure']))
444
+ .option('--limit <n>', 'most items (default 50)', positiveInt)
445
+ .option(...dirOption)
446
+ .option(...jsonOption)
447
+ .action(async (flags) => {
448
+ process.exitCode = await runInboxList(flags);
449
+ })
450
+ .addHelpText('after', examplesHelp([
451
+ ['cogitator inbox --unread', 'what came in since you last read'],
452
+ ['cogitator inbox show inbox_abc', 'one item in full'],
453
+ ['cogitator inbox archive inbox_abc', 'put it away'],
454
+ ]));
455
+ for (const [name, status, description] of [
456
+ ['read', 'read', 'Mark an item read'],
457
+ ['unread', 'unread', 'Mark an item unread'],
458
+ ['archive', 'archived', 'Archive an item'],
459
+ ]) {
460
+ inboxCommand
461
+ .command(name)
462
+ .description(description)
463
+ .argument('<id>', 'the item id')
464
+ .option(...dirOption)
465
+ .option(...jsonOption)
466
+ .action(async (id, flags) => {
467
+ process.exitCode = await runInboxMark(id, status, flags);
468
+ });
469
+ }
470
+ inboxCommand
471
+ .command('show')
472
+ .description('Show an item in full')
473
+ .argument('<id>', 'the item id')
474
+ .option(...dirOption)
475
+ .option(...jsonOption)
476
+ .action(async (id, flags) => {
477
+ process.exitCode = await runInboxShow(id, flags);
478
+ });
479
+ export const triggerCommand = new Command('trigger')
480
+ .alias('triggers')
481
+ .description('Fire API triggers of a running server and issue their tokens')
482
+ .addHelpText('after', examplesHelp([
483
+ ['cogitator trigger token digest.api', 'a new token for an API trigger of the store'],
484
+ [
485
+ 'cogitator trigger fire digest.api --text "Breaking news" --url http://localhost:3000/cogitator',
486
+ 'fire it',
487
+ ],
488
+ ]));
489
+ triggerCommand
490
+ .command('fire')
491
+ .description('POST to /triggers/<id>/fire of a server with the trigger token')
492
+ .argument('<id>', '<routine>.<trigger> of an API trigger')
493
+ .option('--text <text>', 'the text the routine gets, as untrusted data')
494
+ .option('--url <url>', 'where the server adapter is mounted (default: COGITATOR_URL)')
495
+ .option('--token <token>', "the trigger's token (default: COGITATOR_TRIGGER_TOKEN)")
496
+ .option('--idempotency-key <key>', 'repeats with the same key start one run')
497
+ .option(...jsonOption)
498
+ .action(async (id, flags) => {
499
+ process.exitCode = await runTriggerFire(id, flags);
500
+ });
501
+ triggerCommand
502
+ .command('token')
503
+ .description('Issue a new token for an API trigger of a routine of the store, shown once')
504
+ .argument('<id>', '<routine>.<trigger> of an API trigger')
505
+ .option(...dirOption)
506
+ .option(...jsonOption)
507
+ .action(async (id, flags) => {
508
+ process.exitCode = await runTriggerToken(id, flags);
509
+ });
510
+ //# sourceMappingURL=triggers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggers.js","sourceRoot":"","sources":["../../src/commands/triggers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,2BAA2B,EAC3B,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAStD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CA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;QACE,gGAAgG;QAChG,SAAS;KACV;CACF,CAAC,CACH,CAAC;AAEJ,cAAc;KACX,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,gEAAgE,CAAC;KAC7E,QAAQ,CAAC,MAAM,EAAE,uCAAuC,CAAC;KACzD,MAAM,CAAC,eAAe,EAAE,8CAA8C,CAAC;KACvE,MAAM,CAAC,aAAa,EAAE,8DAA8D,CAAC;KACrF,MAAM,CAAC,iBAAiB,EAAE,wDAAwD,CAAC;KACnF,MAAM,CAAC,yBAAyB,EAAE,yCAAyC,CAAC;KAC5E,MAAM,CAAC,GAAG,UAAU,CAAC;KACrB,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,KAAgB,EAAE,EAAE;IAC7C,OAAO,CAAC,QAAQ,GAAG,MAAM,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC;AAEL,cAAc;KACX,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,4EAA4E,CAAC;KACzF,QAAQ,CAAC,MAAM,EAAE,uCAAuC,CAAC;KACzD,MAAM,CAAC,GAAG,SAAS,CAAC;KACpB,MAAM,CAAC,GAAG,UAAU,CAAC;KACrB,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,KAAY,EAAE,EAAE;IACzC,OAAO,CAAC,QAAQ,GAAG,MAAM,eAAe,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCpC,qDAAqD;AACrD,wBAAgB,aAAa,IAAI,OAAO,CA+BvC"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoCpC,qDAAqD;AACrD,wBAAgB,aAAa,IAAI,OAAO,CAkCvC"}
package/dist/program.js CHANGED
@@ -21,6 +21,7 @@ import { skillCommand } from './commands/skill.js';
21
21
  import { wizardCommand } from './commands/wizard.js';
22
22
  import { rewindCommand } from './commands/rewind.js';
23
23
  import { pluginCommand } from './commands/plugin.js';
24
+ import { inboxCommand, scheduleCommand, triggerCommand } from './commands/triggers.js';
24
25
  const __dirname = dirname(fileURLToPath(import.meta.url));
25
26
  const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
26
27
  /** Commander errors reach the entry point from every command, so they exit with the same codes. */
@@ -56,6 +57,9 @@ export function createProgram() {
56
57
  wizardCommand,
57
58
  rewindCommand,
58
59
  pluginCommand,
60
+ scheduleCommand,
61
+ inboxCommand,
62
+ triggerCommand,
59
63
  ]) {
60
64
  program.addCommand(command);
61
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAm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AAa;QACb,aAAa;QACb,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,aAAa;QACb,aAAa;QACb,eAAe;QACf,YAAY;QACZ,cAAc;KACf,EAAE,CAAC;QACF,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IACD,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogitator-ai/cli",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "CLI for Cogitator AI Agent Runtime",
5
5
  "keywords": [
6
6
  "cogitator",
@@ -33,20 +33,20 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@clack/prompts": "^1.8.1",
36
- "@cogitator-ai/channels": "0.20.7",
37
- "@cogitator-ai/config": "0.34.0",
38
- "@cogitator-ai/core": "0.72.0",
39
- "@cogitator-ai/deploy": "0.7.10",
36
+ "@cogitator-ai/channels": "0.21.0",
37
+ "@cogitator-ai/config": "0.35.0",
38
+ "@cogitator-ai/core": "0.73.0",
39
+ "@cogitator-ai/deploy": "0.7.11",
40
40
  "@cogitator-ai/evals": "0.14.0",
41
- "@cogitator-ai/mcp": "19.8.0",
42
- "@cogitator-ai/memory": "0.29.1",
41
+ "@cogitator-ai/mcp": "19.8.1",
42
+ "@cogitator-ai/memory": "0.29.2",
43
43
  "@cogitator-ai/models": "18.5.0",
44
- "@cogitator-ai/studio": "0.8.0",
45
- "@cogitator-ai/types": "0.83.0",
44
+ "@cogitator-ai/studio": "0.9.0",
45
+ "@cogitator-ai/types": "0.84.0",
46
46
  "better-sqlite3": "^13.0.3",
47
47
  "chalk": "^6.0.1",
48
48
  "commander": "^15.0.0",
49
- "create-cogitator-app": "^0.14.3",
49
+ "create-cogitator-app": "^0.14.4",
50
50
  "esbuild": "^0.28.2",
51
51
  "ora": "^9.4.1",
52
52
  "yaml": "^2.9.1",