@sinoia/hubdoc-tools 1.9.0 → 1.11.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/cli.js +993 -835
- package/docs/llm-usage.md +42 -8
- package/package.json +1 -1
package/docs/llm-usage.md
CHANGED
|
@@ -377,12 +377,36 @@ themselves. All commands support `--json` for machine parsing.
|
|
|
377
377
|
| start | complete`.
|
|
378
378
|
|
|
379
379
|
`hubdoc tickets --project=<pid>` — `ls | show | create | update | delete
|
|
380
|
-
| assign | status | move | activities | deliverable |
|
|
381
|
-
verb requires `--project=<pid>`.
|
|
382
|
-
|
|
383
|
-
[--column <col>]` uses the
|
|
384
|
-
|
|
385
|
-
|
|
380
|
+
| assign | set-agent | status | move | activities | deliverable |
|
|
381
|
+
dispatch | comment | comments`. Every verb requires `--project=<pid>`.
|
|
382
|
+
`ls --backlog` (or `ls --sprint null`) lists the backlog. `assign --to
|
|
383
|
+
null` unassigns. `status --to <state> [--column <col>]` uses the
|
|
384
|
+
canonical statuses: `open | in_progress | done | blocked |
|
|
385
|
+
awaiting_human | cancelled | failed` and optionally pins the kanban
|
|
386
|
+
column at the same time. `comment <id> --body <text>` (or `--body-file
|
|
387
|
+
<path>`) posts a message on the ticket's discussion thread (visible in
|
|
388
|
+
Corex / Agoria, attributed to the token holder); `comments <id>` reads
|
|
389
|
+
the thread oldest-first (paginated like `activities`).
|
|
390
|
+
|
|
391
|
+
**Agent configuration on tickets** (corex#591) : `create` and `update`
|
|
392
|
+
both accept `--agent-config <json>` — free-form jsonb persisted on the
|
|
393
|
+
ticket and read back by `dispatch_agent` / the agent runner (canonical
|
|
394
|
+
keys: `agent_role: planner|executor|…`, `instructions`). The convenience
|
|
395
|
+
verb `tickets set-agent <id> --project <pid> --agent <agent-id>
|
|
396
|
+
[--agent-config <json>]` PATCHes `assignee_id` and (optionally)
|
|
397
|
+
`agent_config` in one call — the shortest path from "empty ticket" to
|
|
398
|
+
"dispatchable". Use `hubdoc agents ls [--active]` to discover
|
|
399
|
+
dispatchable agent UUIDs (STI: `Agents::Planner`, `Agents::Executor`,
|
|
400
|
+
`Agents::Classifier`, `Agents::Conversational`, …).
|
|
401
|
+
|
|
402
|
+
**Project ACL** (hubdoc-tools#15) : the `permissions` verbs now accept
|
|
403
|
+
`--on-type project` (alias of `Projects::Project`) — the corex
|
|
404
|
+
`/api/v1/permissions` controller is polymorphic and `Projects::Project`
|
|
405
|
+
includes `HasPermissionsConcern`. This lets an agent share a **standalone
|
|
406
|
+
project** (no workspace attached) with a colleague or another agent
|
|
407
|
+
without going through a workspace-scoped ACL. Example:
|
|
408
|
+
`hubdoc permissions grant --to <user-id> --to-type user --on <project-id>
|
|
409
|
+
--on-type project --level admin`.
|
|
386
410
|
|
|
387
411
|
`hubdoc tasks --project=<pid> --ticket=<tid>` — `ls | show | create |
|
|
388
412
|
update | delete | complete | reorder`. Sub-tasks live under a ticket;
|
|
@@ -440,10 +464,20 @@ hubdoc tasks create --project "$PID" --ticket "$TID" \
|
|
|
440
464
|
hubdoc tasks create --project "$PID" --ticket "$TID" \
|
|
441
465
|
--title "Rédiger devis" --priority high --due 2026-07-16 --json
|
|
442
466
|
|
|
443
|
-
# 5.
|
|
467
|
+
# 5. Pick a dispatchable agent then set it on the ticket in one shot.
|
|
468
|
+
AGENT_ID=$(hubdoc agents ls --active --json | jq -r '.items[] | select(.key=="planner") | .id')
|
|
469
|
+
hubdoc tickets set-agent "$TID" --project "$PID" \
|
|
470
|
+
--agent "$AGENT_ID" \
|
|
471
|
+
--agent-config '{"agent_role":"planner","instructions":"Rédige un devis à partir des PJ."}' --json
|
|
472
|
+
|
|
473
|
+
# 5b. Now `dispatch` can actually fire (agent + agent_config both set).
|
|
444
474
|
hubdoc tickets dispatch "$TID" --project "$PID" --json
|
|
445
475
|
|
|
446
|
-
# 6. Later —
|
|
476
|
+
# 6. Later — post a follow-up on the ticket thread (visible to the human):
|
|
477
|
+
hubdoc tickets comment "$TID" --project "$PID" \
|
|
478
|
+
--body "Point d’avancement : devis en cours de rédaction, ETA demain 10h." --json
|
|
479
|
+
|
|
480
|
+
# 7. Publish an already-attached deliverable and close the ticket.
|
|
447
481
|
hubdoc tickets deliverable "$TID" --project "$PID" \
|
|
448
482
|
--deliverable "$DELIVERABLE_ID" --json
|
|
449
483
|
hubdoc tickets status "$TID" --project "$PID" \
|