@happyvertical/smrt-social 0.60.17 → 0.61.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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-social",
5
- "packageVersion": "0.60.17",
5
+ "packageVersion": "0.61.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-social:OAuthStateCollection": {
8
8
  "name": "oauthstatecollection",
@@ -1989,7 +1989,7 @@
1989
1989
  "videoContentId": {
1990
1990
  "type": "crossPackageRef",
1991
1991
  "required": false,
1992
- "related": "@happyvertical/smrt-video:VideoContent"
1992
+ "related": "@happyvertical/smrt-video:VideoShot"
1993
1993
  },
1994
1994
  "contentId": {
1995
1995
  "type": "crossPackageRef",
@@ -2586,7 +2586,7 @@
2586
2586
  "demo": {
2587
2587
  "mode": "server",
2588
2588
  "reasons": [
2589
- "Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-chat, @happyvertical/smrt-content, @happyvertical/smrt-images, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, @happyvertical/smrt-video, @happyvertical/smrt-voice, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627, #3628)."
2589
+ "Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-chat, @happyvertical/smrt-content, @happyvertical/smrt-images, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627, #3628)."
2590
2590
  ]
2591
2591
  }
2592
2592
  }
@@ -2620,9 +2620,7 @@
2620
2620
  "@happyvertical/smrt-reports",
2621
2621
  "@happyvertical/smrt-secrets",
2622
2622
  "@happyvertical/smrt-tenancy",
2623
- "@happyvertical/smrt-users",
2624
- "@happyvertical/smrt-video",
2625
- "@happyvertical/smrt-voice"
2623
+ "@happyvertical/smrt-users"
2626
2624
  ]
2627
2625
  },
2628
2626
  "stampsConstructors": true
@@ -3,13 +3,13 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-social",
6
- "packageVersion": "0.60.17",
6
+ "packageVersion": "0.61.0",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "8866d28f2c652c1c63c003c98dd136343f39180bd417568f34434dbdc922dd50",
11
- "packageJson": "8bc3fb8ab012ca06ebccecfacac4d4b1e15574e63b35ff61ed1dab455eee738e",
12
- "agents": "dc8a1a9b42e272ff4c9c313dc9d3b6ed0db58d3dece18a2ac23d7f0610645f58"
10
+ "manifest": "fc1e5becf3d9213fd0292b1c370be49981f29b329e2facbde64ddc8b466d2d03",
11
+ "packageJson": "cb9dc90c5a19f314b47be6a60f0edae96fa5bbbc44afda1a3390c77c8ecd0b76",
12
+ "agents": "132a28e7aa312b24d2a245c118ded47d9c48df7ba1bf77d2d5793b83c5fda995"
13
13
  },
14
14
  "exports": [
15
15
  ".",
@@ -1342,7 +1342,7 @@
1342
1342
  "name": "videoContentId",
1343
1343
  "type": "crossPackageRef",
1344
1344
  "required": false,
1345
- "related": "@happyvertical/smrt-video:VideoContent",
1345
+ "related": "@happyvertical/smrt-video:VideoShot",
1346
1346
  "columnType": "UUID"
1347
1347
  },
1348
1348
  {
@@ -1469,7 +1469,7 @@
1469
1469
  "name": "videoContentId",
1470
1470
  "type": "crossPackageRef",
1471
1471
  "required": false,
1472
- "related": "@happyvertical/smrt-video:VideoContent",
1472
+ "related": "@happyvertical/smrt-video:VideoShot",
1473
1473
  "columnType": "UUID"
1474
1474
  },
1475
1475
  {
@@ -2035,7 +2035,7 @@
2035
2035
  "polymorphicAssociations": 0,
2036
2036
  "uuidColumns": 28
2037
2037
  },
