@50arms/plugin-sdk 0.2.74 → 0.2.76
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/card-kit.d.ts +145 -111
- package/dist/cli.js +27 -9
- package/dist/publish.js +27 -9
- package/package.json +1 -1
package/dist/card-kit.d.ts
CHANGED
|
@@ -107,18 +107,17 @@ declare module "@danxbot/card-kit@1" {
|
|
|
107
107
|
id: string;
|
|
108
108
|
}
|
|
109
109
|
type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
|
|
110
|
-
type
|
|
110
|
+
type RuleStatus = BehaviorSignoffStatus | "unverified";
|
|
111
111
|
type BehaviorRuleKind = "journey" | "destination";
|
|
112
|
-
type
|
|
112
|
+
type BehaviorRowProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
|
|
113
113
|
|
|
114
|
-
interface
|
|
114
|
+
interface ReportedRule {
|
|
115
115
|
readonly ref: string;
|
|
116
116
|
readonly kind: BehaviorRuleKind;
|
|
117
117
|
readonly text: string;
|
|
118
|
-
readonly slot: string;
|
|
119
118
|
}
|
|
120
|
-
interface ReportedSignoff extends
|
|
121
|
-
readonly status: Exclude<
|
|
119
|
+
interface ReportedSignoff extends ReportedRule {
|
|
120
|
+
readonly status: Exclude<RuleStatus, "unverified">;
|
|
122
121
|
readonly signer: {
|
|
123
122
|
readonly kind: "person" | "agent";
|
|
124
123
|
readonly name: string;
|
|
@@ -128,7 +127,15 @@ declare module "@danxbot/card-kit@1" {
|
|
|
128
127
|
}
|
|
129
128
|
interface BehaviorSignoffReport {
|
|
130
129
|
readonly signoffs: readonly ReportedSignoff[];
|
|
131
|
-
readonly unverified: readonly
|
|
130
|
+
readonly unverified: readonly ReportedRule[];
|
|
131
|
+
}
|
|
132
|
+
interface BehaviorSignoffReportWire extends BehaviorSignoffReport {
|
|
133
|
+
readonly signoffs: readonly (ReportedSignoff & {
|
|
134
|
+
readonly slot: string;
|
|
135
|
+
})[];
|
|
136
|
+
readonly unverified: readonly (ReportedRule & {
|
|
137
|
+
readonly slot: string;
|
|
138
|
+
})[];
|
|
132
139
|
}
|
|
133
140
|
type EvidenceBlockType = "note" | "steps" | "command" | "table" | "code" | "diff" | "log" | "samples";
|
|
134
141
|
type EvidenceMadeBy = "human" | "agent";
|
|
@@ -392,6 +399,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
392
399
|
pro: string;
|
|
393
400
|
con: string;
|
|
394
401
|
recommended: boolean;
|
|
402
|
+
confidence: number | null;
|
|
395
403
|
}
|
|
396
404
|
type ReviewChoiceKind = "reject" | "accept" | "revert" | "restore" | "inconclusive" | "archive";
|
|
397
405
|
type EvidenceReviewReason = "threshold" | "rejected_before" | "refreshed";
|
|
@@ -404,7 +412,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
404
412
|
answers_decision: V2CopyDecisionRef | null;
|
|
405
413
|
tags: V2CopyCommentTag[];
|
|
406
414
|
sign_off: V2CopySignOff | null;
|
|
407
|
-
quoted_request: V2CopyProvenanceRecord | null;
|
|
408
415
|
team_agent: string | null;
|
|
409
416
|
author_email: string | null;
|
|
410
417
|
created_at: string;
|
|
@@ -520,7 +527,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
520
527
|
made_by_email: string | null;
|
|
521
528
|
made_by_name: string | null;
|
|
522
529
|
made_by_team_agent: string | null;
|
|
523
|
-
provenance: V2CopyProvenanceRecord | null;
|
|
524
530
|
author: string;
|
|
525
531
|
team_agent: string | null;
|
|
526
532
|
created_at: string;
|
|
@@ -566,7 +572,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
566
572
|
exhibits: V2CopyEvidenceExhibit[];
|
|
567
573
|
subjects: string[];
|
|
568
574
|
approvals: V2CopyEvidenceApproval[];
|
|
569
|
-
provenance: V2CopyProvenanceRecord | null;
|
|
570
575
|
}
|
|
571
576
|
interface V2CopyEvidenceKeyFigure {
|
|
572
577
|
value: string;
|
|
@@ -579,7 +584,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
579
584
|
version_no: number;
|
|
580
585
|
answer: string;
|
|
581
586
|
confidence: number;
|
|
582
|
-
provenance: V2CopyProvenanceRecord;
|
|
583
587
|
key_figures: V2CopyEvidenceKeyFigure[];
|
|
584
588
|
confidence_reason: string | null;
|
|
585
589
|
unverified: string[];
|
|
@@ -767,7 +771,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
767
771
|
decided_by: string;
|
|
768
772
|
decided_at: string;
|
|
769
773
|
retracted_at: string | null;
|
|
770
|
-
provenance: V2CopyProvenanceRecord | null;
|
|
771
774
|
}
|
|
772
775
|
interface V2CopyProvenanceParty {
|
|
773
776
|
kind: ProvenancePartyKind;
|
|
@@ -790,16 +793,42 @@ declare module "@danxbot/card-kit@1" {
|
|
|
790
793
|
added_by: V2CopyProvenanceParty;
|
|
791
794
|
added_at: string;
|
|
792
795
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
796
|
+
type V2CopyProvenanceLinkItem = {
|
|
797
|
+
kind: "problem_answer";
|
|
798
|
+
problem_index: number;
|
|
799
|
+
decision_index: number;
|
|
800
|
+
} | {
|
|
801
|
+
kind: "decision" | "evidence_hypothesis" | "evidence_verdict";
|
|
802
|
+
record_index: number;
|
|
803
|
+
version_index: number;
|
|
804
|
+
} | {
|
|
805
|
+
kind: "comment";
|
|
806
|
+
comment_index: number;
|
|
807
|
+
item_version: string | null;
|
|
808
|
+
} | {
|
|
809
|
+
kind: "card_justification";
|
|
810
|
+
item_version: string | null;
|
|
811
|
+
} | {
|
|
812
|
+
kind: "plan_record";
|
|
813
|
+
record_id: number;
|
|
814
|
+
item_version: string | null;
|
|
815
|
+
} | {
|
|
816
|
+
kind: "plan_section";
|
|
817
|
+
section_id: number;
|
|
818
|
+
item_version: string | null;
|
|
819
|
+
};
|
|
820
|
+
type V2CopyProvenanceLink = V2CopyProvenanceLinkItem & {
|
|
821
|
+
linked_by: V2CopyProvenanceParty;
|
|
822
|
+
linked_at: string;
|
|
823
|
+
link_no: number;
|
|
824
|
+
};
|
|
797
825
|
interface V2CopyProvenanceRecord {
|
|
798
826
|
reasoning: string | null;
|
|
799
827
|
confidence: number | null;
|
|
800
828
|
sources: V2CopyProvenanceSource[];
|
|
801
829
|
recorded_by: V2CopyProvenanceParty;
|
|
802
830
|
recorded_at: string;
|
|
831
|
+
links: V2CopyProvenanceLink[];
|
|
803
832
|
}
|
|
804
833
|
interface V2CopyProblemEvidenceRecord {
|
|
805
834
|
record_index: number | null;
|
|
@@ -840,7 +869,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
840
869
|
comments: V2CopyComment[];
|
|
841
870
|
agent_notes: V2CopyAgentNote[];
|
|
842
871
|
decision_records: V2CopyDecisionRecord[];
|
|
843
|
-
|
|
872
|
+
provenance_records: V2CopyProvenanceRecord[];
|
|
844
873
|
evidence_records: V2CopyEvidenceRecord[];
|
|
845
874
|
behavior_policies_pinned_at: string | null;
|
|
846
875
|
behavior_policies_pin_no: number | null;
|
|
@@ -871,87 +900,9 @@ declare module "@danxbot/card-kit@1" {
|
|
|
871
900
|
blobs: Record<string, string>;
|
|
872
901
|
}
|
|
873
902
|
|
|
874
|
-
interface HolderAgentPause {
|
|
875
|
-
reason: string;
|
|
876
|
-
since: string;
|
|
877
|
-
until: string | null;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
interface AgentIdentity {
|
|
881
|
-
id: number;
|
|
882
|
-
name: string;
|
|
883
|
-
avatar_url: string | null;
|
|
884
|
-
}
|
|
885
|
-
type AssignedAgentKind = "person" | "session" | "worker" | "label";
|
|
886
|
-
|
|
887
|
-
interface UsageTokenCounts {
|
|
888
|
-
input: number;
|
|
889
|
-
output: number;
|
|
890
|
-
cacheRead: number;
|
|
891
|
-
cacheWrite: number;
|
|
892
|
-
}
|
|
893
|
-
interface UsageSlice {
|
|
894
|
-
tokens: UsageTokenCounts;
|
|
895
|
-
costUsd: number;
|
|
896
|
-
}
|
|
897
|
-
interface UsageTotals extends UsageTokenCounts {
|
|
898
|
-
cacheWrite5m: number;
|
|
899
|
-
cacheWrite1h: number;
|
|
900
|
-
cacheWriteUnsplit: number;
|
|
901
|
-
}
|
|
902
|
-
interface UsageModelRow extends UsageSlice {
|
|
903
|
-
model: string | null;
|
|
904
|
-
}
|
|
905
|
-
type UsageKind = "work" | "operator-session" | `gate:${string}` | "triage" | "maintenance" | "chat" | "other";
|
|
906
|
-
interface UsageKindRow extends UsageSlice {
|
|
907
|
-
kind: UsageKind;
|
|
908
|
-
label: string;
|
|
909
|
-
}
|
|
910
|
-
type UsageSubagentTypeKey = "main" | "unknown" | "unattributed" | `agent:${string}`;
|
|
911
|
-
interface UsageSubagentTypeRow extends UsageSlice {
|
|
912
|
-
key: UsageSubagentTypeKey;
|
|
913
|
-
label: string;
|
|
914
|
-
sourceCount: number;
|
|
915
|
-
}
|
|
916
|
-
interface UsageTiming {
|
|
917
|
-
apiMs: number;
|
|
918
|
-
agentMs: number;
|
|
919
|
-
linesAdded: number;
|
|
920
|
-
linesRemoved: number;
|
|
921
|
-
}
|
|
922
|
-
interface UsageActivity {
|
|
923
|
-
activeMinutes: number;
|
|
924
|
-
agentMinutes: number;
|
|
925
|
-
tokens: number;
|
|
926
|
-
costUsd: number;
|
|
927
|
-
tokensPerMinute: number;
|
|
928
|
-
measuredSince: number;
|
|
929
|
-
}
|
|
930
|
-
interface UsageSummary {
|
|
931
|
-
totals: UsageTotals;
|
|
932
|
-
costUsd: number;
|
|
933
|
-
byModel: UsageModelRow[];
|
|
934
|
-
byKind: UsageKindRow[];
|
|
935
|
-
bySubagentType: UsageSubagentTypeRow[];
|
|
936
|
-
dispatchCount: number;
|
|
937
|
-
operatorAttributionSince: number | null;
|
|
938
|
-
timing: UsageTiming;
|
|
939
|
-
timingMeasuredSince: number | null;
|
|
940
|
-
activity: UsageActivity | null;
|
|
941
|
-
}
|
|
942
|
-
type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
|
|
943
|
-
interface UsageError {
|
|
944
|
-
error: {
|
|
945
|
-
code: UsageErrorCode;
|
|
946
|
-
message: string;
|
|
947
|
-
dispatchId: string;
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
type CardUsage = UsageSummary | UsageError | null;
|
|
951
|
-
|
|
952
903
|
interface BehaviorDecisionView {
|
|
953
904
|
readonly signoff_id: number;
|
|
954
|
-
readonly status: Exclude<
|
|
905
|
+
readonly status: Exclude<RuleStatus, "unverified">;
|
|
955
906
|
readonly note: string | null;
|
|
956
907
|
readonly confidence: number | null;
|
|
957
908
|
readonly review: "surfaced" | "auto_approved" | null;
|
|
@@ -963,10 +914,8 @@ declare module "@danxbot/card-kit@1" {
|
|
|
963
914
|
readonly pin_no: number;
|
|
964
915
|
readonly signed_at: string;
|
|
965
916
|
}
|
|
966
|
-
interface
|
|
967
|
-
readonly
|
|
968
|
-
readonly gate_on_card: boolean;
|
|
969
|
-
readonly status: SlotStatus;
|
|
917
|
+
interface BehaviorRuleDecisionView {
|
|
918
|
+
readonly status: RuleStatus;
|
|
970
919
|
readonly settled: boolean;
|
|
971
920
|
readonly signoff_id: number | null;
|
|
972
921
|
readonly note: string | null;
|
|
@@ -978,13 +927,13 @@ declare module "@danxbot/card-kit@1" {
|
|
|
978
927
|
readonly signed_at: string | null;
|
|
979
928
|
readonly problem: {
|
|
980
929
|
readonly ref: string;
|
|
981
|
-
readonly state:
|
|
930
|
+
readonly state: BehaviorRowProblemState;
|
|
982
931
|
readonly reviewed_by_name: string | null;
|
|
983
932
|
readonly reviewed_at: string | null;
|
|
984
933
|
} | null;
|
|
985
934
|
readonly earlier: BehaviorDecisionView[];
|
|
986
935
|
}
|
|
987
|
-
interface
|
|
936
|
+
interface BehaviorRuleFactsView {
|
|
988
937
|
readonly rule_id: number;
|
|
989
938
|
readonly ref: string;
|
|
990
939
|
readonly text: string;
|
|
@@ -992,9 +941,10 @@ declare module "@danxbot/card-kit@1" {
|
|
|
992
941
|
readonly requires_reasoning: boolean;
|
|
993
942
|
readonly confidence_threshold: number;
|
|
994
943
|
readonly kind: BehaviorRuleKind;
|
|
944
|
+
readonly expected_roles: string[];
|
|
995
945
|
readonly provenance: ProvenanceRecordV2;
|
|
996
|
-
readonly slots: BehaviorSlotView[];
|
|
997
946
|
}
|
|
947
|
+
type BehaviorRuleView = BehaviorRuleFactsView & BehaviorRuleDecisionView;
|
|
998
948
|
interface BehaviorPolicyView {
|
|
999
949
|
readonly ref: string;
|
|
1000
950
|
readonly name: string;
|
|
@@ -1009,7 +959,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1009
959
|
readonly behavior_policies_pinned_at: string | null;
|
|
1010
960
|
readonly behavior_policies_pin_no: number | null;
|
|
1011
961
|
readonly stale: boolean;
|
|
1012
|
-
readonly
|
|
962
|
+
readonly open_rule_count: number;
|
|
1013
963
|
readonly policies: BehaviorPolicyView[];
|
|
1014
964
|
}
|
|
1015
965
|
|
|
@@ -1024,9 +974,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1024
974
|
readonly rule_id: number;
|
|
1025
975
|
readonly rule_ref: string;
|
|
1026
976
|
readonly rule_text: string;
|
|
1027
|
-
readonly
|
|
1028
|
-
readonly gate_on_card: boolean;
|
|
1029
|
-
readonly state: BehaviorSlotProblemState;
|
|
977
|
+
readonly state: BehaviorRowProblemState;
|
|
1030
978
|
readonly decision: BehaviorDecisionView;
|
|
1031
979
|
readonly reviews: BehaviorRuleReviewView[];
|
|
1032
980
|
}
|
|
@@ -1049,6 +997,84 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1049
997
|
content: string;
|
|
1050
998
|
}
|
|
1051
999
|
|
|
1000
|
+
interface HolderAgentPause {
|
|
1001
|
+
reason: string;
|
|
1002
|
+
since: string;
|
|
1003
|
+
until: string | null;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
interface AgentIdentity {
|
|
1007
|
+
id: number;
|
|
1008
|
+
name: string;
|
|
1009
|
+
avatar_url: string | null;
|
|
1010
|
+
}
|
|
1011
|
+
type AssignedAgentKind = "person" | "session" | "worker" | "label";
|
|
1012
|
+
|
|
1013
|
+
interface UsageTokenCounts {
|
|
1014
|
+
input: number;
|
|
1015
|
+
output: number;
|
|
1016
|
+
cacheRead: number;
|
|
1017
|
+
cacheWrite: number;
|
|
1018
|
+
}
|
|
1019
|
+
interface UsageSlice {
|
|
1020
|
+
tokens: UsageTokenCounts;
|
|
1021
|
+
costUsd: number;
|
|
1022
|
+
}
|
|
1023
|
+
interface UsageTotals extends UsageTokenCounts {
|
|
1024
|
+
cacheWrite5m: number;
|
|
1025
|
+
cacheWrite1h: number;
|
|
1026
|
+
cacheWriteUnsplit: number;
|
|
1027
|
+
}
|
|
1028
|
+
interface UsageModelRow extends UsageSlice {
|
|
1029
|
+
model: string | null;
|
|
1030
|
+
}
|
|
1031
|
+
type UsageKind = "work" | "operator-session" | `gate:${string}` | "triage" | "maintenance" | "chat" | "other";
|
|
1032
|
+
interface UsageKindRow extends UsageSlice {
|
|
1033
|
+
kind: UsageKind;
|
|
1034
|
+
label: string;
|
|
1035
|
+
}
|
|
1036
|
+
type UsageSubagentTypeKey = "main" | "unknown" | "unattributed" | `agent:${string}`;
|
|
1037
|
+
interface UsageSubagentTypeRow extends UsageSlice {
|
|
1038
|
+
key: UsageSubagentTypeKey;
|
|
1039
|
+
label: string;
|
|
1040
|
+
sourceCount: number;
|
|
1041
|
+
}
|
|
1042
|
+
interface UsageTiming {
|
|
1043
|
+
apiMs: number;
|
|
1044
|
+
agentMs: number;
|
|
1045
|
+
linesAdded: number;
|
|
1046
|
+
linesRemoved: number;
|
|
1047
|
+
}
|
|
1048
|
+
interface UsageActivity {
|
|
1049
|
+
activeMinutes: number;
|
|
1050
|
+
agentMinutes: number;
|
|
1051
|
+
tokens: number;
|
|
1052
|
+
costUsd: number;
|
|
1053
|
+
tokensPerMinute: number;
|
|
1054
|
+
measuredSince: number;
|
|
1055
|
+
}
|
|
1056
|
+
interface UsageSummary {
|
|
1057
|
+
totals: UsageTotals;
|
|
1058
|
+
costUsd: number;
|
|
1059
|
+
byModel: UsageModelRow[];
|
|
1060
|
+
byKind: UsageKindRow[];
|
|
1061
|
+
bySubagentType: UsageSubagentTypeRow[];
|
|
1062
|
+
dispatchCount: number;
|
|
1063
|
+
operatorAttributionSince: number | null;
|
|
1064
|
+
timing: UsageTiming;
|
|
1065
|
+
timingMeasuredSince: number | null;
|
|
1066
|
+
activity: UsageActivity | null;
|
|
1067
|
+
}
|
|
1068
|
+
type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
|
|
1069
|
+
interface UsageError {
|
|
1070
|
+
error: {
|
|
1071
|
+
code: UsageErrorCode;
|
|
1072
|
+
message: string;
|
|
1073
|
+
dispatchId: string;
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
type CardUsage = UsageSummary | UsageError | null;
|
|
1077
|
+
|
|
1052
1078
|
type NotificationText = {
|
|
1053
1079
|
kind: "reason";
|
|
1054
1080
|
reason: StatusReason;
|
|
@@ -1460,7 +1486,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1460
1486
|
commits: string[];
|
|
1461
1487
|
tests: RetroTestViewV2[];
|
|
1462
1488
|
commit_url_base?: string | null;
|
|
1463
|
-
behavior_signoffs:
|
|
1489
|
+
behavior_signoffs: BehaviorSignoffReportWire;
|
|
1464
1490
|
}
|
|
1465
1491
|
interface AttachmentViewV2 {
|
|
1466
1492
|
id: number;
|
|
@@ -1627,6 +1653,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1627
1653
|
assigned_agent: null | string;
|
|
1628
1654
|
content_hash: string;
|
|
1629
1655
|
retro?: undefined | RetroViewV2;
|
|
1656
|
+
behavior_policies?: undefined | CardBehaviorPoliciesView;
|
|
1630
1657
|
stored_row?: undefined | IssueDisplayV2;
|
|
1631
1658
|
stored_checklists?: undefined | Array<ChecklistWithItemsV2>;
|
|
1632
1659
|
stored_attachments?: undefined | Array<IssueAttachmentV2>;
|
|
@@ -1669,7 +1696,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1669
1696
|
start_commit?: undefined | null | { at: string; sha: string | null; error: "no_repo" | "not_github_repo" | "no_token" | "github_refused" | "github_unreachable" | "unreadable_tip" | "unexpected" | null; error_detail: string | null; };
|
|
1670
1697
|
problem_total?: undefined | number;
|
|
1671
1698
|
evidence_record_total?: undefined | number;
|
|
1672
|
-
behavior_policies?: undefined | CardBehaviorPoliciesView;
|
|
1673
1699
|
behavior_signoffs?: undefined | CardBehaviorSignoffs;
|
|
1674
1700
|
decision_record_total?: undefined | number;
|
|
1675
1701
|
decision_record_page?: undefined | DecisionRecordPage;
|
|
@@ -1951,11 +1977,12 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1951
1977
|
conflict_on_ids: Array<string>;
|
|
1952
1978
|
board_id: BoardRefNum;
|
|
1953
1979
|
}>);
|
|
1954
|
-
plans?: undefined | Array<{
|
|
1980
|
+
plans?: undefined | (Array<{
|
|
1955
1981
|
id: PlanRefNum;
|
|
1956
1982
|
ref: string;
|
|
1957
1983
|
name: string;
|
|
1958
|
-
|
|
1984
|
+
status: "planning" | "awaiting-session" | "building" | "awaiting-sign-off" | "awaiting-docs" | "complete";
|
|
1985
|
+
}>);
|
|
1959
1986
|
mirrors?: undefined | (Array<{
|
|
1960
1987
|
target_type: "trello" | "slack" | "asana" | "linear";
|
|
1961
1988
|
target_url: string;
|
|
@@ -2167,6 +2194,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2167
2194
|
checked_by: null | string;
|
|
2168
2195
|
steps: Array<SolutionStepViewV2>;
|
|
2169
2196
|
}>;
|
|
2197
|
+
confidence: null | number;
|
|
2170
2198
|
title: string;
|
|
2171
2199
|
id: number;
|
|
2172
2200
|
content_hash: string;
|
|
@@ -2494,6 +2522,12 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2494
2522
|
sources: ProvenanceSourceV2[];
|
|
2495
2523
|
recorded_by: AuthorV2;
|
|
2496
2524
|
recorded_at: string;
|
|
2525
|
+
maker: ProvenanceMakerV2;
|
|
2526
|
+
}
|
|
2527
|
+
interface ProvenanceMakerV2 {
|
|
2528
|
+
kind: "person" | "agent";
|
|
2529
|
+
name: string;
|
|
2530
|
+
quotes_person: boolean;
|
|
2497
2531
|
}
|
|
2498
2532
|
interface ProvenanceSourceV2 {
|
|
2499
2533
|
kind: ProvenanceSourceKind;
|
package/dist/cli.js
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
|
|
6
6
|
// src/publish/archive.ts
|
|
7
|
-
import { execFile } from "node:child_process";
|
|
8
7
|
import { lstat, readdir, readFile } from "node:fs/promises";
|
|
9
8
|
import { join as join2, resolve } from "node:path";
|
|
10
|
-
import { promisify } from "node:util";
|
|
11
9
|
|
|
12
10
|
// node_modules/@isaacs/fs-minipass/dist/esm/index.js
|
|
13
11
|
import EE from "events";
|
|
@@ -5796,8 +5794,31 @@ var mtimeFilter = (opt) => {
|
|
|
5796
5794
|
((opt.mtimeCache?.get(path8) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
5797
5795
|
};
|
|
5798
5796
|
|
|
5797
|
+
// ../../src/util/hidden-process.mjs
|
|
5798
|
+
import * as cp from "node:child_process";
|
|
5799
|
+
import { promisify } from "node:util";
|
|
5800
|
+
function withWindowsHidden(args, optionsAfterArgs) {
|
|
5801
|
+
const out = [...args];
|
|
5802
|
+
let at = 1;
|
|
5803
|
+
if (optionsAfterArgs && (Array.isArray(out[1]) || (out[1] === void 0 || out[1] === null) && out.length > 2 && typeof out[2] !== "function")) {
|
|
5804
|
+
at = 2;
|
|
5805
|
+
}
|
|
5806
|
+
const given = out[at];
|
|
5807
|
+
if (given === void 0 || given === null) out[at] = { windowsHide: true };
|
|
5808
|
+
else if (typeof given === "function")
|
|
5809
|
+
out.splice(at, 0, { windowsHide: true });
|
|
5810
|
+
else out[at] = { ...given, windowsHide: true };
|
|
5811
|
+
return out;
|
|
5812
|
+
}
|
|
5813
|
+
var spawn2 = (...args) => cp.spawn(...withWindowsHidden(args, true));
|
|
5814
|
+
var execFileAsync = (...args) => promisify(cp.execFile)(...withWindowsHidden(args, true));
|
|
5815
|
+
var execAsync = (...args) => promisify(cp.exec)(...withWindowsHidden(args, false));
|
|
5816
|
+
var execFile2 = (...args) => cp.execFile(...withWindowsHidden(args, true));
|
|
5817
|
+
var exec2 = (...args) => cp.exec(...withWindowsHidden(args, false));
|
|
5818
|
+
execFile2[promisify.custom] = execFileAsync;
|
|
5819
|
+
exec2[promisify.custom] = execAsync;
|
|
5820
|
+
|
|
5799
5821
|
// src/publish/archive.ts
|
|
5800
|
-
var execFileAsync = promisify(execFile);
|
|
5801
5822
|
var EXCLUDED_SEGMENTS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
5802
5823
|
var EXCLUDED_TOP_LEVEL = /* @__PURE__ */ new Set(["dist"]);
|
|
5803
5824
|
var LOCKFILE_NAMES = [
|
|
@@ -5863,8 +5884,7 @@ function gitFailure(err) {
|
|
|
5863
5884
|
async function gitFiles(dir) {
|
|
5864
5885
|
try {
|
|
5865
5886
|
await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
5866
|
-
cwd: dir
|
|
5867
|
-
windowsHide: true
|
|
5887
|
+
cwd: dir
|
|
5868
5888
|
});
|
|
5869
5889
|
} catch (err) {
|
|
5870
5890
|
if (err.code === 128 && /not a git repository/i.test(gitFailure(err)))
|
|
@@ -5878,7 +5898,7 @@ async function gitFiles(dir) {
|
|
|
5878
5898
|
({ stdout } = await execFileAsync(
|
|
5879
5899
|
"git",
|
|
5880
5900
|
["ls-files", "-z", "--cached", "--others", "--exclude-standard"],
|
|
5881
|
-
{ cwd: dir,
|
|
5901
|
+
{ cwd: dir, maxBuffer: 64 * 1024 * 1024 }
|
|
5882
5902
|
));
|
|
5883
5903
|
} catch (err) {
|
|
5884
5904
|
throw new Error(
|
|
@@ -5920,7 +5940,6 @@ async function archiveSource(projectDir) {
|
|
|
5920
5940
|
}
|
|
5921
5941
|
|
|
5922
5942
|
// src/publish/build.ts
|
|
5923
|
-
import { spawn } from "node:child_process";
|
|
5924
5943
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
5925
5944
|
import { join as join3, resolve as resolve2 } from "node:path";
|
|
5926
5945
|
|
|
@@ -5965,9 +5984,8 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
|
|
|
5965
5984
|
function runProjectBuild(projectDir) {
|
|
5966
5985
|
return new Promise((resolvePromise, reject) => {
|
|
5967
5986
|
let output = "";
|
|
5968
|
-
const child =
|
|
5987
|
+
const child = spawn2("npm", ["run", "build"], {
|
|
5969
5988
|
cwd: projectDir,
|
|
5970
|
-
windowsHide: true,
|
|
5971
5989
|
shell: process.platform === "win32",
|
|
5972
5990
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5973
5991
|
});
|
package/dist/publish.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// src/publish/archive.ts
|
|
2
|
-
import { execFile } from "node:child_process";
|
|
3
2
|
import { lstat, readdir, readFile } from "node:fs/promises";
|
|
4
3
|
import { join as join2, resolve } from "node:path";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
4
|
|
|
7
5
|
// node_modules/@isaacs/fs-minipass/dist/esm/index.js
|
|
8
6
|
import EE from "events";
|
|
@@ -5791,8 +5789,31 @@ var mtimeFilter = (opt) => {
|
|
|
5791
5789
|
((opt.mtimeCache?.get(path8) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
5792
5790
|
};
|
|
5793
5791
|
|
|
5792
|
+
// ../../src/util/hidden-process.mjs
|
|
5793
|
+
import * as cp from "node:child_process";
|
|
5794
|
+
import { promisify } from "node:util";
|
|
5795
|
+
function withWindowsHidden(args, optionsAfterArgs) {
|
|
5796
|
+
const out = [...args];
|
|
5797
|
+
let at = 1;
|
|
5798
|
+
if (optionsAfterArgs && (Array.isArray(out[1]) || (out[1] === void 0 || out[1] === null) && out.length > 2 && typeof out[2] !== "function")) {
|
|
5799
|
+
at = 2;
|
|
5800
|
+
}
|
|
5801
|
+
const given = out[at];
|
|
5802
|
+
if (given === void 0 || given === null) out[at] = { windowsHide: true };
|
|
5803
|
+
else if (typeof given === "function")
|
|
5804
|
+
out.splice(at, 0, { windowsHide: true });
|
|
5805
|
+
else out[at] = { ...given, windowsHide: true };
|
|
5806
|
+
return out;
|
|
5807
|
+
}
|
|
5808
|
+
var spawn2 = (...args) => cp.spawn(...withWindowsHidden(args, true));
|
|
5809
|
+
var execFileAsync = (...args) => promisify(cp.execFile)(...withWindowsHidden(args, true));
|
|
5810
|
+
var execAsync = (...args) => promisify(cp.exec)(...withWindowsHidden(args, false));
|
|
5811
|
+
var execFile2 = (...args) => cp.execFile(...withWindowsHidden(args, true));
|
|
5812
|
+
var exec2 = (...args) => cp.exec(...withWindowsHidden(args, false));
|
|
5813
|
+
execFile2[promisify.custom] = execFileAsync;
|
|
5814
|
+
exec2[promisify.custom] = execAsync;
|
|
5815
|
+
|
|
5794
5816
|
// src/publish/archive.ts
|
|
5795
|
-
var execFileAsync = promisify(execFile);
|
|
5796
5817
|
var EXCLUDED_SEGMENTS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
5797
5818
|
var EXCLUDED_TOP_LEVEL = /* @__PURE__ */ new Set(["dist"]);
|
|
5798
5819
|
var LOCKFILE_NAMES = [
|
|
@@ -5858,8 +5879,7 @@ function gitFailure(err) {
|
|
|
5858
5879
|
async function gitFiles(dir) {
|
|
5859
5880
|
try {
|
|
5860
5881
|
await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
5861
|
-
cwd: dir
|
|
5862
|
-
windowsHide: true
|
|
5882
|
+
cwd: dir
|
|
5863
5883
|
});
|
|
5864
5884
|
} catch (err) {
|
|
5865
5885
|
if (err.code === 128 && /not a git repository/i.test(gitFailure(err)))
|
|
@@ -5873,7 +5893,7 @@ async function gitFiles(dir) {
|
|
|
5873
5893
|
({ stdout } = await execFileAsync(
|
|
5874
5894
|
"git",
|
|
5875
5895
|
["ls-files", "-z", "--cached", "--others", "--exclude-standard"],
|
|
5876
|
-
{ cwd: dir,
|
|
5896
|
+
{ cwd: dir, maxBuffer: 64 * 1024 * 1024 }
|
|
5877
5897
|
));
|
|
5878
5898
|
} catch (err) {
|
|
5879
5899
|
throw new Error(
|
|
@@ -5915,7 +5935,6 @@ async function archiveSource(projectDir) {
|
|
|
5915
5935
|
}
|
|
5916
5936
|
|
|
5917
5937
|
// src/publish/build.ts
|
|
5918
|
-
import { spawn } from "node:child_process";
|
|
5919
5938
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
5920
5939
|
import { join as join3, resolve as resolve2 } from "node:path";
|
|
5921
5940
|
|
|
@@ -5960,9 +5979,8 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
|
|
|
5960
5979
|
function runProjectBuild(projectDir) {
|
|
5961
5980
|
return new Promise((resolvePromise, reject) => {
|
|
5962
5981
|
let output = "";
|
|
5963
|
-
const child =
|
|
5982
|
+
const child = spawn2("npm", ["run", "build"], {
|
|
5964
5983
|
cwd: projectDir,
|
|
5965
|
-
windowsHide: true,
|
|
5966
5984
|
shell: process.platform === "win32",
|
|
5967
5985
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5968
5986
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50arms/plugin-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.76",
|
|
4
4
|
"description": "SDK for building 50 Arms plugins (DX-5170): the card kit's type declarations, the Widget declaration kit, a Vite preset that builds a plugin against the app's shared runtime and writes its manifest, and the danx-plugin CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|