@evcraddock/slug-api 1.1.0 → 2.0.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
@@ -20,11 +20,17 @@ Generated sites should keep local API route modules that compose these helpers w
20
20
 
21
21
  Generated sites import this document and pass its identity/version explicitly to `createApiMetaResponse` via `contract`. The `/api/v1/meta` response exposes `api.contract`; the document repeats it in `x-slugkit-contract` and uses the contract version in `info.version`. The legacy `api.version` remains the API routing generation marker and is not evidence of a specific contract.
22
22
 
23
+ ## Incoming retention contract 3.0.0
24
+
25
+ **Breaking:** package **2.0.0** carries contract **3.0.0**. Update with `npm install --save-exact @evcraddock/slug-api@2.0.0` as part of reviewed site adoption, not as a standalone deployment. Explicit incoming-copy removal purges bodies, copy metadata and delivery aliases rather than keeping permanent tombstones. GET/DELETE response shapes and route prefixes are unchanged, but removed remote activities/objects may return with a new copy ID and higher receipt position. Buffered duplicates remain suppressed; no historical duplicate/equivocation binding survives removal. Old-ID retries never remove a replacement copy. Clients own long-term recognition using scoped post kind/objectId and boost kind/activityId, preserving actor/sharing-follow boundaries and distinct boosts of the same original.
26
+
27
+ The package supplies the matching contract/metadata, not site-owned cleanup implementation. Adopt the incoming service and regressions together; no new schema migration is needed on the current template schema. **Do not deploy server retention or run legacy cleanup before Rott task-5a4a4e82 verifies redelivery recognition and repeat cleanup.** See the [operator and client coordination guide](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/incoming-activity-retention.md). Existing-metadata cleanup is explicitly scoped/bounded/operator-only, not a startup migration. Production inspection/deletion/deployment remain separately authorized. Package publication does not establish site adoption or client readiness; the rollout gate still applies.
28
+
23
29
  ## Contact deletion contract 2.3.0
24
30
 
25
- Package **1.1.0** carries compatible contract **2.3.0**, adding safe deletion of contacts whose only follow references are inactive. This is a compatible relaxation of deletion restrictions, classified as additive: existing requests, response shapes, required non-null `Following.accountId`, authentication and route prefixes are unchanged. Pending/accepted follows and unrelated references still return `409`. Site-owned deletion atomically detaches inactive history and removes the contact and its owned accounts without purging incoming bodies, snapshots, aliases or tombstones. Detached history is hidden from following lists and activity routes return `404` until explicit refollow reattaches the same identity to a real account; cursors and duplicate suppression survive. Direct account-delete/URL-change guards are unchanged.
31
+ The unreleased source contract adds safe deletion of contacts whose only follow references are inactive. This is a compatible relaxation of deletion restrictions, classified as additive: existing requests, response shapes, required non-null `Following.accountId`, authentication and route prefixes are unchanged. Pending/accepted follows and unrelated references still return `409`. Site-owned deletion atomically detaches inactive history and removes the contact and its owned accounts without purging incoming bodies, snapshots, aliases or tombstones. Detached history is hidden from following lists and activity routes return `404` until explicit refollow reattaches the same identity to a real account; cursors and duplicate suppression survive. Direct account-delete/URL-change guards are unchanged.
26
32
 
