@decionis/agentsafe 0.5.0 → 0.7.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.
Files changed (211) hide show
  1. package/README.md +62 -19
  2. package/dist/Cli.js +18 -1
  3. package/dist/Cli.js.map +1 -1
  4. package/dist/Index.d.ts +9 -4
  5. package/dist/Index.d.ts.map +1 -1
  6. package/dist/Index.js +7 -2
  7. package/dist/Index.js.map +1 -1
  8. package/dist/TrustedExecutor.d.ts.map +1 -1
  9. package/dist/TrustedExecutor.js +2 -0
  10. package/dist/TrustedExecutor.js.map +1 -1
  11. package/dist/adapters/AdapterActionHandler.d.ts +36 -12
  12. package/dist/adapters/AdapterActionHandler.d.ts.map +1 -1
  13. package/dist/adapters/AdapterActionHandler.js +99 -100
  14. package/dist/adapters/AdapterActionHandler.js.map +1 -1
  15. package/dist/adapters/EffectAdapter.d.ts +7 -103
  16. package/dist/adapters/EffectAdapter.d.ts.map +1 -1
  17. package/dist/adapters/EffectAdapter.js +7 -18
  18. package/dist/adapters/EffectAdapter.js.map +1 -1
  19. package/dist/adapters/EffectAdapterExecutor.d.ts +93 -0
  20. package/dist/adapters/EffectAdapterExecutor.d.ts.map +1 -0
  21. package/dist/adapters/EffectAdapterExecutor.js +191 -0
  22. package/dist/adapters/EffectAdapterExecutor.js.map +1 -0
  23. package/dist/adapters/banking/BankingExecutor.d.ts +35 -0
  24. package/dist/adapters/banking/BankingExecutor.d.ts.map +1 -0
  25. package/dist/adapters/banking/BankingExecutor.js +64 -0
  26. package/dist/adapters/banking/BankingExecutor.js.map +1 -0
  27. package/dist/adapters/banking/BankingHandlers.d.ts.map +1 -1
  28. package/dist/adapters/banking/BankingHandlers.js +6 -3
  29. package/dist/adapters/banking/BankingHandlers.js.map +1 -1
  30. package/dist/adapters/cards/CardAuthorizationExecutor.d.ts +66 -0
  31. package/dist/adapters/cards/CardAuthorizationExecutor.d.ts.map +1 -0
  32. package/dist/adapters/cards/CardAuthorizationExecutor.js +116 -0
  33. package/dist/adapters/cards/CardAuthorizationExecutor.js.map +1 -0
  34. package/dist/adapters/mcp/McpGuard.d.ts +32 -3
  35. package/dist/adapters/mcp/McpGuard.d.ts.map +1 -1
  36. package/dist/adapters/mcp/McpGuard.js +29 -5
  37. package/dist/adapters/mcp/McpGuard.js.map +1 -1
  38. package/dist/adapters/mcp/McpIntentBinder.d.ts +18 -3
  39. package/dist/adapters/mcp/McpIntentBinder.d.ts.map +1 -1
  40. package/dist/adapters/mcp/McpIntentBinder.js +48 -1
  41. package/dist/adapters/mcp/McpIntentBinder.js.map +1 -1
  42. package/dist/adapters/mcp/McpInvocation.d.ts +9 -2
  43. package/dist/adapters/mcp/McpInvocation.d.ts.map +1 -1
  44. package/dist/adapters/mcp/McpInvocation.js.map +1 -1
  45. package/dist/cli/Actions.d.ts +14 -0
  46. package/dist/cli/Actions.d.ts.map +1 -0
  47. package/dist/cli/Actions.js +168 -0
  48. package/dist/cli/Actions.js.map +1 -0
  49. package/dist/cli/Arguments.d.ts +4 -0
  50. package/dist/cli/Arguments.d.ts.map +1 -1
  51. package/dist/cli/Arguments.js +12 -3
  52. package/dist/cli/Arguments.js.map +1 -1
  53. package/dist/cli/ConfigCommand.d.ts.map +1 -1
  54. package/dist/cli/ConfigCommand.js +5 -0
  55. package/dist/cli/ConfigCommand.js.map +1 -1
  56. package/dist/cli/Doctor.d.ts.map +1 -1
  57. package/dist/cli/Doctor.js +2 -1
  58. package/dist/cli/Doctor.js.map +1 -1
  59. package/dist/cli/Help.d.ts.map +1 -1
  60. package/dist/cli/Help.js +13 -1
  61. package/dist/cli/Help.js.map +1 -1
  62. package/dist/cli/Host.d.ts +5 -2
  63. package/dist/cli/Host.d.ts.map +1 -1
  64. package/dist/cli/Host.js +24 -2
  65. package/dist/cli/Host.js.map +1 -1
  66. package/dist/cli/Profile.d.ts +24 -0
  67. package/dist/cli/Profile.d.ts.map +1 -0
  68. package/dist/cli/Profile.js +168 -0
  69. package/dist/cli/Profile.js.map +1 -0
  70. package/dist/cli/Records.d.ts +15 -0
  71. package/dist/cli/Records.d.ts.map +1 -0
  72. package/dist/cli/Records.js +205 -0
  73. package/dist/cli/Records.js.map +1 -0
  74. package/dist/config/ConfigKeys.d.ts +2 -2
  75. package/dist/config/ConfigKeys.d.ts.map +1 -1
  76. package/dist/config/ConfigKeys.js +6 -0
  77. package/dist/config/ConfigKeys.js.map +1 -1
  78. package/dist/config/ExecutorConfig.d.ts +29 -0
  79. package/dist/config/ExecutorConfig.d.ts.map +1 -1
  80. package/dist/config/ExecutorConfig.js +53 -1
  81. package/dist/config/ExecutorConfig.js.map +1 -1
  82. package/dist/gateway/ForwardHandler.d.ts +22 -4
  83. package/dist/gateway/ForwardHandler.d.ts.map +1 -1
  84. package/dist/gateway/ForwardHandler.js +27 -10
  85. package/dist/gateway/ForwardHandler.js.map +1 -1
  86. package/dist/gateway/Gateway.d.ts +123 -3
  87. package/dist/gateway/Gateway.d.ts.map +1 -1
  88. package/dist/gateway/Gateway.js +513 -16
  89. package/dist/gateway/Gateway.js.map +1 -1
  90. package/dist/gateway/GatewayConfig.d.ts +109 -0
  91. package/dist/gateway/GatewayConfig.d.ts.map +1 -1
  92. package/dist/gateway/GatewayConfig.js +267 -9
  93. package/dist/gateway/GatewayConfig.js.map +1 -1
  94. package/dist/gateway/GatewayReport.d.ts +6 -2
  95. package/dist/gateway/GatewayReport.d.ts.map +1 -1
  96. package/dist/gateway/GatewayReport.js +3 -0
  97. package/dist/gateway/GatewayReport.js.map +1 -1
  98. package/dist/gateway/InterceptedRequest.d.ts +45 -1
  99. package/dist/gateway/InterceptedRequest.d.ts.map +1 -1
  100. package/dist/gateway/InterceptedRequest.js +43 -1
  101. package/dist/gateway/InterceptedRequest.js.map +1 -1
  102. package/dist/gateway/PolicySelector.d.ts +5 -0
  103. package/dist/gateway/PolicySelector.d.ts.map +1 -0
  104. package/dist/gateway/PolicySelector.js +9 -0
  105. package/dist/gateway/PolicySelector.js.map +1 -0
  106. package/dist/gateway/RouteTable.d.ts +44 -7
  107. package/dist/gateway/RouteTable.d.ts.map +1 -1
  108. package/dist/gateway/RouteTable.js +58 -9
  109. package/dist/gateway/RouteTable.js.map +1 -1
  110. package/dist/gateway/SubjectSessions.d.ts +113 -0
  111. package/dist/gateway/SubjectSessions.d.ts.map +1 -0
  112. package/dist/gateway/SubjectSessions.js +219 -0
  113. package/dist/gateway/SubjectSessions.js.map +1 -0
  114. package/dist/gateway/Upstream.d.ts +11 -0
  115. package/dist/gateway/Upstream.d.ts.map +1 -1
  116. package/dist/gateway/Upstream.js +19 -2
  117. package/dist/gateway/Upstream.js.map +1 -1
  118. package/dist/hosted/TenantHost.d.ts +24 -5
  119. package/dist/hosted/TenantHost.d.ts.map +1 -1
  120. package/dist/hosted/TenantHost.js +39 -10
  121. package/dist/hosted/TenantHost.js.map +1 -1
  122. package/dist/hosted/TenantRegistry.d.ts +20 -0
  123. package/dist/hosted/TenantRegistry.d.ts.map +1 -1
  124. package/dist/hosted/TenantRegistry.js +47 -1
  125. package/dist/hosted/TenantRegistry.js.map +1 -1
  126. package/dist/http/GatewayHttpServer.d.ts.map +1 -1
  127. package/dist/http/GatewayHttpServer.js +46 -2
  128. package/dist/http/GatewayHttpServer.js.map +1 -1
  129. package/dist/identity/WorkloadJwtVerifier.d.ts +13 -0
  130. package/dist/identity/WorkloadJwtVerifier.d.ts.map +1 -1
  131. package/dist/identity/WorkloadJwtVerifier.js +40 -8
  132. package/dist/identity/WorkloadJwtVerifier.js.map +1 -1
  133. package/dist/incident/HaltSwitch.d.ts +10 -2
  134. package/dist/incident/HaltSwitch.d.ts.map +1 -1
  135. package/dist/incident/HaltSwitch.js +22 -2
  136. package/dist/incident/HaltSwitch.js.map +1 -1
  137. package/dist/incident/SecurityEvents.d.ts +18 -0
  138. package/dist/incident/SecurityEvents.d.ts.map +1 -1
  139. package/dist/incident/SecurityEvents.js +17 -0
  140. package/dist/incident/SecurityEvents.js.map +1 -1
  141. package/dist/journal/ExecutionJournal.d.ts +5 -120
  142. package/dist/journal/ExecutionJournal.d.ts.map +1 -1
  143. package/dist/journal/ExecutionJournal.js +5 -125
  144. package/dist/journal/ExecutionJournal.js.map +1 -1
  145. package/dist/journal/FileExecutionJournal.d.ts +1 -0
  146. package/dist/journal/FileExecutionJournal.d.ts.map +1 -1
  147. package/dist/journal/FileExecutionJournal.js +4 -1
  148. package/dist/journal/FileExecutionJournal.js.map +1 -1
  149. package/dist/journal/InMemoryExecutionJournal.d.ts +2 -1
  150. package/dist/journal/InMemoryExecutionJournal.d.ts.map +1 -1
  151. package/dist/journal/InMemoryExecutionJournal.js +4 -1
  152. package/dist/journal/InMemoryExecutionJournal.js.map +1 -1
  153. package/dist/limits/HardLimits.d.ts.map +1 -1
  154. package/dist/limits/HardLimits.js.map +1 -1
  155. package/dist/outcomes/CardOutcomeEvidence.d.ts +56 -0
  156. package/dist/outcomes/CardOutcomeEvidence.d.ts.map +1 -0
  157. package/dist/outcomes/CardOutcomeEvidence.js +211 -0
  158. package/dist/outcomes/CardOutcomeEvidence.js.map +1 -0
  159. package/dist/outcomes/CardOutcomeFact.d.ts +90 -0
  160. package/dist/outcomes/CardOutcomeFact.d.ts.map +1 -0
  161. package/dist/outcomes/CardOutcomeFact.js +76 -0
  162. package/dist/outcomes/CardOutcomeFact.js.map +1 -0
  163. package/dist/outcomes/CardOutcomeLedger.d.ts +26 -0
  164. package/dist/outcomes/CardOutcomeLedger.d.ts.map +1 -0
  165. package/dist/outcomes/CardOutcomeLedger.js +31 -0
  166. package/dist/outcomes/CardOutcomeLedger.js.map +1 -0
  167. package/dist/outcomes/CardOutcomeRecorder.d.ts +35 -0
  168. package/dist/outcomes/CardOutcomeRecorder.d.ts.map +1 -0
  169. package/dist/outcomes/CardOutcomeRecorder.js +84 -0
  170. package/dist/outcomes/CardOutcomeRecorder.js.map +1 -0
  171. package/dist/outcomes/CardOutcomes.d.ts +68 -0
  172. package/dist/outcomes/CardOutcomes.d.ts.map +1 -0
  173. package/dist/outcomes/CardOutcomes.js +191 -0
  174. package/dist/outcomes/CardOutcomes.js.map +1 -0
  175. package/dist/outcomes/CoreOutcomeEvidenceClient.d.ts +54 -0
  176. package/dist/outcomes/CoreOutcomeEvidenceClient.d.ts.map +1 -0
  177. package/dist/outcomes/CoreOutcomeEvidenceClient.js +116 -0
  178. package/dist/outcomes/CoreOutcomeEvidenceClient.js.map +1 -0
  179. package/dist/outcomes/FileCardOutcomeLedger.d.ts +36 -0
  180. package/dist/outcomes/FileCardOutcomeLedger.d.ts.map +1 -0
  181. package/dist/outcomes/FileCardOutcomeLedger.js +152 -0
  182. package/dist/outcomes/FileCardOutcomeLedger.js.map +1 -0
  183. package/dist/outcomes/OutcomeEvidence.d.ts +238 -0
  184. package/dist/outcomes/OutcomeEvidence.d.ts.map +1 -0
  185. package/dist/outcomes/OutcomeEvidence.js +130 -0
  186. package/dist/outcomes/OutcomeEvidence.js.map +1 -0
  187. package/dist/outcomes/OutcomeEvidencePublisher.d.ts +81 -0
  188. package/dist/outcomes/OutcomeEvidencePublisher.d.ts.map +1 -0
  189. package/dist/outcomes/OutcomeEvidencePublisher.js +189 -0
  190. package/dist/outcomes/OutcomeEvidencePublisher.js.map +1 -0
  191. package/dist/outcomes/OutcomeEvidenceStore.d.ts +57 -0
  192. package/dist/outcomes/OutcomeEvidenceStore.d.ts.map +1 -0
  193. package/dist/outcomes/OutcomeEvidenceStore.js +191 -0
  194. package/dist/outcomes/OutcomeEvidenceStore.js.map +1 -0
  195. package/dist/service/Requests.d.ts +6 -0
  196. package/dist/service/Requests.d.ts.map +1 -1
  197. package/dist/service/Requests.js +9 -1
  198. package/dist/service/Requests.js.map +1 -1
  199. package/dist/service/TrustedExecutorService.d.ts +21 -1
  200. package/dist/service/TrustedExecutorService.d.ts.map +1 -1
  201. package/dist/service/TrustedExecutorService.js +73 -23
  202. package/dist/service/TrustedExecutorService.js.map +1 -1
  203. package/dist/time/MonotonicClock.d.ts +4 -32
  204. package/dist/time/MonotonicClock.d.ts.map +1 -1
  205. package/dist/time/MonotonicClock.js +4 -49
  206. package/dist/time/MonotonicClock.js.map +1 -1
  207. package/dist/verify/VerifyingProvider.d.ts +32 -6
  208. package/dist/verify/VerifyingProvider.d.ts.map +1 -1
  209. package/dist/verify/VerifyingProvider.js +16 -2
  210. package/dist/verify/VerifyingProvider.js.map +1 -1
  211. package/package.json +6 -5
