@arcjet/skills 1.12.0 → 1.13.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/dist/index.d.ts +8 -8
- package/dist/version.d.ts +2 -3
- package/dist/version.js +1 -1
- package/docs/guard.md +10 -4
- package/docs/mcp.md +1 -0
- package/package.json +3 -3
- package/skills/choose-protections/SKILL.md +1 -1
- package/skills/cli/SKILL.md +1 -1
- package/skills/guard/SKILL.md +10 -4
- package/skills/mcp/SKILL.md +6 -2
- package/skills/protect/SKILL.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,18 +3,18 @@ import { VERSION } from "./version.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* npm package name that TanStack Intent discovers as a skill source.
|
|
5
5
|
*/
|
|
6
|
-
declare const PACKAGE_NAME: "@arcjet/skills";
|
|
6
|
+
export declare const PACKAGE_NAME: "@arcjet/skills";
|
|
7
7
|
/**
|
|
8
8
|
* Leaf skill names shipped in this package. Each matches
|
|
9
9
|
* `skills/<name>/SKILL.md`.
|
|
10
10
|
*/
|
|
11
|
-
type SkillName = "choose-protections" | "cli" | "guard" | "mcp" | "protect";
|
|
11
|
+
export type SkillName = "choose-protections" | "cli" | "guard" | "mcp" | "protect";
|
|
12
12
|
/**
|
|
13
13
|
* Static manifest for one shipped skill. Intent reads the `SKILL.md` files
|
|
14
14
|
* themselves; this export is for TypeScript consumers who want identities
|
|
15
15
|
* without scanning `node_modules`.
|
|
16
16
|
*/
|
|
17
|
-
interface SkillManifest {
|
|
17
|
+
export interface SkillManifest {
|
|
18
18
|
readonly name: SkillName;
|
|
19
19
|
/**
|
|
20
20
|
* When to load this skill. Kept in sync with the `SKILL.md` description.
|
|
@@ -34,18 +34,18 @@ interface SkillManifest {
|
|
|
34
34
|
* Skills shipped in this package version. Load only the entry that matches
|
|
35
35
|
* the current task (`@arcjet/skills#<name>`).
|
|
36
36
|
*/
|
|
37
|
-
declare const skills: readonly SkillManifest[];
|
|
37
|
+
export declare const skills: readonly SkillManifest[];
|
|
38
38
|
/**
|
|
39
39
|
* Format a TanStack Intent load identity (`@arcjet/skills#protect`).
|
|
40
40
|
*/
|
|
41
|
-
declare function skillIdentity(name: SkillName): string;
|
|
41
|
+
export declare function skillIdentity(name: SkillName): string;
|
|
42
42
|
/**
|
|
43
43
|
* Look up one shipped skill by leaf name.
|
|
44
44
|
*/
|
|
45
|
-
declare function getSkill(name: SkillName): SkillManifest | undefined;
|
|
45
|
+
export declare function getSkill(name: SkillName): SkillManifest | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Package version these skills were published with.
|
|
48
48
|
*/
|
|
49
|
-
declare function skillLibraryVersion(): string;
|
|
49
|
+
export declare function skillLibraryVersion(): string;
|
|
50
50
|
//#endregion
|
|
51
|
-
export {
|
|
51
|
+
export { VERSION };
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/docs/guard.md
CHANGED
|
@@ -32,10 +32,9 @@ Declare rules at module scope so `.deniedResult(decision)` and
|
|
|
32
32
|
Call `guard()` where you already know the operation. Hardcode the `label`.
|
|
33
33
|
Do not interpolate names in a generic dispatcher.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
rate-limit `bucket` names may not.
|
|
35
|
+
Hardcode labels as slugs. Prefer lowercase letters, digits, `-`, and `.`
|
|
36
|
+
(`tools.get-weather`) so every SDK and the public docs accept them. Start
|
|
37
|
+
and end with a letter or digit; max 256 bytes. Do not interpolate user input.
|
|
39
38
|
|
|
40
39
|
```ts
|
|
41
40
|
const decision = await arcjet.guard("tools.get-weather", {
|
|
@@ -117,6 +116,13 @@ TanStack AI is `guardMiddleware` — do not use `guardTool` (an `execute`
|
|
|
117
116
|
throw is swallowed). JS Strands Agents is official `@strands-agents/sdk`,
|
|
118
117
|
not Python `strands`.
|
|
119
118
|
|
|
119
|
+
Every JS wrapper policy accepts optional `actor` and `inputs` (static values
|
|
120
|
+
or a resolver over that adapter's native call — parsed input plus trusted
|
|
121
|
+
runtime/context, like Vercel AI's `(input, ctx)`). Build each
|
|
122
|
+
input with `policyInput` so a remote policy that declares those names can
|
|
123
|
+
evaluate. Omit them and the remote policy has nothing to read — its rules do
|
|
124
|
+
not fire.
|
|
125
|
+
|
|
120
126
|
Every adapter uses one `ArcjetDenialResult` payload
|
|
121
127
|
(`{ arcjetDenied: true, reason, message, retryable }`). Delivery is
|
|
122
128
|
per-framework: return the object (AI SDK, Mastra, OpenAI Agents, Genkit
|
package/docs/mcp.md
CHANGED
|
@@ -71,4 +71,5 @@ OAuth. The first connection redirects to sign in with an Arcjet account.
|
|
|
71
71
|
- Bootstrap: `list-teams` → `list-sites` → `get-site-key` → write `ARCJET_KEY`
|
|
72
72
|
- Investigate: `analyze-traffic` → `list-requests` → `investigate-ip`
|
|
73
73
|
- Remote rules: `create-rule` (DRY_RUN) → `get-dry-run-impact` → `promote-rule`
|
|
74
|
+
- Guard policies: `list-guard-policies` → `describe-guard-policy` → `validate-guard-policy` → `put-guard-policy`. Authoring is MCP-only; the CLI has no policy commands. Application policies select by `label` / wrapper `action`. Coding-agent policies attach by **Execute on** (Tool call or Prompt), not by label.
|
|
74
75
|
- Briefing: `get-security-briefing`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcjet/skills",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Versioned Agent Skills for the Arcjet JavaScript SDK, shipped with TanStack Intent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"test": "npm run build && npm run test-coverage && npm run validate-skills && node ../.github/scripts/check-skill-source-stale.mjs"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@tanstack/intent": "0.
|
|
59
|
+
"@tanstack/intent": "0.4.0",
|
|
60
60
|
"@types/node": "22.20.1",
|
|
61
|
-
"tsdown": "0.
|
|
61
|
+
"tsdown": "0.23.0",
|
|
62
62
|
"typescript": "7.0.2"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
package/skills/cli/SKILL.md
CHANGED
package/skills/guard/SKILL.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: guard
|
|
3
3
|
description: "Add Arcjet Guard to non-HTTP JavaScript: agent tool calls, MCP handlers, queue workers, and background jobs. Use when there is no HTTP request object, or when the user asks to guard tools, rate-limit agent actions, or block prompt injection on tool arguments."
|
|
4
4
|
license: Apache-2.0
|
|
5
|
-
compatibility: JavaScript and TypeScript apps using @arcjet/guard on Node.js >=
|
|
5
|
+
compatibility: JavaScript and TypeScript apps using @arcjet/guard on Node.js >=22.21.0 <23 || >=24.5.0.
|
|
6
6
|
metadata:
|
|
7
7
|
author: arcjet
|
|
8
8
|
type: core
|
|
9
9
|
library: "@arcjet/skills"
|
|
10
|
-
library_version: "1.
|
|
10
|
+
library_version: "1.13.0" # x-release-please-version
|
|
11
11
|
sources:
|
|
12
12
|
- docs/guard.md
|
|
13
13
|
---
|
|
@@ -38,8 +38,8 @@ Declare rules at module scope so `.deniedResult(decision)` works.
|
|
|
38
38
|
|
|
39
39
|
Hardcode the `label`. Do not interpolate in a generic dispatcher.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
Hardcode labels as slugs. Prefer lowercase letters, digits, `-`, and `.`
|
|
42
|
+
(`tools.get-weather`). Start and end with a letter or digit.
|
|
43
43
|
|
|
44
44
|
```ts
|
|
45
45
|
const decision = await arcjet.guard("tools.get-weather", {
|
|
@@ -77,6 +77,12 @@ Wrappers fail closed by default. HITL (`needsApproval`, `interrupt()`,
|
|
|
77
77
|
`requireConfirmation`, `canUseTool`) is not a policy gate; Guard still runs
|
|
78
78
|
after a human yes.
|
|
79
79
|
|
|
80
|
+
Every wrapper policy accepts optional `actor` and `inputs` (static or a
|
|
81
|
+
resolver over that adapter's native call — parsed input plus trusted
|
|
82
|
+
runtime/context) so a remote policy that declares those names can evaluate. Build
|
|
83
|
+
each input with `policyInput`. Omit them and the remote policy has nothing
|
|
84
|
+
to read — its rules do not fire.
|
|
85
|
+
|
|
80
86
|
Google ADK is `guardPlugin` (no `guardTool`). TanStack AI is
|
|
81
87
|
`guardMiddleware` (do not wrap `execute`). LangChain `createAgent` is
|
|
82
88
|
`/langchain/v1`, not LangGraph.
|
package/skills/mcp/SKILL.md
CHANGED
|
@@ -7,7 +7,7 @@ metadata:
|
|
|
7
7
|
author: arcjet
|
|
8
8
|
type: core
|
|
9
9
|
library: "@arcjet/skills"
|
|
10
|
-
library_version: "1.
|
|
10
|
+
library_version: "1.13.0" # x-release-please-version
|
|
11
11
|
sources:
|
|
12
12
|
- docs/mcp.md
|
|
13
13
|
---
|
|
@@ -41,4 +41,8 @@ claude mcp add arcjet --transport http https://api.arcjet.com/mcp
|
|
|
41
41
|
Bootstrap: `list-teams` → `list-sites` → `get-site-key` → write `ARCJET_KEY`.
|
|
42
42
|
Investigate: `analyze-traffic`, `list-requests`, `list-guards`,
|
|
43
43
|
`investigate-ip`. Remote rules: `create-rule` (DRY_RUN) →
|
|
44
|
-
`get-dry-run-impact` → `promote-rule`.
|
|
44
|
+
`get-dry-run-impact` → `promote-rule`. Guard policies (MCP-only; no CLI
|
|
45
|
+
commands): `list-guard-policies` → `describe-guard-policy` →
|
|
46
|
+
`validate-guard-policy` → `put-guard-policy`. Application policies select by
|
|
47
|
+
`label` / `action`. Coding-agent policies attach by **Execute on** (Tool call
|
|
48
|
+
or Prompt).
|