@ghostpaw/questlog 0.11.0 → 0.11.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 CHANGED
@@ -81,6 +81,9 @@ questlog list --view quests.resolved --json
81
81
  `--questline <id>`, and `--due` as YYYY-MM-DD, DD.MM.YYYY, `today`, `tomorrow`,
82
82
  `+3d`, an ISO date-time with timezone, or milliseconds since epoch. Date-only
83
83
  values use local end of day.
84
+ `--objective` is the one flag that reads a file: `@path`, `@-` for stdin, and
85
+ `@@text` for a literal `@text` (help marks it `(@file, @- stdin, @@ literal @)`). Every
86
+ other value, including titles, `--outcome` and per-tool flags, is literal.
84
87
  `list` defaults to available quests; `list --help` lists all supported views.
85
88
  Its `--limit` caps text output; JSON preserves the full review tool result.
86
89
  `search --limit` caps matches in both formats. `show` prints full quest detail.
@@ -163,7 +166,7 @@ irm https://raw.githubusercontent.com/GhostPawJS/questlog/main/install.ps1 | iex
163
166
  Pinned to a release:
164
167
 
165
168
  ```sh
166
- curl -fsSL https://raw.githubusercontent.com/GhostPawJS/questlog/main/install.sh | sh -s -- --target linux-x64 --version 0.11.0 && export PATH="$HOME/.local/bin:$PATH"
169
+ curl -fsSL https://raw.githubusercontent.com/GhostPawJS/questlog/main/install.sh | sh -s -- --target linux-x64 --version 0.11.1 && export PATH="$HOME/.local/bin:$PATH"
167
170
  ```
168
171
 
169
172
  Also adding ~/.local/bin to ~/.profile (edits ~/.profile once; skipped if it already mentions ~/.local/bin; zsh login shells read ~/.zprofile instead, so use that file name there):
@@ -180,7 +183,7 @@ $env:GHOSTPAW_NO_MODIFY_PATH=1; irm https://raw.githubusercontent.com/GhostPawJS
180
183
 
181
184
  ```text
182
185
  $ ghostpaw-questlog --version
183
- questlog 0.11.0 (binary, linux-x64)
186
+ questlog 0.11.1 (binary, linux-x64)
184
187
  ```
185
188
 
186
189
  Scripts that compare versions should use `--version --short` or `--version --json`.
@@ -4,20 +4,26 @@ import { readFileSync } from 'node:fs';
4
4
  var CliUsageError = class extends Error {
5
5
  exitCode = 2;
6
6
  };
7
+ function readFileValue(raw, name) {
8
+ if (!raw.startsWith("@")) return raw;
9
+ if (raw.startsWith("@@")) return raw.slice(1);
10
+ const path = raw.slice(1);
11
+ if (!path) throw new CliUsageError(`Empty file path for ${name}; use @@ for a literal leading @`);
12
+ try {
13
+ return readFileSync(path === "-" ? 0 : path, "utf8");
14
+ } catch {
15
+ throw new CliUsageError(
16
+ `Cannot read value file for ${name}: ${path} (use @@ for a literal leading @)`
17
+ );
18
+ }
19
+ }
7
20
  var keyOf = (name) => name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
