@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.js CHANGED
@@ -8887,6 +8887,66 @@ var ACTION_REGISTRY = {
8887
8887
  resource_id: { source: "param", param: "to" }
8888
8888
  },
8889
8889
  version: "1.0.0"
8890
+ },
8891
+ // ─── PR-R2 (design §3.2): the raw booking executor's ONE new action ───
8892
+ // The booking agent submits its scheduling proposal through a REAL PEP
8893
+ // crossing instead of a managed custom_tool. Registered here in R2; the
8894
+ // adapter dispatch case lands in R3.
8895
+ //
8896
+ // 🔴 risk: 'high' is deliberate and must NOT be downgraded. Every writing
8897
+ // sibling (inbox.send / inbox.respond / scheduling.request) is high, and
8898
+ // inbox.respond's own comment states that agent-mediated responses must
8899
+ // always go through human approval. The approval basis here is the
8900
+ // visitor's explicit "AIで日程調整する" click (or the flag-gated OIDC
8901
+ // auto-consent), captured at mint time as a first-class ApprovalToken
8902
+ // ledger row — NOT an absence of approval.
8903
+ //
8904
+ // 🪤 target_bindings.resource_id binds the BARE `itemId`. It must equal
8905
+ // canonicalResourceId('scheduling.submit_response', { itemId }) exactly.
8906
+ // A prefixed value (e.g. 'inbox:item/<id>') does not match the approval
8907
+ // assertion at invoke time and the call SILENTLY falls through to
8908
+ // auth_required (202) — no error surfaces, which is why the api side
8909
+ // carries a preflight-parity spec asserting three-way equality
8910
+ // (migration grant resource == assertion resource_id == invoke-time
8911
+ // canonicalResourceId).
8912
+ {
8913
+ action: "scheduling.submit_response",
8914
+ resource_type: "inbox:item",
8915
+ required_relations: ["editor", "act_as"],
8916
+ required_scopes: ["inbox"],
8917
+ capability: "inbox.write",
8918
+ input_schema: {
8919
+ type: "object",
8920
+ properties: {
8921
+ itemId: { type: "string", minLength: 1, description: "The inbox item the proposal answers" },
8922
+ decision: { type: "string", enum: ["propose", "decline"], description: "Whether the agent proposes slots or declines" },
8923
+ slots: {
8924
+ type: "array",
8925
+ maxItems: 10,
8926
+ description: "Proposed candidate slots (empty for a decline)",
8927
+ items: {
8928
+ type: "object",
8929
+ properties: {
8930
+ start: { type: "string", description: "ISO 8601 start" },
8931
+ end: { type: "string", description: "ISO 8601 end" }
8932
+ },
8933
+ required: ["start", "end"],
8934
+ additionalProperties: false
8935
+ }
8936
+ },
8937
+ recommendedSlotIndex: { type: ["integer", "null"], description: "Index into slots of the recommended option, or null" },
8938
+ recommendationReason: { type: "string", description: "Short rationale shown to the visitor" }
8939
+ },
8940
+ required: ["itemId", "decision"],
8941
+ additionalProperties: false
8942
+ },
8943
+ constraints: { rate_bucket: "inbox.write" },
8944
+ effects: ["Update:InboxItem"],
8945
+ risk: "high",
8946
+ target_bindings: {
8947
+ resource_id: { source: "param", param: "itemId" }
8948
+ },
8949
+ version: "1.0.0"
8890
8950
  }
8891
8951
  ],
8892
8952
  capabilities: [
@@ -8983,7 +9043,7 @@ var ACTION_REGISTRY = {
8983
9043
  {
8984
9044
  capability: "inbox.write",
8985
9045
  description: "Send and respond to agent inbox tasks",
8986
- includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request"],
9046
+ includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request", "scheduling.submit_response"],
8987
9047
  version: "1.0.0"
8988
9048
  },
8989
9049
  {
@@ -9043,18 +9103,6 @@ var ACTION_REGISTRY = {
9043
9103
  "linear.attachment.delete"
9044
9104
  ],
9045
9105
  version: "1.0.0"
9046
- },
9047
- {
9048
- capability: "inbox.write",
9049
- description: "Send and respond to agent inbox tasks",
9050
- includes: ["inbox.send", "inbox.respond", "inbox.complete", "scheduling.request"],
9051
- version: "1.0.0"
9052
- },
9053
- {
9054
- capability: "inbox.read",
9055
- description: "Read agent inbox tasks",
9056
- includes: ["inbox.check", "inbox.checkByToken"],
9057
- version: "1.0.0"
9058
9106
  }
9059
9107
  ]
9060
9108
  };
@@ -10267,6 +10315,21 @@ var ACTION_DISPLAY_CONFIGS = {
10267
10315
  { key: "candidates", label: "Candidates" },
10268
10316
  { key: "message", label: "Message" }
10269
10317
  ]
10318
+ },
10319
+ // PR-R2 (design §3.2), registry checklist B. This action is risk:'high', so
10320
+ // its summary/displayFields are what a human actually reads in the approval
10321
+ // and audit surfaces — the string is user-facing, not decoration. Names the
10322
+ // item being answered (the counterpart anchor available on this action's
10323
+ // params) the way scheduling.request names its topic.
10324
+ "scheduling.submit_response": {
10325
+ summaryTemplate: (p) => p.decision === "decline" ? `Decline the scheduling request for item ${p.itemId ?? "(unknown)"}` : `Submit a scheduling proposal for item ${p.itemId ?? "(unknown)"}`,
10326
+ displayFields: [
10327
+ { key: "itemId", label: "Inbox item" },
10328
+ { key: "decision", label: "Decision" },
10329
+ { key: "slots", label: "Proposed slots" },
10330
+ { key: "recommendedSlotIndex", label: "Recommended index" },
10331
+ { key: "recommendationReason", label: "Reason" }
10332
+ ]
10270
10333
  }
10271
10334
  };
10272
10335
  function truncate(text, maxLength) {