feat: adopt SDK 525 features — askUserQuestions + documents.upsert

Two new event types accepted on the existing case-status webhook
(eventType discriminator added; legacy status_change still default):

* **missing_precedent_created** → ``ctx.issues.askUserQuestions``
  with a single-choice question {upload | irrelevant | defer}.
  continuationPolicy=wake_assignee_on_accept routes the chair's
  answer straight back to the CEO heartbeat without an extra hop.

* **export_complete** → ``ctx.issues.documents.upsert`` with a
  markdown "final-decision" doc that links back to the DOCX on
  legal-ai. (The SDK's documents API stores text only — binary
  attachment isn't natively supported here.)

Manifest: +issue.documents.write capability (issue.interactions.create
was already declared in the previous SDK upgrade).

Tested: plugin activates with all 18 capabilities, 8 tools + 3 jobs
+ 1 webhook + 2 event subs registered.
This commit is contained in:
2026-05-26 13:28:43 +00:00
parent 6388062cdc
commit 0ca7831c53
2 changed files with 144 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ export default {
"issue.comments.read",
"issue.comments.create",
"issue.interactions.create",
"issue.documents.write",
"agent.tools.register",
"agents.invoke",
"http.outbound",