@hasna/todos 0.12.3 → 0.13.1
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 +33 -5
- package/dist/cli/commands/config-serve-commands.d.ts.map +1 -1
- package/dist/cli/commands/project-commands.d.ts.map +1 -1
- package/dist/cli/index.js +4912 -4570
- package/dist/contracts.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -2
- package/dist/lib/dependency-graph.d.ts +100 -0
- package/dist/lib/dependency-graph.d.ts.map +1 -1
- package/dist/mcp/index.js +3114 -2977
- package/dist/mcp.js +1 -1
- package/dist/registry.js +1 -1
- package/dist/release-provenance.json +5 -5
- package/dist/server/auth-posture.d.ts +75 -0
- package/dist/server/auth-posture.d.ts.map +1 -0
- package/dist/server/index.js +181 -20
- package/dist/server/serve.d.ts +22 -2
- package/dist/server/serve.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -595,10 +595,19 @@ services. Use them to keep agents from starting blocked work:
|
|
|
595
595
|
```bash
|
|
596
596
|
todos deps <task-id> --needs <blocking-task-id>
|
|
597
597
|
todos deps <task-id> --graph
|
|
598
|
+
todos deps <task-id> --json # machine-readable edges (ids + status) for this task
|
|
599
|
+
todos deps --project <ref> --json # the whole-project graph (nodes + edges + cycles) in one read
|
|
598
600
|
todos blocked
|
|
599
601
|
todos ready
|
|
600
602
|
```
|
|
601
603
|
|
|
604
|
+
`--json` returns versioned, machine-readable shapes for schedulers:
|
|
605
|
+
`todos.task_dependency_edges.v1` for a single task (`dependencies` = upstream
|
|
606
|
+
prerequisites, `blocked_by` = downstream dependents) and
|
|
607
|
+
`todos.project_dependency_graph.v1` for `--project` (a `nodes`/`edges`/`cycles`
|
|
608
|
+
adjacency list). Both are identical in local and self-hosted mode. Human output
|
|
609
|
+
and `--graph --json` are unchanged.
|
|
610
|
+
|
|
602
611
|
The same workflow is available to MCP clients through
|
|
603
612
|
`add_task_dependency`, `remove_task_dependency`, `get_task_dependencies`, and
|
|
604
613
|
`get_blocked_tasks`. Dependency writes reject cycles, `ready` omits locked or
|
|
@@ -1421,18 +1430,37 @@ MCP calls such as `get_task`, `get_status`, `get_context`, `bootstrap`, and
|
|
|
1421
1430
|
todos-serve
|
|
1422
1431
|
```
|
|
1423
1432
|
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1433
|
+
`/api/*` and `/mcp` are **local-only data planes and they fail closed**. The server
|
|
1434
|
+
refuses to start unless one of the following is true:
|
|
1435
|
+
|
|
1436
|
+
| Configuration | Result |
|
|
1437
|
+
| --- | --- |
|
|
1438
|
+
| `TODOS_API_KEY=<key>` (or `--api-key <key>`) | `/api/*` + `/mcp` require the key |
|
|
1439
|
+
| at least one `todos api-keys create` key exists | `/api/*` + `/mcp` require a key |
|
|
1440
|
+
| `--allow-anonymous` **and** a loopback bind | anonymous, loopback peers only (local dev) |
|
|
1441
|
+
| a cloud `DATABASE_URL` is configured (hosted `/v1` deployment) | `/api/*` + `/mcp` are **not served**; `/v1` stays authenticated |
|
|
1442
|
+
| nothing of the above | **server exits non-zero** with the env var to set |
|
|
1427
1443
|
|
|
1428
1444
|
```bash
|
|
1429
|
-
todos api-keys create "My app"
|
|
1430
|
-
todos-serve --host 0.0.0.0
|
|
1445
|
+
todos api-keys create "My app" # then send x-api-key / Authorization: Bearer
|
|
1446
|
+
TODOS_API_KEY=<key> todos-serve --host 0.0.0.0
|
|
1447
|
+
todos serve --allow-anonymous # local dev only; refused for a non-loopback --host
|
|
1431
1448
|
```
|
|
1432
1449
|
|
|
1450
|
+
`--allow-anonymous` (or `TODOS_ALLOW_ANONYMOUS=1`) is refused for any non-loopback
|
|
1451
|
+
bind host, and even when enabled it only serves requests whose transport peer is
|
|
1452
|
+
itself loopback — so it can never publish an anonymous task read/write plane
|
|
1453
|
+
off-box. `todos-mcp --http` sets it implicitly because that transport is pinned to
|
|
1454
|
+
`127.0.0.1`; set `TODOS_API_KEY` (and send it from your MCP client) to require a
|
|
1455
|
+
credential there too.
|
|
1456
|
+
|
|
1433
1457
|
Pass the generated key from your app as `x-api-key` or set `TODOS_API_KEY` for
|
|
1434
1458
|
the SDK client.
|
|
1435
1459
|
|
|
1460
|
+
Always-on / hosted deployments should use the versioned `/v1` API, which
|
|
1461
|
+
authenticates independently against the cloud key store. `/health`, `/ready`,
|
|
1462
|
+
`/version` and `/openapi.json` are the only routes that are public by design.
|
|
1463
|
+
|
|
1436
1464
|
Agent callers can trim REST responses with field selectors:
|
|
1437
1465
|
|
|
1438
1466
|
```bash
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-serve-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/config-serve-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"config-serve-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/config-serve-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,QA44C3D"}
|
|
@@ -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;
|
|
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;AAsOzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAwkCvD"}
|