2038
- "agentDoc": "# @happyvertical/smrt-social\n\nSocial media account management with OAuth and post scheduling. Supports YouTube, Threads, X (Twitter), Bluesky.\n\n## Models\n\n- **SocialAccount** (STI): `platform`, `accessToken`/`refreshToken`, `tokenExpiresAt`, `status` (connected/expired/error), `linkBehavior` (description/reply/none). `isTokenExpired` checks with 5-min buffer. `isReady` gate checks active + connected + token present + not expired.\n- **SocialPost**: `scheduledAt`, `publishedAt`, `status` (draft/scheduled/publishing/published/failed), `analytics` JSON (views/likes/comments/shares/clicks). `createdByUserId` (nullable `@crossPackageRef` to `smrt-users:User`, uuid on PostgreSQL) records the poster; pass it to `createDraft()` so a failed publish can be reported to that person. Agent/schedule posts leave it null; `recordPublishSuccess`/`Failure` never change it. Adding the column is additive: consumers run `db:migrate`.\n- **OAuthState** (STI): CSRF token + PKCE `codeVerifier` with 10-min TTL. `createdByUserId` (nullable `@crossPackageRef` to `smrt-users:User`) binds the flow to its initiator and `returnTo` stores an opaque host path; a host with one fixed callback for every tenant must reject a different user and validate `returnTo` as same-origin. `OAuthStateCollection.consume(state)` is the single-use arbiter (revision-guarded delete; `false` when another caller already consumed it). Both columns are additive: consumers run `db:migrate`.\n\n- **Recipe `social.posts`** (`src/recipes.ts`, help in `src/posts.recipe.md`): Posts and Connected accounts over `SocialPost` and `SocialAccount`, with `SocialPostAnalyticsSnapshot` as a child record of the post (no menu entry); `OAuthState` stays out. Token and secret-name fields on `SocialAccount` are hidden in its options and never named in the help, and the help never promises auto-publishing or live metrics (see Gotchas).\n\n## Gotchas\n\n- **Tokens not encrypted**: OAuth tokens stored as plaintext — TODO for smrt-secrets integration\n- **No auto-publishing**: `scheduledAt` is metadata only — app must implement job runner to trigger publishing\n- **Analytics manual**: `analytics` field must be updated by platform sync, not auto-populated\n- **Platform enum hardcoded**: youtube/threads/x/bluesky — extending requires code changes\n- **OAuthState TTL**: 10 minutes, app must clean up expired states\n- **Optional tenancy** on all models\n- **Relationship targets**: `SocialPost.socialAccountId` and\n `SocialPostAnalyticsSnapshot.socialPostId` are same-package `@foreignKey`\n columns; `SocialPost.videoContentId` is a `@crossPackageRef` to\n `@happyvertical/smrt-video:VideoContent` (no value import back into this\n package). They previously used `@foreignKey(() => X)`, whose target resolved\n to `''`, so none of them carried a relationship edge (#2379).\n",
2038
+ "agentDoc": "# @happyvertical/smrt-social\n\nSocial media account management with OAuth and post scheduling. Supports YouTube, Threads, X (Twitter), Bluesky.\n\n## Models\n\n- **SocialAccount** (STI): `platform`, `accessToken`/`refreshToken`, `tokenExpiresAt`, `status` (connected/expired/error), `linkBehavior` (description/reply/none). `isTokenExpired` checks with 5-min buffer. `isReady` gate checks active + connected + token present + not expired.\n- **SocialPost**: `scheduledAt`, `publishedAt`, `status` (draft/scheduled/publishing/published/failed), `analytics` JSON (views/likes/comments/shares/clicks). `createdByUserId` (nullable `@crossPackageRef` to `smrt-users:User`, uuid on PostgreSQL) records the poster; pass it to `createDraft()` so a failed publish can be reported to that person. Agent/schedule posts leave it null; `recordPublishSuccess`/`Failure` never change it. Adding the column is additive: consumers run `db:migrate`.\n- **OAuthState** (STI): CSRF token + PKCE `codeVerifier` with 10-min TTL. `createdByUserId` (nullable `@crossPackageRef` to `smrt-users:User`) binds the flow to its initiator and `returnTo` stores an opaque host path; a host with one fixed callback for every tenant must reject a different user and validate `returnTo` as same-origin. `OAuthStateCollection.consume(state)` is the single-use arbiter (revision-guarded delete; `false` when another caller already consumed it). Both columns are additive: consumers run `db:migrate`.\n\n- **Recipe `social.posts`** (`src/recipes.ts`, help in `src/posts.recipe.md`): Posts and Connected accounts over `SocialPost` and `SocialAccount`, with `SocialPostAnalyticsSnapshot` as a child record of the post (no menu entry); `OAuthState` stays out. Token and secret-name fields on `SocialAccount` are hidden in its options and never named in the help, and the help never promises auto-publishing or live metrics (see Gotchas).\n\n## Gotchas\n\n- **Tokens not encrypted**: OAuth tokens stored as plaintext — TODO for smrt-secrets integration\n- **No auto-publishing**: `scheduledAt` is metadata only — app must implement job runner to trigger publishing\n- **Analytics manual**: `analytics` field must be updated by platform sync, not auto-populated\n- **Platform enum hardcoded**: youtube/threads/x/bluesky — extending requires code changes\n- **OAuthState TTL**: 10 minutes, app must clean up expired states\n- **Optional tenancy** on all models\n- **Relationship targets**: `SocialPost.socialAccountId` and\n `SocialPostAnalyticsSnapshot.socialPostId` are same-package `@foreignKey`\n columns; `SocialPost.videoContentId` is a `@crossPackageRef` to\n `@happyvertical/smrt-video:VideoShot` (no value import back into this\n package). They previously used `@foreignKey(() => X)`, whose target resolved\n to `''`, so none of them carried a relationship edge (#2379).\n",
2039
2039
  "recipes": [
2040
2040
  {
2041
2041
  "id": "social.posts",
@@ -2287,7 +2287,7 @@
2287
2287
  "demo": {
2288
2288
  "mode": "server",
2289
2289
  "reasons": [
2290
- "Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-chat, @happyvertical/smrt-content, @happyvertical/smrt-images, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, @happyvertical/smrt-video, @happyvertical/smrt-voice, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627, #3628)."
2290
+ "Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-agents, @happyvertical/smrt-chat, @happyvertical/smrt-content, @happyvertical/smrt-images, @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-reports, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3625, #3626, #3627, #3628)."
2291
2291
  ]
2292
2292
  }
2293
2293
  }
@@ -2314,9 +2314,7 @@
2314
2314
  "@happyvertical/smrt-reports",
2315
2315
  "@happyvertical/smrt-secrets",
2316
2316
  "@happyvertical/smrt-tenancy",
2317
- "@happyvertical/smrt-users",
2318
- "@happyvertical/smrt-video",
2319
- "@happyvertical/smrt-voice"
2317
+ "@happyvertical/smrt-users"
2320
2318
  ]
