@vess-id/ai-identity 0.18.0 → 0.19.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/dist/index.mjs CHANGED
@@ -8709,6 +8709,66 @@ var ACTION_REGISTRY = {
8709
8709
  resource_id: { source: "param", param: "to" }
8710
8710
  },
8711
8711
  version: "1.0.0"
8712
+ },
8713
+ // ─── PR-R2 (design §3.2): the raw booking executor's ONE new action ───
8714
+ // The booking agent submits its scheduling proposal through a REAL PEP
8715
+ // crossing instead of a managed custom_tool. Registered here in R2; the
8716
+ // adapter dispatch case lands in R3.
8717
+ //
8718
+ // 🔴 risk: 'high' is deliberate and must NOT be downgraded. Every writing
8719
+ // sibling (inbox.send / inbox.respond / scheduling.request) is high, and
8720
+ // inbox.respond's own comment states that agent-mediated responses must
8721
+ // always go through human approval. The approval basis here is the
8722
+ // visitor's explicit "AIで日程調整する" click (or the flag-gated OIDC
8723
+ // auto-consent), captured at mint time as a first-class ApprovalToken
8724
+ // ledger row — NOT an absence of approval.
8725
+ //
8726
+ // 🪤 target_bindings.resource_id binds the BARE `itemId`. It must equal
8727
+ // canonicalResourceId('scheduling.submit_response', { itemId }) exactly.
8728
+ // A prefixed value (e.g. 'inbox:item/<id>') does not match the approval
8729
+ // assertion at invoke time and the call SILENTLY falls through to
8730
+ // auth_required (202) — no error surfaces, which is why the api side
8731
+ // carries a preflight-parity spec asserting three-way equality
8732
+ // (migration grant resource == assertion resource_id == invoke-time
8733
+ // canonicalResourceId).
8734
+ {
8735
+ action: "scheduling.submit_response",
8736
+ resource_type: "inbox:item",
8737
+ required_relations: ["editor", "act_as"],
8738
+ required_scopes: ["inbox"],
8739
+ capability: "inbox.write",
8740
+ input_schema: {
8741
+ type: "object",
8742
+ properties: {
8743
+ itemId: { type: "string", minLength: 1, description: "The inbox item the proposal answers" },
8744
+ decision: { type: "string", enum: ["propose", "decline"], description: "Whether the agent proposes slots or declines" },
8745
+ slots: {
8746
+ type: "array",
8747
+ maxItems: 10,
8748
+ description: "Proposed candidate slots (empty for a decline)",
8749
+ items: {
8750
+ type: "object",
8751
+ properties: {
8752
+ start: { type: "string", description: "ISO 8601 start" },
8753
+ end: { type: "string", description: "ISO 8601 end" }
8754
+ },
8755
+ required: ["start", "end"],
8756
+ additionalProperties: false
8757
+ }
8758
+ },
8759
+ recommendedSlotIndex: { type: ["integer", "null"], description: "Index into slots of the recommended option, or null" },
8760
+ recommendationReason: { type: "string", description: "Short rationale shown to the visitor" }
8761
+ },
8762
+ required: ["itemId", "decision"],
8763
+ additionalProperties: false
8764
+ },
8765
+ constraints: { rate_bucket: "inbox.write" },
8766
+ effects: ["Update:InboxItem"],
8767
+ risk: "high",
8768
+ target_bindings: {
8769
+ resource_id: { source: "param", param: "itemId" }
8770
+ },
8771
+ version: "1.0.0"
8712
8772
  }
8713
8773
  ],
8714
8774
  capabilities: [
@@ -8805,7 +8865,7 @@ var ACTION_REGISTRY = {
8805
8865
  {
8806
8866
  capability: "inbox.write",
8807
8867
  description: "Send and respond to agent inbox tasks",
8808
- includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request"],
8868
+ includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request", "scheduling.submit_response"],
8809
8869
  version: "1.0.0"
8810
8870
  },
8811
8871
  {
@@ -8865,18 +8925,6 @@ var ACTION_REGISTRY = {
8865
8925
  "linear.attachment.delete"
8866
8926
  ],
8867
8927
  version: "1.0.0"
8868
- },
8869
- {
8870
- capability: "inbox.write",
8871
- description: "Send and respond to agent inbox tasks",
8872
- includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request"],
8873
- version: "1.0.0"
8874
- },
8875
- {
8876
- capability: "inbox.read",
8877
- description: "Read agent inbox tasks",
8878
- includes: ["inbox.check", "inbox.checkByToken"],
8879
- version: "1.0.0"
8880
8928
  }
8881
8929
  ]
8882
8930
  };
@@ -10089,6 +10137,21 @@ var ACTION_DISPLAY_CONFIGS = {
10089
10137
  { key: "candidates", label: "Candidates" },
10090
10138
  { key: "message", label: "Message" }
10091
10139
  ]
10140
+ },
10141
+ // PR-R2 (design §3.2), registry checklist B. This action is risk:'high', so
10142
+ // its summary/displayFields are what a human actually reads in the approval
10143
+ // and audit surfaces — the string is user-facing, not decoration. Names the
10144
+ // item being answered (the counterpart anchor available on this action's
10145
+ // params) the way scheduling.request names its topic.
10146
+ "scheduling.submit_response": {
10147
+ summaryTemplate: (p) => p.decision === "decline" ? `Decline the scheduling request for item ${p.itemId ?? "(unknown)"}` : `Submit a scheduling proposal for item ${p.itemId ?? "(unknown)"}`,
10148
+ displayFields: [
10149
+ { key: "itemId", label: "Inbox item" },
10150
+ { key: "decision", label: "Decision" },
10151
+ { key: "slots", label: "Proposed slots" },
10152
+ { key: "recommendedSlotIndex", label: "Recommended index" },
10153
+ { key: "recommendationReason", label: "Reason" }
10154
+ ]
10092
10155
  }
10093
10156
  };
10094
10157
  function truncate(text, maxLength) {