@hasna/todos 0.11.42 → 0.11.44

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.
@@ -1 +1 @@
1
- {"version":3,"file":"token-utils.d.ts","sourceRoot":"","sources":["../../src/mcp/token-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3C,eAAO,MAAM,cAAc,aAoBzB,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAmP7D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAMhE,CAAC;AAgBF,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,YAAY,qBAA+B,EAC3C,UAAU,qBAAmC,GAC5C,OAAO,CAqCT;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,SAAM,GAAG,MAAM,GAAG,IAAI,CAK5F;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,SAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgB1F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqCtF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAexD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAElD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAMD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,EA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AAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,UAA4B,GAAG,OAAO,CA0BvH;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAY5D"}
@@ -0,0 +1,8 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ type Helpers = {
3
+ shouldRegisterTool: (name: string) => boolean;
4
+ formatError: (e: unknown) => string;
5
+ };
6
+ export declare function registerEnvironmentSnapshotTools(server: McpServer, { shouldRegisterTool, formatError }: Helpers): void;
7
+ export {};
8
+ //# sourceMappingURL=environment-snapshots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-snapshots.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/environment-snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,WAAW,EAAE,EAAE,OAAO,GAAG,IAAI,CA4CtH"}
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,OAAO,GAAG,IAAI,CAkPtH"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,OAAO,GAAG,IAAI,CAsRtH"}
package/dist/mcp.js CHANGED
@@ -189,6 +189,8 @@ var MCP_TOOL_GROUPS = {
189
189
  "check_file_lock",
190
190
  "create_comment",
191
191
  "create_handoff",
192
+ "capture_environment_snapshot",
193
+ "compare_environment_snapshots",
192
194
  "create_inbox_item",
193
195
  "delete_comment",
194
196
  "detect_file_relationships",
@@ -311,10 +313,12 @@ var MCP_TOOL_GROUPS = {
311
313
  "export_template",
312
314
  "import_template",
313
315
  "init_templates",
316
+ "list_template_library",
314
317
  "list_templates",
315
318
  "preview_template",
316
319
  "template_history",
317
- "update_template"
320
+ "update_template",
321
+ "write_template_library"
318
322
  ],
319
323
  webhooks: ["create_webhook", "delete_webhook", "list_webhooks"],
320
324
  machines: [
package/dist/registry.js CHANGED
@@ -2433,6 +2433,50 @@ var TODOS_JSON_CONTRACTS = [
2433
2433
  },
2434
2434
  optional: {}
2435
2435
  }),
