@anthropologies/claudestory 0.1.11 → 0.1.13

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/dist/index.d.ts CHANGED
@@ -340,6 +340,7 @@ declare const ConfigSchema: z.ZodObject<{
340
340
  roadmap: z.ZodBoolean;
341
341
  reviews: z.ZodBoolean;
342
342
  }, z.ZodTypeAny, "passthrough">>;
343
+ recipe: z.ZodOptional<z.ZodString>;
343
344
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
344
345
  version: z.ZodNumber;
345
346
  schemaVersion: z.ZodOptional<z.ZodNumber>;
@@ -365,6 +366,7 @@ declare const ConfigSchema: z.ZodObject<{
365
366
  roadmap: z.ZodBoolean;
366
367
  reviews: z.ZodBoolean;
367
368
  }, z.ZodTypeAny, "passthrough">>;
369
+ recipe: z.ZodOptional<z.ZodString>;
368
370
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
369
371
  version: z.ZodNumber;
370
372
  schemaVersion: z.ZodOptional<z.ZodNumber>;
@@ -390,6 +392,7 @@ declare const ConfigSchema: z.ZodObject<{
390
392
  roadmap: z.ZodBoolean;
391
393
  reviews: z.ZodBoolean;
392
394
  }, z.ZodTypeAny, "passthrough">>;
395
+ recipe: z.ZodOptional<z.ZodString>;
393
396
  }, z.ZodTypeAny, "passthrough">>;
394
397
  type Config = z.infer<typeof ConfigSchema>;
395
398
 
@@ -849,6 +852,7 @@ declare const SnapshotV1Schema: z.ZodObject<{
849
852
  roadmap: z.ZodBoolean;
850
853
  reviews: z.ZodBoolean;
851
854
  }, z.ZodTypeAny, "passthrough">>;
855
+ recipe: z.ZodOptional<z.ZodString>;
852
856
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
853
857
  version: z.ZodNumber;
854
858
  schemaVersion: z.ZodOptional<z.ZodNumber>;
@@ -874,6 +878,7 @@ declare const SnapshotV1Schema: z.ZodObject<{
874
878
  roadmap: z.ZodBoolean;
875
879
  reviews: z.ZodBoolean;
876
880
  }, z.ZodTypeAny, "passthrough">>;
881
+ recipe: z.ZodOptional<z.ZodString>;
877
882
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
878
883
  version: z.ZodNumber;
879
884
  schemaVersion: z.ZodOptional<z.ZodNumber>;
@@ -899,6 +904,7 @@ declare const SnapshotV1Schema: z.ZodObject<{
899
904
  roadmap: z.ZodBoolean;
900
905
  reviews: z.ZodBoolean;
901
906
  }, z.ZodTypeAny, "passthrough">>;
907
+ recipe: z.ZodOptional<z.ZodString>;
902
908
  }, z.ZodTypeAny, "passthrough">>;
