@dreki-gg/taskman 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +11 -1
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { N as readInitiativesManifest, P as upsertInitiativeEntry, S as initiativeRollup, T as reconcileInitiativeForPlan, V as upsertPlanEntry, X as makePlanRuntime, _ as applyInitiativeReconcile, a as filterPlans, b as collectPlanDrift, d as setTaskStatus, g as resolvePlanByName, i as loadInitiativeListItems, l as sortPlans, m as loadPlanData, n as formatInitiativeList, o as formatPlanList, s as loadPlanListItems, t as filterInitiatives, u as appendDeferredTask, v as applyReconcile, y as collectInitiativeDrift, z as readPlansManifest } from "./initiatives-Ij_teFl_.mjs";
3
3
  import { Effect } from "effect";
4
+ import { readFileSync } from "node:fs";
4
5
  import { Command } from "commander";
5
6
  //#region src/cli/runtime.ts
6
7
  /**
@@ -259,9 +260,18 @@ async function closeInitiativeCommand(status, name, opts) {
259
260
  * Thin Commander wiring over the engine: each subcommand delegates to an action
260
261
  * module under `cli/commands/`. Human text by default; `--json` for machines.
261
262
  */
263
+ /** Read the shipped package version (dist/cli.mjs → ../package.json). */
264
+ function packageVersion() {
265
+ try {
266
+ const pkgUrl = new URL("../package.json", import.meta.url);
267
+ return JSON.parse(readFileSync(pkgUrl, "utf-8")).version ?? "0.0.0";
268
+ } catch {
269
+ return "0.0.0";
270
+ }
271
+ }
262
272
  function buildProgram() {
263
273
  const program = new Command();
264
- program.name("taskman").description("Task-management engine over a .plans/ JSONL ledger").version("0.1.0");
274
+ program.name("taskman").description("Task-management engine over a .plans/ JSONL ledger").version(packageVersion());
265
275
  program.command("status").description("Progress + task ids/statuses for the active plan").option("--plan <name>", "plan name (or .plans/<name>) to inspect").option("--json", "machine-readable JSON output").action((opts) => statusCommand(opts));
266
276
  program.command("list").description("List plans").option("--status <status>", "all|in-progress|done|superseded|abandoned").option("--sort <field>", "name|date-asc|date-desc|tasks").option("--json", "machine-readable JSON output").action((opts) => listPlansCommand(opts));
267
277
  program.command("initiatives").description("List initiatives").option("--status <status>", "all|in-progress|done|superseded|abandoned").option("--json", "machine-readable JSON output").action((opts) => listInitiativesCommand(opts));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreki-gg/taskman",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Standalone task-management engine + CLI over a .plans/ JSONL ledger — the plan-mode core, usable from any Node harness",
5
5
  "keywords": [
6
6
  "tasks",