@ory/argus 1.2.3 → 1.3.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 +25 -0
- package/assets/skills/ory-build-agent/SKILL.md +1 -1
- package/assets/skills/ory-deploy-agent/SKILL.md +315 -0
- package/assets/skills/ory-deploy-openai-e2b/SKILL.md +289 -0
- package/assets/skills/ory-e2b-sandbox/SKILL.md +10 -6
- package/assets/skills/ory-temporal-worker/SKILL.md +4 -4
- package/dist/adapters.d.ts +11 -3
- package/dist/adapters.js +55 -13
- package/dist/agent-auth.d.ts +18 -7
- package/dist/agent-auth.js +120 -10
- package/dist/auth-store.d.ts +3 -3
- package/dist/auth-store.js +56 -12
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +1 -1
- package/dist/bash-parser.js +212 -47
- package/dist/build-info.json +4 -4
- package/dist/cli.js +5 -0
- package/dist/client.d.ts +15 -0
- package/dist/client.js +24 -7
- package/dist/config.d.ts +23 -3
- package/dist/config.js +202 -18
- package/dist/contract-suite.d.ts +0 -8
- package/dist/contract-suite.js +0 -1
- package/dist/event-reporter.d.ts +1 -0
- package/dist/event-reporter.js +19 -2
- package/dist/hook-timeout.d.ts +2 -2
- package/dist/hook-timeout.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -6
- package/dist/lifecycle.js +2 -1
- package/dist/local/configs.d.ts +2 -4
- package/dist/local/configs.js +2 -4
- package/dist/local/manager.js +4 -4
- package/dist/local/seed.d.ts +4 -4
- package/dist/local/seed.js +8 -10
- package/dist/permissions.d.ts +3 -3
- package/dist/permissions.js +26 -1
- package/dist/runtime-credential.d.ts +35 -0
- package/dist/runtime-credential.js +252 -1
- package/dist/runtime.d.ts +19 -12
- package/dist/runtime.js +69 -21
- package/dist/setup.js +3 -3
- package/dist/skills.d.ts +3 -5
- package/dist/skills.js +14 -5
- package/dist/subject.d.ts +2 -3
- package/dist/subject.js +10 -11
- package/dist/testing.d.ts +17 -0
- package/dist/testing.js +53 -0
- package/dist/tool-catalog.d.ts +17 -15
- package/dist/tool-catalog.js +239 -52
- package/dist/user-login.js +1 -1
- package/package.json +1 -1
package/dist/tool-catalog.js
CHANGED
|
@@ -35,6 +35,9 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
35
35
|
"Write",
|
|
36
36
|
"Edit",
|
|
37
37
|
"Bash",
|
|
38
|
+
"Monitor",
|
|
39
|
+
"PowerShell",
|
|
40
|
+
"Workflow",
|
|
38
41
|
"Glob",
|
|
39
42
|
"Grep",
|
|
40
43
|
"WebFetch",
|
|
@@ -45,6 +48,34 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
45
48
|
"TodoWrite",
|
|
46
49
|
"Agent",
|
|
47
50
|
"Task",
|
|
51
|
+
"Artifact",
|
|
52
|
+
"CronCreate",
|
|
53
|
+
"CronDelete",
|
|
54
|
+
"CronList",
|
|
55
|
+
"EndConversation",
|
|
56
|
+
"EnterPlanMode",
|
|
57
|
+
"EnterWorktree",
|
|
58
|
+
"ExitWorktree",
|
|
59
|
+
"ListAgents",
|
|
60
|
+
"ListMcpResourcesTool",
|
|
61
|
+
"LSP",
|
|
62
|
+
"PushNotification",
|
|
63
|
+
"ReadMcpResourceTool",
|
|
64
|
+
"RemoteTrigger",
|
|
65
|
+
"ReportFindings",
|
|
66
|
+
"ScheduleWakeup",
|
|
67
|
+
"SendFeedback",
|
|
68
|
+
"SendMessage",
|
|
69
|
+
"SendUserFile",
|
|
70
|
+
"ShareOnboardingGuide",
|
|
71
|
+
"SubagentHandback",
|
|
72
|
+
"TaskCreate",
|
|
73
|
+
"TaskGet",
|
|
74
|
+
"TaskList",
|
|
75
|
+
"TaskOutput",
|
|
76
|
+
"TaskStop",
|
|
77
|
+
"TaskUpdate",
|
|
78
|
+
"WaitForMcpServers",
|
|
48
79
|
],
|
|
49
80
|
// The Claude Agent SDK exposes the same built-in tool surface as Claude
|
|
50
81
|
// Code (it is the embeddable form of the same runtime), so the catalog
|
|
@@ -54,6 +85,9 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
54
85
|
"Write",
|
|
55
86
|
"Edit",
|
|
56
87
|
"Bash",
|
|
88
|
+
"Monitor",
|
|
89
|
+
"PowerShell",
|
|
90
|
+
"Workflow",
|
|
57
91
|
"Glob",
|
|
58
92
|
"Grep",
|
|
59
93
|
"WebFetch",
|
|
@@ -64,20 +98,67 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
64
98
|
"TodoWrite",
|
|
65
99
|
"Agent",
|
|
66
100
|
"Task",
|
|
101
|
+
"Artifact",
|
|
102
|
+
"CronCreate",
|
|
103
|
+
"CronDelete",
|
|
104
|
+
"CronList",
|
|
105
|
+
"EndConversation",
|
|
106
|
+
"EnterPlanMode",
|
|
107
|
+
"EnterWorktree",
|
|
108
|
+
"ExitWorktree",
|
|
109
|
+
"ListAgents",
|
|
110
|
+
"ListMcpResourcesTool",
|
|
111
|
+
"LSP",
|
|
112
|
+
"PushNotification",
|
|
113
|
+
"ReadMcpResourceTool",
|
|
114
|
+
"RemoteTrigger",
|
|
115
|
+
"ReportFindings",
|
|
116
|
+
"ScheduleWakeup",
|
|
117
|
+
"SendFeedback",
|
|
118
|
+
"SendMessage",
|
|
119
|
+
"SendUserFile",
|
|
120
|
+
"ShareOnboardingGuide",
|
|
121
|
+
"SubagentHandback",
|
|
122
|
+
"TaskCreate",
|
|
123
|
+
"TaskGet",
|
|
124
|
+
"TaskList",
|
|
125
|
+
"TaskOutput",
|
|
126
|
+
"TaskStop",
|
|
127
|
+
"TaskUpdate",
|
|
128
|
+
"WaitForMcpServers",
|
|
67
129
|
],
|
|
68
|
-
// Codex serializes its hook `tool_name` as `Bash` (shell)
|
|
69
|
-
// (file edits — `Write`/`Edit` are matcher aliases only)
|
|
70
|
-
// `mcp__<server>__<tool>` and aren't
|
|
71
|
-
// codex 0.
|
|
72
|
-
codex: ["Bash", "apply_patch"],
|
|
130
|
+
// Codex serializes its hook `tool_name` as `Bash` (shell), `apply_patch`
|
|
131
|
+
// (file edits — `Write`/`Edit` are matcher aliases only), and `webrun`
|
|
132
|
+
// (web access); MCP tools arrive as `mcp__<server>__<tool>` and aren't
|
|
133
|
+
// enumerable here. Verified against codex 0.155 (see packages/codex/src/types.ts).
|
|
134
|
+
codex: ["Bash", "apply_patch", "webrun", "spawn_agent"],
|
|
73
135
|
"gemini-cli": [
|
|
136
|
+
"run_shell_command",
|
|
137
|
+
"shell",
|
|
138
|
+
"glob",
|
|
139
|
+
"grep_search",
|
|
140
|
+
"list_directory",
|
|
74
141
|
"read_file",
|
|
142
|
+
"read_many_files",
|
|
143
|
+
"replace",
|
|
75
144
|
"write_file",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
145
|
+
"write_todos",
|
|
146
|
+
"tracker_create_task",
|
|
147
|
+
"tracker_update_task",
|
|
148
|
+
"tracker_get_task",
|
|
149
|
+
"tracker_list_tasks",
|
|
150
|
+
"tracker_add_dependency",
|
|
151
|
+
"tracker_visualize",
|
|
152
|
+
"list_mcp_resources",
|
|
153
|
+
"read_mcp_resource",
|
|
154
|
+
"activate_skill",
|
|
155
|
+
"get_internal_docs",
|
|
156
|
+
"enter_plan_mode",
|
|
157
|
+
"update_topic",
|
|
158
|
+
"complete_task",
|
|
159
|
+
"invoke_agent",
|
|
160
|
+
"google_web_search",
|
|
161
|
+
"web_fetch",
|
|
81
162
|
],
|
|
82
163
|
// OpenClaw's built-in tool ids (docs.openclaw.ai/tools): shell is `exec`,
|
|
83
164
|
// file ops are `read`/`write`/`edit`/`apply_patch`, plus web + browser.
|
|
@@ -90,18 +171,107 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
90
171
|
"web_search",
|
|
91
172
|
"web_fetch",
|
|
92
173
|
"browser",
|
|
174
|
+
"process",
|
|
175
|
+
"code_execution",
|
|
176
|
+
"x_search",
|
|
177
|
+
"secrets",
|
|
178
|
+
"message",
|
|
179
|
+
"gateway",
|
|
180
|
+
"plugins",
|
|
181
|
+
"nodes",
|
|
182
|
+
"computer",
|
|
183
|
+
"screen",
|
|
184
|
+
"theme",
|
|
185
|
+
"dashboard",
|
|
186
|
+
"terminal",
|
|
187
|
+
"portal",
|
|
188
|
+
"canvas",
|
|
189
|
+
"show_widget",
|
|
190
|
+
"sessions",
|
|
191
|
+
"sessions_list",
|
|
192
|
+
"sessions_history",
|
|
193
|
+
"sessions_search",
|
|
194
|
+
"sessions_send",
|
|
195
|
+
"sessions_spawn",
|
|
196
|
+
"sessions_yield",
|
|
197
|
+
"subagents",
|
|
198
|
+
"session_status",
|
|
199
|
+
"memory_search",
|
|
200
|
+
"memory_get",
|
|
201
|
+
"agents_list",
|
|
202
|
+
"get_goal",
|
|
203
|
+
"create_goal",
|
|
204
|
+
"update_goal",
|
|
205
|
+
"progress_card",
|
|
206
|
+
"view_image",
|
|
207
|
+
"image_generate",
|
|
208
|
+
"music_generate",
|
|
209
|
+
"video_generate",
|
|
210
|
+
"tts",
|
|
211
|
+
"pdf",
|
|
212
|
+
],
|
|
213
|
+
opencode: [
|
|
214
|
+
"read",
|
|
215
|
+
"write",
|
|
216
|
+
"edit",
|
|
217
|
+
"bash",
|
|
218
|
+
"glob",
|
|
219
|
+
"grep",
|
|
220
|
+
"webfetch",
|
|
221
|
+
"apply_patch",
|
|
222
|
+
"skill",
|
|
223
|
+
"todowrite",
|
|
224
|
+
"websearch",
|
|
225
|
+
"task",
|
|
226
|
+
"lsp",
|
|
227
|
+
"execute",
|
|
228
|
+
],
|
|
229
|
+
continue: [
|
|
230
|
+
"Edit",
|
|
231
|
+
"Exit",
|
|
232
|
+
"Fetch",
|
|
233
|
+
"List",
|
|
234
|
+
"MultiEdit",
|
|
235
|
+
"Read",
|
|
236
|
+
"ReportFailure",
|
|
237
|
+
"Bash",
|
|
238
|
+
"Search",
|
|
239
|
+
"Status",
|
|
240
|
+
"Subagent",
|
|
241
|
+
"Skills",
|
|
242
|
+
"UploadArtifact",
|
|
243
|
+
"Diff",
|
|
244
|
+
"Checklist",
|
|
245
|
+
"Write",
|
|
93
246
|
],
|
|
94
|
-
opencode: ["read", "write", "edit", "bash", "glob", "grep", "webfetch"],
|
|
95
|
-
continue: ["Bash", "Read", "Edit", "Write", "Grep", "Glob", "WebSearch"],
|
|
96
247
|
goose: [
|
|
248
|
+
"analyze",
|
|
249
|
+
"write",
|
|
250
|
+
"edit",
|
|
97
251
|
"shell",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
252
|
+
"tree",
|
|
253
|
+
"read_image",
|
|
254
|
+
"todo__todo_write",
|
|
255
|
+
"apps__list_apps",
|
|
256
|
+
"apps__create_app",
|
|
257
|
+
"apps__iterate_app",
|
|
258
|
+
"apps__delete_app",
|
|
259
|
+
"extensionmanager__search_available_extensions",
|
|
260
|
+
"extensionmanager__manage_extensions",
|
|
261
|
+
"extensionmanager__list_resources",
|
|
262
|
+
"extensionmanager__read_resource",
|
|
263
|
+
"load",
|
|
264
|
+
"delegate",
|
|
265
|
+
"load_skill",
|
|
103
266
|
],
|
|
104
267
|
cline: [
|
|
268
|
+
"read_files",
|
|
269
|
+
"search_codebase",
|
|
270
|
+
"run_commands",
|
|
271
|
+
"fetch_web_content",
|
|
272
|
+
"apply_patch",
|
|
273
|
+
"editor",
|
|
274
|
+
"skills",
|
|
105
275
|
"execute_command",
|
|
106
276
|
"read_file",
|
|
107
277
|
"write_to_file",
|
|
@@ -109,6 +279,7 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
109
279
|
"search_files",
|
|
110
280
|
"list_files",
|
|
111
281
|
"use_mcp_tool",
|
|
282
|
+
"browser_action",
|
|
112
283
|
],
|
|
113
284
|
amp: [
|
|
114
285
|
"Bash",
|
|
@@ -125,8 +296,15 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
125
296
|
"todo_write",
|
|
126
297
|
"oracle",
|
|
127
298
|
"Task",
|
|
299
|
+
"create_thread",
|
|
300
|
+
"list_agent_modes",
|
|
301
|
+
"get_thread_status",
|
|
302
|
+
"send_thread_message",
|
|
303
|
+
"wait_for_threads",
|
|
128
304
|
],
|
|
129
305
|
pi: ["read", "write", "edit", "bash", "grep", "find", "ls"],
|
|
306
|
+
// This adapter remains pinned to the agy 1.0.13 hook contract. Antigravity
|
|
307
|
+
// 2.0 changes both these names and the hook payload/response schema.
|
|
130
308
|
antigravity: [
|
|
131
309
|
"run_command",
|
|
132
310
|
"view_file",
|
|
@@ -140,23 +318,9 @@ exports.HARNESS_TOOL_CATALOG = {
|
|
|
140
318
|
"search_web",
|
|
141
319
|
"call_mcp_tool",
|
|
142
320
|
],
|
|
143
|
-
// Cursor's `preToolUse`
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
// `beforeShellExecution` / `beforeMCPExecution` hooks (logged, not gated,
|
|
147
|
-
// to avoid double-gating). Bootstrap seeds the categories the agent gate
|
|
148
|
-
// actually checks. Best-effort — verify against your Cursor version.
|
|
149
|
-
cursor: [
|
|
150
|
-
"Read",
|
|
151
|
-
"Write",
|
|
152
|
-
"Edit",
|
|
153
|
-
"Delete",
|
|
154
|
-
"Shell",
|
|
155
|
-
"List",
|
|
156
|
-
"Search",
|
|
157
|
-
"MCP",
|
|
158
|
-
"Task",
|
|
159
|
-
],
|
|
321
|
+
// Cursor's documented `preToolUse` matcher categories. MCP calls arrive as
|
|
322
|
+
// dynamic `MCP:<tool_name>` values and are intentionally omitted here.
|
|
323
|
+
cursor: ["Read", "Write", "Grep", "Delete", "Shell", "Task"],
|
|
160
324
|
};
|
|
161
325
|
exports.KNOWN_HARNESSES = Object.keys(exports.HARNESS_TOOL_CATALOG);
|
|
162
326
|
/**
|
|
@@ -190,20 +354,20 @@ exports.ALL_TOOLS = Array.from(new Set(Object.values(exports.HARNESS_TOOL_CATALO
|
|
|
190
354
|
* applied to every harness).
|
|
191
355
|
*/
|
|
192
356
|
exports.INTERACTIVE_TOOL_CATALOG = {
|
|
193
|
-
"claude-code": ["AskUserQuestion", "ExitPlanMode"
|
|
357
|
+
"claude-code": ["AskUserQuestion", "ExitPlanMode"],
|
|
194
358
|
// Same runtime as Claude Code — the SDK delivers the same
|
|
195
359
|
// user-interaction primitives through PreToolUse.
|
|
196
|
-
"claude-agent-sdk": ["AskUserQuestion", "ExitPlanMode"
|
|
360
|
+
"claude-agent-sdk": ["AskUserQuestion", "ExitPlanMode"],
|
|
197
361
|
codex: [],
|
|
198
|
-
"gemini-cli": [],
|
|
199
|
-
openclaw: [],
|
|
200
|
-
opencode: [],
|
|
201
|
-
continue: [],
|
|
362
|
+
"gemini-cli": ["ask_user", "exit_plan_mode"],
|
|
363
|
+
openclaw: ["ask_user"],
|
|
364
|
+
opencode: ["question", "plan_exit"],
|
|
365
|
+
continue: ["AskQuestion"],
|
|
202
366
|
goose: [],
|
|
203
|
-
cline: [],
|
|
367
|
+
cline: ["ask_question", "submit_and_exit"],
|
|
204
368
|
amp: [],
|
|
205
369
|
pi: [],
|
|
206
|
-
antigravity: [],
|
|
370
|
+
antigravity: ["ask_question"],
|
|
207
371
|
cursor: [],
|
|
208
372
|
};
|
|
209
373
|
function parseEnvInteractiveTools() {
|
|
@@ -245,21 +409,21 @@ function isInteractiveTool(harness, toolName) {
|
|
|
245
409
|
* precise map is used rather than the {@link isBashLikeTool} heuristic.
|
|
246
410
|
*/
|
|
247
411
|
exports.SHELL_TOOL_CATALOG = {
|
|
248
|
-
"claude-code": ["Bash"],
|
|
249
|
-
"claude-agent-sdk": ["Bash"],
|
|
412
|
+
"claude-code": ["Bash", "Monitor", "PowerShell"],
|
|
413
|
+
"claude-agent-sdk": ["Bash", "Monitor", "PowerShell"],
|
|
250
414
|
codex: ["Bash"],
|
|
251
|
-
// Gemini CLI
|
|
252
|
-
//
|
|
253
|
-
|
|
254
|
-
"gemini-cli": ["shell", "run_shell_command"],
|
|
415
|
+
// Current Gemini CLI releases emit the canonical `run_shell_command` id.
|
|
416
|
+
// `ORY_SHELL_TOOLS` remains the escape hatch for vendor renames.
|
|
417
|
+
"gemini-cli": ["run_shell_command", "shell"],
|
|
255
418
|
openclaw: ["exec"],
|
|
256
419
|
opencode: ["bash"],
|
|
257
420
|
continue: ["Bash"],
|
|
258
421
|
goose: ["shell"],
|
|
259
|
-
cline: ["execute_command"],
|
|
422
|
+
cline: ["run_commands", "execute_command"],
|
|
260
423
|
amp: ["Bash"],
|
|
261
424
|
pi: ["bash"],
|
|
262
425
|
antigravity: ["run_command"],
|
|
426
|
+
cursor: ["Shell"],
|
|
263
427
|
};
|
|
264
428
|
function parseEnvList(raw) {
|
|
265
429
|
if (!raw)
|
|
@@ -346,16 +510,39 @@ const SHELL_COMMAND_FIELDS = [
|
|
|
346
510
|
"commandLine",
|
|
347
511
|
"CommandLine",
|
|
348
512
|
];
|
|
513
|
+
const UNRESOLVED_SHELL_COMMAND = "$ORY_UNRESOLVED_SHELL_COMMAND";
|
|
514
|
+
function extractClineRunCommands(args) {
|
|
515
|
+
if (!args || typeof args !== "object")
|
|
516
|
+
return [UNRESOLVED_SHELL_COMMAND];
|
|
517
|
+
const value = args.commands;
|
|
518
|
+
if (typeof value !== "string")
|
|
519
|
+
return [UNRESOLVED_SHELL_COMMAND];
|
|
520
|
+
try {
|
|
521
|
+
const commands = JSON.parse(value);
|
|
522
|
+
if (!Array.isArray(commands) || !commands.every((command) => typeof command === "string")) {
|
|
523
|
+
return [UNRESOLVED_SHELL_COMMAND];
|
|
524
|
+
}
|
|
525
|
+
return commands.length > 0 ? commands : undefined;
|
|
526
|
+
}
|
|
527
|
+
catch {
|
|
528
|
+
return [UNRESOLVED_SHELL_COMMAND];
|
|
529
|
+
}
|
|
530
|
+
}
|
|
349
531
|
/**
|
|
350
|
-
* Extract
|
|
532
|
+
* Extract shell command strings from a harness's tool-args object — the same
|
|
351
533
|
* object the handler already passes to `summarizeToolInput`. Returns `undefined`
|
|
352
534
|
* when the tool isn't a shell tool for this harness or no command field is
|
|
353
|
-
* present
|
|
354
|
-
*
|
|
535
|
+
* present. Cline's `run_commands` is the exception: malformed command data is
|
|
536
|
+
* represented as an unresolvable command so enforce mode fails closed. Cline's
|
|
537
|
+
* command array remains an array so independently executed entries cannot
|
|
538
|
+
* change how neighboring entries parse.
|
|
355
539
|
*/
|
|
356
540
|
function extractShellCommand(harness, toolName, args) {
|
|
357
541
|
if (!isShellTool(harness, toolName))
|
|
358
542
|
return undefined;
|
|
543
|
+
if (harness === "cline" && toolName === "run_commands") {
|
|
544
|
+
return extractClineRunCommands(args);
|
|
545
|
+
}
|
|
359
546
|
if (!args || typeof args !== "object")
|
|
360
547
|
return undefined;
|
|
361
548
|
const obj = args;
|
package/dist/user-login.js
CHANGED
|
@@ -95,7 +95,7 @@ async function ensureUserAuthenticated(client, options) {
|
|
|
95
95
|
function attachUserPrincipal(client, decision) {
|
|
96
96
|
if (decision.mode === "ok" || decision.mode === "refreshed") {
|
|
97
97
|
// Tokens were just persisted (or are still valid); pull them so
|
|
98
|
-
// downstream code (
|
|
98
|
+
// downstream code (for example Talos enrollment) can use the
|
|
99
99
|
// user's bearer as an initial access token.
|
|
100
100
|
const tokens = (0, auth_store_js_1.loadTokens)();
|
|
101
101
|
const subject = decision.subject ?? tokens?.subject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/argus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Ory Argus: the core API for building authentication, authorization, and audit into AI agent harness plugins, extensions, and custom integrations",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://ory.com",
|