overlord-cli 5.13.0 → 5.15.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/bin/_cli/protocol.mjs
CHANGED
|
@@ -834,6 +834,33 @@ async function protocolDeliver(args) {
|
|
|
834
834
|
// objective attachments
|
|
835
835
|
// ---------------------------------------------------------------------------
|
|
836
836
|
|
|
837
|
+
async function protocolAttachmentList(args) {
|
|
838
|
+
const flags = parseFlags(args);
|
|
839
|
+
const { sessionKey, ticketId } = resolveSessionFlags(flags);
|
|
840
|
+
if (!sessionKey) throw new Error('--session-key is required (or set SESSION_KEY)');
|
|
841
|
+
if (!ticketId) throw new Error('--ticket-id is required (or set TICKET_ID)');
|
|
842
|
+
|
|
843
|
+
const { platformUrl, bearerToken, localSecret, organizationId } = await resolveAuth();
|
|
844
|
+
const timeoutMs = resolveTimeout(flags);
|
|
845
|
+
|
|
846
|
+
const body = {
|
|
847
|
+
sessionKey,
|
|
848
|
+
ticketId,
|
|
849
|
+
...(flags['objective-id'] ? { objectiveId: String(flags['objective-id']) } : {})
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
const data = await apiPost(
|
|
853
|
+
platformUrl,
|
|
854
|
+
bearerToken,
|
|
855
|
+
localSecret,
|
|
856
|
+
organizationId,
|
|
857
|
+
'/api/protocol/attachments/list',
|
|
858
|
+
body,
|
|
859
|
+
timeoutMs
|
|
860
|
+
);
|
|
861
|
+
console.log(JSON.stringify(data, null, 2));
|
|
862
|
+
}
|
|
863
|
+
|
|
837
864
|
async function protocolAttachmentPrepareUpload(args) {
|
|
838
865
|
const flags = parseFlags(args);
|
|
839
866
|
const { sessionKey, ticketId } = resolveSessionFlags(flags);
|
|
@@ -1365,6 +1392,7 @@ Subcommands:
|
|
|
1365
1392
|
read-context Read shared persistent context for this ticket
|
|
1366
1393
|
write-context Write shared persistent context for future sessions
|
|
1367
1394
|
deliver Finish work, send artifacts, and move the ticket to review
|
|
1395
|
+
attachment-list List objective attachments visible to the current session
|
|
1368
1396
|
attachment-prepare-upload Get a signed upload URL for an objective attachment
|
|
1369
1397
|
attachment-finalize-upload Finalize an uploaded attachment row after storage upload
|
|
1370
1398
|
attachment-download-url Get a signed download URL for an existing attachment
|
|
@@ -1597,6 +1625,15 @@ create:
|
|
|
1597
1625
|
Standalone create auto-discovers the project from the current working directory unless --personal is set.
|
|
1598
1626
|
Follow-up create requires both --session-key and --ticket-id.
|
|
1599
1627
|
|
|
1628
|
+
attachment-list:
|
|
1629
|
+
Required:
|
|
1630
|
+
--session-key <key>
|
|
1631
|
+
--ticket-id <id>
|
|
1632
|
+
Optional:
|
|
1633
|
+
--objective-id <id> Filter to a single objective
|
|
1634
|
+
Returns:
|
|
1635
|
+
JSON array of { id, label, content_type, file_size, objective_id, storage_path, created_at }
|
|
1636
|
+
|
|
1600
1637
|
attachment-prepare-upload:
|
|
1601
1638
|
Required:
|
|
1602
1639
|
--session-key <key>
|
|
@@ -1661,6 +1698,7 @@ Examples:
|
|
|
1661
1698
|
ovld protocol ask --session-key <key> --ticket-id <id> --question-file ./question.txt
|
|
1662
1699
|
ovld protocol read-context --session-key <key> --ticket-id <id> --query arch --limit 5
|
|
1663
1700
|
ovld protocol write-context --session-key <key> --ticket-id <id> --key "arch" --value '"monorepo"' --tags repo,agent
|
|
1701
|
+
ovld protocol attachment-list --session-key <key> --ticket-id <id>
|
|
1664
1702
|
ovld protocol attachment-prepare-upload --session-key <key> --ticket-id <id> --objective-id <objective-id> --file-name spec.pdf --content-type application/pdf
|
|
1665
1703
|
ovld protocol attachment-upload-file --session-key <key> --ticket-id <id> --objective-id <objective-id> --file ./spec.pdf
|
|
1666
1704
|
ovld protocol attachment-download-url --session-key <key> --ticket-id <id> --attachment-id <attachment-id>
|
|
@@ -1706,6 +1744,10 @@ Examples:
|
|
|
1706
1744
|
await protocolPrompt(args);
|
|
1707
1745
|
return;
|
|
1708
1746
|
}
|
|
1747
|
+
if (subcommand === 'attachment-list') {
|
|
1748
|
+
await protocolAttachmentList(args);
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1709
1751
|
if (subcommand === 'attachment-prepare-upload') {
|
|
1710
1752
|
await protocolAttachmentPrepareUpload(args);
|
|
1711
1753
|
return;
|
package/package.json
CHANGED
|
@@ -141,10 +141,13 @@ When in doubt, ask yourself: *can this be done entirely inside a terminal or bro
|
|
|
141
141
|
```bash
|
|
142
142
|
ovld protocol read-context --session-key <sessionKey> --ticket-id $TICKET_ID
|
|
143
143
|
ovld protocol write-context --session-key <sessionKey> --ticket-id $TICKET_ID --key "key" --value '"json-value"'
|
|
144
|
+
ovld protocol attachment-list --session-key <sessionKey> --ticket-id $TICKET_ID
|
|
144
145
|
ovld protocol attachment-upload-file --session-key <sessionKey> --ticket-id $TICKET_ID --objective-id <objective-id> --file ./spec.pdf --content-type application/pdf
|
|
145
146
|
ovld protocol attachment-download-url --session-key <sessionKey> --ticket-id $TICKET_ID --attachment-id <attachment-id>
|
|
146
147
|
```
|
|
147
148
|
|
|
149
|
+
The `attach` and `load-context` responses already include `attachments` and `objectives` arrays — use those for `<attachment-id>` and `<objective-id>` values. Run `attachment-list` mid-session if new files have been uploaded since attach.
|
|
150
|
+
|
|
148
151
|
## Rules
|
|
149
152
|
|
|
150
153
|
- Always attach first and always deliver last once you are on a ticket.
|
|
@@ -25,7 +25,7 @@ personal marketplace entry at `~/.agents/plugins/marketplace.json`.
|
|
|
25
25
|
- Ticket session flow: `attach_ticket`, `connect_ticket`, `load_ticket_context`, `spawn_ticket`
|
|
26
26
|
- Progress and review flow: `post_update`, `record_change_rationales`, `ask_blocking_question`, `deliver_ticket`
|
|
27
27
|
- Shared context: `read_shared_context`, `write_shared_context`
|
|
28
|
-
- Objective attachments: `prepare_attachment_upload`, `finalize_attachment_upload`, `get_attachment_download_url`, `upload_attachment_file`
|
|
28
|
+
- Objective attachments: `list_attachments`, `prepare_attachment_upload`, `finalize_attachment_upload`, `get_attachment_download_url`, `upload_attachment_file`
|
|
29
29
|
|
|
30
30
|
The MCP server shells into the installed `ovld` binary so the plugin stays aligned with the shipped CLI behavior instead of depending on this repository checkout.
|
|
31
31
|
|
|
@@ -295,6 +295,26 @@ const tools = [
|
|
|
295
295
|
}),
|
|
296
296
|
subcommand: 'deliver'
|
|
297
297
|
},
|
|
298
|
+
{
|
|
299
|
+
name: 'list_attachments',
|
|
300
|
+
description:
|
|
301
|
+
'List objective attachments visible to the current ticket session. Returns attachment IDs needed by get_attachment_download_url, plus their objective_id, label, content_type, file_size, and storage_path.',
|
|
302
|
+
inputSchema: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
properties: {
|
|
305
|
+
session_key: { type: 'string' },
|
|
306
|
+
ticket_id: { type: 'string' },
|
|
307
|
+
objective_id: { type: 'string' }
|
|
308
|
+
},
|
|
309
|
+
required: ['session_key', 'ticket_id']
|
|
310
|
+
},
|
|
311
|
+
toCliFlags: args => ({
|
|
312
|
+
'session-key': args.session_key,
|
|
313
|
+
'ticket-id': args.ticket_id,
|
|
314
|
+
'objective-id': args.objective_id
|
|
315
|
+
}),
|
|
316
|
+
subcommand: 'attachment-list'
|
|
317
|
+
},
|
|
298
318
|
{
|
|
299
319
|
name: 'prepare_attachment_upload',
|
|
300
320
|
description: 'Prepare an objective attachment upload and return a signed upload URL.',
|
|
@@ -102,10 +102,13 @@ Record only meaningful behavioral changes. Skip formatting-only noise. Prefer 1-
|
|
|
102
102
|
```bash
|
|
103
103
|
ovld protocol read-context --session-key <sessionKey> --ticket-id $TICKET_ID
|
|
104
104
|
ovld protocol write-context --session-key <sessionKey> --ticket-id $TICKET_ID --key "key" --value '"json-value"'
|
|
105
|
+
ovld protocol attachment-list --session-key <sessionKey> --ticket-id $TICKET_ID
|
|
105
106
|
ovld protocol attachment-upload-file --session-key <sessionKey> --ticket-id $TICKET_ID --objective-id <objective-id> --file ./spec.pdf --content-type application/pdf
|
|
106
107
|
ovld protocol attachment-download-url --session-key <sessionKey> --ticket-id $TICKET_ID --attachment-id <attachment-id>
|
|
107
108
|
```
|
|
108
109
|
|
|
110
|
+
The `attach` and `load-context` responses already include `attachments` and `objectives` arrays — use those for `<attachment-id>` and `<objective-id>` values. Run `attachment-list` mid-session if new files have been uploaded since attach.
|
|
111
|
+
|
|
109
112
|
## Project Discovery And Ticket Creation
|
|
110
113
|
|
|
111
114
|
When creating tickets from within a repository:
|