@xemahq/decision-plane-nest 0.1.0 → 0.3.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/README.md CHANGED
@@ -4,9 +4,55 @@ The **producer** side of the Xema human-decision primitive.
4
4
 
5
5
  A service that needs a human to decide something opens an ask on `decision-api`
6
6
  and acts when somebody answers. Every such service needs the same five calls,
7
- the same envelope discipline, the same org header and the same "is a decision
8
- plane even installed here" probe — and two of them had written all of it twice,
9
- in two different transports.
7
+ the same envelope discipline and the same org header.
8
+
9
+ > ## ⚠️ THIS PACKAGE STILL HAS ZERO CONSUMERS. Re-measured 2026-09-07, across
10
+ > ## all 28 repositories enumerated from `.gitmodules`, at `origin/develop`.
11
+ >
12
+ > `"@xemahq/decision-plane-nest"` resolves in exactly one MANIFEST — its own.
13
+ > Every other hit fleet-wide is prose: this README, `src/wire.ts`'s header,
14
+ > `.claude/rules/decision-primitive.md`, and a docblock in `authorization-api`
15
+ > explaining why that service does not use it. `from '@xemahq/decision-plane-nest'`
16
+ > occurs in no executable file anywhere. Positive control, same query shape:
17
+ > `"@xemahq/decision-internal-api-client"` resolves in 9 manifests in
18
+ > `repos/xema-base` and 1 in `repos/xema-cultivars`.
19
+ >
20
+ > Meanwhile **eight** services reach the decision plane today, every one of them
21
+ > through the GENERATED client `@xemahq/decision-internal-api-client`.
22
+ >
23
+ > **The SPLIT this package implements is right** — extract the ask, leave the
24
+ > resume, per `.claude/rules/decision-primitive.md`.
25
+ >
26
+ > ### What sub-plan `06` item 1d landed here on 2026-09-07, and what it did not
27
+ >
28
+ > **LANDED.** The fail-open `isAvailable()` probe, `DecisionPlaneAbsentError`
29
+ > and the `@Optional()` service-registry injection are DELETED — machinery for
30
+ > a resting state that does not occur. Re-measured by PARSING all eight
31
+ > `distribution.lock.json` in `repos-infra/xema-distributions` rather than
32
+ > grepping them: `decision-api` ships in **all eight**, carried by the
33
+ > `decision` biome at `"installPolicy": "required"` in every one, `minimal` and
34
+ > `appliance-lean` included. Two-sided control, same parse: `billing-api` is in
35
+ > **two** of the eight. And `src/wire.ts`'s 230-line hand mirror of the wire is
36
+ > deleted in favour of importing `@xemahq/kernel-contracts/decision`, which is
37
+ > the authority and which the carved catalog floor (34.2.0) actually resolves.
38
+ >
39
+ > **NOT LANDED — and the blocker is NOT the one previously recorded here.**
40
+ > This box used to name **D-23-3** as blocking the error rebase. D-23-3 is
41
+ > DISCHARGED: item 8 landed `XemaError` and one RFC 9457 projection. What
42
+ > blocks the rebase is a PUBLISH — `@xemahq/kernel-contracts/http` is in **no
43
+ > published version**, 36.1.0 included, while this repository's lockfile
44
+ > resolves 34.2.0. See `src/errors.ts`, which records the measurement and the
45
+ > sequencing.
46
+ >
47
+ > **NOT LANDED — the transport.** Pointing this façade at the generated client
48
+ > so those eight services can adopt it is still an L1 → L2 edge: this package
49
+ > is layer 1 (`xema-kernel-sdk`) and `@xemahq/decision-internal-api-client` is
50
+ > layer 2 (`xema-base`). Keeping it at L1 over `TypedServiceClient` — which is
51
+ > what it does — is legal by layer and does not solve the problem: it asks a
52
+ > producer to move OFF the canonical generated-client transport, which is why
53
+ > `authorization-api` declined it in writing. That is sub-plan `03`'s
54
+ > repository-topology question, and it is the one blocker that genuinely
55
+ > stands.
10
56
 
