litclaude-ai 0.3.45 → 0.3.46

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.46 - 2026-08-16 — ready-to-paste native `/goal` guidance
4
+
5
+ - Add structured `READY_TO_PASTE` guidance for unavailable native goal binding,
6
+ including one bounded `/goal` condition that the user can submit manually in
7
+ the current Claude Code session.
8
+ - Keep automatic slash-command submission unavailable and redact shell-like
9
+ objective fragments before they reach hook context.
10
+
3
11
  ## 0.3.45 - 2026-08-15 — documentation surface refresh
4
12
 
5
13
  - Simplify the English and Korean README guides and pin their packaged cover
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3.45/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
1
+ <p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3.46/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
2
2
 
3
3
  <h1 align="center">LitClaude</h1>
4
4
  <p align="center">
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
  <p align="center">
11
11
  <img src="https://img.shields.io/badge/npm-litclaude--ai-cb3837" alt="npm: litclaude-ai" />
12
- <img src="https://img.shields.io/badge/version-0.3.45-2ea44f" alt="version 0.3.45" />
12
+ <img src="https://img.shields.io/badge/version-0.3.46-2ea44f" alt="version 0.3.46" />
13
13
  <img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" alt="Claude Code plugin" />
14
14
  <img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license" />
15
15
  </p>
@@ -50,13 +50,13 @@ npx --yes litclaude-ai@latest install
50
50
  For a reproducible install, pin the current package version:
51
51
 
52
52
  ```bash
53
- npm view litclaude-ai@0.3.45 version
53
+ npm view litclaude-ai@0.3.46 version
54
54
  ```
55
55
 
56
- If that lookup returns `0.3.45`, the exact install is available:
56
+ If that lookup returns `0.3.46`, the exact install is available:
57
57
 
58
58
  ```bash
59
- npx --yes litclaude-ai@0.3.45 install
59
+ npx --yes litclaude-ai@0.3.46 install
60
60
  ```
61
61
 
62
62
  Otherwise, wait for explicit human publication before using that pin. Check the
@@ -138,6 +138,9 @@ reports degraded mode and keeps the local `litgoal` ledger authoritative. Set
138
138
  The route attempts native goal binding honestly: it inspects available goal tools,
139
139
  never replaces a different active goal, and falls back to the local ledger when the
140
140
  host does not expose model-facing goal controls.
141
+ When that fallback is needed, the hook emits `READY_TO_PASTE` with one bounded
142
+ `/goal` line for the user to copy, paste, and send in the current session; it
143
+ never enters or submits the command itself.
141
144
 
142
145
  `/start-work` owns the schema-3 bounded-authority start-work lifecycle. An approved
143
146
  plan can resume only through this exact route:
package/README_ko-KR.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3.45/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
1
+ <p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3.46/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
2
2
 
3
3
  <h1 align="center">LitClaude</h1>
4
4
  <p align="center">
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
  <p align="center">
11
11
  <img src="https://img.shields.io/badge/npm-litclaude--ai-cb3837" alt="npm: litclaude-ai" />
12
- <img src="https://img.shields.io/badge/version-0.3.45-2ea44f" alt="version 0.3.45" />
12
+ <img src="https://img.shields.io/badge/version-0.3.46-2ea44f" alt="version 0.3.46" />
13
13
  <img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" alt="Claude Code plugin" />
14
14
  <img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license" />
15
15
  </p>
@@ -52,13 +52,13 @@ npx --yes litclaude-ai@latest install
52
52
  뒤 고정합니다.
53
53
 
54
54
  ```bash
55
- npm view litclaude-ai@0.3.45 version
55
+ npm view litclaude-ai@0.3.46 version
56
56
  ```
57
57
 
58
- 조회 결과가 `0.3.45`이면 exact install을 사용할 수 있습니다.
58
+ 조회 결과가 `0.3.46`이면 exact install을 사용할 수 있습니다.
59
59
 
60
60
  ```bash
61
- npx --yes litclaude-ai@0.3.45 install
61
+ npx --yes litclaude-ai@0.3.46 install
62
62
  ```
63
63
 
64
64
  그렇지 않으면 명시적인 human publication을 기다립니다. Pin은 그 뒤에 사용합니다.
@@ -140,6 +140,9 @@ host가 model-facing worktree lane을 제공하면 `EnterWorktree`를 사용합
140
140
  이 route는 native goal binding을 정직하게 시도합니다. 사용 가능한 goal tool을
141
141
  확인하고 다른 active goal을 교체하지 않으며, host가 model-facing goal control을
