@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.
- package/.specstory/.project.json +6 -0
- package/.specstory/.what-is-this.md +69 -0
- package/dist/schemas/activity.d.ts +15 -0
- package/dist/schemas/activity.js +19 -0
- package/dist/schemas/feed.d.ts +8 -0
- package/dist/schemas/feed.js +11 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/post.d.ts +26 -22
- package/dist/schemas/post.js +7 -4
- package/dist/schemas/project.js +0 -1
- package/dist/types/feed.d.ts +4 -0
- package/dist/types/feed.js +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/package.json +1 -1
- package/src/schemas/activity.ts +14 -0
- package/src/schemas/feed.ts +11 -0
- package/src/schemas/index.ts +3 -0
- package/src/schemas/post.ts +7 -2
- package/src/schemas/project.ts +0 -1
- package/src/types/feed.ts +5 -0
- package/src/types/index.ts +3 -0
|
@@ -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
|
+
});
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -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);
|
package/dist/schemas/post.d.ts
CHANGED
|
@@ -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
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
readonly
|
|
273
|
-
readonly
|
|
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
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
readonly
|
|
317
|
-
readonly
|
|
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;
|
package/dist/schemas/post.js
CHANGED
|
@@ -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(
|
|
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(
|
|
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
|
});
|
package/dist/schemas/project.js
CHANGED
|
@@ -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({
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/types/index.js
CHANGED
|
@@ -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
|
@@ -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
|
+
});
|
package/src/schemas/index.ts
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -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(
|
|
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(
|
|
188
|
+
bookmarks: z.array(ActivitySchema),
|
|
189
|
+
totalFetched: z.number().int(),
|
|
190
|
+
totalNo: z.number().int(),
|
|
186
191
|
}).openapi({
|
|
187
192
|
title: "PostWithPostBookmarksEntity",
|
|
188
193
|
});
|
package/src/schemas/project.ts
CHANGED
|
@@ -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({
|
package/src/types/index.ts
CHANGED
|
@@ -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";
|