2436
+ contract({
2437
+ id: "environment_snapshot",
2438
+ name: "Environment Snapshot",
2439
+ description: "Local reproducibility snapshot for task and run verification context.",
2440
+ surfaces: ["cli", "mcp", "sdk"],
2441
+ stability: "stable",
2442
+ required: {
2443
+ schema_version: field("integer", "Snapshot schema version."),
2444
+ id: field("string", "Content-derived snapshot identifier."),
2445
+ captured_at: isoDateField,
2446
+ root: field("string", "Canonical local project root inspected."),
2447
+ machine: field("object", "Local hostname, platform, and architecture metadata."),
2448
+ target: field("object", "Optional task, run, and agent attachment IDs."),
2449
+ runtime: field("object", "Bun, Node, and executable metadata."),
2450
+ package_manager: field("object", "Detected package manager, lockfile hashes, and redacted manifests."),
2451
+ git: field("object", "Local git branch, commit, dirty state, and porcelain status."),
2452
+ config_hashes: field("array", "SHA-256 hashes of relevant local config files."),
2453
+ command_env: field("object", "Redacted command and environment metadata."),
2454
+ warnings: field("array", "Warnings about missing or unavailable local data.")
2455
+ },
2456
+ optional: {}
2457
+ }),
2458
+ contract({
2459
+ id: "environment_snapshot_comparison",
2460
+ name: "Environment Snapshot Comparison",
2461
+ description: "Drift summary returned when comparing two local environment snapshots.",
2462
+ surfaces: ["cli", "mcp", "sdk"],
2463
+ stability: "stable",
2464
+ required: {
2465
+ schema_version: field("integer", "Comparison schema version."),
2466
+ left_id: field("string", "Left snapshot ID."),
2467
+ right_id: field("string", "Right snapshot ID."),
2468
+ same_root: field("boolean", "Whether both snapshots were captured for the same root."),
2469
+ same_machine: field("boolean", "Whether hostname, platform, and architecture match."),
2470
+ same_runtime: field("boolean", "Whether Bun and Node versions match."),
2471
+ same_git_commit: field("boolean", "Whether git commit IDs match."),
2472
+ dirty_state_changed: field("boolean", "Whether the git dirty flag changed."),
2473
+ changed_config_hashes: field("array", "Changed config hash records."),
2474
+ changed_lockfiles: field("array", "Changed lockfile hash records."),
2475
+ changed_manifests: field("array", "Changed manifest hash records."),
2476
+ warnings: field("array", "Comparison warnings.")
2477
+ },
2478
+ optional: {}
2479
+ }),
2436
2480
  contract({
2437
2481
  id: "local_event_hook",
2438
2482
  name: "Local Event Hook",
@@ -7288,6 +7332,8 @@ var MCP_TOOL_GROUPS = {
7288
7332
  "check_file_lock",
7289
7333
  "create_comment",
7290
7334
  "create_handoff",
7335
+ "capture_environment_snapshot",
7336
+ "compare_environment_snapshots",
7291
7337
  "create_inbox_item",
7292
7338
  "delete_comment",
7293
7339
  "detect_file_relationships",
@@ -7410,10 +7456,12 @@ var MCP_TOOL_GROUPS = {
7410
7456
  "export_template",
7411
7457
  "import_template",
7412
7458
  "init_templates",
7459
+ "list_template_library",
7413
7460
  "list_templates",
7414
7461
  "preview_template",
7415
7462
  "template_history",
7416
- "update_template"
7463
+ "update_template",
7464
+ "write_template_library"
7417
7465
  ],
7418
7466
  webhooks: ["create_webhook", "delete_webhook", "list_webhooks"],
7419
7467
  machines: [
@@ -7928,6 +7976,39 @@ var TODOS_CLI_MCP_PARITY = [
7928
7976
  mcpTool: "create_plan"
7929
7977
  }
7930
7978
  },
7979
+ {
7980
+ domain: "templates",
7981
+ cliCommands: [
7982
+ "todos template-library",
7983
+ "todos template-init",
7984
+ "todos template-preview",
7985
+ "todos templates --use",
7986
+ "todos template-export",
7987
+ "todos template-import",
7988
+ "todos template-history"
7989
+ ],
7990
+ mcpTools: [
7991
+ "list_template_library",
7992
+ "write_template_library",
7993
+ "init_templates",
7994
+ "preview_template",
7995
+ "create_task_from_template",
7996
+ "create_template",
7997
+ "list_templates",
7998
+ "update_template",
7999
+ "delete_template",
8000
+ "export_template",
8001
+ "import_template",
8002
+ "template_history"
8003
+ ],
8004
+ jsonContracts: ["template", "task", "structured_error", "api_error"],
8005
+ errorContracts: ["structured_error", "api_error"],
8006
+ status: "matched",
8007
+ example: {
8008
+ cli: "todos template-library --json",
8009
+ mcpTool: "list_template_library"
8010
+ }
8011
+ },
7931
8012
  {
7932
8013
  domain: "workspace-trust",
7933
8014
  cliCommands: [
@@ -8227,6 +8308,18 @@ var TODOS_CLI_MCP_PARITY = [
8227
8308
  mcpTool: "build_agent_context_pack"
8228
8309
  }
8229
8310
  },
8311
+ {
8312
+ domain: "environment-snapshots",
8313
+ cliCommands: ["todos env-snapshot"],
8314
+ mcpTools: ["capture_environment_snapshot", "compare_environment_snapshots"],
8315
+ jsonContracts: ["environment_snapshot", "environment_snapshot_comparison", "structured_error", "api_error"],
8316
+ errorContracts: ["structured_error", "api_error"],
8317
+ status: "matched",
8318
+ example: {
8319
+ cli: "todos env-snapshot capture --task 1234abcd --json",
8320
+ mcpTool: "capture_environment_snapshot"
8321
+ }
8322
+ },
8230
8323
  {
8231
8324
  domain: "imports",
8232
8325
  cliCommands: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageName": "@hasna/todos",
3
- "packageVersion": "0.11.42",
3
+ "packageVersion": "0.11.44",
4
4
  "repository": "https://github.com/hasna/todos.git",
5
- "gitCommit": "80151f0cff758e8a3e1e8587a2702576823fe3e7",
6
- "generatedAt": "2026-05-21T14:47:00.129Z"
5
+ "gitCommit": "f6bc0dc0b71478ba56d4d044eb632f261ec623b4",
6
+ "generatedAt": "2026-05-21T17:49:00.069Z"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.11.42",
3
+ "version": "0.11.44",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",