903
909
  roadmap: z.ZodObject<{
904
910
  title: z.ZodString;
@@ -1153,15 +1159,35 @@ declare const SnapshotV1Schema: z.ZodObject<{
1153
1159
  file: z.ZodString;
1154
1160
  message: z.ZodString;
1155
1161
  }, "strip", z.ZodTypeAny, {
1156
- message: string;
1157
1162
  type: string;
1163
+ message: string;
1158
1164
  file: string;
1159
1165
  }, {
1160
- message: string;
1161
1166
  type: string;
1167
+ message: string;
1162
1168
  file: string;
1163
1169
  }>, "many">>;
1164
1170
  }, "strip", z.ZodTypeAny, {
1171
+ version: 1;
1172
+ config: {
1173
+ version: number;
1174
+ type: string;
1175
+ language: string;
1176
+ project: string;
1177
+ features: {
1178
+ issues: boolean;
1179
+ tickets: boolean;
1180
+ handovers: boolean;
1181
+ roadmap: boolean;
1182
+ reviews: boolean;
1183
+ } & {
1184
+ [k: string]: unknown;
1185
+ };
1186
+ schemaVersion?: number | undefined;
1187
+ recipe?: string | undefined;
1188
+ } & {
1189
+ [k: string]: unknown;
1190
+ };
1165
1191
  issues: z.objectOutputType<{
1166
1192
  id: z.ZodString;
1167
1193
  title: z.ZodString;
@@ -1197,8 +1223,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
1197
1223
  lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1198
1224
  }, z.ZodTypeAny, "passthrough">[];
1199
1225
  roadmap: {
1200
- title: string;
1201
1226
  date: string;
1227
+ title: string;
1202
1228
  phases: z.objectOutputType<{
1203
1229
  id: z.ZodString;
1204
1230
  label: z.ZodString;
@@ -1216,7 +1242,6 @@ declare const SnapshotV1Schema: z.ZodObject<{
1216
1242
  } & {
1217
1243
  [k: string]: unknown;
1218
1244
  };
1219
- version: 1;
1220
1245
  project: string;
1221
1246
  notes: z.objectOutputType<{
1222
1247
  id: z.ZodString;
@@ -1228,11 +1253,19 @@ declare const SnapshotV1Schema: z.ZodObject<{
1228
1253
  updatedDate: z.ZodEffects<z.ZodString, string, string>;
1229
1254
  }, z.ZodTypeAny, "passthrough">[];
1230
1255
  createdAt: string;
1231
- config: {
1256
+ handoverFilenames: string[];
1257
+ warnings?: {
1232
1258
  type: string;
1259
+ message: string;
1260
+ file: string;
1261
+ }[] | undefined;
1262
+ }, {
1263
+ version: 1;
1264
+ config: {
1233
1265
  version: number;
1234
- project: string;
1266
+ type: string;
1235
1267
  language: string;
1268
+ project: string;
1236
1269
  features: {
1237
1270
  issues: boolean;
1238
1271
  tickets: boolean;
@@ -1243,16 +1276,10 @@ declare const SnapshotV1Schema: z.ZodObject<{
1243
1276
  [k: string]: unknown;
1244
1277
  };
1245
1278
  schemaVersion?: number | undefined;
1279
+ recipe?: string | undefined;
1246
1280
  } & {
1247
1281
  [k: string]: unknown;
1248
1282
  };
1249
- handoverFilenames: string[];
1250
- warnings?: {
1251
- message: string;
1252
- type: string;
1253
- file: string;
1254
- }[] | undefined;
1255
- }, {
1256
1283
  issues: z.objectInputType<{
1257
1284
  id: z.ZodString;
1258
1285
  title: z.ZodString;
@@ -1288,8 +1315,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
1288
1315
  lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1289
1316
  }, z.ZodTypeAny, "passthrough">[];
1290
1317
  roadmap: {
1291
- title: string;
1292
1318
  date: string;
1319
+ title: string;
1293
1320
  phases: z.objectInputType<{
1294
1321
  id: z.ZodString;
1295
1322
  label: z.ZodString;
@@ -1307,27 +1334,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
1307
1334
  } & {
1308
1335
  [k: string]: unknown;
1309
1336
  };
1310
- version: 1;
1311
1337
  project: string;
1312
1338
  createdAt: string;
1313
- config: {
1314
- type: string;
1315
- version: number;
1316
- project: string;
1317
- language: string;
1318
- features: {
1319
- issues: boolean;
1320
- tickets: boolean;
1321
- handovers: boolean;
1322
- roadmap: boolean;
1323
- reviews: boolean;
1324
- } & {
1325
- [k: string]: unknown;
1326
- };
1327
- schemaVersion?: number | undefined;
1328
- } & {
1329
- [k: string]: unknown;
1330
- };
1331
1339
  notes?: z.objectInputType<{
1332
1340
  id: z.ZodString;
1333
1341
  title: z.ZodNullable<z.ZodString>;
@@ -1338,8 +1346,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
1338
1346
  updatedDate: z.ZodEffects<z.ZodString, string, string>;
1339
1347
  }, z.ZodTypeAny, "passthrough">[] | undefined;
1340
1348
  warnings?: {
1341
- message: string;
1342
1349
  type: string;
1350
+ message: string;
1343
1351
  file: string;
1344
1352
  }[] | undefined;
1345
1353
  handoverFilenames?: string[] | undefined;
package/dist/index.js CHANGED
@@ -128,7 +128,8 @@ var ConfigSchema = z6.object({
128
128
  project: z6.string().min(1),
129
129
  type: z6.string(),
130
130
  language: z6.string(),
131
- features: FeaturesSchema
131
+ features: FeaturesSchema,
132
+ recipe: z6.string().optional()
132
133
  }).passthrough();
133
134
 
134
135
  // src/core/project-state.ts
@@ -1776,7 +1777,7 @@ function nextOrder(phaseId, state) {
1776
1777
  }
1777
1778
 
1778
1779
  // src/core/init.ts
1779
- import { mkdir as mkdir2, stat as stat2 } from "fs/promises";
1780
+ import { mkdir as mkdir2, stat as stat2, readFile as readFile3, writeFile as writeFile2 } from "fs/promises";
1780
1781
  import { join as join4, resolve as resolve3 } from "path";
1781
1782
  async function initProject(root, options) {
1782
1783
  const absRoot = resolve3(root);
@@ -1842,6 +1843,8 @@ async function initProject(root, options) {
1842
1843
  };
1843
1844
  await writeConfig(config, absRoot);
1844
1845
  await writeRoadmap(roadmap, absRoot);
1846
+ const gitignorePath = join4(wrapDir, ".gitignore");
1847
+ await ensureGitignoreEntries(gitignorePath, STORY_GITIGNORE_ENTRIES);
1845
1848
  const warnings = [];
1846
1849
  if (options.force && exists) {
1847
1850
  try {
@@ -1860,9 +1863,24 @@ async function initProject(root, options) {
1860
1863
  warnings
1861
1864
  };
1862
1865
  }
1866
+ var STORY_GITIGNORE_ENTRIES = ["snapshots/", "status.json", "sessions/"];
1867
+ async function ensureGitignoreEntries(gitignorePath, entries) {
1868
+ let existing = "";
1869
+ try {
1870
+ existing = await readFile3(gitignorePath, "utf-8");
1871
+ } catch {
1872
+ }
1873
+ const lines = existing.split("\n").map((l) => l.trim());
1874
+ const missing = entries.filter((e) => !lines.includes(e));
1875
+ if (missing.length === 0) return;
1876
+ let content = existing;
1877
+ if (content.length > 0 && !content.endsWith("\n")) content += "\n";
1878
+ content += missing.join("\n") + "\n";
1879
+ await writeFile2(gitignorePath, content, "utf-8");
1880
+ }
1863
1881
 
1864
1882
  // src/core/snapshot.ts
1865
- import { readdir as readdir3, readFile as readFile3, mkdir as mkdir3, unlink as unlink2 } from "fs/promises";
1883
+ import { readdir as readdir3, readFile as readFile4, mkdir as mkdir3, unlink as unlink2 } from "fs/promises";
1866
1884
  import { existsSync as existsSync4 } from "fs";
1867
1885
  import { join as join5, resolve as resolve4 } from "path";
1868
1886
  import { z as z7 } from "zod";
@@ -1925,7 +1943,7 @@ async function loadLatestSnapshot(root) {
1925
1943
  if (files.length === 0) return null;
1926
1944
  for (const filename of files) {
1927
1945
  try {
1928
- const content = await readFile3(join5(snapshotsDir, filename), "utf-8");
1946
+ const content = await readFile4(join5(snapshotsDir, filename), "utf-8");
1929
1947
  const parsed = JSON.parse(content);
1930
1948
  const snapshot = SnapshotV1Schema.parse(parsed);
1931
1949
  return { snapshot, filename };