@directive-run/claude-plugin 1.21.0 → 1.22.0
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/README.md
CHANGED
|
@@ -6,14 +6,14 @@ The package has two install paths: **Claude Code's plugin marketplace** for end
|
|
|
6
6
|
|
|
7
7
|
## Install for Claude Code (canonical)
|
|
8
8
|
|
|
9
|
-
Two steps in a Claude Code session
|
|
9
|
+
Two steps in a Claude Code session – first register the marketplace, then install the plugin:
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
/plugin marketplace add directive-run/directive
|
|
13
13
|
/plugin install directive@directive-plugins
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
After install, verify the plugin is active with `/plugins`
|
|
16
|
+
After install, verify the plugin is active with `/plugins` – you should see `directive` in the list.
|
|
17
17
|
|
|
18
18
|
## Install for tool authors (npm)
|
|
19
19
|
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
const names = listSkills();
|
|
37
37
|
// → ["building-ai-agents", "building-ai-orchestrators", ...]
|
|
38
38
|
|
|
39
|
-
// One skill
|
|
39
|
+
// One skill – manifest + supporting files
|
|
40
40
|
const skill = getSkill("building-ai-orchestrators");
|
|
41
41
|
skill?.manifest; // SKILL.md (with YAML frontmatter)
|
|
42
42
|
skill?.files.get("examples"); // examples.md contents
|
|
@@ -48,7 +48,7 @@ const all = getAllSkills(); // Map<string, Skill>
|
|
|
48
48
|
const ex = getSkillFile("building-ai-orchestrators", "examples");
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
The npm install path is not a replacement for the Claude Code plugin install
|
|
51
|
+
The npm install path is not a replacement for the Claude Code plugin install – it does not register the skills with Claude Code itself. It only exposes the same `skills/` directory as a typed module so other tools can read it.
|
|
52
52
|
|
|
53
53
|
## What happens after install
|
|
54
54
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directive-run/claude-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Claude Code plugin for Directive — 12 skills covering modules, constraints, resolvers, derivations, AI orchestration, and adapters. Installable via Claude Code's plugin marketplace or consumable programmatically as an npm package.",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"author": "Jason Comes",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"tsx": "^4.19.2",
|
|
53
53
|
"typescript": "^5.7.2",
|
|
54
54
|
"vitest": "^3.0.0",
|
|
55
|
-
"@directive-run/knowledge": "1.
|
|
55
|
+
"@directive-run/knowledge": "1.22.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsx scripts/build-skills.ts && tsup",
|
|
@@ -156,7 +156,8 @@ seven pieces of work, zero `useEffect` hooks.
|
|
|
156
156
|
- [`sources.md`](./sources.md) — the source primitive's full lifecycle
|
|
157
157
|
and recipes.
|
|
158
158
|
- [`constraints.md`](./constraints.md) — `when` predicates, requirement
|
|
159
|
-
shapes, and the `
|
|
159
|
+
shapes, and the `abortOn` field-scoped CAS contract (v1; `bind:` is a
|
|
160
|
+
v2 reservation – see RFC 0003 Future Work).
|
|
160
161
|
- [`resolvers.md`](./resolvers.md) — retry config, batch semantics, and
|
|
161
162
|
the `ctx.set` write contract.
|
|
162
163
|
- [`anti-patterns.md`](./anti-patterns.md) — the things to avoid that
|
|
@@ -63,7 +63,7 @@ Website: https://directive.run
|
|
|
63
63
|
### Advanced Patterns
|
|
64
64
|
- [Overview](https://directive.run/docs/advanced/overview)
|
|
65
65
|
- [Data-form Definitions](https://directive.run/docs/data-triggers)
|
|
66
|
-
- [Resolver Binding
|
|
66
|
+
- [Resolver Binding](https://directive.run/docs/resolver-binding)
|
|
67
67
|
- [Multi-Module](https://directive.run/docs/advanced/multi-module)
|
|
68
68
|
- [Runtime Dynamics](https://directive.run/docs/advanced/runtime)
|
|
69
69
|
- [History & Snapshots](https://directive.run/docs/advanced/history)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Resolvers
|
|
2
2
|
|
|
3
|
-
> Covers `@directive-run/core` — resolver definition: retry policies, batching, cancellation, custom dedup keys, `
|
|
3
|
+
> Covers `@directive-run/core` — resolver definition: retry policies, batching, cancellation, custom dedup keys, `abortOn` binding.
|
|
4
4
|
|
|
5
5
|
Resolvers fulfill requirements emitted by constraints. They are the supply side of the constraint-resolver pattern. Resolvers handle async work and mutate state through `context.facts`.
|
|
6
6
|
|
|
@@ -205,6 +205,31 @@ resolvers: {
|
|
|
205
205
|
|
|
206
206
|
Failed items from `resolveBatchWithResults` can be individually retried if a retry policy is configured.
|
|
207
207
|
|
|
208
|
+
## `abortOn` binding (constraint-side)
|
|
209
|
+
|
|
210
|
+
Declared on the *constraint*, not the resolver. Lists facts whose values
|
|
211
|
+
must remain unchanged between dispatch and the resolver's writes; if any
|
|
212
|
+
of them changes mid-flight, the resolver's writes are dropped and its
|
|
213
|
+
signal is aborted.
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
constraints: {
|
|
217
|
+
finalizeKyc: {
|
|
218
|
+
when: (f) => f.kyc.status === "pending",
|
|
219
|
+
require: { type: "FINALIZE_KYC" },
|
|
220
|
+
abortOn: ["kyc.status"], // abort if `kyc.status` changes mid-flight
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
`abortOn:` does **not** lock or gate other writers. It only protects this
|
|
226
|
+
resolver from clobbering with stale data when its tail write attempts a
|
|
227
|
+
value the world has since moved past. See
|
|
228
|
+
[`/docs/resolver-binding`](https://directive.run/docs/resolver-binding)
|
|
229
|
+
for the full lifecycle, ABA caveats, and the audit event
|
|
230
|
+
(`resolver.write.rejected { reason: "clobbered" }`) that fires on a
|
|
231
|
+
dropped write.
|
|
232
|
+
|
|
208
233
|
## Timeout
|
|
209
234
|
|
|
210
235
|
```typescript
|