@anthropologies/claudestory 0.1.3 → 0.1.5
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/README.md +25 -4
- package/dist/cli.js +779 -15
- package/dist/index.d.ts +605 -1
- package/dist/index.js +528 -1
- package/dist/mcp.js +787 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -559,6 +559,13 @@ declare function runTransaction(root: string, operations: Array<{
|
|
|
559
559
|
declare function sortKeysDeep(value: unknown): unknown;
|
|
560
560
|
/** Serializes to pretty-printed JSON with deep-sorted keys. */
|
|
561
561
|
declare function serializeJSON(obj: unknown): string;
|
|
562
|
+
/** Atomic write: write to temp file, then rename. */
|
|
563
|
+
declare function atomicWrite(targetPath: string, content: string): Promise<void>;
|
|
564
|
+
/**
|
|
565
|
+
* Symlink protection: resolve both root and target parent via realpath,
|
|
566
|
+
* verify target is under root. On existing targets, lstat to reject symlinks.
|
|
567
|
+
*/
|
|
568
|
+
declare function guardPath(target: string, root: string): Promise<void>;
|
|
562
569
|
|
|
563
570
|
/**
|
|
564
571
|
* Discovers the project root by walking up from `startDir` (default: cwd)
|
|
@@ -708,6 +715,594 @@ interface InitResult {
|
|
|
708
715
|
*/
|
|
709
716
|
declare function initProject(root: string, options: InitOptions): Promise<InitResult>;
|
|
710
717
|
|
|
718
|
+
declare const SnapshotV1Schema: z.ZodObject<{
|
|
719
|
+
version: z.ZodLiteral<1>;
|
|
720
|
+
createdAt: z.ZodString;
|
|
721
|
+
project: z.ZodString;
|
|
722
|
+
config: z.ZodObject<{
|
|
723
|
+
version: z.ZodNumber;
|
|
724
|
+
schemaVersion: z.ZodOptional<z.ZodNumber>;
|
|
725
|
+
project: z.ZodString;
|
|
726
|
+
type: z.ZodString;
|
|
727
|
+
language: z.ZodString;
|
|
728
|
+
features: z.ZodObject<{
|
|
729
|
+
tickets: z.ZodBoolean;
|
|
730
|
+
issues: z.ZodBoolean;
|
|
731
|
+
handovers: z.ZodBoolean;
|
|
732
|
+
roadmap: z.ZodBoolean;
|
|
733
|
+
reviews: z.ZodBoolean;
|
|
734
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
735
|
+
tickets: z.ZodBoolean;
|
|
736
|
+
issues: z.ZodBoolean;
|
|
737
|
+
handovers: z.ZodBoolean;
|
|
738
|
+
roadmap: z.ZodBoolean;
|
|
739
|
+
reviews: z.ZodBoolean;
|
|
740
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
741
|
+
tickets: z.ZodBoolean;
|
|
742
|
+
issues: z.ZodBoolean;
|
|
743
|
+
handovers: z.ZodBoolean;
|
|
744
|
+
roadmap: z.ZodBoolean;
|
|
745
|
+
reviews: z.ZodBoolean;
|
|
746
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
747
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
748
|
+
version: z.ZodNumber;
|
|
749
|
+
schemaVersion: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
project: z.ZodString;
|
|
751
|
+
type: z.ZodString;
|
|
752
|
+
language: z.ZodString;
|
|
753
|
+
features: z.ZodObject<{
|
|
754
|
+
tickets: z.ZodBoolean;
|
|
755
|
+
issues: z.ZodBoolean;
|
|
756
|
+
handovers: z.ZodBoolean;
|
|
757
|
+
roadmap: z.ZodBoolean;
|
|
758
|
+
reviews: z.ZodBoolean;
|
|
759
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
760
|
+
tickets: z.ZodBoolean;
|
|
761
|
+
issues: z.ZodBoolean;
|
|
762
|
+
handovers: z.ZodBoolean;
|
|
763
|
+
roadmap: z.ZodBoolean;
|
|
764
|
+
reviews: z.ZodBoolean;
|
|
765
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
766
|
+
tickets: z.ZodBoolean;
|
|
767
|
+
issues: z.ZodBoolean;
|
|
768
|
+
handovers: z.ZodBoolean;
|
|
769
|
+
roadmap: z.ZodBoolean;
|
|
770
|
+
reviews: z.ZodBoolean;
|
|
771
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
772
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
773
|
+
version: z.ZodNumber;
|
|
774
|
+
schemaVersion: z.ZodOptional<z.ZodNumber>;
|
|
775
|
+
project: z.ZodString;
|
|
776
|
+
type: z.ZodString;
|
|
777
|
+
language: z.ZodString;
|
|
778
|
+
features: z.ZodObject<{
|
|
779
|
+
tickets: z.ZodBoolean;
|
|
780
|
+
issues: z.ZodBoolean;
|
|
781
|
+
handovers: z.ZodBoolean;
|
|
782
|
+
roadmap: z.ZodBoolean;
|
|
783
|
+
reviews: z.ZodBoolean;
|
|
784
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
785
|
+
tickets: z.ZodBoolean;
|
|
786
|
+
issues: z.ZodBoolean;
|
|
787
|
+
handovers: z.ZodBoolean;
|
|
788
|
+
roadmap: z.ZodBoolean;
|
|
789
|
+
reviews: z.ZodBoolean;
|
|
790
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
791
|
+
tickets: z.ZodBoolean;
|
|
792
|
+
issues: z.ZodBoolean;
|
|
793
|
+
handovers: z.ZodBoolean;
|
|
794
|
+
roadmap: z.ZodBoolean;
|
|
795
|
+
reviews: z.ZodBoolean;
|
|
796
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
797
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
798
|
+
roadmap: z.ZodObject<{
|
|
799
|
+
title: z.ZodString;
|
|
800
|
+
date: z.ZodEffects<z.ZodString, string, string>;
|
|
801
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
802
|
+
id: z.ZodString;
|
|
803
|
+
label: z.ZodString;
|
|
804
|
+
name: z.ZodString;
|
|
805
|
+
description: z.ZodString;
|
|
806
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
807
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
808
|
+
id: z.ZodString;
|
|
809
|
+
label: z.ZodString;
|
|
810
|
+
name: z.ZodString;
|
|
811
|
+
description: z.ZodString;
|
|
812
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
813
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
814
|
+
id: z.ZodString;
|
|
815
|
+
label: z.ZodString;
|
|
816
|
+
name: z.ZodString;
|
|
817
|
+
description: z.ZodString;
|
|
818
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
819
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
820
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
821
|
+
name: z.ZodString;
|
|
822
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
823
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
824
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
825
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
826
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
827
|
+
name: z.ZodString;
|
|
828
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
829
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
830
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
831
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
832
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
833
|
+
name: z.ZodString;
|
|
834
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
836
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
837
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
838
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
839
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
840
|
+
title: z.ZodString;
|
|
841
|
+
date: z.ZodEffects<z.ZodString, string, string>;
|
|
842
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
843
|
+
id: z.ZodString;
|
|
844
|
+
label: z.ZodString;
|
|
845
|
+
name: z.ZodString;
|
|
846
|
+
description: z.ZodString;
|
|
847
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
848
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
849
|
+
id: z.ZodString;
|
|
850
|
+
label: z.ZodString;
|
|
851
|
+
name: z.ZodString;
|
|
852
|
+
description: z.ZodString;
|
|
853
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
854
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
855
|
+
id: z.ZodString;
|
|
856
|
+
label: z.ZodString;
|
|
857
|
+
name: z.ZodString;
|
|
858
|
+
description: z.ZodString;
|
|
859
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
860
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
861
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
862
|
+
name: z.ZodString;
|
|
863
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
864
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
865
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
866
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
867
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
868
|
+
name: z.ZodString;
|
|
869
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
870
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
871
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
872
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
873
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
874
|
+
name: z.ZodString;
|
|
875
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
876
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
877
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
878
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
879
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
880
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
881
|
+
title: z.ZodString;
|
|
882
|
+
date: z.ZodEffects<z.ZodString, string, string>;
|
|
883
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
884
|
+
id: z.ZodString;
|
|
885
|
+
label: z.ZodString;
|
|
886
|
+
name: z.ZodString;
|
|
887
|
+
description: z.ZodString;
|
|
888
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
889
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
890
|
+
id: z.ZodString;
|
|
891
|
+
label: z.ZodString;
|
|
892
|
+
name: z.ZodString;
|
|
893
|
+
description: z.ZodString;
|
|
894
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
895
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
896
|
+
id: z.ZodString;
|
|
897
|
+
label: z.ZodString;
|
|
898
|
+
name: z.ZodString;
|
|
899
|
+
description: z.ZodString;
|
|
900
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
902
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
903
|
+
name: z.ZodString;
|
|
904
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
905
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
906
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
907
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
908
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
909
|
+
name: z.ZodString;
|
|
910
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
911
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
912
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
913
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
914
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
915
|
+
name: z.ZodString;
|
|
916
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
917
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
918
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
919
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
920
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
921
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
922
|
+
tickets: z.ZodArray<z.ZodObject<{
|
|
923
|
+
id: z.ZodString;
|
|
924
|
+
title: z.ZodString;
|
|
925
|
+
description: z.ZodString;
|
|
926
|
+
type: z.ZodEnum<["task", "feature", "chore"]>;
|
|
927
|
+
status: z.ZodEnum<["open", "inprogress", "complete"]>;
|
|
928
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
929
|
+
order: z.ZodNumber;
|
|
930
|
+
createdDate: z.ZodEffects<z.ZodString, string, string>;
|
|
931
|
+
completedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
932
|
+
blockedBy: z.ZodArray<z.ZodString, "many">;
|
|
933
|
+
parentTicket: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
934
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
935
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
936
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
937
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
938
|
+
id: z.ZodString;
|
|
939
|
+
title: z.ZodString;
|
|
940
|
+
description: z.ZodString;
|
|
941
|
+
type: z.ZodEnum<["task", "feature", "chore"]>;
|
|
942
|
+
status: z.ZodEnum<["open", "inprogress", "complete"]>;
|
|
943
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
944
|
+
order: z.ZodNumber;
|
|
945
|
+
createdDate: z.ZodEffects<z.ZodString, string, string>;
|
|
946
|
+
completedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
947
|
+
blockedBy: z.ZodArray<z.ZodString, "many">;
|
|
948
|
+
parentTicket: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
949
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
950
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
951
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
952
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
953
|
+
id: z.ZodString;
|
|
954
|
+
title: z.ZodString;
|
|
955
|
+
description: z.ZodString;
|
|
956
|
+
type: z.ZodEnum<["task", "feature", "chore"]>;
|
|
957
|
+
status: z.ZodEnum<["open", "inprogress", "complete"]>;
|
|
958
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
959
|
+
order: z.ZodNumber;
|
|
960
|
+
createdDate: z.ZodEffects<z.ZodString, string, string>;
|
|
961
|
+
completedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
962
|
+
blockedBy: z.ZodArray<z.ZodString, "many">;
|
|
963
|
+
parentTicket: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
964
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
965
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
968
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
969
|
+
id: z.ZodString;
|
|
970
|
+
title: z.ZodString;
|
|
971
|
+
status: z.ZodEnum<["open", "inprogress", "resolved"]>;
|
|
972
|
+
severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
|
|
973
|
+
components: z.ZodArray<z.ZodString, "many">;
|
|
974
|
+
impact: z.ZodString;
|
|
975
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
976
|
+
location: z.ZodArray<z.ZodString, "many">;
|
|
977
|
+
discoveredDate: z.ZodEffects<z.ZodString, string, string>;
|
|
978
|
+
resolvedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
979
|
+
relatedTickets: z.ZodArray<z.ZodString, "many">;
|
|
980
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
981
|
+
phase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
982
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
983
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
984
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
985
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
986
|
+
id: z.ZodString;
|
|
987
|
+
title: z.ZodString;
|
|
988
|
+
status: z.ZodEnum<["open", "inprogress", "resolved"]>;
|
|
989
|
+
severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
|
|
990
|
+
components: z.ZodArray<z.ZodString, "many">;
|
|
991
|
+
impact: z.ZodString;
|
|
992
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
993
|
+
location: z.ZodArray<z.ZodString, "many">;
|
|
994
|
+
discoveredDate: z.ZodEffects<z.ZodString, string, string>;
|
|
995
|
+
resolvedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
996
|
+
relatedTickets: z.ZodArray<z.ZodString, "many">;
|
|
997
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
998
|
+
phase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
999
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1000
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1001
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1002
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1003
|
+
id: z.ZodString;
|
|
1004
|
+
title: z.ZodString;
|
|
1005
|
+
status: z.ZodEnum<["open", "inprogress", "resolved"]>;
|
|
1006
|
+
severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
|
|
1007
|
+
components: z.ZodArray<z.ZodString, "many">;
|
|
1008
|
+
impact: z.ZodString;
|
|
1009
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1010
|
+
location: z.ZodArray<z.ZodString, "many">;
|
|
1011
|
+
discoveredDate: z.ZodEffects<z.ZodString, string, string>;
|
|
1012
|
+
resolvedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
1013
|
+
relatedTickets: z.ZodArray<z.ZodString, "many">;
|
|
1014
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
1015
|
+
phase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1016
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1017
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1018
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1019
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1020
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1021
|
+
type: z.ZodString;
|
|
1022
|
+
file: z.ZodString;
|
|
1023
|
+
message: z.ZodString;
|
|
1024
|
+
}, "strip", z.ZodTypeAny, {
|
|
1025
|
+
message: string;
|
|
1026
|
+
type: string;
|
|
1027
|
+
file: string;
|
|
1028
|
+
}, {
|
|
1029
|
+
message: string;
|
|
1030
|
+
type: string;
|
|
1031
|
+
file: string;
|
|
1032
|
+
}>, "many">>;
|
|
1033
|
+
}, "strip", z.ZodTypeAny, {
|
|
1034
|
+
issues: z.objectOutputType<{
|
|
1035
|
+
id: z.ZodString;
|
|
1036
|
+
title: z.ZodString;
|
|
1037
|
+
status: z.ZodEnum<["open", "inprogress", "resolved"]>;
|
|
1038
|
+
severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
|
|
1039
|
+
components: z.ZodArray<z.ZodString, "many">;
|
|
1040
|
+
impact: z.ZodString;
|
|
1041
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1042
|
+
location: z.ZodArray<z.ZodString, "many">;
|
|
1043
|
+
discoveredDate: z.ZodEffects<z.ZodString, string, string>;
|
|
1044
|
+
resolvedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
1045
|
+
relatedTickets: z.ZodArray<z.ZodString, "many">;
|
|
1046
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
1047
|
+
phase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1048
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1049
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1050
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1051
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1052
|
+
tickets: z.objectOutputType<{
|
|
1053
|
+
id: z.ZodString;
|
|
1054
|
+
title: z.ZodString;
|
|
1055
|
+
description: z.ZodString;
|
|
1056
|
+
type: z.ZodEnum<["task", "feature", "chore"]>;
|
|
1057
|
+
status: z.ZodEnum<["open", "inprogress", "complete"]>;
|
|
1058
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
1059
|
+
order: z.ZodNumber;
|
|
1060
|
+
createdDate: z.ZodEffects<z.ZodString, string, string>;
|
|
1061
|
+
completedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
1062
|
+
blockedBy: z.ZodArray<z.ZodString, "many">;
|
|
1063
|
+
parentTicket: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1064
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1065
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1066
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1067
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1068
|
+
roadmap: {
|
|
1069
|
+
title: string;
|
|
1070
|
+
date: string;
|
|
1071
|
+
phases: z.objectOutputType<{
|
|
1072
|
+
id: z.ZodString;
|
|
1073
|
+
label: z.ZodString;
|
|
1074
|
+
name: z.ZodString;
|
|
1075
|
+
description: z.ZodString;
|
|
1076
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1078
|
+
blockers: z.objectOutputType<{
|
|
1079
|
+
name: z.ZodString;
|
|
1080
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
1081
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1082
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
1083
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1084
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1085
|
+
} & {
|
|
1086
|
+
[k: string]: unknown;
|
|
1087
|
+
};
|
|
1088
|
+
version: 1;
|
|
1089
|
+
project: string;
|
|
1090
|
+
createdAt: string;
|
|
1091
|
+
config: {
|
|
1092
|
+
type: string;
|
|
1093
|
+
version: number;
|
|
1094
|
+
project: string;
|
|
1095
|
+
language: string;
|
|
1096
|
+
features: {
|
|
1097
|
+
issues: boolean;
|
|
1098
|
+
tickets: boolean;
|
|
1099
|
+
handovers: boolean;
|
|
1100
|
+
roadmap: boolean;
|
|
1101
|
+
reviews: boolean;
|
|
1102
|
+
} & {
|
|
1103
|
+
[k: string]: unknown;
|
|
1104
|
+
};
|
|
1105
|
+
schemaVersion?: number | undefined;
|
|
1106
|
+
} & {
|
|
1107
|
+
[k: string]: unknown;
|
|
1108
|
+
};
|
|
1109
|
+
warnings?: {
|
|
1110
|
+
message: string;
|
|
1111
|
+
type: string;
|
|
1112
|
+
file: string;
|
|
1113
|
+
}[] | undefined;
|
|
1114
|
+
}, {
|
|
1115
|
+
issues: z.objectInputType<{
|
|
1116
|
+
id: z.ZodString;
|
|
1117
|
+
title: z.ZodString;
|
|
1118
|
+
status: z.ZodEnum<["open", "inprogress", "resolved"]>;
|
|
1119
|
+
severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
|
|
1120
|
+
components: z.ZodArray<z.ZodString, "many">;
|
|
1121
|
+
impact: z.ZodString;
|
|
1122
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1123
|
+
location: z.ZodArray<z.ZodString, "many">;
|
|
1124
|
+
discoveredDate: z.ZodEffects<z.ZodString, string, string>;
|
|
1125
|
+
resolvedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
1126
|
+
relatedTickets: z.ZodArray<z.ZodString, "many">;
|
|
1127
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
1128
|
+
phase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1129
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1130
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1131
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1132
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1133
|
+
tickets: z.objectInputType<{
|
|
1134
|
+
id: z.ZodString;
|
|
1135
|
+
title: z.ZodString;
|
|
1136
|
+
description: z.ZodString;
|
|
1137
|
+
type: z.ZodEnum<["task", "feature", "chore"]>;
|
|
1138
|
+
status: z.ZodEnum<["open", "inprogress", "complete"]>;
|
|
1139
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
1140
|
+
order: z.ZodNumber;
|
|
1141
|
+
createdDate: z.ZodEffects<z.ZodString, string, string>;
|
|
1142
|
+
completedDate: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
1143
|
+
blockedBy: z.ZodArray<z.ZodString, "many">;
|
|
1144
|
+
parentTicket: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1145
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1146
|
+
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1147
|
+
lastModifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1148
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1149
|
+
roadmap: {
|
|
1150
|
+
title: string;
|
|
1151
|
+
date: string;
|
|
1152
|
+
phases: z.objectInputType<{
|
|
1153
|
+
id: z.ZodString;
|
|
1154
|
+
label: z.ZodString;
|
|
1155
|
+
name: z.ZodString;
|
|
1156
|
+
description: z.ZodString;
|
|
1157
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1158
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1159
|
+
blockers: z.objectInputType<{
|
|
1160
|
+
name: z.ZodString;
|
|
1161
|
+
cleared: z.ZodOptional<z.ZodBoolean>;
|
|
1162
|
+
createdDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1163
|
+
clearedDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
1164
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1165
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
1166
|
+
} & {
|
|
1167
|
+
[k: string]: unknown;
|
|
1168
|
+
};
|
|
1169
|
+
version: 1;
|
|
1170
|
+
project: string;
|
|
1171
|
+
createdAt: string;
|
|
1172
|
+
config: {
|
|
1173
|
+
type: string;
|
|
1174
|
+
version: number;
|
|
1175
|
+
project: string;
|
|
1176
|
+
language: 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
|
+
} & {
|
|
1188
|
+
[k: string]: unknown;
|
|
1189
|
+
};
|
|
1190
|
+
warnings?: {
|
|
1191
|
+
message: string;
|
|
1192
|
+
type: string;
|
|
1193
|
+
file: string;
|
|
1194
|
+
}[] | undefined;
|
|
1195
|
+
}>;
|
|
1196
|
+
type SnapshotV1 = z.infer<typeof SnapshotV1Schema>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Creates a snapshot from the current project state.
|
|
1199
|
+
* Call inside withProjectLock for atomicity.
|
|
1200
|
+
* Returns the filename and prune count.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function saveSnapshot(root: string, loadResult: LoadResult): Promise<{
|
|
1203
|
+
filename: string;
|
|
1204
|
+
retained: number;
|
|
1205
|
+
pruned: number;
|
|
1206
|
+
}>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Loads the latest valid snapshot from .story/snapshots/.
|
|
1209
|
+
* Scans in descending filename order, returns first valid file.
|
|
1210
|
+
* Returns null if no valid snapshots found.
|
|
1211
|
+
*/
|
|
1212
|
+
declare function loadLatestSnapshot(root: string): Promise<{
|
|
1213
|
+
snapshot: SnapshotV1;
|
|
1214
|
+
filename: string;
|
|
1215
|
+
} | null>;
|
|
1216
|
+
interface TicketChange {
|
|
1217
|
+
id: string;
|
|
1218
|
+
title: string;
|
|
1219
|
+
from: string;
|
|
1220
|
+
to: string;
|
|
1221
|
+
}
|
|
1222
|
+
interface IssueChange {
|
|
1223
|
+
id: string;
|
|
1224
|
+
title: string;
|
|
1225
|
+
from: string;
|
|
1226
|
+
to: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface PhaseChange {
|
|
1229
|
+
id: string;
|
|
1230
|
+
name: string;
|
|
1231
|
+
from: string;
|
|
1232
|
+
to: string;
|
|
1233
|
+
}
|
|
1234
|
+
interface SnapshotDiff {
|
|
1235
|
+
tickets: {
|
|
1236
|
+
added: Array<{
|
|
1237
|
+
id: string;
|
|
1238
|
+
title: string;
|
|
1239
|
+
}>;
|
|
1240
|
+
removed: Array<{
|
|
1241
|
+
id: string;
|
|
1242
|
+
title: string;
|
|
1243
|
+
}>;
|
|
1244
|
+
statusChanged: TicketChange[];
|
|
1245
|
+
};
|
|
1246
|
+
issues: {
|
|
1247
|
+
added: Array<{
|
|
1248
|
+
id: string;
|
|
1249
|
+
title: string;
|
|
1250
|
+
}>;
|
|
1251
|
+
resolved: Array<{
|
|
1252
|
+
id: string;
|
|
1253
|
+
title: string;
|
|
1254
|
+
}>;
|
|
1255
|
+
statusChanged: IssueChange[];
|
|
1256
|
+
};
|
|
1257
|
+
blockers: {
|
|
1258
|
+
added: string[];
|
|
1259
|
+
cleared: string[];
|
|
1260
|
+
};
|
|
1261
|
+
phases: {
|
|
1262
|
+
added: Array<{
|
|
1263
|
+
id: string;
|
|
1264
|
+
name: string;
|
|
1265
|
+
}>;
|
|
1266
|
+
removed: Array<{
|
|
1267
|
+
id: string;
|
|
1268
|
+
name: string;
|
|
1269
|
+
}>;
|
|
1270
|
+
statusChanged: PhaseChange[];
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
interface RecapResult {
|
|
1274
|
+
snapshot: {
|
|
1275
|
+
filename: string;
|
|
1276
|
+
createdAt: string;
|
|
1277
|
+
} | null;
|
|
1278
|
+
changes: SnapshotDiff | null;
|
|
1279
|
+
suggestedActions: {
|
|
1280
|
+
nextTicket: {
|
|
1281
|
+
id: string;
|
|
1282
|
+
title: string;
|
|
1283
|
+
phase: string | null;
|
|
1284
|
+
} | null;
|
|
1285
|
+
highSeverityIssues: Array<{
|
|
1286
|
+
id: string;
|
|
1287
|
+
title: string;
|
|
1288
|
+
severity: string;
|
|
1289
|
+
}>;
|
|
1290
|
+
recentlyClearedBlockers: string[];
|
|
1291
|
+
};
|
|
1292
|
+
partial: boolean;
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Computes the diff between a snapshot state and the current state.
|
|
1296
|
+
*/
|
|
1297
|
+
declare function diffStates(snapshotState: ProjectState, currentState: ProjectState): SnapshotDiff;
|
|
1298
|
+
/**
|
|
1299
|
+
* Builds a full RecapResult: diff + suggested actions.
|
|
1300
|
+
*/
|
|
1301
|
+
declare function buildRecap(currentState: ProjectState, snapshotInfo: {
|
|
1302
|
+
snapshot: SnapshotV1;
|
|
1303
|
+
filename: string;
|
|
1304
|
+
} | null): RecapResult;
|
|
1305
|
+
|
|
711
1306
|
declare const ExitCode: {
|
|
712
1307
|
readonly OK: 0;
|
|
713
1308
|
readonly USER_ERROR: 1;
|
|
@@ -769,5 +1364,14 @@ declare function formatInitResult(result: {
|
|
|
769
1364
|
}, format: OutputFormat): string;
|
|
770
1365
|
declare function formatHandoverList(filenames: readonly string[], format: OutputFormat): string;
|
|
771
1366
|
declare function formatHandoverContent(filename: string, content: string, format: OutputFormat): string;
|
|
1367
|
+
declare function formatHandoverCreateResult(filename: string, format: OutputFormat): string;
|
|
1368
|
+
|
|
1369
|
+
declare function formatSnapshotResult(result: {
|
|
1370
|
+
filename: string;
|
|
1371
|
+
retained: number;
|
|
1372
|
+
pruned: number;
|
|
1373
|
+
}, format: OutputFormat): string;
|
|
1374
|
+
declare function formatRecap(recap: RecapResult, state: ProjectState, format: OutputFormat): string;
|
|
1375
|
+
declare function formatExport(state: ProjectState, mode: "all" | "phase", phaseId: string | null, format: OutputFormat): string;
|
|
772
1376
|
|
|
773
|
-
export { type Blocker, BlockerSchema, CURRENT_SCHEMA_VERSION, type Config, ConfigSchema, DATE_REGEX, DateSchema, ERROR_CODES, type ErrorCode, type ErrorEnvelope, ExitCode, type ExitCodeValue, type Features, FeaturesSchema, INTEGRITY_WARNING_TYPES, ISSUE_ID_REGEX, ISSUE_SEVERITIES, ISSUE_STATUSES, type InitOptions, type InitResult, type Issue, IssueIdSchema, IssueSchema, type IssueSeverity, type IssueStatus, type LoadOptions, type LoadResult, type LoadWarning, type LoadWarningType, type NextTicketAllBlocked, type NextTicketAllComplete, type NextTicketEmpty, type NextTicketOutcome, type NextTicketResult, OUTPUT_FORMATS, type OutputFormat, type PartialEnvelope, type Phase, PhaseSchema, type PhaseStatus, type PhaseWithStatus, ProjectLoaderError, ProjectState, type Roadmap, RoadmapSchema, type SuccessEnvelope, TICKET_ID_REGEX, TICKET_STATUSES, TICKET_TYPES, type Ticket, TicketIdSchema, TicketSchema, type TicketStatus, type TicketType, type UmbrellaProgress, type UnblockImpact, type ValidationFinding, type ValidationLevel, type ValidationResult, type WithProjectLockOptions, blockedTickets, currentPhase, deleteIssue, deleteTicket, discoverProjectRoot, errorEnvelope, escapeMarkdownInline, extractHandoverDate, fencedBlock, formatBlockedTickets, formatBlockerList, formatError, formatHandoverContent, formatHandoverList, formatInitResult, formatIssue, formatIssueList, formatNextTicketOutcome, formatPhaseList, formatPhaseTickets, formatStatus, formatTicket, formatTicketList, formatValidation, initProject, isBlockerCleared, listHandovers, loadProject, mergeValidation, nextIssueID, nextOrder, nextTicket, nextTicketID, partialEnvelope, phasesWithStatus, readHandover, runTransaction, runTransactionUnlocked, serializeJSON, sortKeysDeep, successEnvelope, ticketsUnblockedBy, umbrellaProgress, validateProject, withProjectLock, writeConfig, writeIssue, writeIssueUnlocked, writeRoadmap, writeRoadmapUnlocked, writeTicket, writeTicketUnlocked };
|
|
1377
|
+
export { type Blocker, BlockerSchema, CURRENT_SCHEMA_VERSION, type Config, ConfigSchema, DATE_REGEX, DateSchema, ERROR_CODES, type ErrorCode, type ErrorEnvelope, ExitCode, type ExitCodeValue, type Features, FeaturesSchema, INTEGRITY_WARNING_TYPES, ISSUE_ID_REGEX, ISSUE_SEVERITIES, ISSUE_STATUSES, type InitOptions, type InitResult, type Issue, IssueIdSchema, IssueSchema, type IssueSeverity, type IssueStatus, type LoadOptions, type LoadResult, type LoadWarning, type LoadWarningType, type NextTicketAllBlocked, type NextTicketAllComplete, type NextTicketEmpty, type NextTicketOutcome, type NextTicketResult, OUTPUT_FORMATS, type OutputFormat, type PartialEnvelope, type Phase, PhaseSchema, type PhaseStatus, type PhaseWithStatus, ProjectLoaderError, ProjectState, type RecapResult, type Roadmap, RoadmapSchema, type SnapshotDiff, type SnapshotV1, SnapshotV1Schema, type SuccessEnvelope, TICKET_ID_REGEX, TICKET_STATUSES, TICKET_TYPES, type Ticket, TicketIdSchema, TicketSchema, type TicketStatus, type TicketType, type UmbrellaProgress, type UnblockImpact, type ValidationFinding, type ValidationLevel, type ValidationResult, type WithProjectLockOptions, atomicWrite, blockedTickets, buildRecap, currentPhase, deleteIssue, deleteTicket, diffStates, discoverProjectRoot, errorEnvelope, escapeMarkdownInline, extractHandoverDate, fencedBlock, formatBlockedTickets, formatBlockerList, formatError, formatExport, formatHandoverContent, formatHandoverCreateResult, formatHandoverList, formatInitResult, formatIssue, formatIssueList, formatNextTicketOutcome, formatPhaseList, formatPhaseTickets, formatRecap, formatSnapshotResult, formatStatus, formatTicket, formatTicketList, formatValidation, guardPath, initProject, isBlockerCleared, listHandovers, loadLatestSnapshot, loadProject, mergeValidation, nextIssueID, nextOrder, nextTicket, nextTicketID, partialEnvelope, phasesWithStatus, readHandover, runTransaction, runTransactionUnlocked, saveSnapshot, serializeJSON, sortKeysDeep, successEnvelope, ticketsUnblockedBy, umbrellaProgress, validateProject, withProjectLock, writeConfig, writeIssue, writeIssueUnlocked, writeRoadmap, writeRoadmapUnlocked, writeTicket, writeTicketUnlocked };
|