@cleocode/adapters 2026.9.22 → 2026.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +393 -89
- package/dist/index.js.map +3 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -809,7 +809,7 @@ var init_acceptance_gate_schema = __esm({
|
|
|
809
809
|
message: "Result cannot precede input capture"
|
|
810
810
|
});
|
|
811
811
|
const executable = ["test", "command", "lint"].includes(result.kind);
|
|
812
|
-
if (executable && !binding.invocation)
|
|
812
|
+
if (executable && !binding.invocation && result.result !== "error")
|
|
813
813
|
context.addIssue({
|
|
814
814
|
code: "custom",
|
|
815
815
|
path: ["binding", "invocation"],
|
|
@@ -2296,16 +2296,30 @@ var init_service = __esm({
|
|
|
2296
2296
|
});
|
|
2297
2297
|
|
|
2298
2298
|
// packages/contracts/src/operations/output-contracts-data.ts
|
|
2299
|
-
var tasksShowOutputContract, taskPopulationSchema, tasksListOutputContract, tasksFindOutputContract, TASK_MUTATION_DATA_SCHEMA, tasksAddOutputContract, tasksAddBatchOutputContract, tasksUpdateOutputContract, tasksCompleteOutputContract, tasksReorderRankOutputContract, tasksBulkMoveOutputContract, tasksAssigneeOutputContract, adminConfigGetOutputContract, adminConfigListOutputContract, adminConfigValidateOutputContract, adminConfigUnsetOutputContract, OUTPUT_CONTRACTS;
|
|
2299
|
+
var TASK_CLAIM_SCHEMA, tasksShowOutputContract, taskPopulationSchema, tasksListOutputContract, tasksFindOutputContract, TASK_MUTATION_DATA_SCHEMA, tasksAddOutputContract, tasksAddBatchOutputContract, tasksUpdateOutputContract, tasksCompleteOutputContract, tasksReorderRankOutputContract, tasksBulkMoveOutputContract, tasksAssigneeOutputContract, tasksStartOutputContract, tasksClaimOutputContract, tasksUnclaimOutputContract, adminConfigGetOutputContract, adminConfigListOutputContract, adminConfigValidateOutputContract, adminConfigUnsetOutputContract, OUTPUT_CONTRACTS;
|
|
2300
2300
|
var init_output_contracts_data = __esm({
|
|
2301
2301
|
"packages/contracts/src/operations/output-contracts-data.ts"() {
|
|
2302
2302
|
"use strict";
|
|
2303
2303
|
init_check();
|
|
2304
2304
|
init_entities();
|
|
2305
2305
|
init_service();
|
|
2306
|
+
TASK_CLAIM_SCHEMA = {
|
|
2307
|
+
type: "object",
|
|
2308
|
+
description: "Agent claim lease (T12502): the holder session, its agent, and when the lease lapses unless renewed. Absent when unclaimed.",
|
|
2309
|
+
required: ["sessionId", "agentId", "claimedAt", "leaseExpiresAt"],
|
|
2310
|
+
properties: {
|
|
2311
|
+
sessionId: { type: "string", description: "Session holding the lease." },
|
|
2312
|
+
agentId: { type: ["string", "null"], description: "Agent identity of the holder." },
|
|
2313
|
+
claimedAt: { type: "string", description: "When the lease was taken (ISO-8601 UTC)." },
|
|
2314
|
+
leaseExpiresAt: {
|
|
2315
|
+
type: "string",
|
|
2316
|
+
description: "When the lease lapses unless renewed (ISO-8601 UTC)."
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
};
|
|
2306
2320
|
tasksShowOutputContract = {
|
|
2307
2321
|
operation: "tasks.show",
|
|
2308
|
-
shapeNote: "The task record is nested under `task` \u2014 use /data/task/<field>, not /data/<field>. Mutation envelopes are FLAT by contrast (/data/created/0, /data/updated/0), which is the asymmetry that produced GH #1225/#1239/#1231. `view` may be null. `acRows` and `relations` are conditional. `description`, `acceptance` and `verification` are withheld by the default (MVI) projection but `--field` resolves them transparently (T12108) \u2014 no `--full` needed. Evidence is NOT a task field: it lives at /data/task/verification/evidence (keyed by gate), alongside /data/task/verification/gates. T12127 (GH #1231) \u2014 the previous wording advertised `/data/task/evidence`, which does not exist, in the very text shown to an agent whose pointer had just failed.",
|
|
2322
|
+
shapeNote: "The task record is nested under `task` \u2014 use /data/task/<field>, not /data/<field>. Mutation envelopes are FLAT by contrast (/data/created/0, /data/updated/0), which is the asymmetry that produced GH #1225/#1239/#1231. `view` may be null. `acRows` and `relations` are conditional. The default (MVI) projection withholds each `acRows` UUID and names it once in `/data/_withheld` as `acRows/*/id` (T12523); cite a criterion by `alias` (AC1..n). `description`, `acceptance` and `verification` are withheld by the default (MVI) projection but `--field` resolves them transparently (T12108) \u2014 no `--full` needed. Evidence is NOT a task field: it lives at /data/task/verification/evidence (keyed by gate), alongside /data/task/verification/gates. T12127 (GH #1231) \u2014 the previous wording advertised `/data/task/evidence`, which does not exist, in the very text shown to an agent whose pointer had just failed.",
|
|
2309
2323
|
dataSchema: {
|
|
2310
2324
|
type: "object",
|
|
2311
2325
|
required: ["task", "view", "attachments"],
|
|
@@ -2321,7 +2335,18 @@ var init_output_contracts_data = __esm({
|
|
|
2321
2335
|
status: { type: "string" },
|
|
2322
2336
|
priority: { type: "string" },
|
|
2323
2337
|
type: { type: "string" },
|
|
2324
|
-
parentId: { type: ["string", "null"] }
|
|
2338
|
+
parentId: { type: ["string", "null"] },
|
|
2339
|
+
// T12503: the optimistic-concurrency version agents pass to --if-match.
|
|
2340
|
+
updatedAt: {
|
|
2341
|
+
type: ["string", "null"],
|
|
2342
|
+
description: "Task version for optimistic concurrency: pass it to `cleo update|complete --if-match`."
|
|
2343
|
+
},
|
|
2344
|
+
// T12502: the human assignee and the agent claim lease are separate.
|
|
2345
|
+
assignee: {
|
|
2346
|
+
type: ["string", "null"],
|
|
2347
|
+
description: "Human / owner assignee. Separate from `claim`."
|
|
2348
|
+
},
|
|
2349
|
+
claim: TASK_CLAIM_SCHEMA
|
|
2325
2350
|
}
|
|
2326
2351
|
},
|
|
2327
2352
|
view: {
|
|
@@ -2334,7 +2359,11 @@ var init_output_contracts_data = __esm({
|
|
|
2334
2359
|
},
|
|
2335
2360
|
acRows: {
|
|
2336
2361
|
type: "array",
|
|
2337
|
-
description: "Acceptance-criterion rows (
|
|
2362
|
+
description: "Acceptance-criterion rows (alias AC<n>, ordinal, text; the UUID id only with --full). Optional."
|
|
2363
|
+
},
|
|
2364
|
+
_withheld: {
|
|
2365
|
+
type: "object",
|
|
2366
|
+
description: "Fields the default projection withheld from list elements, e.g. `acRows/*/id` \u2192 UTF-8 byte total. Absent with --full."
|
|
2338
2367
|
},
|
|
2339
2368
|
relations: {
|
|
2340
2369
|
type: "object",
|
|
@@ -2349,6 +2378,14 @@ var init_output_contracts_data = __esm({
|
|
|
2349
2378
|
"/data/task/priority",
|
|
2350
2379
|
"/data/task/type",
|
|
2351
2380
|
"/data/task/parentId",
|
|
2381
|
+
// T12503 — the optimistic-concurrency version for `--if-match`; withheld
|
|
2382
|
+
// by the MVI projection, resolved from the full record by `--field`.
|
|
2383
|
+
"/data/task/updatedAt",
|
|
2384
|
+
// T12502 — the agent claim lease (withheld by MVI; resolved by --field).
|
|
2385
|
+
"/data/task/assignee",
|
|
2386
|
+
"/data/task/claim",
|
|
2387
|
+
"/data/task/claim/sessionId",
|
|
2388
|
+
"/data/task/claim/leaseExpiresAt",
|
|
2352
2389
|
// T12127 (GH #1231) — withheld by the MVI projection but resolvable
|
|
2353
2390
|
// through `--field` since T12108. They were absent from this list, so the
|
|
2354
2391
|
// remediation an agent is shown on a failed pointer never mentioned the
|
|
@@ -2590,6 +2627,56 @@ var init_output_contracts_data = __esm({
|
|
|
2590
2627
|
},
|
|
2591
2628
|
fieldPointers: ["/data/taskId", "/data/assignee", "/data/assigned"]
|
|
2592
2629
|
};
|
|
2630
|
+
tasksStartOutputContract = {
|
|
2631
|
+
operation: "tasks.start",
|
|
2632
|
+
shapeNote: "The claim lease this start holds is at /data/claim (null when the caller is not bound to a session). Another session holding the task fails with E_TASK_CLAIMED (exit 35); error.details.holder names it.",
|
|
2633
|
+
dataSchema: {
|
|
2634
|
+
type: "object",
|
|
2635
|
+
required: ["taskId", "previousTask"],
|
|
2636
|
+
additionalProperties: true,
|
|
2637
|
+
properties: {
|
|
2638
|
+
taskId: { type: "string", description: "The task now active." },
|
|
2639
|
+
previousTask: { type: ["string", "null"], description: "The task active before, if any." },
|
|
2640
|
+
claim: { ...TASK_CLAIM_SCHEMA, type: ["object", "null"] }
|
|
2641
|
+
}
|
|
2642
|
+
},
|
|
2643
|
+
fieldPointers: [
|
|
2644
|
+
"/data/taskId",
|
|
2645
|
+
"/data/previousTask",
|
|
2646
|
+
"/data/claim",
|
|
2647
|
+
"/data/claim/sessionId",
|
|
2648
|
+
"/data/claim/leaseExpiresAt"
|
|
2649
|
+
]
|
|
2650
|
+
};
|
|
2651
|
+
tasksClaimOutputContract = {
|
|
2652
|
+
operation: "tasks.claim",
|
|
2653
|
+
shapeNote: "The lease now held by your session is at /data/claim; renew it with --renew. Another holder fails with E_TASK_CLAIMED (exit 35): --take-over (expired) or --force-claim (live).",
|
|
2654
|
+
dataSchema: {
|
|
2655
|
+
type: "object",
|
|
2656
|
+
required: ["taskId", "agentId", "claim"],
|
|
2657
|
+
additionalProperties: true,
|
|
2658
|
+
properties: {
|
|
2659
|
+
taskId: { type: "string", description: "The claimed task." },
|
|
2660
|
+
agentId: { type: ["string", "null"], description: "Agent recorded with the lease." },
|
|
2661
|
+
claim: TASK_CLAIM_SCHEMA
|
|
2662
|
+
}
|
|
2663
|
+
},
|
|
2664
|
+
fieldPointers: ["/data/taskId", "/data/agentId", "/data/claim", "/data/claim/leaseExpiresAt"]
|
|
2665
|
+
};
|
|
2666
|
+
tasksUnclaimOutputContract = {
|
|
2667
|
+
operation: "tasks.unclaim",
|
|
2668
|
+
shapeNote: "/data/released is true when a lease was cleared, false when the task was unclaimed.",
|
|
2669
|
+
dataSchema: {
|
|
2670
|
+
type: "object",
|
|
2671
|
+
required: ["taskId", "released"],
|
|
2672
|
+
additionalProperties: true,
|
|
2673
|
+
properties: {
|
|
2674
|
+
taskId: { type: "string", description: "The released task." },
|
|
2675
|
+
released: { type: "boolean", description: "Whether a lease was cleared." }
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
fieldPointers: ["/data/taskId", "/data/released"]
|
|
2679
|
+
};
|
|
2593
2680
|
adminConfigGetOutputContract = {
|
|
2594
2681
|
operation: "admin.config.get",
|
|
2595
2682
|
shapeNote: "The resolved value is at /data/value (may be null). /data/found is false when the key is absent.",
|
|
@@ -2696,6 +2783,10 @@ var init_output_contracts_data = __esm({
|
|
|
2696
2783
|
"tasks.reorder-rank": tasksReorderRankOutputContract,
|
|
2697
2784
|
"tasks.bulk-move": tasksBulkMoveOutputContract,
|
|
2698
2785
|
"tasks.assignee": tasksAssigneeOutputContract,
|
|
2786
|
+
// T12502 — leased task claims.
|
|
2787
|
+
"tasks.start": tasksStartOutputContract,
|
|
2788
|
+
"tasks.claim": tasksClaimOutputContract,
|
|
2789
|
+
"tasks.unclaim": tasksUnclaimOutputContract,
|
|
2699
2790
|
"admin.config.get": adminConfigGetOutputContract,
|
|
2700
2791
|
"admin.config.list": adminConfigListOutputContract,
|
|
2701
2792
|
"admin.config.validate": adminConfigValidateOutputContract,
|
|
@@ -3575,12 +3666,21 @@ var init_operations_registry = __esm({
|
|
|
3575
3666
|
gateway: "query",
|
|
3576
3667
|
domain: "tasks",
|
|
3577
3668
|
operation: "history",
|
|
3578
|
-
description: "Show task work history
|
|
3669
|
+
description: "Show task work history; with taskId, the task audit trail; with ranking, who changed its priority/severity/kind/depends and why (T12693)",
|
|
3579
3670
|
tier: 1,
|
|
3580
3671
|
idempotent: true,
|
|
3581
3672
|
sessionRequired: false,
|
|
3582
3673
|
requiredParams: [],
|
|
3583
|
-
params: [
|
|
3674
|
+
params: [
|
|
3675
|
+
{ name: "taskId", type: "string", required: false, description: "Task to show history for" },
|
|
3676
|
+
{ name: "limit", type: "number", required: false, description: "Maximum entries" },
|
|
3677
|
+
{
|
|
3678
|
+
name: "ranking",
|
|
3679
|
+
type: "boolean",
|
|
3680
|
+
required: false,
|
|
3681
|
+
description: "Only ranking-input changes (actor, session, reason, before/after)"
|
|
3682
|
+
}
|
|
3683
|
+
]
|
|
3584
3684
|
},
|
|
3585
3685
|
{
|
|
3586
3686
|
gateway: "query",
|
|
@@ -5779,6 +5879,13 @@ var init_operations_registry = __esm({
|
|
|
5779
5879
|
required: true,
|
|
5780
5880
|
description: "taskId parameter",
|
|
5781
5881
|
cli: { positional: true }
|
|
5882
|
+
},
|
|
5883
|
+
{
|
|
5884
|
+
name: "expectedUpdatedAt",
|
|
5885
|
+
type: "string",
|
|
5886
|
+
required: false,
|
|
5887
|
+
description: "Optimistic-concurrency guard: fail with E_CONFLICT unless the task updatedAt still equals this value",
|
|
5888
|
+
cli: { flag: "if-match" }
|
|
5782
5889
|
}
|
|
5783
5890
|
]
|
|
5784
5891
|
},
|
|
@@ -6075,6 +6182,32 @@ var init_operations_registry = __esm({
|
|
|
6075
6182
|
],
|
|
6076
6183
|
outputSchema: OUTPUT_CONTRACTS["tasks.assignee"]
|
|
6077
6184
|
},
|
|
6185
|
+
{
|
|
6186
|
+
gateway: "mutate",
|
|
6187
|
+
domain: "tasks",
|
|
6188
|
+
operation: "ranking.revert",
|
|
6189
|
+
description: "tasks.ranking.revert (mutate) \u2014 undo one recorded ranking change (priority/severity/kind/depends) as a new audited change (T12693, D11161)",
|
|
6190
|
+
tier: 1,
|
|
6191
|
+
idempotent: false,
|
|
6192
|
+
sessionRequired: false,
|
|
6193
|
+
requiredParams: ["entryId"],
|
|
6194
|
+
params: [
|
|
6195
|
+
{
|
|
6196
|
+
name: "entryId",
|
|
6197
|
+
type: "string",
|
|
6198
|
+
required: true,
|
|
6199
|
+
description: "ranking_changed audit row id (cleo history ranking <taskId>)",
|
|
6200
|
+
cli: { positional: true }
|
|
6201
|
+
},
|
|
6202
|
+
{ name: "reason", type: "string", required: false, description: "Why it is reverted" },
|
|
6203
|
+
{
|
|
6204
|
+
name: "force",
|
|
6205
|
+
type: "boolean",
|
|
6206
|
+
required: false,
|
|
6207
|
+
description: "Revert even though a field changed again since"
|
|
6208
|
+
}
|
|
6209
|
+
]
|
|
6210
|
+
},
|
|
6078
6211
|
{
|
|
6079
6212
|
gateway: "mutate",
|
|
6080
6213
|
domain: "tasks",
|
|
@@ -6413,7 +6546,7 @@ var init_operations_registry = __esm({
|
|
|
6413
6546
|
gateway: "mutate",
|
|
6414
6547
|
domain: "tasks",
|
|
6415
6548
|
operation: "start",
|
|
6416
|
-
description: "tasks.start (mutate)",
|
|
6549
|
+
description: "tasks.start (mutate) \u2014 start work and take the caller session's leased claim (E_TASK_CLAIMED when another session holds it)",
|
|
6417
6550
|
tier: 0,
|
|
6418
6551
|
idempotent: false,
|
|
6419
6552
|
sessionRequired: false,
|
|
@@ -6425,6 +6558,20 @@ var init_operations_registry = __esm({
|
|
|
6425
6558
|
required: true,
|
|
6426
6559
|
description: "taskId parameter",
|
|
6427
6560
|
cli: { positional: true }
|
|
6561
|
+
},
|
|
6562
|
+
{
|
|
6563
|
+
name: "takeOver",
|
|
6564
|
+
type: "boolean",
|
|
6565
|
+
required: false,
|
|
6566
|
+
description: "Take over another session's EXPIRED claim lease (audited)",
|
|
6567
|
+
cli: { flag: "take-over" }
|
|
6568
|
+
},
|
|
6569
|
+
{
|
|
6570
|
+
name: "forceClaim",
|
|
6571
|
+
type: "boolean",
|
|
6572
|
+
required: false,
|
|
6573
|
+
description: "Take over another session's LIVE claim lease (audited)",
|
|
6574
|
+
cli: { flag: "force-claim" }
|
|
6428
6575
|
}
|
|
6429
6576
|
]
|
|
6430
6577
|
},
|
|
@@ -6534,11 +6681,11 @@ var init_operations_registry = __esm({
|
|
|
6534
6681
|
gateway: "mutate",
|
|
6535
6682
|
domain: "tasks",
|
|
6536
6683
|
operation: "claim",
|
|
6537
|
-
description: "tasks.claim (mutate) \u2014 claim a task
|
|
6684
|
+
description: "tasks.claim (mutate) \u2014 take, renew or override the caller session's leased claim on a task (never the human assignee)",
|
|
6538
6685
|
tier: 0,
|
|
6539
6686
|
idempotent: false,
|
|
6540
6687
|
sessionRequired: true,
|
|
6541
|
-
requiredParams: ["taskId"
|
|
6688
|
+
requiredParams: ["taskId"],
|
|
6542
6689
|
params: [
|
|
6543
6690
|
{
|
|
6544
6691
|
name: "taskId",
|
|
@@ -6549,8 +6696,26 @@ var init_operations_registry = __esm({
|
|
|
6549
6696
|
{
|
|
6550
6697
|
name: "agentId",
|
|
6551
6698
|
type: "string",
|
|
6552
|
-
required:
|
|
6553
|
-
description: "Agent ID
|
|
6699
|
+
required: false,
|
|
6700
|
+
description: "Agent ID recorded with the lease (default: the session's agent / CLEO_AGENT_ID)"
|
|
6701
|
+
},
|
|
6702
|
+
{
|
|
6703
|
+
name: "renew",
|
|
6704
|
+
type: "boolean",
|
|
6705
|
+
required: false,
|
|
6706
|
+
description: "Renew the caller's own lease"
|
|
6707
|
+
},
|
|
6708
|
+
{
|
|
6709
|
+
name: "takeOver",
|
|
6710
|
+
type: "boolean",
|
|
6711
|
+
required: false,
|
|
6712
|
+
description: "Take over another session's EXPIRED lease (audited)"
|
|
6713
|
+
},
|
|
6714
|
+
{
|
|
6715
|
+
name: "forceClaim",
|
|
6716
|
+
type: "boolean",
|
|
6717
|
+
required: false,
|
|
6718
|
+
description: "Take over another session's LIVE lease (audited)"
|
|
6554
6719
|
}
|
|
6555
6720
|
]
|
|
6556
6721
|
},
|
|
@@ -6558,7 +6723,7 @@ var init_operations_registry = __esm({
|
|
|
6558
6723
|
gateway: "mutate",
|
|
6559
6724
|
domain: "tasks",
|
|
6560
6725
|
operation: "unclaim",
|
|
6561
|
-
description: "tasks.unclaim (mutate) \u2014
|
|
6726
|
+
description: "tasks.unclaim (mutate) \u2014 release the caller session's claim lease (never the human assignee)",
|
|
6562
6727
|
tier: 0,
|
|
6563
6728
|
idempotent: false,
|
|
6564
6729
|
sessionRequired: true,
|
|
@@ -6569,6 +6734,12 @@ var init_operations_registry = __esm({
|
|
|
6569
6734
|
type: "string",
|
|
6570
6735
|
required: true,
|
|
6571
6736
|
description: "Task ID to unclaim"
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
name: "forceClaim",
|
|
6740
|
+
type: "boolean",
|
|
6741
|
+
required: false,
|
|
6742
|
+
description: "Release another session's lease (audited)"
|
|
6572
6743
|
}
|
|
6573
6744
|
]
|
|
6574
6745
|
},
|
|
@@ -6823,6 +6994,20 @@ var init_operations_registry = __esm({
|
|
|
6823
6994
|
type: "boolean",
|
|
6824
6995
|
required: false,
|
|
6825
6996
|
description: "When true (default), adds toTaskId as a dependency on fromTaskId so it cannot complete before the pivot resolves"
|
|
6997
|
+
},
|
|
6998
|
+
{
|
|
6999
|
+
name: "takeOver",
|
|
7000
|
+
type: "boolean",
|
|
7001
|
+
required: false,
|
|
7002
|
+
description: "Take over another session's EXPIRED claim on toTaskId (audited)",
|
|
7003
|
+
cli: { flag: "take-over" }
|
|
7004
|
+
},
|
|
7005
|
+
{
|
|
7006
|
+
name: "forceClaim",
|
|
7007
|
+
type: "boolean",
|
|
7008
|
+
required: false,
|
|
7009
|
+
description: "Take over another session's LIVE claim on toTaskId (audited)",
|
|
7010
|
+
cli: { flag: "force-claim" }
|
|
6826
7011
|
}
|
|
6827
7012
|
]
|
|
6828
7013
|
},
|
|
@@ -9461,6 +9646,78 @@ var init_operations_registry = __esm({
|
|
|
9461
9646
|
requiredParams: [],
|
|
9462
9647
|
params: []
|
|
9463
9648
|
},
|
|
9649
|
+
{
|
|
9650
|
+
gateway: "query",
|
|
9651
|
+
domain: "nexus",
|
|
9652
|
+
operation: "projects.fleet",
|
|
9653
|
+
description: "nexus.projects.fleet (query) \u2014 fleet view: every project with its location on each device, last recorded git state (local, and remote as of the last fetch) and staleness; paged, counts first, read-only",
|
|
9654
|
+
tier: 1,
|
|
9655
|
+
idempotent: true,
|
|
9656
|
+
sessionRequired: false,
|
|
9657
|
+
requiredParams: [],
|
|
9658
|
+
params: [
|
|
9659
|
+
{
|
|
9660
|
+
name: "device",
|
|
9661
|
+
type: "string",
|
|
9662
|
+
required: false,
|
|
9663
|
+
description: "Only locations on this device (device id, hostname, or current)"
|
|
9664
|
+
},
|
|
9665
|
+
{
|
|
9666
|
+
name: "missing",
|
|
9667
|
+
type: "boolean",
|
|
9668
|
+
required: false,
|
|
9669
|
+
description: "Only projects with a missing location"
|
|
9670
|
+
},
|
|
9671
|
+
{
|
|
9672
|
+
name: "dirty",
|
|
9673
|
+
type: "boolean",
|
|
9674
|
+
required: false,
|
|
9675
|
+
description: "Only projects with a dirty location"
|
|
9676
|
+
},
|
|
9677
|
+
{
|
|
9678
|
+
name: "behind",
|
|
9679
|
+
type: "boolean",
|
|
9680
|
+
required: false,
|
|
9681
|
+
description: "Only projects with a location behind its upstream (as of the last fetch)"
|
|
9682
|
+
},
|
|
9683
|
+
{
|
|
9684
|
+
name: "ahead",
|
|
9685
|
+
type: "boolean",
|
|
9686
|
+
required: false,
|
|
9687
|
+
description: "Only projects with a location ahead of its upstream (as of the last fetch)"
|
|
9688
|
+
},
|
|
9689
|
+
{
|
|
9690
|
+
name: "stale",
|
|
9691
|
+
type: "boolean",
|
|
9692
|
+
required: false,
|
|
9693
|
+
description: "Only projects with a never-probed, old-probe or old-fetch location"
|
|
9694
|
+
},
|
|
9695
|
+
{
|
|
9696
|
+
name: "errored",
|
|
9697
|
+
type: "boolean",
|
|
9698
|
+
required: false,
|
|
9699
|
+
description: "Only projects whose last probe recorded an error"
|
|
9700
|
+
},
|
|
9701
|
+
{
|
|
9702
|
+
name: "staleAfterMs",
|
|
9703
|
+
type: "number",
|
|
9704
|
+
required: false,
|
|
9705
|
+
description: "Staleness window for probes, fetches and heartbeats (default 24h)"
|
|
9706
|
+
},
|
|
9707
|
+
{
|
|
9708
|
+
name: "limit",
|
|
9709
|
+
type: "number",
|
|
9710
|
+
required: false,
|
|
9711
|
+
description: "Page size in projects (default 50, max 500; 0 = all)"
|
|
9712
|
+
},
|
|
9713
|
+
{
|
|
9714
|
+
name: "offset",
|
|
9715
|
+
type: "number",
|
|
9716
|
+
required: false,
|
|
9717
|
+
description: "Projects skipped before the page"
|
|
9718
|
+
}
|
|
9719
|
+
]
|
|
9720
|
+
},
|
|
9464
9721
|
{
|
|
9465
9722
|
gateway: "mutate",
|
|
9466
9723
|
domain: "nexus",
|
|
@@ -13415,7 +13672,10 @@ var init_evidence_atom_schema = __esm({
|
|
|
13415
13672
|
["commit", "note"],
|
|
13416
13673
|
["decision", "files"],
|
|
13417
13674
|
["decision", "note"],
|
|
13418
|
-
["pr", "files"]
|
|
13675
|
+
["pr", "files"],
|
|
13676
|
+
// T12689: a deletion-only PR (no bytes to hash). Contextual validation
|
|
13677
|
+
// accepts this only when every change the PR made is a deletion.
|
|
13678
|
+
["pr", "note"]
|
|
13419
13679
|
]
|
|
13420
13680
|
},
|
|
13421
13681
|
testsPassed: { oneOf: [["test-run"], ["tool"], ["ci"]] },
|
|
@@ -17259,7 +17519,7 @@ var init_collection_keys = __esm({
|
|
|
17259
17519
|
|
|
17260
17520
|
// packages/contracts/src/decide.ts
|
|
17261
17521
|
import { z as z24 } from "zod";
|
|
17262
|
-
var DECISION_QUESTION_TYPES, DECISION_OUTCOME_SOURCES, DECISION_REQUEST_LIMITS, decisionQuestionTypeSchema, decisionOutcomeSourceSchema, decisionInstructionsSchema, unitIntervalSchema, decisionStateSchema, noulDecisionQuestionSchema, choiceDecisionQuestionSchema, scoreDecisionQuestionSchema, decisionQuestionSchema, decisionRequestSchema, noulDecisionAnswerSchema, choiceDecisionAnswerSchema, scoreDecisionAnswerSchema, decisionAnswerSchema, decisionOutcomeSchema, decisionProviderConfigSchema;
|
|
17522
|
+
var DECISION_QUESTION_TYPES, DECISION_OUTCOME_SOURCES, DECISION_REQUEST_LIMITS, DECISION_PROVIDER_KINDS, decisionQuestionTypeSchema, decisionOutcomeSourceSchema, decisionInstructionsSchema, unitIntervalSchema, decisionStateSchema, noulDecisionQuestionSchema, choiceDecisionQuestionSchema, scoreDecisionQuestionSchema, decisionQuestionSchema, decisionRequestSchema, noulDecisionAnswerSchema, choiceDecisionAnswerSchema, scoreDecisionAnswerSchema, decisionAnswerSchema, decisionOutcomeSchema, decisionProviderKindSchema, decisionProviderConfigSchema;
|
|
17263
17523
|
var init_decide = __esm({
|
|
17264
17524
|
"packages/contracts/src/decide.ts"() {
|
|
17265
17525
|
"use strict";
|
|
@@ -17283,6 +17543,7 @@ var init_decide = __esm({
|
|
|
17283
17543
|
/** Maximum number of levels on a `score` question's scale. */
|
|
17284
17544
|
maxScoreLevels: 10
|
|
17285
17545
|
};
|
|
17546
|
+
DECISION_PROVIDER_KINDS = ["layahost", "jev"];
|
|
17286
17547
|
decisionQuestionTypeSchema = z24.enum(DECISION_QUESTION_TYPES);
|
|
17287
17548
|
decisionOutcomeSourceSchema = z24.enum(DECISION_OUTCOME_SOURCES);
|
|
17288
17549
|
decisionInstructionsSchema = z24.union([z24.string(), z24.record(z24.string(), z24.json())]);
|
|
@@ -17320,6 +17581,8 @@ var init_decide = __esm({
|
|
|
17320
17581
|
]);
|
|
17321
17582
|
decisionRequestSchema = z24.object({
|
|
17322
17583
|
model: z24.string().min(1).optional(),
|
|
17584
|
+
lang: z24.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/).optional(),
|
|
17585
|
+
cache: z24.boolean().optional(),
|
|
17323
17586
|
state: decisionStateSchema,
|
|
17324
17587
|
questions: z24.record(z24.string().min(1), decisionQuestionSchema).refine(
|
|
17325
17588
|
(questions) => {
|
|
@@ -17360,10 +17623,48 @@ var init_decide = __esm({
|
|
|
17360
17623
|
requestId: z24.string().min(1).optional(),
|
|
17361
17624
|
latencyMs: z24.number().nonnegative(),
|
|
17362
17625
|
costUsd: z24.number().nonnegative().optional(),
|
|
17626
|
+
costMicros: z24.number().int().nonnegative().optional(),
|
|
17627
|
+
balanceMicros: z24.number().int().optional(),
|
|
17628
|
+
checkpoint: z24.string().min(1).optional(),
|
|
17363
17629
|
inputTokens: z24.number().int().nonnegative().optional()
|
|
17364
17630
|
});
|
|
17631
|
+
decisionProviderKindSchema = z24.enum(DECISION_PROVIDER_KINDS);
|
|
17365
17632
|
decisionProviderConfigSchema = z24.object({
|
|
17366
|
-
baseUrl: z24.url()
|
|
17633
|
+
baseUrl: z24.url(),
|
|
17634
|
+
provider: decisionProviderKindSchema.optional()
|
|
17635
|
+
});
|
|
17636
|
+
}
|
|
17637
|
+
});
|
|
17638
|
+
|
|
17639
|
+
// packages/contracts/src/decide-sites.ts
|
|
17640
|
+
var init_decide_sites = __esm({
|
|
17641
|
+
"packages/contracts/src/decide-sites.ts"() {
|
|
17642
|
+
"use strict";
|
|
17643
|
+
}
|
|
17644
|
+
});
|
|
17645
|
+
|
|
17646
|
+
// packages/contracts/src/nexus-account.ts
|
|
17647
|
+
import { z as z25 } from "zod";
|
|
17648
|
+
var nexusAccountUserSchema, nexusAccountOrganizationSchema, nexusAccountMeSchema;
|
|
17649
|
+
var init_nexus_account = __esm({
|
|
17650
|
+
"packages/contracts/src/nexus-account.ts"() {
|
|
17651
|
+
"use strict";
|
|
17652
|
+
nexusAccountUserSchema = z25.object({
|
|
17653
|
+
id: z25.string(),
|
|
17654
|
+
email: z25.string(),
|
|
17655
|
+
name: z25.string().nullable().optional()
|
|
17656
|
+
});
|
|
17657
|
+
nexusAccountOrganizationSchema = z25.object({
|
|
17658
|
+
id: z25.string(),
|
|
17659
|
+
name: z25.string(),
|
|
17660
|
+
slug: z25.string().nullable().optional(),
|
|
17661
|
+
role: z25.string().optional(),
|
|
17662
|
+
/** `true` for the personal organization created at sign-up. */
|
|
17663
|
+
personal: z25.boolean().optional()
|
|
17664
|
+
});
|
|
17665
|
+
nexusAccountMeSchema = z25.object({
|
|
17666
|
+
user: nexusAccountUserSchema,
|
|
17667
|
+
organizations: z25.array(nexusAccountOrganizationSchema).default([])
|
|
17367
17668
|
});
|
|
17368
17669
|
}
|
|
17369
17670
|
});
|
|
@@ -17421,6 +17722,7 @@ var init_src = __esm({
|
|
|
17421
17722
|
init_ensures_schema_registry();
|
|
17422
17723
|
init_entities();
|
|
17423
17724
|
init_operations();
|
|
17725
|
+
init_nexus();
|
|
17424
17726
|
init_nexus_scope_map();
|
|
17425
17727
|
init_nexus_user_profile();
|
|
17426
17728
|
init_output_contracts_data();
|
|
@@ -17449,6 +17751,8 @@ var init_src = __esm({
|
|
|
17449
17751
|
init_caamp_markers();
|
|
17450
17752
|
init_collection_keys();
|
|
17451
17753
|
init_decide();
|
|
17754
|
+
init_decide_sites();
|
|
17755
|
+
init_nexus_account();
|
|
17452
17756
|
init_task_id();
|
|
17453
17757
|
}
|
|
17454
17758
|
});
|
|
@@ -31469,7 +31773,7 @@ function resolveRef(ref, ctx) {
|
|
|
31469
31773
|
function convertBaseSchema(schema, ctx) {
|
|
31470
31774
|
if (schema.not !== void 0) {
|
|
31471
31775
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
31472
|
-
return
|
|
31776
|
+
return z26.never();
|
|
31473
31777
|
}
|
|
31474
31778
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
31475
31779
|
}
|
|
@@ -31491,7 +31795,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31491
31795
|
return ctx.refs.get(refPath);
|
|
31492
31796
|
}
|
|
31493
31797
|
if (ctx.processing.has(refPath)) {
|
|
31494
|
-
return
|
|
31798
|
+
return z26.lazy(() => {
|
|
31495
31799
|
if (!ctx.refs.has(refPath)) {
|
|
31496
31800
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
31497
31801
|
}
|
|
@@ -31508,25 +31812,25 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31508
31812
|
if (schema.enum !== void 0) {
|
|
31509
31813
|
const enumValues = schema.enum;
|
|
31510
31814
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
31511
|
-
return
|
|
31815
|
+
return z26.null();
|
|
31512
31816
|
}
|
|
31513
31817
|
if (enumValues.length === 0) {
|
|
31514
|
-
return
|
|
31818
|
+
return z26.never();
|
|
31515
31819
|
}
|
|
31516
31820
|
if (enumValues.length === 1) {
|
|
31517
|
-
return
|
|
31821
|
+
return z26.literal(enumValues[0]);
|
|
31518
31822
|
}
|
|
31519
31823
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
31520
|
-
return
|
|
31824
|
+
return z26.enum(enumValues);
|
|
31521
31825
|
}
|
|
31522
|
-
const literalSchemas = enumValues.map((v) =>
|
|
31826
|
+
const literalSchemas = enumValues.map((v) => z26.literal(v));
|
|
31523
31827
|
if (literalSchemas.length < 2) {
|
|
31524
31828
|
return literalSchemas[0];
|
|
31525
31829
|
}
|
|
31526
|
-
return
|
|
31830
|
+
return z26.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
31527
31831
|
}
|
|
31528
31832
|
if (schema.const !== void 0) {
|
|
31529
|
-
return
|
|
31833
|
+
return z26.literal(schema.const);
|
|
31530
31834
|
}
|
|
31531
31835
|
const type = schema.type;
|
|
31532
31836
|
if (Array.isArray(type)) {
|
|
@@ -31535,68 +31839,68 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31535
31839
|
return convertBaseSchema(typeSchema, ctx);
|
|
31536
31840
|
});
|
|
31537
31841
|
if (typeSchemas.length === 0) {
|
|
31538
|
-
return
|
|
31842
|
+
return z26.never();
|
|
31539
31843
|
}
|
|
31540
31844
|
if (typeSchemas.length === 1) {
|
|
31541
31845
|
return typeSchemas[0];
|
|
31542
31846
|
}
|
|
31543
|
-
return
|
|
31847
|
+
return z26.union(typeSchemas);
|
|
31544
31848
|
}
|
|
31545
31849
|
if (!type) {
|
|
31546
|
-
return
|
|
31850
|
+
return z26.any();
|
|
31547
31851
|
}
|
|
31548
31852
|
let zodSchema2;
|
|
31549
31853
|
switch (type) {
|
|
31550
31854
|
case "string": {
|
|
31551
|
-
let stringSchema =
|
|
31855
|
+
let stringSchema = z26.string();
|
|
31552
31856
|
if (schema.format) {
|
|
31553
31857
|
const format = schema.format;
|
|
31554
31858
|
if (format === "email") {
|
|
31555
|
-
stringSchema = stringSchema.check(
|
|
31859
|
+
stringSchema = stringSchema.check(z26.email());
|
|
31556
31860
|
} else if (format === "uri" || format === "uri-reference") {
|
|
31557
|
-
stringSchema = stringSchema.check(
|
|
31861
|
+
stringSchema = stringSchema.check(z26.url());
|
|
31558
31862
|
} else if (format === "uuid" || format === "guid") {
|
|
31559
|
-
stringSchema = stringSchema.check(
|
|
31863
|
+
stringSchema = stringSchema.check(z26.uuid());
|
|
31560
31864
|
} else if (format === "date-time") {
|
|
31561
|
-
stringSchema = stringSchema.check(
|
|
31865
|
+
stringSchema = stringSchema.check(z26.iso.datetime());
|
|
31562
31866
|
} else if (format === "date") {
|
|
31563
|
-
stringSchema = stringSchema.check(
|
|
31867
|
+
stringSchema = stringSchema.check(z26.iso.date());
|
|
31564
31868
|
} else if (format === "time") {
|
|
31565
|
-
stringSchema = stringSchema.check(
|
|
31869
|
+
stringSchema = stringSchema.check(z26.iso.time());
|
|
31566
31870
|
} else if (format === "duration") {
|
|
31567
|
-
stringSchema = stringSchema.check(
|
|
31871
|
+
stringSchema = stringSchema.check(z26.iso.duration());
|
|
31568
31872
|
} else if (format === "ipv4") {
|
|
31569
|
-
stringSchema = stringSchema.check(
|
|
31873
|
+
stringSchema = stringSchema.check(z26.ipv4());
|
|
31570
31874
|
} else if (format === "ipv6") {
|
|
31571
|
-
stringSchema = stringSchema.check(
|
|
31875
|
+
stringSchema = stringSchema.check(z26.ipv6());
|
|
31572
31876
|
} else if (format === "mac") {
|
|
31573
|
-
stringSchema = stringSchema.check(
|
|
31877
|
+
stringSchema = stringSchema.check(z26.mac());
|
|
31574
31878
|
} else if (format === "cidr") {
|
|
31575
|
-
stringSchema = stringSchema.check(
|
|
31879
|
+
stringSchema = stringSchema.check(z26.cidrv4());
|
|
31576
31880
|
} else if (format === "cidr-v6") {
|
|
31577
|
-
stringSchema = stringSchema.check(
|
|
31881
|
+
stringSchema = stringSchema.check(z26.cidrv6());
|
|
31578
31882
|
} else if (format === "base64") {
|
|
31579
|
-
stringSchema = stringSchema.check(
|
|
31883
|
+
stringSchema = stringSchema.check(z26.base64());
|
|
31580
31884
|
} else if (format === "base64url") {
|
|
31581
|
-
stringSchema = stringSchema.check(
|
|
31885
|
+
stringSchema = stringSchema.check(z26.base64url());
|
|
31582
31886
|
} else if (format === "e164") {
|
|
31583
|
-
stringSchema = stringSchema.check(
|
|
31887
|
+
stringSchema = stringSchema.check(z26.e164());
|
|
31584
31888
|
} else if (format === "jwt") {
|
|
31585
|
-
stringSchema = stringSchema.check(
|
|
31889
|
+
stringSchema = stringSchema.check(z26.jwt());
|
|
31586
31890
|
} else if (format === "emoji") {
|
|
31587
|
-
stringSchema = stringSchema.check(
|
|
31891
|
+
stringSchema = stringSchema.check(z26.emoji());
|
|
31588
31892
|
} else if (format === "nanoid") {
|
|
31589
|
-
stringSchema = stringSchema.check(
|
|
31893
|
+
stringSchema = stringSchema.check(z26.nanoid());
|
|
31590
31894
|
} else if (format === "cuid") {
|
|
31591
|
-
stringSchema = stringSchema.check(
|
|
31895
|
+
stringSchema = stringSchema.check(z26.cuid());
|
|
31592
31896
|
} else if (format === "cuid2") {
|
|
31593
|
-
stringSchema = stringSchema.check(
|
|
31897
|
+
stringSchema = stringSchema.check(z26.cuid2());
|
|
31594
31898
|
} else if (format === "ulid") {
|
|
31595
|
-
stringSchema = stringSchema.check(
|
|
31899
|
+
stringSchema = stringSchema.check(z26.ulid());
|
|
31596
31900
|
} else if (format === "xid") {
|
|
31597
|
-
stringSchema = stringSchema.check(
|
|
31901
|
+
stringSchema = stringSchema.check(z26.xid());
|
|
31598
31902
|
} else if (format === "ksuid") {
|
|
31599
|
-
stringSchema = stringSchema.check(
|
|
31903
|
+
stringSchema = stringSchema.check(z26.ksuid());
|
|
31600
31904
|
}
|
|
31601
31905
|
}
|
|
31602
31906
|
if (typeof schema.minLength === "number") {
|
|
@@ -31613,7 +31917,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31613
31917
|
}
|
|
31614
31918
|
case "number":
|
|
31615
31919
|
case "integer": {
|
|
31616
|
-
let numberSchema = type === "integer" ?
|
|
31920
|
+
let numberSchema = type === "integer" ? z26.number().int() : z26.number();
|
|
31617
31921
|
if (typeof schema.minimum === "number") {
|
|
31618
31922
|
numberSchema = numberSchema.min(schema.minimum);
|
|
31619
31923
|
}
|
|
@@ -31637,11 +31941,11 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31637
31941
|
break;
|
|
31638
31942
|
}
|
|
31639
31943
|
case "boolean": {
|
|
31640
|
-
zodSchema2 =
|
|
31944
|
+
zodSchema2 = z26.boolean();
|
|
31641
31945
|
break;
|
|
31642
31946
|
}
|
|
31643
31947
|
case "null": {
|
|
31644
|
-
zodSchema2 =
|
|
31948
|
+
zodSchema2 = z26.null();
|
|
31645
31949
|
break;
|
|
31646
31950
|
}
|
|
31647
31951
|
case "object": {
|
|
@@ -31654,14 +31958,14 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31654
31958
|
}
|
|
31655
31959
|
if (schema.propertyNames) {
|
|
31656
31960
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
31657
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) :
|
|
31961
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z26.any();
|
|
31658
31962
|
if (Object.keys(shape).length === 0) {
|
|
31659
|
-
zodSchema2 =
|
|
31963
|
+
zodSchema2 = z26.record(keySchema, valueSchema);
|
|
31660
31964
|
break;
|
|
31661
31965
|
}
|
|
31662
|
-
const objectSchema2 =
|
|
31663
|
-
const recordSchema =
|
|
31664
|
-
zodSchema2 =
|
|
31966
|
+
const objectSchema2 = z26.object(shape).passthrough();
|
|
31967
|
+
const recordSchema = z26.looseRecord(keySchema, valueSchema);
|
|
31968
|
+
zodSchema2 = z26.intersection(objectSchema2, recordSchema);
|
|
31665
31969
|
break;
|
|
31666
31970
|
}
|
|
31667
31971
|
if (schema.patternProperties) {
|
|
@@ -31670,28 +31974,28 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31670
31974
|
const looseRecords = [];
|
|
31671
31975
|
for (const pattern of patternKeys) {
|
|
31672
31976
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
31673
|
-
const keySchema =
|
|
31674
|
-
looseRecords.push(
|
|
31977
|
+
const keySchema = z26.string().regex(new RegExp(pattern));
|
|
31978
|
+
looseRecords.push(z26.looseRecord(keySchema, patternValue));
|
|
31675
31979
|
}
|
|
31676
31980
|
const schemasToIntersect = [];
|
|
31677
31981
|
if (Object.keys(shape).length > 0) {
|
|
31678
|
-
schemasToIntersect.push(
|
|
31982
|
+
schemasToIntersect.push(z26.object(shape).passthrough());
|
|
31679
31983
|
}
|
|
31680
31984
|
schemasToIntersect.push(...looseRecords);
|
|
31681
31985
|
if (schemasToIntersect.length === 0) {
|
|
31682
|
-
zodSchema2 =
|
|
31986
|
+
zodSchema2 = z26.object({}).passthrough();
|
|
31683
31987
|
} else if (schemasToIntersect.length === 1) {
|
|
31684
31988
|
zodSchema2 = schemasToIntersect[0];
|
|
31685
31989
|
} else {
|
|
31686
|
-
let result =
|
|
31990
|
+
let result = z26.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
31687
31991
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
31688
|
-
result =
|
|
31992
|
+
result = z26.intersection(result, schemasToIntersect[i]);
|
|
31689
31993
|
}
|
|
31690
31994
|
zodSchema2 = result;
|
|
31691
31995
|
}
|
|
31692
31996
|
break;
|
|
31693
31997
|
}
|
|
31694
|
-
const objectSchema =
|
|
31998
|
+
const objectSchema = z26.object(shape);
|
|
31695
31999
|
if (schema.additionalProperties === false) {
|
|
31696
32000
|
zodSchema2 = objectSchema.strict();
|
|
31697
32001
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -31708,33 +32012,33 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31708
32012
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
31709
32013
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
31710
32014
|
if (rest) {
|
|
31711
|
-
zodSchema2 =
|
|
32015
|
+
zodSchema2 = z26.tuple(tupleItems).rest(rest);
|
|
31712
32016
|
} else {
|
|
31713
|
-
zodSchema2 =
|
|
32017
|
+
zodSchema2 = z26.tuple(tupleItems);
|
|
31714
32018
|
}
|
|
31715
32019
|
if (typeof schema.minItems === "number") {
|
|
31716
|
-
zodSchema2 = zodSchema2.check(
|
|
32020
|
+
zodSchema2 = zodSchema2.check(z26.minLength(schema.minItems));
|
|
31717
32021
|
}
|
|
31718
32022
|
if (typeof schema.maxItems === "number") {
|
|
31719
|
-
zodSchema2 = zodSchema2.check(
|
|
32023
|
+
zodSchema2 = zodSchema2.check(z26.maxLength(schema.maxItems));
|
|
31720
32024
|
}
|
|
31721
32025
|
} else if (Array.isArray(items)) {
|
|
31722
32026
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
31723
32027
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
31724
32028
|
if (rest) {
|
|
31725
|
-
zodSchema2 =
|
|
32029
|
+
zodSchema2 = z26.tuple(tupleItems).rest(rest);
|
|
31726
32030
|
} else {
|
|
31727
|
-
zodSchema2 =
|
|
32031
|
+
zodSchema2 = z26.tuple(tupleItems);
|
|
31728
32032
|
}
|
|
31729
32033
|
if (typeof schema.minItems === "number") {
|
|
31730
|
-
zodSchema2 = zodSchema2.check(
|
|
32034
|
+
zodSchema2 = zodSchema2.check(z26.minLength(schema.minItems));
|
|
31731
32035
|
}
|
|
31732
32036
|
if (typeof schema.maxItems === "number") {
|
|
31733
|
-
zodSchema2 = zodSchema2.check(
|
|
32037
|
+
zodSchema2 = zodSchema2.check(z26.maxLength(schema.maxItems));
|
|
31734
32038
|
}
|
|
31735
32039
|
} else if (items !== void 0) {
|
|
31736
32040
|
const element = convertSchema(items, ctx);
|
|
31737
|
-
let arraySchema =
|
|
32041
|
+
let arraySchema = z26.array(element);
|
|
31738
32042
|
if (typeof schema.minItems === "number") {
|
|
31739
32043
|
arraySchema = arraySchema.min(schema.minItems);
|
|
31740
32044
|
}
|
|
@@ -31743,7 +32047,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31743
32047
|
}
|
|
31744
32048
|
zodSchema2 = arraySchema;
|
|
31745
32049
|
} else {
|
|
31746
|
-
zodSchema2 =
|
|
32050
|
+
zodSchema2 = z26.array(z26.any());
|
|
31747
32051
|
}
|
|
31748
32052
|
break;
|
|
31749
32053
|
}
|
|
@@ -31760,37 +32064,37 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31760
32064
|
}
|
|
31761
32065
|
function convertSchema(schema, ctx) {
|
|
31762
32066
|
if (typeof schema === "boolean") {
|
|
31763
|
-
return schema ?
|
|
32067
|
+
return schema ? z26.any() : z26.never();
|
|
31764
32068
|
}
|
|
31765
32069
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
31766
32070
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
31767
32071
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
31768
32072
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
31769
|
-
const anyOfUnion =
|
|
31770
|
-
baseSchema = hasExplicitType ?
|
|
32073
|
+
const anyOfUnion = z26.union(options);
|
|
32074
|
+
baseSchema = hasExplicitType ? z26.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
31771
32075
|
}
|
|
31772
32076
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
31773
32077
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
31774
|
-
const oneOfUnion =
|
|
31775
|
-
baseSchema = hasExplicitType ?
|
|
32078
|
+
const oneOfUnion = z26.xor(options);
|
|
32079
|
+
baseSchema = hasExplicitType ? z26.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
31776
32080
|
}
|
|
31777
32081
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
31778
32082
|
if (schema.allOf.length === 0) {
|
|
31779
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
32083
|
+
baseSchema = hasExplicitType ? baseSchema : z26.any();
|
|
31780
32084
|
} else {
|
|
31781
32085
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
31782
32086
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
31783
32087
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
31784
|
-
result =
|
|
32088
|
+
result = z26.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
31785
32089
|
}
|
|
31786
32090
|
baseSchema = result;
|
|
31787
32091
|
}
|
|
31788
32092
|
}
|
|
31789
32093
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
31790
|
-
baseSchema =
|
|
32094
|
+
baseSchema = z26.nullable(baseSchema);
|
|
31791
32095
|
}
|
|
31792
32096
|
if (schema.readOnly === true) {
|
|
31793
|
-
baseSchema =
|
|
32097
|
+
baseSchema = z26.readonly(baseSchema);
|
|
31794
32098
|
}
|
|
31795
32099
|
const extraMeta = {};
|
|
31796
32100
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
@@ -31817,7 +32121,7 @@ function convertSchema(schema, ctx) {
|
|
|
31817
32121
|
}
|
|
31818
32122
|
function fromJSONSchema(schema, params) {
|
|
31819
32123
|
if (typeof schema === "boolean") {
|
|
31820
|
-
return schema ?
|
|
32124
|
+
return schema ? z26.any() : z26.never();
|
|
31821
32125
|
}
|
|
31822
32126
|
const version2 = detectVersion(schema, params?.defaultTarget);
|
|
31823
32127
|
const defs = schema.$defs || schema.definitions || {};
|
|
@@ -31831,14 +32135,14 @@ function fromJSONSchema(schema, params) {
|
|
|
31831
32135
|
};
|
|
31832
32136
|
return convertSchema(schema, ctx);
|
|
31833
32137
|
}
|
|
31834
|
-
var
|
|
32138
|
+
var z26, RECOGNIZED_KEYS;
|
|
31835
32139
|
var init_from_json_schema = __esm({
|
|
31836
32140
|
"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
|
|
31837
32141
|
init_registries();
|
|
31838
32142
|
init_checks2();
|
|
31839
32143
|
init_iso();
|
|
31840
32144
|
init_schemas2();
|
|
31841
|
-
|
|
32145
|
+
z26 = {
|
|
31842
32146
|
...schemas_exports2,
|
|
31843
32147
|
...checks_exports2,
|
|
31844
32148
|
iso: iso_exports
|