27
- Adopt migration 031 and the site-owned contacts/following changes together; updating this package alone does not implement the behavior. See [adoption guidance](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/package-updates.md#contact-deletion-after-unfollow-contract-230). Update with `npm install --save-exact @evcraddock/slug-api@1.1.0` and adopt the site-owned implementation. Package publication does not deploy websites; migration execution, site deployment and production contact cleanup remain separately authorized.
33
+ Adopt migration 031 and the site-owned contacts/following changes together; updating this package alone does not implement the behavior. See [adoption guidance](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/package-updates.md#contact-deletion-after-unfollow-contract-230). No npm versions/pins/lockfile are changed by implementation; release, migration execution, site deployment and production contact cleanup remain separate authorizations.
28
34
 
29
35
  ## Incoming activity contract 2.2.0
30
36
 
@@ -1,2 +1,2 @@
1
1
  export declare const SLUGKIT_CONTRACT_ID = "slugkit-management-api";
2
- export declare const SLUGKIT_CONTRACT_VERSION = "2.3.0";
2
+ export declare const SLUGKIT_CONTRACT_VERSION = "3.0.0";
package/dist/contract.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const SLUGKIT_CONTRACT_ID = "slugkit-management-api";
2
- export const SLUGKIT_CONTRACT_VERSION = "2.3.0";
2
+ export const SLUGKIT_CONTRACT_VERSION = "3.0.0";
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "id": "slugkit-management-api",
3
- "version": "2.3.0",
3
+ "version": "3.0.0",
4
4
  "packageName": "@evcraddock/slug-api",
5
- "packageVersion": "1.1.0",
5
+ "packageVersion": "2.0.0",
6
6
  "artifact": "openapi.json",
7
- "sha256": "4c46d091f6e92e6f58af92d066e1811a69b382f6e9f3b560bdd64559e84973ac",
8
- "changeType": "additive"
7
+ "sha256": "33a5fa76a81b8cebc98562bd3accd9024b1e779f961c025aaf678f2d6ca8b35c",
8
+ "changeType": "breaking"
9
9
  }
package/dist/openapi.d.ts CHANGED
@@ -2,11 +2,11 @@ export declare const openApiDocument: {
2
2
  readonly openapi: "3.1.0";
3
3
  readonly "x-slugkit-contract": {
4
4
  readonly id: "slugkit-management-api";
5
- readonly version: "2.3.0";
5
+ readonly version: "3.0.0";
6
6
  };
7
7
  readonly info: {
8
8
  readonly title: "Slugkit API";
9
- readonly version: "2.3.0";
9
+ readonly version: "3.0.0";
10
10
  };
11
11
  readonly servers: readonly [{
12
12
  readonly url: "/api/v1";
@@ -1601,7 +1601,7 @@ export declare const openApiDocument: {
1601
1601
  readonly get: {
1602
1602
  readonly operationId: "following.activity.list";
1603
1603
  readonly summary: "Download buffered posts and boosts from one followed account";
1604
- readonly description: "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive deletion and remain usable when hasMore is false. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.";
1604
+ readonly description: "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive full copy deletion and remain usable when hasMore is false, even after the buffer empties. Redelivery after removal gets a new copy ID and a higher receipt position; client read history must use remote identities instead of copy IDs/cursors. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.";
1605
1605
  readonly security: readonly [{
1606
1606
  readonly bearerAuth: readonly [];
1607
1607
  }];
@@ -1690,7 +1690,7 @@ export declare const openApiDocument: {
1690
1690
  readonly delete: {
1691
1691
  readonly operationId: "following.activity.remove";
1692
1692
  readonly summary: "Remove selected buffered website copies";
1693
- readonly description: "Atomic body removal in the selected followed account and configured actor only. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical requests after uncertain responses; removed may be zero. No read or persistence acknowledgment. Bodies are removed; minimal deduplication identities remain indefinitely.";
1693
+ readonly description: "Contract 3.0.0: atomically removes selected website copies, bodies and all delivery/deduplication metadata in the followed-account/configured-actor scope. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical copy IDs after uncertain responses; removed may be zero and old IDs cannot remove a newly redelivered copy. No read or persistence acknowledgment. After removal the same remote activity/object may return with a new copy ID and a higher receipt position. Clients own long-term read/redelivery recognition; deduplication lasts only while buffered.";
1694
1694
  readonly security: readonly [{
1695
1695
  readonly bearerAuth: readonly [];
1696
1696
  }];
@@ -1720,7 +1720,7 @@ export declare const openApiDocument: {
1720
1720
  };
1721
1721
  readonly responses: {
1722
1722
  readonly "200": {
1723
- readonly description: "Number of copies actually removed by this request; zero is a successful idempotent retry, not an error.";
1723
+ readonly description: "Number of copy metadata records actually removed, including selected legacy body-less records; zero is a successful idempotent retry, not an error.";
1724
1724
  readonly content: {
1725
1725
  readonly "application/json": {
1726
1726
  readonly schema: {
@@ -2791,7 +2791,7 @@ export declare const openApiDocument: {
2791
2791
  };
2792
2792
  readonly version: {
2793
2793
  readonly type: "string";
2794
- readonly const: "2.3.0";
2794
+ readonly const: "3.0.0";
2795
2795
  };
2796
2796
  };
2797
2797
  };
@@ -3498,7 +3498,7 @@ export declare const openApiDocument: {
3498
3498
  readonly id: {
3499
3499
  readonly type: "string";
3500
3500
  readonly format: "uuid";
3501
- readonly description: "Opaque buffered-copy identity, not an activity or original-object ID. Treat as opaque and use only for this followed account.";
3501
+ readonly description: "Opaque buffered-copy identity, not a durable read-history key or remote activity/object ID. Use only for this actor/following scope. Redelivery after removal receives a new ID; recognize consumed posts by scoped kind/objectId.";
3502
3502
  };
3503
3503
  readonly kind: {
3504
3504
  readonly type: "string";
@@ -3604,13 +3604,13 @@ export declare const openApiDocument: {
3604
3604
  };
3605
3605
  readonly IncomingBoost: {
3606
3606
  readonly type: "object";
3607
- readonly description: "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original; retries of an observed ID never resurrect a removed copy. Existing post payloads are unchanged.";
3607
+ readonly description: "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original. Repeats are suppressed only while buffered; after explicit removal the same Announce may return as a new copy. Existing post payloads are unchanged.";
3608
3608
  readonly required: readonly ["id", "kind", "activityId", "objectId", "objectType", "url", "title", "contentHtml", "contentText", "publishedAt", "sharedAt", "receivedAt", "sharingAccount", "sharingContact", "authorAccount", "authorContact"];
3609
3609
  readonly properties: {
3610
3610
  readonly id: {
3611
3611
  readonly type: "string";
3612
3612
  readonly format: "uuid";
3613
- readonly description: "Opaque buffered-copy identity; not the Announce or original-object ID.";
3613
+ readonly description: "Opaque buffered-copy identity; not the Announce, original-object ID or a durable read key. Redelivery after removal receives a new ID; recognize consumed boosts by scoped kind/activityId, not objectId.";
3614
3614
  };
3615
3615
  readonly kind: {
3616
3616
  readonly type: "string";
package/dist/openapi.js CHANGED
@@ -829,7 +829,7 @@ export const openApiDocument = {
829
829
  get: {
830
830
  operationId: "following.activity.list",
831
831
  summary: "Download buffered posts and boosts from one followed account",
832
- description: "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive deletion and remain usable when hasMore is false. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.",
832
+ description: "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive full copy deletion and remain usable when hasMore is false, even after the buffer empties. Redelivery after removal gets a new copy ID and a higher receipt position; client read history must use remote identities instead of copy IDs/cursors. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.",
833
833
  security: [{ bearerAuth: [] }],
834
834
  parameters: [
835
835
  { name: "id", in: "path", required: true, schema: { type: "integer", minimum: 1 } },
@@ -863,7 +863,7 @@ export const openApiDocument = {
863
863
  delete: {
864
864
  operationId: "following.activity.remove",
865
865
  summary: "Remove selected buffered website copies",
866
- description: "Atomic body removal in the selected followed account and configured actor only. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical requests after uncertain responses; removed may be zero. No read or persistence acknowledgment. Bodies are removed; minimal deduplication identities remain indefinitely.",
866
+ description: "Contract 3.0.0: atomically removes selected website copies, bodies and all delivery/deduplication metadata in the followed-account/configured-actor scope. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical copy IDs after uncertain responses; removed may be zero and old IDs cannot remove a newly redelivered copy. No read or persistence acknowledgment. After removal the same remote activity/object may return with a new copy ID and a higher receipt position. Clients own long-term read/redelivery recognition; deduplication lasts only while buffered.",
867
867
  security: [{ bearerAuth: [] }],
868
868
  parameters: [
869
869
  { name: "id", in: "path", required: true, schema: { type: "integer", minimum: 1 } },
@@ -881,7 +881,7 @@ export const openApiDocument = {
881
881
  },
882
882
  responses: {
883
883
  "200": {
884
- description: "Number of copies actually removed by this request; zero is a successful idempotent retry, not an error.",
884
+ description: "Number of copy metadata records actually removed, including selected legacy body-less records; zero is a successful idempotent retry, not an error.",
885
885
  content: {
886
886
  "application/json": {
887
887
  schema: { $ref: "#/components/schemas/RemoveIncomingActivityResponse" },
@@ -1726,7 +1726,7 @@ export const openApiDocument = {
1726
1726
  id: {
1727
1727
  type: "string",
1728
1728
  format: "uuid",
1729
- description: "Opaque buffered-copy identity, not an activity or original-object ID. Treat as opaque and use only for this followed account.",
1729
+ description: "Opaque buffered-copy identity, not a durable read-history key or remote activity/object ID. Use only for this actor/following scope. Redelivery after removal receives a new ID; recognize consumed posts by scoped kind/objectId.",
1730
1730
  },
1731
1731
  kind: { type: "string", const: "post" },
1732
1732
  activityId: { type: "string", format: "uri" },
@@ -1792,7 +1792,7 @@ export const openApiDocument = {
1792
1792
  },
1793
1793
  IncomingBoost: {
1794
1794
  type: "object",
1795
- description: "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original; retries of an observed ID never resurrect a removed copy. Existing post payloads are unchanged.",
1795
+ description: "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original. Repeats are suppressed only while buffered; after explicit removal the same Announce may return as a new copy. Existing post payloads are unchanged.",
1796
1796
  required: [
1797
1797
  "id",
1798
1798
  "kind",
@@ -1815,7 +1815,7 @@ export const openApiDocument = {
1815
1815
  id: {
1816
1816
  type: "string",
1817
1817
  format: "uuid",
1818
- description: "Opaque buffered-copy identity; not the Announce or original-object ID.",
1818
+ description: "Opaque buffered-copy identity; not the Announce, original-object ID or a durable read key. Redelivery after removal receives a new ID; recognize consumed boosts by scoped kind/activityId, not objectId.",
1819
1819
  },
1820
1820
  kind: { type: "string", const: "boost" },
1821
1821
  activityId: {
package/dist/openapi.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "openapi": "3.1.0",
3
3
  "x-slugkit-contract": {
4
4
  "id": "slugkit-management-api",
5
- "version": "2.3.0"
5
+ "version": "3.0.0"
6
6
  },
7
7
  "info": {
8
8
  "title": "Slugkit API",
9
- "version": "2.3.0"
9
+ "version": "3.0.0"
10
10
  },
11
11
  "servers": [
12
12
  {
@@ -1715,7 +1715,7 @@
1715
1715
  "get": {
1716
1716
  "operationId": "following.activity.list",
1717
1717
  "summary": "Download buffered posts and boosts from one followed account",
1718
- "description": "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive deletion and remain usable when hasMore is false. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.",
1718
+ "description": "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive full copy deletion and remain usable when hasMore is false, even after the buffer empties. Redelivery after removal gets a new copy ID and a higher receipt position; client read history must use remote identities instead of copy IDs/cursors. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.",
1719
1719
  "security": [
1720
1720
  {
1721
1721
  "bearerAuth": []
@@ -1810,7 +1810,7 @@
1810
1810
  "delete": {
1811
1811
  "operationId": "following.activity.remove",
1812
1812
  "summary": "Remove selected buffered website copies",
1813
- "description": "Atomic body removal in the selected followed account and configured actor only. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical requests after uncertain responses; removed may be zero. No read or persistence acknowledgment. Bodies are removed; minimal deduplication identities remain indefinitely.",
1813
+ "description": "Contract 3.0.0: atomically removes selected website copies, bodies and all delivery/deduplication metadata in the followed-account/configured-actor scope. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical copy IDs after uncertain responses; removed may be zero and old IDs cannot remove a newly redelivered copy. No read or persistence acknowledgment. After removal the same remote activity/object may return with a new copy ID and a higher receipt position. Clients own long-term read/redelivery recognition; deduplication lasts only while buffered.",
1814
1814
  "security": [
1815
1815
  {
1816
1816
  "bearerAuth": []
@@ -1846,7 +1846,7 @@
1846
1846
  },
1847
1847
  "responses": {
1848
1848
  "200": {
1849
- "description": "Number of copies actually removed by this request; zero is a successful idempotent retry, not an error.",
1849
+ "description": "Number of copy metadata records actually removed, including selected legacy body-less records; zero is a successful idempotent retry, not an error.",
1850
1850
  "content": {
1851
1851
  "application/json": {
1852
1852
  "schema": {
@@ -3012,7 +3012,7 @@
3012
3012
  },
3013
3013
  "version": {
3014
3014
  "type": "string",
3015
- "const": "2.3.0"
3015
+ "const": "3.0.0"
3016
3016
  }
3017
3017
  }
3018
3018
  }
@@ -3979,7 +3979,7 @@
3979
3979
  "id": {
3980
3980
  "type": "string",
3981
3981
  "format": "uuid",
3982
- "description": "Opaque buffered-copy identity, not an activity or original-object ID. Treat as opaque and use only for this followed account."
3982
+ "description": "Opaque buffered-copy identity, not a durable read-history key or remote activity/object ID. Use only for this actor/following scope. Redelivery after removal receives a new ID; recognize consumed posts by scoped kind/objectId."
3983
3983
  },
3984
3984
  "kind": {
3985
3985
  "type": "string",
@@ -4112,7 +4112,7 @@
4112
4112
  },
4113
4113
  "IncomingBoost": {
4114
4114
  "type": "object",
4115
- "description": "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original; retries of an observed ID never resurrect a removed copy. Existing post payloads are unchanged.",
4115
+ "description": "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original. Repeats are suppressed only while buffered; after explicit removal the same Announce may return as a new copy. Existing post payloads are unchanged.",
4116
4116
  "required": [
4117
4117
  "id",
4118
4118
  "kind",
@@ -4135,7 +4135,7 @@
4135
4135
  "id": {
4136
4136
  "type": "string",
4137
4137
  "format": "uuid",
4138
- "description": "Opaque buffered-copy identity; not the Announce or original-object ID."
4138
+ "description": "Opaque buffered-copy identity; not the Announce, original-object ID or a durable read key. Redelivery after removal receives a new ID; recognize consumed boosts by scoped kind/activityId, not objectId."
4139
4139
  },
4140
4140
  "kind": {
4141
4141
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evcraddock/slug-api",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Reusable Hono helpers for Slugkit-compatible management APIs.",
5
5
  "license": "MIT",
6
6
  "private": false,