@hasna/todos 0.11.64 → 0.11.66
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 +76 -47
- package/dist/cli/commands/project-commands.d.ts.map +1 -1
- package/dist/cli/commands/query-commands.d.ts.map +1 -1
- package/dist/cli/commands/task-commands.d.ts.map +1 -1
- package/dist/cli/index.js +368 -63
- package/dist/contracts.js +108 -58
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +300 -59
- package/dist/lib/project-bootstrap.d.ts +1 -0
- package/dist/lib/project-bootstrap.d.ts.map +1 -1
- package/dist/lib/shared-events.d.ts.map +1 -1
- package/dist/lib/task-route-contract.d.ts +33 -0
- package/dist/lib/task-route-contract.d.ts.map +1 -0
- package/dist/lib/task-routing.d.ts +55 -0
- package/dist/lib/task-routing.d.ts.map +1 -0
- package/dist/mcp/index.js +116 -58
- package/dist/registry.js +108 -58
- package/dist/release-provenance.json +3 -3
- package/dist/server/index.js +116 -58
- package/dist/storage.js +108 -58
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,6 +339,34 @@ MCP clients can use `require_approval_gate`, `approve_approval_gate`,
|
|
|
339
339
|
`list_approval_gates`. Gate events are written to task audit history and, when
|
|
340
340
|
a run is linked, to the local run ledger.
|
|
341
341
|
|
|
342
|
+
### OpenAutomations Approval And Evidence Handoff
|
|
343
|
+
|
|
344
|
+
OpenAutomations approval gates can be mirrored to Todos approval gates when an
|
|
345
|
+
automation action affects external systems, spends money, mutates production
|
|
346
|
+
state, or needs human consent. Use the automation run id as the linked run or
|
|
347
|
+
metadata reference, and keep the approval decision id in task/run evidence:
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
todos approvals require <task-id> automation:<action-id> \
|
|
351
|
+
--requester automations \
|
|
352
|
+
--reviewer operator \
|
|
353
|
+
--reason "OpenAutomations action requires consent"
|
|
354
|
+
todos approvals approve <task-id> automation:<action-id> \
|
|
355
|
+
--reviewer operator \
|
|
356
|
+
--note "Approved action execution"
|
|
357
|
+
todos record-verification <task-id> "automations queue complete <action-id>" \
|
|
358
|
+
--status passed \
|
|
359
|
+
--summary "Action completed by runner open-loops:<worker-id>"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Todos owns task approvals, task comments, verification evidence, audit-ledger
|
|
363
|
+
checkpoints, and release evidence. OpenAutomations owns automation specs,
|
|
364
|
+
action queue leases, DLQ/replay, and action approval state. Store only redacted
|
|
365
|
+
summaries, action ids, run ids, decision ids, artifact paths, and verification
|
|
366
|
+
commands in Todos; do not store raw event payloads, secret values, connector
|
|
367
|
+
tokens, or full action inputs unless the task explicitly requires them and they
|
|
368
|
+
have been redacted.
|
|
369
|
+
|
|
342
370
|
## Local Review Queues
|
|
343
371
|
|
|
344
372
|
Review queues turn local task review into an explicit agent workflow: request a
|
|
@@ -401,52 +429,53 @@ MCP clients can use `set_local_event_hook`, `list_local_event_hooks`,
|
|
|
401
429
|
`test_local_event_hook`, and `remove_local_event_hook`. Hook delivery is
|
|
402
430
|
local-only; it does not call hosted webhooks or cloud automation services.
|
|
403
431
|
|
|
404
|
-
## Shared
|
|
405
|
-
|
|
406
|
-
Task lifecycle changes
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
432
|
+
## Shared Task Events And Route State
|
|
433
|
+
|
|
434
|
+
Task lifecycle changes emit shared `@hasna/events` events with source `todos`.
|
|
435
|
+
Todos is the human-visible task ledger: it emits task intent, routing gates, and
|
|
436
|
+
workflow artifact pointers. OpenEvents owns durable channel delivery/replay, and
|
|
437
|
+
OpenLoops owns workflow admission, work-item leases, agent execution, evaluator
|
|
438
|
+
cycles, and run manifests.
|
|
439
|
+
|
|
440
|
+
Use `project-bootstrap --route-enabled` to opt a project task list into
|
|
441
|
+
task-created routing, then inspect route state with deterministic JSON before a
|
|
442
|
+
route or workflow starts:
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
todos project-bootstrap . --route-enabled --json
|
|
446
|
+
todos ready --json
|
|
447
|
+
todos task route-state <task-id> --json
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
`todos ready --json` includes a `route_state` object for each pending unblocked
|
|
451
|
+
task. `route_state.schema_version` is `todos.task_route_state.v1`. It exposes
|
|
452
|
+
`eligible`, denial `reasons`, dependency blockers, route context, boolean gates,
|
|
453
|
+
and compact OpenLoops pointers:
|
|
454
|
+
|
|
455
|
+
- `current_workflow_invocation_id`
|
|
456
|
+
- `current_run_id`
|
|
457
|
+
- `latest_manifest_path`
|
|
458
|
+
- `latest_evaluation_path`
|
|
459
|
+
- `workflow_state`
|
|
460
|
+
|
|
461
|
+
OpenLoops updates those pointers after admission or evaluator progress:
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
todos task workflow-pointers <task-id> \
|
|
465
|
+
--invocation <workflow-invocation-id> \
|
|
466
|
+
--run <workflow-run-id> \
|
|
467
|
+
--manifest /home/hasna/.hasna/loops/runs/<project>/<subject>/<run>/manifest.json \
|
|
468
|
+
--state working \
|
|
437
469
|
--json
|
|
438
470
|
```
|
|
439
471
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
project/list/path fields, `route_enabled` when the task metadata opts in, and an
|
|
448
|
-
`automation` object containing only boolean routing gates such as `no_auto`,
|
|
449
|
-
`manual_required`, `requires_approval`, and `approval_required`.
|
|
472
|
+
Shared task event data includes task identity, title, description, project/list
|
|
473
|
+
ids, working directory, tags, metadata, status, priority, approval state, and
|
|
474
|
+
timestamps. Event metadata includes routing-safe project/list/path fields,
|
|
475
|
+
`route_enabled` when task or task-list metadata opts in, route-state schema
|
|
476
|
+
version, compact workflow pointers, and an `automation` object containing only
|
|
477
|
+
boolean routing gates such as `no_auto`, `manual_required`,
|
|
478
|
+
`requires_approval`, and `approval_required`.
|
|
450
479
|
|
|
451
480
|
Production task-created routes should fail closed:
|
|
452
481
|
|
|
@@ -454,14 +483,14 @@ Production task-created routes should fail closed:
|
|
|
454
483
|
approved routing tag such as `auto:route`.
|
|
455
484
|
- Add negative automation predicates so `no_auto`, manual, and approval-gated
|
|
456
485
|
tasks do not invoke the route.
|
|
457
|
-
- Scope by project path, task list, tags, or repo metadata before invoking
|
|
458
|
-
OpenLoops.
|
|
486
|
+
- Scope by project path, task list, tags, or repo metadata before invoking an
|
|
487
|
+
OpenLoops route.
|
|
459
488
|
- Avoid overlapping opt-in channels for the same task family unless the target
|
|
460
|
-
handler is idempotent.
|
|
489
|
+
handler is idempotent. OpenLoops task-event admission dedupes by task id and
|
|
461
490
|
event type, but a narrower subscription still avoids wasted invocations.
|
|
462
491
|
|
|
463
492
|
For tag opt-in, use a second route with the same deny predicates and
|
|
464
|
-
|
|
493
|
+
`tags=auto:route` instead of `route_enabled=true`.
|
|
465
494
|
Tasks without one of those opt-ins are intentionally no-route. Local event hooks
|
|
466
495
|
remain available for local-only JSONL/socket/script integrations.
|
|
467
496
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkIzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkIzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAwzBvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/query-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkNzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"query-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/query-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkNzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,QAmqFrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/task-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"task-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/task-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+HzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAq6BpD"}
|