@agentrq/agentrq-ws 0.7.7 → 0.8.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 +5 -1
- package/package.json +1 -1
- package/src/commands.js +50 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npx -y @agentrq/agentrq-ws@latest workspace
|
|
|
20
20
|
|
|
21
21
|
An agent talks to its workspace over MCP, which is the right shape for an agent
|
|
22
22
|
and the wrong shape for a person: every call is a JSON envelope, and every
|
|
23
|
-
answer is tokens the agent pays for. The same
|
|
23
|
+
answer is tokens the agent pays for. The same fifteen tools are underneath this
|
|
24
24
|
CLI, but a command is a line of shell and the answer is plain text.
|
|
25
25
|
|
|
26
26
|
It is also the difference between reading an attachment and *handling* one — see
|
|
@@ -52,6 +52,10 @@ Node 20.6 or newer.
|
|
|
52
52
|
| `memory load [name]` | Read a workspace memory (defaults to the index) |
|
|
53
53
|
| `memory save [name] --content …` | Replace a workspace memory |
|
|
54
54
|
| `memory delete [name]` | Delete a workspace memory |
|
|
55
|
+
| `skill search [q]` | Find the skills this workspace can use, by name or description; `--limit`/`--offset` page |
|
|
56
|
+
| `skill load <uri>` | Read a skill file (`skill://<name>` reads its `SKILL.md`) |
|
|
57
|
+
| `skill save <uri> --content …` | Replace a file of one of this workspace's skills |
|
|
58
|
+
| `skill delete <uri>` | Delete a skill (`skill://<name>`) or one of its files |
|
|
55
59
|
| `event publish <name>` | Publish a named event |
|
|
56
60
|
| `ask <taskId> <message>` | Ask the human a question and wait |
|
|
57
61
|
| `tools` | List the tools this workspace server offers |
|
package/package.json
CHANGED
package/src/commands.js
CHANGED
|
@@ -265,6 +265,56 @@ export const COMMANDS = [
|
|
|
265
265
|
return ctx.client.callTool('deleteMemory', { name: ctx.positionals[0] })
|
|
266
266
|
},
|
|
267
267
|
},
|
|
268
|
+
{
|
|
269
|
+
path: ['skill', 'search'],
|
|
270
|
+
summary: 'Find the skills this workspace can use, by name or description',
|
|
271
|
+
usage: 'agentrq-ws skill search [q] [--limit N] [--offset N]',
|
|
272
|
+
options: {
|
|
273
|
+
limit: { type: 'string', description: 'How many to return (at most 100; default all)' },
|
|
274
|
+
offset: { type: 'string', description: 'How many matches to skip' },
|
|
275
|
+
},
|
|
276
|
+
async run(ctx) {
|
|
277
|
+
const args = {}
|
|
278
|
+
if (ctx.positionals.length) args.q = ctx.positionals.join(' ')
|
|
279
|
+
for (const key of ['limit', 'offset']) {
|
|
280
|
+
if (ctx.values[key] === undefined) continue
|
|
281
|
+
const n = Number(ctx.values[key])
|
|
282
|
+
if (!Number.isInteger(n) || n < 0) throw new UserError(`--${key} must be a whole number, 0 or more`)
|
|
283
|
+
args[key] = n
|
|
284
|
+
}
|
|
285
|
+
return ctx.client.callTool('searchSkills', args)
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
path: ['skill', 'load'],
|
|
290
|
+
summary: 'Read a skill file (skill://<name> reads its SKILL.md)',
|
|
291
|
+
usage: 'agentrq-ws skill load <uri>',
|
|
292
|
+
async run(ctx) {
|
|
293
|
+
return ctx.client.callTool('loadSkill', { uri: requirePositional(ctx.positionals, 0, 'uri') })
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
path: ['skill', 'save'],
|
|
298
|
+
summary: 'Replace a file of one of this workspace\'s skills',
|
|
299
|
+
usage: 'agentrq-ws skill save <uri> --content TEXT|@file|-',
|
|
300
|
+
options: {
|
|
301
|
+
content: { type: 'string', short: 'C', description: 'The full new content (@file or - for stdin)' },
|
|
302
|
+
},
|
|
303
|
+
async run(ctx) {
|
|
304
|
+
const uri = requirePositional(ctx.positionals, 0, 'uri')
|
|
305
|
+
if (ctx.values.content === undefined) throw new UserError('--content is required (use @file or - to read from stdin)')
|
|
306
|
+
const content = await resolveText(ctx.values.content, { stdin: ctx.stdin, what: 'the skill file' })
|
|
307
|
+
return ctx.client.callTool('saveSkill', { uri, content })
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
path: ['skill', 'delete'],
|
|
312
|
+
summary: 'Delete a skill (skill://<name>) or one of its files',
|
|
313
|
+
usage: 'agentrq-ws skill delete <uri>',
|
|
314
|
+
async run(ctx) {
|
|
315
|
+
return ctx.client.callTool('deleteSkill', { uri: requirePositional(ctx.positionals, 0, 'uri') })
|
|
316
|
+
},
|
|
317
|
+
},
|
|
268
318
|
{
|
|
269
319
|
path: ['event', 'publish'],
|
|
270
320
|
summary: 'Publish a named event',
|