11
57
  ```ts
12
58
  @Module({ imports: [DecisionPlaneModule], providers: [MyAskService] })
@@ -29,11 +75,17 @@ const decision = await this.decisions.open(orgId, {
29
75
 
30
76
  **The resume.** Reacting to a committed answer is safety-critical and genuinely
31
77
  producer-specific: the capability gate replays an invocation under a
32
- compare-and-set, mailops dispatches mail through the capability plane, the Store
33
- flips a version lifecycle under its own claim. *Extract the ask; leave the
78
+ compare-and-set, mailops dispatches mail through the capability plane,
79
+ `biome-host-api` resumes a lifecycle approval. *Extract the ask; leave the
34
80
  resume* is the program's rule, and an SDK that swallowed the resume would be
35
81
  centralising the half that must not be.
36
82
 
83
+ (This sentence named "the Store flips a version lifecycle under its own claim".
84
+ Measured 2026-09-05: `repos/xema-store-api` has **no** human-decision producer
85
+ at all — its only `decision` symbol is `PolicyDecisionKind`, the PDP verdict,
86
+ which is a different concept the leftmost-substring grep conflates. Replaced
87
+ with a resume that exists.)
88
+
37
89
  **Delivery.** `decision-api` emits; `user-hub-api` owns materialisation,
38
90
  per-category preferences, presence gating and every channel adapter. Nothing
39
91
  here knows a recipient prefers email.
@@ -46,42 +98,56 @@ for good reasons (a review nobody got to must not become un-approvable by the
46
98
  passage of time). Together that makes an unanswered ask **immortal**.
47
99
 
48
100
  So `withdraw()` is not a convenience. A producer that knows its subject is gone
49
- must call it, and both live producers now do — from a mailbox disconnect and
50
- from a listing archive. It is best-effort by design (its callers are mid-way
101
+ must call it. (This sentence read "and both live producers now do — from a
102
+ mailbox disconnect and from a listing archive". This package has zero
103
+ consumers, so nothing calls `withdraw()` on it; three of the seven real
104
+ producers call close/withdraw through the generated client instead —
105
+ `biome-host-api`, `connector-gateway-api` and `mailops`.) It is best-effort by design (its callers are mid-way
51
106
  through something the user asked for) and never silent: 404/409 are the state it
52
107
  exists to reach, everything else is logged, and
53
108
  `GET /internal/decisions/abandoned` is what surfaces the remainder.
54
109
 
55
- ## The wire mirror, and when to delete it
110
+ ## The wire mirror, and how it was deleted
56
111
 
57
- `src/wire.ts` restates decision-api's vocabulary instead of importing
58
- `@xemahq/kernel-contracts/decision`. That is not a preference:
112
+ `src/wire.ts` USED TO restate decision-api's vocabulary instead of importing
113
+ `@xemahq/kernel-contracts/decision`. That was not a preference:
59
114
 
60
- > The two consumers sit in repositories pinned to kernel-contracts **14.1.0** and
61
- > **13.0.0**. The `decision` subpath first ships in 15.0.0, and raising
115
+ > ~~The two consumers sit in repositories pinned to kernel-contracts **14.1.0**
116
+ > and **13.0.0**. The `decision` subpath first ships in 15.0.0, and raising
62
117
  > xema-store-api's pin is not a local edit — measured 2026-08-20, **nine**
63
- > packages in that lockfile declare `peer @xemahq/kernel-contracts ^12.0.0`.
64
-
65
- An SDK importing the kernel subpath would be unconsumable by the very producer
66
- whose duplication it exists to delete. So it mirrors the wire ONCE, replacing
67
- the two hand-written mirrors those producers carry today.
68
-
69
- Two things keep that honest:
70
-
71
- - it mirrors only what a **producer** sends or reads — the answerer surface, the
72
- escalation vocabulary and `Recipient`'s five target variants are absent,
73
- because a mirror of a field nobody uses is a field that drifts unnoticed;
74
- - `test/wire-parity.spec.ts` asserts every value against decision-api's own
75
- `prisma/schema.prisma`, in both directions, and is mutation-tested. It reads
76
- the schema as TEXT so it needs nothing installed, and it SKIPS LOUDLY in a
77
- standalone clone where decision-api does not exist rather than passing
78
- vacuously.
79
-
80
- **When the fleet upgrade happens, `wire.ts` collapses into an import and is
81
- deleted.** It says so in the file, so nobody preserves it out of politeness.
82
-
83
- `registry.contract.ts` is the same trade for a single method, and
84
- `test/registry-assignability.spec.ts` pins it against the real signature — an
85
- earlier draft declared an array and read `.length`, which compiles and is
86
- `undefined` on the real `ResolvedService`, so "is a plane installed" would have
87
- answered NO for one that was.
118
+ > packages in that lockfile declare `peer @xemahq/kernel-contracts ^12.0.0`.~~
119
+
120
+ **That reason expired and nobody re-derived it.** Measured 2026-09-05:
121
+ `repos/xema-cultivars` declares `'@xemahq/kernel-contracts': ^35.1.0` and
122
+ `repos/xema-base` declares `^36.0.0` — twenty majors past the stated blocker —
123
+ and `xema-store-api` is not a decision producer at all. The fleet upgrade this
124
+ paragraph was waiting for HAPPENED, which is how a deletion condition gets met
125
+ without anyone noticing it was met.
126
+
127
+ **That is DONE.** `src/wire.ts` no longer mirrors anything: it re-exports
128
+ `@xemahq/kernel-contracts/decision`, which is the authority, and declares only
129
+ the two shapes the kernel does not have — `CloseDecisionRequest` and the
130
+ producer's `DecisionView`/`DecisionCommitView` read projection. Measured across
131
+ `kernel-contracts/src/**` at `origin/develop`, those three names return ZERO
132
+ occurrences, so the kernel owns the ask a producer OPENS and not yet the ask it
133
+ CLOSES or reads back. That is a gap in the kernel, recorded in
134
+ `.claude/plans/xema-convergence-program/24-merge-wave-sequencing.md` §2, and
135
+ when it closes these collapse into imports too.
136
+
137
+ The deletion condition the old header set — *"when the fleet upgrade happens"* —
138
+ had been MET without anyone noticing, which is how a deletion condition rots.
139
+ It was re-derived at the version this repository's own lockfile resolves
140
+ (34.2.0, which ships `dist/decision`) rather than at the one the aggregator
141
+ links, because a green aggregator build cannot answer that question.
142
+
143
+ `test/wire-parity.spec.ts` is deleted with the mirror rather than ported. It
144
+ compared the copied literals against decision-api's `prisma/schema.prisma`, read
145
+ as text by walking up to the aggregator root, and SKIPPED when that file was
146
+ absent — which is every standalone clone and every carved CI run, i.e. the one
147
+ place the package is actually built. `test/wire-is-the-kernel.spec.ts` replaces
148
+ it with a stronger and cheaper assertion: the SDK's enums must be the KERNEL's
149
+ objects by REFERENCE, which a restatement cannot satisfy, and which needs no
150
+ sibling repository to run.
151
+
152
+ `registry.contract.ts` and `test/registry-assignability.spec.ts` are deleted
153
+ with the probe they existed for.
@@ -1,19 +1,15 @@
1
1
  import { type TypedServiceClient } from '@xemahq/service-registry-nest';
2
- import type { ServiceRegistry } from './registry.contract';
3
- import type { CloseDecisionRequest, DecisionView, OpenDecisionRequest } from './wire';
2
+ import type { CloseDecisionRequest, DecisionView, OpenDecisionInput } from './wire';
4
3
  export declare const DECISION_API_SERVICE = "decision-api";
5
4
  export declare class DecisionPlaneClient {
6
5
  private readonly decisions;
7
- private readonly registry?;
8
6
  private readonly logger;
9
- constructor(decisions: TypedServiceClient, registry?: ServiceRegistry | undefined);
10
- isAvailable(): Promise<boolean>;
11
- open(orgId: string, request: OpenDecisionRequest): Promise<DecisionView>;
7
+ constructor(decisions: TypedServiceClient);
8
+ open(orgId: string, request: OpenDecisionInput): Promise<DecisionView>;
12
9
  findByProducerRef(orgId: string, producerRef: string): Promise<DecisionView | null>;
13
10
  read(orgId: string, decisionId: string): Promise<DecisionView>;
14
11
  close(orgId: string, decisionId: string, request: CloseDecisionRequest): Promise<void>;
15
12
  withdraw(orgId: string, decisionId: string, reason: string): Promise<boolean>;
16
- private assertAvailable;
17
13
  private translate;
18
14
  }
19
15
  //# sourceMappingURL=decision-plane.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decision-plane.client.d.ts","sourceRoot":"","sources":["../src/decision-plane.client.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AAUvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAWhB,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAyDnD,qBACa,mBAAmB;IAK5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAO1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAX5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAI5C,SAAS,EAAE,kBAAkB,EAO7B,QAAQ,CAAC,EAAE,eAAe,YAAA;IAWvC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IA6B/B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IA2BxE,iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAwBzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqB9D,KAAK,CACT,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC;IAiCV,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC;YAwBL,eAAe;IAgB7B,OAAO,CAAC,SAAS;CAiBlB"}
1
+ {"version":3,"file":"decision-plane.client.d.ts","sourceRoot":"","sources":["../src/decision-plane.client.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AASvC,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EAClB,MAAM,QAAQ,CAAC;AAYhB,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAoGnD,qBACa,mBAAmB;IAK5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJ5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAI5C,SAAS,EAAE,kBAAkB;IAW1C,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IA8BtE,iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAuBzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB9D,KAAK,CACT,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC;IAmCV,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC;IAsCnB,OAAO,CAAC,SAAS;CAsBlB"}
@@ -20,6 +20,7 @@ const errors_1 = require("./errors");
20
20
  const wire_1 = require("./wire");
21
21
  exports.DECISION_API_SERVICE = 'decision-api';
22
22
  const ORG_HEADER = 'X-Xema-Org-Id';
23
+ const SUBJECT_UNREGISTERED_CODE = 'DECISION_SUBJECT_RESOURCE_UNREGISTERED';
23
24
  function unwrap(body, operation) {
24
25
  if (typeof body !== 'object' ||
25
26
  body === null ||
@@ -31,38 +32,23 @@ function unwrap(body, operation) {
31
32
  return body.data;
32
33
  }
33
34
  function statusOf(err) {
34
- const status = typeof err === 'object' && err !== null
35
- ? err.status
35
+ return (0, service_registry_nest_1.isTypedServiceClientResponseError)(err) ? err.status : undefined;
36
+ }
37
+ function codeOf(err) {
38
+ return (0, service_registry_nest_1.isTypedServiceClientResponseError)(err)
39
+ ? (0, service_registry_nest_1.readProblemCode)(err.body)
36
40
  : undefined;
37
- return typeof status === 'number' ? status : undefined;
38
41
  }
39
42
  function detailOf(err) {
40
43
  return err instanceof Error ? err.message : String(err);
41
44
  }
42
45
  let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
43
46
  decisions;
44
- registry;
45
47
  logger = new common_1.Logger(DecisionPlaneClient_1.name);
46
- constructor(decisions, registry) {
48
+ constructor(decisions) {
47
49
  this.decisions = decisions;
48
- this.registry = registry;
49
- }
50
- async isAvailable() {
51
- if (this.registry === undefined) {
52
- return true;
53
- }
54
- try {
55
- await this.registry.resolve(exports.DECISION_API_SERVICE);
56
- return true;
57
- }
58
- catch (err) {
59
- this.logger.debug(`${exports.DECISION_API_SERVICE} is not resolvable from the service registry: ` +
60
- detailOf(err));
61
- return false;
62
- }
63
50
  }
64
51
  async open(orgId, request) {
65
- await this.assertAvailable();
66
52
  try {
67
53
  const body = await this.decisions.post('/internal/decisions', request, { headers: { [ORG_HEADER]: orgId } });
68
54
  const decision = unwrap(body, 'POST /internal/decisions');
@@ -75,7 +61,6 @@ let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
75
61
  }
76
62
  }
77
63
  async findByProducerRef(orgId, producerRef) {
78
- await this.assertAvailable();
79
64
  try {
80
65
  const body = await this.decisions.get(`/internal/decisions/by-ref/${encodeURIComponent(producerRef)}`, { headers: { [ORG_HEADER]: orgId } });
81
66
  return unwrap(body, 'GET /internal/decisions/by-ref');
@@ -88,7 +73,6 @@ let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
88
73
  }
89
74
  }
90
75
  async read(orgId, decisionId) {
91
- await this.assertAvailable();
92
76
  try {
93
77
  const body = await this.decisions.get(`/internal/decisions/${encodeURIComponent(decisionId)}`, { headers: { [ORG_HEADER]: orgId } });
94
78
  return unwrap(body, 'GET /internal/decisions/:id');
@@ -98,7 +82,6 @@ let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
98
82
  }
99
83
  }
100
84
  async close(orgId, decisionId, request) {
101
- await this.assertAvailable();
102
85
  try {
103
86
  await this.decisions.post(`/internal/decisions/${encodeURIComponent(decisionId)}/close`, request, { headers: { [ORG_HEADER]: orgId } });
104
87
  }
@@ -107,9 +90,6 @@ let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
107
90
  }
108
91
  }
109
92
  async withdraw(orgId, decisionId, reason) {
110
- if (!(await this.isAvailable())) {
111
- return false;
112
- }
113
93
  try {
114
94
  await this.close(orgId, decisionId, {
115
95
  outcome: wire_1.DecisionOutcome.WITHDRAWN,
@@ -128,18 +108,13 @@ let DecisionPlaneClient = DecisionPlaneClient_1 = class DecisionPlaneClient {
128
108
  return false;
129
109
  }
130
110
  }
131
- async assertAvailable() {
132
- if (!(await this.isAvailable())) {
133
- throw new errors_1.DecisionPlaneAbsentError(`no healthy '${exports.DECISION_API_SERVICE}' instance is registered`);
134
- }
135
- }
136
111
  translate(err, operation, subjectResourceRef) {
137
- if (err instanceof errors_1.DecisionEnvelopeError || err instanceof errors_1.DecisionPlaneAbsentError) {
112
+ if (err instanceof errors_1.DecisionEnvelopeError) {
138
113
  return err;
139
114
  }
140
115
  const detail = detailOf(err);
141
116
  if (subjectResourceRef !== undefined &&
142
- detail.includes('DECISION_SUBJECT_RESOURCE_UNREGISTERED')) {
117
+ codeOf(err) === SUBJECT_UNREGISTERED_CODE) {
143
118
  return new errors_1.DecisionSubjectUnregisteredError(subjectResourceRef, detail);
144
119
  }
145
120
  return new errors_1.DecisionPlaneRequestError(operation, statusOf(err), detail, err);
@@ -149,8 +124,6 @@ exports.DecisionPlaneClient = DecisionPlaneClient;
149
124
  exports.DecisionPlaneClient = DecisionPlaneClient = DecisionPlaneClient_1 = __decorate([
150
125
  (0, common_1.Injectable)(),
151
126
  __param(0, (0, service_registry_nest_1.InjectService)(exports.DECISION_API_SERVICE)),
152
- __param(1, (0, common_1.Optional)()),
153
- __param(1, (0, common_1.Inject)(service_registry_nest_1.SERVICE_REGISTRY_TOKEN)),
154
- __metadata("design:paramtypes", [Function, Object])
127
+ __metadata("design:paramtypes", [Function])
155
128
  ], DecisionPlaneClient);
156
129
  //# sourceMappingURL=decision-plane.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"decision-plane.client.js","sourceRoot":"","sources":["../src/decision-plane.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAsE;AACtE,yEAIuC;AAEvC,qCAKkB;AAClB,iCAAyC;AAkB5B,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAGnD,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,SAAS,MAAM,CAAI,IAAa,EAAE,SAAiB;IACjD,IACE,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;QAChB,IAA2B,CAAC,IAAI,KAAK,IAAI;QACzC,IAA2B,CAAC,IAAI,KAAK,SAAS,EAC/C,CAAC;QACD,MAAM,IAAI,8BAAqB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IACD,OAAQ,IAAoB,CAAC,IAAI,CAAC;AACpC,CAAC;AAGD,SAAS,QAAQ,CAAC,GAAY;IAC5B,MAAM,MAAM,GACV,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QACrC,CAAC,CAAE,GAA4B,CAAC,MAAM;QACtC,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,C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AAM,MAAM,EAAE,CAC5D,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,MAAM,GACV,GAAG,YAAY,kCAAyB,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,+BAA+B,UAAU,SAAS,KAAK,MAAM,QAAQ,CAAC,GAAG,CAAC,IAAI;gBAC5E,wEAAwE,CAC3E,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAgBO,SAAS,CACf,GAAY,EACZ,SAAiB,EACjB,kBAA2B;QAE3B,IAAI,GAAG,YAAY,8BAAqB,EAAE,CAAC;YACzC,OAAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7B,IACE,kBAAkB,KAAK,SAAS;YAChC,MAAM,CAAC,GAAG,CAAC,KAAK,yBAAyB,EACzC,CAAC;YACD,OAAO,IAAI,yCAAgC,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,IAAI,kCAAyB,CAClC,SAAS,EACT,QAAQ,CAAC,GAAG,CAAC,EACb,MAAM,EACN,GAAG,CACJ,CAAC;IACJ,CAAC;CACF,CAAA;AAnMY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,qCAAa,EAAC,4BAAoB,CAAC,CAAA;;GAJ3B,mBAAmB,CAmM/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"decision-plane.module.d.ts","sourceRoot":"","sources":["../src/decision-plane.module.ts"],"names":[],"mappings":"AAmBA,qBAIa,mBAAmB;CAAG"}
1
+ {"version":3,"file":"decision-plane.module.d.ts","sourceRoot":"","sources":["../src/decision-plane.module.ts"],"names":[],"mappings":"AAyBA,qBAIa,mBAAmB;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"decision-plane.module.js","sourceRoot":"","sources":["../src/decision-plane.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,mEAA8D;AAqBvD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAJ/B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,2CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,2CAAmB,CAAC;KAC/B,CAAC;GACW,mBAAmB,CAAG"}
1
+ {"version":3,"file":"decision-plane.module.js","sourceRoot":"","sources":["../src/decision-plane.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,mEAA8D;AA2BvD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAJ/B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,2CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,2CAAmB,CAAC;KAC/B,CAAC;GACW,mBAAmB,CAAG"}
package/dist/errors.d.ts CHANGED
@@ -3,9 +3,6 @@ export declare abstract class DecisionPlaneError extends Error {
3
3
  cause?: unknown;
4
4
  });
5
5
  }
6
- export declare class DecisionPlaneAbsentError extends DecisionPlaneError {
7
- constructor(reason: string);
8
- }
9
6
  export declare class DecisionSubjectUnregisteredError extends DecisionPlaneError {
10
7
  readonly subjectResourceRef: string;
11
8
  constructor(subjectResourceRef: string, detail: string);
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAWA,8BAAsB,kBAAmB,SAAQ,KAAK;IACpD,SAAS,aAAa,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAA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S,EAAE,MAAM;CAQ9B"}
package/dist/errors.js CHANGED
@@ -1,19 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DecisionEnvelopeError = exports.DecisionPlaneRequestError = exports.DecisionSubjectUnregisteredError = exports.DecisionPlaneAbsentError = exports.DecisionPlaneError = void 0;
3
+ exports.DecisionEnvelopeError = exports.DecisionPlaneRequestError = exports.DecisionSubjectUnregisteredError = exports.DecisionPlaneError = void 0;
4
4
  class DecisionPlaneError extends Error {
5
5
  constructor(message, options) {
6
6
  super(message, options);
7
7
  this.name = new.target.name;
8
+ Object.setPrototypeOf(this, new.target.prototype);
8
9
  }
9
10
  }
10
11
  exports.DecisionPlaneError = DecisionPlaneError;
11
- class DecisionPlaneAbsentError extends DecisionPlaneError {
12
- constructor(reason) {
13
- super(`The decision plane is not available: ${reason}`);
14
- }
15
- }
16
- exports.DecisionPlaneAbsentError = DecisionPlaneAbsentError;
17
12
  class DecisionSubjectUnregisteredError extends DecisionPlaneError {
18
13
  subjectResourceRef;
19
14
  constructor(subjectResourceRef, detail) {
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAWA,MAAsB,kBAAmB,SAAQ,KAAK;IACpD,YAAsB,OAAe,EAAE,OAA6B;QAClE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF;AALD,gDAKC;AAWD,MAAa,wBAAyB,SAAQ,kBAAkB;IAC9D,YAAY,MAAc;QACxB,KAAK,CAAC,wCAAwC,MAAM,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAJD,4DAIC;AAcD,MAAa,gCAAiC,SAAQ,kBAAkB;IAE3D;IADX,YACW,kBAA0B,EACnC,MAAc;QAEd,KAAK,CACH,yBAAyB,kBAAkB,+BAA+B;YACxE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AkB,GAAlB,kBAAkB,CAAQ;IAQrC,CAAC;CACF;AAXD,4EAWC;AAGD,MAAa,yBAA0B,SAAQ,kBAAkB;IAEpD;IACA;IAFX,YACW,SAAiB,EACjB,MAA0B,EACnC,MAAc,EACd,KAAe;QAEf,KAAK,CACH,gBAAgB,SAAS,SAAS;YAChC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,MAAM,GAAG,CAAC;YACjD,KAAK,MAAM,EAAE,EACf,EAAE,KAAK,EAAE,CACV,CAAC;QAVO,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAoB;IAUrC,CAAC;CACF;AAdD,8DAcC;AAeD,MAAa,qBAAsB,SAAQ,kBAAkB;IAC3D,YAAY,SAAiB;QAC3B,KAAK,CACH,gBAAgB,SAAS,8CAA8C;YACrE,uEAAuE;YACvE,iEAAiE;YACjE,wCAAwC,CAC3C,CAAC;IACJ,CAAC;CACF;AATD,sDASC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export { DecisionPlaneClient, DECISION_API_SERVICE, } from './decision-plane.client';
2
2
  export { DecisionPlaneModule } from './decision-plane.module';
3
- export { DecisionEnvelopeError, DecisionPlaneAbsentError, DecisionPlaneError, DecisionPlaneRequestError, DecisionSubjectUnregisteredError, } from './errors';
4
- export { DecisionAnswerRestriction, DecisionDeadlineEffect, DecisionKind, DecisionOptionEffect, DecisionOrgRole, DecisionOutcome, DecisionSettlement, DecisionSubjectClassification, RecipientKind, type CloseDecisionRequest, type DeclaredDecisionOption, type DecisionCommitView, type DecisionFact, type DecisionRecipient, type DecisionView, type OpenDecisionRequest, } from './wire';
5
- export type { ServiceRegistry } from './registry.contract';
3
+ export { DecisionEnvelopeError, DecisionPlaneError, DecisionPlaneRequestError, DecisionSubjectUnregisteredError, } from './errors';
4
+ export { DecisionAnswerRestriction, DecisionDeadlineEffect, DecisionKind, DecisionOptionEffect, DecisionOrgRole, DecisionOutcome, DecisionSettlement, DecisionSubjectClassification, RecipientKind, type CloseDecisionRequest, type DeclaredDecisionOption, type DecisionCommitView, type DecisionFact, type DecisionView, type OpenDecisionInput, type OpenDecisionRequest, type Recipient, } from './wire';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,6BAA6B,EAC7B,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,6BAA6B,EAC7B,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,SAAS,GACf,MAAM,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RecipientKind = exports.DecisionSubjectClassification = exports.DecisionSettlement = exports.DecisionOutcome = exports.DecisionOrgRole = exports.DecisionOptionEffect = exports.DecisionKind = exports.DecisionDeadlineEffect = exports.DecisionAnswerRestriction = exports.DecisionSubjectUnregisteredError = exports.DecisionPlaneRequestError = exports.DecisionPlaneError = exports.DecisionPlaneAbsentError = exports.DecisionEnvelopeError = exports.DecisionPlaneModule = exports.DECISION_API_SERVICE = exports.DecisionPlaneClient = void 0;
3
+ exports.RecipientKind = exports.DecisionSubjectClassification = exports.DecisionSettlement = exports.DecisionOutcome = exports.DecisionOrgRole = exports.DecisionOptionEffect = exports.DecisionKind = exports.DecisionDeadlineEffect = exports.DecisionAnswerRestriction = exports.DecisionSubjectUnregisteredError = exports.DecisionPlaneRequestError = exports.DecisionPlaneError = exports.DecisionEnvelopeError = exports.DecisionPlaneModule = exports.DECISION_API_SERVICE = exports.DecisionPlaneClient = void 0;
4
4
  var decision_plane_client_1 = require("./decision-plane.client");
5
5
  Object.defineProperty(exports, "DecisionPlaneClient", { enumerable: true, get: function () { return decision_plane_client_1.DecisionPlaneClient; } });
6
6
  Object.defineProperty(exports, "DECISION_API_SERVICE", { enumerable: true, get: function () { return decision_plane_client_1.DECISION_API_SERVICE; } });
@@ -8,7 +8,6 @@ var decision_plane_module_1 = require("./decision-plane.module");
8
8
  Object.defineProperty(exports, "DecisionPlaneModule", { enumerable: true, get: function () { return decision_plane_module_1.DecisionPlaneModule; } });
9
9
  var errors_1 = require("./errors");
10
10
  Object.defineProperty(exports, "DecisionEnvelopeError", { enumerable: true, get: function () { return errors_1.DecisionEnvelopeError; } });
11
- Object.defineProperty(exports, "DecisionPlaneAbsentError", { enumerable: true, get: function () { return errors_1.DecisionPlaneAbsentError; } });
12
11
  Object.defineProperty(exports, "DecisionPlaneError", { enumerable: true, get: function () { return errors_1.DecisionPlaneError; } });
13
12
  Object.defineProperty(exports, "DecisionPlaneRequestError", { enumerable: true, get: function () { return errors_1.DecisionPlaneRequestError; } });
14
13
  Object.defineProperty(exports, "DecisionSubjectUnregisteredError", { enumerable: true, get: function () { return errors_1.DecisionSubjectUnregisteredError; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAGiC;AAF/B,4HAAA,mBAAmB,OAAA;AACnB,6HAAA,oBAAoB,OAAA;AAEtB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,mCAMkB;AALhB,+GAAA,qBAAqB,OAAA;AACrB,kHAAA,wBAAwB,OAAA;AACxB,4GAAA,kBAAkB,OAAA;AAClB,mHAAA,yBAAyB,OAAA;AACzB,0HAAA,gCAAgC,OAAA;AAElC,+BAiBgB;AAhBd,iHAAA,yBAAyB,OAAA;AACzB,8GAAA,sBAAsB,OAAA;AACtB,oGAAA,YAAY,OAAA;AACZ,4GAAA,oBAAoB,OAAA;AACpB,uGAAA,eAAe,OAAA;AACf,uGAAA,eAAe,OAAA;AACf,0GAAA,kBAAkB,OAAA;AAClB,qHAAA,6BAA6B,OAAA;AAC7B,qGAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAGiC;AAF/B,4HAAA,mBAAmB,OAAA;AACnB,6HAAA,oBAAoB,OAAA;AAEtB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,mCAKkB;AAJhB,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA;AAClB,mHAAA,yBAAyB,OAAA;AACzB,0HAAA,gCAAgC,OAAA;AAElC,+BAkBgB;AAjBd,iHAAA,yBAAyB,OAAA;AACzB,8GAAA,sBAAsB,OAAA;AACtB,oGAAA,YAAY,OAAA;AACZ,4GAAA,oBAAoB,OAAA;AACpB,uGAAA,eAAe,OAAA;AACf,uGAAA,eAAe,OAAA;AACf,0GAAA,kBAAkB,OAAA;AAClB,qHAAA,6BAA6B,OAAA;AAC7B,qGAAA,aAAa,OAAA"}
package/dist/wire.d.ts CHANGED
@@ -1,94 +1,7 @@
1
- export declare enum DecisionKind {
2
- CONFIRM = "CONFIRM",
3
- VERDICT = "VERDICT",
4
- PROPOSAL_SET = "PROPOSAL_SET",
5
- OPEN = "OPEN"
6
- }
7
- export declare enum DecisionOptionEffect {
8
- SETTLING_ACT = "SETTLING_ACT",
9
- SETTLING_NO_ACT = "SETTLING_NO_ACT",
10
- ADDITIVE = "ADDITIVE"
11
- }
12
- export declare enum DecisionSettlement {
13
- BY_COMMIT = "BY_COMMIT",
14
- BY_PRODUCER = "BY_PRODUCER"
15
- }
16
- export declare enum DecisionDeadlineEffect {
17
- CLOSE = "CLOSE",
18
- HIDE = "HIDE",
19
- ESCALATE = "ESCALATE"
20
- }
21
- export declare enum DecisionAnswerRestriction {
22
- ANY_PERMITTED = "ANY_PERMITTED",
23
- ADDRESSED_ONLY = "ADDRESSED_ONLY"
24
- }
25
- export declare enum DecisionOrgRole {
26
- MEMBER = "MEMBER",
27
- ADMIN = "ADMIN",
28
- OWNER = "OWNER"
29
- }
30
- export declare enum DecisionSubjectClassification {
31
- PUBLIC = "PUBLIC",
32
- INTERNAL = "INTERNAL",
33
- CONFIDENTIAL = "CONFIDENTIAL",
34
- SECRET = "SECRET",
35
- REGULATED = "REGULATED"
36
- }
37
- export declare enum DecisionOutcome {
38
- COMMITTED_ACTION = "COMMITTED_ACTION",
39
- COMMITTED_NO_ACTION = "COMMITTED_NO_ACTION",
40
- NO_JUDGEMENT = "NO_JUDGEMENT",
41
- WITHDRAWN = "WITHDRAWN"
42
- }
43
- export declare enum RecipientKind {
44
- HUMAN = "human",
45
- AGENT = "agent",
46
- ENDPOINT = "endpoint",
47
- IDENTITY_GROUP = "identity_group",
48
- WORKFLOW = "workflow"
49
- }
50
- export interface DecisionFact {
51
- readonly label: string;
52
- readonly value: string;
53
- readonly href?: string;
54
- }
55
- export interface DecisionRecipient {
56
- readonly kind: RecipientKind;
57
- readonly target: Readonly<Record<string, unknown>>;
58
- readonly mandatory?: boolean;
59
- }
60
- export interface DeclaredDecisionOption {
61
- readonly key: string;
62
- readonly label: string;
63
- readonly description?: string;
64
- readonly effect: DecisionOptionEffect;
65
- readonly commitThreshold?: number;
66
- readonly replySchema?: Readonly<Record<string, unknown>>;
67
- readonly capabilityRef?: string;
68
- readonly capabilityArguments?: Readonly<Record<string, unknown>>;
69
- }
70
- export interface OpenDecisionRequest {
71
- readonly idempotencyKey: string;
72
- readonly kind: DecisionKind;
73
- readonly settlement?: DecisionSettlement;
74
- readonly title: string;
75
- readonly summary?: string;
76
- readonly facts?: readonly DecisionFact[];
77
- readonly deepLink?: string;
78
- readonly subjectResourceRef: string;
79
- readonly subjectClassification: DecisionSubjectClassification;
80
- readonly answerCapabilityRef: string;
81
- readonly producerRef?: string;
82
- readonly recipients?: readonly DecisionRecipient[];
83
- readonly answerRestriction?: DecisionAnswerRestriction;
84
- readonly minimumOrgRole?: DecisionOrgRole;
85
- readonly raisedByActorId?: string;
86
- readonly selfAnswerAllowed?: boolean;
87
- readonly deadlineAt?: string;
88
- readonly deadlineEffect?: DecisionDeadlineEffect;
89
- readonly options: readonly DeclaredDecisionOption[];
90
- readonly openReplySchema?: Readonly<Record<string, unknown>>;
91
- }
1
+ export { DecisionAnswerRestriction, DecisionDeadlineEffect, DecisionKind, DecisionOptionEffect, DecisionOrgRole, DecisionOutcome, DecisionSettlement, DecisionSubjectClassification, RecipientKind, } from '@xemahq/contracts/decision';
2
+ export type { DeclaredDecisionOption, DecisionFact, OpenDecisionRequest, Recipient, } from '@xemahq/contracts/decision';
3
+ import type { DecisionOutcome, OpenDecisionRequestInput } from '@xemahq/contracts/decision';
4
+ export type OpenDecisionInput = OpenDecisionRequestInput;
92
5
  export interface DecisionCommitView {
93
6
  readonly id: string;
94
7
  readonly optionKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAsCA,oBAAY,YAAY;IAEtB,OAAO,YAAY;IAEnB,OAAO,YAAY;IAEnB,YAAY,iBAAiB;IAE7B,IAAI,SAAS;CACd;AAGD,oBAAY,oBAAoB;IAE9B,YAAY,iBAAiB;IAE7B,eAAe,oBAAoB;IAEnC,QAAQ,aAAa;CACtB;AAGD,oBAAY,kBAAkB;IAE5B,SAAS,cAAc;IAEvB,WAAW,gBAAgB;CAC5B;AAGD,oBAAY,sBAAsB;IAEhC,KAAK,UAAU;IAEf,IAAI,SAAS;IAEb,QAAQ,aAAa;CACtB;AAGD,oBAAY,yBAAyB;IAEnC,aAAa,kBAAkB;IAE/B,cAAc,mBAAmB;CAClC;AAGD,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAGD,oBAAY,6BAA6B;IACvC,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAGD,oBAAY,eAAe;IAEzB,gBAAgB,qBAAqB;IAErC,mBAAmB,wBAAwB;IAE3C,YAAY,iBAAiB;IAE7B,SAAS,cAAc;CACxB;AAGD,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IAErB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;CACtB;AAGD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC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,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAClD;AAOD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC"}
package/dist/wire.js CHANGED
@@ -1,62 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RecipientKind = exports.DecisionOutcome = exports.DecisionSubjectClassification = exports.DecisionOrgRole = exports.DecisionAnswerRestriction = exports.DecisionDeadlineEffect = exports.DecisionSettlement = exports.DecisionOptionEffect = exports.DecisionKind = void 0;
4
- var DecisionKind;
5
- (function (DecisionKind) {
6
- DecisionKind["CONFIRM"] = "CONFIRM";
7
- DecisionKind["VERDICT"] = "VERDICT";
8
- DecisionKind["PROPOSAL_SET"] = "PROPOSAL_SET";
9
- DecisionKind["OPEN"] = "OPEN";
10
- })(DecisionKind || (exports.DecisionKind = DecisionKind = {}));
11
- var DecisionOptionEffect;
12
- (function (DecisionOptionEffect) {
13
- DecisionOptionEffect["SETTLING_ACT"] = "SETTLING_ACT";
14
- DecisionOptionEffect["SETTLING_NO_ACT"] = "SETTLING_NO_ACT";
15
- DecisionOptionEffect["ADDITIVE"] = "ADDITIVE";
16
- })(DecisionOptionEffect || (exports.DecisionOptionEffect = DecisionOptionEffect = {}));
17
- var DecisionSettlement;
18
- (function (DecisionSettlement) {
19
- DecisionSettlement["BY_COMMIT"] = "BY_COMMIT";
20
- DecisionSettlement["BY_PRODUCER"] = "BY_PRODUCER";
21
- })(DecisionSettlement || (exports.DecisionSettlement = DecisionSettlement = {}));
22
- var DecisionDeadlineEffect;
23
- (function (DecisionDeadlineEffect) {
24
- DecisionDeadlineEffect["CLOSE"] = "CLOSE";
25
- DecisionDeadlineEffect["HIDE"] = "HIDE";
26
- DecisionDeadlineEffect["ESCALATE"] = "ESCALATE";
27
- })(DecisionDeadlineEffect || (exports.DecisionDeadlineEffect = DecisionDeadlineEffect = {}));
28
- var DecisionAnswerRestriction;
29
- (function (DecisionAnswerRestriction) {
30
- DecisionAnswerRestriction["ANY_PERMITTED"] = "ANY_PERMITTED";
31
- DecisionAnswerRestriction["ADDRESSED_ONLY"] = "ADDRESSED_ONLY";
32
- })(DecisionAnswerRestriction || (exports.DecisionAnswerRestriction = DecisionAnswerRestriction = {}));
33
- var DecisionOrgRole;
34
- (function (DecisionOrgRole) {
35
- DecisionOrgRole["MEMBER"] = "MEMBER";
36
- DecisionOrgRole["ADMIN"] = "ADMIN";
37
- DecisionOrgRole["OWNER"] = "OWNER";
38
- })(DecisionOrgRole || (exports.DecisionOrgRole = DecisionOrgRole = {}));
39
- var DecisionSubjectClassification;
40
- (function (DecisionSubjectClassification) {
41
- DecisionSubjectClassification["PUBLIC"] = "PUBLIC";
42
- DecisionSubjectClassification["INTERNAL"] = "INTERNAL";
43
- DecisionSubjectClassification["CONFIDENTIAL"] = "CONFIDENTIAL";
44
- DecisionSubjectClassification["SECRET"] = "SECRET";
45
- DecisionSubjectClassification["REGULATED"] = "REGULATED";
46
- })(DecisionSubjectClassification || (exports.DecisionSubjectClassification = DecisionSubjectClassification = {}));
47
- var DecisionOutcome;
48
- (function (DecisionOutcome) {
49
- DecisionOutcome["COMMITTED_ACTION"] = "COMMITTED_ACTION";
50
- DecisionOutcome["COMMITTED_NO_ACTION"] = "COMMITTED_NO_ACTION";
51
- DecisionOutcome["NO_JUDGEMENT"] = "NO_JUDGEMENT";
52
- DecisionOutcome["WITHDRAWN"] = "WITHDRAWN";
53
- })(DecisionOutcome || (exports.DecisionOutcome = DecisionOutcome = {}));
54
- var RecipientKind;
55
- (function (RecipientKind) {
56
- RecipientKind["HUMAN"] = "human";
57
- RecipientKind["AGENT"] = "agent";
58
- RecipientKind["ENDPOINT"] = "endpoint";
59
- RecipientKind["IDENTITY_GROUP"] = "identity_group";
60
- RecipientKind["WORKFLOW"] = "workflow";
61
- })(RecipientKind || (exports.RecipientKind = RecipientKind = {}));
3
+ exports.RecipientKind = exports.DecisionSubjectClassification = exports.DecisionSettlement = exports.DecisionOutcome = exports.DecisionOrgRole = exports.DecisionOptionEffect = exports.DecisionKind = exports.DecisionDeadlineEffect = exports.DecisionAnswerRestriction = void 0;
4
+ var decision_1 = require("@xemahq/contracts/decision");
5
+ Object.defineProperty(exports, "DecisionAnswerRestriction", { enumerable: true, get: function () { return decision_1.DecisionAnswerRestriction; } });
6
+ Object.defineProperty(exports, "DecisionDeadlineEffect", { enumerable: true, get: function () { return decision_1.DecisionDeadlineEffect; } });
7
+ Object.defineProperty(exports, "DecisionKind", { enumerable: true, get: function () { return decision_1.DecisionKind; } });
8
+ Object.defineProperty(exports, "DecisionOptionEffect", { enumerable: true, get: function () { return decision_1.DecisionOptionEffect; } });
9
+ Object.defineProperty(exports, "DecisionOrgRole", { enumerable: true, get: function () { return decision_1.DecisionOrgRole; } });
10
+ Object.defineProperty(exports, "DecisionOutcome", { enumerable: true, get: function () { return decision_1.DecisionOutcome; } });
11
+ Object.defineProperty(exports, "DecisionSettlement", { enumerable: true, get: function () { return decision_1.DecisionSettlement; } });
12
+ Object.defineProperty(exports, "DecisionSubjectClassification", { enumerable: true, get: function () { return decision_1.DecisionSubjectClassification; } });
13
+ Object.defineProperty(exports, "RecipientKind", { enumerable: true, get: function () { return decision_1.RecipientKind; } });
62
14
  //# sourceMappingURL=wire.js.map
package/dist/wire.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wire.js","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":";;;AAsCA,IAAY,YASX;AATD,WAAY,YAAY;IAEtB,mCAAmB,CAAA;IAEnB,mCAAmB,CAAA;IAEnB,6CAA6B,CAAA;IAE7B,6BAAa,CAAA;AACf,CAAC,EATW,YAAY,4BAAZ,YAAY,QASvB;AAGD,IAAY,oBAOX;AAP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":"wire.js","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":";;;AAiEA,uDAUoC;AATlC,qHAAA,yBAAyB,OAAA;AACzB,kHAAA,sBAAsB,OAAA;AACtB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AACpB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,yHAAA,6BAA6B,OAAA;AAC7B,yGAAA,aAAa,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/decision-plane-nest",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Producer-side SDK for the Xema human-decision primitive. One transport, one wire mirror and one consumed-event contract for every service that opens an ask on decision-api — so a producer writes only the two things that are genuinely its own: what the ask SAYS, and what it does when a human answers.",
5
5
  "keywords": [
6
6
  "xema",
@@ -30,7 +30,8 @@
30
30
  ],
31
31
  "peerDependencies": {
32
32
  "@nestjs/common": "^10 || ^11",
33
- "@xemahq/service-registry-nest": "^0.8.0",
33
+ "@xemahq/contracts": "^0.4.0",
34
+ "@xemahq/service-registry-nest": ">=0.8.0",
34
35
  "reflect-metadata": "^0.2"
35
36
  },
36
37
  "devDependencies": {
@@ -39,13 +40,16 @@
39
40
  "@nestjs/testing": "11.1.18",
40
41
  "@types/jest": "^30.0.0",
41
42
  "@types/node": "25.2.3",
43
+ "@xemahq/contracts": "^0.4.0",
44
+ "eslint": "^9.39.4",
42
45
  "jest": "^30.3.0",
43
46
  "prettier": "3.6.2",
44
47
  "reflect-metadata": "0.2.2",
45
48
  "rxjs": "7.8.2",
46
49
  "ts-jest": "^29.4.9",
47
50
  "typescript": "5.9.3",
48
- "@xemahq/service-registry-nest": "0.8.4"
51
+ "@xemahq/eslint-config": "0.6.0",
52
+ "@xemahq/service-registry-nest": "0.11.0"
49
53
  },
50
54
  "scripts": {
51
55
  "clean": "rm -rf dist",
@@ -1,4 +0,0 @@
1
- export interface ServiceRegistry {
2
- resolve(serviceName: string): Promise<unknown>;
3
- }
4
- //# sourceMappingURL=registry.contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.contract.d.ts","sourceRoot":"","sources":["../src/registry.contract.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=registry.contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.contract.js","sourceRoot":"","sources":["../src/registry.contract.ts"],"names":[],"mappings":""}