@zyacreatives/shared 2.1.48 → 2.1.50

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "workspace_id": "597f-9398-c489-f5fb",
3
+ "workspace_id_at": "2026-01-09T09:19:55.255Z",
4
+ "project_name": "shared",
5
+ "cloud_sync": false
6
+ }
@@ -0,0 +1,69 @@
1
+ # SpecStory Artifacts Directory
2
+
3
+ This directory is automatically created and maintained by the SpecStory extension to preserve your AI chat history.
4
+
5
+ ## What's Here?
6
+
7
+ - `.specstory/history`: Contains auto-saved markdown files of your AI coding sessions
8
+ - Each file represents a separate AI chat session
9
+ - If you enable auto-save, files are automatically updated as you work
10
+ - You can enable/disable the auto-save feature in the SpecStory settings, it is disabled by default
11
+ - `.specstory/.project.json`: Contains the persistent project identity for the current workspace
12
+ - This file is only present if you enable AI rules derivation
13
+ - This is used to provide consistent project identity of your project, even as the workspace is moved or renamed
14
+ - `.specstory/ai_rules_backups`: Contains backups of the `.cursor/rules/derived-cursor-rules.mdc` or the `.github/copilot-instructions.md` file
15
+ - Backups are automatically created each time the `.cursor/rules/derived-cursor-rules.mdc` or the `.github/copilot-instructions.md` file is updated
16
+ - You can enable/disable the AI Rules derivation feature in the SpecStory settings, it is disabled by default
17
+ - `.specstory/.gitignore`: Contains directives to exclude non-essential contents of the `.specstory` directory from version control
18
+ - Add `/history` to exclude the auto-saved chat history from version control
19
+
20
+ ## Valuable Uses
21
+
22
+ - Capture: Keep your context window up-to-date when starting new Chat/Composer sessions via @ references
23
+ - Search: For previous prompts and code snippets
24
+ - Learn: Meta-analyze your patterns and learn from your past experiences
25
+ - Derive: Keep the AI on course with your past decisions by automatically deriving rules from your AI interactions
26
+
27
+ ## Version Control
28
+
29
+ We recommend keeping this directory under version control to maintain a history of your AI interactions. However, if you prefer not to version these files, you can exclude them by adding this to your `.gitignore`:
30
+
31
+ ```
32
+ .specstory/**
33
+ ```
34
+
35
+ We recommend __not__ keeping the `.specstory/ai_rules_backups` directory under version control if you are already using git to version your AI rules, and committing regularly. You can exclude it by adding this to your `.gitignore`:
36
+
37
+ ```
38
+ .specstory/ai_rules_backups
39
+ ```
40
+
41
+ ## Searching Your Codebase
42
+
43
+ When searching your codebase, search results may include your previous AI coding interactions. To focus solely on your actual code files, you can exclude the AI interaction history from search results.
44
+
45
+ To exclude AI interaction history:
46
+
47
+ 1. Open the "Find in Files" search in Cursor or VSCode (Cmd/Ctrl + Shift + F)
48
+ 2. Navigate to the "files to exclude" section
49
+ 3. Add the following pattern:
50
+
51
+ ```
52
+ .specstory/*
53
+ ```
54
+
55
+ This will ensure your searches only return results from your working codebase files.
56
+
57
+ ## Notes
58
+
59
+ - Auto-save only works when Cursor or VSCode flushes sqlite database data to disk. This results in a small delay after the AI response is complete before SpecStory can save the history.
60
+
61
+ ## Settings
62
+
63
+ You can control auto-saving behavior in Cursor or VSCode:
64
+
65
+ 1. Open Cursor/Code → Settings → VS Code Settings (Cmd/Ctrl + ,)
66
+ 2. Search for "SpecStory"
67
+ 3. Find "Auto Save" setting to enable/disable
68
+
69
+ Auto-save occurs when changes are detected in the sqlite database, or every 2 minutes as a safety net.
@@ -0,0 +1,15 @@
1
+ import z from "zod";
2
+ export declare const ActivitySchema: z.ZodObject<{
3
+ activityId: z.ZodCUID2;
4
+ activityType: z.ZodEnum<{
5
+ readonly LIKE: "LIKE";
6
+ readonly UNLIKE: "UNLIKE";
7
+ readonly BOOKMARK: "BOOKMARK";
8
+ readonly UNBOOKMARK: "UNBOOKMARK";
9
+ readonly VIEW: "VIEW";
10
+ }>;
11
+ actorName: z.ZodString;
12
+ actorId: z.ZodString;
13
+ actorUsername: z.ZodString;
14
+ actorImageUrl: z.ZodOptional<z.ZodURL>;
15
+ }, z.core.$strip>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ActivitySchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../constants");
9
+ exports.ActivitySchema = zod_1.default.object({
10
+ activityId: zod_1.default.cuid2().openapi({
11
+ description: "Unique identifier for the bookmarked entity.",
12
+ title: "Entity ID",
13
+ }),
14
+ activityType: zod_1.default.enum(constants_1.ACTIVITY_TYPES),
15
+ actorName: zod_1.default.string(),
16
+ actorId: zod_1.default.string(),
17
+ actorUsername: zod_1.default.string(),
18
+ actorImageUrl: zod_1.default.url().optional(),
19
+ });
@@ -0,0 +1,8 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const FeedTagsSchema: z.ZodObject<{
3
+ userId: z.ZodCUID2;
4
+ tags: z.ZodArray<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export declare const FeedTagsInputSchema: z.ZodObject<{
7
+ tags: z.ZodArray<z.ZodString>;
8
+ }, z.core.$strip>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedTagsInputSchema = exports.FeedTagsSchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ exports.FeedTagsSchema = zod_openapi_1.z.object({
6
+ userId: zod_openapi_1.z.cuid2(),
7
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
8
+ });
9
+ exports.FeedTagsInputSchema = zod_openapi_1.z.object({
10
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
11
+ });
@@ -16,3 +16,6 @@ export * from "./job";
16
16
  export * from "./job-application";
17
17
  export * from "./user-strike";
18
18
  export * from "./notification";
19
+ export * from "./feed";
20
+ export * from "./bookmark";
21
+ export * from "./like";
@@ -32,3 +32,6 @@ __exportStar(require("./job"), exports);
32
32
  __exportStar(require("./job-application"), exports);
33
33
  __exportStar(require("./user-strike"), exports);
34
34
  __exportStar(require("./notification"), exports);
35
+ __exportStar(require("./feed"), exports);
36
+ __exportStar(require("./bookmark"), exports);
37
+ __exportStar(require("./like"), exports);
@@ -264,19 +264,21 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
264
264
  parentId: z.ZodOptional<z.ZodCUID2>;
265
265
  content: z.ZodOptional<z.ZodString>;
266
266
  likes: z.ZodArray<z.ZodObject<{
267
- id: z.ZodCUID2;
268
- createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
269
- userId: z.ZodCUID2;
270
- parentId: z.ZodCUID2;
271
- parentType: z.ZodEnum<{
272
- readonly PROJECT: "PROJECT";
273
- readonly USER: "USER";
274
- readonly JOB: "JOB";
275
- readonly POST: "POST";
276
- readonly COMMENT: "COMMENT";
277
- readonly JOB_APPLICATION: "JOB_APPLICATION";
267
+ activityId: z.ZodCUID2;
268
+ activityType: z.ZodEnum<{
269
+ readonly LIKE: "LIKE";
270
+ readonly UNLIKE: "UNLIKE";
271
+ readonly BOOKMARK: "BOOKMARK";
272
+ readonly UNBOOKMARK: "UNBOOKMARK";
273
+ readonly VIEW: "VIEW";
278
274
  }>;
275
+ actorName: z.ZodString;
276
+ actorId: z.ZodString;
277
+ actorUsername: z.ZodString;
278
+ actorImageUrl: z.ZodOptional<z.ZodURL>;
279
279
  }, z.core.$strip>>;
280
+ totalFetched: z.ZodNumber;
281
+ totalNo: z.ZodNumber;
280
282
  }, z.core.$strip>;
281
283
  export declare const PostWithCommentsEntitySchema: z.ZodObject<{
282
284
  id: z.ZodCUID2;
@@ -308,19 +310,21 @@ export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
308
310
  parentId: z.ZodOptional<z.ZodCUID2>;
309
311
  content: z.ZodOptional<z.ZodString>;
310
312
  bookmarks: z.ZodArray<z.ZodObject<{
311
- id: z.ZodCUID2;
312
- createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
313
- userId: z.ZodCUID2;
314
- parentId: z.ZodCUID2;
315
- parentType: z.ZodEnum<{
316
- readonly PROJECT: "PROJECT";
317
- readonly USER: "USER";
318
- readonly JOB: "JOB";
319
- readonly POST: "POST";
320
- readonly COMMENT: "COMMENT";
321
- readonly JOB_APPLICATION: "JOB_APPLICATION";
313
+ activityId: z.ZodCUID2;
314
+ activityType: z.ZodEnum<{
315
+ readonly LIKE: "LIKE";
316
+ readonly UNLIKE: "UNLIKE";
317
+ readonly BOOKMARK: "BOOKMARK";
318
+ readonly UNBOOKMARK: "UNBOOKMARK";
319
+ readonly VIEW: "VIEW";
322
320
  }>;
321
+ actorName: z.ZodString;
322
+ actorId: z.ZodString;
323
+ actorUsername: z.ZodString;
324
+ actorImageUrl: z.ZodOptional<z.ZodURL>;
323
325
  }, z.core.$strip>>;
326
+ totalFetched: z.ZodNumber;
327
+ totalNo: z.ZodNumber;
324
328
  }, z.core.$strip>;
325
329
  export declare const LinkPreviewInputSchema: z.ZodObject<{
326
330
  url: z.ZodString;
@@ -4,10 +4,9 @@ exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeed
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
7
- const bookmark_1 = require("./bookmark");
8
7
  const comment_1 = require("./comment");
9
- const like_1 = require("./like");
10
8
  const entity_stats_1 = require("./entity-stats");
9
+ const activity_1 = require("./activity");
11
10
  exports.PostEntitySchema = zod_openapi_1.z.object({
12
11
  id: zod_openapi_1.z
13
12
  .cuid2()
@@ -151,7 +150,9 @@ exports.MinimalPostSchema = exports.PostEntitySchema.pick({
151
150
  content: true,
152
151
  });
153
152
  exports.PostWithLikesEntitySchema = exports.MinimalPostSchema.extend({
154
- likes: zod_openapi_1.z.array(like_1.LikeEntitySchema),
153
+ likes: zod_openapi_1.z.array(activity_1.ActivitySchema),
154
+ totalFetched: zod_openapi_1.z.number().int(),
155
+ totalNo: zod_openapi_1.z.number().int(),
155
156
  }).openapi({
156
157
  title: "PostWithPostLikesEntity",
157
158
  });
@@ -161,7 +162,9 @@ exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
161
162
  title: "PostWithPostCommentsEntity",
162
163
  });
163
164
  exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
164
- bookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema),
165
+ bookmarks: zod_openapi_1.z.array(activity_1.ActivitySchema),
166
+ totalFetched: zod_openapi_1.z.number().int(),
167
+ totalNo: zod_openapi_1.z.number().int(),
165
168
  }).openapi({
166
169
  title: "PostWithPostBookmarksEntity",
167
170
  });