142
142
  제공하지 않으면 local ledger로 전환합니다.
143
+ 이 fallback이 필요하면 hook이 `READY_TO_PASTE`와 함께 복사·붙여넣기·전송할
144
+ `/goal` 한 줄을 제공합니다. LitClaude가 현재 세션에 직접 입력하거나 전송하지는
145
+ 않습니다.
143
146
 
144
147
  `/start-work`는 schema-3 bounded-authority start-work lifecycle을 관리합니다.
145
148
  승인된 plan의 resume은 다음 exact route만 사용합니다.
@@ -1,6 +1,6 @@
1
1
  # LitClaude Release Checklist
2
2
 
3
- Status: `litclaude-ai@0.3.45` is the current release candidate — exact canonical
3
+ Status: `litclaude-ai@0.3.46` is the current release candidate — exact canonical
4
4
  frontend corpus plus Claude-native `autoresearch`, `autoconference`, and `wikify`
5
5
  workflow-family integration. It byte-pins the frontend library, legal companions,
6
6
  family source closures, and adapters through independent commitments and package
@@ -45,9 +45,9 @@ side-effect-free, the launcher starts only a separate Claude Code
45
45
  print/background worker, and the release preserves the Korean polishing
46
46
  command, strict multi-agent review pipeline, fidelity guardrails, package
47
47
  hygiene checks, native route gates, and safe start-work handoff behavior.
48
- `package.json` is aligned to `0.3.45`,
49
- `plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.45`, and the
50
- plugin-local MCP server reports `0.3.45`.
48
+ `package.json` is aligned to `0.3.46`,
49
+ `plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.46`, and the
50
+ plugin-local MCP server reports `0.3.46`.
51
51
 
52
52
  This release carries the v0.2.2 Dynamic workflow hardening surfaces:
53
53
  `/dynamic-workflow`, `workflow-check --json`, native `/goal` fallback guidance,
@@ -280,9 +280,9 @@ checkout and from an isolated install of the packed tarball:
280
280
  Before requesting publication approval, confirm these artifacts from the current
281
281
  checkout:
282
282
 
283
- - `package.json` version is `0.3.45`.
284
- - `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.45`.
285
- - `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.3.45`.
283
+ - `package.json` version is `0.3.46`.
284
+ - `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.46`.
285
+ - `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.3.46`.
286
286
  - Prompt-hook tests cover bundled `SKILL.md` body injection for bare `hyperplan`, `litresearch`, `lit research`, `init-deep`, and explicit leading `$start-work`; diagnostic/copy mentions stay inert while leading natural-language `lit start work` stays BLOCKED.
287
287
  - `lit search` and `lit query` route to `/litclaude:litresearch` without activating on slash mentions, code spans, or non-lit prompts.
288
288
  - Litresearch web lanes require public API/feed preference, validator-first checks, route traces, prompt-injection quarantine, and honest auth/paywall/private-data stop reasons.
package/docs/hooks.md CHANGED
@@ -54,6 +54,7 @@ verdicts: [PASS, FAIL, BLOCKED]
54
54
  - Claude Code hook JSON containing `continue: true`, `hookSpecificOutput.hookEventName`, and route-specific `additionalContext`.
55
55
  - Optional `systemMessage` only for active LitClaude route guidance.
56
56
  - `BLOCKED:` text for natural-language start-work, unavailable native goal binding, disabled Dynamic workflow, or gated agent-team setup.
57
+ - Unavailable native goal binding also includes `READY_TO_PASTE` and one bounded `/goal` command for the user to copy, paste, and send; the hook never enters or submits it.
57
58
 
58
59
  ## #contract.evidence
59
60
 
@@ -281,8 +282,9 @@ Source-backed capability note: the observed `UserPromptSubmit` hook surface can
281
282
  add `additionalContext` or block; it cannot replace the prompt or run another
282
283
  slash command. If goal tools are unavailable or not exposed in the running
283
284
  Claude Code session, the hook returns explicit `BLOCKED:` / degraded-mode
284
- guidance, does not claim native goal success, keeps the local `litgoal` evidence
285
- ledger authoritative, and may suggest `/goal <completion condition>` or
285
+ guidance plus a `READY_TO_PASTE` command, does not claim native goal success,
286
+ keeps the local `litgoal` evidence ledger authoritative, and may suggest
287
+ `/goal <completion condition>` or
286
288
  `claude -p "/goal <completion condition>"` for the native user surface.
