@cleocode/adapters 2026.9.23 → 2026.9.25
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 +333 -83
- package/dist/index.js.map +3 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -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,
|
|
@@ -5788,6 +5879,13 @@ var init_operations_registry = __esm({
|
|
|
5788
5879
|
required: true,
|
|
5789
5880
|
description: "taskId parameter",
|
|
5790
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" }
|
|
5791
5889
|
}
|
|
5792
5890
|
]
|
|
5793
5891
|
},
|
|
@@ -6448,7 +6546,7 @@ var init_operations_registry = __esm({
|
|
|
6448
6546
|
gateway: "mutate",
|
|
6449
6547
|
domain: "tasks",
|
|
6450
6548
|
operation: "start",
|
|
6451
|
-
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)",
|
|
6452
6550
|
tier: 0,
|
|
6453
6551
|
idempotent: false,
|
|
6454
6552
|
sessionRequired: false,
|
|
@@ -6460,6 +6558,20 @@ var init_operations_registry = __esm({
|
|
|
6460
6558
|
required: true,
|
|
6461
6559
|
description: "taskId parameter",
|
|
6462
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" }
|
|
6463
6575
|
}
|
|
6464
6576
|
]
|
|
6465
6577
|
},
|
|
@@ -6569,11 +6681,11 @@ var init_operations_registry = __esm({
|
|
|
6569
6681
|
gateway: "mutate",
|
|
6570
6682
|
domain: "tasks",
|
|
6571
6683
|
operation: "claim",
|
|
6572
|
-
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)",
|
|
6573
6685
|
tier: 0,
|
|
6574
6686
|
idempotent: false,
|
|
6575
6687
|
sessionRequired: true,
|
|
6576
|
-
requiredParams: ["taskId"
|
|
6688
|
+
requiredParams: ["taskId"],
|
|
6577
6689
|
params: [
|
|
6578
6690
|
{
|
|
6579
6691
|
name: "taskId",
|
|
@@ -6584,8 +6696,26 @@ var init_operations_registry = __esm({
|
|
|
6584
6696
|
{
|
|
6585
6697
|
name: "agentId",
|
|
6586
6698
|
type: "string",
|
|
6587
|
-
required:
|
|
6588
|
-
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)"
|
|
6589
6719
|
}
|
|
6590
6720
|
]
|
|
6591
6721
|
},
|
|
@@ -6593,7 +6723,7 @@ var init_operations_registry = __esm({
|
|
|
6593
6723
|
gateway: "mutate",
|
|
6594
6724
|
domain: "tasks",
|
|
6595
6725
|
operation: "unclaim",
|
|
6596
|
-
description: "tasks.unclaim (mutate) \u2014
|
|
6726
|
+
description: "tasks.unclaim (mutate) \u2014 release the caller session's claim lease (never the human assignee)",
|
|
6597
6727
|
tier: 0,
|
|
6598
6728
|
idempotent: false,
|
|
6599
6729
|
sessionRequired: true,
|
|
@@ -6604,6 +6734,12 @@ var init_operations_registry = __esm({
|
|
|
6604
6734
|
type: "string",
|
|
6605
6735
|
required: true,
|
|
6606
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)"
|
|
6607
6743
|
}
|
|
6608
6744
|
]
|
|
6609
6745
|
},
|
|
@@ -6858,6 +6994,20 @@ var init_operations_registry = __esm({
|
|
|
6858
6994
|
type: "boolean",
|
|
6859
6995
|
required: false,
|
|
6860
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" }
|
|
6861
7011
|
}
|
|
6862
7012
|
]
|
|
6863
7013
|
},
|
|
@@ -9496,6 +9646,78 @@ var init_operations_registry = __esm({
|
|
|
9496
9646
|
requiredParams: [],
|
|
9497
9647
|
params: []
|
|
9498
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
|
+
},
|
|
9499
9721
|
{
|
|
9500
9722
|
gateway: "mutate",
|
|
9501
9723
|
domain: "nexus",
|
|
@@ -17421,6 +17643,32 @@ var init_decide_sites = __esm({
|
|
|
17421
17643
|
}
|
|
17422
17644
|
});
|
|
17423
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([])
|
|
17668
|
+
});
|
|
17669
|
+
}
|
|
17670
|
+
});
|
|
17671
|
+
|
|
17424
17672
|
// packages/contracts/src/task-id.ts
|
|
17425
17673
|
var init_task_id = __esm({
|
|
17426
17674
|
"packages/contracts/src/task-id.ts"() {
|
|
@@ -17474,6 +17722,7 @@ var init_src = __esm({
|
|
|
17474
17722
|
init_ensures_schema_registry();
|
|
17475
17723
|
init_entities();
|
|
17476
17724
|
init_operations();
|
|
17725
|
+
init_nexus();
|
|
17477
17726
|
init_nexus_scope_map();
|
|
17478
17727
|
init_nexus_user_profile();
|
|
17479
17728
|
init_output_contracts_data();
|
|
@@ -17503,6 +17752,7 @@ var init_src = __esm({
|
|
|
17503
17752
|
init_collection_keys();
|
|
17504
17753
|
init_decide();
|
|
17505
17754
|
init_decide_sites();
|
|
17755
|
+
init_nexus_account();
|
|
17506
17756
|
init_task_id();
|
|
17507
17757
|
}
|
|
17508
17758
|
});
|
|
@@ -31523,7 +31773,7 @@ function resolveRef(ref, ctx) {
|
|
|
31523
31773
|
function convertBaseSchema(schema, ctx) {
|
|
31524
31774
|
if (schema.not !== void 0) {
|
|
31525
31775
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
31526
|
-
return
|
|
31776
|
+
return z26.never();
|
|
31527
31777
|
}
|
|
31528
31778
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
31529
31779
|
}
|
|
@@ -31545,7 +31795,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31545
31795
|
return ctx.refs.get(refPath);
|
|
31546
31796
|
}
|
|
31547
31797
|
if (ctx.processing.has(refPath)) {
|
|
31548
|
-
return
|
|
31798
|
+
return z26.lazy(() => {
|
|
31549
31799
|
if (!ctx.refs.has(refPath)) {
|
|
31550
31800
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
31551
31801
|
}
|
|
@@ -31562,25 +31812,25 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31562
31812
|
if (schema.enum !== void 0) {
|
|
31563
31813
|
const enumValues = schema.enum;
|
|
31564
31814
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
31565
|
-
return
|
|
31815
|
+
return z26.null();
|
|
31566
31816
|
}
|
|
31567
31817
|
if (enumValues.length === 0) {
|
|
31568
|
-
return
|
|
31818
|
+
return z26.never();
|
|
31569
31819
|
}
|
|
31570
31820
|
if (enumValues.length === 1) {
|
|
31571
|
-
return
|
|
31821
|
+
return z26.literal(enumValues[0]);
|
|
31572
31822
|
}
|
|
31573
31823
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
31574
|
-
return
|
|
31824
|
+
return z26.enum(enumValues);
|
|
31575
31825
|
}
|
|
31576
|
-
const literalSchemas = enumValues.map((v) =>
|
|
31826
|
+
const literalSchemas = enumValues.map((v) => z26.literal(v));
|
|
31577
31827
|
if (literalSchemas.length < 2) {
|
|
31578
31828
|
return literalSchemas[0];
|
|
31579
31829
|
}
|
|
31580
|
-
return
|
|
31830
|
+
return z26.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
31581
31831
|
}
|
|
31582
31832
|
if (schema.const !== void 0) {
|
|
31583
|
-
return
|
|
31833
|
+
return z26.literal(schema.const);
|
|
31584
31834
|
}
|
|
31585
31835
|
const type = schema.type;
|
|
31586
31836
|
if (Array.isArray(type)) {
|
|
@@ -31589,68 +31839,68 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31589
31839
|
return convertBaseSchema(typeSchema, ctx);
|
|
31590
31840
|
});
|
|
31591
31841
|
if (typeSchemas.length === 0) {
|
|
31592
|
-
return
|
|
31842
|
+
return z26.never();
|
|
31593
31843
|
}
|
|
31594
31844
|
if (typeSchemas.length === 1) {
|
|
31595
31845
|
return typeSchemas[0];
|
|
31596
31846
|
}
|
|
31597
|
-
return
|
|
31847
|
+
return z26.union(typeSchemas);
|
|
31598
31848
|
}
|
|
31599
31849
|
if (!type) {
|
|
31600
|
-
return
|
|
31850
|
+
return z26.any();
|
|
31601
31851
|
}
|
|
31602
31852
|
let zodSchema2;
|
|
31603
31853
|
switch (type) {
|
|
31604
31854
|
case "string": {
|
|
31605
|
-
let stringSchema =
|
|
31855
|
+
let stringSchema = z26.string();
|
|
31606
31856
|
if (schema.format) {
|
|
31607
31857
|
const format = schema.format;
|
|
31608
31858
|
if (format === "email") {
|
|
31609
|
-
stringSchema = stringSchema.check(
|
|
31859
|
+
stringSchema = stringSchema.check(z26.email());
|
|
31610
31860
|
} else if (format === "uri" || format === "uri-reference") {
|
|
31611
|
-
stringSchema = stringSchema.check(
|
|
31861
|
+
stringSchema = stringSchema.check(z26.url());
|
|
31612
31862
|
} else if (format === "uuid" || format === "guid") {
|
|
31613
|
-
stringSchema = stringSchema.check(
|
|
31863
|
+
stringSchema = stringSchema.check(z26.uuid());
|
|
31614
31864
|
} else if (format === "date-time") {
|
|
31615
|
-
stringSchema = stringSchema.check(
|
|
31865
|
+
stringSchema = stringSchema.check(z26.iso.datetime());
|
|
31616
31866
|
} else if (format === "date") {
|
|
31617
|
-
stringSchema = stringSchema.check(
|
|
31867
|
+
stringSchema = stringSchema.check(z26.iso.date());
|
|
31618
31868
|
} else if (format === "time") {
|
|
31619
|
-
stringSchema = stringSchema.check(
|
|
31869
|
+
stringSchema = stringSchema.check(z26.iso.time());
|
|
31620
31870
|
} else if (format === "duration") {
|
|
31621
|
-
stringSchema = stringSchema.check(
|
|
31871
|
+
stringSchema = stringSchema.check(z26.iso.duration());
|
|
31622
31872
|
} else if (format === "ipv4") {
|
|
31623
|
-
stringSchema = stringSchema.check(
|
|
31873
|
+
stringSchema = stringSchema.check(z26.ipv4());
|
|
31624
31874
|
} else if (format === "ipv6") {
|
|
31625
|
-
stringSchema = stringSchema.check(
|
|
31875
|
+
stringSchema = stringSchema.check(z26.ipv6());
|
|
31626
31876
|
} else if (format === "mac") {
|
|
31627
|
-
stringSchema = stringSchema.check(
|
|
31877
|
+
stringSchema = stringSchema.check(z26.mac());
|
|
31628
31878
|
} else if (format === "cidr") {
|
|
31629
|
-
stringSchema = stringSchema.check(
|
|
31879
|
+
stringSchema = stringSchema.check(z26.cidrv4());
|
|
31630
31880
|
} else if (format === "cidr-v6") {
|
|
31631
|
-
stringSchema = stringSchema.check(
|
|
31881
|
+
stringSchema = stringSchema.check(z26.cidrv6());
|
|
31632
31882
|
} else if (format === "base64") {
|
|
31633
|
-
stringSchema = stringSchema.check(
|
|
31883
|
+
stringSchema = stringSchema.check(z26.base64());
|
|
31634
31884
|
} else if (format === "base64url") {
|
|
31635
|
-
stringSchema = stringSchema.check(
|
|
31885
|
+
stringSchema = stringSchema.check(z26.base64url());
|
|
31636
31886
|
} else if (format === "e164") {
|
|
31637
|
-
stringSchema = stringSchema.check(
|
|
31887
|
+
stringSchema = stringSchema.check(z26.e164());
|
|
31638
31888
|
} else if (format === "jwt") {
|
|
31639
|
-
stringSchema = stringSchema.check(
|
|
31889
|
+
stringSchema = stringSchema.check(z26.jwt());
|
|
31640
31890
|
} else if (format === "emoji") {
|
|
31641
|
-
stringSchema = stringSchema.check(
|
|
31891
|
+
stringSchema = stringSchema.check(z26.emoji());
|
|
31642
31892
|
} else if (format === "nanoid") {
|
|
31643
|
-
stringSchema = stringSchema.check(
|
|
31893
|
+
stringSchema = stringSchema.check(z26.nanoid());
|
|
31644
31894
|
} else if (format === "cuid") {
|
|
31645
|
-
stringSchema = stringSchema.check(
|
|
31895
|
+
stringSchema = stringSchema.check(z26.cuid());
|
|
31646
31896
|
} else if (format === "cuid2") {
|
|
31647
|
-
stringSchema = stringSchema.check(
|
|
31897
|
+
stringSchema = stringSchema.check(z26.cuid2());
|
|
31648
31898
|
} else if (format === "ulid") {
|
|
31649
|
-
stringSchema = stringSchema.check(
|
|
31899
|
+
stringSchema = stringSchema.check(z26.ulid());
|
|
31650
31900
|
} else if (format === "xid") {
|
|
31651
|
-
stringSchema = stringSchema.check(
|
|
31901
|
+
stringSchema = stringSchema.check(z26.xid());
|
|
31652
31902
|
} else if (format === "ksuid") {
|
|
31653
|
-
stringSchema = stringSchema.check(
|
|
31903
|
+
stringSchema = stringSchema.check(z26.ksuid());
|
|
31654
31904
|
}
|
|
31655
31905
|
}
|
|
31656
31906
|
if (typeof schema.minLength === "number") {
|
|
@@ -31667,7 +31917,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31667
31917
|
}
|
|
31668
31918
|
case "number":
|
|
31669
31919
|
case "integer": {
|
|
31670
|
-
let numberSchema = type === "integer" ?
|
|
31920
|
+
let numberSchema = type === "integer" ? z26.number().int() : z26.number();
|
|
31671
31921
|
if (typeof schema.minimum === "number") {
|
|
31672
31922
|
numberSchema = numberSchema.min(schema.minimum);
|
|
31673
31923
|
}
|
|
@@ -31691,11 +31941,11 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31691
31941
|
break;
|
|
31692
31942
|
}
|
|
31693
31943
|
case "boolean": {
|
|
31694
|
-
zodSchema2 =
|
|
31944
|
+
zodSchema2 = z26.boolean();
|
|
31695
31945
|
break;
|
|
31696
31946
|
}
|
|
31697
31947
|
case "null": {
|
|
31698
|
-
zodSchema2 =
|
|
31948
|
+
zodSchema2 = z26.null();
|
|
31699
31949
|
break;
|
|
31700
31950
|
}
|
|
31701
31951
|
case "object": {
|
|
@@ -31708,14 +31958,14 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31708
31958
|
}
|
|
31709
31959
|
if (schema.propertyNames) {
|
|
31710
31960
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
31711
|
-
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();
|
|
31712
31962
|
if (Object.keys(shape).length === 0) {
|
|
31713
|
-
zodSchema2 =
|
|
31963
|
+
zodSchema2 = z26.record(keySchema, valueSchema);
|
|
31714
31964
|
break;
|
|
31715
31965
|
}
|
|
31716
|
-
const objectSchema2 =
|
|
31717
|
-
const recordSchema =
|
|
31718
|
-
zodSchema2 =
|
|
31966
|
+
const objectSchema2 = z26.object(shape).passthrough();
|
|
31967
|
+
const recordSchema = z26.looseRecord(keySchema, valueSchema);
|
|
31968
|
+
zodSchema2 = z26.intersection(objectSchema2, recordSchema);
|
|
31719
31969
|
break;
|
|
31720
31970
|
}
|
|
31721
31971
|
if (schema.patternProperties) {
|
|
@@ -31724,28 +31974,28 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31724
31974
|
const looseRecords = [];
|
|
31725
31975
|
for (const pattern of patternKeys) {
|
|
31726
31976
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
31727
|
-
const keySchema =
|
|
31728
|
-
looseRecords.push(
|
|
31977
|
+
const keySchema = z26.string().regex(new RegExp(pattern));
|
|
31978
|
+
looseRecords.push(z26.looseRecord(keySchema, patternValue));
|
|
31729
31979
|
}
|
|
31730
31980
|
const schemasToIntersect = [];
|
|
31731
31981
|
if (Object.keys(shape).length > 0) {
|
|
31732
|
-
schemasToIntersect.push(
|
|
31982
|
+
schemasToIntersect.push(z26.object(shape).passthrough());
|
|
31733
31983
|
}
|
|
31734
31984
|
schemasToIntersect.push(...looseRecords);
|
|
31735
31985
|
if (schemasToIntersect.length === 0) {
|
|
31736
|
-
zodSchema2 =
|
|
31986
|
+
zodSchema2 = z26.object({}).passthrough();
|
|
31737
31987
|
} else if (schemasToIntersect.length === 1) {
|
|
31738
31988
|
zodSchema2 = schemasToIntersect[0];
|
|
31739
31989
|
} else {
|
|
31740
|
-
let result =
|
|
31990
|
+
let result = z26.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
31741
31991
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
31742
|
-
result =
|
|
31992
|
+
result = z26.intersection(result, schemasToIntersect[i]);
|
|
31743
31993
|
}
|
|
31744
31994
|
zodSchema2 = result;
|
|
31745
31995
|
}
|
|
31746
31996
|
break;
|
|
31747
31997
|
}
|
|
31748
|
-
const objectSchema =
|
|
31998
|
+
const objectSchema = z26.object(shape);
|
|
31749
31999
|
if (schema.additionalProperties === false) {
|
|
31750
32000
|
zodSchema2 = objectSchema.strict();
|
|
31751
32001
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -31762,33 +32012,33 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31762
32012
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
31763
32013
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
31764
32014
|
if (rest) {
|
|
31765
|
-
zodSchema2 =
|
|
32015
|
+
zodSchema2 = z26.tuple(tupleItems).rest(rest);
|
|
31766
32016
|
} else {
|
|
31767
|
-
zodSchema2 =
|
|
32017
|
+
zodSchema2 = z26.tuple(tupleItems);
|
|
31768
32018
|
}
|
|
31769
32019
|
if (typeof schema.minItems === "number") {
|
|
31770
|
-
zodSchema2 = zodSchema2.check(
|
|
32020
|
+
zodSchema2 = zodSchema2.check(z26.minLength(schema.minItems));
|
|
31771
32021
|
}
|
|
31772
32022
|
if (typeof schema.maxItems === "number") {
|
|
31773
|
-
zodSchema2 = zodSchema2.check(
|
|
32023
|
+
zodSchema2 = zodSchema2.check(z26.maxLength(schema.maxItems));
|
|
31774
32024
|
}
|
|
31775
32025
|
} else if (Array.isArray(items)) {
|
|
31776
32026
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
31777
32027
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
31778
32028
|
if (rest) {
|
|
31779
|
-
zodSchema2 =
|
|
32029
|
+
zodSchema2 = z26.tuple(tupleItems).rest(rest);
|
|
31780
32030
|
} else {
|
|
31781
|
-
zodSchema2 =
|
|
32031
|
+
zodSchema2 = z26.tuple(tupleItems);
|
|
31782
32032
|
}
|
|
31783
32033
|
if (typeof schema.minItems === "number") {
|
|
31784
|
-
zodSchema2 = zodSchema2.check(
|
|
32034
|
+
zodSchema2 = zodSchema2.check(z26.minLength(schema.minItems));
|
|
31785
32035
|
}
|
|
31786
32036
|
if (typeof schema.maxItems === "number") {
|
|
31787
|
-
zodSchema2 = zodSchema2.check(
|
|
32037
|
+
zodSchema2 = zodSchema2.check(z26.maxLength(schema.maxItems));
|
|
31788
32038
|
}
|
|
31789
32039
|
} else if (items !== void 0) {
|
|
31790
32040
|
const element = convertSchema(items, ctx);
|
|
31791
|
-
let arraySchema =
|
|
32041
|
+
let arraySchema = z26.array(element);
|
|
31792
32042
|
if (typeof schema.minItems === "number") {
|
|
31793
32043
|
arraySchema = arraySchema.min(schema.minItems);
|
|
31794
32044
|
}
|
|
@@ -31797,7 +32047,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31797
32047
|
}
|
|
31798
32048
|
zodSchema2 = arraySchema;
|
|
31799
32049
|
} else {
|
|
31800
|
-
zodSchema2 =
|
|
32050
|
+
zodSchema2 = z26.array(z26.any());
|
|
31801
32051
|
}
|
|
31802
32052
|
break;
|
|
31803
32053
|
}
|
|
@@ -31814,37 +32064,37 @@ function convertBaseSchema(schema, ctx) {
|
|
|
31814
32064
|
}
|
|
31815
32065
|
function convertSchema(schema, ctx) {
|
|
31816
32066
|
if (typeof schema === "boolean") {
|
|
31817
|
-
return schema ?
|
|
32067
|
+
return schema ? z26.any() : z26.never();
|
|
31818
32068
|
}
|
|
31819
32069
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
31820
32070
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
31821
32071
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
31822
32072
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
31823
|
-
const anyOfUnion =
|
|
31824
|
-
baseSchema = hasExplicitType ?
|
|
32073
|
+
const anyOfUnion = z26.union(options);
|
|
32074
|
+
baseSchema = hasExplicitType ? z26.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
31825
32075
|
}
|
|
31826
32076
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
31827
32077
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
31828
|
-
const oneOfUnion =
|
|
31829
|
-
baseSchema = hasExplicitType ?
|
|
32078
|
+
const oneOfUnion = z26.xor(options);
|
|
32079
|
+
baseSchema = hasExplicitType ? z26.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
31830
32080
|
}
|
|
31831
32081
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
31832
32082
|
if (schema.allOf.length === 0) {
|
|
31833
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
32083
|
+
baseSchema = hasExplicitType ? baseSchema : z26.any();
|
|
31834
32084
|
} else {
|
|
31835
32085
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
31836
32086
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
31837
32087
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
31838
|
-
result =
|
|
32088
|
+
result = z26.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
31839
32089
|
}
|
|
31840
32090
|
baseSchema = result;
|
|
31841
32091
|
}
|
|
31842
32092
|
}
|
|
31843
32093
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
31844
|
-
baseSchema =
|
|
32094
|
+
baseSchema = z26.nullable(baseSchema);
|
|
31845
32095
|
}
|
|
31846
32096
|
if (schema.readOnly === true) {
|
|
31847
|
-
baseSchema =
|
|
32097
|
+
baseSchema = z26.readonly(baseSchema);
|
|
31848
32098
|
}
|
|
31849
32099
|
const extraMeta = {};
|
|
31850
32100
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
@@ -31871,7 +32121,7 @@ function convertSchema(schema, ctx) {
|
|
|
31871
32121
|
}
|
|
31872
32122
|
function fromJSONSchema(schema, params) {
|
|
31873
32123
|
if (typeof schema === "boolean") {
|
|
31874
|
-
return schema ?
|
|
32124
|
+
return schema ? z26.any() : z26.never();
|
|
31875
32125
|
}
|
|
31876
32126
|
const version2 = detectVersion(schema, params?.defaultTarget);
|
|
31877
32127
|
const defs = schema.$defs || schema.definitions || {};
|
|
@@ -31885,14 +32135,14 @@ function fromJSONSchema(schema, params) {
|
|
|
31885
32135
|
};
|
|
31886
32136
|
return convertSchema(schema, ctx);
|
|
31887
32137
|
}
|
|
31888
|
-
var
|
|
32138
|
+
var z26, RECOGNIZED_KEYS;
|
|
31889
32139
|
var init_from_json_schema = __esm({
|
|
31890
32140
|
"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
|
|
31891
32141
|
init_registries();
|
|
31892
32142
|
init_checks2();
|
|
31893
32143
|
init_iso();
|
|
31894
32144
|
init_schemas2();
|
|
31895
|
-
|
|
32145
|
+
z26 = {
|
|
31896
32146
|
...schemas_exports2,
|
|
31897
32147
|
...checks_exports2,
|
|
31898
32148
|
iso: iso_exports
|