@anthropologies/claudestory 0.1.39 → 0.1.41
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/cli.js +14 -5
- package/dist/index.d.ts +42 -42
- package/dist/mcp.js +13 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5855,7 +5855,8 @@ var init_state_machine = __esm({
|
|
|
5855
5855
|
// start does INIT + LOAD_CONTEXT internally
|
|
5856
5856
|
LOAD_CONTEXT: ["PICK_TICKET"],
|
|
5857
5857
|
// internal (never seen by Claude)
|
|
5858
|
-
PICK_TICKET: ["PLAN", "ISSUE_FIX", "SESSION_END"],
|
|
5858
|
+
PICK_TICKET: ["PLAN", "ISSUE_FIX", "COMPLETE", "SESSION_END"],
|
|
5859
|
+
// COMPLETE for ISS-075 (nothing left to do)
|
|
5859
5860
|
PLAN: ["PLAN_REVIEW"],
|
|
5860
5861
|
PLAN_REVIEW: ["IMPLEMENT", "WRITE_TESTS", "PLAN", "PLAN_REVIEW", "SESSION_END"],
|
|
5861
5862
|
// approve → IMPLEMENT/WRITE_TESTS, reject → PLAN, stay for next round; SESSION_END for tiered exit
|
|
@@ -6444,6 +6445,9 @@ var init_pick_ticket = __esm({
|
|
|
6444
6445
|
}
|
|
6445
6446
|
const topCandidate = candidates.kind === "found" ? candidates.candidates[0] : null;
|
|
6446
6447
|
const hasIssues = highIssues.length > 0;
|
|
6448
|
+
if (!topCandidate && candidates.kind !== "found" && !hasIssues) {
|
|
6449
|
+
return { action: "goto", target: "COMPLETE" };
|
|
6450
|
+
}
|
|
6447
6451
|
return {
|
|
6448
6452
|
instruction: [
|
|
6449
6453
|
"# Pick a Ticket or Issue",
|
|
@@ -6539,6 +6543,11 @@ ${ticket.description}` : "",
|
|
|
6539
6543
|
if (issue.status !== "open") {
|
|
6540
6544
|
return { action: "retry", instruction: `Issue ${issueId} is ${issue.status}. Pick an open issue.` };
|
|
6541
6545
|
}
|
|
6546
|
+
try {
|
|
6547
|
+
const { handleIssueUpdate: handleIssueUpdate2 } = await Promise.resolve().then(() => (init_issue2(), issue_exports));
|
|
6548
|
+
await handleIssueUpdate2({ id: issueId, status: "inprogress" }, "json", ctx.root);
|
|
6549
|
+
} catch {
|
|
6550
|
+
}
|
|
6542
6551
|
ctx.updateDraft({
|
|
6543
6552
|
currentIssue: { id: issue.id, title: issue.title, severity: issue.severity },
|
|
6544
6553
|
ticket: void 0,
|
|
@@ -6725,7 +6734,7 @@ var init_plan_review = __esm({
|
|
|
6725
6734
|
const risk = ctx.state.ticket?.risk ?? "low";
|
|
6726
6735
|
const minRounds = requiredRounds(risk);
|
|
6727
6736
|
const hasCriticalOrMajor = findings.some(
|
|
6728
|
-
(f) => f.severity === "critical" || f.severity === "major"
|
|
6737
|
+
(f) => (f.severity === "critical" || f.severity === "major") && f.disposition !== "addressed" && f.disposition !== "deferred"
|
|
6729
6738
|
);
|
|
6730
6739
|
if (verdict === "approve" && hasCriticalOrMajor) {
|
|
6731
6740
|
return { action: "retry", instruction: "Contradictory review payload: verdict is 'approve' but critical/major findings are present. Re-run the review or correct the verdict." };
|
|
@@ -7173,7 +7182,7 @@ var init_code_review = __esm({
|
|
|
7173
7182
|
const risk = ctx.state.ticket?.realizedRisk ?? ctx.state.ticket?.risk ?? "low";
|
|
7174
7183
|
const minRounds = requiredRounds(risk);
|
|
7175
7184
|
const hasCriticalOrMajor = findings.some(
|
|
7176
|
-
(f) => f.severity === "critical" || f.severity === "major"
|
|
7185
|
+
(f) => (f.severity === "critical" || f.severity === "major") && f.disposition !== "addressed" && f.disposition !== "deferred"
|
|
7177
7186
|
);
|
|
7178
7187
|
const planRedirect = findings.some((f) => f.recommendedNextState === "PLAN");
|
|
7179
7188
|
if (verdict === "approve" && hasCriticalOrMajor) {
|
|
@@ -10871,7 +10880,7 @@ var init_mcp = __esm({
|
|
|
10871
10880
|
init_init();
|
|
10872
10881
|
ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
10873
10882
|
CONFIG_PATH2 = ".story/config.json";
|
|
10874
|
-
version = "0.1.
|
|
10883
|
+
version = "0.1.41";
|
|
10875
10884
|
main().catch((err) => {
|
|
10876
10885
|
process.stderr.write(`Fatal: ${err instanceof Error ? err.message : String(err)}
|
|
10877
10886
|
`);
|
|
@@ -14295,7 +14304,7 @@ async function runCli() {
|
|
|
14295
14304
|
registerSessionCommand: registerSessionCommand2,
|
|
14296
14305
|
registerRepairCommand: registerRepairCommand2
|
|
14297
14306
|
} = await Promise.resolve().then(() => (init_register(), register_exports));
|
|
14298
|
-
const version2 = "0.1.
|
|
14307
|
+
const version2 = "0.1.41";
|
|
14299
14308
|
class HandledError extends Error {
|
|
14300
14309
|
constructor() {
|
|
14301
14310
|
super("HANDLED_ERROR");
|
package/dist/index.d.ts
CHANGED
|
@@ -1377,42 +1377,15 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1377
1377
|
file: z.ZodString;
|
|
1378
1378
|
message: z.ZodString;
|
|
1379
1379
|
}, "strip", z.ZodTypeAny, {
|
|
1380
|
-
type: string;
|
|
1381
1380
|
message: string;
|
|
1381
|
+
type: string;
|
|
1382
1382
|
file: string;
|
|
1383
1383
|
}, {
|
|
1384
|
-
type: string;
|
|
1385
1384
|
message: string;
|
|
1385
|
+
type: string;
|
|
1386
1386
|
file: string;
|
|
1387
1387
|
}>, "many">>;
|
|
1388
1388
|
}, "strip", z.ZodTypeAny, {
|
|
1389
|
-
version: 1;
|
|
1390
|
-
config: {
|
|
1391
|
-
version: number;
|
|
1392
|
-
type: string;
|
|
1393
|
-
language: string;
|
|
1394
|
-
project: string;
|
|
1395
|
-
features: {
|
|
1396
|
-
issues: boolean;
|
|
1397
|
-
tickets: boolean;
|
|
1398
|
-
handovers: boolean;
|
|
1399
|
-
roadmap: boolean;
|
|
1400
|
-
reviews: boolean;
|
|
1401
|
-
} & {
|
|
1402
|
-
[k: string]: unknown;
|
|
1403
|
-
};
|
|
1404
|
-
schemaVersion?: number | undefined;
|
|
1405
|
-
recipe?: string | undefined;
|
|
1406
|
-
recipeOverrides?: {
|
|
1407
|
-
maxTicketsPerSession?: number | undefined;
|
|
1408
|
-
compactThreshold?: string | undefined;
|
|
1409
|
-
reviewBackends?: string[] | undefined;
|
|
1410
|
-
handoverInterval?: number | undefined;
|
|
1411
|
-
stages?: Record<string, Record<string, unknown>> | undefined;
|
|
1412
|
-
} | undefined;
|
|
1413
|
-
} & {
|
|
1414
|
-
[k: string]: unknown;
|
|
1415
|
-
};
|
|
1416
1389
|
issues: z.objectOutputType<{
|
|
1417
1390
|
id: z.ZodString;
|
|
1418
1391
|
title: z.ZodString;
|
|
@@ -1449,8 +1422,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1449
1422
|
claimedBySession: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1450
1423
|
}, z.ZodTypeAny, "passthrough">[];
|
|
1451
1424
|
roadmap: {
|
|
1452
|
-
date: string;
|
|
1453
1425
|
title: string;
|
|
1426
|
+
date: string;
|
|
1454
1427
|
phases: z.objectOutputType<{
|
|
1455
1428
|
id: z.ZodString;
|
|
1456
1429
|
label: z.ZodString;
|
|
@@ -1468,6 +1441,7 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1468
1441
|
} & {
|
|
1469
1442
|
[k: string]: unknown;
|
|
1470
1443
|
};
|
|
1444
|
+
version: 1;
|
|
1471
1445
|
project: string;
|
|
1472
1446
|
notes: z.objectOutputType<{
|
|
1473
1447
|
id: z.ZodString;
|
|
@@ -1493,19 +1467,11 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1493
1467
|
status: z.ZodEnum<["active", "deprecated", "superseded"]>;
|
|
1494
1468
|
}, z.ZodTypeAny, "passthrough">[];
|
|
1495
1469
|
createdAt: string;
|
|
1496
|
-
handoverFilenames: string[];
|
|
1497
|
-
warnings?: {
|
|
1498
|
-
type: string;
|
|
1499
|
-
message: string;
|
|
1500
|
-
file: string;
|
|
1501
|
-
}[] | undefined;
|
|
1502
|
-
}, {
|
|
1503
|
-
version: 1;
|
|
1504
1470
|
config: {
|
|
1505
|
-
version: number;
|
|
1506
1471
|
type: string;
|
|
1507
|
-
|
|
1472
|
+
version: number;
|
|
1508
1473
|
project: string;
|
|
1474
|
+
language: string;
|
|
1509
1475
|
features: {
|
|
1510
1476
|
issues: boolean;
|
|
1511
1477
|
tickets: boolean;
|
|
@@ -1527,6 +1493,13 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1527
1493
|
} & {
|
|
1528
1494
|
[k: string]: unknown;
|
|
1529
1495
|
};
|
|
1496
|
+
handoverFilenames: string[];
|
|
1497
|
+
warnings?: {
|
|
1498
|
+
message: string;
|
|
1499
|
+
type: string;
|
|
1500
|
+
file: string;
|
|
1501
|
+
}[] | undefined;
|
|
1502
|
+
}, {
|
|
1530
1503
|
issues: z.objectInputType<{
|
|
1531
1504
|
id: z.ZodString;
|
|
1532
1505
|
title: z.ZodString;
|
|
@@ -1563,8 +1536,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1563
1536
|
claimedBySession: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1564
1537
|
}, z.ZodTypeAny, "passthrough">[];
|
|
1565
1538
|
roadmap: {
|
|
1566
|
-
date: string;
|
|
1567
1539
|
title: string;
|
|
1540
|
+
date: string;
|
|
1568
1541
|
phases: z.objectInputType<{
|
|
1569
1542
|
id: z.ZodString;
|
|
1570
1543
|
label: z.ZodString;
|
|
@@ -1582,8 +1555,35 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1582
1555
|
} & {
|
|
1583
1556
|
[k: string]: unknown;
|
|
1584
1557
|
};
|
|
1558
|
+
version: 1;
|
|
1585
1559
|
project: string;
|
|
1586
1560
|
createdAt: string;
|
|
1561
|
+
config: {
|
|
1562
|
+
type: string;
|
|
1563
|
+
version: number;
|
|
1564
|
+
project: string;
|
|
1565
|
+
language: string;
|
|
1566
|
+
features: {
|
|
1567
|
+
issues: boolean;
|
|
1568
|
+
tickets: boolean;
|
|
1569
|
+
handovers: boolean;
|
|
1570
|
+
roadmap: boolean;
|
|
1571
|
+
reviews: boolean;
|
|
1572
|
+
} & {
|
|
1573
|
+
[k: string]: unknown;
|
|
1574
|
+
};
|
|
1575
|
+
schemaVersion?: number | undefined;
|
|
1576
|
+
recipe?: string | undefined;
|
|
1577
|
+
recipeOverrides?: {
|
|
1578
|
+
maxTicketsPerSession?: number | undefined;
|
|
1579
|
+
compactThreshold?: string | undefined;
|
|
1580
|
+
reviewBackends?: string[] | undefined;
|
|
1581
|
+
handoverInterval?: number | undefined;
|
|
1582
|
+
stages?: Record<string, Record<string, unknown>> | undefined;
|
|
1583
|
+
} | undefined;
|
|
1584
|
+
} & {
|
|
1585
|
+
[k: string]: unknown;
|
|
1586
|
+
};
|
|
1587
1587
|
notes?: z.objectInputType<{
|
|
1588
1588
|
id: z.ZodString;
|
|
1589
1589
|
title: z.ZodNullable<z.ZodString>;
|
|
@@ -1608,8 +1608,8 @@ declare const SnapshotV1Schema: z.ZodObject<{
|
|
|
1608
1608
|
status: z.ZodEnum<["active", "deprecated", "superseded"]>;
|
|
1609
1609
|
}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
1610
1610
|
warnings?: {
|
|
1611
|
-
type: string;
|
|
1612
1611
|
message: string;
|
|
1612
|
+
type: string;
|
|
1613
1613
|
file: string;
|
|
1614
1614
|
}[] | undefined;
|
|
1615
1615
|
handoverFilenames?: string[] | undefined;
|
package/dist/mcp.js
CHANGED
|
@@ -5453,7 +5453,8 @@ var TRANSITIONS = {
|
|
|
5453
5453
|
// start does INIT + LOAD_CONTEXT internally
|
|
5454
5454
|
LOAD_CONTEXT: ["PICK_TICKET"],
|
|
5455
5455
|
// internal (never seen by Claude)
|
|
5456
|
-
PICK_TICKET: ["PLAN", "ISSUE_FIX", "SESSION_END"],
|
|
5456
|
+
PICK_TICKET: ["PLAN", "ISSUE_FIX", "COMPLETE", "SESSION_END"],
|
|
5457
|
+
// COMPLETE for ISS-075 (nothing left to do)
|
|
5457
5458
|
PLAN: ["PLAN_REVIEW"],
|
|
5458
5459
|
PLAN_REVIEW: ["IMPLEMENT", "WRITE_TESTS", "PLAN", "PLAN_REVIEW", "SESSION_END"],
|
|
5459
5460
|
// approve → IMPLEMENT/WRITE_TESTS, reject → PLAN, stay for next round; SESSION_END for tiered exit
|
|
@@ -6013,6 +6014,9 @@ var PickTicketStage = class {
|
|
|
6013
6014
|
}
|
|
6014
6015
|
const topCandidate = candidates.kind === "found" ? candidates.candidates[0] : null;
|
|
6015
6016
|
const hasIssues = highIssues.length > 0;
|
|
6017
|
+
if (!topCandidate && candidates.kind !== "found" && !hasIssues) {
|
|
6018
|
+
return { action: "goto", target: "COMPLETE" };
|
|
6019
|
+
}
|
|
6016
6020
|
return {
|
|
6017
6021
|
instruction: [
|
|
6018
6022
|
"# Pick a Ticket or Issue",
|
|
@@ -6108,6 +6112,11 @@ ${ticket.description}` : "",
|
|
|
6108
6112
|
if (issue.status !== "open") {
|
|
6109
6113
|
return { action: "retry", instruction: `Issue ${issueId} is ${issue.status}. Pick an open issue.` };
|
|
6110
6114
|
}
|
|
6115
|
+
try {
|
|
6116
|
+
const { handleIssueUpdate: handleIssueUpdate2 } = await Promise.resolve().then(() => (init_issue2(), issue_exports));
|
|
6117
|
+
await handleIssueUpdate2({ id: issueId, status: "inprogress" }, "json", ctx.root);
|
|
6118
|
+
} catch {
|
|
6119
|
+
}
|
|
6111
6120
|
ctx.updateDraft({
|
|
6112
6121
|
currentIssue: { id: issue.id, title: issue.title, severity: issue.severity },
|
|
6113
6122
|
ticket: void 0,
|
|
@@ -6280,7 +6289,7 @@ var PlanReviewStage = class {
|
|
|
6280
6289
|
const risk = ctx.state.ticket?.risk ?? "low";
|
|
6281
6290
|
const minRounds = requiredRounds(risk);
|
|
6282
6291
|
const hasCriticalOrMajor = findings.some(
|
|
6283
|
-
(f) => f.severity === "critical" || f.severity === "major"
|
|
6292
|
+
(f) => (f.severity === "critical" || f.severity === "major") && f.disposition !== "addressed" && f.disposition !== "deferred"
|
|
6284
6293
|
);
|
|
6285
6294
|
if (verdict === "approve" && hasCriticalOrMajor) {
|
|
6286
6295
|
return { action: "retry", instruction: "Contradictory review payload: verdict is 'approve' but critical/major findings are present. Re-run the review or correct the verdict." };
|
|
@@ -6701,7 +6710,7 @@ var CodeReviewStage = class {
|
|
|
6701
6710
|
const risk = ctx.state.ticket?.realizedRisk ?? ctx.state.ticket?.risk ?? "low";
|
|
6702
6711
|
const minRounds = requiredRounds(risk);
|
|
6703
6712
|
const hasCriticalOrMajor = findings.some(
|
|
6704
|
-
(f) => f.severity === "critical" || f.severity === "major"
|
|
6713
|
+
(f) => (f.severity === "critical" || f.severity === "major") && f.disposition !== "addressed" && f.disposition !== "deferred"
|
|
6705
6714
|
);
|
|
6706
6715
|
const planRedirect = findings.some((f) => f.recommendedNextState === "PLAN");
|
|
6707
6716
|
if (verdict === "approve" && hasCriticalOrMajor) {
|
|
@@ -10007,7 +10016,7 @@ async function ensureGitignoreEntries(gitignorePath, entries) {
|
|
|
10007
10016
|
// src/mcp/index.ts
|
|
10008
10017
|
var ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
10009
10018
|
var CONFIG_PATH2 = ".story/config.json";
|
|
10010
|
-
var version = "0.1.
|
|
10019
|
+
var version = "0.1.41";
|
|
10011
10020
|
function tryDiscoverRoot() {
|
|
10012
10021
|
const envRoot = process.env[ENV_VAR2];
|
|
10013
10022
|
if (envRoot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropologies/claudestory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Cross-session context persistence for AI coding projects. Tracks tickets, issues, roadmap, and handovers so every session builds on the last.",
|
|
6
6
|
"keywords": [
|