8
21
  function parseCliArgs(argv, spec) {
9
22
  const values = {};
10
23
  const positions = [];
11
24
  const flags = spec.flags ?? [];
12
25
  const convert = (raw, arg) => {
13
- let value = raw;
14
- if (raw.startsWith("@")) {
15
- try {
16
- value = readFileSync(raw.slice(1), "utf8");
17
- } catch {
18
- throw new CliUsageError(`Cannot read value file: ${raw.slice(1)}`);
19
- }
20
- }
26
+ const value = arg.file ? readFileValue(raw, arg.name) : raw;
21
27
  let result = value;
22
28
  if (arg.type === "number" || arg.type === "integer") {
23
29
  result = Number(value);
@@ -94,7 +100,7 @@ function parseCliArgs(argv, spec) {
94
100
  return values;
95
101
  }
96
102
  function renderCliHelp(spec) {
97
- const describe = (arg) => `${arg.type}${arg.enum ? ` (${arg.enum.join("|")})` : ""}${arg.required ? " required" : ""} ${arg.description ?? ""}`;
103
+ const describe = (arg) => `${arg.type}${arg.enum ? ` (${arg.enum.join("|")})` : ""}${arg.required ? " required" : ""}${arg.file ? " (@file, @- stdin, @@ literal @)" : ""} ${arg.description ?? ""}`;
98
104
  return `Usage: ${spec.command} ${(spec.positionals ?? []).map((arg) => `<${arg.name}${arg.variadic ? "..." : ""}>`).join(" ")} [flags]
99
105
  ${spec.description ?? ""}
100
106
 
@@ -116,7 +116,7 @@ function removeHook(db, id) {
116
116
  }
117
117
 
118
118
  // src/version.ts
119
- var questlogVersion = "0.11.0";
119
+ var questlogVersion = "0.11.1";
120
120
 
121
121
  // src/hooks/send_hook_delivery.ts
122
122
  async function sendHookDelivery(db, delivery, target, options) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { tickQuestlog, removeHook, listDueRepeatableQuestAnchors, getRepeatableQuestOrThrow, spawnDueRepeatableQuests, deriveQuestState, deriveQuestMarkerId, queryQuestDetailRecords, resolveNow, withTransaction, getQuestOrThrow, parseRRule, mapQuestRewardRow, normalizeTagName } from './chunk-RBGQK5WP.js';
2
+ import { tickQuestlog, removeHook, listDueRepeatableQuestAnchors, getRepeatableQuestOrThrow, spawnDueRepeatableQuests, deriveQuestState, deriveQuestMarkerId, queryQuestDetailRecords, resolveNow, withTransaction, getQuestOrThrow, parseRRule, mapQuestRewardRow, normalizeTagName } from './chunk-FORPYJT4.js';
3
3
  import { listDeliveries } from './chunk-D6EGZCT7.js';
4
4
  import { listHooks } from './chunk-NBCCA6AX.js';
5
5
  import { registerSchemaActions, minimalInput, requiredForAction } from './chunk-QYSIJ2YN.js';
package/dist/cli.js CHANGED
@@ -13,5 +13,5 @@ function checkNodeVersion(version, stderr) {
13
13
  if (!checkNodeVersion(process.versions.node, process.stderr)) {
14
14
  process.exitCode = 2;
15
15
  } else {
16
- await import('./cli_main-TEG3QTDP.js');
16
+ await import('./cli_main-YW3E2NJM.js');
17
17
  }
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { questlogSkills } from './chunk-I2AMIXGP.js';
3
- import { CliUsageError, renderCliHelp, parseCliArgs } from './chunk-GVD6A3RR.js';
3
+ import { CliUsageError, renderCliHelp, parseCliArgs } from './chunk-B5KVA6XE.js';
4
4
  import { isErrorResult, resolveQuestlogDbPath } from './chunk-IL2QRKZL.js';
5
- import { reviewQuestlogTool, validateInput, getQuestDetail, questlogSurfaceTools } from './chunk-KOWIVBG6.js';
6
- import { questlogVersion } from './chunk-RBGQK5WP.js';
5
+ import { reviewQuestlogTool, validateInput, getQuestDetail, questlogSurfaceTools } from './chunk-R56MXZ2K.js';
6
+ import { questlogVersion } from './chunk-FORPYJT4.js';
7
7
  import { listDeliveries } from './chunk-D6EGZCT7.js';
8
8
  import './chunk-NBCCA6AX.js';
9
9
  import { schemaRows } from './chunk-7KTRNXTU.js';
@@ -209,7 +209,12 @@ ${values.dryRun ? `${JSON.stringify({ events: d.events, batches: d.batches }, nu
209
209
  flags: [
210
210
  { name: "title", type: "string" },
211
211
  { name: "tag", type: "array" },
212
- { name: "objective", type: "string" },
212
+ {
213
+ name: "objective",
214
+ type: "string",
215
+ file: true,
216
+ description: "Quest objective text; defaults to the title."
217
+ },
213
218
  {
214
219
  name: "due",
215
220
  type: "string",
@@ -369,7 +374,7 @@ Use --db <path> or GHOSTPAW_QUESTLOG_DB to override the default ~/.ghostpaw/ques
369
374
  }
370
375
  }
371
376
  if (command !== "hook" && command !== "watch") return void 0;
372
- const { runHookCommand } = await import('./run_hook_command-BOENYNDT.js');
377
+ const { runHookCommand } = await import('./run_hook_command-OGLBKXAV.js');
373
378
  return runHookCommand(command, args, io, async () => {
374
379
  const { openQuestlogDb } = await import('./open_questlog_db-6NS6BVBC.js');
375
380
  return openQuestlogDb(selectedDbPath(options));
@@ -378,12 +383,12 @@ Use --db <path> or GHOSTPAW_QUESTLOG_DB to override the default ~/.ghostpaw/ques
378
383
  plain: questlogPlainCommands(),
379
384
  guides: questlogSkills,
380
385
  mcp: async (options) => {
381
- const { serveQuestlogMcp } = await import('./serve_questlog_mcp-X524X34F.js');
386
+ const { serveQuestlogMcp } = await import('./serve_questlog_mcp-YRCT3GA3.js');
382
387
  await serveQuestlogMcp(options.db === void 0 ? {} : { dbPath: options.db });
383
388
  },
384
389
  skill: async () => {
385
390
  const { renderSkillMarkdown } = await import('./skill_markdown-EGKYZ3W2.js');
386
- const { questlogSkillSpec } = await import('./questlog_skill_spec-ILTCTRYS.js');
391
+ const { questlogSkillSpec } = await import('./questlog_skill_spec-S5OYGF5X.js');
387
392
  return renderSkillMarkdown(questlogSkillSpec);
388
393
  }
389
394
  }
package/dist/index.cjs CHANGED
@@ -185,7 +185,7 @@ function removeHook(db, id) {
185
185
  }
186
186
 
187
187
  // src/version.ts
188
- var questlogVersion = "0.11.0";
188
+ var questlogVersion = "0.11.1";
189
189
 
190
190
  // src/hooks/send_hook_delivery.ts
191
191
  async function sendHookDelivery(db, delivery, target, options) {
package/dist/index.js CHANGED
@@ -183,7 +183,7 @@ function removeHook(db, id) {
183
183
  }
184
184
 
185
185
  // src/version.ts
186
- var questlogVersion = "0.11.0";
186
+ var questlogVersion = "0.11.1";
187
187
 
188
188
  // src/hooks/send_hook_delivery.ts
189
189
  async function sendHookDelivery(db, delivery, target, options) {
@@ -797,7 +797,7 @@ var init_open_questlog_db = __esm({
797
797
  var questlogVersion;
798
798
  var init_version = __esm({
799
799
  "src/version.ts"() {
800
- questlogVersion = "0.11.0";
800
+ questlogVersion = "0.11.1";
801
801
  }
802
802
  });
803
803
 
package/dist/mcp.cjs CHANGED
@@ -420,7 +420,7 @@ async function openQuestlogDb(path) {
420
420
  }
421
421
 
422
422
  // src/version.ts
423
- var questlogVersion = "0.11.0";
423
+ var questlogVersion = "0.11.1";
424
424
 
425
425
  // src/surface/questlog_mcp_instructions.ts
426
426
  var questlogMcpInstructions = "Questlog manages local tasks, calendar commitments, and recurring work. Search before creating work, inspect before changing it, and keep uncertain work as rumors. Use unlock prerequisites to sequence work. run_quest refuses blocked starts unless force is true. Review commitments and resolve work with an honest outcome.";
package/dist/mcp.js CHANGED
@@ -418,7 +418,7 @@ async function openQuestlogDb(path) {
418
418
  }
419
419
 
420
420
  // src/version.ts
421
- var questlogVersion = "0.11.0";
421
+ var questlogVersion = "0.11.1";
422
422
 
423
423
  // src/surface/questlog_mcp_instructions.ts
424
424
  var questlogMcpInstructions = "Questlog manages local tasks, calendar commitments, and recurring work. Search before creating work, inspect before changing it, and keep uncertain work as rumors. Use unlock prerequisites to sequence work. run_quest refuses blocked starts unless force is true. Review commitments and resolve work with an honest outcome.";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { questlogSkills } from './chunk-I2AMIXGP.js';
3
3
  import { questlogMcpInstructions } from './chunk-SVWAEAKC.js';
4
- import { reviewQuestlogTool, questlogSurfaceTools } from './chunk-KOWIVBG6.js';
5
- import './chunk-RBGQK5WP.js';
4
+ import { reviewQuestlogTool, questlogSurfaceTools } from './chunk-R56MXZ2K.js';
5
+ import './chunk-FORPYJT4.js';
6
6
  import './chunk-D6EGZCT7.js';
7
7
  import './chunk-NBCCA6AX.js';
8
8
  import './chunk-QYSIJ2YN.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { parseCliArgs } from './chunk-GVD6A3RR.js';
2
+ import { parseCliArgs } from './chunk-B5KVA6XE.js';
3
3
  import { textOutput } from './chunk-QK3H2AL5.js';
4
- import { watchQuestlog, testHook, removeHook, hookLabel, withTransaction, addHook } from './chunk-RBGQK5WP.js';
4
+ import { watchQuestlog, testHook, removeHook, hookLabel, withTransaction, addHook } from './chunk-FORPYJT4.js';
5
5
  import './chunk-D6EGZCT7.js';
6
6
  import { listHooks } from './chunk-NBCCA6AX.js';
7
7
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { questlogMcpInstructions } from './chunk-SVWAEAKC.js';
3
3
  import { isErrorResult, resolveQuestlogDbPath } from './chunk-IL2QRKZL.js';
4
- import { validateInput, questlogSurfaceTools } from './chunk-KOWIVBG6.js';
4
+ import { validateInput, questlogSurfaceTools } from './chunk-R56MXZ2K.js';
5
5
  import { openQuestlogDb } from './chunk-IA2GVCZS.js';
6
- import { questlogVersion } from './chunk-RBGQK5WP.js';
6
+ import { questlogVersion } from './chunk-FORPYJT4.js';
7
7
  import './chunk-D6EGZCT7.js';
8
8
  import './chunk-NBCCA6AX.js';
9
9
  import { minimalInput } from './chunk-QYSIJ2YN.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghostpaw/questlog",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Unified task and calendar model for Node.js — SQLite, zero dependencies, with a built-in LLM tool facade",
5
5
  "type": "module",
6
6
  "exports": {