2321
2319
  }
2322
2320
  }
@@ -5,10 +5,10 @@ description: "Social media account management for multi-platform publishing in t
5
5
  status: "stable"
6
6
  generated:
7
7
  by: "smrt/scripts/generate-knowledge-okf.ts"
8
- at: "2026-11-05T15:48:19Z"
8
+ at: "2026-11-11T06:56:27Z"
9
9
  audience: "internal"
10
10
  evidence_level: "source-inspected"
11
- source_revision: "sha256:f81d87d03150b588572c2850f888ad4a5e354e9c64f5e6fcd0d078b4154ea1f8"
11
+ source_revision: "sha256:4b0ca636bd5e842573f54ed89143b1ae0a200da0c2980ffbf106d6fba1b3e658"
12
12
  sources:
13
13
  - id: "manifest"
14
14
  resource: "https://github.com/happyvertical/smrt/blob/main/packages/social/package.json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-social",
3
- "version": "0.60.17",
3
+ "version": "0.61.0",
4
4
  "type": "module",
5
5
  "smrtRawPrimitives": "strict",
6
6
  "description": "Social media account management for multi-platform publishing in the SMRT ecosystem",
@@ -39,19 +39,19 @@
39
39
  "AGENTS.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@happyvertical/smrt-config": "0.60.17",
43
- "@happyvertical/smrt-content": "0.60.17",
44
- "@happyvertical/smrt-core": "0.60.17",
45
- "@happyvertical/smrt-secrets": "0.60.17",
46
- "@happyvertical/smrt-tenancy": "0.60.17",
47
- "@happyvertical/smrt-ui": "0.60.17",
48
- "@happyvertical/smrt-video": "0.60.17",
49
- "@happyvertical/utils": "^0.112.2"
42
+ "@happyvertical/smrt-config": "0.61.0",
43
+ "@happyvertical/smrt-content": "0.61.0",
44
+ "@happyvertical/smrt-core": "0.61.0",
45
+ "@happyvertical/smrt-secrets": "0.61.0",
46
+ "@happyvertical/smrt-tenancy": "0.61.0",
47
+ "@happyvertical/smrt-ui": "0.61.0",
48
+ "@happyvertical/smrt-video": "0.61.0",
49
+ "@happyvertical/utils": "^0.112.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@happyvertical/logger": "^0.112.2",
53
- "@happyvertical/smrt-vitest": "0.60.17",
54
- "@happyvertical/sql": "^0.112.2",
52
+ "@happyvertical/logger": "^0.112.3",
53
+ "@happyvertical/smrt-vitest": "0.61.0",
54
+ "@happyvertical/sql": "^0.112.3",
55
55
  "@sveltejs/package": "^2.5.8",
56
56
  "@types/node": "24.13.6",
57
57
  "svelte": "^5.57.1",