287
289
  For a separate worker session, `litclaude-ai litgoal native-worker --condition
288
290
  "<completion condition>"` builds a dry-run native `/goal` worker command; adding
@@ -36,6 +36,17 @@ Adapt filenames only when the local ledger reports a different authoritative
36
36
  path. The condition does not make the ledger self-validating; recorded evidence
37
37
  still needs the normal LitClaude review gates.
38
38
 
39
+ ## Hook runtime contract
40
+
41
+ When the current session does not expose model-facing goal tools, the native
42
+ binding helper returns `status: "blocked-unavailable"` with
43
+ `nextAction: "ready-to-paste"`, a bounded `condition`, and the exact `command`.
44
+ UserPromptSubmit includes a `READY_TO_PASTE` instruction containing that command.
45
+ The model should show the unchanged line and ask the user to copy, paste, and
46
+ send it as a new message in the current session. This is a user-confirmed
47
+ submission, not automatic invocation: LitClaude cannot enter the command,
48
+ replace the current prompt, or turn it into a tool call.
49
+
39
50
  This documentation does not add a fake command, MCP method, or hook dispatch.
40
51
  The native-goal binding itself does not auto-install a goal, mutate a transcript,
41
52
  inject keystrokes, or claim success based on prompt context alone. Package
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litclaude-ai",
3
- "version": "0.3.45",
3
+ "version": "0.3.46",
4
4
  "description": "Claude Code-native workflow distribution.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "litclaude",
3
3
  "description": "Claude Code-native workflow plugin with a bounded-authority start-work lifecycle.",
4
- "version": "0.3.45",
4
+ "version": "0.3.46",
5
5
  "author": {
6
6
  "name": "LitClaude contributors"
7
7
  },
@@ -682,7 +682,11 @@ const isDiagnosticLiteralPrompt = (prompt) =>
682
682
  const objectiveTail = (prompt) => {
683
683
  const raw = withoutCode(prompt);
684
684
  const match = /\blit(?:work)?\b\s*(.*)$/isu.exec(raw);
685
- return normalizeGoalObjective(match?.[1] ?? raw);
685
+ const tail = (match?.[1] ?? raw).replace(
686
+ /^\s*(?:-loop|-plan|goal|plan|workflow|dynamic\s+workflow|work)\b\s*/iu,
687
+ "",
688
+ );
689
+ return normalizeGoalObjective(tail);
686
690
  };
687
691
 
