@kya-os/contracts 1.9.0 → 1.9.1

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.
Files changed (320) hide show
  1. package/dist/agent-deployment-utils.d.ts +0 -1
  2. package/dist/agent-deployment-utils.js +0 -1
  3. package/dist/agent-deployment.d.ts +0 -1
  4. package/dist/agent-deployment.js +0 -1
  5. package/dist/agentshield-api/admin-schemas.d.ts +0 -1
  6. package/dist/agentshield-api/admin-schemas.js +0 -1
  7. package/dist/agentshield-api/admin-types.d.ts +0 -1
  8. package/dist/agentshield-api/admin-types.js +0 -1
  9. package/dist/agentshield-api/endpoints.d.ts +0 -1
  10. package/dist/agentshield-api/endpoints.js +0 -1
  11. package/dist/agentshield-api/index.d.ts +0 -1
  12. package/dist/agentshield-api/schemas.d.ts +186 -186
  13. package/dist/agentshield-api/types.d.ts +0 -1
  14. package/dist/audit/index.d.ts +21 -21
  15. package/dist/cli.d.ts +0 -1
  16. package/dist/cli.js +0 -1
  17. package/dist/compute-binding.d.ts +0 -1
  18. package/dist/compute-binding.js +0 -1
  19. package/dist/compute.d.ts +19 -19
  20. package/dist/config/base.d.ts +0 -1
  21. package/dist/config/base.js +0 -1
  22. package/dist/config/builder.d.ts +0 -1
  23. package/dist/config/builder.js +0 -1
  24. package/dist/config/client-messages.d.ts +0 -1
  25. package/dist/config/client-messages.js +0 -1
  26. package/dist/config/delegation.d.ts +0 -1
  27. package/dist/config/delegation.js +0 -1
  28. package/dist/config/identity.d.ts +0 -1
  29. package/dist/config/identity.js +0 -1
  30. package/dist/config/index.d.ts +0 -1
  31. package/dist/config/index.js +0 -1
  32. package/dist/config/proofing.d.ts +0 -1
  33. package/dist/config/proofing.js +0 -1
  34. package/dist/config/tool-context.d.ts +0 -1
  35. package/dist/config/tool-context.js +0 -1
  36. package/dist/config/tool-protection.d.ts +0 -1
  37. package/dist/consent/schemas.d.ts +0 -1
  38. package/dist/consent/schemas.js +0 -1
  39. package/dist/consent/types.d.ts +0 -1
  40. package/dist/consent/types.js +0 -1
  41. package/dist/dashboard-config/default-config.d.ts +0 -1
  42. package/dist/dashboard-config/index.d.ts +0 -1
  43. package/dist/dashboard-config/schemas.d.ts +2436 -2436
  44. package/dist/dashboard-config/types.d.ts +0 -1
  45. package/dist/delegation/constraints.d.ts +0 -1
  46. package/dist/delegation/constraints.js +0 -1
  47. package/dist/delegation/index.d.ts +0 -1
  48. package/dist/delegation/index.js +0 -1
  49. package/dist/delegation/schemas.d.ts +0 -1
  50. package/dist/delegation/schemas.js +0 -1
  51. package/dist/deploy/index.d.ts +0 -1
  52. package/dist/deploy/index.js +0 -1
  53. package/dist/deploy/schemas.d.ts +0 -1
  54. package/dist/deploy/schemas.js +0 -1
  55. package/dist/deploy/types.d.ts +0 -1
  56. package/dist/deploy/types.js +0 -1
  57. package/dist/did/index.d.ts +0 -1
  58. package/dist/did/index.js +0 -1
  59. package/dist/did/resolve-contract.d.ts +0 -1
  60. package/dist/did/resolve-contract.js +0 -1
  61. package/dist/did/schemas.d.ts +0 -1
  62. package/dist/did/schemas.js +0 -1
  63. package/dist/did/types.d.ts +0 -1
  64. package/dist/did/types.js +0 -1
  65. package/dist/env/constants.d.ts +0 -1
  66. package/dist/env/constants.js +0 -1
  67. package/dist/env/index.d.ts +0 -1
  68. package/dist/env/index.js +0 -1
  69. package/dist/gateway/agents.d.ts +0 -1
  70. package/dist/gateway/agents.js +0 -1
  71. package/dist/gateway/cron.d.ts +0 -1
  72. package/dist/gateway/cron.js +0 -1
  73. package/dist/gateway/index.d.ts +0 -1
  74. package/dist/gateway/index.js +0 -1
  75. package/dist/gateway/sessions.d.ts +0 -1
  76. package/dist/gateway/sessions.js +0 -1
  77. package/dist/gateway/skills.d.ts +0 -1
  78. package/dist/gateway/skills.js +0 -1
  79. package/dist/gateway/usage.d.ts +0 -1
  80. package/dist/gateway/usage.js +0 -1
  81. package/dist/handshake.d.ts +24 -24
  82. package/dist/identity/index.d.ts +0 -1
  83. package/dist/identity/index.js +0 -1
  84. package/dist/identity/schemas.d.ts +0 -1
  85. package/dist/identity/schemas.js +0 -1
  86. package/dist/index.d.ts +0 -1
  87. package/dist/molti/admin-ws.d.ts +0 -1
  88. package/dist/molti/admin-ws.js +0 -1
  89. package/dist/molti/index.d.ts +0 -1
  90. package/dist/molti/index.js +0 -1
  91. package/dist/molti/schemas.d.ts +0 -1
  92. package/dist/molti/schemas.js +0 -1
  93. package/dist/molti/types.d.ts +0 -1
  94. package/dist/molti/types.js +0 -1
  95. package/dist/pairing/index.d.ts +0 -1
  96. package/dist/pairing/index.js +0 -1
  97. package/dist/policy/index.d.ts +0 -1
  98. package/dist/policy/index.js +0 -1
  99. package/dist/policy/schemas.d.ts +0 -1
  100. package/dist/policy/schemas.js +0 -1
  101. package/dist/proof/proof-record.d.ts +0 -1
  102. package/dist/proof/proof-record.js +0 -1
  103. package/dist/proof/signing-spec.d.ts +0 -1
  104. package/dist/proof/signing-spec.js +0 -1
  105. package/dist/proof.d.ts +66 -66
  106. package/dist/registry.d.ts +0 -1
  107. package/dist/registry.js +0 -1
  108. package/dist/reputation/api.d.ts +0 -1
  109. package/dist/reputation/api.js +0 -1
  110. package/dist/reputation/constants.d.ts +0 -1
  111. package/dist/reputation/constants.js +0 -1
  112. package/dist/reputation/credentials.d.ts +0 -1
  113. package/dist/reputation/credentials.js +0 -1
  114. package/dist/reputation/index.d.ts +1 -1
  115. package/dist/reputation/index.js +2 -1
  116. package/dist/reputation/interactions.d.ts +146 -0
  117. package/dist/reputation/interactions.js +82 -0
  118. package/dist/reputation/schemas.d.ts +0 -1
  119. package/dist/reputation/schemas.js +0 -1
  120. package/dist/runtime/errors.d.ts +0 -1
  121. package/dist/runtime/errors.js +0 -1
  122. package/dist/runtime/index.d.ts +0 -1
  123. package/dist/test.d.ts +0 -1
  124. package/dist/test.js +0 -1
  125. package/dist/tlkrc/index.d.ts +0 -1
  126. package/dist/tlkrc/index.js +0 -1
  127. package/dist/tlkrc/rotation.d.ts +0 -1
  128. package/dist/tlkrc/rotation.js +0 -1
  129. package/dist/tool-protection/index.d.ts +36 -36
  130. package/dist/utils/validation.d.ts +0 -1
  131. package/dist/utils/validation.js +0 -1
  132. package/dist/vault/schemas.d.ts +2 -2
  133. package/dist/vc/index.d.ts +0 -1
  134. package/dist/vc/index.js +0 -1
  135. package/dist/vc/schemas.d.ts +0 -1
  136. package/dist/vc/schemas.js +0 -1
  137. package/dist/vc/statuslist.d.ts +0 -1
  138. package/dist/vc/statuslist.js +0 -1
  139. package/dist/verifier/index.d.ts +0 -1
  140. package/dist/verifier.d.ts +6 -6
  141. package/dist/well-known/index.d.ts +0 -1
  142. package/dist/well-known/index.js +0 -1
  143. package/package.json +1 -1
  144. package/dist/__fixtures__/index.d.ts +0 -8
  145. package/dist/__fixtures__/index.d.ts.map +0 -1
  146. package/dist/__fixtures__/index.js +0 -29
  147. package/dist/__fixtures__/index.js.map +0 -1
  148. package/dist/__fixtures__/proof/ed25519-fixtures.d.ts +0 -253
  149. package/dist/__fixtures__/proof/ed25519-fixtures.d.ts.map +0 -1
  150. package/dist/__fixtures__/proof/ed25519-fixtures.js +0 -247
  151. package/dist/__fixtures__/proof/ed25519-fixtures.js.map +0 -1
  152. package/dist/__fixtures__/proof/keys-and-payloads.json +0 -103
  153. package/dist/agent-deployment-utils.d.ts.map +0 -1
  154. package/dist/agent-deployment-utils.js.map +0 -1
  155. package/dist/agent-deployment.d.ts.map +0 -1
  156. package/dist/agent-deployment.js.map +0 -1
  157. package/dist/agentshield-api/admin-schemas.d.ts.map +0 -1
  158. package/dist/agentshield-api/admin-schemas.js.map +0 -1
  159. package/dist/agentshield-api/admin-types.d.ts.map +0 -1
  160. package/dist/agentshield-api/admin-types.js.map +0 -1
  161. package/dist/agentshield-api/endpoints.d.ts.map +0 -1
  162. package/dist/agentshield-api/endpoints.js.map +0 -1
  163. package/dist/agentshield-api/index.d.ts.map +0 -1
  164. package/dist/agentshield-api/index.js.map +0 -1
  165. package/dist/agentshield-api/schemas.d.ts.map +0 -1
  166. package/dist/agentshield-api/schemas.js.map +0 -1
  167. package/dist/agentshield-api/types.d.ts.map +0 -1
  168. package/dist/agentshield-api/types.js.map +0 -1
  169. package/dist/audit/index.d.ts.map +0 -1
  170. package/dist/audit/index.js.map +0 -1
  171. package/dist/cli.d.ts.map +0 -1
  172. package/dist/cli.js.map +0 -1
  173. package/dist/compute-binding.d.ts.map +0 -1
  174. package/dist/compute-binding.js.map +0 -1
  175. package/dist/compute.d.ts.map +0 -1
  176. package/dist/compute.js.map +0 -1
  177. package/dist/config/base.d.ts.map +0 -1
  178. package/dist/config/base.js.map +0 -1
  179. package/dist/config/builder.d.ts.map +0 -1
  180. package/dist/config/builder.js.map +0 -1
  181. package/dist/config/client-messages.d.ts.map +0 -1
  182. package/dist/config/client-messages.js.map +0 -1
  183. package/dist/config/delegation.d.ts.map +0 -1
  184. package/dist/config/delegation.js.map +0 -1
  185. package/dist/config/identity.d.ts.map +0 -1
  186. package/dist/config/identity.js.map +0 -1
  187. package/dist/config/index.d.ts.map +0 -1
  188. package/dist/config/index.js.map +0 -1
  189. package/dist/config/proofing.d.ts.map +0 -1
  190. package/dist/config/proofing.js.map +0 -1
  191. package/dist/config/tool-context.d.ts.map +0 -1
  192. package/dist/config/tool-context.js.map +0 -1
  193. package/dist/config/tool-protection.d.ts.map +0 -1
  194. package/dist/config/tool-protection.js.map +0 -1
  195. package/dist/consent/index.d.ts.map +0 -1
  196. package/dist/consent/index.js.map +0 -1
  197. package/dist/consent/schemas.d.ts.map +0 -1
  198. package/dist/consent/schemas.js.map +0 -1
  199. package/dist/consent/types.d.ts.map +0 -1
  200. package/dist/consent/types.js.map +0 -1
  201. package/dist/dashboard-config/default-config.d.ts.map +0 -1
  202. package/dist/dashboard-config/default-config.js.map +0 -1
  203. package/dist/dashboard-config/index.d.ts.map +0 -1
  204. package/dist/dashboard-config/index.js.map +0 -1
  205. package/dist/dashboard-config/schemas.d.ts.map +0 -1
  206. package/dist/dashboard-config/schemas.js.map +0 -1
  207. package/dist/dashboard-config/types.d.ts.map +0 -1
  208. package/dist/dashboard-config/types.js.map +0 -1
  209. package/dist/delegation/constraints.d.ts.map +0 -1
  210. package/dist/delegation/constraints.js.map +0 -1
  211. package/dist/delegation/index.d.ts.map +0 -1
  212. package/dist/delegation/index.js.map +0 -1
  213. package/dist/delegation/schemas.d.ts.map +0 -1
  214. package/dist/delegation/schemas.js.map +0 -1
  215. package/dist/deploy/index.d.ts.map +0 -1
  216. package/dist/deploy/index.js.map +0 -1
  217. package/dist/deploy/schemas.d.ts.map +0 -1
  218. package/dist/deploy/schemas.js.map +0 -1
  219. package/dist/deploy/types.d.ts.map +0 -1
  220. package/dist/deploy/types.js.map +0 -1
  221. package/dist/did/index.d.ts.map +0 -1
  222. package/dist/did/index.js.map +0 -1
  223. package/dist/did/resolve-contract.d.ts.map +0 -1
  224. package/dist/did/resolve-contract.js.map +0 -1
  225. package/dist/did/schemas.d.ts.map +0 -1
  226. package/dist/did/schemas.js.map +0 -1
  227. package/dist/did/types.d.ts.map +0 -1
  228. package/dist/did/types.js.map +0 -1
  229. package/dist/env/constants.d.ts.map +0 -1
  230. package/dist/env/constants.js.map +0 -1
  231. package/dist/env/index.d.ts.map +0 -1
  232. package/dist/env/index.js.map +0 -1
  233. package/dist/gateway/agents.d.ts.map +0 -1
  234. package/dist/gateway/agents.js.map +0 -1
  235. package/dist/gateway/cron.d.ts.map +0 -1
  236. package/dist/gateway/cron.js.map +0 -1
  237. package/dist/gateway/index.d.ts.map +0 -1
  238. package/dist/gateway/index.js.map +0 -1
  239. package/dist/gateway/sessions.d.ts.map +0 -1
  240. package/dist/gateway/sessions.js.map +0 -1
  241. package/dist/gateway/skills.d.ts.map +0 -1
  242. package/dist/gateway/skills.js.map +0 -1
  243. package/dist/gateway/usage.d.ts.map +0 -1
  244. package/dist/gateway/usage.js.map +0 -1
  245. package/dist/handshake.d.ts.map +0 -1
  246. package/dist/handshake.js.map +0 -1
  247. package/dist/identity/index.d.ts.map +0 -1
  248. package/dist/identity/index.js.map +0 -1
  249. package/dist/identity/schemas.d.ts.map +0 -1
  250. package/dist/identity/schemas.js.map +0 -1
  251. package/dist/index.d.ts.map +0 -1
  252. package/dist/index.js.map +0 -1
  253. package/dist/molti/admin-ws.d.ts.map +0 -1
  254. package/dist/molti/admin-ws.js.map +0 -1
  255. package/dist/molti/index.d.ts.map +0 -1
  256. package/dist/molti/index.js.map +0 -1
  257. package/dist/molti/schemas.d.ts.map +0 -1
  258. package/dist/molti/schemas.js.map +0 -1
  259. package/dist/molti/types.d.ts.map +0 -1
  260. package/dist/molti/types.js.map +0 -1
  261. package/dist/openclaw/index.d.ts +0 -20
  262. package/dist/openclaw/index.js +0 -28
  263. package/dist/openclaw/types.d.ts +0 -714
  264. package/dist/openclaw/types.js +0 -122
  265. package/dist/org-secret-definitions.d.ts +0 -18
  266. package/dist/org-secret-definitions.js +0 -72
  267. package/dist/pairing/index.d.ts.map +0 -1
  268. package/dist/pairing/index.js.map +0 -1
  269. package/dist/policy/index.d.ts.map +0 -1
  270. package/dist/policy/index.js.map +0 -1
  271. package/dist/policy/schemas.d.ts.map +0 -1
  272. package/dist/policy/schemas.js.map +0 -1
  273. package/dist/proof/index.d.ts.map +0 -1
  274. package/dist/proof/index.js.map +0 -1
  275. package/dist/proof/proof-record.d.ts.map +0 -1
  276. package/dist/proof/proof-record.js.map +0 -1
  277. package/dist/proof/signing-spec.d.ts.map +0 -1
  278. package/dist/proof/signing-spec.js.map +0 -1
  279. package/dist/proof.d.ts.map +0 -1
  280. package/dist/proof.js.map +0 -1
  281. package/dist/registry.d.ts.map +0 -1
  282. package/dist/registry.js.map +0 -1
  283. package/dist/reputation/api.d.ts.map +0 -1
  284. package/dist/reputation/api.js.map +0 -1
  285. package/dist/reputation/constants.d.ts.map +0 -1
  286. package/dist/reputation/constants.js.map +0 -1
  287. package/dist/reputation/credentials.d.ts.map +0 -1
  288. package/dist/reputation/credentials.js.map +0 -1
  289. package/dist/reputation/index.d.ts.map +0 -1
  290. package/dist/reputation/index.js.map +0 -1
  291. package/dist/reputation/schemas.d.ts.map +0 -1
  292. package/dist/reputation/schemas.js.map +0 -1
  293. package/dist/runtime/errors.d.ts.map +0 -1
  294. package/dist/runtime/errors.js.map +0 -1
  295. package/dist/runtime/headers.d.ts.map +0 -1
  296. package/dist/runtime/headers.js.map +0 -1
  297. package/dist/runtime/index.d.ts.map +0 -1
  298. package/dist/runtime/index.js.map +0 -1
  299. package/dist/test.d.ts.map +0 -1
  300. package/dist/test.js.map +0 -1
  301. package/dist/tlkrc/index.d.ts.map +0 -1
  302. package/dist/tlkrc/index.js.map +0 -1
  303. package/dist/tlkrc/rotation.d.ts.map +0 -1
  304. package/dist/tlkrc/rotation.js.map +0 -1
  305. package/dist/tool-protection/index.d.ts.map +0 -1
  306. package/dist/tool-protection/index.js.map +0 -1
  307. package/dist/utils/validation.d.ts.map +0 -1
  308. package/dist/utils/validation.js.map +0 -1
  309. package/dist/vc/index.d.ts.map +0 -1
  310. package/dist/vc/index.js.map +0 -1
  311. package/dist/vc/schemas.d.ts.map +0 -1
  312. package/dist/vc/schemas.js.map +0 -1
  313. package/dist/vc/statuslist.d.ts.map +0 -1
  314. package/dist/vc/statuslist.js.map +0 -1
  315. package/dist/verifier/index.d.ts.map +0 -1
  316. package/dist/verifier/index.js.map +0 -1
  317. package/dist/verifier.d.ts.map +0 -1
  318. package/dist/verifier.js.map +0 -1
  319. package/dist/well-known/index.d.ts.map +0 -1
  320. package/dist/well-known/index.js.map +0 -1
