@learncard/network-brain-service 4.1.0 → 4.1.2

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/AGENTS.md CHANGED
@@ -264,6 +264,22 @@ For certain workflows, such as sending a boost (credential) to another profile v
264
264
  - Document the expected flow, security implications, and how to set up signing authorities in both code and tests.
265
265
  - Prefer direct HTTP calls in E2E tests for service-only routes, and demonstrate signing authority setup in test code.
266
266
 
267
+ ### Credential delivery write ordering (LC-2312 / CI-20)
268
+
269
+ App-event issuance uses `sendAppCredentialWithActivity`: complete the activity graph
270
+ before starting `sendBoost`, and carry the returned activity ID into delivery.
271
+ `sendBoost` awaits each relationship write; creating promises up front reintroduces
272
+ parallel auto-commit writes and Neo4j relationship-chain contention. A listing issuer
273
+ already gets a listing `CREDENTIAL_SENT` edge from `createSentCredentialRelationship`;
274
+ only add explicit listing attribution when it names a different listing or the issuer
275
+ is a profile/integration. Preserve the owner-profile edge in every case.
276
+
277
+ This ordering removes contention within one send, not all possible contention between
278
+ independent requests. Do not retry signing, credential storage or notifications as one
279
+ unit to hide a graph failure. Focused tests cover ordering/failure boundaries, and
280
+ `test/app-credential-delivery.neo4j.spec.ts` verifies real graph counts and activity
281
+ correlation in both the integration and CI inbox configurations.
282
+
267
283
  ## Profile Connection Invites
268
284
 
269
285
  LearnCard supports creating and managing profile connection invitation links with single-use, multi-use, and unlimited usage, as well as optional expiration.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @learncard/network-brain-service
2
2
 
3
+ ## 4.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`c20460f6fef685272227f506f536b6811f90b8a0`](https://github.com/learningeconomy/LearnCard/commit/c20460f6fef685272227f506f536b6811f90b8a0)]:
8
+ - @learncard/types@5.24.1
9
+ - @learncard/email-templates@1.2.2
10
+ - @learncard/credential-library@2.1.5
11
+ - @learncard/core@9.4.42
12
+ - @learncard/helpers@1.7.2
13
+ - @learncard/did-web-plugin@1.1.42
14
+ - @learncard/didkey-plugin@1.1.42
15
+ - @learncard/didkit-plugin@1.10.8
16
+ - @learncard/didkit-plugin-node@0.3.8
17
+ - @learncard/encryption-plugin@1.1.42
18
+ - @learncard/learn-card-plugin@1.2.42
19
+ - @learncard/vc-plugin@1.6.8
20
+ - @learncard/vc-templates-plugin@1.1.42
21
+ - @learncard/crypto-plugin@1.1.42
22
+ - @learncard/dynamic-loader-plugin@1.1.42
23
+ - @learncard/expiration-plugin@1.2.42
24
+
25
+ ## 4.1.1
26
+
27
+ ### Patch Changes
28
+
29
+ - [#1887](https://github.com/learningeconomy/LearnCard/pull/1887) [`decc065dcc7ecf3a5aacd06850ed23356f528153`](https://github.com/learningeconomy/LearnCard/commit/decc065dcc7ecf3a5aacd06850ed23356f528153) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Stop reporting expected `CONFLICT` tRPC errors (like re-consenting to a contract you've already consented to) to Sentry, the same way `BAD_REQUEST`, `NOT_FOUND` and `FORBIDDEN` are already filtered.
30
+
31
+ - [#1883](https://github.com/learningeconomy/LearnCard/pull/1883) [`9bca968ad4da81ce98674d0e1a3959956d7521ca`](https://github.com/learningeconomy/LearnCard/commit/9bca968ad4da81ce98674d0e1a3959956d7521ca) Thanks [@goblincore](https://github.com/goblincore)! - Sequence app credential activity and delivery graph writes to reduce Neo4j deadlocks, and avoid duplicate listing attribution when the listing is already the issuer.
32
+
33
+ - Updated dependencies [[`4ec92c41442b56341c1205e6ddd6ae784aecc990`](https://github.com/learningeconomy/LearnCard/commit/4ec92c41442b56341c1205e6ddd6ae784aecc990)]:
34
+ - @learncard/didkit-plugin@1.10.7
35
+ - @learncard/credential-library@2.1.4
36
+ - @learncard/didkit-plugin-node@0.3.7
37
+
3
38
  ## 4.1.0
4
39
 
5
40
  ### Minor Changes
Binary file
@@ -0,0 +1,4 @@
1
+ import { logCredentialSent } from './activity.helpers';
2
+ import { sendBoost } from './boost.helpers';
3
+ export declare const sendAppCredentialWithActivity: (activity: Parameters<typeof logCredentialSent>[0], delivery: Omit<Parameters<typeof sendBoost>[0], "activityId">) => Promise<string>;
4
+ //# sourceMappingURL=app-credential-delivery.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-credential-delivery.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/app-credential-delivery.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,6BAA6B,GACtC,UAAU,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,EACjD,UAAU,IAAI,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,KAC9D,OAAO,CAAC,MAAM,CAGhB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=app-credential-delivery.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-credential-delivery.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/app-credential-delivery.helpers.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"boost.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/boost.helpers.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,EAAE,EACF,GAAG,EACH,UAAU,EAEV,sBAAsB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACH,gBAAgB,EAInB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgBxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eA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CAAC;AAOF,eAAO,MAAM,mBAAmB,QAAO,MAQtC,CAAC"}
1
+ {"version":3,"file":"sentry.helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/sentry.helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,KAAG,OAErD,CAAC;AAMF,eAAO,MAAM,eAAe,GAAI,uBAI7B;IACC,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,IAmBH,CAAC;AAMF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAepF,CAAC;AAOF,eAAO,MAAM,mBAAmB,QAAO,MAQtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sentry.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.helpers.test.d.ts","sourceRoot":"","sources":["../../src/helpers/sentry.helpers.test.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/index.js
3
- size: 123610134 bytes
4
- sha256: 9f9501472958d61d73272960c455f6012041191c66b3ea3c78103b06b7a4a78e
3
+ size: 124380683 bytes
4
+ sha256: d038c54ca3700b2c254e309cb0994b4d90cf9b8da122260be8c9dd3f89fae974