688
692
  const goalBindingContext = ({ discipline, prompt, activeGoal }) => {
@@ -9,7 +9,7 @@ import {
9
9
  } from "../lib/wikify-knowledge.mjs";
10
10
 
11
11
  const protocolVersion = "2024-11-05";
12
- const serverVersion = "0.3.45";
12
+ const serverVersion = "0.3.46";
13
13
 
14
14
  const publicSourceReadTool = {
15
15
  name: "public_source_read",
@@ -95,6 +95,11 @@ and avoid clobbering a different active goal without explicit replacement. When
95
95
  goal tools are unavailable, return explicit `BLOCKED:` / degraded-mode wording
96
96
  instead of claiming native success, and record clear criteria and evidence in
97
97
  the local ledger.
98
+ If the hook reports `READY_TO_PASTE`, reproduce its exact `/goal <condition>`
99
+ line for the user, instruct them to copy, paste, and send it in the current
100
+ Claude Code session, and wait for a new user message. LitClaude cannot enter or
101
+ send that command on the user's behalf; do not silently rewrite it or convert it
102
+ into a tool call.
98
103
  For broad goal execution, use Dynamic workflow when Claude Code exposes it, and
99
104
  use `claude --worktree <short-name> --tmux` only when isolated worktree
100
105
  execution is needed.
@@ -5,6 +5,13 @@ const secretPatterns = [
5
5
  /(?:api[_-]?key|token|secret|password)\s*=\s*\S+/giu,
6
6
  ];
7
7
 
8
+ const unsafeCommandPatterns = [
9
+ /\b(?:rm|rmdir)\s+-r(?:f)?\b[^;&|\n]*/giu,
10
+ /\b(?:sudo|eval|exec)\b[^;&|\n]*/giu,
11
+ /\b(?:npm|pnpm|yarn)\s+(?:publish|unpublish)\b[^;&|\n]*/giu,
12
+ /\bgit\s+(?:push|reset|clean)\b[^;&|\n]*/giu,
13
+ ];
14
+
8
15
  const normalizeSpaces = (value) => value.replace(/\s+/gu, " ").trim();
9
16
 
10
17
  export const normalizeGoalObjective = (value) => {
@@ -17,7 +24,11 @@ export const normalizeGoalObjective = (value) => {
17
24
  (text, pattern) => text.replace(pattern, "[REDACTED]"),
18
25
  cleaned,
19
26
  );
20
- return normalizeSpaces(redacted).slice(0, MAX_OBJECTIVE_CHARS).trim();
27
+ const safe = unsafeCommandPatterns.reduce(
28
+ (text, pattern) => text.replace(pattern, "[UNSAFE_COMMAND_REDACTED]"),
29
+ redacted,
30
+ );
31
+ return normalizeSpaces(safe).slice(0, MAX_OBJECTIVE_CHARS).trim();
21
32
  };
22
33
 
23
34
  const canonical = (value) => normalizeGoalObjective(value).toLowerCase();
@@ -27,6 +38,27 @@ const activeGoalObjective = (activeGoal) => {
27
38
  return normalizeGoalObjective(activeGoal.objective ?? activeGoal.goal ?? activeGoal.text ?? "");
28
39
  };
29
40
 
41
+ const readyToPasteCondition = (objective) =>
42
+ `Continue until this LitClaude objective is complete: ${objective}. Stop only after required evidence is recorded and no unresolved blocker remains.`;
43
+
44
+ const readyToPasteGuidance = (objective) => {
45
+ const condition = readyToPasteCondition(objective);
46
+ const command = `/goal ${condition}`;
47
+ return {
48
+ nextAction: "ready-to-paste",
49
+ condition,
50
+ command,
51
+ message: [
52
+ "Native goal binding attempt: BLOCKED: native `/goal` not programmatically bound.",
53
+ "READY_TO_PASTE: LitClaude cannot enter or send a command to the current Claude Code session.",
54
+ "Copy, paste, and send this line in the current Claude Code session:",
55
+ command,
56
+ "After sending it, keep the durable `litgoal` ledger authoritative for criteria, evidence, checkpoints, and blockers.",
57
+ "Separate non-interactive fallback: run `claude -p \"/goal <completion condition>\"` in a new session.",
58
+ ].join("\n"),
59
+ };
60
+ };
61
+
30
62
  export const buildNativeGoalBindingGuidance = ({ objective, activeGoal } = {}) => {
31
63
  const normalizedObjective = normalizeGoalObjective(objective);
32
64
  const activeObjective = activeGoalObjective(activeGoal);
@@ -46,8 +78,10 @@ export const buildNativeGoalBindingGuidance = ({ objective, activeGoal } = {}) =
46
78
  };
47
79
  }
48
80
 
81
+ const ready = readyToPasteGuidance(normalizedObjective);
49
82
  return {
50
83
  status: "blocked-unavailable",
51
- message: "Native goal binding attempt: BLOCKED: native `/goal` not programmatically bound. Evidence: the supported UserPromptSubmit hook surface can add context or block, but does not expose a run-slash-command channel; this session exposes no callable get_goal/create_goal/update_goal tools to LitClaude. I will not claim host goal activation. To bind Claude Code's native user surface, paste `/goal <completion condition>` in the session, or run `claude -p \"/goal <completion condition>\"` in a non-interactive flow. Until then, keep the durable `litgoal` ledger authoritative for objective, criteria, evidence, checkpoints, and blockers.",
84
+ ...ready,
85
+ message: `${ready.message}\nEvidence: the supported UserPromptSubmit hook surface can add context or block, but does not expose a run-slash-command channel; this session exposes no callable get_goal/create_goal/update_goal tools to LitClaude.`,
52
86
  };
53
87
  };
@@ -136,6 +136,14 @@ record in the local litgoal ledger. Never auto-type `/goal`, never claim
136
136
  slash-command activation without evidence, and never mark a goal complete until
137
137
  the local litgoal criteria have passed.
138
138
 
139
+ When the UserPromptSubmit context contains `READY_TO_PASTE`, preserve the exact
140
+ `command` line it provides. Show it as the one command the user should copy,
141
+ paste, and send in the current Claude Code session, explain that LitClaude
142
+ cannot enter or send it on the user's behalf, and wait for the user's next
143
+ message before treating native goal submission as user-confirmed. Do not
144
+ silently rewrite the condition, turn it into a tool call, or offer a different
145
+ active goal for replacement without explicit approval.
146
+
139
147
  When the user explicitly wants a separate native `/goal` worker rather than the
140
148
  current TUI session, use the package CLI launcher. It is dry-run by default:
141
149