package/dist/proof.d.ts CHANGED
@@ -40,31 +40,31 @@ export declare const ProofMetaSchema: z.ZodObject<{
40
40
  delegationRef: z.ZodOptional<z.ZodString>;
41
41
  clientDid: z.ZodOptional<z.ZodString>;
42
42
  }, "strip", z.ZodTypeAny, {
43
+ did: string;
44
+ kid: string;
43
45
  nonce: string;
44
46
  audience: string;
45
47
  sessionId: string;
46
- did: string;
47
- kid: string;
48
+ ts: number;
48
49
  requestHash: string;
49
50
  responseHash: string;
50
- ts: number;
51
51
  clientDid?: string | undefined;
52
52
  delegationRef?: string | undefined;
53
- scopeId?: string | undefined;
54
53
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
54
+ scopeId?: string | undefined;
55
55
  }, {
56
+ did: string;
57
+ kid: string;
56
58
  nonce: string;
57
59
  audience: string;
58
60
  sessionId: string;
59
- did: string;
60
- kid: string;
61
+ ts: number;
61
62
  requestHash: string;
62
63
  responseHash: string;
63
- ts: number;
64
64
  clientDid?: string | undefined;
65
65
  delegationRef?: string | undefined;
66
- scopeId?: string | undefined;
67
66
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
67
+ scopeId?: string | undefined;
68
68
  }>;
