@astrosheep/keiyaku 4.6.4 → 4.6.6
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/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +43 -8
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +7 -8
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +3 -3
- package/build/src/akuma/akuma-observe.d.ts +18 -15
- package/build/src/akuma/akuma-observe.js +75 -16
- package/build/src/akuma/akuma-wait.d.ts +4 -3
- package/build/src/akuma/akuma-wait.js +75 -53
- package/build/src/akuma/akuma.d.ts +6 -4
- package/build/src/akuma/akuma.js +4 -0
- package/build/src/akuma/call-initial-tell.d.ts +2 -2
- package/build/src/akuma/call-initial-tell.js +1 -1
- package/build/src/akuma/call-request.d.ts +2 -2
- package/build/src/akuma/heart/index.d.ts +7 -2
- package/build/src/akuma/heart/index.js +50 -5
- package/build/src/akuma/heart/tells.d.ts +33 -2
- package/build/src/akuma/heart/tells.js +24 -18
- package/build/src/akuma/heart/timeline.d.ts +23 -1
- package/build/src/akuma/heart/timeline.js +28 -21
- package/build/src/akuma/projection.d.ts +10 -10
- package/build/src/akuma/providers/pi/index.js +72 -39
- package/build/src/akuma/selection-observation.d.ts +20 -20
- package/build/src/akuma-body.js +1 -0
- package/build/src/alias/index.d.ts +0 -1
- package/build/src/alias/index.js +0 -4
- package/build/src/body/amend.d.ts +0 -4
- package/build/src/body/amend.js +0 -3
- package/build/src/body/region.d.ts +0 -1
- package/build/src/body/region.js +0 -3
- package/build/src/body/verification.d.ts +0 -1
- package/build/src/cli/commands/akuma-grammar.js +23 -66
- package/build/src/cli/commands/akuma.js +17 -30
- package/build/src/cli/commands/contract-grammar.d.ts +14 -1
- package/build/src/cli/commands/contract-grammar.js +54 -21
- package/build/src/cli/commands/contract-help.d.ts +9 -8
- package/build/src/cli/commands/contract-help.js +14 -7
- package/build/src/cli/commands/contract.js +57 -117
- package/build/src/cli/commands/install.d.ts +5 -5
- package/build/src/cli/commands/install.js +1 -4
- package/build/src/cli/commands/task-grammar.js +10 -66
- package/build/src/cli/commands/task.d.ts +0 -1
- package/build/src/cli/commands/task.js +34 -53
- package/build/src/cli/coordinates.d.ts +1 -2
- package/build/src/cli/coordinates.js +1 -4
- package/build/src/cli/parse.d.ts +2 -3
- package/build/src/cli/parse.js +24 -66
- package/build/src/cli/render/akuma.d.ts +3 -16
- package/build/src/cli/render/akuma.js +1 -13
- package/build/src/cli/render/audit.js +1 -1
- package/build/src/cli/render/contract.js +34 -32
- package/build/src/cli/render/kanshi-akuma.d.ts +8 -2
- package/build/src/cli/render/kanshi-akuma.js +14 -7
- package/build/src/cli/render/kanshi.d.ts +3 -1
- package/build/src/cli/render/kanshi.js +44 -32
- package/build/src/cli/render/receipt.js +6 -1
- package/build/src/cli/render/task.d.ts +1 -1
- package/build/src/cli/render/task.js +3 -27
- package/build/src/cli/render/terminal.d.ts +6 -2
- package/build/src/cli/render/terminal.js +8 -2
- package/build/src/cli/runtime.js +3 -16
- package/build/src/cli/scan.d.ts +26 -0
- package/build/src/cli/scan.js +82 -0
- package/build/src/cli/streams.d.ts +5 -0
- package/build/src/cli/streams.js +11 -0
- package/build/src/contract-worktree.js +38 -21
- package/build/src/core/facts/codec.d.ts +1 -2
- package/build/src/core/facts/codec.js +5 -11
- package/build/src/core/facts/types.d.ts +16 -2
- package/build/src/core/facts/types.js +15 -0
- package/build/src/core/verbs/abandon.js +3 -9
- package/build/src/core/verbs/amend.js +2 -9
- package/build/src/core/verbs/arc.js +6 -13
- package/build/src/core/verbs/attestation.js +2 -9
- package/build/src/core/verbs/bind.js +2 -9
- package/build/src/core/verbs/deliver.js +2 -9
- package/build/src/core/verbs/placement.d.ts +1 -1
- package/build/src/core/verbs/placement.js +2 -9
- package/build/src/core/verbs/reintegrate.d.ts +1 -1
- package/build/src/core/verbs/reintegrate.js +2 -9
- package/build/src/dispatch/index.d.ts +2 -2
- package/build/src/dispatch/index.js +33 -11
- package/build/src/git/hooks.d.ts +2 -4
- package/build/src/git/hooks.js +0 -12
- package/build/src/git/integration.d.ts +5 -3
- package/build/src/git/integration.js +36 -25
- package/build/src/git/nuke.js +4 -4
- package/build/src/git/observe.d.ts +4 -4
- package/build/src/git/observe.js +5 -5
- package/build/src/git/process.d.ts +1 -4
- package/build/src/git/process.js +1 -11
- package/build/src/git/read-observation.js +1 -1
- package/build/src/git/reconcile.d.ts +1 -1
- package/build/src/git/reconcile.js +15 -13
- package/build/src/git/repository.d.ts +2 -6
- package/build/src/git/repository.js +18 -31
- package/build/src/git/scratch.d.ts +6 -6
- package/build/src/git/scratch.js +110 -46
- package/build/src/git/target-placement.d.ts +5 -5
- package/build/src/git/target-placement.js +18 -33
- package/build/src/git/tender.d.ts +6 -2
- package/build/src/git/tender.js +19 -12
- package/build/src/git/terminal-reconcile.js +24 -13
- package/build/src/git/terminal-seal.d.ts +2 -5
- package/build/src/git/terminal-seal.js +5 -3
- package/build/src/git/workspace.d.ts +17 -13
- package/build/src/git/workspace.js +58 -41
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/index.js +1 -1
- package/build/src/kanshi/read.d.ts +8 -1
- package/build/src/kanshi/read.js +72 -7
- package/build/src/kanshi/report.d.ts +12 -0
- package/build/src/library/akuma-creation.d.ts +4 -4
- package/build/src/library/bind.d.ts +1 -63
- package/build/src/library/bind.js +3 -9
- package/build/src/library/contract-creation.js +2 -30
- package/build/src/library/contract-execution.d.ts +0 -1
- package/build/src/library/contract-execution.js +9 -34
- package/build/src/library/contract-operations.d.ts +5 -1
- package/build/src/library/contract-operations.js +7 -3
- package/build/src/library/contract-types.d.ts +1 -1
- package/build/src/library/delivery.d.ts +91 -93
- package/build/src/library/delivery.js +2 -1
- package/build/src/library/input.d.ts +0 -2
- package/build/src/library/input.js +0 -4
- package/build/src/library/invocation.d.ts +0 -1
- package/build/src/library/invocation.js +3 -25
- package/build/src/library/outcome.d.ts +651 -602
- package/build/src/library/outcome.js +4 -4
- package/build/src/library/reconcile.d.ts +6 -0
- package/build/src/library/reconcile.js +31 -1
- package/build/src/library/repo.d.ts +0 -1
- package/build/src/library/selection.d.ts +1 -10
- package/build/src/library/selection.js +14 -15
- package/build/src/protocol/abandon.d.ts +1 -1
- package/build/src/protocol/abandon.js +3 -10
- package/build/src/protocol/amend.js +2 -5
- package/build/src/protocol/arc.d.ts +1 -1
- package/build/src/protocol/arc.js +2 -9
- package/build/src/protocol/attempt.d.ts +3 -20
- package/build/src/protocol/attempt.js +6 -5
- package/build/src/protocol/audit.d.ts +1 -0
- package/build/src/protocol/audit.js +10 -11
- package/build/src/protocol/completion.d.ts +129 -55
- package/build/src/protocol/completion.js +62 -73
- package/build/src/protocol/deliver.d.ts +7 -5
- package/build/src/protocol/deliver.js +74 -44
- package/build/src/protocol/execution-observation.d.ts +2 -4
- package/build/src/protocol/execution-observation.js +3 -7
- package/build/src/protocol/intent.d.ts +1 -1
- package/build/src/protocol/intent.js +1 -0
- package/build/src/protocol/operations.d.ts +24 -12
- package/build/src/protocol/operations.js +36 -15
- package/build/src/protocol/placement.d.ts +2 -1
- package/build/src/protocol/placement.js +21 -5
- package/build/src/protocol/progress.d.ts +1 -1
- package/build/src/protocol/read/status.js +58 -41
- package/build/src/protocol/reintegrate.d.ts +1 -1
- package/build/src/protocol/reintegrate.js +10 -19
- package/build/src/protocol/review.d.ts +3 -28
- package/build/src/protocol/review.js +10 -37
- package/build/src/protocol/run.d.ts +19 -7
- package/build/src/protocol/run.js +19 -9
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/holder.d.ts +2 -4
- package/build/src/settlement/holder.js +3 -6
- package/build/src/task/board.d.ts +6 -0
- package/build/src/task/board.js +30 -1
- package/build/src/task/catalog.js +1 -4
- package/build/src/task/compose.d.ts +0 -1
- package/build/src/task/compose.js +0 -1
- package/build/src/task/context.d.ts +0 -1
- package/build/src/task/context.js +0 -3
- package/build/src/task/created-observation.d.ts +5 -1
- package/build/src/task/created-observation.js +12 -5
- package/build/src/task/index.d.ts +1 -1
- package/build/src/task/index.js +7 -6
- package/build/src/task/input.d.ts +0 -6
- package/build/src/task/input.js +2 -14
- package/build/src/task/mutation.d.ts +3 -4
- package/build/src/task/mutation.js +11 -39
- package/build/src/task/operations.d.ts +2 -7
- package/build/src/task/operations.js +37 -49
- package/build/src/task/query.d.ts +0 -1
- package/build/src/task/query.js +1 -4
- package/build/src/task/store.d.ts +0 -2
- package/build/src/task/store.js +27 -11
- package/build/src/verification/declaration.js +3 -2
- package/build/src/verification/execution.d.ts +3 -2
- package/build/src/verification/execution.js +10 -6
- package/build/src/workspace-place.d.ts +0 -1
- package/build/src/workspace-place.js +0 -11
- package/package.json +7 -3
|
@@ -125,8 +125,8 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
125
125
|
}>;
|
|
126
126
|
turnSequence: z.ZodNumber;
|
|
127
127
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
128
|
-
required: "required";
|
|
129
128
|
unavailable: "unavailable";
|
|
129
|
+
required: "required";
|
|
130
130
|
}>>;
|
|
131
131
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
132
132
|
turnSequence: number;
|
|
@@ -137,7 +137,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
137
137
|
deliveredAt: string;
|
|
138
138
|
route: "live" | "launch";
|
|
139
139
|
turnSequence: number;
|
|
140
|
-
receipt?: "
|
|
140
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
141
141
|
}>>>>;
|
|
142
142
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
143
143
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -332,8 +332,8 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
332
332
|
}>;
|
|
333
333
|
turnSequence: z.ZodNumber;
|
|
334
334
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
335
|
-
required: "required";
|
|
336
335
|
unavailable: "unavailable";
|
|
336
|
+
required: "required";
|
|
337
337
|
}>>;
|
|
338
338
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
339
339
|
turnSequence: number;
|
|
@@ -344,7 +344,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
344
344
|
deliveredAt: string;
|
|
345
345
|
route: "live" | "launch";
|
|
346
346
|
turnSequence: number;
|
|
347
|
-
receipt?: "
|
|
347
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
348
348
|
}>>>>;
|
|
349
349
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
350
350
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -589,8 +589,8 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
589
589
|
}>;
|
|
590
590
|
turnSequence: z.ZodNumber;
|
|
591
591
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
592
|
-
required: "required";
|
|
593
592
|
unavailable: "unavailable";
|
|
593
|
+
required: "required";
|
|
594
594
|
}>>;
|
|
595
595
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
596
596
|
turnSequence: number;
|
|
@@ -601,7 +601,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
601
601
|
deliveredAt: string;
|
|
602
602
|
route: "live" | "launch";
|
|
603
603
|
turnSequence: number;
|
|
604
|
-
receipt?: "
|
|
604
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
605
605
|
}>>>>;
|
|
606
606
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
607
607
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -796,8 +796,8 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
796
796
|
}>;
|
|
797
797
|
turnSequence: z.ZodNumber;
|
|
798
798
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
799
|
-
required: "required";
|
|
800
799
|
unavailable: "unavailable";
|
|
800
|
+
required: "required";
|
|
801
801
|
}>>;
|
|
802
802
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
803
803
|
turnSequence: number;
|
|
@@ -808,7 +808,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
808
808
|
deliveredAt: string;
|
|
809
809
|
route: "live" | "launch";
|
|
810
810
|
turnSequence: number;
|
|
811
|
-
receipt?: "
|
|
811
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
812
812
|
}>>>>;
|
|
813
813
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
814
814
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -958,8 +958,8 @@ declare const akumaTellResultSchema: z.ZodObject<{
|
|
|
958
958
|
}>;
|
|
959
959
|
turnSequence: z.ZodNumber;
|
|
960
960
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
961
|
-
required: "required";
|
|
962
961
|
unavailable: "unavailable";
|
|
962
|
+
required: "required";
|
|
963
963
|
}>>;
|
|
964
964
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
965
965
|
turnSequence: number;
|
|
@@ -970,7 +970,7 @@ declare const akumaTellResultSchema: z.ZodObject<{
|
|
|
970
970
|
deliveredAt: string;
|
|
971
971
|
route: "live" | "launch";
|
|
972
972
|
turnSequence: number;
|
|
973
|
-
receipt?: "
|
|
973
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
974
974
|
}>>>>;
|
|
975
975
|
}, z.core.$strict>;
|
|
976
976
|
wake: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1062,8 +1062,8 @@ declare const akumaAskResultSchema: z.ZodObject<{
|
|
|
1062
1062
|
}>;
|
|
1063
1063
|
turnSequence: z.ZodNumber;
|
|
1064
1064
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
1065
|
-
required: "required";
|
|
1066
1065
|
unavailable: "unavailable";
|
|
1066
|
+
required: "required";
|
|
1067
1067
|
}>>;
|
|
1068
1068
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
1069
1069
|
turnSequence: number;
|
|
@@ -1074,7 +1074,7 @@ declare const akumaAskResultSchema: z.ZodObject<{
|
|
|
1074
1074
|
deliveredAt: string;
|
|
1075
1075
|
route: "live" | "launch";
|
|
1076
1076
|
turnSequence: number;
|
|
1077
|
-
receipt?: "
|
|
1077
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
1078
1078
|
}>>>>;
|
|
1079
1079
|
}, z.core.$strict>;
|
|
1080
1080
|
wake: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1301,8 +1301,8 @@ export declare const selectionResultSchemas: {
|
|
|
1301
1301
|
}>;
|
|
1302
1302
|
turnSequence: z.ZodNumber;
|
|
1303
1303
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
1304
|
-
required: "required";
|
|
1305
1304
|
unavailable: "unavailable";
|
|
1305
|
+
required: "required";
|
|
1306
1306
|
}>>;
|
|
1307
1307
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
1308
1308
|
turnSequence: number;
|
|
@@ -1313,7 +1313,7 @@ export declare const selectionResultSchemas: {
|
|
|
1313
1313
|
deliveredAt: string;
|
|
1314
1314
|
route: "live" | "launch";
|
|
1315
1315
|
turnSequence: number;
|
|
1316
|
-
receipt?: "
|
|
1316
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
1317
1317
|
}>>>>;
|
|
1318
1318
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
1319
1319
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -1508,8 +1508,8 @@ export declare const selectionResultSchemas: {
|
|
|
1508
1508
|
}>;
|
|
1509
1509
|
turnSequence: z.ZodNumber;
|
|
1510
1510
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
1511
|
-
required: "required";
|
|
1512
1511
|
unavailable: "unavailable";
|
|
1512
|
+
required: "required";
|
|
1513
1513
|
}>>;
|
|
1514
1514
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
1515
1515
|
turnSequence: number;
|
|
@@ -1520,7 +1520,7 @@ export declare const selectionResultSchemas: {
|
|
|
1520
1520
|
deliveredAt: string;
|
|
1521
1521
|
route: "live" | "launch";
|
|
1522
1522
|
turnSequence: number;
|
|
1523
|
-
receipt?: "
|
|
1523
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
1524
1524
|
}>>>>;
|
|
1525
1525
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
1526
1526
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -1657,8 +1657,8 @@ export declare const selectionResultSchemas: {
|
|
|
1657
1657
|
}>;
|
|
1658
1658
|
turnSequence: z.ZodNumber;
|
|
1659
1659
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
1660
|
-
required: "required";
|
|
1661
1660
|
unavailable: "unavailable";
|
|
1661
|
+
required: "required";
|
|
1662
1662
|
}>>;
|
|
1663
1663
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
1664
1664
|
turnSequence: number;
|
|
@@ -1669,7 +1669,7 @@ export declare const selectionResultSchemas: {
|
|
|
1669
1669
|
deliveredAt: string;
|
|
1670
1670
|
route: "live" | "launch";
|
|
1671
1671
|
turnSequence: number;
|
|
1672
|
-
receipt?: "
|
|
1672
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
1673
1673
|
}>>>>;
|
|
1674
1674
|
}, z.core.$strict>;
|
|
1675
1675
|
wake: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1746,8 +1746,8 @@ export declare const selectionResultSchemas: {
|
|
|
1746
1746
|
}>;
|
|
1747
1747
|
turnSequence: z.ZodNumber;
|
|
1748
1748
|
receipt: z.ZodOptional<z.ZodEnum<{
|
|
1749
|
-
required: "required";
|
|
1750
1749
|
unavailable: "unavailable";
|
|
1750
|
+
required: "required";
|
|
1751
1751
|
}>>;
|
|
1752
1752
|
}, z.core.$strict>, z.ZodTransform<Readonly<{
|
|
1753
1753
|
turnSequence: number;
|
|
@@ -1758,7 +1758,7 @@ export declare const selectionResultSchemas: {
|
|
|
1758
1758
|
deliveredAt: string;
|
|
1759
1759
|
route: "live" | "launch";
|
|
1760
1760
|
turnSequence: number;
|
|
1761
|
-
receipt?: "
|
|
1761
|
+
receipt?: "unavailable" | "required" | undefined;
|
|
1762
1762
|
}>>>>;
|
|
1763
1763
|
}, z.core.$strict>;
|
|
1764
1764
|
wake: z.ZodUnion<readonly [z.ZodObject<{
|
package/build/src/akuma-body.js
CHANGED
|
@@ -62,6 +62,7 @@ function contractUpstream(processConfiguration) {
|
|
|
62
62
|
return await contractChannel(repo, input.contractId, input.requester, configuration).review({
|
|
63
63
|
verdict: input.verdict,
|
|
64
64
|
...(input.summary === undefined ? {} : { summary: input.summary }),
|
|
65
|
+
...(input.actor === undefined ? {} : { actor: input.actor }),
|
|
65
66
|
signal: input.signal,
|
|
66
67
|
}, input.observe === undefined ? undefined : { observe: input.observe });
|
|
67
68
|
},
|
|
@@ -11,7 +11,6 @@ export type AliasMove = Readonly<{
|
|
|
11
11
|
}>;
|
|
12
12
|
export declare function nukeAliases(world: WorldRoot): Promise<void>;
|
|
13
13
|
export declare function readAliases(world: WorldRoot): Promise<readonly AliasBinding[]>;
|
|
14
|
-
export declare function resolveAlias(world: WorldRoot, value: AkumaAlias): Promise<AkuId | null>;
|
|
15
14
|
export declare function moveAlias(input: Readonly<{
|
|
16
15
|
world: WorldRoot;
|
|
17
16
|
alias: AkumaAlias;
|
package/build/src/alias/index.js
CHANGED
|
@@ -113,10 +113,6 @@ export async function nukeAliases(world) {
|
|
|
113
113
|
export async function readAliases(world) {
|
|
114
114
|
return await read(paths(world).authority);
|
|
115
115
|
}
|
|
116
|
-
export async function resolveAlias(world, value) {
|
|
117
|
-
const alias = parseReadableAkumaAlias(value);
|
|
118
|
-
return (await readAliases(world)).find((binding) => binding.alias === alias)?.akuId ?? null;
|
|
119
|
-
}
|
|
120
116
|
export async function moveAlias(input) {
|
|
121
117
|
const alias = parseAkumaAlias(input.alias);
|
|
122
118
|
const akuId = parseAkuId(input.akuId).id;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { DecodedContractDocument } from "./types.js";
|
|
2
|
-
export declare function applyAmendDocument(source: string, current: DecodedContractDocument): Readonly<{
|
|
3
|
-
document: string;
|
|
4
|
-
changedSections: ReadonlySet<string>;
|
|
5
|
-
}>;
|
|
6
2
|
/** Caller syntax is decoded before any repository observation; current-dependent application stays pure. */
|
|
7
3
|
export declare function prepareAmendDocument(source: string): (current: DecodedContractDocument) => Readonly<{
|
|
8
4
|
document: string;
|
package/build/src/body/amend.js
CHANGED
|
@@ -239,9 +239,6 @@ function apply(document, operations, current) {
|
|
|
239
239
|
}
|
|
240
240
|
return { body: completeBody(body), changed };
|
|
241
241
|
}
|
|
242
|
-
export function applyAmendDocument(source, current) {
|
|
243
|
-
return prepareAmendDocument(source)(current);
|
|
244
|
-
}
|
|
245
242
|
/** Caller syntax is decoded before any repository observation; current-dependent application stays pure. */
|
|
246
243
|
export function prepareAmendDocument(source) {
|
|
247
244
|
const document = parseToAST(source);
|
|
@@ -17,4 +17,3 @@ export declare function decodeRegionOrRefusal(document: DocumentNode, section: S
|
|
|
17
17
|
export type RegionRelation = "same" | "mine-within-theirs" | "theirs-within-mine" | "intersect";
|
|
18
18
|
export type RegionOverlapPair = readonly [mine: string, theirs: string, relation: RegionRelation];
|
|
19
19
|
export declare function regionsOverlapWithRelation(mine: readonly string[], theirs: readonly string[]): readonly RegionOverlapPair[];
|
|
20
|
-
export declare function regionsOverlap(mine: readonly string[], theirs: readonly string[]): readonly [string, string][];
|
package/build/src/body/region.js
CHANGED
|
@@ -254,6 +254,3 @@ export function regionsOverlapWithRelation(mine, theirs) {
|
|
|
254
254
|
}
|
|
255
255
|
return overlaps;
|
|
256
256
|
}
|
|
257
|
-
export function regionsOverlap(mine, theirs) {
|
|
258
|
-
return regionsOverlapWithRelation(mine, theirs).map(([minePattern, theirsPattern]) => [minePattern, theirsPattern]);
|
|
259
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DocumentNode, SectionNode } from "../markdown/types.js";
|
|
2
2
|
import type { VerificationDeclaration } from "../verification/declaration.js";
|
|
3
|
-
export type { VerificationDeclaration, VerificationExecutor } from "../verification/declaration.js";
|
|
4
3
|
export declare class VerificationDocumentError extends Error {
|
|
5
4
|
constructor(message: string);
|
|
6
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CliUsageError, commandGuide,
|
|
1
|
+
import { CliUsageError, commandGuide, usageLine } from "../usage.js";
|
|
2
|
+
import { scanArgs } from "../scan.js";
|
|
2
3
|
import { parseDuration as decodeDuration } from "../../duration.js";
|
|
3
4
|
import { parseAkumaAlias, parseAkumaGlob } from "../../identity/selector.js";
|
|
4
5
|
import { ALLOWED_ACTIONS, DEFAULT_ALLOWED_ACTIONS, decodeAllowedActions, } from "../../akuma/allowed.js";
|
|
@@ -12,7 +13,7 @@ const AKUMA_COMMAND_SPECS = {
|
|
|
12
13
|
contract: "value",
|
|
13
14
|
alias: "value",
|
|
14
15
|
wait: "value",
|
|
15
|
-
allowed: "
|
|
16
|
+
allowed: "repeat",
|
|
16
17
|
json: "boolean",
|
|
17
18
|
schema: "value",
|
|
18
19
|
},
|
|
@@ -134,6 +135,23 @@ export function renderAkumaHelp(action) {
|
|
|
134
135
|
export function akumaUsageGuide(action) {
|
|
135
136
|
return commandGuide(action, AKUMA_COMMAND_SPECS[action].usage);
|
|
136
137
|
}
|
|
138
|
+
const TELL_ONLY_REFUSALS = {
|
|
139
|
+
"--wait": "tell --wait is not supported; use ask --wait",
|
|
140
|
+
"--schema": "tell --schema is not supported; use ask --schema",
|
|
141
|
+
};
|
|
142
|
+
/** The prompt is the only stdin reader; the ask-only options are refused tokens, as is `-d`. */
|
|
143
|
+
function scanSpec(action, spec) {
|
|
144
|
+
return {
|
|
145
|
+
subject: action,
|
|
146
|
+
flags: spec.flags,
|
|
147
|
+
...(spec.stdin ? { stdin: "prompt" } : {}),
|
|
148
|
+
stdinRefusal: `stdin marker '-' is not valid for ${action}`,
|
|
149
|
+
refused: {
|
|
150
|
+
"-d": `option -d is not valid for ${action}`,
|
|
151
|
+
...(action === "tell" ? TELL_ONLY_REFUSALS : {}),
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
137
155
|
function stringFlag(value, diagnostic, fail) {
|
|
138
156
|
if (typeof value !== "string")
|
|
139
157
|
fail(diagnostic);
|
|
@@ -149,67 +167,6 @@ function parseDuration(raw, option, fail) {
|
|
|
149
167
|
fail(`${option} duration exceeds the safe millisecond range`);
|
|
150
168
|
return duration.milliseconds;
|
|
151
169
|
}
|
|
152
|
-
function scanNamedOption(input, flags, fail) {
|
|
153
|
-
const token = input.argv[input.index];
|
|
154
|
-
const name = token.slice(2);
|
|
155
|
-
const kind = input.spec.flags[name];
|
|
156
|
-
if (kind === undefined)
|
|
157
|
-
fail(`option ${token} is not valid for ${input.action}`);
|
|
158
|
-
if (kind !== "repeatable" && flags[name] !== undefined)
|
|
159
|
-
fail(`duplicate option: ${token}`);
|
|
160
|
-
if (kind === "boolean") {
|
|
161
|
-
flags[name] = true;
|
|
162
|
-
return input.index;
|
|
163
|
-
}
|
|
164
|
-
const value = input.argv[input.index + 1];
|
|
165
|
-
if (value === undefined || value === "-" || value === "-d" || value.startsWith("--")) {
|
|
166
|
-
fail(`${token} requires a value`);
|
|
167
|
-
}
|
|
168
|
-
if (isBlankInput(value))
|
|
169
|
-
fail(`${token} requires a nonblank value`);
|
|
170
|
-
flags[name] = kind === "repeatable" ? [...(Array.isArray(flags[name]) ? flags[name] : []), value] : value;
|
|
171
|
-
return input.index + 1;
|
|
172
|
-
}
|
|
173
|
-
function scanAkuma(action, argv, fail) {
|
|
174
|
-
const spec = AKUMA_COMMAND_SPECS[action];
|
|
175
|
-
const flags = {};
|
|
176
|
-
const positionals = [];
|
|
177
|
-
let stdin = false;
|
|
178
|
-
let positionalOnly = false;
|
|
179
|
-
for (let index = 1; index < argv.length; index += 1) {
|
|
180
|
-
const token = argv[index];
|
|
181
|
-
if (!positionalOnly && token === "--") {
|
|
182
|
-
positionalOnly = true;
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
if (positionalOnly) {
|
|
186
|
-
if (isBlankInput(token))
|
|
187
|
-
fail(`${action} requires a nonblank value`);
|
|
188
|
-
positionals.push(token);
|
|
189
|
-
}
|
|
190
|
-
else if (token === "-") {
|
|
191
|
-
if (!spec.stdin)
|
|
192
|
-
fail(`stdin marker '-' is not valid for ${action}`);
|
|
193
|
-
if (stdin)
|
|
194
|
-
fail("stdin marker '-' may appear only once");
|
|
195
|
-
stdin = true;
|
|
196
|
-
}
|
|
197
|
-
else if (token === "-d") {
|
|
198
|
-
fail(`option ${token} is not valid for ${action}`);
|
|
199
|
-
}
|
|
200
|
-
else if (!token.startsWith("--")) {
|
|
201
|
-
if (isBlankInput(token))
|
|
202
|
-
fail(`${action} requires a nonblank value`);
|
|
203
|
-
positionals.push(token);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
if (action === "tell" && (token === "--wait" || token === "--schema"))
|
|
207
|
-
fail(`tell ${token} is not supported; use ask ${token}`);
|
|
208
|
-
index = scanNamedOption({ action, spec, argv, index }, flags, fail);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return { flags, positionals, stdin };
|
|
212
|
-
}
|
|
213
170
|
function positiveIndex(raw, option, fail) {
|
|
214
171
|
if (typeof raw !== "string" || !/^[1-9][0-9]*$/u.test(raw))
|
|
215
172
|
fail(`${option} requires a positive integer`);
|
|
@@ -397,10 +354,10 @@ export function parseAkumaCommand(argv) {
|
|
|
397
354
|
const fail = (message) => {
|
|
398
355
|
throw new CliUsageError(message, akumaUsageGuide(action));
|
|
399
356
|
};
|
|
400
|
-
const { flags, positionals, stdin } =
|
|
357
|
+
const { flags, positionals, stdin } = scanArgs(argv, scanSpec(action, spec), fail);
|
|
401
358
|
const output = flags.json === true ? "json" : "text";
|
|
402
359
|
if (action === "call" || action === "tell" || action === "ask") {
|
|
403
|
-
const parsed = parsePrompted(action, positionals, stdin, fail);
|
|
360
|
+
const parsed = parsePrompted(action, positionals, stdin !== undefined, fail);
|
|
404
361
|
return action === "call"
|
|
405
362
|
? parseCall(flags, parsed.subject, parsed.prompt, output, fail)
|
|
406
363
|
: action === "tell"
|
|
@@ -417,7 +374,7 @@ export function parseAkumaCommand(argv) {
|
|
|
417
374
|
? `${action} accepts one Akuma selector`
|
|
418
375
|
: `${action} accepts exactly ${spec.arity} Akuma selectors`);
|
|
419
376
|
}
|
|
420
|
-
if (stdin)
|
|
377
|
+
if (stdin !== undefined)
|
|
421
378
|
fail(`${action} reads no stdin`);
|
|
422
379
|
return parseAddressed(action, positionals, flags, output, fail);
|
|
423
380
|
}
|
|
@@ -12,10 +12,10 @@ import { akumasWithExecution } from "../../library/akumas.js";
|
|
|
12
12
|
import { World } from "../../world.js";
|
|
13
13
|
import { contractFromInput } from "../selectors.js";
|
|
14
14
|
import { ActivityDriver } from "../activity.js";
|
|
15
|
-
import { displayContext, resultContext, writeJson, writeStderr, writeStdout } from "../streams.js";
|
|
15
|
+
import { displayContext, emit, resultContext, writeJson, writeStderr, writeStdout } from "../streams.js";
|
|
16
16
|
import { callObservationStream, inputWaitStream, waitObservationStream, } from "../render/akuma-activity.js";
|
|
17
|
-
import { askRawAnswer, callRawAnswer, historyRawAnswer, waitRawAnswer } from "../render/akuma-activity.js";
|
|
18
|
-
import { askExitCode, askProgressStream, callExitCode, callObservationHead, forkExitCode, historyExitCode, killExitCode, renderCallText, renderForkText,
|
|
17
|
+
import { askRawAnswer, callRawAnswer, historyRawAnswer, historyText, tellText, waitRawAnswer, waitText, } from "../render/akuma-activity.js";
|
|
18
|
+
import { askExitCode, askProgressStream, callExitCode, callObservationHead, forkExitCode, historyExitCode, killExitCode, renderCallText, renderForkText, renderKillText, tellExitCode, waitedTellProgress, } from "../render/akuma.js";
|
|
19
19
|
export { isParsedAkumaCommand, renderAkumaHelp } from "./akuma-grammar.js";
|
|
20
20
|
// ---------------------------------------------------------------------------
|
|
21
21
|
// Leaf dispatch: acquisition, one public SDK invocation, direct rendering
|
|
@@ -86,7 +86,7 @@ async function inputInitiator(input) {
|
|
|
86
86
|
}
|
|
87
87
|
return { initiator };
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function emitAnswer(body, exact) {
|
|
90
90
|
if (exact)
|
|
91
91
|
process.stdout.write(body);
|
|
92
92
|
else
|
|
@@ -152,9 +152,9 @@ async function runCall(command, input) {
|
|
|
152
152
|
}
|
|
153
153
|
const raw = callRawAnswer(result, streamed);
|
|
154
154
|
if (raw === undefined)
|
|
155
|
-
|
|
155
|
+
emitAnswer(renderCallText(result, streamed, displayContext()), false);
|
|
156
156
|
else
|
|
157
|
-
|
|
157
|
+
emitAnswer(raw, true);
|
|
158
158
|
return callExitCode(result);
|
|
159
159
|
}
|
|
160
160
|
finally {
|
|
@@ -195,9 +195,9 @@ async function runWait(command, input) {
|
|
|
195
195
|
}
|
|
196
196
|
const raw = waitRawAnswer(result, streamed);
|
|
197
197
|
if (raw === undefined)
|
|
198
|
-
|
|
198
|
+
emitAnswer(waitText(result, presentation, displayContext()), false);
|
|
199
199
|
else
|
|
200
|
-
|
|
200
|
+
emitAnswer(raw, true);
|
|
201
201
|
return 0;
|
|
202
202
|
}
|
|
203
203
|
finally {
|
|
@@ -214,12 +214,8 @@ async function runTell(command, input) {
|
|
|
214
214
|
...(input.repo === undefined ? {} : { repo: input.repo }),
|
|
215
215
|
...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
216
216
|
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return tellExitCode(result);
|
|
220
|
-
}
|
|
221
|
-
emitResult(renderTellText(result, inputAlias(command.akuma), displayContext()), false);
|
|
222
|
-
return tellExitCode(result);
|
|
217
|
+
const text = () => tellText(result, inputAlias(command.akuma), displayContext());
|
|
218
|
+
return emit(command.output, result, text, tellExitCode(result));
|
|
223
219
|
}
|
|
224
220
|
async function runAsk(command, input) {
|
|
225
221
|
const body = await promptBody("ask", command, input);
|
|
@@ -261,7 +257,7 @@ async function runAsk(command, input) {
|
|
|
261
257
|
writeJson(result);
|
|
262
258
|
return askExitCode(result);
|
|
263
259
|
}
|
|
264
|
-
|
|
260
|
+
emitAnswer(askRawAnswer(result, schema !== undefined) ?? "", true);
|
|
265
261
|
return askExitCode(result);
|
|
266
262
|
}
|
|
267
263
|
finally {
|
|
@@ -289,11 +285,11 @@ async function runHistory(command, input) {
|
|
|
289
285
|
last: command.last,
|
|
290
286
|
};
|
|
291
287
|
if (raw !== undefined)
|
|
292
|
-
|
|
288
|
+
emitAnswer(raw, true);
|
|
293
289
|
else if (command.last && result.kind === "last")
|
|
294
|
-
|
|
290
|
+
emitAnswer(result.answer, true);
|
|
295
291
|
else
|
|
296
|
-
|
|
292
|
+
emitAnswer(historyText(result, presentation, displayContext()), false);
|
|
297
293
|
return historyExitCode(result, command.id);
|
|
298
294
|
}
|
|
299
295
|
async function runFork(command, input) {
|
|
@@ -302,12 +298,7 @@ async function runFork(command, input) {
|
|
|
302
298
|
at: command.at,
|
|
303
299
|
...(input.repo === undefined ? {} : { repo: input.repo }),
|
|
304
300
|
});
|
|
305
|
-
|
|
306
|
-
writeJson(receipt);
|
|
307
|
-
return forkExitCode(receipt);
|
|
308
|
-
}
|
|
309
|
-
emitResult(renderForkText(receipt), false);
|
|
310
|
-
return forkExitCode(receipt);
|
|
301
|
+
return emit(command.output, receipt, () => renderForkText(receipt), forkExitCode(receipt));
|
|
311
302
|
}
|
|
312
303
|
async function runKill(command, input) {
|
|
313
304
|
const alias = command.akuma.length === 1 ? inputAlias(command.akuma[0]) : undefined;
|
|
@@ -316,12 +307,8 @@ async function runKill(command, input) {
|
|
|
316
307
|
...(input.repo === undefined ? {} : { repo: input.repo }),
|
|
317
308
|
...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
318
309
|
});
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
return killExitCode(result);
|
|
322
|
-
}
|
|
323
|
-
emitResult(renderKillText(result, alias, displayContext()), false);
|
|
324
|
-
return killExitCode(result);
|
|
310
|
+
const text = () => renderKillText(result, alias, displayContext());
|
|
311
|
+
return emit(command.output, result, text, killExitCode(result));
|
|
325
312
|
}
|
|
326
313
|
async function akumaWorld(command, coordinates) {
|
|
327
314
|
const world = command.command === "call"
|
|
@@ -44,7 +44,7 @@ export type ParsedDeliver = Output & Readonly<{
|
|
|
44
44
|
materializeConflict: boolean;
|
|
45
45
|
overwrite: boolean;
|
|
46
46
|
}>;
|
|
47
|
-
export type ParsedReview = Output & Readonly<{
|
|
47
|
+
export type ParsedReview = Output & Actor & Readonly<{
|
|
48
48
|
command: "review";
|
|
49
49
|
contract?: string;
|
|
50
50
|
verdict: "satisfied" | "unsatisfied";
|
|
@@ -66,11 +66,23 @@ export type ParsedStatus = Output & (Readonly<{
|
|
|
66
66
|
selectors?: readonly string[];
|
|
67
67
|
akuma?: never;
|
|
68
68
|
guidance?: true;
|
|
69
|
+
category?: never;
|
|
70
|
+
limit?: never;
|
|
69
71
|
}> | Readonly<{
|
|
70
72
|
command: "status";
|
|
71
73
|
contract: string;
|
|
72
74
|
akuma: true;
|
|
73
75
|
guidance?: never;
|
|
76
|
+
category?: never;
|
|
77
|
+
limit?: never;
|
|
78
|
+
}> | Readonly<{
|
|
79
|
+
command: "status";
|
|
80
|
+
category: StatusCategory;
|
|
81
|
+
limit?: number;
|
|
82
|
+
contract?: never;
|
|
83
|
+
selectors?: never;
|
|
84
|
+
akuma?: never;
|
|
85
|
+
guidance?: never;
|
|
74
86
|
}>);
|
|
75
87
|
export type ParsedLs = Output & Readonly<{
|
|
76
88
|
command: "ls";
|
|
@@ -108,5 +120,6 @@ export type ParsedContractParts = Readonly<{
|
|
|
108
120
|
actor?: string;
|
|
109
121
|
}>;
|
|
110
122
|
export type ParsedContractCommand = ParsedBind | ParsedAmend | ParsedDeliver | ParsedReview | ParsedArc | ParsedAbandon | ParsedStatus | ParsedLs | ParsedAudit | ParsedReconcile | ParsedNuke | ParsedSettings | ParsedRegion;
|
|
123
|
+
export type StatusCategory = "akuma" | "contract";
|
|
111
124
|
export declare function parseContractCommand(parts: ParsedContractParts): ParsedContractCommand;
|
|
112
125
|
export {};
|
|
@@ -123,32 +123,65 @@ function parseReview(parts) {
|
|
|
123
123
|
verdict: parts.flags.satisfied === true ? "satisfied" : "unsatisfied",
|
|
124
124
|
...(summary === undefined ? {} : { summary }),
|
|
125
125
|
...(parts.stdin ? { summaryFromStdin: true } : {}),
|
|
126
|
+
...(parts.actor === undefined ? {} : { actor: parts.actor }),
|
|
126
127
|
output: parts.output,
|
|
127
128
|
};
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
130
|
+
// Only these fixed category forms are status selectors.
|
|
131
|
+
const STATUS_CATEGORY_SELECTORS = new Map([
|
|
132
|
+
["aku", "akuma"],
|
|
133
|
+
["aku/", "akuma"],
|
|
134
|
+
["aku/*", "akuma"],
|
|
135
|
+
["kei", "contract"],
|
|
136
|
+
["kei/", "contract"],
|
|
137
|
+
["kei/*", "contract"],
|
|
138
|
+
]);
|
|
139
|
+
function rejectStatusGlobs(positionals) {
|
|
140
|
+
for (const selector of positionals) {
|
|
141
|
+
if (!STATUS_CATEGORY_SELECTORS.has(selector) && !selector.startsWith("@") && /[*?\[\]]/u.test(selector))
|
|
142
|
+
refuse("status", `unsupported status glob: ${selector}`);
|
|
143
143
|
}
|
|
144
|
+
}
|
|
145
|
+
function parseStatusGuidance(parts, limit) {
|
|
146
|
+
if (limit !== undefined)
|
|
147
|
+
refuse("status", "--limit is not valid with --guidance");
|
|
148
|
+
const selected = parts.positionals[0];
|
|
149
|
+
if (selected !== undefined && STATUS_CATEGORY_SELECTORS.has(selected))
|
|
150
|
+
refuse("status", "--guidance cannot select a category");
|
|
151
|
+
if (parts.positionals.length > 1)
|
|
152
|
+
refuse("status", "--guidance accepts at most one Contract selector");
|
|
153
|
+
if (selected?.startsWith("aku/") === true)
|
|
154
|
+
refuse("status", "--guidance cannot select an Akuma");
|
|
155
|
+
if (selected !== undefined && !selected.startsWith("@") && /[*?\[\]]/u.test(selected))
|
|
156
|
+
refuse("status", `unsupported status glob: ${selected}`);
|
|
157
|
+
return {
|
|
158
|
+
command: "status",
|
|
159
|
+
...(selected === undefined ? {} : { contract: selected }),
|
|
160
|
+
guidance: true,
|
|
161
|
+
output: parts.output,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function parseStatus(parts) {
|
|
165
|
+
const limit = listLimit(parts, "status");
|
|
166
|
+
if (parts.flags.guidance === true)
|
|
167
|
+
return parseStatusGuidance(parts, limit);
|
|
168
|
+
rejectStatusGlobs(parts.positionals);
|
|
144
169
|
if (parts.positionals.length > 1) {
|
|
170
|
+
if (limit !== undefined)
|
|
171
|
+
refuse("status", "--limit is valid only for one category selector");
|
|
172
|
+
if (parts.positionals.some((selector) => STATUS_CATEGORY_SELECTORS.has(selector)))
|
|
173
|
+
refuse("status", "a category selector cannot combine with other selectors");
|
|
145
174
|
return { command: "status", selectors: parts.positionals, output: parts.output };
|
|
146
175
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
176
|
+
const selected = parts.positionals[0];
|
|
177
|
+
const category = selected === undefined ? undefined : STATUS_CATEGORY_SELECTORS.get(selected);
|
|
178
|
+
if (category !== undefined)
|
|
179
|
+
return { command: "status", category, ...(limit === undefined ? {} : { limit }), output: parts.output };
|
|
180
|
+
if (limit !== undefined)
|
|
181
|
+
refuse("status", "--limit is valid only for a category selector");
|
|
182
|
+
if (selected?.startsWith("aku/") === true)
|
|
183
|
+
return { command: "status", contract: selected, akuma: true, output: parts.output };
|
|
184
|
+
return { command: "status", ...(selected === undefined ? {} : { contract: selected }), output: parts.output };
|
|
152
185
|
}
|
|
153
186
|
function parseRegion(parts) {
|
|
154
187
|
const contract = parts.positionals[0];
|
|
@@ -172,10 +205,10 @@ function akumaCatalogQuery(query, parts) {
|
|
|
172
205
|
...(limit === undefined ? {} : { limit: Number(limit) }),
|
|
173
206
|
};
|
|
174
207
|
}
|
|
175
|
-
function listLimit(parts) {
|
|
208
|
+
function listLimit(parts, command = "ls") {
|
|
176
209
|
const limit = optionalFlag(parts.flags, "limit");
|
|
177
210
|
if (limit !== undefined && (!/^[1-9][0-9]*$/u.test(limit) || !Number.isSafeInteger(Number(limit))))
|
|
178
|
-
refuse(
|
|
211
|
+
refuse(command, "--limit requires a positive safe integer");
|
|
179
212
|
return limit === undefined ? undefined : Number(limit);
|
|
180
213
|
}
|
|
181
214
|
function taskCatalogQuery(path, limit) {
|