@agentclutch/action-card 0.7.3-alpha.0 → 0.7.3-alpha.1

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.
Files changed (2) hide show
  1. package/README.md +40 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,7 +6,7 @@ This package is part of [AgentClutch](https://github.com/MelaBuilt-AI/agentclutc
6
6
 
7
7
  ## Status
8
8
 
9
- `0.7.3-alpha.0` is prepared as the first npm alpha version. Publish with the `alpha` dist-tag only until AgentClutch is stable.
9
+ `0.7.3-alpha.1` is the latest published npm alpha version. Prefer installing with the explicit `@alpha` tag until AgentClutch is stable.
10
10
 
11
11
  ## Install
12
12
 
@@ -14,14 +14,49 @@ This package is part of [AgentClutch](https://github.com/MelaBuilt-AI/agentclutc
14
14
  pnpm add @agentclutch/action-card@alpha
15
15
  ```
16
16
 
17
- ## Usage
17
+ ## Minimal usage
18
18
 
19
19
  ```ts
20
- import { buildActionCard } from "@agentclutch/action-card";
20
+ import { buildActionCard, validateActionCard } from "@agentclutch/action-card";
21
+
22
+ const card = buildActionCard({
23
+ id: "card_send_email_001",
24
+ run_id: "run_send_email_001",
25
+ agent: { name: "example-agent", runtime: "custom" },
26
+ proposed_action: {
27
+ id: "action_send_email_001",
28
+ kind: "email.send",
29
+ label: "Send follow-up email",
30
+ surface: "email",
31
+ target: {
32
+ surface: "email",
33
+ target_app: "Example Mail",
34
+ },
35
+ changed_fields: [
36
+ { field: "to", after: "customer@example.com", editable: true },
37
+ { field: "subject", after: "Thanks for the call", editable: true },
38
+ ],
39
+ },
40
+ consequence: {
41
+ class: "external_message_send",
42
+ label: "External message send",
43
+ reversibility: "residue_remains",
44
+ blast_radius: "team",
45
+ requires_confirmation: true,
46
+ },
47
+ risk: {
48
+ level: "medium",
49
+ score: 55,
50
+ reasons: ["The email may be read or forwarded by the recipient."],
51
+ },
52
+ });
53
+
54
+ const result = validateActionCard(card);
55
+ if (!result.success) throw new Error("Invalid Action Card");
21
56
  ```
22
57
 
23
58
  ## Package role
24
59
 
25
- Action Card types, schema, builders, and validation.
60
+ Use this package when you need the standalone Action Card model: types, schema validation, builders, and low-level UI data contracts.
26
61
 
27
- See the root AgentClutch README and `docs/quickstart.md` for full setup, demos, and caveats.
62
+ Links: [root README](../../README.md), [quickstart](../../docs/quickstart.md), [known limitations](../../docs/limitations.md), [security policy](../../SECURITY.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentclutch/action-card",
3
- "version": "0.7.3-alpha.0",
3
+ "version": "0.7.3-alpha.1",
4
4
  "description": "TypeScript types, schemas, builders, and validation for AgentClutch Action Cards.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",