69
69
  export declare const DetachedProofSchema: z.ZodObject<{
70
70
  jws: z.ZodString;
@@ -82,63 +82,63 @@ export declare const DetachedProofSchema: z.ZodObject<{
82
82
  delegationRef: z.ZodOptional<z.ZodString>;
83
83
  clientDid: z.ZodOptional<z.ZodString>;
84
84
  }, "strip", z.ZodTypeAny, {
85
+ did: string;
86
+ kid: string;
85
87
  nonce: string;
86
88
  audience: string;
87
89
  sessionId: string;
88
- did: string;
89
- kid: string;
90
+ ts: number;
90
91
  requestHash: string;
91
92
  responseHash: string;
92
- ts: number;
93
93
  clientDid?: string | undefined;
94
94
  delegationRef?: string | undefined;
95
- scopeId?: string | undefined;
96
95
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
96
+ scopeId?: string | undefined;
97
97
  }, {
98
+ did: string;
99
+ kid: string;
98
100
  nonce: string;
99
101
  audience: string;
100
102
  sessionId: string;
101
- did: string;
102
- kid: string;
103
+ ts: number;
103
104
  requestHash: string;
104
105
  responseHash: string;
105
- ts: number;
106
106
  clientDid?: string | undefined;
107
107
  delegationRef?: string | undefined;
108
- scopeId?: string | undefined;
109
108
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
109
+ scopeId?: string | undefined;
110
110
  }>;
111
111
  }, "strip", z.ZodTypeAny, {
112
112
  jws: string;
113
113
  meta: {
114
+ did: string;
115
+ kid: string;
114
116
  nonce: string;
115
117
  audience: string;
116
118
  sessionId: string;
117
- did: string;
118
- kid: string;
119
+ ts: number;
119
120
  requestHash: string;
120
121
  responseHash: string;
121
- ts: number;
122
122
  clientDid?: string | undefined;
123
123
  delegationRef?: string | undefined;
124
- scopeId?: string | undefined;
125
124
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
125
+ scopeId?: string | undefined;
126
126
  };
127
127
  }, {
128
128
  jws: string;
129
129
  meta: {
130
+ did: string;
131
+ kid: string;
130
132
  nonce: string;
131
133
  audience: string;
132
134
  sessionId: string;
133
- did: string;
134
- kid: string;
135
+ ts: number;
135
136
  requestHash: string;
136
137
  responseHash: string;
137
- ts: number;
138
138
  clientDid?: string | undefined;
139
139
  delegationRef?: string | undefined;
140
- scopeId?: string | undefined;
141
140
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
141
+ scopeId?: string | undefined;
142
142
  };
143
143
  }>;
