@ory/amp 1.9.2 → 1.10.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.
- package/README.md +19 -5
- package/dist/cli/assets.js +8 -18
- package/dist/cli/main.js +40 -113
- package/dist/cli/setup.d.ts +26 -6
- package/dist/cli/setup.js +111 -81
- package/dist/delegate-config.d.ts +59 -0
- package/dist/delegate-config.js +234 -0
- package/dist/permission.d.ts +27 -5
- package/dist/permission.js +48 -15
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.js +50 -4
- package/dist/types.d.ts +32 -22
- package/dist/types.js +13 -11
- package/package.json +2 -2
package/dist/types.js
CHANGED
|
@@ -8,18 +8,20 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 1. Permission delegate helper (PRIMARY, blocking) — a standalone
|
|
10
10
|
* program named in `amp.permissions` as `{ tool, action: "delegate",
|
|
11
|
-
* to: "<program>" }`. Amp invokes it as a subprocess, passing the
|
|
12
|
-
* parameters as JSON on stdin
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* to: "<program>" }`. Amp invokes it as a subprocess, passing ONLY the
|
|
12
|
+
* tool parameters as JSON on stdin and the tool name and thread as the
|
|
13
|
+
* `AGENT_TOOL_NAME` and `AMP_THREAD_ID` environment variables. The
|
|
14
|
+
* program decides by exit code: 0 = allow, 1 = ask the user, ≥2 = reject
|
|
15
|
+
* (stderr → model reason). A 10-second delegate timeout applies (a
|
|
16
|
+
* timed-out delegate is treated as a reject). See `AmpDelegateInput`.
|
|
16
17
|
*
|
|
17
|
-
* 2. In-process plugin (SECONDARY
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* 2. In-process plugin (SECONDARY) — a default-exported factory placed
|
|
19
|
+
* under `.amp/plugins/*.ts` that receives a `PluginAPI` (the
|
|
20
|
+
* `@ampcode/plugin` contract). Runs under Bun's TypeScript runtime and
|
|
21
|
+
* owns advisory session-start auth, the sign-in notice, and post-tool
|
|
22
|
+
* activity. Its `tool.call` handler gates only the calls the delegate
|
|
23
|
+
* will not see (delegate not registered, or an earlier rule matches the
|
|
24
|
+
* tool first), so each call is checked once.
|
|
23
25
|
*
|
|
24
26
|
* We model the `@ampcode/plugin` API surface locally (the plugin package
|
|
25
27
|
* takes no harness SDK dependency — see AGENTS.md). The shapes mirror the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/amp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "Ory plugin for Amp (Sourcegraph's coding agent): a permission delegate that authorizes every tool call plus an in-process plugin for session auth and activity auditing",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://ory.com",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"reova": "^0.7.0",
|
|
73
|
-
"@ory/argus": "1.
|
|
73
|
+
"@ory/argus": "1.10.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"typescript": "^7.0.2"
|