@qodercn-ai/qoderclicn 1.1.97 → 1.1.99
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/NOTICE +75 -0
- package/THIRD-PARTY-LICENSES +862 -0
- package/bundle/builtin/hook-config/SKILL.md +39 -0
- package/bundle/qoder/hook-config/SKILL.md +39 -0
- package/bundle/qoder-worker-runtime.mjs +2 -2
- package/bundle/qoderclicn.js +2 -2
- package/bundle/worker-runtime.mjs +1773 -1800
- package/package.json +10 -8
|
@@ -13,6 +13,43 @@ This skill guides you through creating hooks — automated behaviors that
|
|
|
13
13
|
trigger on specific events like tool execution, session lifecycle, file
|
|
14
14
|
changes, and notifications. Hooks are configured in settings.json files.
|
|
15
15
|
|
|
16
|
+
## Model switch hooks
|
|
17
|
+
|
|
18
|
+
`PreModelSwitch` runs before an explicit session model change from a command,
|
|
19
|
+
model picker, SDK, ACP, or remote client. `PostModelSwitch` runs after that
|
|
20
|
+
change is applied. Automatic fallback, startup selection, model application after
|
|
21
|
+
login or account switching, resume, and same-model updates do not trigger these
|
|
22
|
+
events.
|
|
23
|
+
|
|
24
|
+
The matcher targets the destination model. Both events receive
|
|
25
|
+
`session_id`, `transcript_path`, `cwd`, `hook_event_name`, `from_model`, and
|
|
26
|
+
`to_model`. The model fields carry catalog display names, and matchers compare the
|
|
27
|
+
same destination model value.
|
|
28
|
+
|
|
29
|
+
Both events are notification-only: `deny`, `ask`, `block`, exit code 2,
|
|
30
|
+
execution failures, and timeouts do not veto the model change. They never open
|
|
31
|
+
a confirmation dialog or send a model-switch confirmation request to a host.
|
|
32
|
+
Pre output, including `hookSpecificOutput.additionalContext` and plain stdout,
|
|
33
|
+
is not injected into model context. Neither event includes a switch-source field.
|
|
34
|
+
SDK and remote clients keep the existing `set_model` request format; configuring
|
|
35
|
+
these hooks does not require additional request parameters.
|
|
36
|
+
|
|
37
|
+
Execution uses the same sync/async mechanics as `PostToolUse`. By default,
|
|
38
|
+
Pre is awaited before applying the change and Post is awaited after applying
|
|
39
|
+
it. Ordinary hooks can delay completion, but cannot prevent the change.
|
|
40
|
+
Hooks configured with `async: true` run in the background through the existing
|
|
41
|
+
runner. Per-type timeout defaults and explicit `timeout` values are unchanged.
|
|
42
|
+
`asyncRewake` retains the existing consumer-dependent behavior.
|
|
43
|
+
|
|
44
|
+
Post handlers cannot undo a committed change. Successful plain stdout or
|
|
45
|
+
`hookSpecificOutput.additionalContext` is queued through the existing async-hook
|
|
46
|
+
context mechanism, even for a synchronous Post handler. Completed output is
|
|
47
|
+
consumed at the next context drain before a model turn, not injected into an
|
|
48
|
+
already-started request. Output completed after that drain waits for a later
|
|
49
|
+
turn. Outputs from multiple changes are delivered as they become available.
|
|
50
|
+
Failure to save the default model does not suppress Post when the session
|
|
51
|
+
model has already changed.
|
|
52
|
+
|
|
16
53
|
## When to Use Hooks
|
|
17
54
|
|
|
18
55
|
Use hooks when you need:
|
|
@@ -151,6 +188,8 @@ The hook script must `exit 2` (and write its diagnostic to `stderr` /
|
|
|
151
188
|
| `StopFailure` | Agent encounters fatal error and must stop (notification-only) |
|
|
152
189
|
| `PreCompact` | Before context compaction |
|
|
153
190
|
| `PostCompact` | After context compaction |
|
|
191
|
+
| `PreModelSwitch` | Before an explicit session model change; notification only |
|
|
192
|
+
| `PostModelSwitch` | After an explicit session model change; notification only |
|
|
154
193
|
|
|
155
194
|
`TeammateIdle` input includes `teammate_name` and `team_name`. Exit code 2
|
|
156
195
|
uses stderr as feedback. A JSON output with `decision: "deny"` or
|
|
@@ -13,6 +13,43 @@ This skill guides you through creating hooks — automated behaviors that
|
|
|
13
13
|
trigger on specific events like tool execution, session lifecycle, file
|
|
14
14
|
changes, and notifications. Hooks are configured in settings.json files.
|
|
15
15
|
|
|
16
|
+
## Model switch hooks
|
|
17
|
+
|
|
18
|
+
`PreModelSwitch` runs before an explicit session model change from a command,
|
|
19
|
+
model picker, SDK, ACP, or remote client. `PostModelSwitch` runs after that
|
|
20
|
+
change is applied. Automatic fallback, startup selection, model application after
|
|
21
|
+
login or account switching, resume, and same-model updates do not trigger these
|
|
22
|
+
events.
|
|
23
|
+
|
|
24
|
+
The matcher targets the destination model. Both events receive
|
|
25
|
+
`session_id`, `transcript_path`, `cwd`, `hook_event_name`, `from_model`, and
|
|
26
|
+
`to_model`. The model fields carry catalog display names, and matchers compare the
|
|
27
|
+
same destination model value.
|
|
28
|
+
|
|
29
|
+
Both events are notification-only: `deny`, `ask`, `block`, exit code 2,
|
|
30
|
+
execution failures, and timeouts do not veto the model change. They never open
|
|
31
|
+
a confirmation dialog or send a model-switch confirmation request to a host.
|
|
32
|
+
Pre output, including `hookSpecificOutput.additionalContext` and plain stdout,
|
|
33
|
+
is not injected into model context. Neither event includes a switch-source field.
|
|
34
|
+
SDK and remote clients keep the existing `set_model` request format; configuring
|
|
35
|
+
these hooks does not require additional request parameters.
|
|
36
|
+
|
|
37
|
+
Execution uses the same sync/async mechanics as `PostToolUse`. By default,
|
|
38
|
+
Pre is awaited before applying the change and Post is awaited after applying
|
|
39
|
+
it. Ordinary hooks can delay completion, but cannot prevent the change.
|
|
40
|
+
Hooks configured with `async: true` run in the background through the existing
|
|
41
|
+
runner. Per-type timeout defaults and explicit `timeout` values are unchanged.
|
|
42
|
+
`asyncRewake` retains the existing consumer-dependent behavior.
|
|
43
|
+
|
|
44
|
+
Post handlers cannot undo a committed change. Successful plain stdout or
|
|
45
|
+
`hookSpecificOutput.additionalContext` is queued through the existing async-hook
|
|
46
|
+
context mechanism, even for a synchronous Post handler. Completed output is
|
|
47
|
+
consumed at the next context drain before a model turn, not injected into an
|
|
48
|
+
already-started request. Output completed after that drain waits for a later
|
|
49
|
+
turn. Outputs from multiple changes are delivered as they become available.
|
|
50
|
+
Failure to save the default model does not suppress Post when the session
|
|
51
|
+
model has already changed.
|
|
52
|
+
|
|
16
53
|
## When to Use Hooks
|
|
17
54
|
|
|
18
55
|
Use hooks when you need:
|
|
@@ -151,6 +188,8 @@ The hook script must `exit 2` (and write its diagnostic to `stderr` /
|
|
|
151
188
|
| `StopFailure` | Agent encounters fatal error and must stop (notification-only) |
|
|
152
189
|
| `PreCompact` | Before context compaction |
|
|
153
190
|
| `PostCompact` | After context compaction |
|
|
191
|
+
| `PreModelSwitch` | Before an explicit session model change; notification only |
|
|
192
|
+
| `PostModelSwitch` | After an explicit session model change; notification only |
|
|
154
193
|
|
|
155
194
|
`TeammateIdle` input includes `teammate_name` and `team_name`. Exit code 2
|
|
156
195
|
uses stderr as feedback. A JSON output with `decision: "deny"` or
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bundle/qoder-worker-runtime.mjs
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34565645 bytes
|
|
4
|
+
sha256: fe52c7d0e4437844ad449c2c76b09035bf1b0ca14c3e82424e7f2dec0ae91a93
|
package/bundle/qoderclicn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bundle/qoderclicn.js
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34657710 bytes
|
|
4
|
+
sha256: a2c66b87a19634fce4e61d8b9c01c38f32c4e74f85c9c59e5f4b78d4618ea577
|