144
144
  export declare const CanonicalHashesSchema: z.ZodObject<{
@@ -164,25 +164,25 @@ export declare const AuditRecordSchema: z.ZodObject<{
164
164
  scope: z.ZodString;
165
165
  }, "strip", z.ZodTypeAny, {
166
166
  version: "audit.v1";
167
- audience: string;
168
167
  did: string;
169
168
  kid: string;
170
- session: string;
171
- verified: "yes" | "no";
169
+ audience: string;
172
170
  ts: number;
171
+ session: string;
173
172
  reqHash: string;
174
173
  resHash: string;
174
+ verified: "yes" | "no";
175
175
  scope: string;
176
176
  }, {
177
177
  version: "audit.v1";
178
- audience: string;
179
178
  did: string;
180
179
  kid: string;
181
- session: string;
182
- verified: "yes" | "no";
180
+ audience: string;
183
181
  ts: number;
182
+ session: string;
184
183
  reqHash: string;
185
184
  resHash: string;
185
+ verified: "yes" | "no";
186
186
  scope: string;
187
187
  }>;
188
188
  export type ProofMeta = z.infer<typeof ProofMetaSchema>;
@@ -206,14 +206,14 @@ export declare const ToolCallContextSchema: z.ZodObject<{
206
206
  scopeId: string;
207
207
  tool: string;
208
208
  args: Record<string, unknown>;
209
- result?: unknown;
210
209
  userId?: string | undefined;
210
+ result?: unknown;
211
211
  }, {
212
212
  scopeId: string;
213
213
  tool: string;
214
214
  args: Record<string, unknown>;
215
- result?: unknown;
216
215
  userId?: string | undefined;
216
+ result?: unknown;
217
217
  }>;
218
218
  /**
219
219
  * Proof submission context for AgentShield API
@@ -230,14 +230,14 @@ export declare const ProofSubmissionContextSchema: z.ZodObject<{
230
230
  scopeId: string;
231
231
  tool: string;
232
232
  args: Record<string, unknown>;
233
- result?: unknown;
234
233
  userId?: string | undefined;
234
+ result?: unknown;
235
235
  }, {
236
236
  scopeId: string;
237
237
  tool: string;
238
238
  args: Record<string, unknown>;
239
- result?: unknown;
240
239
  userId?: string | undefined;
240
+ result?: unknown;
241
241
  }>, "many">;
242
242
  mcpServerUrl: z.ZodOptional<z.ZodString>;
243
243
  }, "strip", z.ZodTypeAny, {
@@ -245,8 +245,8 @@ export declare const ProofSubmissionContextSchema: z.ZodObject<{
245
245
  scopeId: string;
246
246
  tool: string;
247
247
  args: Record<string, unknown>;
248
- result?: unknown;
249
248
  userId?: string | undefined;
249
+ result?: unknown;
250
250
  }[];
251
251
  mcpServerUrl?: string | undefined;
252
252
  }, {
@@ -254,8 +254,8 @@ export declare const ProofSubmissionContextSchema: z.ZodObject<{
254
254
  scopeId: string;
255
255
  tool: string;
256
256
  args: Record<string, unknown>;
257
- result?: unknown;
258
257
  userId?: string | undefined;
258
+ result?: unknown;
259
259
  }[];
260
260
  mcpServerUrl?: string | undefined;
261
261
  }>;
@@ -281,63 +281,63 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
281
281
  delegationRef: z.ZodOptional<z.ZodString>;
282
282
  clientDid: z.ZodOptional<z.ZodString>;
283
283
  }, "strip", z.ZodTypeAny, {
284
+ did: string;
285
+ kid: string;
284
286
  nonce: string;
285
287
  audience: string;
286
288
  sessionId: string;
287
- did: string;
288
- kid: string;
289
+ ts: number;
289
290
  requestHash: string;
290
291
  responseHash: string;
291
- ts: number;
292
292
  clientDid?: string | undefined;
293
293
  delegationRef?: string | undefined;
294
- scopeId?: string | undefined;
295
294
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
295
+ scopeId?: string | undefined;
296
296
  }, {
297
+ did: string;
298
+ kid: string;
297
299
  nonce: string;
298
300
  audience: string;
299
301
  sessionId: string;
300
- did: string;
301
- kid: string;
302
+ ts: number;
302
303
  requestHash: string;
303
304
  responseHash: string;
304
- ts: number;
305
305
  clientDid?: string | undefined;
306
306
  delegationRef?: string | undefined;
307
- scopeId?: string | undefined;
308
307
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
308
+ scopeId?: string | undefined;
309
309
  }>;
310
310
  }, "strip", z.ZodTypeAny, {
311
311
  jws: string;
312
312
  meta: {
313
+ did: string;
314
+ kid: string;
313
315
  nonce: string;
314
316
  audience: string;
315
317
  sessionId: string;
316
- did: string;
317
- kid: string;
318
+ ts: number;
318
319
  requestHash: string;
319
320
  responseHash: string;
320
- ts: number;
321
321
  clientDid?: string | undefined;
322
322
  delegationRef?: string | undefined;
323
- scopeId?: string | undefined;
324
323
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
324
+ scopeId?: string | undefined;
325
325
  };
326
326
  }, {
327
327
  jws: string;
328
328
  meta: {
329
+ did: string;
330
+ kid: string;
329
331
  nonce: string;
330
332
  audience: string;
331
333
  sessionId: string;
332
- did: string;
333
- kid: string;
334
+ ts: number;
334
335
  requestHash: string;
335
336
  responseHash: string;
336
- ts: number;
337
337
  clientDid?: string | undefined;
338
338
  delegationRef?: string | undefined;
339
- scopeId?: string | undefined;
340
339
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
340
+ scopeId?: string | undefined;
341
341
  };
342
342
  }>, "many">;
343
343
  context: z.ZodOptional<z.ZodObject<{
@@ -351,14 +351,14 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
351
351
  scopeId: string;
352
352
  tool: string;
353
353
  args: Record<string, unknown>;
354
- result?: unknown;
355
354
  userId?: string | undefined;
355
+ result?: unknown;
356
356
  }, {
357
357
  scopeId: string;
358
358
  tool: string;
359
359
  args: Record<string, unknown>;
360
- result?: unknown;
361
360
  userId?: string | undefined;
361
+ result?: unknown;
362
362
  }>, "many">;
363
363
  mcpServerUrl: z.ZodOptional<z.ZodString>;
364
364
  }, "strip", z.ZodTypeAny, {
@@ -366,8 +366,8 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
366
366
  scopeId: string;
367
367
  tool: string;
368
368
  args: Record<string, unknown>;
369
- result?: unknown;
370
369
  userId?: string | undefined;
370
+ result?: unknown;
371
371
  }[];
372
372
  mcpServerUrl?: string | undefined;
373
373
  }, {
@@ -375,8 +375,8 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
375
375
  scopeId: string;
376
376
  tool: string;
377
377
  args: Record<string, unknown>;
378
- result?: unknown;
379
378
  userId?: string | undefined;
379
+ result?: unknown;
380
380
  }[];
381
381
  mcpServerUrl?: string | undefined;
382
382
  }>>;
@@ -385,18 +385,18 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
385
385
  proofs: {
386
386
  jws: string;
387
387
  meta: {
388
+ did: string;
389
+ kid: string;
388
390
  nonce: string;
389
391
  audience: string;
390
392
  sessionId: string;
391
- did: string;
392
- kid: string;
393
+ ts: number;
393
394
  requestHash: string;
394
395
  responseHash: string;
395
- ts: number;
396
396
  clientDid?: string | undefined;
397
397
  delegationRef?: string | undefined;
398
- scopeId?: string | undefined;
399
398
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
399
+ scopeId?: string | undefined;
400
400
  };
401
401
  }[];
402
402
  delegation_id?: string | null | undefined;
@@ -405,8 +405,8 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
405
405
  scopeId: string;
406
406
  tool: string;
407
407
  args: Record<string, unknown>;
408
- result?: unknown;
409
408
  userId?: string | undefined;
409
+ result?: unknown;
410
410
  }[];
411
411
  mcpServerUrl?: string | undefined;
412
412
  } | undefined;
@@ -415,18 +415,18 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
415
415
  proofs: {
416
416
  jws: string;
417
417
  meta: {
418
+ did: string;
419
+ kid: string;
418
420
  nonce: string;
419
421
  audience: string;
420
422
  sessionId: string;
421
- did: string;
422
- kid: string;
423
+ ts: number;
423
424
  requestHash: string;
424
425
  responseHash: string;
425
- ts: number;
426
426
  clientDid?: string | undefined;
427
427
  delegationRef?: string | undefined;
428
- scopeId?: string | undefined;
429
428
  outcome?: "allowed" | "denied" | "step_up_required" | "needs_authorization" | undefined;
429
+ scopeId?: string | undefined;
430
430
  };
431
431
  }[];
432
432
  delegation_id?: string | null | undefined;
@@ -435,8 +435,8 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
435
435
  scopeId: string;
436
436
  tool: string;
437
437
  args: Record<string, unknown>;
438
- result?: unknown;
439
438
  userId?: string | undefined;
439
+ result?: unknown;
440
440
  }[];
441
441
  mcpServerUrl?: string | undefined;
442
442
  } | undefined;
@@ -340,4 +340,3 @@ export declare const DEFAULT_STORAGE_MODE: StorageMode;
340
340
  export declare const STORAGE_MODE_ENV_VAR = "MCPI_STORAGE_MODE";
341
341
  export declare const RECEIPT_SCHEMA_ID = "https://schema.modelcontextprotocol-identity.io/xmcp-i/registry/receipt.v1.0.0.json";
342
342
  export declare const CONTENT_HASH_REGEX: RegExp;
343
- //# sourceMappingURL=registry.d.ts.map
package/dist/registry.js CHANGED
@@ -116,4 +116,3 @@ exports.STORAGE_MODE_ENV_VAR = "MCPI_STORAGE_MODE";
116
116
  // Receipt schema constants
117
117
  exports.RECEIPT_SCHEMA_ID = "https://schema.modelcontextprotocol-identity.io/xmcp-i/registry/receipt.v1.0.0.json";
118
118
  exports.CONTENT_HASH_REGEX = /^sha256:[a-f0-9]{64}$/;
119
- //# sourceMappingURL=registry.js.map
@@ -2881,4 +2881,3 @@ export declare const DEFAULT_REPUTATION_THRESHOLD: 76;
2881
2881
  * Provisioned by Know That AI team
2882
2882
  */
2883
2883
  export declare const BUILT_IN_REPUTATION_API_KEY: "Dn/qCC/0udWcGpdnt+IzA5GpWl9JF2g/avuBxlzB";
2884
- //# sourceMappingURL=api.d.ts.map
@@ -415,4 +415,3 @@ exports.DEFAULT_REPUTATION_THRESHOLD = 76;
415
415
  * Provisioned by Know That AI team
416
416
  */
417
417
  exports.BUILT_IN_REPUTATION_API_KEY = "Dn/qCC/0udWcGpdnt+IzA5GpWl9JF2g/avuBxlzB";
418
- //# sourceMappingURL=api.js.map
@@ -240,4 +240,3 @@ export declare const REPUTATION_CONTRACTS_VERSION: "1.0.0";
240
240
  * Reputation algorithm version
241
241
  */
242
242
  export declare const REPUTATION_ALGORITHM_VERSION: "1.0.0-bayesian";
243
- //# sourceMappingURL=constants.d.ts.map
@@ -257,4 +257,3 @@ exports.REPUTATION_CONTRACTS_VERSION = "1.0.0";
257
257
  * Reputation algorithm version
258
258
  */
259
259
  exports.REPUTATION_ALGORITHM_VERSION = "1.0.0-bayesian";
260
- //# sourceMappingURL=constants.js.map
@@ -1491,4 +1491,3 @@ export declare const DEFAULT_REPUTATION_CREDENTIAL_VALIDITY_MS: number;
1491
1491
  * Recommended maximum age for reputation scores (24 hours)
1492
1492
  */
1493
1493
  export declare const RECOMMENDED_REPUTATION_FRESHNESS_MS: number;
1494
- //# sourceMappingURL=credentials.d.ts.map
@@ -300,4 +300,3 @@ exports.DEFAULT_REPUTATION_CREDENTIAL_VALIDITY_MS = 7 * 24 * 60 * 60 * 1000;
300
300
  * Recommended maximum age for reputation scores (24 hours)
301
301
  */
302
302
  exports.RECOMMENDED_REPUTATION_FRESHNESS_MS = 24 * 60 * 60 * 1000;
303
- //# sourceMappingURL=credentials.js.map
@@ -16,6 +16,6 @@
16
16
  */
17
17
  export * from "./schemas.js";
18
18
  export * from "./api.js";
19
+ export * from "./interactions.js";
19
20
  export * from "./credentials.js";
20
21
  export * from "./constants.js";
21
- //# sourceMappingURL=index.d.ts.map
@@ -34,8 +34,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  __exportStar(require("./schemas.js"), exports);
35
35
  // API schemas
36
36
  __exportStar(require("./api.js"), exports);
37
+ // Per-tool-call interaction attestation request (xmcp-i#413)
38
+ __exportStar(require("./interactions.js"), exports);
37
39
  // Credential schemas (W3C VC)
38
40
  __exportStar(require("./credentials.js"), exports);
39
41
  // Constants and configuration
40
42
  __exportStar(require("./constants.js"), exports);
41
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Interaction Report Request Contract
3
+ *
4
+ * The per-tool-call attestation body that identity-aware runtimes POST to
5
+ * KTA's `POST /api/v1/agents/{did}/interactions` endpoint (xmcp-i#413). KTA
6
+ * verifies the embedded JWS against the agent's registered public key and
7
+ * folds the outcome into the Bayesian reputation engine.
8
+ *
9
+ * WHY this lives in @kya-os/contracts: per the repo's API-parity rule, the
10
+ * wire shape of any cross-service POST must be a shared, Zod-validated
11
+ * contract — never inlined at the call site. The producer here is
12
+ * `@kya-os/compute`'s attestation reporter; the consumer is the KTA route.
13
+ *
14
+ * PARITY CAVEAT: KTA's receiving schema lives in a different repository
15
+ * (Know-That-Ai/know-that-ai → `src/app/api/v1/agents/[did]/interactions/`)
16
+ * and cannot be imported or validated from here. This schema mirrors the body
17
+ * shape already accepted in production (the existing attestation flow), and
18
+ * MUST be kept in lock-step with that route when either side changes.
19
+ *
20
+ * Related Spec: MCP-I §5 (Reputation)
21
+ */
22
+ import { z } from "zod";
23
+ /**
24
+ * Interaction classification. Open-ended on the wire (KTA may accept more
25
+ * types over time), but the per-tool-call attestation path emits exactly
26
+ * `"scope_executed"`. Modeled as a string with that documented default rather
27
+ * than a closed enum so adding a new KTA-side type does not require a
28
+ * contracts bump on the producer before the receiver is ready.
29
+ */
30
+ export declare const INTERACTION_TYPE_SCOPE_EXECUTED: "scope_executed";
31
+ /**
32
+ * Coarse success/failure outcome KTA folds into the reputation score. The
33
+ * compute reporter collapses its finer 4-value status (success/error/denied/
34
+ * timeout) onto this two-value axis — anything that is not an unambiguous
35
+ * success counts as a failure for reputation purposes.
36
+ */
37
+ export declare const InteractionOutcomeSchema: z.ZodEnum<["success", "failure"]>;
38
+ export type InteractionOutcome = z.infer<typeof InteractionOutcomeSchema>;
39
+ /**
40
+ * Evidentiary context carried alongside the signed attestation. `client_did`
41
+ * is optional because the agent may receive calls from un-attested clients
42
+ * during the rollout window; the attestation still has value without it.
43
+ */
44
+ export declare const InteractionContextSchema: z.ZodObject<{
45
+ /** MCP session id from the originating tools/call. May be empty for headless flows. */
46
+ session_id: z.ZodString;
47
+ /** Calling client's DID, when known. Omitted (not null) when un-attested. */
48
+ client_did: z.ZodOptional<z.ZodString>;
49
+ /** Compact JWS attestation of the tool call, signed by the agent's key. */
50
+ attestation_jws: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ session_id: string;
53
+ attestation_jws: string;
54
+ client_did?: string | undefined;
55
+ }, {
56
+ session_id: string;
57
+ attestation_jws: string;
58
+ client_did?: string | undefined;
59
+ }>;
60
+ export type InteractionContext = z.infer<typeof InteractionContextSchema>;
61
+ /**
62
+ * Interaction Report Request Schema
63
+ *
64
+ * Fire-and-forget body POSTed per tool call. Authenticated by the
65
+ * `x-api-key` header (not part of the body); idempotency is the caller's
66
+ * responsibility via `idempotency_key`.
67
+ */
68
+ export declare const InteractionReportRequestSchema: z.ZodObject<{
69
+ /** Interaction classification — `"scope_executed"` for tool-call attestations. */
70
+ interaction_type: z.ZodString;
71
+ /** Reputation-facing outcome. */
72
+ outcome: z.ZodEnum<["success", "failure"]>;
73
+ /** Authorized scopes for the call, when a delegation context supplies them. */
74
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ /** ISO 8601 timestamp of the call, set when the attestation is signed. */
76
+ timestamp: z.ZodString;
77
+ /** Evidentiary context including the signed attestation. */
78
+ context: z.ZodObject<{
79
+ /** MCP session id from the originating tools/call. May be empty for headless flows. */
80
+ session_id: z.ZodString;
81
+ /** Calling client's DID, when known. Omitted (not null) when un-attested. */
82
+ client_did: z.ZodOptional<z.ZodString>;
83
+ /** Compact JWS attestation of the tool call, signed by the agent's key. */
84
+ attestation_jws: z.ZodString;
85
+ }, "strip", z.ZodTypeAny, {
86
+ session_id: string;
87
+ attestation_jws: string;
88
+ client_did?: string | undefined;
89
+ }, {
90
+ session_id: string;
91
+ attestation_jws: string;
92
+ client_did?: string | undefined;
93
+ }>;
94
+ /** Per-call key so a retried POST of the same call is deduped by KTA. */
95
+ idempotency_key: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ timestamp: string;
98
+ outcome: "success" | "failure";
99
+ context: {
100
+ session_id: string;
101
+ attestation_jws: string;
102
+ client_did?: string | undefined;
103
+ };
104
+ interaction_type: string;
105
+ idempotency_key: string;
106
+ scopes?: string[] | undefined;
107
+ }, {
108
+ timestamp: string;
109
+ outcome: "success" | "failure";
110
+ context: {
111
+ session_id: string;
112
+ attestation_jws: string;
113
+ client_did?: string | undefined;
114
+ };
115
+ interaction_type: string;
116
+ idempotency_key: string;
117
+ scopes?: string[] | undefined;
118
+ }>;
119
+ export type InteractionReportRequest = z.infer<typeof InteractionReportRequestSchema>;
120
+ /**
121
+ * Validate an interaction report request. Mirrors the `validate*` helpers in
122
+ * `./api.ts` so call sites can branch on `.success` without importing zod.
123
+ */
124
+ export declare function validateInteractionReportRequest(data: unknown): z.SafeParseReturnType<{
125
+ timestamp: string;
126
+ outcome: "success" | "failure";
127
+ context: {
128
+ session_id: string;
129
+ attestation_jws: string;
130
+ client_did?: string | undefined;
131
+ };
132
+ interaction_type: string;
133
+ idempotency_key: string;
134
+ scopes?: string[] | undefined;
135
+ }, {
136
+ timestamp: string;
137
+ outcome: "success" | "failure";
138
+ context: {
139
+ session_id: string;
140
+ attestation_jws: string;
141
+ client_did?: string | undefined;
142
+ };
143
+ interaction_type: string;
144
+ idempotency_key: string;
145
+ scopes?: string[] | undefined;
146
+ }>;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ /**
3
+ * Interaction Report Request Contract
4
+ *
5
+ * The per-tool-call attestation body that identity-aware runtimes POST to
6
+ * KTA's `POST /api/v1/agents/{did}/interactions` endpoint (xmcp-i#413). KTA
7
+ * verifies the embedded JWS against the agent's registered public key and
8
+ * folds the outcome into the Bayesian reputation engine.
9
+ *
10
+ * WHY this lives in @kya-os/contracts: per the repo's API-parity rule, the
11
+ * wire shape of any cross-service POST must be a shared, Zod-validated
12
+ * contract — never inlined at the call site. The producer here is
13
+ * `@kya-os/compute`'s attestation reporter; the consumer is the KTA route.
14
+ *
15
+ * PARITY CAVEAT: KTA's receiving schema lives in a different repository
16
+ * (Know-That-Ai/know-that-ai → `src/app/api/v1/agents/[did]/interactions/`)
17
+ * and cannot be imported or validated from here. This schema mirrors the body
18
+ * shape already accepted in production (the existing attestation flow), and
19
+ * MUST be kept in lock-step with that route when either side changes.
20
+ *
21
+ * Related Spec: MCP-I §5 (Reputation)
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.InteractionReportRequestSchema = exports.InteractionContextSchema = exports.InteractionOutcomeSchema = exports.INTERACTION_TYPE_SCOPE_EXECUTED = void 0;
25
+ exports.validateInteractionReportRequest = validateInteractionReportRequest;
26
+ const zod_1 = require("zod");
27
+ /**
28
+ * Interaction classification. Open-ended on the wire (KTA may accept more
29
+ * types over time), but the per-tool-call attestation path emits exactly
30
+ * `"scope_executed"`. Modeled as a string with that documented default rather
31
+ * than a closed enum so adding a new KTA-side type does not require a
32
+ * contracts bump on the producer before the receiver is ready.
33
+ */
34
+ exports.INTERACTION_TYPE_SCOPE_EXECUTED = "scope_executed";
35
+ /**
36
+ * Coarse success/failure outcome KTA folds into the reputation score. The
37
+ * compute reporter collapses its finer 4-value status (success/error/denied/
38
+ * timeout) onto this two-value axis — anything that is not an unambiguous
39
+ * success counts as a failure for reputation purposes.
40
+ */
41
+ exports.InteractionOutcomeSchema = zod_1.z.enum(["success", "failure"]);
42
+ /**
43
+ * Evidentiary context carried alongside the signed attestation. `client_did`
44
+ * is optional because the agent may receive calls from un-attested clients
45
+ * during the rollout window; the attestation still has value without it.
46
+ */
47
+ exports.InteractionContextSchema = zod_1.z.object({
48
+ /** MCP session id from the originating tools/call. May be empty for headless flows. */
49
+ session_id: zod_1.z.string(),
50
+ /** Calling client's DID, when known. Omitted (not null) when un-attested. */
51
+ client_did: zod_1.z.string().optional(),
52
+ /** Compact JWS attestation of the tool call, signed by the agent's key. */
53
+ attestation_jws: zod_1.z.string(),
54
+ });
55
+ /**
56
+ * Interaction Report Request Schema
57
+ *
58
+ * Fire-and-forget body POSTed per tool call. Authenticated by the
59
+ * `x-api-key` header (not part of the body); idempotency is the caller's
60
+ * responsibility via `idempotency_key`.
61
+ */
62
+ exports.InteractionReportRequestSchema = zod_1.z.object({
63
+ /** Interaction classification — `"scope_executed"` for tool-call attestations. */
64
+ interaction_type: zod_1.z.string(),
65
+ /** Reputation-facing outcome. */
66
+ outcome: exports.InteractionOutcomeSchema,
67
+ /** Authorized scopes for the call, when a delegation context supplies them. */
68
+ scopes: zod_1.z.array(zod_1.z.string()).optional(),
69
+ /** ISO 8601 timestamp of the call, set when the attestation is signed. */
70
+ timestamp: zod_1.z.string(),
71
+ /** Evidentiary context including the signed attestation. */
72
+ context: exports.InteractionContextSchema,
73
+ /** Per-call key so a retried POST of the same call is deduped by KTA. */
74
+ idempotency_key: zod_1.z.string(),
75
+ });
76
+ /**
77
+ * Validate an interaction report request. Mirrors the `validate*` helpers in
78
+ * `./api.ts` so call sites can branch on `.success` without importing zod.
79
+ */
80
+ function validateInteractionReportRequest(data) {
81
+ return exports.InteractionReportRequestSchema.safeParse(data);
82
+ }