@matatbread/matbot-triggers 0.4.7 → 0.4.12
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 +3 -3
- package/src/tools.ts +7 -2
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"node",
|
|
5
5
|
"browser"
|
|
6
6
|
],
|
|
7
|
-
"version": "0.4.
|
|
7
|
+
"version": "0.4.12",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=24.0.0"
|
|
10
10
|
},
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@matatbread/matbot-plugin-api": "^0.4.
|
|
36
|
+
"@matatbread/matbot-plugin-api": "^0.4.12"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "^6.0.3",
|
|
40
|
-
"@matatbread/matbot-plugin-api": "^0.4.
|
|
40
|
+
"@matatbread/matbot-plugin-api": "^0.4.12"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"typecheck": "tsc --noEmit"
|
package/src/tools.ts
CHANGED
|
@@ -11,7 +11,11 @@ declare module '@matatbread/matbot-plugin-api' {
|
|
|
11
11
|
| ToolContract<{ triggers: Trigger[] }, { action: 'query'; tool?: string; params?: object }>
|
|
12
12
|
| ToolContract<Trigger, { action: 'get'; id: string }>
|
|
13
13
|
| ToolContract<{ id: string }, { action: 'add'; conditions: TriggerCondition[]; tool: string; params?: object; enabled?: boolean; cooldown?: TriggerCooldown }>
|
|
14
|
-
|
|
14
|
+
// `cooldown: null` CLEARS every limit, which an omitted `cooldown` deliberately does not (it
|
|
15
|
+
// leaves the stored one untouched). The executor has always accepted it and the web UI has always
|
|
16
|
+
// sent it; only this arm omitted it, so a documented call was untypeable — invisible until the
|
|
17
|
+
// params type was actually enforced. `add` takes no `null`: there is no prior limit to clear.
|
|
18
|
+
| ToolContract<Trigger, { action: 'update'; id: string; conditions?: TriggerCondition[]; tool?: string; params?: object; enabled?: boolean; cooldown?: TriggerCooldown | null }>
|
|
15
19
|
| ToolContract<Trigger, { action: 'disable'; id: string }>
|
|
16
20
|
| ToolContract<Trigger, { action: 'enable'; id: string }>
|
|
17
21
|
| ToolContract<{ id: string }, { action: 'remove'; id: string }>
|
|
@@ -61,7 +65,8 @@ const GUIDANCE =
|
|
|
61
65
|
'consecutive turns). Absent ⇒ unlimited, which is right for most triggers: a trigger that captures ' +
|
|
62
66
|
'what the user just said SHOULD fire every turn, and rate-limiting it silently loses data. Use a ' +
|
|
63
67
|
'cool-down for triggers whose consequence is a self-directed steer (critique, verify, reconsider), ' +
|
|
64
|
-
'where matching every turn is correct but acting every turn is a spin.'
|
|
68
|
+
'where matching every turn is correct but acting every turn is a spin. On "update", omitting ' +
|
|
69
|
+
'`cooldown` leaves the stored limits untouched; pass `null` to clear them.';
|
|
65
70
|
|
|
66
71
|
type TriggerActionInput =
|
|
67
72
|
| { action: 'list' }
|