@@ -1,64 +1,70 @@
1
1
  import { ProviderRefusal } from "@decionis/agent-safe-pipeline";
2
2
  import { dispatchBudgetMs, MonotonicDeadline } from "../time/MonotonicClock.js";
3
3
  import { IndeterminateOutcome } from "./EffectAdapter.js";
4
- import { buildEffectRecord } from "./EffectEvidenceBuilder.js";
4
+ import { EffectAdapterExecutor } from "./EffectAdapterExecutor.js";
5
5
  /**
6
- * The bridge from any `EffectAdapter` to the pipeline's `ActionHandler`. It
7
- * keeps the shape the boundary requires and adds the effect plane:
6
+ * The bridge from any `EffectAdapter` to the pipeline's `ActionHandler`: the
7
+ * adapter as a dispatch-style `NativeExecutor` (`EffectAdapterExecutor`),
8
+ * bridged by `executorActionHandler`. Kept so every registration written
9
+ * against it keeps its signature.
10
+ */
11
+ export function adapterActionHandler(options) {
12
+ const executor = new EffectAdapterExecutor({
13
+ adapter: options.adapter,
14
+ platform: options.adapter.id,
15
+ describe: describeByEffect,
16
+ ...(options.clock === undefined ? {} : { clock: options.clock }),
17
+ });
18
+ return executorActionHandler(executor, {
19
+ schema: options.schema,
20
+ register: options.register,
21
+ timeoutMs: options.timeoutMs,
22
+ ...(options.onMismatch === undefined ? {} : { onMismatch: options.onMismatch }),
23
+ });
24
+ }
25
+ /**
26
+ * The bridge from a dispatch-style executor over an effect adapter to the
27
+ * pipeline's `ActionHandler`, so the registry the runtime runs through
28
+ * `GovernedExecutionRunner` reaches it. It keeps the shape the boundary
29
+ * requires and adds the effect plane:
8
30
  *
9
- * prepare, which reaches nothing; then the side effect inside
31
+ * the executor's `prepare`, which reaches nothing; then its write inside
10
32
  * `dispatch.run`, bounded by the smaller of the configured timeout and what
11
- * is left of the grant; then the observation, compared field by field
33
+ * is left of the grant; then its observation, compared field by field
12
34
  * against what was authorised; then the record, registered against this
13
35
  * exact authorization for the verifier to finalize with.
14
36
  *
15
- * `SafeExecutor` and the pipeline's registry are untouched: a provider that
16
- * neither committed nor refused throws `IndeterminateOutcome` from inside
17
- * the dispatch, which the registry already reports as an unknown outcome,
18
- * and a deterministic refusal returns a result whose own outcome is
19
- * `FAILED`. What the pipeline calls the handler's outcome is unchanged;
20
- * what the effect plane says about it is separate, and that is deliberate.
37
+ * What the executor observed is said to the registry in the registry's own
38
+ * terms: an outcome nobody can determine is re-raised as
39
+ * `IndeterminateOutcome`, which the registry reports as unknown; a provider
40
+ * that was reached and said no is a `ProviderRefusal`, which it reports as
41
+ * definitely not executed; and a commit returns its effect block.
21
42
  */
