@synmux/claude-commit 0.1.1 → 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 syn <4ibo6o2n2@mozmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -20,14 +20,16 @@ feat(auth): add error handling and refresh token rotation to login
20
20
  Want more details? See [WALKTHROUGH.md](WALKTHROUGH.md).
21
21
 
22
22
  ```plaintext
23
- staged diff ──split──▶ [chunk, …] ──sonnet[1m]──▶ summaries ──haiku──▶ commit message
23
+ staged diff ──split──▶ [chunk, …] ──sonnet──▶ summaries ──sonnet──▶ commit message
24
24
  ```
25
25
 
26
26
  1. **Summarize** - the diff is split into chunks that fit the context window and
27
- each chunk is summarized by a strong model (`sonnet[1m]`, Sonnet with a 1M-token
28
- context). Diffs larger than 1M tokens simply produce more chunks.
29
- 2. **Write** - the summaries are handed to a fast model (`haiku`) that writes the
30
- final commit message according to your formatting rules.
27
+ each chunk is summarized by a strong model (`sonnet`, which carries a native
28
+ 1M-token context). Diffs larger than 1M tokens simply produce more chunks.
29
+ 2. **Write** - the summaries are handed to the same model (`sonnet`) to write the
30
+ final commit message according to your formatting rules. The message is the
31
+ whole point of the tool, and its input is tiny, so a strong model here costs
32
+ almost nothing extra.
31
33
 
32
34
  Both stages run through the [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview).
33
35
 
@@ -84,8 +86,8 @@ and asks for confirmation before committing. Pass `-y` to skip the prompt, or
84
86
  | `-m, --multiline` / `--no-multiline` | Write a multi-line commit (subject + body), or force a single line |
85
87
  | `-t, --template <tpl>` | Template for the first line, e.g. `"[PROJ-1] {message}"` |
86
88
  | `-p, --prompt <text>` | Extra instructions appended to the prompt |
87
- | `--model-summary <model>` | Model used to summarize the diff (default `sonnet[1m]`) |
88
- | `--model-final <model>` | Model used to write the message (default `haiku`) |
89
+ | `--model-summary <model>` | Model used to summarize the diff (default `sonnet`) |
90
+ | `--model-final <model>` | Model used to write the message (default `sonnet`) |
89
91
  | `-d, --dry-run` | Print the message to stdout without committing |
90
92
  | `-y, --yes` | Commit without asking for confirmation |
91
93
  | `--no-spinner` | Disable the progress spinner |
@@ -150,8 +152,8 @@ keys are valid at every level:
150
152
  "interactiveCount": 3,
151
153
  "interactiveTemperature": 1,
152
154
  "models": {
153
- "summary": "sonnet[1m]",
154
- "final": "haiku"
155
+ "summary": "sonnet",
156
+ "final": "sonnet"
155
157
  },
156
158
  "maxChunkTokens": 600000,
157
159
  "charsPerToken": 3.5,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synmux/claude-commit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Generate git commit messages with Claude, using your Claude Code subscription.",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",
@@ -25,15 +25,15 @@
25
25
  "interactiveCount": 3,
26
26
  "interactiveTemperature": 1,
27
27
  "models": {
28
- "summary": "sonnet[1m]",
29
- "final": "haiku"
28
+ "summary": "sonnet",
29
+ "final": "sonnet"
30
30
  },
31
31
  "maxChunkTokens": 600000,
32
32
  "charsPerToken": 3.5,
33
33
  "allowApiKey": false
34
34
  },
35
35
  "devDependencies": {
36
- "@anthropic-ai/claude-code": "^2.1.198",
36
+ "@anthropic-ai/claude-code": "^2.1.205",
37
37
  "@trunkio/launcher": "^1.3.4",
38
38
  "@types/bun": "^1.3.14",
39
39
  "prettier": "3.9.4",
@@ -43,8 +43,8 @@
43
43
  "typescript": "^6.0.3"
44
44
  },
45
45
  "dependencies": {
46
- "@anthropic-ai/claude-agent-sdk": "^0.3.198",
47
- "@opentui/core": "^0.4.2",
46
+ "@anthropic-ai/claude-agent-sdk": "^0.3.205",
47
+ "@opentui/core": "^0.4.3",
48
48
  "commander": "^15.0.0"
49
49
  },
50
50
  "scripts": {
@@ -55,5 +55,12 @@
55
55
  "lint:fix": "bun run trunk check -a --fix",
56
56
  "typecheck": "bun run tsc --noEmit",
57
57
  "prepare": "bun run skilld prepare || true"
58
- }
58
+ },
59
+ "trustedDependencies": [
60
+ "@anthropic-ai/claude-code",
61
+ "@google/genai",
62
+ "onnxruntime-node",
63
+ "protobufjs",
64
+ "sharp"
65
+ ]
59
66
  }
package/src/agent.ts CHANGED
@@ -21,7 +21,7 @@ import { ClaudeCommitError } from "./errors";
21
21
  import type { ModelResult } from "./types";
22
22
 
23
23
  export interface RunPromptOptions {
24
- /** Model string (alias like `haiku`, `sonnet[1m]`, or a full model id). */
24
+ /** Model string (alias like `sonnet`, `haiku`, or a full model id). */
25
25
  model: string;
26
26
  /** Full custom system prompt. */
27
27
  system: string;
package/src/config.ts CHANGED
@@ -22,8 +22,8 @@ export const DEFAULT_CONFIG: Config = {
22
22
  interactiveCount: 3,
23
23
  interactiveTemperature: 1,
24
24
  models: {
25
- summary: "sonnet[1m]",
26
- final: "haiku",
25
+ summary: "sonnet",
26
+ final: "sonnet",
27
27
  },
28
28
  maxChunkTokens: 600_000,
29
29
  charsPerToken: 3.5,
package/src/generate.ts CHANGED
@@ -4,9 +4,9 @@
4
4
  * diff ──split──▶ [chunk, chunk, ...] ──summary model──▶ [summary, ...]
5
5
  * ──final model──▶ commit message(s)
6
6
  *
7
- * The summary model (default `sonnet[1m]`) reads each diff chunk and writes a
7
+ * The summary model (default `sonnet`) reads each diff chunk and writes a
8
8
  * factual summary; chunking keeps each request within the model's context
9
- * window. The final model (default `haiku`) turns the summaries into the commit
9
+ * window. The final model (default `sonnet`) turns the summaries into the commit
10
10
  * message(s), applying the configured formatting rules.
11
11
  */
12
12
  import { runPrompt } from "./agent";
package/src/types.ts CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  /** Which models to use for each stage of the pipeline. */
6
6
  export interface ModelConfig {
7
- /** Model used to read diffs and write summaries. Defaults to `sonnet[1m]`. */
7
+ /** Model used to read diffs and write summaries. Defaults to `sonnet`. */
8
8
  summary: string;
9
- /** Model used to turn summaries into the final commit message. Defaults to `haiku`. */
9
+ /** Model used to turn summaries into the final commit message. Defaults to `sonnet`. */
10
10
  final: string;
11
11
  }
12
12