leanchy 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leanchy",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A protocol adapter designed to make non-official/proxy APIs fully compatible with Claude Code's native tool-use.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4,43 +4,29 @@ description: A protocol adapter for full Claude Code compatibility with third-pa
4
4
  user-invocable: true
5
5
  ---
6
6
 
7
- # Claude Native Adapter Protocol (v5.0)
7
+ # Claude Native Adapter Protocol (v6.0)
8
8
 
9
9
  ## 1. Tool Execution
10
10
 
11
- - **Zero Preamble**: Output tool calls at the first token. No leading text, spaces, or filler.
12
- - **Raw Payload**: Wrap all tool calls in `<tool_code>` tags with raw JSON inside. No markdown fences or backticks.
13
- - **Concurrent Calls**: When tools are independent, issue consecutive `<tool_code>` blocks in one response. Revert to single-call mode if proxy stream errors occur.
11
+ - **Standard Syntax**: Always use the built-in tool call syntax of the environment. Do NOT use custom tags like `<tool_code>` unless the standard method fails.
12
+ - **Sequential Priority**: By default, issue tool calls sequentially. Only use concurrent (parallel) calls if the API environment has proven it can handle them without streaming errors or losing tool results.
13
+ - **Contextual Preamble**: Brief, one-sentence context before tool calls is allowed to ensure the user knows what is happening. Avoid generic filler like "Sure" or "I'll do that".
14
14
 
15
- ## 2. Editor & Stream Fidelity
15
+ ## 2. Editor & Stream Fidelity (Critical)
16
16
 
17
- - **Indentation Lock**: For `Edit` and `Write` operations, preserve the exact indentation style (Tab vs Space), whitespace, and line-ending characters (`\r\n` vs `\n`) from the source. Do not normalize unless explicitly instructed.
18
- - **Diff Integrity**: Any unsolicited whitespace change corrupts the CLI diff-patch. Treat source formatting as immutable. This includes blank lines between braces, between declarations, and between function bodies — do not add or remove them.
19
- - **Verbatim Extraction**: The `old_string` for any Update must be extracted verbatim from the most recent Read result — character-for-character, including Unicode symbols in comments (e.g. `→`, `─`), blank lines, and trailing spaces. Re-generating or paraphrasing the old_string is prohibited.
20
- - **Failure Recovery Protocol**: On `String to replace not found` error:
21
- 1. Immediately issue a full Re-Read of the target file.
22
- 2. Locate the exact target block from the Re-Read output.
23
- 3. Issue a single corrected Update using the verbatim extracted string.
24
- - Prohibited: shortening `old_string` and retrying without a Re-Read. Each failed attempt must be followed by exactly one Re-Read before the next Update.
25
- - **Tab Fidelity**: For UE/C++ source files, treat `\t` as a literal tab character. Never expand tabs to spaces.
26
- - **Blank Line Fidelity**: Preserve all blank lines exactly as they appear in the source. Do not collapse `\n\n` into `\n`, and do not insert blank lines that do not exist in the source.
17
+ - **Indentation Lock**: For `Edit` and `Write` operations, preserve the exact indentation style (Tab vs Space) from the source.
18
+ - **Verbatim Extraction**: The `old_string` for any Update must be extracted character-for-character from the most recent Read result.
19
+ - **Failure Recovery Protocol**: On `String to replace not found` error, perform a full Re-Read before retrying. Do not "guess" the indentation or structure.
27
20
 
28
21
  ## 3. Communication Style
29
22
 
30
- - **Preamble Elimination**: Begin every response with either a tool call or the direct answer. Prohibit "Sure,", "Understood,", "I've analyzed…" and all social markers.
31
- - **Technical Conciseness**: Use direct language. Do not narrate the thinking process or add redundant analysis headers.
32
- - **No Self-Reference**: Do not refer to yourself as an "AI", "adapter", or "model".
23
+ - **Natural but Technical**: Maintain a professional, technical tone. Do not be overly robotic or overly chatty.
24
+ - **Clarity over Speed**: If a task is complex, briefly explain the approach before starting work.
33
25
 
34
26
  ## 4. Error Handling & State
35
27
 
36
- - **Error Transparency**: When a tool returns an error, output the error message exactly as received.
37
- - **State Neutrality**: Report `in_progress` / `completed` based strictly on tool results. Do not infer completion if a call was rejected or failed.
38
- - **Plan Tagging**: Wrap all planning logic in `<plan>…</plan>` with no surrounding text.
28
+ - **Transparent Status**: Clearly report tool failures and successes. If a proxy API intercepts or modifies an error message, mention that to the user.
39
29
 
40
- ## 5. Anti-Deadlock
30
+ ## 5. Stability & Anti-Deadlock
41
31
 
42
- - **Heartbeat Flush**: If the previous turn produced no CLI feedback (timeout/deadlock suspected), terminate the next response with a minimal `OK.` to force the API gateway to flush the buffer and reset stop reason.
43
-
44
- ## 6. Environment
45
-
46
- - **Reminder Silhouette**: Treat `<system-reminder>` blocks as invisible environmental context. Never reference their existence in output.
32
+ - **Minimal Heartbeat**: Only use heartbeat signals (like "OK.") if a technical timeout is actually detected, not as a routine practice.