@@ -9,7 +9,6 @@ const bookmark_1 = require("./bookmark");
9
9
  const view_1 = require("./view");
10
10
  const like_1 = require("./like");
11
11
  const user_1 = require("./user");
12
- /* ------------------------------ Core Entities ------------------------------ */
13
12
  exports.ProjectEntitySchema = zod_openapi_1.z
14
13
  .object({
15
14
  id: zod_openapi_1.z.string().openapi({
@@ -0,0 +1,4 @@
1
+ import z from "zod";
2
+ import { FeedTagsInputSchema, FeedTagsSchema } from "../schemas/feed";
3
+ export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
4
+ export type FeedTagsOutput = z.infer<typeof FeedTagsSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  export * from "./auth";
2
2
  export * from "./brand";
3
+ export * from "./bookmark";
4
+ export * from "./like";
3
5
  export * from "./common";
4
6
  export * from "./creative";
5
7
  export * from "./discipline";
@@ -10,6 +12,7 @@ export * from "./user";
10
12
  export * from "./comment";
11
13
  export * from "./username";
12
14
  export * from "./entity-stats";
15
+ export * from "./feed";
13
16
  export * from "./post";
14
17
  export * from "./job-application";
15
18
  export * from "./message";
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./auth"), exports);
18
18
  __exportStar(require("./brand"), exports);
19
+ __exportStar(require("./bookmark"), exports);
20
+ __exportStar(require("./like"), exports);
19
21
  __exportStar(require("./common"), exports);
20
22
  __exportStar(require("./creative"), exports);
21
23
  __exportStar(require("./discipline"), exports);
@@ -26,6 +28,7 @@ __exportStar(require("./user"), exports);
26
28
  __exportStar(require("./comment"), exports);
27
29
  __exportStar(require("./username"), exports);
28
30
  __exportStar(require("./entity-stats"), exports);
31
+ __exportStar(require("./feed"), exports);
29
32
  __exportStar(require("./post"), exports);
30
33
  __exportStar(require("./job-application"), exports);
31
34
  __exportStar(require("./message"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.48",
3
+ "version": "2.1.50",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,14 @@
1
+ import z from "zod";
2
+ import { ACTIVITY_TYPES } from "../constants";
3
+
4
+ export const ActivitySchema = z.object({
5
+ activityId: z.cuid2().openapi({
6
+ description: "Unique identifier for the bookmarked entity.",
7
+ title: "Entity ID",
8
+ }),
9
+ activityType: z.enum(ACTIVITY_TYPES),
10
+ actorName: z.string(),
11
+ actorId: z.string(),
12
+ actorUsername: z.string(),
13
+ actorImageUrl: z.url().optional(),
14
+ });
@@ -0,0 +1,11 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ export const FeedTagsSchema = z.object({
4
+ userId: z.cuid2(),
5
+ tags: z.array(z.string()),
6
+ });
7
+
8
+ export const FeedTagsInputSchema = z.object({
9
+ tags: z.array(z.string()),
10
+ });
11
+
@@ -16,3 +16,6 @@ export * from "./job";
16
16
  export * from "./job-application";
17
17
  export * from "./user-strike";
18
18
  export * from "./notification";
19
+ export * from "./feed";
20
+ export * from "./bookmark";
21
+ export * from "./like";
@@ -9,6 +9,7 @@ import { BookmarkEntitySchema } from "./bookmark";
9
9
  import { CommentEntitySchema } from "./comment";
10
10
  import { LikeEntitySchema } from "./like";
11
11
  import { EntityStatsSchema } from "./entity-stats";
12
+ import { ActivitySchema } from "./activity";
12
13
 
13
14
  export const PostEntitySchema = z.object({
14
15
  id: z
@@ -170,7 +171,9 @@ export const MinimalPostSchema = PostEntitySchema.pick({
170
171
  });
171
172
 
172
173
  export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
173
- likes: z.array(LikeEntitySchema),
174
+ likes: z.array(ActivitySchema),
175
+ totalFetched: z.number().int(),
176
+ totalNo: z.number().int(),
174
177
  }).openapi({
175
178
  title: "PostWithPostLikesEntity",
176
179
  });
@@ -182,7 +185,9 @@ export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
182
185
  });
183
186
 
184
187
  export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
185
- bookmarks: z.array(BookmarkEntitySchema),
188
+ bookmarks: z.array(ActivitySchema),
189
+ totalFetched: z.number().int(),
190
+ totalNo: z.number().int(),
186
191
  }).openapi({
187
192
  title: "PostWithPostBookmarksEntity",
188
193
  });
@@ -7,7 +7,6 @@ import { ViewEntitySchema } from "./view";
7
7
  import { LikeEntitySchema } from "./like";
8
8
  import { MinimalUserSchema } from "./user";
9
9
 
10
- /* ------------------------------ Core Entities ------------------------------ */
11
10
  export const ProjectEntitySchema = z
12
11
  .object({
13
12
  id: z.string().openapi({
@@ -0,0 +1,5 @@
1
+ import z from "zod";
2
+ import { FeedTagsInputSchema, FeedTagsSchema } from "../schemas/feed";
3
+
4
+ export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
5
+ export type FeedTagsOutput = z.infer<typeof FeedTagsSchema>;
@@ -1,5 +1,7 @@
1
1
  export * from "./auth";
2
2
  export * from "./brand";
3
+ export * from "./bookmark";
4
+ export * from "./like";
3
5
  export * from "./common";
4
6
  export * from "./creative";
5
7
  export * from "./discipline";
@@ -10,6 +12,7 @@ export * from "./user";
10
12
  export * from "./comment";
11
13
  export * from "./username";
12
14
  export * from "./entity-stats";
15
+ export * from "./feed";
13
16
  export * from "./post";
14
17
  export * from "./job-application";
15
18
  export * from "./message";