22
- export function adapterActionHandler(options) {
23
- const clock = options.clock ?? (() => new Date());
24
- const observer = { id: options.adapter.id, version: options.adapter.version };
43
+ export function executorActionHandler(executor, options) {
25
44
  const execute = async (context) => {
26
- const prepared = options.adapter.prepare(context.parameters);
45
+ const prepared = executor.prepareNow(context.parameters);
27
46
  const deadline = MonotonicDeadline.after(dispatchBudgetMs(options.timeoutMs, context.authorization));
28
- let result = null;
29
- let indeterminate = null;
30
- let indeterminateReceipt = null;
31
- try {
32
- result = await context.dispatch.run(async () => await options.adapter.execute({
33
- action: context.parameters,
34
- prepared,
35
- authorization: context.authorization,
36
- idempotencyKey: context.dispatch.idempotencyKey,
37
- deadline,
38
- }));
39
- }
40
- catch (error) {
41
- if (!(error instanceof IndeterminateOutcome))
42
- throw error;
43
- indeterminate = { reason: error.reason, providerStatus: error.providerStatus };
44
- indeterminateReceipt = error.receipt;
45
- }
46
- // The provider's receipt rides on the attempt to the finalization, where
47
- // the authority verifies it; this layer only compares what it states. An
48
- // indeterminate answer can carry one too, and it is not dropped with it.
49
- const receipt = result?.receipt ?? indeterminateReceipt;
50
- if (typeof receipt === "string")
51
- context.dispatch.receipt(receipt);
52
- const observed = result === null ? null : options.adapter.observeEffect(result, prepared);
53
- const record = buildEffectRecord({
47
+ const effect = await executor.execute({
48
+ action: context.parameters,
54
49
  prepared,
55
- result: result === null ? null : { ...result, observed },
56
- ...(indeterminate === null ? {} : { indeterminate }),
57
- observer,
58
- correlationId: context.intent.intent.intentId,
50
+ intent: context.intent,
51
+ scope: null,
52
+ authorization: context.authorization,
59
53
  idempotencyKey: context.dispatch.idempotencyKey,
60
- observedAt: clock().toISOString(),
54
+ deadline,
55
+ dispatch: context.dispatch,
61
56
  });
57
+ // The provider's receipt rides on the attempt to the finalization, where
58
+ // the authority verifies it; this layer only compares what it states. An
59
+ // indeterminate answer can carry one too, and it is not dropped with it.
60
+ const signedReceipt = effect.kind === "DISPATCHED" ? (effect.signedReceipt ?? null) : null;
61
+ if (typeof signedReceipt === "string")
62
+ context.dispatch.receipt(signedReceipt);
63
+ const observation = await executor.observe(effect);
64
+ const observed = observation.result;
65
+ if (observed === null)
66
+ throw new IndeterminateOutcome("EXECUTOR_OBSERVATION_MISSING");
67
+ const record = observed.record;
62
68
  options.register.attach(context.authorization, record);
63
69
  if (record.comparison === "MISMATCH" || record.receipt.comparison === "MISMATCH") {
64
70
  options.onMismatch?.(record.mismatched);
@@ -66,77 +72,70 @@ export function adapterActionHandler(options) {
66
72
  // An outcome nobody can determine stays undetermined: the throw is
67
73
  // re-raised so the pipeline reports an unknown outcome rather than a
68
74
  // failure or a success.
69
- if (indeterminate !== null) {
70
- throw new IndeterminateOutcome(indeterminate.reason, indeterminate.providerStatus, indeterminateReceipt);
75
+ if (observation.status === "INDETERMINATE") {
76
+ throw new IndeterminateOutcome(observed.indeterminate?.reason ?? "PROVIDER_OUTCOME_UNKNOWN", observed.indeterminate?.providerStatus ?? null, signedReceipt);
71
77
  }
72
78
  // A provider that was reached and said no is a fact, not a success. The
73
79
  // evidence is registered above either way, so the authority still learns
74
80
  // what was observed; the throw is what tells the pipeline that nothing
75
81
  // was effected, so it reports `DEFINITELY_NOT_EXECUTED` rather than a
76
82
  // completed execution whose own effect block says otherwise.
77
- if (record.outcome === "FAILED") {
78
- throw new ProviderRefusal(record.reasonCodes[0] ?? "PROVIDER_REFUSED");
83
+ if (observation.status === "FAILED") {
84
+ throw new ProviderRefusal(observation.reason ?? "PROVIDER_REFUSED");
79
85
  }
80
- return {
81
- outcome: "COMMITTED",
82
- confirmation: record.confirmation,
83
- comparison: record.comparison,
84
- mismatchedFields: record.mismatched,
85
- observationMethod: record.observationMethod,
86
- expectedEffectDigest: record.expectedEffectDigest,
87
- observedEffectDigest: record.observedEffectDigest,
88
- responseDigest: record.responseDigest,
89
- providerReference: record.providerReference,
90
- evidenceDigest: record.evidenceDigest,
91
- reasonCodes: record.reasonCodes,
92
- receiptComparison: record.receipt.comparison,
93
- receiptStatus: record.receipt.status,
94
- };
86
+ return executionResultOf(record);
95
87
  };
96
88
  const reconcile = async (context) => {
97
- const prepared = options.adapter.prepare(context.parameters);
98
- const answer = await options.adapter.reconcile({
89
+ const answer = await executor.reconcile({
90
+ intent: context.intent,
91
+ prepared: executor.prepareNow(context.parameters),
99
92
  idempotencyKey: context.idempotencyKey,
93
+ scope: null,
100
94
  providerReference: null,
101
- intentHash: context.intent.intentHash,
102
- prepared,
103
95
  });
104
96
  if (answer.status !== "COMPLETED")
105
97
  return { status: answer.status };
106
- const observed = options.adapter.observeEffect(answer.result, prepared);
107
- const record = buildEffectRecord({
108
- prepared,
109
- result: { ...answer.result, observed },
110
- observer,
111
- correlationId: context.intent.intent.intentId,
112
- idempotencyKey: context.idempotencyKey,
113
- observedAt: clock().toISOString(),
114
- });
115
- // Absence of an error is not success: only a read-back whose projection
116
- // matches what was authorised is a completed reconciliation.
117
- if (record.comparison !== "MATCH")
118
- return { status: "UNKNOWN" };
119
- return {
120
- status: "COMPLETED",
121
- result: {
122
- outcome: "COMMITTED",
123
- confirmation: record.confirmation,
124
- comparison: record.comparison,
125
- mismatchedFields: record.mismatched,
126
- observationMethod: record.observationMethod,
127
- expectedEffectDigest: record.expectedEffectDigest,
128
- observedEffectDigest: record.observedEffectDigest,
129
- responseDigest: record.responseDigest,
130
- providerReference: record.providerReference,
131
- evidenceDigest: record.evidenceDigest,
132
- reasonCodes: record.reasonCodes,
133
- receiptComparison: record.receipt.comparison,
134
- receiptStatus: record.receipt.status,
135
- },
136
- };
98
+ return { status: "COMPLETED", result: executionResultOf(answer.result.record) };
137
99
  };
138
100
  return { parametersSchema: options.schema, execute, reconcile };
139
101
  }
102
+ /** What the executor reports about a committed attempt, from its effect record. */
103
+ function executionResultOf(record) {
104
+ return {
105
+ outcome: "COMMITTED",
106
+ confirmation: record.confirmation,
107
+ comparison: record.comparison,
108
+ mismatchedFields: record.mismatched,
109
+ observationMethod: record.observationMethod,
110
+ expectedEffectDigest: record.expectedEffectDigest,
111
+ observedEffectDigest: record.observedEffectDigest,
112
+ responseDigest: record.responseDigest,
113
+ providerReference: record.providerReference,
114
+ evidenceDigest: record.evidenceDigest,
115
+ reasonCodes: record.reasonCodes,
116
+ receiptComparison: record.receipt.comparison,
117
+ receiptStatus: record.receipt.status,
118
+ };
119
+ }
120
+ /**
121
+ * How an adapter with no description of its own reads as an intent: its
122
+ * effect's action type and resource, the action itself as the parameters,
123
+ * and the canonical action's digest as the retry identity. The registry path
124
+ * never asks, because the intent was captured before the handler ran; a
125
+ * family that is submitted to the runner directly describes itself.
126
+ */
127
+ export function describeByEffect(action, prepared) {
128
+ return {
129
+ proposal: {
130
+ action: prepared.actionType.toLowerCase(),
131
+ target: prepared.resourceRef,
132
+ parameters: action,
133
+ },
134
+ downstreamTarget: { system: prepared.domain.toLowerCase(), operation: prepared.effectType },
135
+ idempotencyKey: prepared.intentDigest,
136
+ facts: {},
137
+ };
138
+ }
140
139
  /** The effect block a response carries, from the handler's own result. */
141
140
  export function effectBlock(result) {
142
141
  if (typeof result !== "object" || result === null)
@@ -1 +1 @@
1
- {"version":3,"file":"AdapterActionHandler.js","sourceRoot":"","sources":["../../src/adapters/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,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,SAAS,GAAG,MAAyC,CAAC;IAC5D,IAAI,OAAO,SAAS,CAAC,cAAc,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC9D,OAAO;QACL,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,IAAI;QAClC,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI;QAC5C,UAAU,EAAE,SAAS,CAAC,UAAU,IAAI,IAAI;QACxC,iBAAiB,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;QAC1D,kBAAkB,EAAE,SAAS,CAAC,iBAAiB,IAAI,IAAI;QACvD,sBAAsB,EAAE,SAAS,CAAC,oBAAoB,IAAI,IAAI;QAC9D,sBAAsB,EAAE,SAAS,CAAC,oBAAoB,IAAI,IAAI;QAC9D,eAAe,EAAE,SAAS,CAAC,cAAc,IAAI,IAAI;QACjD,kBAAkB,EAAE,SAAS,CAAC,iBAAiB,IAAI,IAAI;QACvD,eAAe,EAAE,SAAS,CAAC,cAAc;QACzC,YAAY,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;QAChD,kBAAkB,EAAE,SAAS,CAAC,iBAAiB,IAAI,IAAI;QACvD,cAAc,EAAE,SAAS,CAAC,aAAa,IAAI,IAAI;KAChD,CAAC;AACJ,CAAC"}
@@ -1,107 +1,11 @@
1
- import type { JsonObject, JsonValue, VerifiedAuthorization } from "@decionis/agent-safe-pipeline";
2
- import type { MonotonicDeadline } from "../time/MonotonicClock.js";
3
- import type { Sha256 } from "./JcsDigest.js";
4
- /** What the adapter worked out before anything left the process. */
5
- export interface PreparedAction {
6
- /** The effect the action asks for, as the profile's projection of it. */
7
- readonly expectedEffect: JsonObject;
8
- readonly expectedEffectDigest: Sha256;
9
- /** The digest of the canonical action itself, for the authority's binding. */
10
- readonly intentDigest: Sha256;
11
- /** The digest of what will be sent, so a later reader can tell what was asked. */
12
- readonly requestDigest: Sha256;
13
- /** The resource the effect lands on, as the profile names it. */
14
- readonly resourceRef: string;
15
- readonly effectType: string;
16
- readonly domain: string;
17
- readonly actionType: string;
18
- }
19
- /** What the provider said, as the adapter read it. Never a body, never a credential. */
20
- export interface ProviderResult {
21
- readonly status: "COMMITTED" | "FAILED";
22
- readonly providerStatus: string | null;
23
- readonly providerReference: string | null;
24
- readonly responseDigest: Sha256 | null;
25
- /** A profile reason code when the provider refused; null when it accepted. */
26
- readonly failureReason: string | null;
27
- /** The observed effect as the adapter could read it, or null when it could not. */
28
- readonly observed: JsonObject | null;
29
- readonly observationMethod: ObservationMethod;
30
- readonly providerGenerated: boolean;
31
- readonly source: string;
32
- /**
33
- * The provider's effect receipt (VP-3), verbatim, when its answer carried
34
- * one in `x-agent-safe-effect-receipt`. Forwarded to the authority
35
- * unread; its statement is compared with this executor's own account.
36
- */
37
- readonly receipt?: string | null;
38
- }
39
- export type ObservationMethod = "DOWNSTREAM_ACK" | "READ_AFTER_WRITE" | "EVENT_CONFIRMATION" | "STATE_RECONCILIATION" | "SIGNED_RECEIPT" | "EXTERNAL_ATTESTATION" | "HUMAN_VALIDATION";
40
1
  /**
41
- * A provider that neither committed nor refused. Thrown from `execute`
42
- * after the request left the process, so the registry reports an unknown
43
- * outcome and nothing interprets silence as success.
2
+ * The effect-adapter contract moved into `@decionis/agent-safe-pipeline`,
3
+ * where it is the dispatch style of `agent-safe.executors.native/1` under its
4
+ * earlier name (`EffectAdapterExecutor` runs one as a `NativeExecutor`).
5
+ * Re-exported here, unchanged, so every adapter and import written against
6
+ * this module keeps working.
44
7
  *
45
- * A provider can answer an indeterminate status with its signed receipt of
46
- * the effect all the same. `receipt` carries it to the finalization, where
47
- * the authority verifies it, instead of it being dropped with the answer.
8
+ * @deprecated Implement the pipeline's `NativeExecutor` with `style: "dispatch"`.
48
9
  */
49
- export declare class IndeterminateOutcome extends Error {
50
- readonly reason: string;
51
- readonly providerStatus: string | null;
52
- readonly receipt: string | null;
53
- constructor(reason: string, providerStatus?: string | null, receipt?: string | null);
54
- }
55
- export interface AdapterExecution<TAction> {
56
- readonly action: TAction;
57
- readonly prepared: PreparedAction;
58
- readonly authorization: VerifiedAuthorization;
59
- readonly idempotencyKey: string;
60
- /** The budget left for this dispatch: the smaller of the timeout and the grant. */
61
- readonly deadline: MonotonicDeadline;
62
- }
63
- export interface AdapterReconciliation {
64
- readonly idempotencyKey: string;
65
- readonly providerReference: string | null;
66
- readonly intentHash: string;
67
- readonly prepared: PreparedAction;
68
- }
69
- export type ProviderReconciliationResult = {
70
- readonly status: "COMPLETED";
71
- readonly result: ProviderResult;
72
- } | {
73
- readonly status: "NOT_EXECUTED";
74
- } | {
75
- readonly status: "UNKNOWN";
76
- };
77
- /**
78
- * One contract for every family of consequential actions. It is deliberately
79
- * four small methods, three of them pure:
80
- *
81
- * - `prepare` works out what the action asks for and what its effect should
82
- * be. It reaches nothing and may be called before the authority is asked.
83
- * - `execute` performs the side effect, once, inside the dispatch the
84
- * pipeline opened. A provider that neither committed nor refused is an
85
- * `IndeterminateOutcome`, never a guess.
86
- * - `observeEffect` reads what the provider said into the profile's
87
- * projection. Pure: no second call, no interpretation of silence.
88
- * - `reconcile` asks the provider what it did with an idempotency key,
89
- * read-only, and may never initiate anything.
90
- *
91
- * A second family is a directory beside `banking/`, not a rewrite: the
92
- * handler bridge, the comparison, the evidence and the verifier all work off
93
- * this contract alone.
94
- */
95
- export interface EffectAdapter<TAction> {
96
- readonly id: string;
97
- readonly version: string;
98
- /** The transport action names this adapter answers for. */
99
- readonly actionTypes: readonly string[];
100
- prepare(action: TAction): PreparedAction;
101
- execute(execution: AdapterExecution<TAction>): Promise<ProviderResult>;
102
- observeEffect(result: ProviderResult, prepared: PreparedAction): JsonObject | null;
103
- reconcile(context: AdapterReconciliation): Promise<ProviderReconciliationResult>;
104
- }
105
- /** A value the projection can hold, narrowed for comparison. */
106
- export type ProjectionValue = JsonValue;
10
+ export { IndeterminateOutcome, type AdapterExecution, type AdapterReconciliation, type EffectAdapter, type EffectPreparedAction as PreparedAction, type ObservationMethod, type ProjectionValue, type ProviderReconciliationResult, type ProviderResult, } from "@decionis/agent-safe-pipeline";
107
11
  //# sourceMappingURL=EffectAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EffectAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/EffectAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC;IACpC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,wFAAwF;AACxF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,8EAA8E;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AAC;CACnC;AAED,MAAM,MAAM,4BAA4B,GACpC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACjE;IAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACnC;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aAAa,CAAC,OAAO;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC;IACzC,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACvE,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC;IACnF,SAAS,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAClF;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"EffectAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/EffectAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,oBAAoB,IAAI,cAAc,EAC3C,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,4BAA4B,EACjC,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAC"}
@@ -1,22 +1,11 @@
1
1
  /**
2
- * A provider that neither committed nor refused. Thrown from `execute`
3
- * after the request left the process, so the registry reports an unknown
4
- * outcome and nothing interprets silence as success.
2
+ * The effect-adapter contract moved into `@decionis/agent-safe-pipeline`,
3
+ * where it is the dispatch style of `agent-safe.executors.native/1` under its
4
+ * earlier name (`EffectAdapterExecutor` runs one as a `NativeExecutor`).
5
+ * Re-exported here, unchanged, so every adapter and import written against
6
+ * this module keeps working.
5
7
  *
6
- * A provider can answer an indeterminate status with its signed receipt of
7
- * the effect all the same. `receipt` carries it to the finalization, where
8
- * the authority verifies it, instead of it being dropped with the answer.
8
+ * @deprecated Implement the pipeline's `NativeExecutor` with `style: "dispatch"`.
9
9
  */
10
- export class IndeterminateOutcome extends Error {
11
- reason;
12
- providerStatus;
13
- receipt;
14
- constructor(reason, providerStatus = null, receipt = null) {
15
- super(reason);
16
- this.reason = reason;
17
- this.providerStatus = providerStatus;
18
- this.receipt = receipt;
19
- this.name = "IndeterminateOutcome";
20
- }
21
- }
10
+ export { IndeterminateOutcome, } from "@decionis/agent-safe-pipeline";
22
11
  //# sourceMappingURL=EffectAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EffectAdapter.js","sourceRoot":"","sources":["../../src/adapters/EffectAdapter.ts"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAE3B;IACA;IACA;IAHlB,YACkB,MAAc,EACd,iBAAgC,IAAI,EACpC,UAAyB,IAAI;QAE7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAJE,WAAM,GAAN,MAAM,CAAQ;QACd,mBAAc,GAAd,cAAc,CAAsB;QACpC,YAAO,GAAP,OAAO,CAAsB;QAG7C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF"}
1
+ {"version":3,"file":"EffectAdapter.js","sourceRoot":"","sources":["../../src/adapters/EffectAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,oBAAoB,GASrB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,93 @@
1
+ import type { AgentProposal, ClaimedExecution, DownstreamTarget, EffectAdapter, EffectObservation, EffectPreparedAction, ExecutionCapability, ExecutionEffect, ExecutorScope, JsonObject, NativeExecutor, PlatformId, PreparedAction, ProviderResult, ReconcileContext, ReconcileResult } from "@decionis/agent-safe-pipeline";
2
+ import type { RegisteredEffect } from "./EffectEvidenceRegister.js";
3
+ /** How an adapter's action is described to the authority: what `prepare` binds beyond the effect. */
4
+ export interface ActionDescription {
5
+ readonly proposal: AgentProposal;
6
+ readonly downstreamTarget: DownstreamTarget;
7
+ readonly idempotencyKey: string;
8
+ readonly facts: JsonObject;
9
+ }
10
+ export interface EffectAdapterExecutorOptions<TAction> {
11
+ readonly adapter: EffectAdapter<TAction>;
12
+ readonly platform: PlatformId;
13
+ /** How the action reads as an intent; the adapter itself only knows its effect. */
14
+ readonly describe: (action: TAction, prepared: EffectPreparedAction) => ActionDescription;
15
+ /** What the connection can execute; absent, every action type is stated as live. */
16
+ readonly capabilities?: (scope: ExecutorScope) => Promise<readonly ExecutionCapability[]>;
17
+ readonly clock?: () => Date;
18
+ }
19
+ /** What the adapter's dispatch left for `observe`: everything the effect record is built from. */
20
+ export interface AdapterDispatchReceipt {
21
+ readonly prepared: EffectPreparedAction;
22
+ readonly result: ProviderResult | null;
23
+ readonly indeterminate: {
24
+ readonly reason: string;
25
+ readonly providerStatus: string | null;
26
+ } | null;
27
+ readonly correlationId: string;
28
+ readonly idempotencyKey: string;
29
+ }
30
+ /** What `observe` reads a dispatch as: the effect record, and the attempt it was observed for. */
31
+ export interface AdapterObservation {
32
+ readonly record: RegisteredEffect;
33
+ readonly indeterminate: AdapterDispatchReceipt["indeterminate"];
34
+ readonly correlationId: string;
35
+ }
36
+ /**
37
+ * Any `EffectAdapter` as a dispatch-style `NativeExecutor`
38
+ * (`agent-safe.executors.native/1`): the adapter keeps its four methods and
39
+ * this class says them in the contract's terms. `prepare` is the adapter's,
40
+ * plus how the action reads as an intent; `execute` is the adapter's write,
41
+ * inside the dispatch the caller opened and within its deadline; `observe`
42
+ * is the adapter's projection turned into the effect record, field by field
43
+ * against what was authorised; `reconcile` is the adapter's read-only
44
+ * lookup, complete only on a matching read-back.
45
+ *
46
+ * The record is evidence, so it rides on the observation for whoever
47
+ * finalizes the grant — the runtime registers it for its verifier — and its
48
+ * wire form rides as `evidence` for a runner that finalizes directly.
49
+ */
50
+ export declare class EffectAdapterExecutor<TAction> implements NativeExecutor<TAction, AdapterDispatchReceipt, AdapterObservation> {
51
+ private readonly options;
52
+ readonly platform: PlatformId;
53
+ readonly version: string;
54
+ readonly style: "dispatch";
55
+ private readonly clock;
56
+ /** The adapter's own preparation of each prepared action, so a write never prepares twice. */
57
+ private readonly effects;
58
+ constructor(options: EffectAdapterExecutorOptions<TAction>);
59
+ get actionTypes(): readonly string[];
60
+ /** The adapter's observer identity, as the effect record and the authority name it. */
61
+ get observer(): {
62
+ readonly id: string;
63
+ readonly version: string;
64
+ };
65
+ capabilities(scope: ExecutorScope): Promise<readonly ExecutionCapability[]>;
66
+ prepare(action: TAction): Promise<PreparedAction>;
67
+ /** `prepare`, synchronously: the adapter reaches nothing, so neither does this. */
68
+ prepareNow(action: TAction): PreparedAction;
69
+ /**
70
+ * The adapter's write, once, inside the caller's dispatch. A provider that
71
+ * neither committed nor refused is carried as indeterminate, with any
72
+ * receipt it gave; any other error after the dispatch began propagates, so
73
+ * the caller reports an outcome nobody knows.
74
+ */
75
+ execute(run: ClaimedExecution<TAction>): Promise<ExecutionEffect<AdapterDispatchReceipt>>;
76
+ /**
77
+ * The provider's answer as the effect record: the adapter's projection,
78
+ * compared with what was authorised. An outcome nobody can determine stays
79
+ * undetermined; a provider that was reached and said no is a refusal, not
80
+ * a success whose effect block says otherwise.
81
+ */
82
+ observe(effect: ExecutionEffect<AdapterDispatchReceipt>): Promise<EffectObservation<AdapterObservation>>;
83
+ /**
84
+ * The adapter's read-only lookup. Absence of an error is not success: only
85
+ * a read-back whose projection matches what was authorised completes a
86
+ * reconciliation.
87
+ */
88
+ reconcile(context: ReconcileContext): Promise<ReconcileResult<AdapterObservation>>;
89
+ /** The adapter's preparation of a prepared action: remembered from `prepare`, or made again. */
90
+ private effectOf;
91
+ private evidenceOf;
92
+ }
93
+ //# sourceMappingURL=EffectAdapterExecutor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EffectAdapterExecutor.d.ts","sourceRoot":"","sources":["../../src/adapters/EffectAdapterExecutor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EAEb,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,qGAAqG;AACrG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA4B,CAAC,OAAO;IACnD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,KAAK,iBAAiB,CAAC;IAC1F,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,SAAS,mBAAmB,EAA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