@lucid-agents/taskmarket 1.51.0 → 1.52.0
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/agent-compatibility.json +1 -1
- package/dist/{api-YDCOGL5P.js → api-Z62WOOLX.js} +2 -2
- package/dist/{channels-K4AKXBRM.js → channels-GBQLRNED.js} +4 -4
- package/dist/{chunk-O56EUZVG.js → chunk-523X35HE.js} +4 -4
- package/dist/{chunk-CBLGBZ67.js → chunk-6UDGOZHP.js} +3 -3
- package/dist/{chunk-5EUSU7QA.js → chunk-G4MAYAZW.js} +13 -25
- package/dist/{chunk-LC5VE4EQ.js → chunk-JAFX6DHV.js} +1313 -1252
- package/dist/{chunk-VQ6X6FME.js → chunk-K3Y73YWH.js} +2 -2
- package/dist/{chunk-7OC73WUN.js → chunk-KU66VTU6.js} +1 -1
- package/dist/{chunk-YCWWBCXW.js → chunk-LZ2P3FIL.js} +5 -5
- package/dist/{chunk-LL2SVODK.js → chunk-N5L4URHF.js} +1 -1
- package/dist/{chunk-JPAOL63U.js → chunk-PXQP62WF.js} +3 -3
- package/dist/{chunk-HZ6KGGNX.js → chunk-QSOEZINA.js} +8 -8
- package/dist/{chunk-CCK7JYVX.js → chunk-RMK5EAPR.js} +1 -1
- package/dist/{chunk-DE5YYAHJ.js → chunk-XREEFYEQ.js} +6 -2
- package/dist/{doctor-UA5ST7KE.js → doctor-3LW4N6KW.js} +9 -9
- package/dist/index.js +46 -21
- package/dist/{launch-TMSW4WPX.js → launch-2YOUARKA.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +19 -10
- package/dist/{read-auth-PN6FJNKK.js → read-auth-IBCYKPKD.js} +3 -3
- package/dist/{reconcile-VVNRBYY7.js → reconcile-7DVTUPJ6.js} +4 -4
- package/dist/{status-VQ7V3CIS.js → status-3GNXUWOL.js} +9 -9
- package/dist/{sync-pull-UKSVJFMY.js → sync-pull-MIEB5XAF.js} +4 -4
- package/dist/{task-access-grants-QBORD7RL.js → task-access-grants-5B3CSCP4.js} +2 -2
- package/package.json +2 -2
|
@@ -3640,7 +3640,7 @@ var OPENAI_PUBLISHED_RATES = {
|
|
|
3640
3640
|
usdPerMillionTokens: { input: "0.20", cachedInput: "0.02", cacheWrite: "0.25", output: "1.20" },
|
|
3641
3641
|
source: "https://developers.openai.com/api/docs/pricing",
|
|
3642
3642
|
checkedOn: "2026-09-18",
|
|
3643
|
-
recheckedOn: ["2026-10-03", "2026-10-28"],
|
|
3643
|
+
recheckedOn: ["2026-10-03", "2026-10-28", "2026-11-22"],
|
|
3644
3644
|
promotionalUntil: null
|
|
3645
3645
|
},
|
|
3646
3646
|
"gpt-5.6-sol": {
|
|
@@ -3667,7 +3667,7 @@ var OPENAI_PUBLISHED_RATES = {
|
|
|
3667
3667
|
},
|
|
3668
3668
|
source: "https://developers.openai.com/api/docs/pricing",
|
|
3669
3669
|
checkedOn: "2026-09-18",
|
|
3670
|
-
recheckedOn: ["2026-10-03", "2026-10-28"],
|
|
3670
|
+
recheckedOn: ["2026-10-03", "2026-10-28", "2026-11-22"],
|
|
3671
3671
|
promotionalUntil: null
|
|
3672
3672
|
},
|
|
3673
3673
|
// The GPT-6 generation, read from the same page on 2026-10-03. Each entry carries its own check
|
|
@@ -3682,7 +3682,7 @@ var OPENAI_PUBLISHED_RATES = {
|
|
|
3682
3682
|
},
|
|
3683
3683
|
source: "https://developers.openai.com/api/docs/pricing",
|
|
3684
3684
|
checkedOn: "2026-10-03",
|
|
3685
|
-
recheckedOn: ["2026-10-28"],
|
|
3685
|
+
recheckedOn: ["2026-10-28", "2026-11-22"],
|
|
3686
3686
|
promotionalUntil: null
|
|
3687
3687
|
},
|
|
3688
3688
|
"gpt-6-sol": {
|
|
@@ -3695,7 +3695,7 @@ var OPENAI_PUBLISHED_RATES = {
|
|
|
3695
3695
|
},
|
|
3696
3696
|
source: "https://developers.openai.com/api/docs/pricing",
|
|
3697
3697
|
checkedOn: "2026-10-03",
|
|
3698
|
-
recheckedOn: ["2026-10-28"],
|
|
3698
|
+
recheckedOn: ["2026-10-28", "2026-11-22"],
|
|
3699
3699
|
promotionalUntil: null
|
|
3700
3700
|
},
|
|
3701
3701
|
"gpt-6.1-sol": {
|
|
@@ -3708,7 +3708,7 @@ var OPENAI_PUBLISHED_RATES = {
|
|
|
3708
3708
|
},
|
|
3709
3709
|
source: "https://developers.openai.com/api/docs/pricing",
|
|
3710
3710
|
checkedOn: "2026-10-03",
|
|
3711
|
-
recheckedOn: ["2026-10-28"],
|
|
3711
|
+
recheckedOn: ["2026-10-28", "2026-11-22"],
|
|
3712
3712
|
promotionalUntil: null
|
|
3713
3713
|
}
|
|
3714
3714
|
};
|
|
@@ -3734,20 +3734,27 @@ var ROUTING_OPENROUTER_PUBLISHED_RATES = {
|
|
|
3734
3734
|
// Google Vertex, Modal and others at 0.3 input and 1.2 output, Mancer fp8 at 0.05 cached.
|
|
3735
3735
|
"deepseek/deepseek-v4.1-flash": openRouterRate("deepseek/deepseek-v4.1-flash", "0.3", "0.05", "1.2", "2026-11-20"),
|
|
3736
3736
|
// Medium candidates. Featherless fp8 is the dearest on every meter.
|
|
3737
|
-
|
|
3737
|
+
// Re-checked unchanged on 2026-11-22 against the same endpoints.
|
|
3738
|
+
"minimax/minimax-m3": openRouterRate("minimax/minimax-m3", "0.55", "0.06", "2.2", "2026-11-20", [
|
|
3739
|
+
"2026-11-22"
|
|
3740
|
+
]),
|
|
3738
3741
|
// Priced at the provider the published mapping allowlists, not at the standard hosts (#2685):
|
|
3739
3742
|
// tiers/2026-10-21 pins Wafer, whose two glm-5.3 endpoints list 0.079 and 0.179 input, 0.078 and
|
|
3740
3743
|
// 0.178 cached, 1.40 output. The card takes the dearer endpoint so holds never undercharge.
|
|
3741
3744
|
// Re-checked unchanged on 2026-10-29 against the zero-data-retention endpoints
|
|
3742
3745
|
// (/api/v1/endpoints/zdr): Wafer wafer/fp4 0.179 / 0.178 / 1.4 is still the dearest per meter.
|
|
3743
|
-
// Re-checked unchanged on 2026-11-20 against the same endpoints.
|
|
3746
|
+
// Re-checked unchanged on 2026-11-20 and 2026-11-22 against the same endpoints.
|
|
3744
3747
|
"z-ai/glm-5.3": openRouterRate("z-ai/glm-5.3", "0.179", "0.178", "1.4", "2026-10-21", [
|
|
3745
3748
|
"2026-10-29",
|
|
3746
|
-
"2026-11-20"
|
|
3749
|
+
"2026-11-20",
|
|
3750
|
+
"2026-11-22"
|
|
3747
3751
|
]),
|
|
3748
3752
|
// Heavy candidates.
|
|
3749
3753
|
// Fireworks, Moonshot and others at 3 input, Makora fp4 at 0.5 cached and 18 output.
|
|
3750
|
-
|
|
3754
|
+
// Re-checked unchanged on 2026-11-22 against the same endpoints.
|
|
3755
|
+
"moonshotai/kimi-k3": openRouterRate("moonshotai/kimi-k3", "3", "0.5", "18", "2026-11-20", [
|
|
3756
|
+
"2026-11-22"
|
|
3757
|
+
]),
|
|
3751
3758
|
// Standard Moonshot endpoint moonshotai/mxfp4, not the twice-priced highspeed endpoint.
|
|
3752
3759
|
// Recorded qualification calls matched these rates, including cached input, without a write fee.
|
|
3753
3760
|
// Re-checked unchanged on 2026-10-29 and 2026-11-20 at the zero-data-retention mxfp4 endpoint.
|
|
@@ -3757,9 +3764,11 @@ var ROUTING_OPENROUTER_PUBLISHED_RATES = {
|
|
|
3757
3764
|
// 2026-10-29 against the zero-data-retention endpoints; the newer, cheaper Wafer wafer/us and
|
|
3758
3765
|
// DeepInfra flex endpoints do not raise any meter. Re-checked unchanged on 2026-11-20; the
|
|
3759
3766
|
// DeepInfra fp4/priority service-tier endpoint is out of scope, like Moonshot highspeed.
|
|
3767
|
+
// Re-checked unchanged on 2026-11-22.
|
|
3760
3768
|
"z-ai/glm-5.2": openRouterRate("z-ai/glm-5.2", "0.5625", "0.18", "8", "2026-10-21", [
|
|
3761
3769
|
"2026-10-29",
|
|
3762
|
-
"2026-11-20"
|
|
3770
|
+
"2026-11-20",
|
|
3771
|
+
"2026-11-22"
|
|
3763
3772
|
])
|
|
3764
3773
|
};
|
|
3765
3774
|
var ROUTING_PUBLISHED_RATES = {
|
|
@@ -6174,7 +6183,8 @@ var LeaderboardAvailability = z25.enum([
|
|
|
6174
6183
|
"available",
|
|
6175
6184
|
"paused",
|
|
6176
6185
|
"fully_booked",
|
|
6177
|
-
"limit_reached"
|
|
6186
|
+
"limit_reached",
|
|
6187
|
+
"not_ready"
|
|
6178
6188
|
]);
|
|
6179
6189
|
var LeaderboardAvailabilityFilter = z25.enum(["available", "unavailable"]);
|
|
6180
6190
|
var LEADERBOARD_SEARCH_MAX_LENGTH = 80;
|
|
@@ -6351,6 +6361,10 @@ var AGENT_LISTING_SERVICE_KINDS = ["fixed", "quote", "evaluation"];
|
|
|
6351
6361
|
var AgentListingServiceKindSchema = z27.enum(AGENT_LISTING_SERVICE_KINDS);
|
|
6352
6362
|
var SERVICE_HIRE_ACCEPT_POLICIES = ["auto", "ask"];
|
|
6353
6363
|
var ServiceHireAcceptPolicySchema = z27.enum(SERVICE_HIRE_ACCEPT_POLICIES);
|
|
6364
|
+
var HIRE_OWNER_CONFIRMS_NOTICE = "Owner confirms each hire";
|
|
6365
|
+
function ownerConfirmsHire(listing, service) {
|
|
6366
|
+
return listing.hosted === true && service.kind !== "evaluation" && service.hireAcceptPolicy === "ask";
|
|
6367
|
+
}
|
|
6354
6368
|
var AGENT_LISTING_LIMITS = {
|
|
6355
6369
|
displayNameMax: 60,
|
|
6356
6370
|
descriptionMax: 2e3,
|
|
@@ -7019,7 +7033,8 @@ var TaskHireInputSchema = z29.object({
|
|
|
7019
7033
|
serviceId: z29.string().trim().min(1).max(HIRE_SERVICE_ID_MAX_LENGTH).optional(),
|
|
7020
7034
|
/**
|
|
7021
7035
|
* The requester acknowledges that the hired worker is not taking work now (a paused hosted
|
|
7022
|
-
* agent or listing,
|
|
7036
|
+
* agent or listing, a hosted agent at its daily hire offer cap, or a hosted shop that is not
|
|
7037
|
+
* ready for hires) and is unlikely to accept.
|
|
7023
7038
|
* Required to hire such a worker (#3401). It does not override a listing's capacity.
|
|
7024
7039
|
*/
|
|
7025
7040
|
acknowledgeUnavailable: z29.boolean().optional()
|
|
@@ -7028,7 +7043,8 @@ var HireUnavailableReason = z29.enum([
|
|
|
7028
7043
|
"paused",
|
|
7029
7044
|
"limit_reached",
|
|
7030
7045
|
"listing_paused",
|
|
7031
|
-
"at_capacity"
|
|
7046
|
+
"at_capacity",
|
|
7047
|
+
"not_ready"
|
|
7032
7048
|
]);
|
|
7033
7049
|
var HireAvailabilitySchema = z29.object({
|
|
7034
7050
|
/** Whether the wallet is a hosted agent's swarm wallet. */
|
|
@@ -7080,6 +7096,9 @@ function hireUnavailableAcknowledgeable(reason) {
|
|
|
7080
7096
|
function hireUnavailableNotice(reason) {
|
|
7081
7097
|
if (reason === "at_capacity")
|
|
7082
7098
|
return hireOfferAtCapacityMessage();
|
|
7099
|
+
if (reason === "not_ready") {
|
|
7100
|
+
return "This shop is not ready for hires now, so it is unlikely to accept this hire.";
|
|
7101
|
+
}
|
|
7083
7102
|
const who = reason === "limit_reached" ? "agent has reached its daily limit of hire offers" : reason === "listing_paused" ? "worker has paused their listing" : "agent is paused by its owner";
|
|
7084
7103
|
return `This ${who} and is not taking work now, so it is unlikely to accept this hire.`;
|
|
7085
7104
|
}
|
|
@@ -11346,7 +11365,7 @@ var HideSuggestionInputSchema = z53.object({
|
|
|
11346
11365
|
var StaffSuggestionTargetInputSchema = z53.object({ suggestionId: ProjectSuggestionIdSchema }).strict();
|
|
11347
11366
|
|
|
11348
11367
|
// ../../packages/shared/dist/schemas/shopfront.schemas.js
|
|
11349
|
-
import { z as
|
|
11368
|
+
import { z as z57 } from "zod";
|
|
11350
11369
|
|
|
11351
11370
|
// ../../packages/shared/dist/schemas/hosted-credit-plans.schemas.js
|
|
11352
11371
|
import { z as z55 } from "zod";
|
|
@@ -11658,6 +11677,36 @@ function findReservedListingName(text3) {
|
|
|
11658
11677
|
return findReserved(text3, RESERVED_LISTING_NAMES.words);
|
|
11659
11678
|
}
|
|
11660
11679
|
|
|
11680
|
+
// ../../packages/shared/dist/lib/shop-readiness.js
|
|
11681
|
+
import { z as z56 } from "zod";
|
|
11682
|
+
var SHOP_READINESS_REASONS = [
|
|
11683
|
+
/** No ready shared wallet. */
|
|
11684
|
+
"wallet_missing",
|
|
11685
|
+
/** Standing free market actions are not approved for the wallet. */
|
|
11686
|
+
"market_access_off",
|
|
11687
|
+
/** Free market actions were approved under older signing rules and must be re-enabled. */
|
|
11688
|
+
"market_access_needs_renewal",
|
|
11689
|
+
/** The shared wallet has no registered marketplace identity. Registering needs market access. */
|
|
11690
|
+
"identity_unregistered",
|
|
11691
|
+
/** No published shop profile (never saved, or hidden). */
|
|
11692
|
+
"listing_unpublished",
|
|
11693
|
+
/** No visible service to hire. */
|
|
11694
|
+
"no_service",
|
|
11695
|
+
/** The agent a hire offer wakes is paused or lacks the Work tasks role, or there is no agent. */
|
|
11696
|
+
"no_working_agent",
|
|
11697
|
+
/** The account has no credit, so the launcher would refuse the work. */
|
|
11698
|
+
"no_credit",
|
|
11699
|
+
/** A lapsed plan has paused automated wakeups, so a hire offer would not wake the agent. */
|
|
11700
|
+
"wakeups_paused"
|
|
11701
|
+
];
|
|
11702
|
+
var ShopReadinessReasonSchema = z56.enum(SHOP_READINESS_REASONS);
|
|
11703
|
+
var ShopReadinessSchema = z56.object({
|
|
11704
|
+
/** True only when `reasons` is empty. */
|
|
11705
|
+
ready: z56.boolean(),
|
|
11706
|
+
/** Every failing gate, most urgent first. Show the first; the rest follow once it is fixed. */
|
|
11707
|
+
reasons: z56.array(ShopReadinessReasonSchema)
|
|
11708
|
+
});
|
|
11709
|
+
|
|
11661
11710
|
// ../../packages/shared/dist/schemas/shopfront.schemas.js
|
|
11662
11711
|
var SHOP_HANDLE_REGEX = /^[a-z0-9][a-z0-9-]{1,28}[a-z0-9]$/;
|
|
11663
11712
|
var SHOP_BOOTH_MAX_BYTES = 512 * 1024;
|
|
@@ -11738,19 +11787,19 @@ function validateShopHandle(handle) {
|
|
|
11738
11787
|
}
|
|
11739
11788
|
return { ok: true, handle };
|
|
11740
11789
|
}
|
|
11741
|
-
var ShopHandleSchema =
|
|
11790
|
+
var ShopHandleSchema = z57.string().superRefine((value, ctx) => {
|
|
11742
11791
|
const result = validateShopHandle(value);
|
|
11743
11792
|
if (!result.ok) {
|
|
11744
11793
|
ctx.addIssue({
|
|
11745
|
-
code:
|
|
11794
|
+
code: z57.ZodIssueCode.custom,
|
|
11746
11795
|
message: result.reason
|
|
11747
11796
|
});
|
|
11748
11797
|
}
|
|
11749
11798
|
});
|
|
11750
11799
|
var SHOP_THEME_PRESETS = ["classic", "tinted", "surface"];
|
|
11751
|
-
var ShopThemePresetSchema =
|
|
11800
|
+
var ShopThemePresetSchema = z57.enum(SHOP_THEME_PRESETS);
|
|
11752
11801
|
var SHOP_BG_PATTERNS = ["none", "dashed", "dotted"];
|
|
11753
|
-
var ShopBgPatternSchema =
|
|
11802
|
+
var ShopBgPatternSchema = z57.enum(SHOP_BG_PATTERNS);
|
|
11754
11803
|
var SHOP_STICKER_IDS = [
|
|
11755
11804
|
"spark",
|
|
11756
11805
|
"open-sign",
|
|
@@ -11763,142 +11812,142 @@ var SHOP_STICKER_IDS = [
|
|
|
11763
11812
|
"terminal-prompt",
|
|
11764
11813
|
"ribbon"
|
|
11765
11814
|
];
|
|
11766
|
-
var ShopStickerIdSchema =
|
|
11815
|
+
var ShopStickerIdSchema = z57.enum(SHOP_STICKER_IDS);
|
|
11767
11816
|
var SHOP_STICKER_POSITIONS = [
|
|
11768
11817
|
"top-left",
|
|
11769
11818
|
"top-right",
|
|
11770
11819
|
"bottom-left",
|
|
11771
11820
|
"bottom-right"
|
|
11772
11821
|
];
|
|
11773
|
-
var ShopStickerPositionSchema =
|
|
11774
|
-
var ShopStickerSchema =
|
|
11822
|
+
var ShopStickerPositionSchema = z57.enum(SHOP_STICKER_POSITIONS);
|
|
11823
|
+
var ShopStickerSchema = z57.object({
|
|
11775
11824
|
id: ShopStickerIdSchema,
|
|
11776
11825
|
position: ShopStickerPositionSchema
|
|
11777
11826
|
}).strict();
|
|
11778
|
-
var ShopMarqueeTextSchema =
|
|
11779
|
-
var ShopAccentTaglineSchema =
|
|
11780
|
-
var ShopCanvasSchema =
|
|
11827
|
+
var ShopMarqueeTextSchema = z57.string().max(SHOP_MARQUEE_MAX).refine(isSafeSingleLine, "Invalid characters");
|
|
11828
|
+
var ShopAccentTaglineSchema = z57.string().max(SHOP_ACCENT_TAGLINE_MAX).refine(isSafeSingleLine, "Invalid characters");
|
|
11829
|
+
var ShopCanvasSchema = z57.object({
|
|
11781
11830
|
themePreset: ShopThemePresetSchema.default("classic"),
|
|
11782
11831
|
bgPattern: ShopBgPatternSchema.default("none"),
|
|
11783
11832
|
marqueeText: ShopMarqueeTextSchema.nullable().default(null),
|
|
11784
11833
|
accentTagline: ShopAccentTaglineSchema.nullable().default(null),
|
|
11785
|
-
stickers:
|
|
11834
|
+
stickers: z57.array(ShopStickerSchema).max(SHOP_STICKERS_MAX).default([])
|
|
11786
11835
|
}).strict();
|
|
11787
11836
|
var SHOP_CREW_STATUSES = ["working", "open", "paused"];
|
|
11788
|
-
var ShopCrewStatusSchema =
|
|
11789
|
-
var ShopCrewMemberSchema =
|
|
11790
|
-
agentId:
|
|
11791
|
-
name:
|
|
11792
|
-
roleLabel:
|
|
11837
|
+
var ShopCrewStatusSchema = z57.enum(SHOP_CREW_STATUSES);
|
|
11838
|
+
var ShopCrewMemberSchema = z57.object({
|
|
11839
|
+
agentId: z57.string().min(1).max(128),
|
|
11840
|
+
name: z57.string().min(1).max(100),
|
|
11841
|
+
roleLabel: z57.string().max(60),
|
|
11793
11842
|
avatar: LauncherAvatarSchema.nullable(),
|
|
11794
|
-
visible:
|
|
11795
|
-
skills:
|
|
11843
|
+
visible: z57.boolean(),
|
|
11844
|
+
skills: z57.array(z57.string()),
|
|
11796
11845
|
status: ShopCrewStatusSchema
|
|
11797
11846
|
});
|
|
11798
|
-
var ShopSampleSchema =
|
|
11799
|
-
id:
|
|
11800
|
-
walletAddress:
|
|
11801
|
-
serviceId:
|
|
11802
|
-
title:
|
|
11803
|
-
promptExcerpt:
|
|
11804
|
-
deliverableSummary:
|
|
11805
|
-
artifactKeys:
|
|
11806
|
-
isSample:
|
|
11807
|
-
position:
|
|
11808
|
-
createdAt:
|
|
11809
|
-
});
|
|
11810
|
-
var ShopGuestbookEntrySchema =
|
|
11811
|
-
id:
|
|
11812
|
-
walletAddress:
|
|
11813
|
-
authorDisplayName:
|
|
11814
|
-
authorAddress:
|
|
11815
|
-
body:
|
|
11816
|
-
createdAt:
|
|
11817
|
-
});
|
|
11818
|
-
var ShopWebringEntrySchema =
|
|
11819
|
-
neighborWalletAddress:
|
|
11820
|
-
neighborHandle:
|
|
11821
|
-
neighborDisplayName:
|
|
11822
|
-
endorsement:
|
|
11823
|
-
position:
|
|
11824
|
-
});
|
|
11825
|
-
var ShopBoothViewSchema =
|
|
11826
|
-
title:
|
|
11827
|
-
html:
|
|
11828
|
-
bytes:
|
|
11829
|
-
updatedAt:
|
|
11847
|
+
var ShopSampleSchema = z57.object({
|
|
11848
|
+
id: z57.string().uuid(),
|
|
11849
|
+
walletAddress: z57.string(),
|
|
11850
|
+
serviceId: z57.string().uuid().nullable(),
|
|
11851
|
+
title: z57.string().min(1).max(120),
|
|
11852
|
+
promptExcerpt: z57.string().min(1).max(1e3),
|
|
11853
|
+
deliverableSummary: z57.string().min(1).max(2e3),
|
|
11854
|
+
artifactKeys: z57.array(z57.string()),
|
|
11855
|
+
isSample: z57.literal(true),
|
|
11856
|
+
position: z57.number().int().min(0),
|
|
11857
|
+
createdAt: z57.string()
|
|
11858
|
+
});
|
|
11859
|
+
var ShopGuestbookEntrySchema = z57.object({
|
|
11860
|
+
id: z57.string().uuid(),
|
|
11861
|
+
walletAddress: z57.string(),
|
|
11862
|
+
authorDisplayName: z57.string().min(1).max(80),
|
|
11863
|
+
authorAddress: z57.string().nullable(),
|
|
11864
|
+
body: z57.string().min(1).max(SHOP_GUESTBOOK_BODY_MAX),
|
|
11865
|
+
createdAt: z57.string()
|
|
11866
|
+
});
|
|
11867
|
+
var ShopWebringEntrySchema = z57.object({
|
|
11868
|
+
neighborWalletAddress: z57.string(),
|
|
11869
|
+
neighborHandle: z57.string().nullable(),
|
|
11870
|
+
neighborDisplayName: z57.string(),
|
|
11871
|
+
endorsement: z57.string().max(160),
|
|
11872
|
+
position: z57.number().int().min(0)
|
|
11873
|
+
});
|
|
11874
|
+
var ShopBoothViewSchema = z57.object({
|
|
11875
|
+
title: z57.string().min(1).max(120),
|
|
11876
|
+
html: z57.string(),
|
|
11877
|
+
bytes: z57.number().int().min(1).max(SHOP_BOOTH_MAX_BYTES),
|
|
11878
|
+
updatedAt: z57.string()
|
|
11830
11879
|
});
|
|
11831
11880
|
var SHOP_BOOTH_DRAFT_STATUSES = ["pending", "approved", "rejected"];
|
|
11832
|
-
var ShopBoothDraftStatusSchema =
|
|
11881
|
+
var ShopBoothDraftStatusSchema = z57.enum(SHOP_BOOTH_DRAFT_STATUSES);
|
|
11833
11882
|
var SHOP_BOOTH_TURN_TRUSTS = ["owner", "agent", "tainted"];
|
|
11834
|
-
var ShopBoothTurnTrustSchema =
|
|
11835
|
-
var ShopBoothDraftSchema =
|
|
11836
|
-
id:
|
|
11837
|
-
agentId:
|
|
11838
|
-
title:
|
|
11839
|
-
htmlContent:
|
|
11840
|
-
bytes:
|
|
11883
|
+
var ShopBoothTurnTrustSchema = z57.enum(SHOP_BOOTH_TURN_TRUSTS);
|
|
11884
|
+
var ShopBoothDraftSchema = z57.object({
|
|
11885
|
+
id: z57.string().uuid(),
|
|
11886
|
+
agentId: z57.string().nullable(),
|
|
11887
|
+
title: z57.string().min(1).max(120),
|
|
11888
|
+
htmlContent: z57.string(),
|
|
11889
|
+
bytes: z57.number().int().min(1).max(SHOP_BOOTH_MAX_BYTES),
|
|
11841
11890
|
authorTurnTrust: ShopBoothTurnTrustSchema,
|
|
11842
11891
|
status: ShopBoothDraftStatusSchema,
|
|
11843
|
-
createdAt:
|
|
11844
|
-
decidedAt:
|
|
11892
|
+
createdAt: z57.string(),
|
|
11893
|
+
decidedAt: z57.string().nullable()
|
|
11845
11894
|
});
|
|
11846
11895
|
var SHOP_TROPHY_TIERS = ["bronze", "silver", "gold"];
|
|
11847
|
-
var ShopTrophyTierSchema =
|
|
11848
|
-
var ShopTrophySchema =
|
|
11849
|
-
id:
|
|
11850
|
-
label:
|
|
11851
|
-
description:
|
|
11852
|
-
unlockedAt:
|
|
11896
|
+
var ShopTrophyTierSchema = z57.enum(SHOP_TROPHY_TIERS);
|
|
11897
|
+
var ShopTrophySchema = z57.object({
|
|
11898
|
+
id: z57.string(),
|
|
11899
|
+
label: z57.string(),
|
|
11900
|
+
description: z57.string(),
|
|
11901
|
+
unlockedAt: z57.string().nullable(),
|
|
11853
11902
|
tier: ShopTrophyTierSchema
|
|
11854
11903
|
});
|
|
11855
11904
|
var SHOP_ENTITLEMENT_STATUSES = ["active", "grace", "downgraded", "none"];
|
|
11856
|
-
var ShopEntitlementStatusSchema =
|
|
11857
|
-
var ShopEntitlementsSchema =
|
|
11905
|
+
var ShopEntitlementStatusSchema = z57.enum(SHOP_ENTITLEMENT_STATUSES);
|
|
11906
|
+
var ShopEntitlementsSchema = z57.object({
|
|
11858
11907
|
status: ShopEntitlementStatusSchema,
|
|
11859
11908
|
planId: HostedCreditPlanIdSchema.nullable(),
|
|
11860
|
-
canUseHandle:
|
|
11861
|
-
canUseCustomCanvas:
|
|
11862
|
-
canUseInteractiveBooth:
|
|
11863
|
-
maxSamples:
|
|
11864
|
-
maxCrewVisible:
|
|
11865
|
-
graceUntil:
|
|
11866
|
-
});
|
|
11867
|
-
var ShopPnlSummarySchema =
|
|
11868
|
-
earningsByChain:
|
|
11869
|
-
chainId:
|
|
11870
|
-
amountBaseUnits:
|
|
11909
|
+
canUseHandle: z57.boolean(),
|
|
11910
|
+
canUseCustomCanvas: z57.boolean(),
|
|
11911
|
+
canUseInteractiveBooth: z57.boolean(),
|
|
11912
|
+
maxSamples: z57.number().int().nonnegative(),
|
|
11913
|
+
maxCrewVisible: z57.number().int().nonnegative(),
|
|
11914
|
+
graceUntil: z57.string().nullable()
|
|
11915
|
+
});
|
|
11916
|
+
var ShopPnlSummarySchema = z57.object({
|
|
11917
|
+
earningsByChain: z57.array(z57.object({
|
|
11918
|
+
chainId: z57.number().int(),
|
|
11919
|
+
amountBaseUnits: z57.string()
|
|
11871
11920
|
})),
|
|
11872
|
-
hiresCompleted:
|
|
11873
|
-
acceptanceRate:
|
|
11874
|
-
creditsSpent30d:
|
|
11875
|
-
creditsSpentAllTime:
|
|
11876
|
-
activeHiresCount:
|
|
11921
|
+
hiresCompleted: z57.number().int().nonnegative(),
|
|
11922
|
+
acceptanceRate: z57.number().min(0).max(1).nullable(),
|
|
11923
|
+
creditsSpent30d: z57.number().nonnegative(),
|
|
11924
|
+
creditsSpentAllTime: z57.number().nonnegative(),
|
|
11925
|
+
activeHiresCount: z57.number().int().nonnegative()
|
|
11877
11926
|
});
|
|
11878
11927
|
var SHOP_HANDLE_STATUSES = ["active", "grace", "released"];
|
|
11879
|
-
var ShopHandleStatusSchema =
|
|
11880
|
-
var AgentShopfrontPublicSchema =
|
|
11881
|
-
walletAddress:
|
|
11882
|
-
handle:
|
|
11928
|
+
var ShopHandleStatusSchema = z57.enum(SHOP_HANDLE_STATUSES);
|
|
11929
|
+
var AgentShopfrontPublicSchema = z57.object({
|
|
11930
|
+
walletAddress: z57.string(),
|
|
11931
|
+
handle: z57.string().nullable(),
|
|
11883
11932
|
entitlements: ShopEntitlementsSchema,
|
|
11884
11933
|
shopStatus: ShopCrewStatusSchema,
|
|
11885
11934
|
canvas: ShopCanvasSchema.nullable(),
|
|
11886
|
-
crew:
|
|
11887
|
-
samples:
|
|
11935
|
+
crew: z57.array(ShopCrewMemberSchema),
|
|
11936
|
+
samples: z57.array(ShopSampleSchema),
|
|
11888
11937
|
booth: ShopBoothViewSchema.nullable(),
|
|
11889
|
-
webring:
|
|
11890
|
-
trophies:
|
|
11891
|
-
guestbookEnabled:
|
|
11892
|
-
guestbookCount:
|
|
11893
|
-
hitCounterEnabled:
|
|
11894
|
-
visitCount:
|
|
11895
|
-
});
|
|
11896
|
-
var ShopSetupChecklistSchema =
|
|
11897
|
-
walletReady:
|
|
11898
|
-
identityRegistered:
|
|
11899
|
-
freeMarketAccess:
|
|
11900
|
-
listingPublished:
|
|
11901
|
-
hasService:
|
|
11938
|
+
webring: z57.array(ShopWebringEntrySchema),
|
|
11939
|
+
trophies: z57.array(ShopTrophySchema),
|
|
11940
|
+
guestbookEnabled: z57.boolean(),
|
|
11941
|
+
guestbookCount: z57.number().int().nonnegative(),
|
|
11942
|
+
hitCounterEnabled: z57.boolean(),
|
|
11943
|
+
visitCount: z57.number().int().nonnegative()
|
|
11944
|
+
});
|
|
11945
|
+
var ShopSetupChecklistSchema = z57.object({
|
|
11946
|
+
walletReady: z57.boolean(),
|
|
11947
|
+
identityRegistered: z57.boolean(),
|
|
11948
|
+
freeMarketAccess: z57.boolean(),
|
|
11949
|
+
listingPublished: z57.boolean(),
|
|
11950
|
+
hasService: z57.boolean()
|
|
11902
11951
|
});
|
|
11903
11952
|
var SHOP_PRACTICE_RUN_STATUSES = [
|
|
11904
11953
|
"queued",
|
|
@@ -11907,146 +11956,148 @@ var SHOP_PRACTICE_RUN_STATUSES = [
|
|
|
11907
11956
|
"failed",
|
|
11908
11957
|
"interrupted"
|
|
11909
11958
|
];
|
|
11910
|
-
var ShopPracticeRunStatusSchema =
|
|
11911
|
-
var ShopPracticeRunSchema =
|
|
11912
|
-
jobId:
|
|
11913
|
-
agentId:
|
|
11914
|
-
agentName:
|
|
11915
|
-
serviceTitle:
|
|
11959
|
+
var ShopPracticeRunStatusSchema = z57.enum(SHOP_PRACTICE_RUN_STATUSES);
|
|
11960
|
+
var ShopPracticeRunSchema = z57.object({
|
|
11961
|
+
jobId: z57.string(),
|
|
11962
|
+
agentId: z57.string(),
|
|
11963
|
+
agentName: z57.string(),
|
|
11964
|
+
serviceTitle: z57.string().nullable(),
|
|
11916
11965
|
status: ShopPracticeRunStatusSchema,
|
|
11917
|
-
promptExcerpt:
|
|
11918
|
-
resultExcerpt:
|
|
11919
|
-
artifactKeys:
|
|
11920
|
-
createdAt:
|
|
11921
|
-
});
|
|
11922
|
-
var OwnerShopfrontViewSchema =
|
|
11923
|
-
walletAddress:
|
|
11924
|
-
handle:
|
|
11966
|
+
promptExcerpt: z57.string(),
|
|
11967
|
+
resultExcerpt: z57.string().nullable(),
|
|
11968
|
+
artifactKeys: z57.array(z57.string()),
|
|
11969
|
+
createdAt: z57.string()
|
|
11970
|
+
});
|
|
11971
|
+
var OwnerShopfrontViewSchema = z57.object({
|
|
11972
|
+
walletAddress: z57.string().nullable(),
|
|
11973
|
+
handle: z57.string().nullable(),
|
|
11925
11974
|
handleStatus: ShopHandleStatusSchema.nullable(),
|
|
11926
|
-
graceUntil:
|
|
11975
|
+
graceUntil: z57.string().nullable(),
|
|
11927
11976
|
entitlements: ShopEntitlementsSchema,
|
|
11928
11977
|
canvas: ShopCanvasSchema,
|
|
11929
|
-
guestbookEnabled:
|
|
11930
|
-
hitCounterEnabled:
|
|
11931
|
-
visitCount:
|
|
11932
|
-
crew:
|
|
11933
|
-
samples:
|
|
11934
|
-
webring:
|
|
11978
|
+
guestbookEnabled: z57.boolean(),
|
|
11979
|
+
hitCounterEnabled: z57.boolean(),
|
|
11980
|
+
visitCount: z57.number().int().nonnegative(),
|
|
11981
|
+
crew: z57.array(ShopCrewMemberSchema),
|
|
11982
|
+
samples: z57.array(ShopSampleSchema),
|
|
11983
|
+
webring: z57.array(ShopWebringEntrySchema),
|
|
11935
11984
|
booth: ShopBoothViewSchema.nullable(),
|
|
11936
|
-
boothDrafts:
|
|
11985
|
+
boothDrafts: z57.array(ShopBoothDraftSchema),
|
|
11937
11986
|
setupChecklist: ShopSetupChecklistSchema,
|
|
11938
|
-
|
|
11987
|
+
/** Whether the shop can take a hire, and every reason it cannot. `setupChecklist` follows it. */
|
|
11988
|
+
readiness: ShopReadinessSchema,
|
|
11989
|
+
recentPracticeHires: z57.array(ShopPracticeRunSchema).optional()
|
|
11939
11990
|
});
|
|
11940
|
-
var ShopHandleResolveInputSchema =
|
|
11941
|
-
handle:
|
|
11991
|
+
var ShopHandleResolveInputSchema = z57.object({
|
|
11992
|
+
handle: z57.string().min(1).max(64)
|
|
11942
11993
|
});
|
|
11943
|
-
var ShopHandleResolveResultSchema =
|
|
11944
|
-
handle:
|
|
11945
|
-
walletAddress:
|
|
11946
|
-
status:
|
|
11947
|
-
graceUntil:
|
|
11994
|
+
var ShopHandleResolveResultSchema = z57.object({
|
|
11995
|
+
handle: z57.string(),
|
|
11996
|
+
walletAddress: z57.string(),
|
|
11997
|
+
status: z57.enum(["active", "grace"]),
|
|
11998
|
+
graceUntil: z57.string().nullable()
|
|
11948
11999
|
});
|
|
11949
|
-
var ShopPublicGetInputSchema =
|
|
12000
|
+
var ShopPublicGetInputSchema = z57.object({
|
|
11950
12001
|
address: EthAddressSchema
|
|
11951
12002
|
});
|
|
11952
|
-
var ShopRecordVisitInputSchema =
|
|
12003
|
+
var ShopRecordVisitInputSchema = z57.object({
|
|
11953
12004
|
address: EthAddressSchema
|
|
11954
12005
|
});
|
|
11955
|
-
var ShopRecordVisitResultSchema =
|
|
11956
|
-
visitCount:
|
|
12006
|
+
var ShopRecordVisitResultSchema = z57.object({
|
|
12007
|
+
visitCount: z57.number().int().nonnegative()
|
|
11957
12008
|
});
|
|
11958
|
-
var ShopHandleSetInputSchema =
|
|
12009
|
+
var ShopHandleSetInputSchema = z57.object({
|
|
11959
12010
|
handle: ShopHandleSchema
|
|
11960
12011
|
}).strict();
|
|
11961
|
-
var ShopConfigUpdateInputSchema =
|
|
12012
|
+
var ShopConfigUpdateInputSchema = z57.object({
|
|
11962
12013
|
canvas: ShopCanvasSchema.optional(),
|
|
11963
|
-
guestbookEnabled:
|
|
11964
|
-
hitCounterEnabled:
|
|
12014
|
+
guestbookEnabled: z57.boolean().optional(),
|
|
12015
|
+
hitCounterEnabled: z57.boolean().optional()
|
|
11965
12016
|
}).strict();
|
|
11966
|
-
var ShopCrewUpdateInputSchema =
|
|
11967
|
-
members:
|
|
11968
|
-
agentId:
|
|
11969
|
-
visible:
|
|
11970
|
-
roleLabel:
|
|
12017
|
+
var ShopCrewUpdateInputSchema = z57.object({
|
|
12018
|
+
members: z57.array(z57.object({
|
|
12019
|
+
agentId: z57.string().min(1).max(128),
|
|
12020
|
+
visible: z57.boolean(),
|
|
12021
|
+
roleLabel: z57.string().max(60).refine(isSafeSingleLine, "Invalid characters")
|
|
11971
12022
|
}).strict()).max(20)
|
|
11972
12023
|
}).strict();
|
|
11973
|
-
var ShopSamplePinInputSchema =
|
|
11974
|
-
serviceId:
|
|
12024
|
+
var ShopSamplePinInputSchema = z57.object({
|
|
12025
|
+
serviceId: z57.string().uuid().nullable().optional(),
|
|
11975
12026
|
title: safeRequiredSingleLine(120),
|
|
11976
12027
|
promptExcerpt: safeRequiredMultiLine(1e3),
|
|
11977
12028
|
deliverableSummary: safeRequiredMultiLine(2e3),
|
|
11978
|
-
artifactKeys:
|
|
12029
|
+
artifactKeys: z57.array(z57.string().min(1).max(512)).max(10).optional().default([])
|
|
11979
12030
|
}).strict();
|
|
11980
|
-
var ShopSampleRemoveInputSchema =
|
|
11981
|
-
sampleId:
|
|
12031
|
+
var ShopSampleRemoveInputSchema = z57.object({
|
|
12032
|
+
sampleId: z57.string().uuid()
|
|
11982
12033
|
}).strict();
|
|
11983
|
-
var ShopPracticeHireInputSchema =
|
|
11984
|
-
serviceId:
|
|
11985
|
-
agentId:
|
|
12034
|
+
var ShopPracticeHireInputSchema = z57.object({
|
|
12035
|
+
serviceId: z57.string().uuid().optional(),
|
|
12036
|
+
agentId: z57.string().min(1).max(128).optional(),
|
|
11986
12037
|
brief: safeRequiredMultiLine(4e3)
|
|
11987
12038
|
}).strict();
|
|
11988
|
-
var ShopPracticeHireResultSchema =
|
|
11989
|
-
jobId:
|
|
11990
|
-
agentId:
|
|
12039
|
+
var ShopPracticeHireResultSchema = z57.object({
|
|
12040
|
+
jobId: z57.string(),
|
|
12041
|
+
agentId: z57.string()
|
|
11991
12042
|
});
|
|
11992
|
-
var ShopPracticeRunsListInputSchema =
|
|
11993
|
-
limit: coerceNumber(
|
|
12043
|
+
var ShopPracticeRunsListInputSchema = z57.object({
|
|
12044
|
+
limit: coerceNumber(z57.number().int().min(1).max(20)).default(5)
|
|
11994
12045
|
}).optional();
|
|
11995
|
-
var ShopTasteCaptureInputSchema =
|
|
11996
|
-
agentId:
|
|
11997
|
-
target:
|
|
12046
|
+
var ShopTasteCaptureInputSchema = z57.object({
|
|
12047
|
+
agentId: z57.string().min(1).max(128).optional(),
|
|
12048
|
+
target: z57.enum(["instructions", "core"]).default("instructions"),
|
|
11998
12049
|
rule: safeRequiredMultiLine(2e3),
|
|
11999
12050
|
critique: safeRequiredMultiLine(1e3).optional()
|
|
12000
12051
|
}).strict();
|
|
12001
|
-
var ShopTasteCaptureResultSchema =
|
|
12002
|
-
scope:
|
|
12003
|
-
path:
|
|
12004
|
-
version:
|
|
12052
|
+
var ShopTasteCaptureResultSchema = z57.object({
|
|
12053
|
+
scope: z57.enum(["swarm", "agent"]),
|
|
12054
|
+
path: z57.string(),
|
|
12055
|
+
version: z57.number().int().positive()
|
|
12005
12056
|
});
|
|
12006
|
-
var ShopWebringSetInputSchema =
|
|
12007
|
-
entries:
|
|
12057
|
+
var ShopWebringSetInputSchema = z57.object({
|
|
12058
|
+
entries: z57.array(z57.object({
|
|
12008
12059
|
neighborWalletAddress: EthAddressSchema,
|
|
12009
|
-
endorsement:
|
|
12060
|
+
endorsement: z57.string().max(160).refine(isSafeSingleLine, "Invalid characters")
|
|
12010
12061
|
}).strict()).max(SHOP_WEBRING_MAX)
|
|
12011
12062
|
}).strict();
|
|
12012
|
-
var ShopGuestbookPostInputSchema =
|
|
12063
|
+
var ShopGuestbookPostInputSchema = z57.object({
|
|
12013
12064
|
address: EthAddressSchema,
|
|
12014
12065
|
body: safeRequiredMultiLine(SHOP_GUESTBOOK_BODY_MAX),
|
|
12015
12066
|
authorDisplayName: safeRequiredSingleLine(80).optional()
|
|
12016
12067
|
}).strict();
|
|
12017
|
-
var ShopGuestbookListInputSchema =
|
|
12068
|
+
var ShopGuestbookListInputSchema = z57.object({
|
|
12018
12069
|
address: EthAddressSchema,
|
|
12019
|
-
limit: coerceNumber(
|
|
12020
|
-
cursor:
|
|
12070
|
+
limit: coerceNumber(z57.number().int().min(1).max(50)).default(20),
|
|
12071
|
+
cursor: z57.string().min(1).max(256).optional()
|
|
12021
12072
|
});
|
|
12022
|
-
var ShopGuestbookListResultSchema =
|
|
12023
|
-
entries:
|
|
12024
|
-
nextCursor:
|
|
12025
|
-
hasMore:
|
|
12073
|
+
var ShopGuestbookListResultSchema = z57.object({
|
|
12074
|
+
entries: z57.array(ShopGuestbookEntrySchema),
|
|
12075
|
+
nextCursor: z57.string().nullable(),
|
|
12076
|
+
hasMore: z57.boolean()
|
|
12026
12077
|
});
|
|
12027
|
-
var ShopGuestbookDeleteInputSchema =
|
|
12078
|
+
var ShopGuestbookDeleteInputSchema = z57.object({
|
|
12028
12079
|
address: EthAddressSchema,
|
|
12029
|
-
entryId:
|
|
12080
|
+
entryId: z57.string().uuid()
|
|
12030
12081
|
}).strict();
|
|
12031
|
-
var ShopGuestbookModerateInputSchema =
|
|
12032
|
-
entryId:
|
|
12082
|
+
var ShopGuestbookModerateInputSchema = z57.object({
|
|
12083
|
+
entryId: z57.string().uuid()
|
|
12033
12084
|
}).strict();
|
|
12034
|
-
var ShopBoothDraftCreateInputSchema =
|
|
12035
|
-
agentId:
|
|
12085
|
+
var ShopBoothDraftCreateInputSchema = z57.object({
|
|
12086
|
+
agentId: z57.string().min(1).max(128).optional(),
|
|
12036
12087
|
title: safeRequiredSingleLine(120),
|
|
12037
|
-
htmlContent:
|
|
12088
|
+
htmlContent: z57.string().min(1)
|
|
12038
12089
|
}).strict();
|
|
12039
|
-
var ShopBoothDraftDecideInputSchema =
|
|
12040
|
-
draftId:
|
|
12041
|
-
decision:
|
|
12090
|
+
var ShopBoothDraftDecideInputSchema = z57.object({
|
|
12091
|
+
draftId: z57.string().uuid(),
|
|
12092
|
+
decision: z57.enum(["approve", "reject"])
|
|
12042
12093
|
}).strict();
|
|
12043
12094
|
|
|
12044
12095
|
// ../../packages/shared/dist/schemas/brief-session.schemas.js
|
|
12045
|
-
import { z as
|
|
12096
|
+
import { z as z59 } from "zod";
|
|
12046
12097
|
|
|
12047
12098
|
// ../../packages/shared/dist/schemas/brief-research.schemas.js
|
|
12048
|
-
import { z as
|
|
12049
|
-
var WorkingBriefSectionSchema =
|
|
12099
|
+
import { z as z58 } from "zod";
|
|
12100
|
+
var WorkingBriefSectionSchema = z58.enum([
|
|
12050
12101
|
"title",
|
|
12051
12102
|
"objective",
|
|
12052
12103
|
"scope",
|
|
@@ -12058,9 +12109,9 @@ var WorkingBriefSectionSchema = z57.enum([
|
|
|
12058
12109
|
"assumptions",
|
|
12059
12110
|
"blockers"
|
|
12060
12111
|
]);
|
|
12061
|
-
var section =
|
|
12062
|
-
var WorkingBriefSchema =
|
|
12063
|
-
title:
|
|
12112
|
+
var section = z58.string().max(2e3);
|
|
12113
|
+
var WorkingBriefSchema = z58.object({
|
|
12114
|
+
title: z58.string().max(200),
|
|
12064
12115
|
objective: section,
|
|
12065
12116
|
scope: section,
|
|
12066
12117
|
inputsOutputs: section,
|
|
@@ -12070,7 +12121,7 @@ var WorkingBriefSchema = z57.object({
|
|
|
12070
12121
|
nonGoals: section,
|
|
12071
12122
|
assumptions: section,
|
|
12072
12123
|
blockers: section,
|
|
12073
|
-
evidenceIds:
|
|
12124
|
+
evidenceIds: z58.array(z58.string().min(1).max(100)).max(12)
|
|
12074
12125
|
}).strict();
|
|
12075
12126
|
function normalizeBriefSourceUrl(value) {
|
|
12076
12127
|
try {
|
|
@@ -12086,29 +12137,29 @@ function normalizeBriefSourceUrl(value) {
|
|
|
12086
12137
|
return null;
|
|
12087
12138
|
}
|
|
12088
12139
|
}
|
|
12089
|
-
var BriefEvidenceSchema =
|
|
12090
|
-
id:
|
|
12091
|
-
url:
|
|
12140
|
+
var BriefEvidenceSchema = z58.object({
|
|
12141
|
+
id: z58.string().min(1).max(100),
|
|
12142
|
+
url: z58.string().max(2e3).transform((value, context) => {
|
|
12092
12143
|
const normalized = normalizeBriefSourceUrl(value);
|
|
12093
12144
|
if (!normalized) {
|
|
12094
12145
|
context.addIssue({
|
|
12095
|
-
code:
|
|
12146
|
+
code: z58.ZodIssueCode.custom,
|
|
12096
12147
|
message: "Use a public HTTP(S) source URL"
|
|
12097
12148
|
});
|
|
12098
|
-
return
|
|
12149
|
+
return z58.NEVER;
|
|
12099
12150
|
}
|
|
12100
12151
|
return normalized;
|
|
12101
12152
|
}),
|
|
12102
|
-
title:
|
|
12103
|
-
retrievedAt:
|
|
12104
|
-
finding:
|
|
12153
|
+
title: z58.string().min(1).max(300),
|
|
12154
|
+
retrievedAt: z58.string().datetime(),
|
|
12155
|
+
finding: z58.string().max(1500)
|
|
12105
12156
|
}).strict();
|
|
12106
|
-
var BriefEvidenceListSchema =
|
|
12157
|
+
var BriefEvidenceListSchema = z58.array(BriefEvidenceSchema).max(12).superRefine((items, context) => {
|
|
12107
12158
|
const seen = /* @__PURE__ */ new Set();
|
|
12108
12159
|
items.forEach((item, index) => {
|
|
12109
12160
|
if (seen.has(item.id)) {
|
|
12110
12161
|
context.addIssue({
|
|
12111
|
-
code:
|
|
12162
|
+
code: z58.ZodIssueCode.custom,
|
|
12112
12163
|
message: "Evidence IDs must be unique",
|
|
12113
12164
|
path: [index, "id"]
|
|
12114
12165
|
});
|
|
@@ -12116,36 +12167,36 @@ var BriefEvidenceListSchema = z57.array(BriefEvidenceSchema).max(12).superRefine
|
|
|
12116
12167
|
seen.add(item.id);
|
|
12117
12168
|
});
|
|
12118
12169
|
});
|
|
12119
|
-
var BriefDecisionSchema =
|
|
12120
|
-
id:
|
|
12170
|
+
var BriefDecisionSchema = z58.object({
|
|
12171
|
+
id: z58.string().min(1).max(100),
|
|
12121
12172
|
section: WorkingBriefSectionSchema,
|
|
12122
12173
|
value: section,
|
|
12123
|
-
origin:
|
|
12124
|
-
revision:
|
|
12125
|
-
supersedes:
|
|
12126
|
-
releasedByTurnId:
|
|
12174
|
+
origin: z58.enum(["manual", "confirmed"]),
|
|
12175
|
+
revision: z58.number().int().nonnegative(),
|
|
12176
|
+
supersedes: z58.string().nullable(),
|
|
12177
|
+
releasedByTurnId: z58.string().uuid().optional()
|
|
12127
12178
|
}).strict();
|
|
12128
|
-
var ActiveBriefDecisionsSchema =
|
|
12179
|
+
var ActiveBriefDecisionsSchema = z58.array(BriefDecisionSchema).max(10).superRefine((items, context) => {
|
|
12129
12180
|
const ids2 = /* @__PURE__ */ new Set();
|
|
12130
12181
|
const sections = /* @__PURE__ */ new Set();
|
|
12131
12182
|
items.forEach((item, index) => {
|
|
12132
12183
|
if (item.releasedByTurnId) {
|
|
12133
12184
|
context.addIssue({
|
|
12134
|
-
code:
|
|
12185
|
+
code: z58.ZodIssueCode.custom,
|
|
12135
12186
|
message: "An active decision cannot be released",
|
|
12136
12187
|
path: [index, "releasedByTurnId"]
|
|
12137
12188
|
});
|
|
12138
12189
|
}
|
|
12139
12190
|
if (ids2.has(item.id)) {
|
|
12140
12191
|
context.addIssue({
|
|
12141
|
-
code:
|
|
12192
|
+
code: z58.ZodIssueCode.custom,
|
|
12142
12193
|
message: "Decision IDs must be unique",
|
|
12143
12194
|
path: [index, "id"]
|
|
12144
12195
|
});
|
|
12145
12196
|
}
|
|
12146
12197
|
if (sections.has(item.section)) {
|
|
12147
12198
|
context.addIssue({
|
|
12148
|
-
code:
|
|
12199
|
+
code: z58.ZodIssueCode.custom,
|
|
12149
12200
|
message: "A section may have only one active authoritative decision",
|
|
12150
12201
|
path: [index, "section"]
|
|
12151
12202
|
});
|
|
@@ -12154,12 +12205,12 @@ var ActiveBriefDecisionsSchema = z57.array(BriefDecisionSchema).max(10).superRef
|
|
|
12154
12205
|
sections.add(item.section);
|
|
12155
12206
|
});
|
|
12156
12207
|
});
|
|
12157
|
-
var BriefDecisionHistorySchema =
|
|
12208
|
+
var BriefDecisionHistorySchema = z58.array(BriefDecisionSchema).max(200).superRefine((items, context) => {
|
|
12158
12209
|
const priorById = /* @__PURE__ */ new Map();
|
|
12159
12210
|
items.forEach((item, index) => {
|
|
12160
12211
|
if (priorById.has(item.id)) {
|
|
12161
12212
|
context.addIssue({
|
|
12162
|
-
code:
|
|
12213
|
+
code: z58.ZodIssueCode.custom,
|
|
12163
12214
|
message: "Decision IDs must be unique",
|
|
12164
12215
|
path: [index, "id"]
|
|
12165
12216
|
});
|
|
@@ -12168,21 +12219,21 @@ var BriefDecisionHistorySchema = z57.array(BriefDecisionSchema).max(200).superRe
|
|
|
12168
12219
|
const prior = priorById.get(item.supersedes);
|
|
12169
12220
|
if (!prior) {
|
|
12170
12221
|
context.addIssue({
|
|
12171
|
-
code:
|
|
12222
|
+
code: z58.ZodIssueCode.custom,
|
|
12172
12223
|
message: "A decision may supersede only an earlier decision",
|
|
12173
12224
|
path: [index, "supersedes"]
|
|
12174
12225
|
});
|
|
12175
12226
|
} else {
|
|
12176
12227
|
if (prior.section !== item.section) {
|
|
12177
12228
|
context.addIssue({
|
|
12178
|
-
code:
|
|
12229
|
+
code: z58.ZodIssueCode.custom,
|
|
12179
12230
|
message: "A decision may supersede only the same section",
|
|
12180
12231
|
path: [index, "supersedes"]
|
|
12181
12232
|
});
|
|
12182
12233
|
}
|
|
12183
12234
|
if (prior.revision >= item.revision) {
|
|
12184
12235
|
context.addIssue({
|
|
12185
|
-
code:
|
|
12236
|
+
code: z58.ZodIssueCode.custom,
|
|
12186
12237
|
message: "A superseding decision must have a later revision",
|
|
12187
12238
|
path: [index, "revision"]
|
|
12188
12239
|
});
|
|
@@ -12198,7 +12249,7 @@ var BriefDecisionHistorySchema = z57.array(BriefDecisionSchema).max(200).superRe
|
|
|
12198
12249
|
return;
|
|
12199
12250
|
if (activeSections.has(item.section)) {
|
|
12200
12251
|
context.addIssue({
|
|
12201
|
-
code:
|
|
12252
|
+
code: z58.ZodIssueCode.custom,
|
|
12202
12253
|
message: "A section may have only one active authoritative decision",
|
|
12203
12254
|
path: [index, "section"]
|
|
12204
12255
|
});
|
|
@@ -12206,29 +12257,29 @@ var BriefDecisionHistorySchema = z57.array(BriefDecisionSchema).max(200).superRe
|
|
|
12206
12257
|
activeSections.add(item.section);
|
|
12207
12258
|
});
|
|
12208
12259
|
});
|
|
12209
|
-
var BriefResearchStatusSchema =
|
|
12260
|
+
var BriefResearchStatusSchema = z58.enum([
|
|
12210
12261
|
"researched",
|
|
12211
12262
|
"not_needed",
|
|
12212
12263
|
"unavailable",
|
|
12213
12264
|
"disabled"
|
|
12214
12265
|
]);
|
|
12215
|
-
var BriefPhaseSchema =
|
|
12216
|
-
var BriefUsageEventSchema =
|
|
12266
|
+
var BriefPhaseSchema = z58.enum(["planning", "researching", "drafting"]);
|
|
12267
|
+
var BriefUsageEventSchema = z58.object({
|
|
12217
12268
|
stage: BriefPhaseSchema,
|
|
12218
|
-
status:
|
|
12219
|
-
inputTokens:
|
|
12220
|
-
outputTokens:
|
|
12221
|
-
searchCalls:
|
|
12269
|
+
status: z58.enum(["dispatched", "reported"]),
|
|
12270
|
+
inputTokens: z58.number().int().nonnegative().max(1e7).optional(),
|
|
12271
|
+
outputTokens: z58.number().int().nonnegative().max(1e7).optional(),
|
|
12272
|
+
searchCalls: z58.number().int().min(0).max(2).optional()
|
|
12222
12273
|
}).strict();
|
|
12223
12274
|
|
|
12224
12275
|
// ../../packages/shared/dist/schemas/brief-session.schemas.js
|
|
12225
|
-
var field =
|
|
12226
|
-
var BriefFormValuesObjectSchema =
|
|
12276
|
+
var field = z59.string().max(2e3);
|
|
12277
|
+
var BriefFormValuesObjectSchema = z59.object({
|
|
12227
12278
|
auctionFloorPrice: field,
|
|
12228
12279
|
auctionStartPrice: field,
|
|
12229
12280
|
auctionType: field,
|
|
12230
12281
|
bidDeadline: field,
|
|
12231
|
-
description:
|
|
12282
|
+
description: z59.string().max(TASK_DESCRIPTION_MAX_LENGTH),
|
|
12232
12283
|
duration: field,
|
|
12233
12284
|
maxPrice: field,
|
|
12234
12285
|
metricDescription: field,
|
|
@@ -12237,14 +12288,14 @@ var BriefFormValuesObjectSchema = z58.object({
|
|
|
12237
12288
|
pitchDeadline: field,
|
|
12238
12289
|
reward: field,
|
|
12239
12290
|
stakeBps: field,
|
|
12240
|
-
stakeRequired:
|
|
12291
|
+
stakeRequired: z59.boolean(),
|
|
12241
12292
|
// SPEC-0021 settlement terms: a preset name and its overrides as a JSON object in seconds and
|
|
12242
12293
|
// bps. Optional so drafts and brief sessions saved before terms existed still parse.
|
|
12243
12294
|
termsPreset: field.optional(),
|
|
12244
12295
|
termsOverrides: field.optional(),
|
|
12245
12296
|
tags: field,
|
|
12246
|
-
taskVisibility:
|
|
12247
|
-
submissionVisibility:
|
|
12297
|
+
taskVisibility: z59.enum(["public", "unlisted", "private"]),
|
|
12298
|
+
submissionVisibility: z59.enum(["public", "reveal_all", "winner_only", "never"]),
|
|
12248
12299
|
allowedViewers: field,
|
|
12249
12300
|
accessPassword: field,
|
|
12250
12301
|
evaluator: field,
|
|
@@ -12255,7 +12306,7 @@ var BriefFormValuesObjectSchema = z58.object({
|
|
|
12255
12306
|
evaluationWindow: field,
|
|
12256
12307
|
appealWindow: field,
|
|
12257
12308
|
disputeResolver: field,
|
|
12258
|
-
taskDropMode:
|
|
12309
|
+
taskDropMode: z59.enum(["none", "existing", "new"]),
|
|
12259
12310
|
taskDropId: field,
|
|
12260
12311
|
taskDropName: field,
|
|
12261
12312
|
taskDropDescription: field,
|
|
@@ -12273,17 +12324,17 @@ function withoutLegacyHookFields(value) {
|
|
|
12273
12324
|
delete rest[key];
|
|
12274
12325
|
return rest;
|
|
12275
12326
|
}
|
|
12276
|
-
var BriefFormValuesSchema =
|
|
12327
|
+
var BriefFormValuesSchema = z59.preprocess(withoutLegacyHookFields, BriefFormValuesObjectSchema);
|
|
12277
12328
|
var BRIEF_MAX_TURNS = 20;
|
|
12278
12329
|
var BRIEF_MESSAGE_MAX_LENGTH = 4e3;
|
|
12279
|
-
var BriefQuestionSchema =
|
|
12280
|
-
prompt:
|
|
12281
|
-
options:
|
|
12282
|
-
allowSkip:
|
|
12330
|
+
var BriefQuestionSchema = z59.object({
|
|
12331
|
+
prompt: z59.string().trim().min(1).max(500),
|
|
12332
|
+
options: z59.array(z59.string().trim().min(1).max(80)).min(2).max(4),
|
|
12333
|
+
allowSkip: z59.boolean()
|
|
12283
12334
|
}).strict();
|
|
12284
|
-
var BriefMessageSchema =
|
|
12285
|
-
role:
|
|
12286
|
-
content:
|
|
12335
|
+
var BriefMessageSchema = z59.object({
|
|
12336
|
+
role: z59.enum(["user", "assistant"]),
|
|
12337
|
+
content: z59.string().max(BRIEF_MESSAGE_MAX_LENGTH),
|
|
12287
12338
|
// Only on an assistant message that asked a question; stored with the message so a reload
|
|
12288
12339
|
// shows the same quick replies.
|
|
12289
12340
|
question: BriefQuestionSchema.nullable().optional()
|
|
@@ -12295,24 +12346,24 @@ var LEGACY_INITIAL_BRIEF_TURN_MESSAGES = [
|
|
|
12295
12346
|
function isInitialBriefTurnMessage(content) {
|
|
12296
12347
|
return content === INITIAL_BRIEF_TURN_MESSAGE || LEGACY_INITIAL_BRIEF_TURN_MESSAGES.includes(content);
|
|
12297
12348
|
}
|
|
12298
|
-
var BriefModelReplySchema =
|
|
12299
|
-
message:
|
|
12349
|
+
var BriefModelReplySchema = z59.object({
|
|
12350
|
+
message: z59.string().min(1).max(BRIEF_MESSAGE_MAX_LENGTH),
|
|
12300
12351
|
values: BriefFormValuesSchema,
|
|
12301
12352
|
workingBrief: WorkingBriefSchema.optional(),
|
|
12302
12353
|
evidence: BriefEvidenceListSchema.optional(),
|
|
12303
12354
|
researchStatus: BriefResearchStatusSchema.optional(),
|
|
12304
12355
|
question: BriefQuestionSchema.nullable().optional()
|
|
12305
12356
|
}).strict();
|
|
12306
|
-
var BriefSessionViewSchema =
|
|
12307
|
-
id:
|
|
12308
|
-
revision:
|
|
12357
|
+
var BriefSessionViewSchema = z59.object({
|
|
12358
|
+
id: z59.string().uuid(),
|
|
12359
|
+
revision: z59.number().int().nonnegative(),
|
|
12309
12360
|
values: BriefFormValuesSchema,
|
|
12310
|
-
originalRequest:
|
|
12311
|
-
messages:
|
|
12312
|
-
claimed:
|
|
12313
|
-
expiresAt:
|
|
12314
|
-
turnsRemaining:
|
|
12315
|
-
pending:
|
|
12361
|
+
originalRequest: z59.string().max(TASK_DESCRIPTION_MAX_LENGTH).optional(),
|
|
12362
|
+
messages: z59.array(BriefMessageSchema).max(BRIEF_MAX_TURNS * 2),
|
|
12363
|
+
claimed: z59.boolean(),
|
|
12364
|
+
expiresAt: z59.string().datetime(),
|
|
12365
|
+
turnsRemaining: z59.number().int().nonnegative(),
|
|
12366
|
+
pending: z59.boolean(),
|
|
12316
12367
|
workingBrief: WorkingBriefSchema.nullable().optional(),
|
|
12317
12368
|
evidence: BriefEvidenceListSchema.optional(),
|
|
12318
12369
|
decisions: ActiveBriefDecisionsSchema.optional(),
|
|
@@ -12322,43 +12373,43 @@ var BriefSessionViewSchema = z58.object({
|
|
|
12322
12373
|
// waiting on an answer. Answer it by sending the next turn's message.
|
|
12323
12374
|
question: BriefQuestionSchema.nullable().optional()
|
|
12324
12375
|
});
|
|
12325
|
-
var LauncherTrialViewSchema =
|
|
12326
|
-
agentId:
|
|
12327
|
-
startsAt:
|
|
12328
|
-
endsAt:
|
|
12329
|
-
available:
|
|
12330
|
-
status:
|
|
12331
|
-
transcript:
|
|
12376
|
+
var LauncherTrialViewSchema = z59.object({
|
|
12377
|
+
agentId: z59.string().uuid(),
|
|
12378
|
+
startsAt: z59.string().datetime(),
|
|
12379
|
+
endsAt: z59.string().datetime(),
|
|
12380
|
+
available: z59.string(),
|
|
12381
|
+
status: z59.enum(["active", "working", "exhausted", "expired", "converted"]),
|
|
12382
|
+
transcript: z59.array(BriefMessageSchema).max(BRIEF_MAX_TURNS * 2)
|
|
12332
12383
|
});
|
|
12333
|
-
var BriefRevisionSchema =
|
|
12384
|
+
var BriefRevisionSchema = z59.object({ revision: z59.number().int().nonnegative() });
|
|
12334
12385
|
var BriefEditSchema = BriefRevisionSchema.extend({
|
|
12335
12386
|
values: BriefFormValuesSchema,
|
|
12336
12387
|
workingBrief: WorkingBriefSchema.optional(),
|
|
12337
|
-
confirmSections:
|
|
12388
|
+
confirmSections: z59.array(WorkingBriefSectionSchema).max(10).optional()
|
|
12338
12389
|
});
|
|
12339
12390
|
var BriefTurnSchema = BriefRevisionSchema.extend({
|
|
12340
|
-
turnId:
|
|
12341
|
-
message:
|
|
12342
|
-
releaseSections:
|
|
12343
|
-
convertToStructuredBrief:
|
|
12391
|
+
turnId: z59.string().uuid(),
|
|
12392
|
+
message: z59.string().trim().min(1).max(BRIEF_MESSAGE_MAX_LENGTH),
|
|
12393
|
+
releaseSections: z59.array(WorkingBriefSectionSchema).max(10).optional(),
|
|
12394
|
+
convertToStructuredBrief: z59.boolean().optional()
|
|
12344
12395
|
});
|
|
12345
12396
|
var BriefAgentHandoffInputSchema = BriefRevisionSchema.extend({
|
|
12346
|
-
briefId:
|
|
12397
|
+
briefId: z59.string().uuid()
|
|
12347
12398
|
}).strict();
|
|
12348
12399
|
var BriefAgentLaunchSchema = BriefAgentHandoffInputSchema.extend({
|
|
12349
|
-
requestKey:
|
|
12350
|
-
target:
|
|
12351
|
-
|
|
12352
|
-
|
|
12400
|
+
requestKey: z59.string().uuid(),
|
|
12401
|
+
target: z59.discriminatedUnion("kind", [
|
|
12402
|
+
z59.object({ kind: z59.literal("new"), name: z59.string().trim().min(1).max(100) }).strict(),
|
|
12403
|
+
z59.object({ kind: z59.literal("existing"), agentId: z59.string().uuid() }).strict()
|
|
12353
12404
|
])
|
|
12354
12405
|
}).strict();
|
|
12355
|
-
var BriefAgentHandoffSchema =
|
|
12356
|
-
proposedName:
|
|
12357
|
-
expiresAt:
|
|
12358
|
-
briefId:
|
|
12359
|
-
revision:
|
|
12360
|
-
description:
|
|
12361
|
-
status:
|
|
12406
|
+
var BriefAgentHandoffSchema = z59.object({
|
|
12407
|
+
proposedName: z59.string().min(1).max(100),
|
|
12408
|
+
expiresAt: z59.string().datetime(),
|
|
12409
|
+
briefId: z59.string().uuid(),
|
|
12410
|
+
revision: z59.number().int().nonnegative(),
|
|
12411
|
+
description: z59.string(),
|
|
12412
|
+
status: z59.enum([
|
|
12362
12413
|
"trial_available",
|
|
12363
12414
|
"launch_ready",
|
|
12364
12415
|
"subscription_needed",
|
|
@@ -12370,13 +12421,13 @@ var BriefAgentHandoffSchema = z58.object({
|
|
|
12370
12421
|
"paused",
|
|
12371
12422
|
"environment_unavailable"
|
|
12372
12423
|
]),
|
|
12373
|
-
agents:
|
|
12374
|
-
canCreateAgent:
|
|
12375
|
-
canSendToExistingAgent:
|
|
12376
|
-
trialEndsAt:
|
|
12377
|
-
trialDurationDays:
|
|
12378
|
-
trialAllowanceSubunits:
|
|
12379
|
-
availableSubunits:
|
|
12424
|
+
agents: z59.array(z59.object({ id: z59.string().uuid(), name: z59.string(), paused: z59.boolean() })),
|
|
12425
|
+
canCreateAgent: z59.boolean(),
|
|
12426
|
+
canSendToExistingAgent: z59.boolean(),
|
|
12427
|
+
trialEndsAt: z59.string().datetime().nullable(),
|
|
12428
|
+
trialDurationDays: z59.number().int().positive(),
|
|
12429
|
+
trialAllowanceSubunits: z59.string(),
|
|
12430
|
+
availableSubunits: z59.string().nullable()
|
|
12380
12431
|
});
|
|
12381
12432
|
|
|
12382
12433
|
// ../../packages/shared/dist/platform.constants.js
|
|
@@ -15582,52 +15633,52 @@ function formatPaymentAmount(value, chainId, options = { trimTrailingZeros: true
|
|
|
15582
15633
|
}
|
|
15583
15634
|
|
|
15584
15635
|
// ../../packages/shared/dist/schemas/swarm-coordination.schemas.js
|
|
15585
|
-
import { z as
|
|
15636
|
+
import { z as z60 } from "zod";
|
|
15586
15637
|
var SWARM_CREATES_PER_JOB = 2;
|
|
15587
15638
|
var SWARM_ARTIFACT_INLINE_MAX_BYTES = 65536;
|
|
15588
|
-
var SwarmArtifactSavePathSchema =
|
|
15589
|
-
var SwarmCoordinationPermissionsSchema =
|
|
15590
|
-
create:
|
|
15591
|
-
dispatch:
|
|
15592
|
-
resume:
|
|
15639
|
+
var SwarmArtifactSavePathSchema = z60.string().trim().min(1).max(1024).refine((path3) => !path3.startsWith("/") && !path3.startsWith("~") && !path3.includes("\0") && !path3.includes("\\") && !path3.endsWith("/") && path3.split("/").every((part) => part !== ".." && part !== "." && part !== ""), { message: "saveTo must be a relative file path inside your workspace" });
|
|
15640
|
+
var SwarmCoordinationPermissionsSchema = z60.object({
|
|
15641
|
+
create: z60.boolean().default(false),
|
|
15642
|
+
dispatch: z60.boolean().default(false),
|
|
15643
|
+
resume: z60.boolean().default(false)
|
|
15593
15644
|
}).strict();
|
|
15594
|
-
var SwarmProfileInputSchema =
|
|
15595
|
-
agentId:
|
|
15596
|
-
requestKey:
|
|
15597
|
-
name:
|
|
15598
|
-
responsibility:
|
|
15645
|
+
var SwarmProfileInputSchema = z60.object({
|
|
15646
|
+
agentId: z60.string().uuid(),
|
|
15647
|
+
requestKey: z60.string().uuid(),
|
|
15648
|
+
name: z60.string().trim().min(1).max(100),
|
|
15649
|
+
responsibility: z60.string().trim().max(500),
|
|
15599
15650
|
/**
|
|
15600
15651
|
* The agent's instructions.md memory document (SM-24). Omit to leave it unchanged, e.g. when
|
|
15601
15652
|
* it was written in the Memory tab beyond this editor's limit.
|
|
15602
15653
|
*/
|
|
15603
|
-
instructions:
|
|
15654
|
+
instructions: z60.string().trim().max(16e3).optional(),
|
|
15604
15655
|
/**
|
|
15605
15656
|
* The instructions.md version the editor loaded (`SwarmProfile.instructionsVersion`); a save
|
|
15606
15657
|
* whose text differs is refused with MEMORY_VERSION_CONFLICT if the document moved on since.
|
|
15607
15658
|
*/
|
|
15608
|
-
instructionsVersion:
|
|
15659
|
+
instructionsVersion: z60.number().int().min(0).optional(),
|
|
15609
15660
|
permissions: SwarmCoordinationPermissionsSchema
|
|
15610
15661
|
}).strict();
|
|
15611
|
-
var SwarmProfileSchema =
|
|
15612
|
-
available:
|
|
15613
|
-
agentId:
|
|
15614
|
-
name:
|
|
15615
|
-
responsibility:
|
|
15616
|
-
instructions:
|
|
15662
|
+
var SwarmProfileSchema = z60.object({
|
|
15663
|
+
available: z60.boolean().default(false),
|
|
15664
|
+
agentId: z60.string().uuid(),
|
|
15665
|
+
name: z60.string(),
|
|
15666
|
+
responsibility: z60.string(),
|
|
15667
|
+
instructions: z60.string(),
|
|
15617
15668
|
/** Version of the live instructions.md memory document; 0 when there is none. */
|
|
15618
|
-
instructionsVersion:
|
|
15619
|
-
version:
|
|
15620
|
-
generation:
|
|
15621
|
-
creatorAgentId:
|
|
15622
|
-
creatorJobId:
|
|
15669
|
+
instructionsVersion: z60.number().int().default(0),
|
|
15670
|
+
version: z60.number().int(),
|
|
15671
|
+
generation: z60.number().int(),
|
|
15672
|
+
creatorAgentId: z60.string().uuid().nullable(),
|
|
15673
|
+
creatorJobId: z60.string().uuid().nullable(),
|
|
15623
15674
|
permissions: SwarmCoordinationPermissionsSchema
|
|
15624
15675
|
});
|
|
15625
|
-
var SwarmMemberSchema =
|
|
15626
|
-
agentId:
|
|
15627
|
-
name:
|
|
15628
|
-
responsibility:
|
|
15629
|
-
creatorAgentId:
|
|
15630
|
-
state:
|
|
15676
|
+
var SwarmMemberSchema = z60.object({
|
|
15677
|
+
agentId: z60.string().uuid(),
|
|
15678
|
+
name: z60.string(),
|
|
15679
|
+
responsibility: z60.string(),
|
|
15680
|
+
creatorAgentId: z60.string().uuid().nullable(),
|
|
15681
|
+
state: z60.enum([
|
|
15631
15682
|
"idle",
|
|
15632
15683
|
"queued",
|
|
15633
15684
|
"working",
|
|
@@ -15638,89 +15689,89 @@ var SwarmMemberSchema = z59.object({
|
|
|
15638
15689
|
"waiting",
|
|
15639
15690
|
"failed"
|
|
15640
15691
|
]),
|
|
15641
|
-
queuedCount:
|
|
15642
|
-
jobId:
|
|
15643
|
-
runId:
|
|
15644
|
-
headline:
|
|
15645
|
-
progress:
|
|
15646
|
-
updatedAt:
|
|
15647
|
-
freshness:
|
|
15648
|
-
waitingFor:
|
|
15649
|
-
nextRunAt:
|
|
15650
|
-
lastResult:
|
|
15651
|
-
jobId:
|
|
15652
|
-
summary:
|
|
15653
|
-
artifacts:
|
|
15654
|
-
finishedAt:
|
|
15692
|
+
queuedCount: z60.number().int(),
|
|
15693
|
+
jobId: z60.string().uuid().nullable(),
|
|
15694
|
+
runId: z60.string().uuid().nullable(),
|
|
15695
|
+
headline: z60.string().nullable(),
|
|
15696
|
+
progress: z60.string().nullable(),
|
|
15697
|
+
updatedAt: z60.string().nullable(),
|
|
15698
|
+
freshness: z60.enum(["current", "stale", "unpublished"]),
|
|
15699
|
+
waitingFor: z60.array(z60.string().uuid()),
|
|
15700
|
+
nextRunAt: z60.string().nullable(),
|
|
15701
|
+
lastResult: z60.object({
|
|
15702
|
+
jobId: z60.string().uuid(),
|
|
15703
|
+
summary: z60.string(),
|
|
15704
|
+
artifacts: z60.array(z60.object({ artifactId: z60.string().uuid(), sha256: z60.string(), path: z60.string() })).optional(),
|
|
15705
|
+
finishedAt: z60.string().nullable()
|
|
15655
15706
|
}).nullable(),
|
|
15656
15707
|
/**
|
|
15657
15708
|
* The agent's most recently finished job, whatever its outcome. `lastResult` covers only a
|
|
15658
15709
|
* completed job that published a summary; this is what an owner's "finished, come look" signal
|
|
15659
15710
|
* reads. Optional so an overview from an older backend still parses.
|
|
15660
15711
|
*/
|
|
15661
|
-
lastFinished:
|
|
15662
|
-
jobId:
|
|
15712
|
+
lastFinished: z60.object({
|
|
15713
|
+
jobId: z60.string().uuid(),
|
|
15663
15714
|
status: LauncherJobStatusSchema.extract(["completed", "failed", "interrupted"]),
|
|
15664
|
-
finishedAt:
|
|
15715
|
+
finishedAt: z60.string().nullable()
|
|
15665
15716
|
}).nullable().optional(),
|
|
15666
|
-
asOf:
|
|
15717
|
+
asOf: z60.string()
|
|
15667
15718
|
});
|
|
15668
|
-
var SwarmOverviewSchema =
|
|
15669
|
-
members:
|
|
15670
|
-
asOf:
|
|
15719
|
+
var SwarmOverviewSchema = z60.object({
|
|
15720
|
+
members: z60.array(SwarmMemberSchema).max(10),
|
|
15721
|
+
asOf: z60.string()
|
|
15671
15722
|
});
|
|
15672
|
-
var artifactIds =
|
|
15723
|
+
var artifactIds = z60.array(z60.string().uuid()).max(8).default([]);
|
|
15673
15724
|
var SwarmToolInputSchemas = {
|
|
15674
|
-
sessions_list:
|
|
15675
|
-
sessions_inspect:
|
|
15676
|
-
sessions_create:
|
|
15677
|
-
intentKey:
|
|
15678
|
-
name:
|
|
15679
|
-
responsibility:
|
|
15680
|
-
instructions:
|
|
15681
|
-
prompt:
|
|
15725
|
+
sessions_list: z60.object({}).strict(),
|
|
15726
|
+
sessions_inspect: z60.object({ agentId: z60.string().uuid() }).strict(),
|
|
15727
|
+
sessions_create: z60.object({
|
|
15728
|
+
intentKey: z60.string().trim().min(1).max(100),
|
|
15729
|
+
name: z60.string().trim().min(1).max(100),
|
|
15730
|
+
responsibility: z60.string().trim().min(1).max(500),
|
|
15731
|
+
instructions: z60.string().trim().min(1).max(16e3),
|
|
15732
|
+
prompt: z60.string().trim().min(1).max(16e3)
|
|
15682
15733
|
}).strict(),
|
|
15683
|
-
sessions_send:
|
|
15684
|
-
agentId:
|
|
15685
|
-
requestKey:
|
|
15686
|
-
message:
|
|
15734
|
+
sessions_send: z60.object({
|
|
15735
|
+
agentId: z60.string().uuid(),
|
|
15736
|
+
requestKey: z60.string().uuid(),
|
|
15737
|
+
message: z60.string().trim().min(1).max(16e3),
|
|
15687
15738
|
artifactIds
|
|
15688
15739
|
}).strict(),
|
|
15689
|
-
sessions_history:
|
|
15690
|
-
agentId:
|
|
15691
|
-
before:
|
|
15740
|
+
sessions_history: z60.object({
|
|
15741
|
+
agentId: z60.string().uuid().optional(),
|
|
15742
|
+
before: z60.number().int().positive().optional()
|
|
15692
15743
|
}).strict(),
|
|
15693
|
-
sessions_result:
|
|
15694
|
-
sessions_wait:
|
|
15695
|
-
jobIds:
|
|
15696
|
-
mode:
|
|
15697
|
-
prompt:
|
|
15698
|
-
timeoutSeconds:
|
|
15744
|
+
sessions_result: z60.object({ jobId: z60.string().uuid() }).strict(),
|
|
15745
|
+
sessions_wait: z60.object({
|
|
15746
|
+
jobIds: z60.array(z60.string().uuid()).min(1).max(8),
|
|
15747
|
+
mode: z60.enum(["any", "all"]),
|
|
15748
|
+
prompt: z60.string().trim().min(1).max(16e3),
|
|
15749
|
+
timeoutSeconds: z60.number().int().min(60).max(604800)
|
|
15699
15750
|
}).strict(),
|
|
15700
|
-
sessions_update_status:
|
|
15701
|
-
headline:
|
|
15702
|
-
progress:
|
|
15703
|
-
resultSummary:
|
|
15751
|
+
sessions_update_status: z60.object({
|
|
15752
|
+
headline: z60.string().trim().min(1).max(200),
|
|
15753
|
+
progress: z60.string().trim().max(1e3),
|
|
15754
|
+
resultSummary: z60.string().trim().max(1e3).optional(),
|
|
15704
15755
|
artifactIds
|
|
15705
15756
|
}).strict(),
|
|
15706
|
-
sessions_read_artifact:
|
|
15707
|
-
artifactId:
|
|
15757
|
+
sessions_read_artifact: z60.object({
|
|
15758
|
+
artifactId: z60.string().uuid(),
|
|
15708
15759
|
saveTo: SwarmArtifactSavePathSchema.optional(),
|
|
15709
|
-
overwrite:
|
|
15760
|
+
overwrite: z60.boolean().optional()
|
|
15710
15761
|
}).strict()
|
|
15711
15762
|
};
|
|
15712
|
-
var SwarmWaitSchema =
|
|
15713
|
-
id:
|
|
15714
|
-
sourceJobId:
|
|
15715
|
-
jobIds:
|
|
15716
|
-
state:
|
|
15717
|
-
reason:
|
|
15718
|
-
deadline:
|
|
15719
|
-
continuationJobId:
|
|
15763
|
+
var SwarmWaitSchema = z60.object({
|
|
15764
|
+
id: z60.string().uuid(),
|
|
15765
|
+
sourceJobId: z60.string().uuid(),
|
|
15766
|
+
jobIds: z60.array(z60.string().uuid()),
|
|
15767
|
+
state: z60.enum(["pending", "delivered", "cancelled"]),
|
|
15768
|
+
reason: z60.string().nullable(),
|
|
15769
|
+
deadline: z60.string(),
|
|
15770
|
+
continuationJobId: z60.string().uuid().nullable()
|
|
15720
15771
|
});
|
|
15721
15772
|
|
|
15722
15773
|
// ../../packages/shared/dist/schemas/user-skills.schemas.js
|
|
15723
|
-
import { z as
|
|
15774
|
+
import { z as z61 } from "zod";
|
|
15724
15775
|
import { parseDocument } from "yaml";
|
|
15725
15776
|
var USER_SKILL_LIMITS = {
|
|
15726
15777
|
files: 20,
|
|
@@ -15743,11 +15794,11 @@ var readablePathOk = (path3, strict) => {
|
|
|
15743
15794
|
return (!strict || !isUserSkillPathAmbiguous(path3)) && parts.length <= 8 && parts.every((part) => part && part !== "." && part !== ".." && bytes(part) <= 255 && !part.startsWith(".") && ![...part].some((c) => c === "\\" || c.charCodeAt(0) < 32 || c.charCodeAt(0) === 127)) && /\.(md|txt|json|yaml|yml)$/i.test(path3) && (path3 === "SKILL.md" || !parts.some((p) => p.toLowerCase() === "skill.md"));
|
|
15744
15795
|
};
|
|
15745
15796
|
var readablePathMessage = "Use a relative text-file path; only the main SKILL.md entrypoint is allowed";
|
|
15746
|
-
var readablePathSchema = (strict) =>
|
|
15797
|
+
var readablePathSchema = (strict) => z61.string().min(1).max(240).refine((path3) => readablePathOk(path3, strict), readablePathMessage);
|
|
15747
15798
|
var UserSkillPathSchema = readablePathSchema(true);
|
|
15748
|
-
var readableFileSchema = (strict) =>
|
|
15799
|
+
var readableFileSchema = (strict) => z61.object({
|
|
15749
15800
|
path: readablePathSchema(strict),
|
|
15750
|
-
content:
|
|
15801
|
+
content: z61.string().max(USER_SKILL_LIMITS.bytes).refine((s) => ![...s].some((c) => c.charCodeAt(0) < 32 && ![9, 10, 13].includes(c.charCodeAt(0))) && bytes(s) <= USER_SKILL_LIMITS.bytes, "File exceeds 1 MiB or contains binary data")
|
|
15751
15802
|
}).strict();
|
|
15752
15803
|
var UserSkillFileSchema = readableFileSchema(true);
|
|
15753
15804
|
var USER_SKILL_SANDBOX_LIMITS = {
|
|
@@ -15954,23 +16005,23 @@ function isUserSkillNativeBinaryMagic(head) {
|
|
|
15954
16005
|
return NATIVE_MAGIC.some((magic) => magic.every((byte, i) => head[i] === byte));
|
|
15955
16006
|
}
|
|
15956
16007
|
var sandboxFileBase = {
|
|
15957
|
-
path:
|
|
16008
|
+
path: z61.string().max(USER_SKILL_SANDBOX_LIMITS.pathLength),
|
|
15958
16009
|
/** Kept from git mode 100755 and applied when the file is copied into the VM. */
|
|
15959
|
-
executable:
|
|
16010
|
+
executable: z61.boolean().default(false)
|
|
15960
16011
|
};
|
|
15961
|
-
var UserSkillSandboxTextFileSchema =
|
|
16012
|
+
var UserSkillSandboxTextFileSchema = z61.object({
|
|
15962
16013
|
...sandboxFileBase,
|
|
15963
|
-
encoding:
|
|
15964
|
-
content:
|
|
16014
|
+
encoding: z61.literal("utf8"),
|
|
16015
|
+
content: z61.string().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
|
|
15965
16016
|
}).strict();
|
|
15966
|
-
var UserSkillSandboxBinaryFileSchema =
|
|
16017
|
+
var UserSkillSandboxBinaryFileSchema = z61.object({
|
|
15967
16018
|
...sandboxFileBase,
|
|
15968
|
-
encoding:
|
|
15969
|
-
content:
|
|
16019
|
+
encoding: z61.literal("base64"),
|
|
16020
|
+
content: z61.string().max(Math.ceil(USER_SKILL_SANDBOX_LIMITS.fileBytes / 3) * 4),
|
|
15970
16021
|
/** Declared decoded size in bytes; must match the content. */
|
|
15971
|
-
size:
|
|
16022
|
+
size: z61.number().int().nonnegative().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
|
|
15972
16023
|
}).strict();
|
|
15973
|
-
var sandboxFileSchema = (strict) =>
|
|
16024
|
+
var sandboxFileSchema = (strict) => z61.discriminatedUnion("encoding", [
|
|
15974
16025
|
UserSkillSandboxTextFileSchema,
|
|
15975
16026
|
UserSkillSandboxBinaryFileSchema
|
|
15976
16027
|
]).superRefine((file, ctx) => {
|
|
@@ -16023,12 +16074,12 @@ function classifyUserSkillEntry(entry) {
|
|
|
16023
16074
|
executable: mode === USER_SKILL_GIT_MODES.executable
|
|
16024
16075
|
};
|
|
16025
16076
|
}
|
|
16026
|
-
var bundleSchema = (strict) =>
|
|
16027
|
-
name:
|
|
16028
|
-
description:
|
|
16029
|
-
files:
|
|
16077
|
+
var bundleSchema = (strict) => z61.object({
|
|
16078
|
+
name: z61.string().trim().max(100),
|
|
16079
|
+
description: z61.string().trim().max(300),
|
|
16080
|
+
files: z61.array(readableFileSchema(strict)).min(1).max(USER_SKILL_LIMITS.files),
|
|
16030
16081
|
/** Scripts and assets copied into the agent's sandbox only (ADR-0476 section 4). */
|
|
16031
|
-
sandboxFiles:
|
|
16082
|
+
sandboxFiles: z61.array(sandboxFileSchema(strict)).max(USER_SKILL_SANDBOX_LIMITS.files, "A skill can contain at most 200 sandbox-only files").optional()
|
|
16032
16083
|
}).strict().superRefine((bundle, ctx) => {
|
|
16033
16084
|
const sandbox = bundle.sandboxFiles ?? [];
|
|
16034
16085
|
const paths = [...bundle.files, ...sandbox].map((f) => strict ? userSkillPathKey(f.path) : f.path.toLowerCase());
|
|
@@ -16067,76 +16118,76 @@ function splitUserSkill(content) {
|
|
|
16067
16118
|
metadata: match?.[1] ?? ""
|
|
16068
16119
|
};
|
|
16069
16120
|
}
|
|
16070
|
-
var UserSkillPinSchema =
|
|
16071
|
-
skillId:
|
|
16072
|
-
version:
|
|
16073
|
-
digest:
|
|
16121
|
+
var UserSkillPinSchema = z61.object({
|
|
16122
|
+
skillId: z61.string().uuid(),
|
|
16123
|
+
version: z61.number().int().positive(),
|
|
16124
|
+
digest: z61.string().regex(/^[a-f0-9]{64}$/)
|
|
16074
16125
|
}).strict();
|
|
16075
|
-
var UserSkillPinsSchema =
|
|
16076
|
-
var UserSkillIdSchema =
|
|
16126
|
+
var UserSkillPinsSchema = z61.array(UserSkillPinSchema).max(USER_SKILL_LIMITS.assigned);
|
|
16127
|
+
var UserSkillIdSchema = z61.object({ skillId: z61.string().uuid() });
|
|
16077
16128
|
var UserSkillDraftInputSchema = UserSkillIdSchema.extend({
|
|
16078
|
-
requestKey:
|
|
16079
|
-
expectedRevision:
|
|
16129
|
+
requestKey: z61.string().uuid(),
|
|
16130
|
+
expectedRevision: z61.number().int().nonnegative(),
|
|
16080
16131
|
bundle: UserSkillDraftBundleSchema
|
|
16081
16132
|
});
|
|
16082
16133
|
var UserSkillSaveVersionSchema = UserSkillIdSchema.extend({
|
|
16083
|
-
requestKey:
|
|
16084
|
-
expectedRevision:
|
|
16085
|
-
note:
|
|
16086
|
-
restoreVersion:
|
|
16134
|
+
requestKey: z61.string().uuid(),
|
|
16135
|
+
expectedRevision: z61.number().int().nonnegative(),
|
|
16136
|
+
note: z61.string().trim().max(500).default(""),
|
|
16137
|
+
restoreVersion: z61.number().int().positive().optional()
|
|
16087
16138
|
});
|
|
16088
16139
|
var UserSkillAssignSchema = UserSkillIdSchema.extend({
|
|
16089
|
-
requestKey:
|
|
16090
|
-
version:
|
|
16091
|
-
agents:
|
|
16140
|
+
requestKey: z61.string().uuid(),
|
|
16141
|
+
version: z61.number().int().positive().nullable(),
|
|
16142
|
+
agents: z61.array(z61.object({ agentId: z61.string().uuid(), expectedRevision: z61.number().int().nonnegative() })).min(1).max(100)
|
|
16092
16143
|
});
|
|
16093
16144
|
var UserSkillArchiveSchema = UserSkillIdSchema.extend({
|
|
16094
|
-
requestKey:
|
|
16095
|
-
expectedRevision:
|
|
16096
|
-
archived:
|
|
16097
|
-
removeAssignments:
|
|
16098
|
-
});
|
|
16099
|
-
var UserSkillSummarySchema =
|
|
16100
|
-
id:
|
|
16101
|
-
name:
|
|
16102
|
-
description:
|
|
16103
|
-
archived:
|
|
16104
|
-
latestVersion:
|
|
16105
|
-
revision:
|
|
16106
|
-
hasDraft:
|
|
16107
|
-
assignedCount:
|
|
16108
|
-
outdatedCount:
|
|
16109
|
-
updatedAt:
|
|
16145
|
+
requestKey: z61.string().uuid(),
|
|
16146
|
+
expectedRevision: z61.number().int().nonnegative(),
|
|
16147
|
+
archived: z61.boolean(),
|
|
16148
|
+
removeAssignments: z61.boolean().default(false)
|
|
16149
|
+
});
|
|
16150
|
+
var UserSkillSummarySchema = z61.object({
|
|
16151
|
+
id: z61.string().uuid(),
|
|
16152
|
+
name: z61.string(),
|
|
16153
|
+
description: z61.string(),
|
|
16154
|
+
archived: z61.boolean(),
|
|
16155
|
+
latestVersion: z61.number().int(),
|
|
16156
|
+
revision: z61.number().int(),
|
|
16157
|
+
hasDraft: z61.boolean(),
|
|
16158
|
+
assignedCount: z61.number().int(),
|
|
16159
|
+
outdatedCount: z61.number().int(),
|
|
16160
|
+
updatedAt: z61.string(),
|
|
16110
16161
|
/**
|
|
16111
16162
|
* The hosted agent that authored the latest version, or null when the owner did (ADR-0476
|
|
16112
16163
|
* section 6). Optional for older backends.
|
|
16113
16164
|
*/
|
|
16114
|
-
latestAuthorAgentId:
|
|
16115
|
-
});
|
|
16116
|
-
var UserSkillAgentSchema =
|
|
16117
|
-
agentId:
|
|
16118
|
-
name:
|
|
16119
|
-
managed:
|
|
16120
|
-
paused:
|
|
16121
|
-
working:
|
|
16122
|
-
revision:
|
|
16165
|
+
latestAuthorAgentId: z61.string().uuid().nullable().optional()
|
|
16166
|
+
});
|
|
16167
|
+
var UserSkillAgentSchema = z61.object({
|
|
16168
|
+
agentId: z61.string().uuid(),
|
|
16169
|
+
name: z61.string(),
|
|
16170
|
+
managed: z61.boolean().optional(),
|
|
16171
|
+
paused: z61.boolean(),
|
|
16172
|
+
working: z61.boolean(),
|
|
16173
|
+
revision: z61.number().int(),
|
|
16123
16174
|
desired: UserSkillPinsSchema,
|
|
16124
16175
|
observed: UserSkillPinsSchema,
|
|
16125
|
-
state:
|
|
16126
|
-
errorCode:
|
|
16127
|
-
sessionId:
|
|
16176
|
+
state: z61.enum(["pending", "applying", "ready", "error"]),
|
|
16177
|
+
errorCode: z61.string().nullable(),
|
|
16178
|
+
sessionId: z61.string().nullable()
|
|
16128
16179
|
});
|
|
16129
|
-
var UserSkillLibrarySchema =
|
|
16130
|
-
skills:
|
|
16131
|
-
agents:
|
|
16180
|
+
var UserSkillLibrarySchema = z61.object({
|
|
16181
|
+
skills: z61.array(UserSkillSummarySchema),
|
|
16182
|
+
agents: z61.array(UserSkillAgentSchema)
|
|
16132
16183
|
});
|
|
16133
16184
|
var USER_SKILL_GITHUB_REPO_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$/;
|
|
16134
|
-
var UserSkillGithubRepoSchema =
|
|
16135
|
-
var UserSkillGithubPathSchema =
|
|
16136
|
-
var UserSkillCommitShaSchema =
|
|
16137
|
-
var UserSkillUploadSourceSchema =
|
|
16138
|
-
var UserSkillGithubSourceSchema =
|
|
16139
|
-
kind:
|
|
16185
|
+
var UserSkillGithubRepoSchema = z61.string().regex(USER_SKILL_GITHUB_REPO_PATTERN, "Use a GitHub repository as owner/repo").refine((repo) => ![".", ".."].includes(repo.split("/")[1]), "Use a GitHub repository as owner/repo");
|
|
16186
|
+
var UserSkillGithubPathSchema = z61.string().max(1024).refine((path3) => path3 === "" || !path3.startsWith("/") && path3.split("/").every((part) => part && part !== "." && part !== ".." && ![...part].some((c) => c === "\\" || c.charCodeAt(0) < 32 || c.charCodeAt(0) === 127)), "Use a directory path inside the repository");
|
|
16187
|
+
var UserSkillCommitShaSchema = z61.string().regex(/^[a-f0-9]{40}$/, "Use a full 40-character lowercase commit SHA");
|
|
16188
|
+
var UserSkillUploadSourceSchema = z61.object({ kind: z61.literal("upload") }).strict();
|
|
16189
|
+
var UserSkillGithubSourceSchema = z61.object({
|
|
16190
|
+
kind: z61.literal("github"),
|
|
16140
16191
|
repo: UserSkillGithubRepoSchema,
|
|
16141
16192
|
path: UserSkillGithubPathSchema,
|
|
16142
16193
|
commitSha: UserSkillCommitShaSchema,
|
|
@@ -16145,49 +16196,49 @@ var UserSkillGithubSourceSchema = z60.object({
|
|
|
16145
16196
|
* another ID was deleted and recreated under the same name, not renamed. Versions saved
|
|
16146
16197
|
* before it was recorded have none.
|
|
16147
16198
|
*/
|
|
16148
|
-
repoId:
|
|
16199
|
+
repoId: z61.number().int().positive().optional(),
|
|
16149
16200
|
/** The ref the owner or agent asked for (branch, tag or SHA) before it was resolved. */
|
|
16150
|
-
ref:
|
|
16151
|
-
fetchedAt:
|
|
16201
|
+
ref: z61.string().min(1).max(255).refine((ref) => ![...ref].some((c) => c.charCodeAt(0) <= 32 || c.charCodeAt(0) === 127), "Use a git branch, tag or commit"),
|
|
16202
|
+
fetchedAt: z61.string().datetime({ offset: true }),
|
|
16152
16203
|
/** Frontmatter `license` or the repository licence; null when none was found. */
|
|
16153
|
-
license:
|
|
16204
|
+
license: z61.string().trim().max(200).nullable().optional(),
|
|
16154
16205
|
/** Paths in the skill directory that were not imported (the preview lists the reasons). */
|
|
16155
|
-
excludedPaths:
|
|
16206
|
+
excludedPaths: z61.array(z61.string().min(1).max(1024)).max(1e3)
|
|
16156
16207
|
}).strict();
|
|
16157
|
-
var UserSkillAgentSourceSchema =
|
|
16158
|
-
var UserSkillSourceSchema =
|
|
16208
|
+
var UserSkillAgentSourceSchema = z61.object({ kind: z61.literal("agent"), agentId: z61.string().uuid() }).strict();
|
|
16209
|
+
var UserSkillSourceSchema = z61.discriminatedUnion("kind", [
|
|
16159
16210
|
UserSkillUploadSourceSchema,
|
|
16160
16211
|
UserSkillGithubSourceSchema,
|
|
16161
16212
|
UserSkillAgentSourceSchema
|
|
16162
16213
|
]);
|
|
16163
|
-
var UserSkillVersionAuthorSchema =
|
|
16164
|
-
|
|
16165
|
-
|
|
16214
|
+
var UserSkillVersionAuthorSchema = z61.discriminatedUnion("kind", [
|
|
16215
|
+
z61.object({ kind: z61.literal("owner"), memberId: z61.string().min(1).max(256) }).strict(),
|
|
16216
|
+
z61.object({ kind: z61.literal("agent"), agentId: z61.string().uuid() }).strict()
|
|
16166
16217
|
]);
|
|
16167
|
-
var UserSkillVersionSchema =
|
|
16168
|
-
version:
|
|
16169
|
-
digest:
|
|
16170
|
-
name:
|
|
16171
|
-
description:
|
|
16172
|
-
bytes:
|
|
16173
|
-
fileCount:
|
|
16174
|
-
note:
|
|
16175
|
-
createdAt:
|
|
16218
|
+
var UserSkillVersionSchema = z61.object({
|
|
16219
|
+
version: z61.number().int(),
|
|
16220
|
+
digest: z61.string(),
|
|
16221
|
+
name: z61.string(),
|
|
16222
|
+
description: z61.string(),
|
|
16223
|
+
bytes: z61.number().int(),
|
|
16224
|
+
fileCount: z61.number().int(),
|
|
16225
|
+
note: z61.string(),
|
|
16226
|
+
createdAt: z61.string(),
|
|
16176
16227
|
/** Where the version came from (ADR-0476). The backend always sends it. */
|
|
16177
16228
|
source: UserSkillSourceSchema.optional(),
|
|
16178
16229
|
/** Who saved the version (ADR-0476). The backend always sends it. */
|
|
16179
16230
|
author: UserSkillVersionAuthorSchema.optional()
|
|
16180
16231
|
});
|
|
16181
|
-
var UserSkillDetailSchema =
|
|
16232
|
+
var UserSkillDetailSchema = z61.object({
|
|
16182
16233
|
skill: UserSkillSummarySchema,
|
|
16183
16234
|
draft: UserSkillStoredBundleSchema.nullable(),
|
|
16184
|
-
versions:
|
|
16185
|
-
agents:
|
|
16235
|
+
versions: z61.array(UserSkillVersionSchema),
|
|
16236
|
+
agents: z61.array(UserSkillAgentSchema)
|
|
16186
16237
|
});
|
|
16187
16238
|
var USER_SKILL_AUTHORING_MODES = ["off", "drafts", "free"];
|
|
16188
|
-
var UserSkillAuthoringModeSchema =
|
|
16189
|
-
var UserSkillAuthoringModeViewSchema =
|
|
16190
|
-
agentId:
|
|
16239
|
+
var UserSkillAuthoringModeSchema = z61.enum(USER_SKILL_AUTHORING_MODES);
|
|
16240
|
+
var UserSkillAuthoringModeViewSchema = z61.object({
|
|
16241
|
+
agentId: z61.string().uuid(),
|
|
16191
16242
|
mode: UserSkillAuthoringModeSchema
|
|
16192
16243
|
});
|
|
16193
16244
|
var UserSkillAuthoringModeInputSchema = UserSkillAuthoringModeViewSchema.strict();
|
|
@@ -16198,199 +16249,199 @@ var USER_SKILL_SHARE_REQUEST_STATUSES = [
|
|
|
16198
16249
|
"superseded",
|
|
16199
16250
|
"cancelled"
|
|
16200
16251
|
];
|
|
16201
|
-
var UserSkillShareRequestStatusSchema =
|
|
16202
|
-
var UserSkillShareRequestSchema =
|
|
16203
|
-
id:
|
|
16204
|
-
skillId:
|
|
16252
|
+
var UserSkillShareRequestStatusSchema = z61.enum(USER_SKILL_SHARE_REQUEST_STATUSES);
|
|
16253
|
+
var UserSkillShareRequestSchema = z61.object({
|
|
16254
|
+
id: z61.string().uuid(),
|
|
16255
|
+
skillId: z61.string().uuid(),
|
|
16205
16256
|
/** The skill's current name in the library. */
|
|
16206
|
-
skillName:
|
|
16207
|
-
version:
|
|
16257
|
+
skillName: z61.string(),
|
|
16258
|
+
version: z61.number().int().positive(),
|
|
16208
16259
|
/**
|
|
16209
16260
|
* The requested version's own name and description, which the owner reviews: a later version
|
|
16210
16261
|
* may have renamed the skill (ADR-0476 section 6).
|
|
16211
16262
|
*/
|
|
16212
|
-
versionName:
|
|
16213
|
-
versionDescription:
|
|
16214
|
-
digest:
|
|
16215
|
-
fromAgentId:
|
|
16216
|
-
fromAgentName:
|
|
16217
|
-
toAgentId:
|
|
16218
|
-
toAgentName:
|
|
16263
|
+
versionName: z61.string(),
|
|
16264
|
+
versionDescription: z61.string(),
|
|
16265
|
+
digest: z61.string(),
|
|
16266
|
+
fromAgentId: z61.string().uuid(),
|
|
16267
|
+
fromAgentName: z61.string(),
|
|
16268
|
+
toAgentId: z61.string().uuid(),
|
|
16269
|
+
toAgentName: z61.string(),
|
|
16219
16270
|
status: UserSkillShareRequestStatusSchema,
|
|
16220
|
-
createdAt:
|
|
16221
|
-
decidedAt:
|
|
16271
|
+
createdAt: z61.string(),
|
|
16272
|
+
decidedAt: z61.string().nullable()
|
|
16222
16273
|
});
|
|
16223
|
-
var UserSkillShareRequestListInputSchema =
|
|
16224
|
-
var UserSkillShareDecisionInputSchema =
|
|
16225
|
-
var UserSkillShareRevokeInputSchema =
|
|
16226
|
-
var UserSkillShareRevokeResultSchema =
|
|
16274
|
+
var UserSkillShareRequestListInputSchema = z61.object({ status: z61.enum(["pending", "all"]).default("pending") }).strict();
|
|
16275
|
+
var UserSkillShareDecisionInputSchema = z61.object({ requestId: z61.string().uuid(), decision: z61.enum(["approve", "reject"]) }).strict();
|
|
16276
|
+
var UserSkillShareRevokeInputSchema = z61.object({ agentId: z61.string().uuid() }).strict();
|
|
16277
|
+
var UserSkillShareRevokeResultSchema = z61.object({
|
|
16227
16278
|
/** The agent whose shares were taken back. */
|
|
16228
|
-
agentId:
|
|
16279
|
+
agentId: z61.string().uuid(),
|
|
16229
16280
|
/** The agent's skill authoring mode, now `off`, so it cannot share again until the owner says. */
|
|
16230
|
-
authoringMode:
|
|
16281
|
+
authoringMode: z61.literal("off"),
|
|
16231
16282
|
/** Each pin removed from another agent; an agent whose pin was since changed keeps it. */
|
|
16232
|
-
removed:
|
|
16233
|
-
agentId:
|
|
16234
|
-
agentName:
|
|
16235
|
-
skillId:
|
|
16236
|
-
skillName:
|
|
16237
|
-
version:
|
|
16283
|
+
removed: z61.array(z61.object({
|
|
16284
|
+
agentId: z61.string().uuid(),
|
|
16285
|
+
agentName: z61.string(),
|
|
16286
|
+
skillId: z61.string().uuid(),
|
|
16287
|
+
skillName: z61.string(),
|
|
16288
|
+
version: z61.number().int().positive()
|
|
16238
16289
|
})),
|
|
16239
16290
|
/** The agent's pending share requests, now cancelled. */
|
|
16240
|
-
cancelledRequestIds:
|
|
16291
|
+
cancelledRequestIds: z61.array(z61.string().uuid())
|
|
16241
16292
|
});
|
|
16242
|
-
var UserSkillImportPreviewInputSchema =
|
|
16293
|
+
var UserSkillImportPreviewInputSchema = z61.object({
|
|
16243
16294
|
/**
|
|
16244
16295
|
* A skills.sh link (`https://skills.sh/<owner>/<repo>/<skill>`), `owner/repo` (with `skill`),
|
|
16245
16296
|
* or a GitHub directory URL (`https://github.com/<owner>/<repo>/tree/<ref>/<path>`).
|
|
16246
16297
|
*/
|
|
16247
|
-
source:
|
|
16298
|
+
source: z61.string().trim().min(1).max(2048),
|
|
16248
16299
|
/** The skill to find in the repository, by SKILL.md `name` or directory name. */
|
|
16249
|
-
skill:
|
|
16300
|
+
skill: z61.string().trim().min(1).max(200).optional(),
|
|
16250
16301
|
/** Branch, tag or commit; defaults to the repository's default branch. */
|
|
16251
16302
|
ref: UserSkillGithubSourceSchema.shape.ref.optional()
|
|
16252
16303
|
}).strict();
|
|
16253
|
-
var UserSkillImportFileSchema =
|
|
16254
|
-
path:
|
|
16304
|
+
var UserSkillImportFileSchema = z61.object({
|
|
16305
|
+
path: z61.string(),
|
|
16255
16306
|
/** Decoded bytes. */
|
|
16256
|
-
size:
|
|
16307
|
+
size: z61.number().int().nonnegative(),
|
|
16257
16308
|
/** `readable`: served through skill_read. `sandbox`: copied into the agent's VM only. */
|
|
16258
|
-
kind:
|
|
16259
|
-
executable:
|
|
16309
|
+
kind: z61.enum(["readable", "sandbox"]),
|
|
16310
|
+
executable: z61.boolean(),
|
|
16260
16311
|
/**
|
|
16261
16312
|
* The file's text for the owner to read before saving; null for a binary asset, whose bytes
|
|
16262
16313
|
* are not sent. Optional for older backends.
|
|
16263
16314
|
*/
|
|
16264
|
-
text:
|
|
16315
|
+
text: z61.string().nullable().optional()
|
|
16265
16316
|
});
|
|
16266
|
-
var UserSkillImportExcludedSchema =
|
|
16267
|
-
var UserSkillImportPreviewSchema =
|
|
16317
|
+
var UserSkillImportExcludedSchema = z61.object({ path: z61.string(), reason: z61.string() });
|
|
16318
|
+
var UserSkillImportPreviewSchema = z61.object({
|
|
16268
16319
|
repo: UserSkillGithubRepoSchema,
|
|
16269
16320
|
path: UserSkillGithubPathSchema,
|
|
16270
|
-
ref:
|
|
16321
|
+
ref: z61.string(),
|
|
16271
16322
|
commitSha: UserSkillCommitShaSchema,
|
|
16272
|
-
name:
|
|
16273
|
-
description:
|
|
16274
|
-
files:
|
|
16323
|
+
name: z61.string(),
|
|
16324
|
+
description: z61.string(),
|
|
16325
|
+
files: z61.array(UserSkillImportFileSchema),
|
|
16275
16326
|
/** Every file that will not be imported, with its reason; the import must confirm them. */
|
|
16276
|
-
excluded:
|
|
16277
|
-
warnings:
|
|
16278
|
-
license:
|
|
16327
|
+
excluded: z61.array(UserSkillImportExcludedSchema),
|
|
16328
|
+
warnings: z61.array(z61.string()),
|
|
16329
|
+
license: z61.string().nullable(),
|
|
16279
16330
|
/** An existing skill whose latest version already has exactly this content. */
|
|
16280
|
-
upToDate:
|
|
16331
|
+
upToDate: z61.object({ skillId: z61.string().uuid(), version: z61.number().int() }).nullable(),
|
|
16281
16332
|
/** Opaque; pass it to the import unchanged before `expiresAt`. */
|
|
16282
|
-
previewToken:
|
|
16283
|
-
expiresAt:
|
|
16333
|
+
previewToken: z61.string().min(1).max(8192),
|
|
16334
|
+
expiresAt: z61.string().datetime({ offset: true })
|
|
16284
16335
|
});
|
|
16285
16336
|
var UserSkillImportInputSchema = UserSkillIdSchema.extend({
|
|
16286
|
-
previewToken:
|
|
16287
|
-
requestKey:
|
|
16337
|
+
previewToken: z61.string().min(1).max(8192),
|
|
16338
|
+
requestKey: z61.string().uuid(),
|
|
16288
16339
|
/** 0 for a new skill; the skill's revision when importing a new version of an existing one. */
|
|
16289
|
-
expectedRevision:
|
|
16340
|
+
expectedRevision: z61.number().int().nonnegative(),
|
|
16290
16341
|
/** Must be true when the preview listed excluded files. */
|
|
16291
|
-
confirmExclusions:
|
|
16342
|
+
confirmExclusions: z61.boolean().default(false),
|
|
16292
16343
|
/**
|
|
16293
16344
|
* Must be true to save an update whose check listed `sourceChanges`: the repository was
|
|
16294
16345
|
* replaced, or the new commit does not descend from the current one.
|
|
16295
16346
|
*/
|
|
16296
|
-
confirmSourceChange:
|
|
16297
|
-
note:
|
|
16347
|
+
confirmSourceChange: z61.boolean().default(false),
|
|
16348
|
+
note: z61.string().trim().max(500).default("")
|
|
16298
16349
|
}).strict();
|
|
16299
|
-
var UserSkillImportResultSchema =
|
|
16350
|
+
var UserSkillImportResultSchema = z61.object({
|
|
16300
16351
|
/** `up_to_date`: an existing version already has this content, and nothing was saved. */
|
|
16301
|
-
status:
|
|
16302
|
-
skillId:
|
|
16303
|
-
version:
|
|
16304
|
-
revision:
|
|
16352
|
+
status: z61.enum(["imported", "up_to_date"]),
|
|
16353
|
+
skillId: z61.string().uuid(),
|
|
16354
|
+
version: z61.number().int().positive(),
|
|
16355
|
+
revision: z61.number().int().nonnegative()
|
|
16305
16356
|
});
|
|
16306
16357
|
var UserSkillUpdateCheckInputSchema = UserSkillIdSchema.strict();
|
|
16307
|
-
var UserSkillUpdateFileChangeSchema =
|
|
16308
|
-
path:
|
|
16309
|
-
change:
|
|
16310
|
-
kind:
|
|
16358
|
+
var UserSkillUpdateFileChangeSchema = z61.object({
|
|
16359
|
+
path: z61.string(),
|
|
16360
|
+
change: z61.enum(["added", "removed", "changed"]),
|
|
16361
|
+
kind: z61.enum(["readable", "sandbox"]),
|
|
16311
16362
|
/** Decoded bytes at the new commit; null when removed. */
|
|
16312
|
-
size:
|
|
16363
|
+
size: z61.number().int().nonnegative().nullable(),
|
|
16313
16364
|
/** Decoded bytes in the current version; null when added. */
|
|
16314
|
-
previousSize:
|
|
16365
|
+
previousSize: z61.number().int().nonnegative().nullable(),
|
|
16315
16366
|
/**
|
|
16316
16367
|
* For a changed text file: lines only the new commit has (`added`) and lines only the current
|
|
16317
16368
|
* version has (`removed`), counted as multisets, so a moved line counts as neither. Null for
|
|
16318
16369
|
* binary, added and removed files.
|
|
16319
16370
|
*/
|
|
16320
|
-
lines:
|
|
16371
|
+
lines: z61.object({ added: z61.number().int().nonnegative(), removed: z61.number().int().nonnegative() }).nullable()
|
|
16321
16372
|
});
|
|
16322
|
-
var UserSkillUpdateBaseSchema =
|
|
16323
|
-
skillId:
|
|
16373
|
+
var UserSkillUpdateBaseSchema = z61.object({
|
|
16374
|
+
skillId: z61.string().uuid(),
|
|
16324
16375
|
/** The skill's latest version, which the check compares against. */
|
|
16325
|
-
version:
|
|
16376
|
+
version: z61.number().int().positive(),
|
|
16326
16377
|
repo: UserSkillGithubRepoSchema,
|
|
16327
16378
|
path: UserSkillGithubPathSchema,
|
|
16328
16379
|
/** The ref that was resolved: the stored one, or the default branch when a commit was pinned. */
|
|
16329
|
-
ref:
|
|
16380
|
+
ref: z61.string(),
|
|
16330
16381
|
/** The commit the latest version was imported from. */
|
|
16331
16382
|
currentCommitSha: UserSkillCommitShaSchema,
|
|
16332
16383
|
/** The commit the ref resolves to now. */
|
|
16333
16384
|
latestCommitSha: UserSkillCommitShaSchema
|
|
16334
16385
|
});
|
|
16335
16386
|
var USER_SKILL_SOURCE_CHANGES = ["repository_replaced", "history_rewritten"];
|
|
16336
|
-
var UserSkillSourceChangeSchema =
|
|
16387
|
+
var UserSkillSourceChangeSchema = z61.object({
|
|
16337
16388
|
/**
|
|
16338
16389
|
* `repository_replaced`: the repository now has another GitHub ID, so it was deleted and
|
|
16339
16390
|
* another created under the same name, possibly by someone else. `history_rewritten`: the new
|
|
16340
16391
|
* commit does not descend from the current one (a force-push, or unrelated history).
|
|
16341
16392
|
*/
|
|
16342
|
-
kind:
|
|
16343
|
-
message:
|
|
16393
|
+
kind: z61.enum(USER_SKILL_SOURCE_CHANGES),
|
|
16394
|
+
message: z61.string()
|
|
16344
16395
|
});
|
|
16345
|
-
var UserSkillResolvedRepositorySchema =
|
|
16396
|
+
var UserSkillResolvedRepositorySchema = z61.object({
|
|
16346
16397
|
/** `owner/repo` as GitHub spells it now. */
|
|
16347
16398
|
repo: UserSkillGithubRepoSchema,
|
|
16348
16399
|
/** GitHub's numeric repository ID, which confirming records on the version's source. */
|
|
16349
|
-
id:
|
|
16400
|
+
id: z61.number().int().positive(),
|
|
16350
16401
|
/** When GitHub created the repository, if it said. A transfer keeps it. */
|
|
16351
|
-
createdAt:
|
|
16352
|
-
defaultBranch:
|
|
16402
|
+
createdAt: z61.string().datetime({ offset: true }).nullable(),
|
|
16403
|
+
defaultBranch: z61.string()
|
|
16353
16404
|
});
|
|
16354
|
-
var UserSkillSourceVerificationSchema =
|
|
16405
|
+
var UserSkillSourceVerificationSchema = z61.object({
|
|
16355
16406
|
repository: UserSkillResolvedRepositorySchema,
|
|
16356
16407
|
/** When the version was imported (its source's `fetchedAt`), to compare with `createdAt`. */
|
|
16357
|
-
importedAt:
|
|
16408
|
+
importedAt: z61.string().datetime({ offset: true }),
|
|
16358
16409
|
/** Why the repository is unconfirmed; also listed in the check's `warnings`. */
|
|
16359
|
-
warning:
|
|
16410
|
+
warning: z61.string(),
|
|
16360
16411
|
/** Opaque; pass it to `skillSourceVerify` unchanged before `expiresAt`. */
|
|
16361
|
-
checkToken:
|
|
16362
|
-
expiresAt:
|
|
16412
|
+
checkToken: z61.string().min(1).max(8192),
|
|
16413
|
+
expiresAt: z61.string().datetime({ offset: true })
|
|
16363
16414
|
});
|
|
16364
16415
|
var UserSkillSourceVerifyInputSchema = UserSkillIdSchema.extend({
|
|
16365
|
-
checkToken:
|
|
16366
|
-
requestKey:
|
|
16416
|
+
checkToken: z61.string().min(1).max(8192),
|
|
16417
|
+
requestKey: z61.string().uuid(),
|
|
16367
16418
|
/** The skill's revision when it was checked. */
|
|
16368
|
-
expectedRevision:
|
|
16419
|
+
expectedRevision: z61.number().int().nonnegative(),
|
|
16369
16420
|
/**
|
|
16370
16421
|
* Must be true: the owner checked that this is the repository the skill was imported from.
|
|
16371
16422
|
* Refused with SKILL_IMPORT_REPOSITORY_UNCONFIRMED otherwise.
|
|
16372
16423
|
*/
|
|
16373
|
-
confirmRepository:
|
|
16424
|
+
confirmRepository: z61.boolean().default(false)
|
|
16374
16425
|
}).strict();
|
|
16375
|
-
var UserSkillSourceVerifyResultSchema =
|
|
16376
|
-
status:
|
|
16377
|
-
skillId:
|
|
16426
|
+
var UserSkillSourceVerifyResultSchema = z61.object({
|
|
16427
|
+
status: z61.literal("verified"),
|
|
16428
|
+
skillId: z61.string().uuid(),
|
|
16378
16429
|
/** The version whose source now records `repoId`; no new version is created. */
|
|
16379
|
-
version:
|
|
16430
|
+
version: z61.number().int().positive(),
|
|
16380
16431
|
/** Unchanged: recording the ID changes no content. */
|
|
16381
|
-
revision:
|
|
16382
|
-
repoId:
|
|
16432
|
+
revision: z61.number().int().nonnegative(),
|
|
16433
|
+
repoId: z61.number().int().positive()
|
|
16383
16434
|
});
|
|
16384
|
-
var UserSkillUpdateCheckSchema =
|
|
16435
|
+
var UserSkillUpdateCheckSchema = z61.discriminatedUnion("status", [
|
|
16385
16436
|
/** The ref still names the same commit, or a commit with the same skill content. */
|
|
16386
16437
|
UserSkillUpdateBaseSchema.extend({
|
|
16387
|
-
status:
|
|
16438
|
+
status: z61.literal("up_to_date"),
|
|
16388
16439
|
/**
|
|
16389
16440
|
* What changed upstream without changing the skill's files, such as its license. Saving would
|
|
16390
16441
|
* store nothing (`skillImport` answers `up_to_date` for the same content), so these are shown
|
|
16391
16442
|
* for the owner to review rather than offered as an update.
|
|
16392
16443
|
*/
|
|
16393
|
-
warnings:
|
|
16444
|
+
warnings: z61.array(z61.string()),
|
|
16394
16445
|
/**
|
|
16395
16446
|
* Present when the latest version was saved before repository IDs were recorded, so agents
|
|
16396
16447
|
* cannot update it, its source is unchanged, and GitHub says the repository was created no
|
|
@@ -16402,23 +16453,23 @@ var UserSkillUpdateCheckSchema = z60.discriminatedUnion("status", [
|
|
|
16402
16453
|
verification: UserSkillSourceVerificationSchema.optional()
|
|
16403
16454
|
}),
|
|
16404
16455
|
UserSkillUpdateBaseSchema.extend({
|
|
16405
|
-
status:
|
|
16456
|
+
status: z61.literal("update_available"),
|
|
16406
16457
|
/** Save with `skillImport({ skillId, expectedRevision, previewToken })`. */
|
|
16407
16458
|
preview: UserSkillImportPreviewSchema,
|
|
16408
16459
|
/**
|
|
16409
16460
|
* Why this is not a routine update; saving it needs `confirmSourceChange: true`. The backend
|
|
16410
16461
|
* always sends it (empty for a routine update).
|
|
16411
16462
|
*/
|
|
16412
|
-
sourceChanges:
|
|
16413
|
-
changes:
|
|
16414
|
-
unchangedCount:
|
|
16463
|
+
sourceChanges: z61.array(UserSkillSourceChangeSchema).optional(),
|
|
16464
|
+
changes: z61.array(UserSkillUpdateFileChangeSchema),
|
|
16465
|
+
unchangedCount: z61.number().int().nonnegative()
|
|
16415
16466
|
})
|
|
16416
16467
|
]);
|
|
16417
16468
|
|
|
16418
16469
|
// ../../packages/shared/dist/schemas/managed-billing.schemas.js
|
|
16419
|
-
import { z as
|
|
16420
|
-
var id =
|
|
16421
|
-
var usd =
|
|
16470
|
+
import { z as z62 } from "zod";
|
|
16471
|
+
var id = z62.string().min(1).max(256);
|
|
16472
|
+
var usd = z62.string().regex(/^(0|[1-9]\d{0,9})(\.\d{1,6})?$/);
|
|
16422
16473
|
function submissionReviewDecisionModelIssue(model) {
|
|
16423
16474
|
const name = (model ?? "").slice(0, 64);
|
|
16424
16475
|
if (/^jev-\d+\.\d+\.\d+$/.test(name))
|
|
@@ -16432,25 +16483,25 @@ function submissionReviewDecisionModelIssue(model) {
|
|
|
16432
16483
|
return null;
|
|
16433
16484
|
}
|
|
16434
16485
|
var isPinnedDecisionModel = (model) => submissionReviewDecisionModelIssue(model) === null;
|
|
16435
|
-
var ManagedCostPolicySchema =
|
|
16486
|
+
var ManagedCostPolicySchema = z62.object({
|
|
16436
16487
|
version: id,
|
|
16437
|
-
region:
|
|
16488
|
+
region: z62.enum(["global", "regional"]),
|
|
16438
16489
|
ownerDailyUsd: usd,
|
|
16439
16490
|
platformDailyUsd: usd,
|
|
16440
16491
|
computeReserveUsd: usd,
|
|
16441
16492
|
retainedResourceDailyUsd: usd,
|
|
16442
|
-
maxConcurrentOperations:
|
|
16443
|
-
maxUnresolvedOperations:
|
|
16444
|
-
maxUnresolvedAgeMs:
|
|
16493
|
+
maxConcurrentOperations: z62.number().int().min(1).max(64),
|
|
16494
|
+
maxUnresolvedOperations: z62.number().int().min(1).max(1e4),
|
|
16495
|
+
maxUnresolvedAgeMs: z62.number().int().min(6e4).max(6048e5),
|
|
16445
16496
|
/** Supplier invoice age advisory threshold; does not stop otherwise authorized work. */
|
|
16446
|
-
reconciliationMaxAgeMs:
|
|
16497
|
+
reconciliationMaxAgeMs: z62.number().int().min(6e4).max(6048e5),
|
|
16447
16498
|
/**
|
|
16448
16499
|
* The models this policy qualifies. Each must have a published supplier rate, which supplier
|
|
16449
16500
|
* exposure is reserved and settled from; a policy stored before a model was added still
|
|
16450
16501
|
* parses to exactly its stored JSON.
|
|
16451
16502
|
*/
|
|
16452
|
-
models:
|
|
16453
|
-
|
|
16503
|
+
models: z62.array(z62.union([
|
|
16504
|
+
z62.enum([
|
|
16454
16505
|
"gpt-5.6-luna",
|
|
16455
16506
|
"gpt-5.6-sol",
|
|
16456
16507
|
"gpt-6-astra",
|
|
@@ -16461,49 +16512,49 @@ var ManagedCostPolicySchema = z61.object({
|
|
|
16461
16512
|
// ADR-0324: an OpenRouter model slug. It must have a card entry (checked below).
|
|
16462
16513
|
OpenRouterModelIdSchema
|
|
16463
16514
|
])).min(1),
|
|
16464
|
-
nativeHelpersQualified:
|
|
16515
|
+
nativeHelpersQualified: z62.boolean(),
|
|
16465
16516
|
/** Explicit estimate for bounded native review processing/storage, including recovery. */
|
|
16466
|
-
nativeReviewProcessing:
|
|
16517
|
+
nativeReviewProcessing: z62.object({
|
|
16467
16518
|
usdPerRun: usd,
|
|
16468
|
-
qualificationEvidence:
|
|
16519
|
+
qualificationEvidence: z62.string().trim().min(1).max(256)
|
|
16469
16520
|
}).strict().optional(),
|
|
16470
16521
|
/** ADR-0283: direct evaluator calls require separately qualified, pinned rates and bounds. */
|
|
16471
|
-
nativeModels:
|
|
16522
|
+
nativeModels: z62.array(z62.object({
|
|
16472
16523
|
// `openai-responses` and `typesafe` still parse so stored policies keep their digest,
|
|
16473
16524
|
// but no evaluator call qualifies under them: every model runs on OpenRouter (#4205,
|
|
16474
16525
|
// ADR-0465).
|
|
16475
|
-
provider:
|
|
16526
|
+
provider: z62.enum(["openrouter", "openai-responses", "typesafe"]),
|
|
16476
16527
|
rate: RoutingPublishedRateSchema,
|
|
16477
|
-
maxInputTokens:
|
|
16478
|
-
maxOutputTokens:
|
|
16528
|
+
maxInputTokens: z62.number().int().positive().max(262144),
|
|
16529
|
+
maxOutputTokens: z62.number().int().nonnegative().max(16e3),
|
|
16479
16530
|
/**
|
|
16480
16531
|
* Qualified upper bound for one review image: the 2048px derivative for a vision call,
|
|
16481
16532
|
* the decision-image/v1 derivative for a decision model (ADR-0470). Required for vision.
|
|
16482
16533
|
*/
|
|
16483
|
-
maxImageTokens:
|
|
16484
|
-
qualificationEvidence:
|
|
16534
|
+
maxImageTokens: z62.number().int().positive().max(262144).optional(),
|
|
16535
|
+
qualificationEvidence: z62.string().trim().min(1).max(256)
|
|
16485
16536
|
}).strict()).max(8).optional(),
|
|
16486
|
-
corrections:
|
|
16487
|
-
approvalEvidence:
|
|
16537
|
+
corrections: z62.enum(["manual", "refund_downward"]),
|
|
16538
|
+
approvalEvidence: z62.string().trim().min(1).max(256),
|
|
16488
16539
|
/**
|
|
16489
16540
|
* Hosted sandbox pricing terms. Optional, and deliberately without schema defaults: a policy
|
|
16490
16541
|
* stored before these terms existed must parse to exactly its stored JSON, or its immutable
|
|
16491
16542
|
* digest would no longer match. Nothing prices these terms any more (#4199); they are
|
|
16492
16543
|
* kept only so a stored policy parses and digests unchanged.
|
|
16493
16544
|
*/
|
|
16494
|
-
sandbox:
|
|
16495
|
-
memory:
|
|
16496
|
-
granularity:
|
|
16545
|
+
sandbox: z62.object({
|
|
16546
|
+
memory: z62.enum(SANDBOX_MEMORY_TIERS).optional(),
|
|
16547
|
+
granularity: z62.enum(SANDBOX_BILLING_GRANULARITIES).optional(),
|
|
16497
16548
|
/** Assumed provider deletion after activity and keep-alives stop; not configurable there. */
|
|
16498
|
-
idleExpiryMs:
|
|
16549
|
+
idleExpiryMs: z62.number().int().min(6e4).max(864e5).optional(),
|
|
16499
16550
|
/**
|
|
16500
16551
|
* The memory tier each container size is billed at (ADR-0192). Optional per size and
|
|
16501
16552
|
* without defaults, for the same digest reason.
|
|
16502
16553
|
*/
|
|
16503
|
-
sizes:
|
|
16504
|
-
small:
|
|
16505
|
-
medium:
|
|
16506
|
-
large:
|
|
16554
|
+
sizes: z62.object({
|
|
16555
|
+
small: z62.enum(SANDBOX_MEMORY_TIERS).optional(),
|
|
16556
|
+
medium: z62.enum(SANDBOX_MEMORY_TIERS).optional(),
|
|
16557
|
+
large: z62.enum(SANDBOX_MEMORY_TIERS).optional()
|
|
16507
16558
|
}).strict().optional()
|
|
16508
16559
|
}).strict().optional(),
|
|
16509
16560
|
/**
|
|
@@ -16511,16 +16562,16 @@ var ManagedCostPolicySchema = z61.object({
|
|
|
16511
16562
|
* without defaults, for the digest reason above. Hosted agent VMs are refused unless the
|
|
16512
16563
|
* policy carries these terms: their time is never unpriced.
|
|
16513
16564
|
*/
|
|
16514
|
-
boat:
|
|
16565
|
+
boat: z62.object({
|
|
16515
16566
|
/** Customer price over Boat's rate: published rate = Boat's rate times this (>= 1). */
|
|
16516
|
-
markup:
|
|
16567
|
+
markup: z62.string().regex(/^[1-9]\d{0,2}(\.\d{1,6})?$/),
|
|
16517
16568
|
/**
|
|
16518
16569
|
* What Boat charges per running hour of each machine type, for planning: the exposure
|
|
16519
16570
|
* reserved before a reading exists. Settlement uses the dollars Boat reports.
|
|
16520
16571
|
*/
|
|
16521
|
-
providerUsdPerHour:
|
|
16572
|
+
providerUsdPerHour: z62.object({ small: usd, default: usd }).strict(),
|
|
16522
16573
|
/** Running time of a live VM reserved as exposure until metering settles it. */
|
|
16523
|
-
reserveWindowSeconds:
|
|
16574
|
+
reserveWindowSeconds: z62.number().int().min(60).max(7200),
|
|
16524
16575
|
/** Unreconciled Boat cost above this opens the owner and platform breakers. */
|
|
16525
16576
|
reconcileToleranceUsd: usd
|
|
16526
16577
|
}).strict().optional()
|
|
@@ -16531,11 +16582,11 @@ function usdToMicro(value) {
|
|
|
16531
16582
|
const [whole, fractional = ""] = usd.parse(value).split(".");
|
|
16532
16583
|
return BigInt(whole + fractional.padEnd(6, "0"));
|
|
16533
16584
|
}
|
|
16534
|
-
var ManagedTurnEvidenceSchema =
|
|
16585
|
+
var ManagedTurnEvidenceSchema = z62.object({
|
|
16535
16586
|
sessionId: id,
|
|
16536
16587
|
turnId: id,
|
|
16537
16588
|
subagentId: id.nullable(),
|
|
16538
|
-
status:
|
|
16589
|
+
status: z62.enum([
|
|
16539
16590
|
"completed",
|
|
16540
16591
|
"failed",
|
|
16541
16592
|
"cancelled",
|
|
@@ -16545,15 +16596,15 @@ var ManagedTurnEvidenceSchema = z61.object({
|
|
|
16545
16596
|
]),
|
|
16546
16597
|
usage: AllowanceReportedUsageSchema.nullable()
|
|
16547
16598
|
}).strict();
|
|
16548
|
-
var ManagedWorkEvidenceSchema =
|
|
16599
|
+
var ManagedWorkEvidenceSchema = z62.object({
|
|
16549
16600
|
sessionId: id,
|
|
16550
16601
|
rootTurnId: id,
|
|
16551
|
-
complete:
|
|
16552
|
-
turns:
|
|
16602
|
+
complete: z62.boolean(),
|
|
16603
|
+
turns: z62.array(ManagedTurnEvidenceSchema).min(1).max(2e3)
|
|
16553
16604
|
}).strict();
|
|
16554
16605
|
|
|
16555
16606
|
// ../../packages/shared/dist/schemas/catalog.schemas.js
|
|
16556
|
-
import { z as
|
|
16607
|
+
import { z as z63 } from "zod";
|
|
16557
16608
|
var CATALOG_FORMAT_VERSION = 1;
|
|
16558
16609
|
var CATALOG_KINDS = ["x402-endpoint"];
|
|
16559
16610
|
var CATALOG_TRUST_TIERS = ["curated", "verified", "community"];
|
|
@@ -16576,84 +16627,84 @@ var CATALOG_CAPABILITIES = [
|
|
|
16576
16627
|
"evaluation",
|
|
16577
16628
|
"agent-hosting"
|
|
16578
16629
|
];
|
|
16579
|
-
var catalogId =
|
|
16580
|
-
var CatalogOriginSchema =
|
|
16630
|
+
var catalogId = z63.string().min(3).max(80).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:[.-][a-z0-9]+)*$/, "Catalog ids are lowercase, dot-namespaced by capability, e.g. domains.namecheap-x402");
|
|
16631
|
+
var CatalogOriginSchema = z63.string().url().max(2048).refine((value) => {
|
|
16581
16632
|
const url = new URL(value);
|
|
16582
16633
|
return url.protocol === "https:" && url.origin === value;
|
|
16583
16634
|
}, "An HTTPS origin without a path or credentials is required");
|
|
16584
|
-
var isoDate =
|
|
16585
|
-
var atomicAmount =
|
|
16586
|
-
var CatalogEndpointSchema =
|
|
16587
|
-
method:
|
|
16588
|
-
path:
|
|
16589
|
-
summary:
|
|
16635
|
+
var isoDate = z63.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Expected an ISO date (YYYY-MM-DD)");
|
|
16636
|
+
var atomicAmount = z63.string().regex(/^(?:0|[1-9][0-9]*)$/, "Expected an integer atomic amount");
|
|
16637
|
+
var CatalogEndpointSchema = z63.object({
|
|
16638
|
+
method: z63.enum(["GET", "POST"]),
|
|
16639
|
+
path: z63.string().min(1).max(512).regex(/^\//, "Endpoint paths start with /").refine((path3) => !path3.startsWith("//") && !path3.startsWith("/\\"), "Endpoint paths must not start with a double slash or slash-backslash, which name another host"),
|
|
16640
|
+
summary: z63.string().min(1).max(200)
|
|
16590
16641
|
}).strict();
|
|
16591
|
-
var CatalogProviderSchema =
|
|
16592
|
-
name:
|
|
16593
|
-
url:
|
|
16642
|
+
var CatalogProviderSchema = z63.object({
|
|
16643
|
+
name: z63.string().min(1).max(120),
|
|
16644
|
+
url: z63.string().url().max(2048)
|
|
16594
16645
|
}).strict();
|
|
16595
|
-
var CatalogPricingSchema =
|
|
16596
|
-
chainId:
|
|
16597
|
-
token:
|
|
16646
|
+
var CatalogPricingSchema = z63.object({
|
|
16647
|
+
chainId: z63.union([z63.literal(8453), z63.literal(84532)]),
|
|
16648
|
+
token: z63.literal("USDC"),
|
|
16598
16649
|
// Highest per-call price we expect this provider to quote, in atomic units.
|
|
16599
16650
|
// `make catalog probe` compares the live 402 quote against it.
|
|
16600
16651
|
typicalMax: atomicAmount,
|
|
16601
16652
|
// Reviewed x402 recipients for this origin (ADR-0182). An in-chat purchase approval shows the
|
|
16602
16653
|
// catalog verification badge only when both the origin and the quoted recipient match.
|
|
16603
|
-
payTo:
|
|
16654
|
+
payTo: z63.array(z63.string().regex(/^0x[0-9a-fA-F]{40}$/)).min(1).max(8).optional()
|
|
16604
16655
|
}).strict();
|
|
16605
|
-
var CatalogTrustSchema =
|
|
16606
|
-
tier:
|
|
16607
|
-
reviewedBy:
|
|
16656
|
+
var CatalogTrustSchema = z63.object({
|
|
16657
|
+
tier: z63.enum(CATALOG_TRUST_TIERS),
|
|
16658
|
+
reviewedBy: z63.string().min(1).max(120),
|
|
16608
16659
|
reviewedAt: isoDate,
|
|
16609
|
-
notes:
|
|
16660
|
+
notes: z63.string().max(2e3).optional()
|
|
16610
16661
|
}).strict();
|
|
16611
|
-
var catalogEntryBase =
|
|
16662
|
+
var catalogEntryBase = z63.object({
|
|
16612
16663
|
id: catalogId,
|
|
16613
|
-
name:
|
|
16664
|
+
name: z63.string().min(1).max(120),
|
|
16614
16665
|
provider: CatalogProviderSchema,
|
|
16615
|
-
capabilities:
|
|
16666
|
+
capabilities: z63.array(z63.enum(CATALOG_CAPABILITIES)).min(1).max(8),
|
|
16616
16667
|
// Prose that gets embedded for semantic search. Write it for retrieval.
|
|
16617
|
-
description:
|
|
16668
|
+
description: z63.string().min(20).max(2e3),
|
|
16618
16669
|
// Short, exact how-to shown to the agent verbatim.
|
|
16619
|
-
usage:
|
|
16620
|
-
docsUrl:
|
|
16670
|
+
usage: z63.string().min(10).max(4e3),
|
|
16671
|
+
docsUrl: z63.string().url().max(2048),
|
|
16621
16672
|
trust: CatalogTrustSchema,
|
|
16622
|
-
status:
|
|
16673
|
+
status: z63.enum(CATALOG_STATUSES),
|
|
16623
16674
|
addedAt: isoDate
|
|
16624
16675
|
});
|
|
16625
16676
|
var CatalogX402EndpointEntrySchema = catalogEntryBase.extend({
|
|
16626
|
-
kind:
|
|
16677
|
+
kind: z63.literal("x402-endpoint"),
|
|
16627
16678
|
origin: CatalogOriginSchema,
|
|
16628
|
-
endpoints:
|
|
16679
|
+
endpoints: z63.array(CatalogEndpointSchema).min(1).max(32),
|
|
16629
16680
|
pricing: CatalogPricingSchema
|
|
16630
16681
|
}).strict();
|
|
16631
|
-
var CatalogEntrySchema =
|
|
16632
|
-
var CatalogFileSchema =
|
|
16633
|
-
formatVersion:
|
|
16634
|
-
generatedAt:
|
|
16635
|
-
entries:
|
|
16682
|
+
var CatalogEntrySchema = z63.discriminatedUnion("kind", [CatalogX402EndpointEntrySchema]);
|
|
16683
|
+
var CatalogFileSchema = z63.object({
|
|
16684
|
+
formatVersion: z63.literal(CATALOG_FORMAT_VERSION),
|
|
16685
|
+
generatedAt: z63.string().datetime(),
|
|
16686
|
+
entries: z63.array(CatalogEntrySchema)
|
|
16636
16687
|
}).strict();
|
|
16637
|
-
var CatalogSearchInputSchema =
|
|
16638
|
-
query:
|
|
16639
|
-
kind:
|
|
16640
|
-
capabilities:
|
|
16641
|
-
tiers:
|
|
16642
|
-
limit:
|
|
16688
|
+
var CatalogSearchInputSchema = z63.object({
|
|
16689
|
+
query: z63.string().trim().min(1).max(500),
|
|
16690
|
+
kind: z63.enum(CATALOG_KINDS).optional(),
|
|
16691
|
+
capabilities: z63.array(z63.enum(CATALOG_CAPABILITIES)).max(8).optional(),
|
|
16692
|
+
tiers: z63.array(z63.enum(CATALOG_TRUST_TIERS)).max(3).optional(),
|
|
16693
|
+
limit: z63.number().int().min(1).max(20).default(5)
|
|
16643
16694
|
}).strict();
|
|
16644
|
-
var CatalogSearchHitSchema =
|
|
16695
|
+
var CatalogSearchHitSchema = z63.object({
|
|
16645
16696
|
entry: CatalogEntrySchema,
|
|
16646
|
-
score:
|
|
16647
|
-
matchedCapabilities:
|
|
16697
|
+
score: z63.number(),
|
|
16698
|
+
matchedCapabilities: z63.array(z63.enum(CATALOG_CAPABILITIES))
|
|
16648
16699
|
}).strict();
|
|
16649
|
-
var CatalogSearchOutputSchema =
|
|
16650
|
-
hits:
|
|
16651
|
-
total:
|
|
16700
|
+
var CatalogSearchOutputSchema = z63.object({
|
|
16701
|
+
hits: z63.array(CatalogSearchHitSchema),
|
|
16702
|
+
total: z63.number().int().nonnegative()
|
|
16652
16703
|
}).strict();
|
|
16653
|
-
var CatalogGetInputSchema =
|
|
16704
|
+
var CatalogGetInputSchema = z63.object({ id: catalogId }).strict();
|
|
16654
16705
|
|
|
16655
16706
|
// ../../packages/shared/dist/schemas/market-wakeup.schemas.js
|
|
16656
|
-
import { z as
|
|
16707
|
+
import { z as z64 } from "zod";
|
|
16657
16708
|
var MARKET_WAKEUP_KINDS = [
|
|
16658
16709
|
"pitch_selected",
|
|
16659
16710
|
"bid_won",
|
|
@@ -16691,29 +16742,29 @@ var MARKET_WAKEUP_KINDS = [
|
|
|
16691
16742
|
// ADR-0531 decision 5: a suggestion was posted on a project the swarm wallet operates.
|
|
16692
16743
|
"project_suggestion"
|
|
16693
16744
|
];
|
|
16694
|
-
var MarketWakeupKindSchema =
|
|
16745
|
+
var MarketWakeupKindSchema = z64.enum(MARKET_WAKEUP_KINDS);
|
|
16695
16746
|
var MARKET_WATCH_MODES = ["bounty", "claim", "pitch", "benchmark", "auction"];
|
|
16696
|
-
var MarketWatchModeSchema =
|
|
16747
|
+
var MarketWatchModeSchema = z64.enum(MARKET_WATCH_MODES);
|
|
16697
16748
|
var MARKET_WATCH_MAX_WAKEUPS_PER_DAY = 48;
|
|
16698
|
-
var MarketWatchSchema =
|
|
16699
|
-
enabled:
|
|
16700
|
-
modes:
|
|
16749
|
+
var MarketWatchSchema = z64.object({
|
|
16750
|
+
enabled: z64.boolean(),
|
|
16751
|
+
modes: z64.array(MarketWatchModeSchema).max(MARKET_WATCH_MODES.length),
|
|
16701
16752
|
/** Minimum reward in USDC, as a decimal string with at most six decimal places. */
|
|
16702
|
-
minRewardUsdc:
|
|
16753
|
+
minRewardUsdc: z64.string().regex(/^\d{1,12}(\.\d{1,6})?$/).default("0"),
|
|
16703
16754
|
/** Case-insensitive; a task matches when its description or tags contain any keyword. */
|
|
16704
|
-
keywords:
|
|
16705
|
-
maxWakeupsPerDay:
|
|
16755
|
+
keywords: z64.array(z64.string().trim().min(2).max(40)).max(10),
|
|
16756
|
+
maxWakeupsPerDay: z64.number().int().min(1).max(MARKET_WATCH_MAX_WAKEUPS_PER_DAY)
|
|
16706
16757
|
}).strict();
|
|
16707
16758
|
var MarketWatchInputSchema = MarketWatchSchema.extend({
|
|
16708
|
-
agentId:
|
|
16759
|
+
agentId: z64.string().uuid()
|
|
16709
16760
|
}).strict();
|
|
16710
16761
|
var MarketWatchViewSchema = MarketWatchSchema.extend({
|
|
16711
|
-
agentId:
|
|
16712
|
-
updatedAt:
|
|
16762
|
+
agentId: z64.string().uuid(),
|
|
16763
|
+
updatedAt: z64.string().nullable()
|
|
16713
16764
|
});
|
|
16714
16765
|
|
|
16715
16766
|
// ../../packages/shared/dist/schemas/market-event.schemas.js
|
|
16716
|
-
import { z as
|
|
16767
|
+
import { z as z65 } from "zod";
|
|
16717
16768
|
var MARKET_EVENT_ROLES = [
|
|
16718
16769
|
"requester",
|
|
16719
16770
|
"worker",
|
|
@@ -16721,7 +16772,7 @@ var MARKET_EVENT_ROLES = [
|
|
|
16721
16772
|
"dispute_resolver",
|
|
16722
16773
|
"participant"
|
|
16723
16774
|
];
|
|
16724
|
-
var MarketEventRoleSchema =
|
|
16775
|
+
var MarketEventRoleSchema = z65.enum(MARKET_EVENT_ROLES);
|
|
16725
16776
|
var MARKET_EVENT_TYPE_INFO = {
|
|
16726
16777
|
"task.created": {
|
|
16727
16778
|
family: "lifecycle",
|
|
@@ -16744,6 +16795,14 @@ var MARKET_EVENT_TYPE_INFO = {
|
|
|
16744
16795
|
roles: ["worker"],
|
|
16745
16796
|
summary: "A requester sent you a hire offer: this task is reserved for you."
|
|
16746
16797
|
},
|
|
16798
|
+
// ADR-0582: a hosted agent's claim of a hire on a service set to Ask me first raised an owner
|
|
16799
|
+
// approval card. Its only recipient is the swarm wallet the hire is reserved for; refs name the
|
|
16800
|
+
// approval, the agent and the service, and carry the reward and the accept-by time.
|
|
16801
|
+
"hire.approval_needed": {
|
|
16802
|
+
family: "lifecycle",
|
|
16803
|
+
roles: ["worker"],
|
|
16804
|
+
summary: "A hire offer is waiting for your approval before your agent can accept it."
|
|
16805
|
+
},
|
|
16747
16806
|
"hire.declined": {
|
|
16748
16807
|
family: "lifecycle",
|
|
16749
16808
|
roles: ["requester"],
|
|
@@ -17032,40 +17091,40 @@ var MARKET_EVENT_TYPE_INFO = {
|
|
|
17032
17091
|
}
|
|
17033
17092
|
};
|
|
17034
17093
|
var MARKET_EVENT_TYPES = Object.keys(MARKET_EVENT_TYPE_INFO);
|
|
17035
|
-
var MarketEventTypeSchema =
|
|
17036
|
-
var AutomationPendingActionSchema =
|
|
17037
|
-
type:
|
|
17038
|
-
projectId:
|
|
17039
|
-
runId:
|
|
17040
|
-
step:
|
|
17041
|
-
label:
|
|
17042
|
-
command:
|
|
17094
|
+
var MarketEventTypeSchema = z65.enum(MARKET_EVENT_TYPES);
|
|
17095
|
+
var AutomationPendingActionSchema = z65.object({
|
|
17096
|
+
type: z65.literal("approve_gate"),
|
|
17097
|
+
projectId: z65.number().int(),
|
|
17098
|
+
runId: z65.string(),
|
|
17099
|
+
step: z65.string(),
|
|
17100
|
+
label: z65.string(),
|
|
17101
|
+
command: z65.string()
|
|
17043
17102
|
});
|
|
17044
17103
|
var MARKET_EVENT_VISIBILITIES = ["public", "participants"];
|
|
17045
|
-
var MarketEventVisibilitySchema =
|
|
17104
|
+
var MarketEventVisibilitySchema = z65.enum(MARKET_EVENT_VISIBILITIES);
|
|
17046
17105
|
var MARKET_EVENT_PAGE_MAX = 100;
|
|
17047
17106
|
var MARKET_EVENT_PAGE_DEFAULT = 50;
|
|
17048
17107
|
var MARKET_EVENT_WAIT_MAX_MS = 25e3;
|
|
17049
17108
|
var marketEventIdPattern = /^\d{1,19}$/;
|
|
17050
|
-
var MarketEventIdSchema =
|
|
17109
|
+
var MarketEventIdSchema = z65.string().regex(marketEventIdPattern).refine(
|
|
17051
17110
|
// Zod runs refinements after a failed regex too. Only convert bounded decimal strings;
|
|
17052
17111
|
// malformed fields must report issues rather than throw independent async rejections.
|
|
17053
17112
|
(id3) => !marketEventIdPattern.test(id3) || BigInt(id3) <= 9223372036854775807n,
|
|
17054
17113
|
"Event id is out of range"
|
|
17055
17114
|
);
|
|
17056
|
-
var MarketEventSchema =
|
|
17115
|
+
var MarketEventSchema = z65.object({
|
|
17057
17116
|
id: MarketEventIdSchema,
|
|
17058
17117
|
type: MarketEventTypeSchema,
|
|
17059
17118
|
/** The task the event is about; null for an automation event (ADR-0506). */
|
|
17060
|
-
taskId:
|
|
17061
|
-
chainId:
|
|
17062
|
-
occurredAt:
|
|
17119
|
+
taskId: z65.string().nullable(),
|
|
17120
|
+
chainId: z65.number().int(),
|
|
17121
|
+
occurredAt: z65.string(),
|
|
17063
17122
|
/** The address that caused the event; null for a permissionless or scheduled cause. */
|
|
17064
|
-
actor:
|
|
17123
|
+
actor: z65.string().nullable(),
|
|
17065
17124
|
visibility: MarketEventVisibilitySchema,
|
|
17066
|
-
summary:
|
|
17125
|
+
summary: z65.string(),
|
|
17067
17126
|
/** Identifiers of what the event concerns (submission, pitch, bid). Never the content. */
|
|
17068
|
-
refs:
|
|
17127
|
+
refs: z65.record(z65.string(), z65.string()),
|
|
17069
17128
|
/** The reading wallet's role, on a per-wallet read only. */
|
|
17070
17129
|
role: MarketEventRoleSchema.optional(),
|
|
17071
17130
|
/**
|
|
@@ -17073,24 +17132,24 @@ var MarketEventSchema = z64.object({
|
|
|
17073
17132
|
* computed from task state when the page is served (ADR-0415), not when the event happened.
|
|
17074
17133
|
* Empty when there is nothing to do now or the wallet can no longer view the task.
|
|
17075
17134
|
*/
|
|
17076
|
-
pendingActions:
|
|
17135
|
+
pendingActions: z65.array(PendingActionSchema).optional(),
|
|
17077
17136
|
/** On a per-wallet read only: what an automation event still waits on (ADR-0506). */
|
|
17078
|
-
automationActions:
|
|
17137
|
+
automationActions: z65.array(AutomationPendingActionSchema).optional()
|
|
17079
17138
|
});
|
|
17080
17139
|
var PageInputShape = {
|
|
17081
17140
|
/** Return events with an id greater than this one. */
|
|
17082
17141
|
since: MarketEventIdSchema.optional(),
|
|
17083
|
-
limit: coerceNumber(
|
|
17142
|
+
limit: coerceNumber(z65.number().int().min(1).max(MARKET_EVENT_PAGE_MAX)).default(MARKET_EVENT_PAGE_DEFAULT)
|
|
17084
17143
|
};
|
|
17085
|
-
var TaskMarketEventsInputSchema =
|
|
17144
|
+
var TaskMarketEventsInputSchema = z65.object({ taskId: z65.string().min(1).max(100), ...PageInputShape }).strict();
|
|
17086
17145
|
var MARKET_EVENT_ORDERS = ["oldest", "newest"];
|
|
17087
17146
|
var MARKET_EVENT_STREAMS = ["workflows"];
|
|
17088
|
-
var MarketEventStreamSchema =
|
|
17089
|
-
var WalletMarketEventsInputSchema =
|
|
17147
|
+
var MarketEventStreamSchema = z65.enum(MARKET_EVENT_STREAMS);
|
|
17148
|
+
var WalletMarketEventsInputSchema = z65.object({
|
|
17090
17149
|
...PageInputShape,
|
|
17091
17150
|
/** Only the events of this stream (the Inbox's Workflows stream); all events when omitted. */
|
|
17092
17151
|
stream: MarketEventStreamSchema.optional(),
|
|
17093
|
-
order:
|
|
17152
|
+
order: z65.enum(MARKET_EVENT_ORDERS).default("oldest"),
|
|
17094
17153
|
/** With `order: newest`, return events with an id less than this one. `since` needs `oldest`. */
|
|
17095
17154
|
before: MarketEventIdSchema.optional(),
|
|
17096
17155
|
/**
|
|
@@ -17098,10 +17157,10 @@ var WalletMarketEventsInputSchema = z64.object({
|
|
|
17098
17157
|
* many milliseconds for one before answering with an empty page. Answers as soon as an event
|
|
17099
17158
|
* arrives. Omitted or 0 answers at once.
|
|
17100
17159
|
*/
|
|
17101
|
-
waitMs: coerceNumber(
|
|
17160
|
+
waitMs: coerceNumber(z65.number().int().min(0).max(MARKET_EVENT_WAIT_MAX_MS)).optional()
|
|
17102
17161
|
}).strict();
|
|
17103
|
-
var MarketEventPageSchema =
|
|
17104
|
-
events:
|
|
17162
|
+
var MarketEventPageSchema = z65.object({
|
|
17163
|
+
events: z65.array(MarketEventSchema),
|
|
17105
17164
|
/**
|
|
17106
17165
|
* The id to pass as `since` for the next page (or as `before`, reading newest first); the given
|
|
17107
17166
|
* `since` or `before` when nothing more was found.
|
|
@@ -17109,9 +17168,9 @@ var MarketEventPageSchema = z64.object({
|
|
|
17109
17168
|
cursor: MarketEventIdSchema.nullable()
|
|
17110
17169
|
});
|
|
17111
17170
|
var MARKET_EVENT_CHANNELS = ["hosted", "email", "in-app"];
|
|
17112
|
-
var MarketEventChannelSchema =
|
|
17171
|
+
var MarketEventChannelSchema = z65.enum(MARKET_EVENT_CHANNELS);
|
|
17113
17172
|
var MARKET_EVENT_WALLET_CHANNELS = ["email", "in-app"];
|
|
17114
|
-
var MarketEventWalletChannelSchema =
|
|
17173
|
+
var MarketEventWalletChannelSchema = z65.enum(MARKET_EVENT_WALLET_CHANNELS);
|
|
17115
17174
|
var MARKET_EVENT_LOCKED_TYPES = [
|
|
17116
17175
|
"revision.requested",
|
|
17117
17176
|
"reminder.submission_due",
|
|
@@ -17125,65 +17184,65 @@ var MARKET_EVENT_LOCKED_TYPES = [
|
|
|
17125
17184
|
"reminder.hire_accept_by"
|
|
17126
17185
|
];
|
|
17127
17186
|
var MARKET_EVENT_PREFERENCE_TYPES = MARKET_EVENT_TYPES.filter((type) => MARKET_EVENT_TYPE_INFO[type].family !== "discovery" && !MARKET_EVENT_LOCKED_TYPES.includes(type));
|
|
17128
|
-
var MarketEventPreferencesInputSchema =
|
|
17129
|
-
var MarketEventPreferenceSchema =
|
|
17130
|
-
type:
|
|
17187
|
+
var MarketEventPreferencesInputSchema = z65.object({ channel: MarketEventWalletChannelSchema.optional() }).strict();
|
|
17188
|
+
var MarketEventPreferenceSchema = z65.object({
|
|
17189
|
+
type: z65.string(),
|
|
17131
17190
|
channel: MarketEventChannelSchema,
|
|
17132
|
-
enabled:
|
|
17191
|
+
enabled: z65.boolean(),
|
|
17133
17192
|
/** A money-losing deadline: always on, and a request to turn it off is refused. */
|
|
17134
|
-
locked:
|
|
17193
|
+
locked: z65.boolean()
|
|
17135
17194
|
});
|
|
17136
|
-
var MarketEventPreferencesSchema =
|
|
17137
|
-
preferences:
|
|
17195
|
+
var MarketEventPreferencesSchema = z65.object({
|
|
17196
|
+
preferences: z65.array(MarketEventPreferenceSchema)
|
|
17138
17197
|
});
|
|
17139
|
-
var SetMarketEventPreferenceInputSchema =
|
|
17198
|
+
var SetMarketEventPreferenceInputSchema = z65.object({ type: z65.string().min(1).max(64), enabled: z65.boolean() }).strict();
|
|
17140
17199
|
var MarketEventSettingsWriteProofSchema = WalletWriteProofSchema;
|
|
17141
17200
|
var WalletMarketEventPreferenceInputSchema = SetMarketEventPreferenceInputSchema.extend({
|
|
17142
17201
|
channel: MarketEventWalletChannelSchema.optional(),
|
|
17143
17202
|
...MarketEventSettingsWriteProofSchema.shape
|
|
17144
17203
|
}).strict();
|
|
17145
17204
|
var MARKET_EVENT_UNREAD_MAX = 99;
|
|
17146
|
-
var MarketEventLastSeenInputSchema =
|
|
17147
|
-
var MarketEventLastSeenSchema =
|
|
17205
|
+
var MarketEventLastSeenInputSchema = z65.object({}).strict();
|
|
17206
|
+
var MarketEventLastSeenSchema = z65.object({
|
|
17148
17207
|
/** The newest event id the wallet has seen; null before it has seen any. */
|
|
17149
17208
|
lastSeen: MarketEventIdSchema.nullable(),
|
|
17150
17209
|
/** Events for the wallet above `lastSeen`, at most MARKET_EVENT_UNREAD_MAX. */
|
|
17151
|
-
unread:
|
|
17210
|
+
unread: z65.number().int().min(0).max(MARKET_EVENT_UNREAD_MAX),
|
|
17152
17211
|
/** More events are unread than `unread` counts. */
|
|
17153
|
-
unreadCapped:
|
|
17212
|
+
unreadCapped: z65.boolean()
|
|
17154
17213
|
});
|
|
17155
|
-
var MarkMarketEventsSeenInputSchema =
|
|
17214
|
+
var MarkMarketEventsSeenInputSchema = z65.object({
|
|
17156
17215
|
/** The newest event id the wallet has now seen. The stored id only ever moves forward. */
|
|
17157
17216
|
eventId: MarketEventIdSchema
|
|
17158
17217
|
}).strict();
|
|
17159
17218
|
|
|
17160
17219
|
// ../../packages/shared/dist/schemas/market-discovery.schemas.js
|
|
17161
|
-
import { z as
|
|
17162
|
-
var DiscoveryFilterSchema =
|
|
17220
|
+
import { z as z66 } from "zod";
|
|
17221
|
+
var DiscoveryFilterSchema = z66.object({
|
|
17163
17222
|
/** A disabled filter matches nothing: the wallet gets no discovery events at all. */
|
|
17164
|
-
enabled:
|
|
17223
|
+
enabled: z66.boolean(),
|
|
17165
17224
|
/** Task modes to match; empty matches every mode. */
|
|
17166
|
-
modes:
|
|
17225
|
+
modes: z66.array(MarketWatchModeSchema).max(MARKET_WATCH_MODES.length),
|
|
17167
17226
|
/** Minimum reward in USDC, as a decimal string with at most six decimal places. */
|
|
17168
|
-
minRewardUsdc:
|
|
17227
|
+
minRewardUsdc: z66.string().regex(/^\d{1,12}(\.\d{1,6})?$/).default("0"),
|
|
17169
17228
|
/** Case-insensitive; a task matches when its description or tags contain any keyword. */
|
|
17170
|
-
keywords:
|
|
17229
|
+
keywords: z66.array(z66.string().trim().min(2).max(40)).max(10),
|
|
17171
17230
|
/** Case-insensitive; a task matches when it carries any of these tags. Empty matches all. */
|
|
17172
|
-
skillTags:
|
|
17231
|
+
skillTags: z66.array(z66.string().trim().min(1).max(40)).max(10),
|
|
17173
17232
|
/** The most `task.listed` events the wallet receives in any 24 hours. */
|
|
17174
|
-
maxPerDay:
|
|
17233
|
+
maxPerDay: z66.number().int().min(1).max(MARKET_WATCH_MAX_WAKEUPS_PER_DAY)
|
|
17175
17234
|
}).strict();
|
|
17176
|
-
var DiscoveryFilterGetInputSchema =
|
|
17235
|
+
var DiscoveryFilterGetInputSchema = z66.object({}).strict();
|
|
17177
17236
|
var DiscoveryFilterSetInputSchema = DiscoveryFilterSchema.extend(MarketEventSettingsWriteProofSchema.shape).strict();
|
|
17178
17237
|
var DiscoveryFilterViewSchema = DiscoveryFilterSchema.extend({
|
|
17179
|
-
wallet:
|
|
17238
|
+
wallet: z66.string(),
|
|
17180
17239
|
/** Null when the wallet has never stored a filter, and the defaults are shown. */
|
|
17181
|
-
updatedAt:
|
|
17240
|
+
updatedAt: z66.string().nullable(),
|
|
17182
17241
|
/**
|
|
17183
17242
|
* With no stored filter, a wallet with a registered agent email is matched by its registered
|
|
17184
17243
|
* skills against the task's tags instead (`skills`); otherwise it gets no discovery (`none`).
|
|
17185
17244
|
*/
|
|
17186
|
-
fallback:
|
|
17245
|
+
fallback: z66.enum(["skills", "none"]).nullable()
|
|
17187
17246
|
});
|
|
17188
17247
|
|
|
17189
17248
|
// ../../packages/shared/dist/chains/viem-chains.js
|
|
@@ -17353,43 +17412,43 @@ async function signSponsoredVault7702Call(input2) {
|
|
|
17353
17412
|
}
|
|
17354
17413
|
|
|
17355
17414
|
// ../../packages/shared/dist/schemas/web-search.schemas.js
|
|
17356
|
-
import { z as
|
|
17415
|
+
import { z as z67 } from "zod";
|
|
17357
17416
|
var WEB_SEARCH_MAX_RESULTS = 10;
|
|
17358
17417
|
var WEB_SEARCH_DEFAULT_RESULTS = 5;
|
|
17359
17418
|
var WebSearchToolInputSchemas = {
|
|
17360
|
-
web_search:
|
|
17361
|
-
query:
|
|
17362
|
-
maxResults:
|
|
17419
|
+
web_search: z67.object({
|
|
17420
|
+
query: z67.string().trim().min(1).max(400),
|
|
17421
|
+
maxResults: z67.number().int().min(1).max(WEB_SEARCH_MAX_RESULTS).optional()
|
|
17363
17422
|
}).strict()
|
|
17364
17423
|
};
|
|
17365
17424
|
|
|
17366
17425
|
// ../../packages/shared/dist/schemas/view-image.schemas.js
|
|
17367
|
-
import { z as
|
|
17426
|
+
import { z as z68 } from "zod";
|
|
17368
17427
|
var VIEW_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
|
|
17369
17428
|
var ViewImageToolInputSchemas = {
|
|
17370
|
-
view_image:
|
|
17429
|
+
view_image: z68.object({
|
|
17371
17430
|
/** A workspace path, such as an owner attachment's `attachments/...` path. */
|
|
17372
|
-
path:
|
|
17431
|
+
path: z68.string().trim().min(1).max(1024),
|
|
17373
17432
|
/** What to look for; without one the image is described in full. */
|
|
17374
|
-
question:
|
|
17433
|
+
question: z68.string().trim().min(1).max(2e3).optional()
|
|
17375
17434
|
}).strict()
|
|
17376
17435
|
};
|
|
17377
17436
|
|
|
17378
17437
|
// ../../packages/shared/dist/schemas/publish-file.schemas.js
|
|
17379
|
-
import { z as
|
|
17438
|
+
import { z as z69 } from "zod";
|
|
17380
17439
|
var PUBLISH_FILE_MAX_BYTES = 5 * 1024 * 1024;
|
|
17381
17440
|
var PUBLISH_FILE_MAX_COUNT = 100;
|
|
17382
17441
|
var PublishToolInputSchemas = {
|
|
17383
|
-
publish_file:
|
|
17384
|
-
path:
|
|
17442
|
+
publish_file: z69.object({
|
|
17443
|
+
path: z69.string().trim().min(1).max(1024)
|
|
17385
17444
|
}).strict()
|
|
17386
17445
|
};
|
|
17387
17446
|
|
|
17388
17447
|
// ../../packages/shared/dist/schemas/submission-review.schemas.js
|
|
17389
|
-
import { z as
|
|
17448
|
+
import { z as z71 } from "zod";
|
|
17390
17449
|
|
|
17391
17450
|
// ../../packages/shared/dist/schemas/submission-review-decision.schemas.js
|
|
17392
|
-
import { z as
|
|
17451
|
+
import { z as z70 } from "zod";
|
|
17393
17452
|
|
|
17394
17453
|
// ../../packages/shared/dist/schemas/submission-review-decision-images.js
|
|
17395
17454
|
var DECISION_IMAGE_INPUTS = ["observation", "observation+raw"];
|
|
@@ -17441,20 +17500,20 @@ var DECISION_DIMENSIONS = [
|
|
|
17441
17500
|
"finish"
|
|
17442
17501
|
];
|
|
17443
17502
|
var DECISION_ANSWER_TYPES = ["choice", "score", "noul", "bounding_box"];
|
|
17444
|
-
var Hex64 =
|
|
17445
|
-
var QuestionId =
|
|
17446
|
-
var OptionId =
|
|
17447
|
-
var ModelId =
|
|
17448
|
-
var Probability =
|
|
17449
|
-
var Count =
|
|
17450
|
-
var SubmissionReviewDecisionDraftSchema =
|
|
17451
|
-
callId:
|
|
17503
|
+
var Hex64 = z70.string().regex(/^[a-f0-9]{64}$/);
|
|
17504
|
+
var QuestionId = z70.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
|
|
17505
|
+
var OptionId = z70.string().regex(/^[a-z0-9_]{1,64}$/);
|
|
17506
|
+
var ModelId = z70.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)(?!.*\/\/)[A-Za-z0-9._:/@-]{1,128}$/);
|
|
17507
|
+
var Probability = z70.number().finite().min(0).max(1);
|
|
17508
|
+
var Count = z70.number().int().nonnegative().max(2147483647);
|
|
17509
|
+
var SubmissionReviewDecisionDraftSchema = z70.object({
|
|
17510
|
+
callId: z70.string().uuid(),
|
|
17452
17511
|
questionId: QuestionId,
|
|
17453
|
-
batchKey:
|
|
17454
|
-
questionKind:
|
|
17455
|
-
requirementId:
|
|
17456
|
-
dimension:
|
|
17457
|
-
questionSetVersion:
|
|
17512
|
+
batchKey: z70.string().regex(/^[a-z_]{1,48}(:\d{1,6})?$/),
|
|
17513
|
+
questionKind: z70.enum(DECISION_QUESTION_KINDS),
|
|
17514
|
+
requirementId: z70.string().regex(/^[a-z][a-z0-9_]{0,35}$/).nullable(),
|
|
17515
|
+
dimension: z70.enum(DECISION_DIMENSIONS).nullable(),
|
|
17516
|
+
questionSetVersion: z70.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)[A-Za-z0-9._/-]{1,64}$/),
|
|
17458
17517
|
questionSha256: Hex64,
|
|
17459
17518
|
questionsSha256: Hex64,
|
|
17460
17519
|
stateSha256: Hex64,
|
|
@@ -17462,52 +17521,52 @@ var SubmissionReviewDecisionDraftSchema = z69.object({
|
|
|
17462
17521
|
returnedModel: ModelId.nullable(),
|
|
17463
17522
|
provider: ModelId,
|
|
17464
17523
|
servedBy: ModelId.nullable(),
|
|
17465
|
-
outcome:
|
|
17466
|
-
errorClass:
|
|
17467
|
-
answerType:
|
|
17524
|
+
outcome: z70.enum(ROUTING_ATTEMPT_OUTCOMES),
|
|
17525
|
+
errorClass: z70.enum(JEV_ERROR_CLASSES).nullable(),
|
|
17526
|
+
answerType: z70.enum(DECISION_ANSWER_TYPES).nullable(),
|
|
17468
17527
|
choice: OptionId.nullable(),
|
|
17469
|
-
score:
|
|
17470
|
-
probabilities:
|
|
17528
|
+
score: z70.number().finite().nullable(),
|
|
17529
|
+
probabilities: z70.record(OptionId, Probability).refine((map) => Object.keys(map).length <= 32).nullable(),
|
|
17471
17530
|
topProbability: Probability.nullable(),
|
|
17472
17531
|
confidence: Probability.nullable(),
|
|
17473
17532
|
gateThreshold: Probability.nullable(),
|
|
17474
|
-
gateOutcome:
|
|
17475
|
-
established:
|
|
17533
|
+
gateOutcome: z70.enum(DECISION_GATE_OUTCOMES),
|
|
17534
|
+
established: z70.boolean(),
|
|
17476
17535
|
latencyMs: Count.nullable(),
|
|
17477
17536
|
inputTokens: Count.nullable(),
|
|
17478
17537
|
outputTokens: Count.nullable(),
|
|
17479
|
-
costMicroUsd:
|
|
17480
|
-
costBasis:
|
|
17481
|
-
callQuestionCount:
|
|
17538
|
+
costMicroUsd: z70.string().regex(/^\d{1,30}$/).nullable(),
|
|
17539
|
+
costBasis: z70.enum(DECISION_COST_BASES),
|
|
17540
|
+
callQuestionCount: z70.number().int().min(1).max(64),
|
|
17482
17541
|
/** ADR-0470: whether raw images went with the text state. Counts and a hash only, no pixels. */
|
|
17483
|
-
imageInput:
|
|
17484
|
-
imageCount:
|
|
17542
|
+
imageInput: z70.enum(DECISION_IMAGE_INPUTS).default("observation"),
|
|
17543
|
+
imageCount: z70.number().int().min(0).max(DECISION_RECORD_MAX_IMAGES).default(0),
|
|
17485
17544
|
imagesSha256: Hex64.nullable().default(null),
|
|
17486
17545
|
/** True when a provider value did not fit this schema and was stored as null instead. */
|
|
17487
|
-
redacted:
|
|
17546
|
+
redacted: z70.boolean().default(false)
|
|
17488
17547
|
}).strict();
|
|
17489
|
-
var Requester =
|
|
17548
|
+
var Requester = z70.string().regex(/^0x[0-9a-f]{40}$/);
|
|
17490
17549
|
var Scope = {
|
|
17491
|
-
runId:
|
|
17492
|
-
chainId:
|
|
17493
|
-
submissionId:
|
|
17494
|
-
createdAt:
|
|
17550
|
+
runId: z70.string().uuid(),
|
|
17551
|
+
chainId: z70.number().int().positive(),
|
|
17552
|
+
submissionId: z70.string().regex(/^[A-Za-z0-9_:.-]{1,128}$/),
|
|
17553
|
+
createdAt: z70.string().datetime()
|
|
17495
17554
|
};
|
|
17496
17555
|
var SubmissionReviewDecisionRecordSchema = SubmissionReviewDecisionDraftSchema.extend({
|
|
17497
17556
|
...Scope,
|
|
17498
17557
|
requester: Requester,
|
|
17499
|
-
expiresAt:
|
|
17558
|
+
expiresAt: z70.string().datetime()
|
|
17500
17559
|
}).strict();
|
|
17501
17560
|
var SubmissionReviewDecisionExportSchema = SubmissionReviewDecisionDraftSchema.extend({
|
|
17502
17561
|
...Scope,
|
|
17503
17562
|
questionSha256: Hex64.nullable(),
|
|
17504
|
-
expiresAt:
|
|
17505
|
-
source:
|
|
17563
|
+
expiresAt: z70.string().datetime().nullable().default(null),
|
|
17564
|
+
source: z70.enum(["live", "harness"])
|
|
17506
17565
|
}).strict().refine((row) => row.questionSha256 !== null || row.source === "harness", {
|
|
17507
17566
|
message: "Only harness rows may lack a question hash",
|
|
17508
17567
|
path: ["questionSha256"]
|
|
17509
17568
|
});
|
|
17510
|
-
var ThresholdProbability =
|
|
17569
|
+
var ThresholdProbability = z70.number().finite().min(0.5).max(0.99).refine((value) => Math.abs(Math.round(value * 100) / 100 - value) < 1e-9, {
|
|
17511
17570
|
message: "A threshold has at most two decimal places"
|
|
17512
17571
|
});
|
|
17513
17572
|
var SUBMISSION_REVIEW_QUESTION_SETS = [
|
|
@@ -17517,12 +17576,12 @@ var SUBMISSION_REVIEW_QUESTION_SETS = [
|
|
|
17517
17576
|
var SUBMISSION_REVIEW_QUESTION_SET_V2 = "submission-review/v2";
|
|
17518
17577
|
var SUBMISSION_REVIEW_MIN_STATE_BYTES = 8e3;
|
|
17519
17578
|
var SUBMISSION_REVIEW_MAX_STATE_BYTES = 262144;
|
|
17520
|
-
var SubmissionReviewDecisionConfigSchema =
|
|
17521
|
-
model:
|
|
17579
|
+
var SubmissionReviewDecisionConfigSchema = z70.object({
|
|
17580
|
+
model: z70.string().refine((model) => isPinnedDecisionModel(model), {
|
|
17522
17581
|
message: "The decision model must be a dated OpenRouter slug"
|
|
17523
17582
|
}),
|
|
17524
|
-
questionSetVersion:
|
|
17525
|
-
thresholds:
|
|
17583
|
+
questionSetVersion: z70.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)[A-Za-z0-9._/-]{1,64}$/),
|
|
17584
|
+
thresholds: z70.object({
|
|
17526
17585
|
supported: ThresholdProbability,
|
|
17527
17586
|
unmet: ThresholdProbability,
|
|
17528
17587
|
not_applicable: ThresholdProbability,
|
|
@@ -17530,13 +17589,13 @@ var SubmissionReviewDecisionConfigSchema = z69.object({
|
|
|
17530
17589
|
citation: ThresholdProbability.optional()
|
|
17531
17590
|
}).strict(),
|
|
17532
17591
|
/** ADR-0478 item 4: the per-build bound on one decision call's state; default 48,000. */
|
|
17533
|
-
maxStateBytes:
|
|
17592
|
+
maxStateBytes: z70.number().int().min(SUBMISSION_REVIEW_MIN_STATE_BYTES).max(SUBMISSION_REVIEW_MAX_STATE_BYTES).optional(),
|
|
17534
17593
|
/**
|
|
17535
17594
|
* ADR-0470: whether the raw image goes with the observation. Absent reads as `observation`
|
|
17536
17595
|
* and leaves the fingerprint unchanged. The binding refuses `observation+raw` until the
|
|
17537
17596
|
* transport is built (#4625).
|
|
17538
17597
|
*/
|
|
17539
|
-
imageInput:
|
|
17598
|
+
imageInput: z70.enum(DECISION_IMAGE_INPUTS).optional()
|
|
17540
17599
|
}).strict().superRefine((config, ctx) => {
|
|
17541
17600
|
const v2 = config.questionSetVersion === SUBMISSION_REVIEW_QUESTION_SET_V2;
|
|
17542
17601
|
if (v2 && config.thresholds.citation === void 0)
|
|
@@ -17554,17 +17613,17 @@ var SubmissionReviewDecisionConfigSchema = z69.object({
|
|
|
17554
17613
|
});
|
|
17555
17614
|
|
|
17556
17615
|
// ../../packages/shared/dist/schemas/submission-review.schemas.js
|
|
17557
|
-
var Hash =
|
|
17558
|
-
var Identifier =
|
|
17559
|
-
var Address2 =
|
|
17560
|
-
var Time =
|
|
17561
|
-
var SubmissionReviewPlannerTimeoutSchema =
|
|
17562
|
-
var SubmissionReviewProfileShape =
|
|
17616
|
+
var Hash = z71.string().regex(/^[a-f0-9]{64}$/);
|
|
17617
|
+
var Identifier = z71.string().min(1).max(128);
|
|
17618
|
+
var Address2 = z71.string().regex(/^0x[0-9a-fA-F]{40}$/).transform((value) => value.toLowerCase());
|
|
17619
|
+
var Time = z71.string().datetime();
|
|
17620
|
+
var SubmissionReviewPlannerTimeoutSchema = z71.number().int().min(3e4).max(3e5);
|
|
17621
|
+
var SubmissionReviewProfileShape = z71.object({
|
|
17563
17622
|
id: Identifier,
|
|
17564
17623
|
version: Identifier,
|
|
17565
17624
|
policyVersion: Identifier,
|
|
17566
|
-
models:
|
|
17567
|
-
qualityDimensions:
|
|
17625
|
+
models: z71.record(Identifier, Identifier).refine((models) => Object.keys(models).length <= 8),
|
|
17626
|
+
qualityDimensions: z71.array(z71.enum(["clarity", "visual_coherence", "distinctiveness", "finish"])).min(1).max(4).refine((values) => new Set(values).size === values.length),
|
|
17568
17627
|
/**
|
|
17569
17628
|
* ADR-0478 item 7: the question set, thresholds and state bound. Optional in this step; a
|
|
17570
17629
|
* profile without it resolves to v1 at 0.9 and 48,000 bytes, and its fingerprint is unchanged.
|
|
@@ -17597,42 +17656,42 @@ var SubmissionReviewPublicProfileSchema = SubmissionReviewProfileShape.omit({
|
|
|
17597
17656
|
decision: true,
|
|
17598
17657
|
plannerTimeoutMs: true
|
|
17599
17658
|
});
|
|
17600
|
-
var SubmissionReviewArtifactSchema =
|
|
17659
|
+
var SubmissionReviewArtifactSchema = z71.object({
|
|
17601
17660
|
artifactId: Identifier,
|
|
17602
17661
|
sha256: Hash,
|
|
17603
|
-
fileName:
|
|
17604
|
-
mimeType:
|
|
17605
|
-
role:
|
|
17606
|
-
sizeBytes:
|
|
17662
|
+
fileName: z71.string().max(512),
|
|
17663
|
+
mimeType: z71.string().max(128),
|
|
17664
|
+
role: z71.string().max(64),
|
|
17665
|
+
sizeBytes: z71.number().int().nonnegative()
|
|
17607
17666
|
}).strict();
|
|
17608
|
-
var SubmissionReviewManifestItemSchema =
|
|
17667
|
+
var SubmissionReviewManifestItemSchema = z71.object({
|
|
17609
17668
|
submissionId: Identifier,
|
|
17610
17669
|
workerAddress: Address2,
|
|
17611
17670
|
submittedAt: Time,
|
|
17612
|
-
artifacts:
|
|
17671
|
+
artifacts: z71.array(SubmissionReviewArtifactSchema).max(8)
|
|
17613
17672
|
}).strict();
|
|
17614
|
-
var SubmissionReviewSnapshotSchema =
|
|
17673
|
+
var SubmissionReviewSnapshotSchema = z71.object({
|
|
17615
17674
|
taskId: Identifier,
|
|
17616
|
-
chainId:
|
|
17617
|
-
brief:
|
|
17675
|
+
chainId: z71.number().int().positive(),
|
|
17676
|
+
brief: z71.string().max(262144),
|
|
17618
17677
|
briefSha256: Hash,
|
|
17619
17678
|
profile: SubmissionReviewProfileSchema,
|
|
17620
|
-
submissions:
|
|
17679
|
+
submissions: z71.array(SubmissionReviewManifestItemSchema).min(1).max(100)
|
|
17621
17680
|
}).strict().superRefine((value, context) => {
|
|
17622
17681
|
const submissions = value.submissions.map((item) => item.submissionId);
|
|
17623
17682
|
const artifacts = value.submissions.flatMap((item) => item.artifacts.map((artifact) => artifact.artifactId));
|
|
17624
17683
|
if (new Set(submissions).size !== submissions.length || new Set(artifacts).size !== artifacts.length)
|
|
17625
17684
|
context.addIssue({ code: "custom", message: "Snapshot identities must be unique" });
|
|
17626
17685
|
});
|
|
17627
|
-
var SubmissionReviewEvidenceSchema =
|
|
17686
|
+
var SubmissionReviewEvidenceSchema = z71.object({
|
|
17628
17687
|
id: Identifier,
|
|
17629
|
-
kind:
|
|
17630
|
-
scope:
|
|
17688
|
+
kind: z71.enum(["source_text", "visual_observation", "external_snapshot", "metadata"]),
|
|
17689
|
+
scope: z71.enum(["submission_text", "post_text", "visual", "metadata"]).optional(),
|
|
17631
17690
|
artifactId: Identifier.optional(),
|
|
17632
17691
|
artifactSha256: Hash.optional(),
|
|
17633
|
-
content:
|
|
17692
|
+
content: z71.string().max(262144),
|
|
17634
17693
|
contentSha256: Hash,
|
|
17635
|
-
sourceUrl:
|
|
17694
|
+
sourceUrl: z71.string().url().max(2048).refine((value) => {
|
|
17636
17695
|
try {
|
|
17637
17696
|
const url = new URL(value);
|
|
17638
17697
|
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
@@ -17642,7 +17701,7 @@ var SubmissionReviewEvidenceSchema = z70.object({
|
|
|
17642
17701
|
}, "Store a canonical public URL without credentials, query tokens or fragments").optional(),
|
|
17643
17702
|
capturedAt: Time,
|
|
17644
17703
|
expiresAt: Time.optional(),
|
|
17645
|
-
limitations:
|
|
17704
|
+
limitations: z71.array(z71.string().max(500)).max(20)
|
|
17646
17705
|
}).strict().superRefine((value, context) => {
|
|
17647
17706
|
if (Boolean(value.artifactId) !== Boolean(value.artifactSha256))
|
|
17648
17707
|
context.addIssue({
|
|
@@ -17654,28 +17713,28 @@ var SubmissionReviewEvidenceSchema = z70.object({
|
|
|
17654
17713
|
if (value.expiresAt && Date.parse(value.expiresAt) <= Date.parse(value.capturedAt))
|
|
17655
17714
|
context.addIssue({ code: "custom", message: "Evidence must expire after capture" });
|
|
17656
17715
|
});
|
|
17657
|
-
var SubmissionReviewFindingSchema =
|
|
17716
|
+
var SubmissionReviewFindingSchema = z71.object({
|
|
17658
17717
|
requirementId: Identifier,
|
|
17659
|
-
statement:
|
|
17660
|
-
sourceQuote:
|
|
17661
|
-
category:
|
|
17662
|
-
status:
|
|
17663
|
-
reason:
|
|
17664
|
-
evidenceIds:
|
|
17718
|
+
statement: z71.string().min(1).max(1200),
|
|
17719
|
+
sourceQuote: z71.string().min(1).max(2e3),
|
|
17720
|
+
category: z71.enum(["mandatory", "conditional", "optional", "preference"]),
|
|
17721
|
+
status: z71.enum(["supported", "unmet", "pending", "not_applicable"]),
|
|
17722
|
+
reason: z71.string().min(1).max(2e3),
|
|
17723
|
+
evidenceIds: z71.array(Identifier).max(32)
|
|
17665
17724
|
}).strict();
|
|
17666
|
-
var SubmissionReviewAssessmentSchema =
|
|
17725
|
+
var SubmissionReviewAssessmentSchema = z71.object({
|
|
17667
17726
|
submissionId: Identifier,
|
|
17668
|
-
evidence:
|
|
17727
|
+
evidence: z71.array(SubmissionReviewEvidenceSchema).max(32),
|
|
17669
17728
|
planSha256: Hash.optional(),
|
|
17670
|
-
checklistCoverage:
|
|
17671
|
-
findings:
|
|
17672
|
-
quality:
|
|
17673
|
-
dimension:
|
|
17674
|
-
score:
|
|
17675
|
-
reason:
|
|
17676
|
-
evidenceIds:
|
|
17729
|
+
checklistCoverage: z71.enum(["complete", "uncertain"]).optional(),
|
|
17730
|
+
findings: z71.array(SubmissionReviewFindingSchema).min(1).max(32),
|
|
17731
|
+
quality: z71.array(z71.object({
|
|
17732
|
+
dimension: z71.enum(["clarity", "visual_coherence", "distinctiveness", "finish"]),
|
|
17733
|
+
score: z71.number().min(0).max(4).nullable(),
|
|
17734
|
+
reason: z71.string().min(1).max(2e3),
|
|
17735
|
+
evidenceIds: z71.array(Identifier).max(32)
|
|
17677
17736
|
}).strict()).max(4),
|
|
17678
|
-
limitations:
|
|
17737
|
+
limitations: z71.array(z71.string().max(500)).max(20)
|
|
17679
17738
|
}).strict().superRefine((value, context) => {
|
|
17680
17739
|
const evidenceIds = new Set(value.evidence.map((item) => item.id));
|
|
17681
17740
|
if (evidenceIds.size !== value.evidence.length || new Set(value.findings.map((item) => item.requirementId)).size !== value.findings.length || new Set(value.quality.map((item) => item.dimension)).size !== value.quality.length)
|
|
@@ -17688,88 +17747,88 @@ var SubmissionReviewAssessmentSchema = z70.object({
|
|
|
17688
17747
|
if (value.quality.some((quality) => quality.score !== null && !quality.evidenceIds.length))
|
|
17689
17748
|
context.addIssue({ code: "custom", message: "Quality scores require inspected evidence" });
|
|
17690
17749
|
});
|
|
17691
|
-
var SubmissionReviewCorrectionSchema =
|
|
17750
|
+
var SubmissionReviewCorrectionSchema = z71.object({
|
|
17692
17751
|
requirementId: Identifier,
|
|
17693
|
-
status:
|
|
17694
|
-
reason:
|
|
17695
|
-
evidenceIds:
|
|
17752
|
+
status: z71.enum(["supported", "unmet", "pending", "not_applicable"]),
|
|
17753
|
+
reason: z71.string().min(1).max(2e3),
|
|
17754
|
+
evidenceIds: z71.array(Identifier).max(32)
|
|
17696
17755
|
}).strict();
|
|
17697
17756
|
|
|
17698
17757
|
// ../../packages/shared/dist/schemas/submission-review-api.schemas.js
|
|
17699
|
-
import { z as
|
|
17700
|
-
var id2 =
|
|
17701
|
-
var hash =
|
|
17702
|
-
var selection =
|
|
17758
|
+
import { z as z72 } from "zod";
|
|
17759
|
+
var id2 = z72.string().min(1).max(128);
|
|
17760
|
+
var hash = z72.string().regex(/^[a-f0-9]{64}$/);
|
|
17761
|
+
var selection = z72.array(id2).min(1).max(100).refine((ids2) => new Set(ids2).size === ids2.length, "Submission IDs must be unique");
|
|
17703
17762
|
var SUBMISSION_REVIEW_FEEDBACK_NOTE_MAX = 280;
|
|
17704
|
-
var SubmissionReviewTaskInputSchema =
|
|
17705
|
-
var SubmissionReviewRunInputSchema =
|
|
17706
|
-
var SubmissionReviewLookupInputSchema =
|
|
17707
|
-
idempotencyKey:
|
|
17708
|
-
chainId:
|
|
17763
|
+
var SubmissionReviewTaskInputSchema = z72.object({ taskId: id2, chainId: z72.number().int().positive().optional() }).strict();
|
|
17764
|
+
var SubmissionReviewRunInputSchema = z72.object({ runId: z72.string().uuid(), chainId: z72.number().int().positive() }).strict();
|
|
17765
|
+
var SubmissionReviewLookupInputSchema = z72.object({
|
|
17766
|
+
idempotencyKey: z72.string().uuid().transform((value) => value.toLowerCase()),
|
|
17767
|
+
chainId: z72.number().int().positive()
|
|
17709
17768
|
}).strict();
|
|
17710
17769
|
var SubmissionReviewPreviewInputSchema = SubmissionReviewTaskInputSchema.extend({
|
|
17711
|
-
scope:
|
|
17770
|
+
scope: z72.enum(["latest", "remaining", "selected"]).default("latest"),
|
|
17712
17771
|
submissionIds: selection.optional()
|
|
17713
17772
|
}).strict();
|
|
17714
|
-
var SubmissionReviewAuthSchema =
|
|
17773
|
+
var SubmissionReviewAuthSchema = z72.object({
|
|
17715
17774
|
requesterAddress: EthAddressSchema,
|
|
17716
|
-
idempotencyKey:
|
|
17717
|
-
expiresAt:
|
|
17718
|
-
signature:
|
|
17775
|
+
idempotencyKey: z72.string().uuid().transform((value) => value.toLowerCase()),
|
|
17776
|
+
expiresAt: z72.number().int().positive().safe(),
|
|
17777
|
+
signature: z72.string().regex(/^0x[0-9a-fA-F]+$/).max(2048)
|
|
17719
17778
|
});
|
|
17720
|
-
var SubmissionReviewStartPayloadSchema =
|
|
17779
|
+
var SubmissionReviewStartPayloadSchema = z72.object({
|
|
17721
17780
|
taskId: id2,
|
|
17722
17781
|
sourceFingerprint: hash,
|
|
17723
17782
|
profileFingerprint: hash,
|
|
17724
17783
|
submissionIds: selection
|
|
17725
17784
|
}).strict();
|
|
17726
|
-
var SubmissionReviewStartInputSchema = SubmissionReviewStartPayloadSchema.merge(SubmissionReviewAuthSchema).extend({ chainId:
|
|
17727
|
-
var SubmissionReviewControlInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).extend({ action:
|
|
17785
|
+
var SubmissionReviewStartInputSchema = SubmissionReviewStartPayloadSchema.merge(SubmissionReviewAuthSchema).extend({ chainId: z72.number().int().positive() }).strict();
|
|
17786
|
+
var SubmissionReviewControlInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).extend({ action: z72.enum(["pause", "cancel", "delete"]) }).strict();
|
|
17728
17787
|
var SubmissionReviewResumeInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).strict();
|
|
17729
|
-
var SubmissionReviewCorrectionInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).extend({ assessmentId:
|
|
17730
|
-
var FeedbackQualityDimension =
|
|
17788
|
+
var SubmissionReviewCorrectionInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).extend({ assessmentId: z72.string().uuid(), correction: SubmissionReviewCorrectionSchema }).strict();
|
|
17789
|
+
var FeedbackQualityDimension = z72.enum([
|
|
17731
17790
|
"clarity",
|
|
17732
17791
|
"visual_coherence",
|
|
17733
17792
|
"distinctiveness",
|
|
17734
17793
|
"finish"
|
|
17735
17794
|
]);
|
|
17736
|
-
var SubmissionReviewFeedbackTargetSchema =
|
|
17737
|
-
|
|
17738
|
-
kind:
|
|
17739
|
-
requirementId:
|
|
17795
|
+
var SubmissionReviewFeedbackTargetSchema = z72.discriminatedUnion("kind", [
|
|
17796
|
+
z72.object({
|
|
17797
|
+
kind: z72.literal("finding"),
|
|
17798
|
+
requirementId: z72.string().regex(/^[a-z][a-z0-9_]{0,35}$/)
|
|
17740
17799
|
}).strict(),
|
|
17741
|
-
|
|
17800
|
+
z72.object({ kind: z72.literal("quality"), dimension: FeedbackQualityDimension }).strict()
|
|
17742
17801
|
]);
|
|
17743
|
-
var SubmissionReviewFeedbackNoteSchema =
|
|
17802
|
+
var SubmissionReviewFeedbackNoteSchema = z72.string().transform((value) => value.normalize("NFC").trim()).pipe(z72.string().min(1).max(SUBMISSION_REVIEW_FEEDBACK_NOTE_MAX).refine((value) => (
|
|
17744
17803
|
// eslint-disable-next-line no-control-regex -- refusing control characters is the point
|
|
17745
17804
|
!/[\u0000-\u0009\u000B-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(value)
|
|
17746
17805
|
), "Note contains control characters"));
|
|
17747
|
-
var SubmissionReviewFeedbackVerdictSchema =
|
|
17806
|
+
var SubmissionReviewFeedbackVerdictSchema = z72.enum(["agree", "disagree"]);
|
|
17748
17807
|
var SubmissionReviewFeedbackInputSchema = SubmissionReviewRunInputSchema.extend({
|
|
17749
17808
|
submissionId: id2,
|
|
17750
|
-
assessmentId:
|
|
17809
|
+
assessmentId: z72.string().uuid(),
|
|
17751
17810
|
target: SubmissionReviewFeedbackTargetSchema,
|
|
17752
17811
|
verdict: SubmissionReviewFeedbackVerdictSchema,
|
|
17753
17812
|
note: SubmissionReviewFeedbackNoteSchema.optional(),
|
|
17754
17813
|
requesterAddress: EthAddressSchema,
|
|
17755
17814
|
/** One per tap. A replay of the same tap sends the same key. */
|
|
17756
|
-
idempotencyKey:
|
|
17815
|
+
idempotencyKey: z72.string().uuid().transform((value) => value.toLowerCase()),
|
|
17757
17816
|
/** The signed grant, reused by every tap in the run until it expires. */
|
|
17758
|
-
grantId:
|
|
17759
|
-
grantExpiresAt:
|
|
17760
|
-
grantSignature:
|
|
17817
|
+
grantId: z72.string().uuid().transform((value) => value.toLowerCase()),
|
|
17818
|
+
grantExpiresAt: z72.number().int().positive().safe(),
|
|
17819
|
+
grantSignature: z72.string().regex(/^0x[0-9a-fA-F]+$/).max(2048)
|
|
17761
17820
|
}).strict();
|
|
17762
|
-
var SubmissionReviewFeedbackEntrySchema =
|
|
17821
|
+
var SubmissionReviewFeedbackEntrySchema = z72.object({
|
|
17763
17822
|
target: SubmissionReviewFeedbackTargetSchema,
|
|
17764
17823
|
verdict: SubmissionReviewFeedbackVerdictSchema,
|
|
17765
|
-
note:
|
|
17766
|
-
createdAt:
|
|
17824
|
+
note: z72.string().nullable(),
|
|
17825
|
+
createdAt: z72.string().datetime()
|
|
17767
17826
|
});
|
|
17768
|
-
var SubmissionReviewFeedbackOutputSchema =
|
|
17769
|
-
feedbackId:
|
|
17770
|
-
createdAt:
|
|
17827
|
+
var SubmissionReviewFeedbackOutputSchema = z72.object({
|
|
17828
|
+
feedbackId: z72.string().uuid(),
|
|
17829
|
+
createdAt: z72.string().datetime()
|
|
17771
17830
|
});
|
|
17772
|
-
var SubmissionReviewJobStatusSchema =
|
|
17831
|
+
var SubmissionReviewJobStatusSchema = z72.enum([
|
|
17773
17832
|
"queued",
|
|
17774
17833
|
"running",
|
|
17775
17834
|
"paused",
|
|
@@ -17779,7 +17838,7 @@ var SubmissionReviewJobStatusSchema = z71.enum([
|
|
|
17779
17838
|
"blocked",
|
|
17780
17839
|
"failed"
|
|
17781
17840
|
]);
|
|
17782
|
-
var SubmissionReviewResultStateSchema =
|
|
17841
|
+
var SubmissionReviewResultStateSchema = z72.enum([
|
|
17783
17842
|
"completed",
|
|
17784
17843
|
"partial",
|
|
17785
17844
|
"queued",
|
|
@@ -17790,21 +17849,21 @@ var SubmissionReviewResultStateSchema = z71.enum([
|
|
|
17790
17849
|
"outdated",
|
|
17791
17850
|
"not_reviewed"
|
|
17792
17851
|
]);
|
|
17793
|
-
var SubmissionReviewSummarySchema =
|
|
17794
|
-
compliance:
|
|
17795
|
-
qualityScore:
|
|
17796
|
-
qualityBand:
|
|
17797
|
-
recommendation:
|
|
17798
|
-
coverage:
|
|
17799
|
-
supported:
|
|
17800
|
-
unmet:
|
|
17801
|
-
pending:
|
|
17802
|
-
required:
|
|
17852
|
+
var SubmissionReviewSummarySchema = z72.object({
|
|
17853
|
+
compliance: z72.enum(["supported", "pending", "unmet"]),
|
|
17854
|
+
qualityScore: z72.number().min(0).max(4).nullable(),
|
|
17855
|
+
qualityBand: z72.enum(["strong", "mixed", "weak"]).nullable(),
|
|
17856
|
+
recommendation: z72.enum(["shortlist", "review"]),
|
|
17857
|
+
coverage: z72.object({
|
|
17858
|
+
supported: z72.number().int(),
|
|
17859
|
+
unmet: z72.number().int(),
|
|
17860
|
+
pending: z72.number().int(),
|
|
17861
|
+
required: z72.number().int()
|
|
17803
17862
|
})
|
|
17804
17863
|
});
|
|
17805
|
-
var SubmissionReviewAvailabilitySchema =
|
|
17806
|
-
available:
|
|
17807
|
-
reason:
|
|
17864
|
+
var SubmissionReviewAvailabilitySchema = z72.object({
|
|
17865
|
+
available: z72.boolean(),
|
|
17866
|
+
reason: z72.enum([
|
|
17808
17867
|
"ready",
|
|
17809
17868
|
"disabled",
|
|
17810
17869
|
"operator_unavailable",
|
|
@@ -17814,58 +17873,58 @@ var SubmissionReviewAvailabilitySchema = z71.object({
|
|
|
17814
17873
|
"busy"
|
|
17815
17874
|
])
|
|
17816
17875
|
});
|
|
17817
|
-
var SubmissionReviewProfileOutputSchema =
|
|
17818
|
-
name:
|
|
17876
|
+
var SubmissionReviewProfileOutputSchema = z72.object({
|
|
17877
|
+
name: z72.literal("Submission Review"),
|
|
17819
17878
|
profile: SubmissionReviewPublicProfileSchema.nullable(),
|
|
17820
17879
|
profileFingerprint: hash.nullable(),
|
|
17821
17880
|
availability: SubmissionReviewAvailabilitySchema,
|
|
17822
|
-
requesterPrice:
|
|
17823
|
-
runSupplierCeilingMicroUsd:
|
|
17824
|
-
supportedMedia:
|
|
17881
|
+
requesterPrice: z72.literal("free_pilot"),
|
|
17882
|
+
runSupplierCeilingMicroUsd: z72.literal("1000000"),
|
|
17883
|
+
supportedMedia: z72.array(z72.string())
|
|
17825
17884
|
});
|
|
17826
|
-
var SubmissionReviewPreviewOutputSchema =
|
|
17885
|
+
var SubmissionReviewPreviewOutputSchema = z72.object({
|
|
17827
17886
|
taskId: id2,
|
|
17828
|
-
chainId:
|
|
17829
|
-
brief:
|
|
17887
|
+
chainId: z72.number().int(),
|
|
17888
|
+
brief: z72.string(),
|
|
17830
17889
|
briefSha256: hash,
|
|
17831
17890
|
profile: SubmissionReviewProfileOutputSchema,
|
|
17832
17891
|
sourceFingerprint: hash,
|
|
17833
|
-
submissionIds:
|
|
17834
|
-
totalLatestSubmissions:
|
|
17835
|
-
supportedSubmissions:
|
|
17836
|
-
unsupportedSubmissions:
|
|
17837
|
-
imageArtifacts:
|
|
17838
|
-
canStart:
|
|
17839
|
-
activeRunId:
|
|
17892
|
+
submissionIds: z72.array(id2),
|
|
17893
|
+
totalLatestSubmissions: z72.number().int(),
|
|
17894
|
+
supportedSubmissions: z72.number().int(),
|
|
17895
|
+
unsupportedSubmissions: z72.number().int(),
|
|
17896
|
+
imageArtifacts: z72.number().int(),
|
|
17897
|
+
canStart: z72.boolean(),
|
|
17898
|
+
activeRunId: z72.string().uuid().nullable(),
|
|
17840
17899
|
activeTaskId: id2.nullable(),
|
|
17841
|
-
limitations:
|
|
17900
|
+
limitations: z72.array(z72.string())
|
|
17842
17901
|
});
|
|
17843
|
-
var SubmissionReviewRunSummarySchema =
|
|
17844
|
-
runId:
|
|
17845
|
-
idempotencyKey:
|
|
17902
|
+
var SubmissionReviewRunSummarySchema = z72.object({
|
|
17903
|
+
runId: z72.string().uuid(),
|
|
17904
|
+
idempotencyKey: z72.string().uuid(),
|
|
17846
17905
|
taskId: id2,
|
|
17847
|
-
chainId:
|
|
17906
|
+
chainId: z72.number().int(),
|
|
17848
17907
|
profile: SubmissionReviewPublicProfileSchema,
|
|
17849
17908
|
status: SubmissionReviewJobStatusSchema,
|
|
17850
|
-
errorCode:
|
|
17851
|
-
createdAt:
|
|
17852
|
-
expiresAt:
|
|
17853
|
-
total:
|
|
17854
|
-
completed:
|
|
17855
|
-
failed:
|
|
17856
|
-
unsupported:
|
|
17857
|
-
pending:
|
|
17858
|
-
estimatedSupplierMicroUsd:
|
|
17859
|
-
heldSupplierMicroUsd:
|
|
17860
|
-
sourceChanged:
|
|
17909
|
+
errorCode: z72.string().nullable(),
|
|
17910
|
+
createdAt: z72.string().datetime(),
|
|
17911
|
+
expiresAt: z72.string().datetime(),
|
|
17912
|
+
total: z72.number().int(),
|
|
17913
|
+
completed: z72.number().int(),
|
|
17914
|
+
failed: z72.number().int(),
|
|
17915
|
+
unsupported: z72.number().int(),
|
|
17916
|
+
pending: z72.number().int(),
|
|
17917
|
+
estimatedSupplierMicroUsd: z72.string().regex(/^\d+$/),
|
|
17918
|
+
heldSupplierMicroUsd: z72.string().regex(/^\d+$/),
|
|
17919
|
+
sourceChanged: z72.boolean()
|
|
17861
17920
|
});
|
|
17862
17921
|
var SubmissionReviewHistoryInputSchema = SubmissionReviewTaskInputSchema.extend({
|
|
17863
|
-
limit:
|
|
17864
|
-
cursor:
|
|
17922
|
+
limit: z72.number().int().min(1).max(100).default(20),
|
|
17923
|
+
cursor: z72.string().uuid().optional()
|
|
17865
17924
|
}).strict();
|
|
17866
|
-
var SubmissionReviewHistoryOutputSchema =
|
|
17867
|
-
runs:
|
|
17868
|
-
nextCursor:
|
|
17925
|
+
var SubmissionReviewHistoryOutputSchema = z72.object({
|
|
17926
|
+
runs: z72.array(SubmissionReviewRunSummarySchema),
|
|
17927
|
+
nextCursor: z72.string().uuid().nullable()
|
|
17869
17928
|
});
|
|
17870
17929
|
var SUBMISSION_REVIEW_PENDING_REASONS = [
|
|
17871
17930
|
"link_unreadable",
|
|
@@ -17884,9 +17943,9 @@ var SUBMISSION_REVIEW_WITHHELD_REASONS = [
|
|
|
17884
17943
|
"check_failed",
|
|
17885
17944
|
"unsupported_check"
|
|
17886
17945
|
];
|
|
17887
|
-
var QualityDimension =
|
|
17888
|
-
var EvidenceKind =
|
|
17889
|
-
var PublicHttpsUrl =
|
|
17946
|
+
var QualityDimension = z72.enum(["clarity", "visual_coherence", "distinctiveness", "finish"]);
|
|
17947
|
+
var EvidenceKind = z72.enum(["source_text", "visual_observation", "external_snapshot", "metadata"]);
|
|
17948
|
+
var PublicHttpsUrl = z72.string().url().max(2048).refine((value) => {
|
|
17890
17949
|
try {
|
|
17891
17950
|
const url = new URL(value);
|
|
17892
17951
|
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
@@ -17894,96 +17953,96 @@ var PublicHttpsUrl = z71.string().url().max(2048).refine((value) => {
|
|
|
17894
17953
|
return false;
|
|
17895
17954
|
}
|
|
17896
17955
|
}, "Offer only a canonical public URL without credentials, query tokens or fragments");
|
|
17897
|
-
var SubmissionReviewResolveActionSchema =
|
|
17898
|
-
|
|
17899
|
-
|
|
17956
|
+
var SubmissionReviewResolveActionSchema = z72.discriminatedUnion("kind", [
|
|
17957
|
+
z72.object({ kind: z72.literal("open_link"), url: PublicHttpsUrl }).strict(),
|
|
17958
|
+
z72.object({ kind: z72.literal("view_artifact"), artifactId: id2 }).strict()
|
|
17900
17959
|
]).nullable();
|
|
17901
|
-
var SubmissionReviewExplanationsSchema =
|
|
17902
|
-
findings:
|
|
17960
|
+
var SubmissionReviewExplanationsSchema = z72.object({
|
|
17961
|
+
findings: z72.array(z72.object({
|
|
17903
17962
|
requirementId: id2,
|
|
17904
|
-
reason:
|
|
17963
|
+
reason: z72.enum(SUBMISSION_REVIEW_PENDING_REASONS),
|
|
17905
17964
|
action: SubmissionReviewResolveActionSchema
|
|
17906
17965
|
}).strict()).max(32),
|
|
17907
|
-
quality:
|
|
17966
|
+
quality: z72.array(z72.object({
|
|
17908
17967
|
dimension: QualityDimension,
|
|
17909
|
-
reason:
|
|
17968
|
+
reason: z72.enum(SUBMISSION_REVIEW_WITHHELD_REASONS),
|
|
17910
17969
|
action: SubmissionReviewResolveActionSchema
|
|
17911
17970
|
}).strict()).max(4)
|
|
17912
17971
|
}).strict();
|
|
17913
|
-
var SubmissionReviewDecisionModelSchema =
|
|
17914
|
-
var SubmissionReviewCardReasonSchema =
|
|
17972
|
+
var SubmissionReviewDecisionModelSchema = z72.object({ model: id2, builds: z72.array(id2).max(8) }).strict().nullable();
|
|
17973
|
+
var SubmissionReviewCardReasonSchema = z72.object({
|
|
17915
17974
|
requirementId: id2,
|
|
17916
|
-
status:
|
|
17917
|
-
sourceQuote:
|
|
17918
|
-
evidence:
|
|
17919
|
-
pendingReason:
|
|
17975
|
+
status: z72.enum(["supported", "unmet", "pending"]),
|
|
17976
|
+
sourceQuote: z72.string().min(1).max(280),
|
|
17977
|
+
evidence: z72.object({ kind: EvidenceKind, excerpt: z72.string().max(280), artifactId: id2.optional() }).strict().nullable(),
|
|
17978
|
+
pendingReason: z72.enum(SUBMISSION_REVIEW_PENDING_REASONS).nullable()
|
|
17920
17979
|
}).strict();
|
|
17921
17980
|
var SUBMISSION_REVIEW_OUTDATED_REASONS = [
|
|
17922
17981
|
"source_changed",
|
|
17923
17982
|
"evaluator_changed",
|
|
17924
17983
|
"evidence_expired"
|
|
17925
17984
|
];
|
|
17926
|
-
var SubmissionReviewOutdatedReasonsSchema =
|
|
17927
|
-
var SubmissionReviewUpgradeSchema =
|
|
17985
|
+
var SubmissionReviewOutdatedReasonsSchema = z72.array(z72.enum(SUBMISSION_REVIEW_OUTDATED_REASONS)).min(1).max(3).nullable();
|
|
17986
|
+
var SubmissionReviewUpgradeSchema = z72.object({
|
|
17928
17987
|
profileVersion: id2,
|
|
17929
|
-
submissionIds:
|
|
17930
|
-
estimatedUsd:
|
|
17988
|
+
submissionIds: z72.array(id2).min(1).max(100),
|
|
17989
|
+
estimatedUsd: z72.string().regex(/^\d+\.\d{2}$/)
|
|
17931
17990
|
}).nullable();
|
|
17932
|
-
var SubmissionReviewResultRowSchema =
|
|
17991
|
+
var SubmissionReviewResultRowSchema = z72.object({
|
|
17933
17992
|
submissionId: id2,
|
|
17934
17993
|
workerAddress: EthAddressSchema,
|
|
17935
|
-
submittedAt:
|
|
17994
|
+
submittedAt: z72.string().datetime(),
|
|
17936
17995
|
state: SubmissionReviewResultStateSchema,
|
|
17937
|
-
runId:
|
|
17938
|
-
assessmentId:
|
|
17996
|
+
runId: z72.string().uuid().nullable(),
|
|
17997
|
+
assessmentId: z72.string().uuid().nullable(),
|
|
17939
17998
|
profileFingerprint: hash.nullable(),
|
|
17940
17999
|
summary: SubmissionReviewSummarySchema.nullable(),
|
|
17941
|
-
corrected:
|
|
18000
|
+
corrected: z72.boolean(),
|
|
17942
18001
|
// Defaults keep a released client working against a backend that predates these fields.
|
|
17943
18002
|
reason: SubmissionReviewCardReasonSchema.nullable().default(null),
|
|
17944
18003
|
outdatedReason: SubmissionReviewOutdatedReasonsSchema.default(null)
|
|
17945
18004
|
});
|
|
17946
18005
|
var SubmissionReviewResultsInputSchema = SubmissionReviewTaskInputSchema.extend({
|
|
17947
|
-
runId:
|
|
17948
|
-
compliance:
|
|
17949
|
-
qualityBand:
|
|
18006
|
+
runId: z72.string().uuid().optional(),
|
|
18007
|
+
compliance: z72.enum(["supported", "pending", "unmet"]).optional(),
|
|
18008
|
+
qualityBand: z72.enum(["strong", "mixed", "weak"]).optional(),
|
|
17950
18009
|
state: SubmissionReviewResultStateSchema.optional(),
|
|
17951
|
-
shortlist:
|
|
17952
|
-
sort:
|
|
17953
|
-
limit:
|
|
17954
|
-
cursor:
|
|
18010
|
+
shortlist: z72.boolean().optional(),
|
|
18011
|
+
sort: z72.enum(["rank", "newest"]).default("rank"),
|
|
18012
|
+
limit: z72.number().int().min(1).max(100).default(24),
|
|
18013
|
+
cursor: z72.string().max(2048).optional()
|
|
17955
18014
|
}).strict();
|
|
17956
|
-
var SubmissionReviewResultsOutputSchema =
|
|
17957
|
-
rows:
|
|
17958
|
-
total:
|
|
18015
|
+
var SubmissionReviewResultsOutputSchema = z72.object({
|
|
18016
|
+
rows: z72.array(SubmissionReviewResultRowSchema),
|
|
18017
|
+
total: z72.number().int(),
|
|
17959
18018
|
profileFingerprint: hash.nullable(),
|
|
17960
|
-
nextCursor:
|
|
18019
|
+
nextCursor: z72.string().nullable(),
|
|
17961
18020
|
viewFingerprint: hash,
|
|
17962
18021
|
upgrade: SubmissionReviewUpgradeSchema.default(null)
|
|
17963
18022
|
});
|
|
17964
18023
|
var SubmissionReviewAssessmentInputSchema = SubmissionReviewRunInputSchema.extend({
|
|
17965
18024
|
submissionId: id2
|
|
17966
18025
|
}).strict();
|
|
17967
|
-
var SubmissionReviewAssessmentOutputSchema =
|
|
17968
|
-
runId:
|
|
17969
|
-
assessmentId:
|
|
18026
|
+
var SubmissionReviewAssessmentOutputSchema = z72.object({
|
|
18027
|
+
runId: z72.string().uuid(),
|
|
18028
|
+
assessmentId: z72.string().uuid(),
|
|
17970
18029
|
profile: SubmissionReviewPublicProfileSchema,
|
|
17971
|
-
brief:
|
|
18030
|
+
brief: z72.string(),
|
|
17972
18031
|
briefSha256: hash,
|
|
17973
18032
|
submission: SubmissionReviewManifestItemSchema.extend({ workerAddress: EthAddressSchema }),
|
|
17974
18033
|
original: SubmissionReviewAssessmentSchema,
|
|
17975
18034
|
effective: SubmissionReviewAssessmentSchema,
|
|
17976
18035
|
summary: SubmissionReviewSummarySchema,
|
|
17977
|
-
outdated:
|
|
18036
|
+
outdated: z72.boolean(),
|
|
17978
18037
|
outdatedReason: SubmissionReviewOutdatedReasonsSchema.default(null),
|
|
17979
18038
|
explanations: SubmissionReviewExplanationsSchema.default({ findings: [], quality: [] }),
|
|
17980
18039
|
decision: SubmissionReviewDecisionModelSchema.default(null),
|
|
17981
18040
|
// The caller's latest verdict per finding or score. Defaults keep an older backend working.
|
|
17982
|
-
feedback:
|
|
17983
|
-
corrections:
|
|
17984
|
-
id:
|
|
18041
|
+
feedback: z72.array(SubmissionReviewFeedbackEntrySchema).max(64).default([]),
|
|
18042
|
+
corrections: z72.array(z72.object({
|
|
18043
|
+
id: z72.string().uuid(),
|
|
17985
18044
|
author: EthAddressSchema,
|
|
17986
|
-
createdAt:
|
|
18045
|
+
createdAt: z72.string().datetime(),
|
|
17987
18046
|
correction: SubmissionReviewCorrectionSchema
|
|
17988
18047
|
}))
|
|
17989
18048
|
});
|
|
@@ -18036,11 +18095,11 @@ function requesterTimeoutRefusal(task, liveSubmissions, now) {
|
|
|
18036
18095
|
var REQUESTER_TIMEOUT_NOT_SERVED_MESSAGE = "This chain's contract does not serve requester-timeout yet (it arrives with rev027); the requester can still accept a winner";
|
|
18037
18096
|
|
|
18038
18097
|
// ../../packages/shared/dist/schemas/bug-report.schemas.js
|
|
18039
|
-
import { z as
|
|
18098
|
+
import { z as z73 } from "zod";
|
|
18040
18099
|
var BUG_REPORT_SOURCES = ["cli", "web", "agent"];
|
|
18041
|
-
var BugReportSourceSchema =
|
|
18100
|
+
var BugReportSourceSchema = z73.enum(BUG_REPORT_SOURCES);
|
|
18042
18101
|
var BUG_REPORT_SEVERITIES = ["low", "medium", "high", "blocker"];
|
|
18043
|
-
var BugReportSeveritySchema =
|
|
18102
|
+
var BugReportSeveritySchema = z73.enum(BUG_REPORT_SEVERITIES);
|
|
18044
18103
|
var BUG_REPORT_STATUSES = [
|
|
18045
18104
|
"new",
|
|
18046
18105
|
"triaged",
|
|
@@ -18049,15 +18108,15 @@ var BUG_REPORT_STATUSES = [
|
|
|
18049
18108
|
"fixed",
|
|
18050
18109
|
"wont-fix"
|
|
18051
18110
|
];
|
|
18052
|
-
var BugReportStatusSchema =
|
|
18111
|
+
var BugReportStatusSchema = z73.enum(BUG_REPORT_STATUSES);
|
|
18053
18112
|
var BUG_REPORT_VISIBILITIES = ["public", "private"];
|
|
18054
|
-
var BugReportVisibilitySchema =
|
|
18113
|
+
var BugReportVisibilitySchema = z73.enum(BUG_REPORT_VISIBILITIES);
|
|
18055
18114
|
var BUG_REPORT_TITLE_MAX_CHARS = 200;
|
|
18056
18115
|
var BUG_REPORT_DESCRIPTION_MAX_BYTES = 10 * 1024;
|
|
18057
18116
|
var BUG_REPORT_CONTEXT_MAX_BYTES = 32 * 1024;
|
|
18058
18117
|
var utf8Bytes = (value) => new TextEncoder().encode(value).length;
|
|
18059
|
-
var contextText = (max) =>
|
|
18060
|
-
var BugReportContextSchema =
|
|
18118
|
+
var contextText = (max) => z73.string().max(max);
|
|
18119
|
+
var BugReportContextSchema = z73.object({
|
|
18061
18120
|
cliVersion: contextText(64).optional(),
|
|
18062
18121
|
appVersion: contextText(64).optional(),
|
|
18063
18122
|
os: contextText(128).optional(),
|
|
@@ -18067,80 +18126,80 @@ var BugReportContextSchema = z72.object({
|
|
|
18067
18126
|
route: contextText(2048).optional(),
|
|
18068
18127
|
userAgent: contextText(512).optional(),
|
|
18069
18128
|
taskId: contextText(128).optional(),
|
|
18070
|
-
txHash:
|
|
18129
|
+
txHash: z73.string().regex(/^0x[0-9a-fA-F]{64}$/).optional(),
|
|
18071
18130
|
error: contextText(16 * 1024).optional(),
|
|
18072
18131
|
errorDigest: contextText(256).optional()
|
|
18073
18132
|
}).strict().refine((value) => utf8Bytes(JSON.stringify(value)) <= BUG_REPORT_CONTEXT_MAX_BYTES, {
|
|
18074
18133
|
message: `context must be at most ${BUG_REPORT_CONTEXT_MAX_BYTES} bytes`
|
|
18075
18134
|
});
|
|
18076
|
-
var SubmitBugReportInputSchema =
|
|
18077
|
-
title:
|
|
18078
|
-
description:
|
|
18135
|
+
var SubmitBugReportInputSchema = z73.object({
|
|
18136
|
+
title: z73.string().trim().min(1).max(BUG_REPORT_TITLE_MAX_CHARS),
|
|
18137
|
+
description: z73.string().trim().min(1).refine((value) => utf8Bytes(value) <= BUG_REPORT_DESCRIPTION_MAX_BYTES, {
|
|
18079
18138
|
message: `description must be at most ${BUG_REPORT_DESCRIPTION_MAX_BYTES} bytes`
|
|
18080
18139
|
}),
|
|
18081
18140
|
severity: BugReportSeveritySchema.default("medium"),
|
|
18082
18141
|
source: BugReportSourceSchema,
|
|
18083
|
-
agentId:
|
|
18142
|
+
agentId: z73.string().max(128).optional(),
|
|
18084
18143
|
context: BugReportContextSchema.default({}),
|
|
18085
18144
|
visibility: BugReportVisibilitySchema.default("public")
|
|
18086
18145
|
}).strict();
|
|
18087
18146
|
var SignedSubmitBugReportInputSchema = SubmitBugReportInputSchema.extend(WalletWriteProofSchema.shape).strict();
|
|
18088
|
-
var SubmitBugReportOutputSchema =
|
|
18089
|
-
id:
|
|
18090
|
-
duplicate:
|
|
18147
|
+
var SubmitBugReportOutputSchema = z73.object({
|
|
18148
|
+
id: z73.string().uuid(),
|
|
18149
|
+
duplicate: z73.boolean()
|
|
18091
18150
|
});
|
|
18092
|
-
var BugReportSchema =
|
|
18093
|
-
id:
|
|
18151
|
+
var BugReportSchema = z73.object({
|
|
18152
|
+
id: z73.string().uuid(),
|
|
18094
18153
|
/** The public report number, shown as #N (ADR-0321). */
|
|
18095
|
-
number:
|
|
18154
|
+
number: z73.number().int(),
|
|
18096
18155
|
visibility: BugReportVisibilitySchema,
|
|
18097
|
-
title:
|
|
18098
|
-
description:
|
|
18156
|
+
title: z73.string(),
|
|
18157
|
+
description: z73.string(),
|
|
18099
18158
|
severity: BugReportSeveritySchema,
|
|
18100
18159
|
source: BugReportSourceSchema,
|
|
18101
18160
|
status: BugReportStatusSchema,
|
|
18102
|
-
duplicateOfId:
|
|
18103
|
-
githubIssueNumber:
|
|
18104
|
-
githubIssueUrl:
|
|
18161
|
+
duplicateOfId: z73.string().uuid().nullable(),
|
|
18162
|
+
githubIssueNumber: z73.number().int().nullable(),
|
|
18163
|
+
githubIssueUrl: z73.string().url().nullable(),
|
|
18105
18164
|
/** The other side has posted since the viewer last read the thread (ADR-0318 decision 5). */
|
|
18106
|
-
unread:
|
|
18107
|
-
context:
|
|
18108
|
-
createdAt:
|
|
18109
|
-
updatedAt:
|
|
18165
|
+
unread: z73.boolean(),
|
|
18166
|
+
context: z73.record(z73.unknown()),
|
|
18167
|
+
createdAt: z73.string(),
|
|
18168
|
+
updatedAt: z73.string()
|
|
18110
18169
|
});
|
|
18111
|
-
var ListMyBugReportsInputSchema =
|
|
18170
|
+
var ListMyBugReportsInputSchema = z73.object({
|
|
18112
18171
|
status: BugReportStatusSchema.optional(),
|
|
18113
|
-
limit:
|
|
18172
|
+
limit: z73.number().int().min(1).max(100).default(50)
|
|
18114
18173
|
}).default({});
|
|
18115
|
-
var ListMyBugReportsOutputSchema =
|
|
18116
|
-
var GetBugReportInputSchema =
|
|
18174
|
+
var ListMyBugReportsOutputSchema = z73.object({ reports: z73.array(BugReportSchema) });
|
|
18175
|
+
var GetBugReportInputSchema = z73.object({ id: z73.string().uuid() });
|
|
18117
18176
|
var BUG_REPORT_STAFF_NOTE_MAX_CHARS = 4e3;
|
|
18118
18177
|
var BugReportStaffViewSchema = BugReportSchema.extend({
|
|
18119
|
-
reporterAddress:
|
|
18120
|
-
reporterAgentId:
|
|
18121
|
-
reporterIp:
|
|
18122
|
-
staffNote:
|
|
18178
|
+
reporterAddress: z73.string(),
|
|
18179
|
+
reporterAgentId: z73.string().nullable(),
|
|
18180
|
+
reporterIp: z73.string().nullable(),
|
|
18181
|
+
staffNote: z73.string().nullable()
|
|
18123
18182
|
});
|
|
18124
|
-
var ListStaffBugReportsInputSchema =
|
|
18183
|
+
var ListStaffBugReportsInputSchema = z73.object({
|
|
18125
18184
|
status: BugReportStatusSchema.optional(),
|
|
18126
18185
|
source: BugReportSourceSchema.optional(),
|
|
18127
18186
|
severity: BugReportSeveritySchema.optional(),
|
|
18128
|
-
createdFrom:
|
|
18129
|
-
createdTo:
|
|
18187
|
+
createdFrom: z73.string().datetime().optional(),
|
|
18188
|
+
createdTo: z73.string().datetime().optional(),
|
|
18130
18189
|
/** Only reports with a reporter reply staff have not read. */
|
|
18131
|
-
unread:
|
|
18132
|
-
limit:
|
|
18133
|
-
offset:
|
|
18190
|
+
unread: z73.boolean().optional(),
|
|
18191
|
+
limit: z73.number().int().min(1).max(200).default(50),
|
|
18192
|
+
offset: z73.number().int().min(0).default(0)
|
|
18134
18193
|
}).default({});
|
|
18135
|
-
var ListStaffBugReportsOutputSchema =
|
|
18136
|
-
reports:
|
|
18137
|
-
total:
|
|
18194
|
+
var ListStaffBugReportsOutputSchema = z73.object({
|
|
18195
|
+
reports: z73.array(BugReportStaffViewSchema),
|
|
18196
|
+
total: z73.number().int()
|
|
18138
18197
|
});
|
|
18139
|
-
var UpdateBugReportInputSchema =
|
|
18140
|
-
id:
|
|
18198
|
+
var UpdateBugReportInputSchema = z73.object({
|
|
18199
|
+
id: z73.string().uuid(),
|
|
18141
18200
|
status: BugReportStatusSchema.optional(),
|
|
18142
|
-
duplicateOfId:
|
|
18143
|
-
staffNote:
|
|
18201
|
+
duplicateOfId: z73.string().uuid().optional(),
|
|
18202
|
+
staffNote: z73.string().max(BUG_REPORT_STAFF_NOTE_MAX_CHARS).nullable().optional(),
|
|
18144
18203
|
severity: BugReportSeveritySchema.optional()
|
|
18145
18204
|
}).strict().refine((v) => v.status !== "duplicate" || v.duplicateOfId !== void 0, {
|
|
18146
18205
|
message: "duplicateOfId is required when status is duplicate",
|
|
@@ -18155,122 +18214,122 @@ var UpdateBugReportInputSchema = z72.object({
|
|
|
18155
18214
|
message: "Nothing to update"
|
|
18156
18215
|
});
|
|
18157
18216
|
var BUG_REPORT_MESSAGE_AUTHOR_KINDS = ["staff", "reporter"];
|
|
18158
|
-
var BugReportMessageAuthorKindSchema =
|
|
18159
|
-
var BugReportMessageBodySchema =
|
|
18217
|
+
var BugReportMessageAuthorKindSchema = z73.enum(BUG_REPORT_MESSAGE_AUTHOR_KINDS);
|
|
18218
|
+
var BugReportMessageBodySchema = z73.string().trim().min(1).refine((value) => utf8Bytes(value) <= BUG_REPORT_DESCRIPTION_MAX_BYTES, {
|
|
18160
18219
|
message: `body must be at most ${BUG_REPORT_DESCRIPTION_MAX_BYTES} bytes`
|
|
18161
18220
|
});
|
|
18162
|
-
var BugReportMessageSchema =
|
|
18163
|
-
id:
|
|
18221
|
+
var BugReportMessageSchema = z73.object({
|
|
18222
|
+
id: z73.string().uuid(),
|
|
18164
18223
|
authorKind: BugReportMessageAuthorKindSchema,
|
|
18165
18224
|
/** "Taskmarket staff" for staff, "Reporter" for the reporter. */
|
|
18166
|
-
author:
|
|
18167
|
-
body:
|
|
18168
|
-
createdAt:
|
|
18225
|
+
author: z73.string(),
|
|
18226
|
+
body: z73.string(),
|
|
18227
|
+
createdAt: z73.string(),
|
|
18169
18228
|
/** Posted by the other side since the viewer last read the thread. */
|
|
18170
|
-
isNew:
|
|
18229
|
+
isNew: z73.boolean()
|
|
18171
18230
|
});
|
|
18172
18231
|
var BugReportDetailSchema = BugReportSchema.extend({
|
|
18173
|
-
messages:
|
|
18232
|
+
messages: z73.array(BugReportMessageSchema)
|
|
18174
18233
|
});
|
|
18175
18234
|
var BugReportStaffDetailSchema = BugReportStaffViewSchema.extend({
|
|
18176
|
-
messages:
|
|
18177
|
-
});
|
|
18178
|
-
var PostBugReportMessageInputSchema =
|
|
18179
|
-
var PublicBugReportSchema =
|
|
18180
|
-
id:
|
|
18181
|
-
number:
|
|
18182
|
-
title:
|
|
18183
|
-
description:
|
|
18235
|
+
messages: z73.array(BugReportMessageSchema)
|
|
18236
|
+
});
|
|
18237
|
+
var PostBugReportMessageInputSchema = z73.object({ id: z73.string().uuid(), body: BugReportMessageBodySchema }).strict();
|
|
18238
|
+
var PublicBugReportSchema = z73.object({
|
|
18239
|
+
id: z73.string().uuid(),
|
|
18240
|
+
number: z73.number().int(),
|
|
18241
|
+
title: z73.string(),
|
|
18242
|
+
description: z73.string(),
|
|
18184
18243
|
severity: BugReportSeveritySchema,
|
|
18185
18244
|
source: BugReportSourceSchema,
|
|
18186
18245
|
status: BugReportStatusSchema,
|
|
18187
|
-
duplicateOfId:
|
|
18188
|
-
reporterAddress:
|
|
18189
|
-
reporterAgentId:
|
|
18246
|
+
duplicateOfId: z73.string().uuid().nullable(),
|
|
18247
|
+
reporterAddress: z73.string(),
|
|
18248
|
+
reporterAgentId: z73.string().nullable(),
|
|
18190
18249
|
/** ADR-0541: the reporter's stored display name; null until one is assigned. */
|
|
18191
|
-
reporterDisplayName:
|
|
18192
|
-
context:
|
|
18250
|
+
reporterDisplayName: z73.string().nullable().optional(),
|
|
18251
|
+
context: z73.record(z73.unknown()),
|
|
18193
18252
|
/** Wallets that said "I have this too". */
|
|
18194
|
-
affectedCount:
|
|
18195
|
-
commentCount:
|
|
18196
|
-
createdAt:
|
|
18197
|
-
updatedAt:
|
|
18253
|
+
affectedCount: z73.number().int(),
|
|
18254
|
+
commentCount: z73.number().int(),
|
|
18255
|
+
createdAt: z73.string(),
|
|
18256
|
+
updatedAt: z73.string()
|
|
18198
18257
|
});
|
|
18199
18258
|
var PUBLIC_BUG_REPORT_SORTS = ["newest", "most-affected"];
|
|
18200
|
-
var ListPublicBugReportsInputSchema =
|
|
18259
|
+
var ListPublicBugReportsInputSchema = z73.object({
|
|
18201
18260
|
status: BugReportStatusSchema.optional(),
|
|
18202
18261
|
/** Matched case-insensitively against the title and description. */
|
|
18203
|
-
query:
|
|
18204
|
-
sort:
|
|
18262
|
+
query: z73.string().trim().min(1).max(200).optional(),
|
|
18263
|
+
sort: z73.enum(PUBLIC_BUG_REPORT_SORTS).default("newest"),
|
|
18205
18264
|
// Coerced: the REST route reads these from the query string.
|
|
18206
|
-
limit: coerceNumber(
|
|
18207
|
-
offset: coerceNumber(
|
|
18265
|
+
limit: coerceNumber(z73.number().int().min(1).max(100)).default(50),
|
|
18266
|
+
offset: coerceNumber(z73.number().int().min(0)).default(0)
|
|
18208
18267
|
}).default({});
|
|
18209
|
-
var ListPublicBugReportsOutputSchema =
|
|
18210
|
-
reports:
|
|
18211
|
-
total:
|
|
18212
|
-
});
|
|
18213
|
-
var BugReportCommentSchema =
|
|
18214
|
-
id:
|
|
18215
|
-
authorAddress:
|
|
18216
|
-
authorAgentId:
|
|
18268
|
+
var ListPublicBugReportsOutputSchema = z73.object({
|
|
18269
|
+
reports: z73.array(PublicBugReportSchema),
|
|
18270
|
+
total: z73.number().int()
|
|
18271
|
+
});
|
|
18272
|
+
var BugReportCommentSchema = z73.object({
|
|
18273
|
+
id: z73.string().uuid(),
|
|
18274
|
+
authorAddress: z73.string(),
|
|
18275
|
+
authorAgentId: z73.string().nullable(),
|
|
18217
18276
|
/** ADR-0541: the author's stored display name; null until one is assigned. */
|
|
18218
|
-
authorDisplayName:
|
|
18277
|
+
authorDisplayName: z73.string().nullable().optional(),
|
|
18219
18278
|
/** The comment is by the report's reporter. */
|
|
18220
|
-
isReporter:
|
|
18279
|
+
isReporter: z73.boolean(),
|
|
18221
18280
|
/** Taskmarket staff wrote it; `authorAddress` is then not a wallet. */
|
|
18222
|
-
isStaff:
|
|
18223
|
-
body:
|
|
18224
|
-
createdAt:
|
|
18281
|
+
isStaff: z73.boolean(),
|
|
18282
|
+
body: z73.string(),
|
|
18283
|
+
createdAt: z73.string()
|
|
18225
18284
|
});
|
|
18226
18285
|
var BugReportStaffCommentSchema = BugReportCommentSchema.extend({
|
|
18227
|
-
hiddenAt:
|
|
18228
|
-
hiddenBy:
|
|
18286
|
+
hiddenAt: z73.string().nullable(),
|
|
18287
|
+
hiddenBy: z73.string().nullable(),
|
|
18229
18288
|
/** Staff have blocked the comment's author from commenting on any report. */
|
|
18230
|
-
authorBlocked:
|
|
18289
|
+
authorBlocked: z73.boolean()
|
|
18231
18290
|
});
|
|
18232
18291
|
var PublicBugReportDetailSchema = PublicBugReportSchema.extend({
|
|
18233
|
-
comments:
|
|
18292
|
+
comments: z73.array(BugReportCommentSchema),
|
|
18234
18293
|
/** The public number of the report this one duplicates; null when none, or it is private. */
|
|
18235
|
-
duplicateOfNumber:
|
|
18294
|
+
duplicateOfNumber: z73.number().int().nullable(),
|
|
18236
18295
|
/** The signed-in viewer said "I have this too"; false when signed out. */
|
|
18237
|
-
viewerAffected:
|
|
18296
|
+
viewerAffected: z73.boolean()
|
|
18238
18297
|
});
|
|
18239
|
-
var GetPublicBugReportInputSchema =
|
|
18240
|
-
number: coerceNumber(
|
|
18298
|
+
var GetPublicBugReportInputSchema = z73.object({
|
|
18299
|
+
number: coerceNumber(z73.number().int().positive())
|
|
18241
18300
|
});
|
|
18242
|
-
var MarkBugReportAffectedOutputSchema =
|
|
18243
|
-
var PostBugReportCommentInputSchema =
|
|
18244
|
-
id:
|
|
18301
|
+
var MarkBugReportAffectedOutputSchema = z73.object({ affectedCount: z73.number().int() });
|
|
18302
|
+
var PostBugReportCommentInputSchema = z73.object({
|
|
18303
|
+
id: z73.string().uuid(),
|
|
18245
18304
|
body: BugReportMessageBodySchema,
|
|
18246
|
-
agentId:
|
|
18305
|
+
agentId: z73.string().max(128).optional()
|
|
18247
18306
|
}).strict();
|
|
18248
18307
|
var SignedPostBugReportCommentInputSchema = PostBugReportCommentInputSchema.extend(WalletWriteProofSchema.shape).strict();
|
|
18249
|
-
var SetBugReportVisibilityInputSchema =
|
|
18308
|
+
var SetBugReportVisibilityInputSchema = z73.object({ id: z73.string().uuid(), visibility: BugReportVisibilitySchema }).strict();
|
|
18250
18309
|
var SignedSetBugReportVisibilityInputSchema = SetBugReportVisibilityInputSchema.extend(WalletWriteProofSchema.shape).strict();
|
|
18251
|
-
var SignedMarkBugReportAffectedInputSchema =
|
|
18252
|
-
var HideBugReportCommentInputSchema =
|
|
18253
|
-
var BlockBugReportCommenterInputSchema =
|
|
18254
|
-
var UnblockBugReportCommenterInputSchema =
|
|
18310
|
+
var SignedMarkBugReportAffectedInputSchema = z73.object({ id: z73.string().uuid() }).extend(WalletWriteProofSchema.shape).strict();
|
|
18311
|
+
var HideBugReportCommentInputSchema = z73.object({ commentId: z73.string().uuid() }).strict();
|
|
18312
|
+
var BlockBugReportCommenterInputSchema = z73.object({ wallet: z73.string().min(1).max(128), reason: z73.string().max(500).optional() }).strict();
|
|
18313
|
+
var UnblockBugReportCommenterInputSchema = z73.object({ wallet: z73.string().min(1).max(128) }).strict();
|
|
18255
18314
|
var BUG_INCIDENT_NOTICE_TITLE_MAX_CHARS = 120;
|
|
18256
18315
|
var BUG_INCIDENT_NOTICE_BODY_MAX_CHARS = 600;
|
|
18257
|
-
var BugIncidentNoticeSchema =
|
|
18258
|
-
id:
|
|
18259
|
-
title:
|
|
18260
|
-
body:
|
|
18316
|
+
var BugIncidentNoticeSchema = z73.object({
|
|
18317
|
+
id: z73.string().uuid(),
|
|
18318
|
+
title: z73.string(),
|
|
18319
|
+
body: z73.string(),
|
|
18261
18320
|
/** The public number of the report that tracks it, when there is one. */
|
|
18262
|
-
reportNumber:
|
|
18263
|
-
createdAt:
|
|
18321
|
+
reportNumber: z73.number().int().nullable(),
|
|
18322
|
+
createdAt: z73.string()
|
|
18264
18323
|
});
|
|
18265
|
-
var ActiveBugIncidentNoticeOutputSchema =
|
|
18324
|
+
var ActiveBugIncidentNoticeOutputSchema = z73.object({
|
|
18266
18325
|
notice: BugIncidentNoticeSchema.nullable()
|
|
18267
18326
|
});
|
|
18268
|
-
var PostBugIncidentNoticeInputSchema =
|
|
18269
|
-
title:
|
|
18270
|
-
body:
|
|
18271
|
-
reportId:
|
|
18327
|
+
var PostBugIncidentNoticeInputSchema = z73.object({
|
|
18328
|
+
title: z73.string().trim().min(1).max(BUG_INCIDENT_NOTICE_TITLE_MAX_CHARS),
|
|
18329
|
+
body: z73.string().trim().min(1).max(BUG_INCIDENT_NOTICE_BODY_MAX_CHARS),
|
|
18330
|
+
reportId: z73.string().uuid().optional()
|
|
18272
18331
|
}).strict();
|
|
18273
|
-
var ResolveBugIncidentNoticeOutputSchema =
|
|
18332
|
+
var ResolveBugIncidentNoticeOutputSchema = z73.object({ resolved: z73.boolean() });
|
|
18274
18333
|
|
|
18275
18334
|
// ../../packages/shared/dist/lib/bug-report-write.js
|
|
18276
18335
|
import { keccak256 as keccak2562, stringToBytes } from "viem";
|
|
@@ -18302,7 +18361,7 @@ function bugReportMeTooWriteChange(reportId) {
|
|
|
18302
18361
|
}
|
|
18303
18362
|
|
|
18304
18363
|
// ../../packages/shared/dist/schemas/listing-submission.schemas.js
|
|
18305
|
-
import { z as
|
|
18364
|
+
import { z as z74 } from "zod";
|
|
18306
18365
|
var LISTING_SUBMISSION_KINDS = ["catalog", "hook"];
|
|
18307
18366
|
var LISTING_SUBMISSION_STATUSES = ["pending", "approved", "rejected"];
|
|
18308
18367
|
var LISTING_SUBMISSION_REJECTION_MAX_CHARS = 2e3;
|
|
@@ -18312,74 +18371,74 @@ var CatalogSubmissionEntrySchema = CatalogX402EndpointEntrySchema.omit({
|
|
|
18312
18371
|
status: true,
|
|
18313
18372
|
addedAt: true
|
|
18314
18373
|
}).strict();
|
|
18315
|
-
var HookSubmissionManifestSchema =
|
|
18316
|
-
var SubmitCatalogEntryInputSchema =
|
|
18317
|
-
chainId:
|
|
18374
|
+
var HookSubmissionManifestSchema = z74.string().min(2).max(LISTING_SUBMISSION_MAX_BYTES);
|
|
18375
|
+
var SubmitCatalogEntryInputSchema = z74.object({
|
|
18376
|
+
chainId: z74.number().int().positive().optional(),
|
|
18318
18377
|
entry: CatalogSubmissionEntrySchema
|
|
18319
18378
|
}).extend(WalletWriteProofSchema.shape);
|
|
18320
|
-
var SubmitHookListingInputSchema =
|
|
18321
|
-
chainId:
|
|
18379
|
+
var SubmitHookListingInputSchema = z74.object({
|
|
18380
|
+
chainId: z74.number().int().positive().optional(),
|
|
18322
18381
|
manifest: HookSubmissionManifestSchema
|
|
18323
18382
|
}).extend(WalletWriteProofSchema.shape);
|
|
18324
|
-
var ListingSubmissionCheckSchema =
|
|
18325
|
-
name:
|
|
18326
|
-
outcome:
|
|
18327
|
-
detail:
|
|
18328
|
-
});
|
|
18329
|
-
var ListingSubmissionSchema =
|
|
18330
|
-
id:
|
|
18331
|
-
kind:
|
|
18383
|
+
var ListingSubmissionCheckSchema = z74.object({
|
|
18384
|
+
name: z74.string(),
|
|
18385
|
+
outcome: z74.enum(["pass", "fail", "inconclusive"]),
|
|
18386
|
+
detail: z74.string().nullable()
|
|
18387
|
+
});
|
|
18388
|
+
var ListingSubmissionSchema = z74.object({
|
|
18389
|
+
id: z74.string().uuid(),
|
|
18390
|
+
kind: z74.enum(LISTING_SUBMISSION_KINDS),
|
|
18332
18391
|
/** The catalog entry id, or `<chainId>:<lowercase hook address>`. */
|
|
18333
|
-
subject:
|
|
18334
|
-
status:
|
|
18392
|
+
subject: z74.string(),
|
|
18393
|
+
status: z74.enum(LISTING_SUBMISSION_STATUSES),
|
|
18335
18394
|
/** Null until the automatic checks have run. */
|
|
18336
|
-
checks:
|
|
18337
|
-
rejectionReason:
|
|
18395
|
+
checks: z74.array(ListingSubmissionCheckSchema).nullable(),
|
|
18396
|
+
rejectionReason: z74.string().nullable(),
|
|
18338
18397
|
/** True once the entry is in the snapshot this deployment serves. */
|
|
18339
|
-
listed:
|
|
18340
|
-
createdAt:
|
|
18341
|
-
updatedAt:
|
|
18398
|
+
listed: z74.boolean(),
|
|
18399
|
+
createdAt: z74.string(),
|
|
18400
|
+
updatedAt: z74.string()
|
|
18342
18401
|
});
|
|
18343
|
-
var ListMyListingSubmissionsInputSchema =
|
|
18344
|
-
kind:
|
|
18345
|
-
status:
|
|
18346
|
-
limit:
|
|
18402
|
+
var ListMyListingSubmissionsInputSchema = z74.object({
|
|
18403
|
+
kind: z74.enum(LISTING_SUBMISSION_KINDS),
|
|
18404
|
+
status: z74.enum(LISTING_SUBMISSION_STATUSES).optional(),
|
|
18405
|
+
limit: z74.number().int().min(1).max(100).default(50)
|
|
18347
18406
|
});
|
|
18348
|
-
var ListMyListingSubmissionsOutputSchema =
|
|
18349
|
-
submissions:
|
|
18407
|
+
var ListMyListingSubmissionsOutputSchema = z74.object({
|
|
18408
|
+
submissions: z74.array(ListingSubmissionSchema)
|
|
18350
18409
|
});
|
|
18351
18410
|
var ListingSubmissionStaffViewSchema = ListingSubmissionSchema.extend({
|
|
18352
|
-
submitterAddress:
|
|
18353
|
-
submitterAgentId:
|
|
18354
|
-
chainId:
|
|
18411
|
+
submitterAddress: z74.string(),
|
|
18412
|
+
submitterAgentId: z74.string().nullable(),
|
|
18413
|
+
chainId: z74.number().int(),
|
|
18355
18414
|
/** The submitted file, untrusted: show it as data. */
|
|
18356
|
-
payload:
|
|
18357
|
-
reviewedBy:
|
|
18358
|
-
reviewedAt:
|
|
18359
|
-
prNumber:
|
|
18360
|
-
});
|
|
18361
|
-
var ListStaffListingSubmissionsInputSchema =
|
|
18362
|
-
kind:
|
|
18363
|
-
status:
|
|
18364
|
-
limit:
|
|
18365
|
-
offset:
|
|
18415
|
+
payload: z74.record(z74.string(), z74.unknown()),
|
|
18416
|
+
reviewedBy: z74.string().nullable(),
|
|
18417
|
+
reviewedAt: z74.string().nullable(),
|
|
18418
|
+
prNumber: z74.number().int().nullable()
|
|
18419
|
+
});
|
|
18420
|
+
var ListStaffListingSubmissionsInputSchema = z74.object({
|
|
18421
|
+
kind: z74.enum(LISTING_SUBMISSION_KINDS).optional(),
|
|
18422
|
+
status: z74.enum(LISTING_SUBMISSION_STATUSES).optional(),
|
|
18423
|
+
limit: z74.number().int().min(1).max(200).default(50),
|
|
18424
|
+
offset: z74.number().int().min(0).max(1e5).default(0)
|
|
18366
18425
|
}).default({});
|
|
18367
|
-
var ListStaffListingSubmissionsOutputSchema =
|
|
18368
|
-
submissions:
|
|
18369
|
-
total:
|
|
18426
|
+
var ListStaffListingSubmissionsOutputSchema = z74.object({
|
|
18427
|
+
submissions: z74.array(ListingSubmissionStaffViewSchema),
|
|
18428
|
+
total: z74.number().int()
|
|
18370
18429
|
});
|
|
18371
|
-
var GetListingSubmissionInputSchema =
|
|
18372
|
-
var ApproveListingSubmissionInputSchema =
|
|
18373
|
-
var RecordListingSubmissionPrInputSchema =
|
|
18374
|
-
id:
|
|
18375
|
-
prNumber:
|
|
18430
|
+
var GetListingSubmissionInputSchema = z74.object({ id: z74.string().uuid() });
|
|
18431
|
+
var ApproveListingSubmissionInputSchema = z74.object({ id: z74.string().uuid() });
|
|
18432
|
+
var RecordListingSubmissionPrInputSchema = z74.object({
|
|
18433
|
+
id: z74.string().uuid(),
|
|
18434
|
+
prNumber: z74.number().int().positive()
|
|
18376
18435
|
});
|
|
18377
18436
|
var ListingSubmissionPrClosedInputSchema = RecordListingSubmissionPrInputSchema.extend({
|
|
18378
|
-
merged:
|
|
18437
|
+
merged: z74.boolean()
|
|
18379
18438
|
});
|
|
18380
|
-
var RejectListingSubmissionInputSchema =
|
|
18381
|
-
id:
|
|
18382
|
-
reason:
|
|
18439
|
+
var RejectListingSubmissionInputSchema = z74.object({
|
|
18440
|
+
id: z74.string().uuid(),
|
|
18441
|
+
reason: z74.string().trim().min(1).max(LISTING_SUBMISSION_REJECTION_MAX_CHARS)
|
|
18383
18442
|
});
|
|
18384
18443
|
var HIDDEN_CHARACTERS = (
|
|
18385
18444
|
// eslint-disable-next-line no-control-regex
|
|
@@ -18428,79 +18487,79 @@ function listingSubmissionWriteChange(kind, subject, payload) {
|
|
|
18428
18487
|
}
|
|
18429
18488
|
|
|
18430
18489
|
// ../../packages/shared/dist/schemas/user-skill-agent.schemas.js
|
|
18431
|
-
import { z as
|
|
18490
|
+
import { z as z75 } from "zod";
|
|
18432
18491
|
var AGENT_SKILL_REQUEST_BODY_LIMIT_BYTES = 1048576;
|
|
18433
18492
|
var agentSkillWriteBase = {
|
|
18434
18493
|
/** The owner's swarm wallet that signs; the backend resolves the owner from it. */
|
|
18435
18494
|
walletAddress: EthAddressSchema,
|
|
18436
18495
|
/** The hosted agent the write is made as; it must be one of that owner's live agents. */
|
|
18437
|
-
agentId:
|
|
18438
|
-
skillId:
|
|
18496
|
+
agentId: z75.string().uuid(),
|
|
18497
|
+
skillId: z75.string().uuid(),
|
|
18439
18498
|
/** One logical write: a resend with the same key and input returns the first result. */
|
|
18440
|
-
requestKey:
|
|
18499
|
+
requestKey: z75.string().uuid()
|
|
18441
18500
|
};
|
|
18442
|
-
var AgentUserSkillBundleWriteSchema =
|
|
18501
|
+
var AgentUserSkillBundleWriteSchema = z75.object({
|
|
18443
18502
|
...agentSkillWriteBase,
|
|
18444
18503
|
bundle: UserSkillDraftBundleSchema,
|
|
18445
|
-
note:
|
|
18504
|
+
note: z75.string().trim().max(500).default("")
|
|
18446
18505
|
});
|
|
18447
|
-
var AgentUserSkillArchiveWriteSchema =
|
|
18506
|
+
var AgentUserSkillArchiveWriteSchema = z75.object({
|
|
18448
18507
|
...agentSkillWriteBase,
|
|
18449
|
-
removeAssignments:
|
|
18508
|
+
removeAssignments: z75.boolean().default(false)
|
|
18450
18509
|
});
|
|
18451
18510
|
var AgentUserSkillCreateInputSchema = AgentUserSkillBundleWriteSchema.extend(WalletWriteProofSchema.shape).strict();
|
|
18452
18511
|
var AgentUserSkillArchiveInputSchema = AgentUserSkillArchiveWriteSchema.extend(WalletWriteProofSchema.shape).strict();
|
|
18453
|
-
var AgentUserSkillVersionResultSchema =
|
|
18454
|
-
skillId:
|
|
18455
|
-
version:
|
|
18456
|
-
revision:
|
|
18457
|
-
});
|
|
18458
|
-
var AgentUserSkillArchiveResultSchema =
|
|
18459
|
-
skillId:
|
|
18460
|
-
archived:
|
|
18461
|
-
revision:
|
|
18462
|
-
});
|
|
18463
|
-
var hostedAgentId =
|
|
18464
|
-
var HostedSkillCreateInputSchema =
|
|
18512
|
+
var AgentUserSkillVersionResultSchema = z75.object({
|
|
18513
|
+
skillId: z75.string().uuid(),
|
|
18514
|
+
version: z75.number().int().positive(),
|
|
18515
|
+
revision: z75.number().int().nonnegative()
|
|
18516
|
+
});
|
|
18517
|
+
var AgentUserSkillArchiveResultSchema = z75.object({
|
|
18518
|
+
skillId: z75.string().uuid(),
|
|
18519
|
+
archived: z75.literal(true),
|
|
18520
|
+
revision: z75.number().int().nonnegative()
|
|
18521
|
+
});
|
|
18522
|
+
var hostedAgentId = z75.string().uuid().optional();
|
|
18523
|
+
var HostedSkillCreateInputSchema = z75.object({
|
|
18465
18524
|
agentId: hostedAgentId,
|
|
18466
|
-
skillId:
|
|
18525
|
+
skillId: z75.string().uuid().optional(),
|
|
18467
18526
|
bundle: UserSkillDraftBundleSchema,
|
|
18468
|
-
note:
|
|
18527
|
+
note: z75.string().trim().max(500).optional()
|
|
18469
18528
|
}).strict();
|
|
18470
|
-
var HostedSkillVersionInputSchema =
|
|
18529
|
+
var HostedSkillVersionInputSchema = z75.object({
|
|
18471
18530
|
agentId: hostedAgentId,
|
|
18472
|
-
skillId:
|
|
18531
|
+
skillId: z75.string().uuid(),
|
|
18473
18532
|
bundle: UserSkillDraftBundleSchema,
|
|
18474
|
-
note:
|
|
18533
|
+
note: z75.string().trim().max(500).optional()
|
|
18475
18534
|
}).strict();
|
|
18476
|
-
var HostedSkillArchiveInputSchema =
|
|
18535
|
+
var HostedSkillArchiveInputSchema = z75.object({
|
|
18477
18536
|
agentId: hostedAgentId,
|
|
18478
|
-
skillId:
|
|
18479
|
-
removeAssignments:
|
|
18537
|
+
skillId: z75.string().uuid(),
|
|
18538
|
+
removeAssignments: z75.boolean().optional()
|
|
18480
18539
|
}).strict();
|
|
18481
18540
|
var HostedSkillImportInputSchema = UserSkillImportPreviewInputSchema.extend({
|
|
18482
18541
|
agentId: hostedAgentId,
|
|
18483
|
-
skillId:
|
|
18484
|
-
confirmExclusions:
|
|
18485
|
-
note:
|
|
18542
|
+
skillId: z75.string().uuid().optional(),
|
|
18543
|
+
confirmExclusions: z75.boolean().optional(),
|
|
18544
|
+
note: z75.string().trim().max(500).optional()
|
|
18486
18545
|
}).strict();
|
|
18487
|
-
var HostedSkillUpdateInputSchema =
|
|
18546
|
+
var HostedSkillUpdateInputSchema = z75.object({
|
|
18488
18547
|
agentId: hostedAgentId,
|
|
18489
|
-
skillId:
|
|
18490
|
-
confirmExclusions:
|
|
18491
|
-
note:
|
|
18548
|
+
skillId: z75.string().uuid(),
|
|
18549
|
+
confirmExclusions: z75.boolean().optional(),
|
|
18550
|
+
note: z75.string().trim().max(500).optional()
|
|
18492
18551
|
}).strict();
|
|
18493
|
-
var HostedSkillListInputSchema =
|
|
18494
|
-
var HostedSkillShowInputSchema =
|
|
18552
|
+
var HostedSkillListInputSchema = z75.object({ agentId: hostedAgentId }).strict();
|
|
18553
|
+
var HostedSkillShowInputSchema = z75.object({
|
|
18495
18554
|
agentId: hostedAgentId,
|
|
18496
|
-
skillId:
|
|
18497
|
-
version:
|
|
18498
|
-
path:
|
|
18499
|
-
offset:
|
|
18555
|
+
skillId: z75.string().uuid(),
|
|
18556
|
+
version: z75.number().int().positive().optional(),
|
|
18557
|
+
path: z75.string().min(1).max(240).optional(),
|
|
18558
|
+
offset: z75.number().int().nonnegative().optional()
|
|
18500
18559
|
}).strict();
|
|
18501
|
-
var HostedSkillSourceSummarySchema =
|
|
18502
|
-
|
|
18503
|
-
|
|
18560
|
+
var HostedSkillSourceSummarySchema = z75.discriminatedUnion("kind", [
|
|
18561
|
+
z75.object({ kind: z75.literal("upload") }),
|
|
18562
|
+
z75.object({ kind: z75.literal("agent"), agentId: z75.string().uuid() }),
|
|
18504
18563
|
UserSkillGithubSourceSchema.pick({
|
|
18505
18564
|
kind: true,
|
|
18506
18565
|
repo: true,
|
|
@@ -18510,32 +18569,32 @@ var HostedSkillSourceSummarySchema = z74.discriminatedUnion("kind", [
|
|
|
18510
18569
|
license: true
|
|
18511
18570
|
})
|
|
18512
18571
|
]);
|
|
18513
|
-
var HostedSkillShareInputSchema =
|
|
18572
|
+
var HostedSkillShareInputSchema = z75.object({
|
|
18514
18573
|
agentId: hostedAgentId,
|
|
18515
|
-
skillId:
|
|
18516
|
-
version:
|
|
18574
|
+
skillId: z75.string().uuid(),
|
|
18575
|
+
version: z75.number().int().positive().optional(),
|
|
18517
18576
|
/** The receiving agent: this agent's own ID, or another live agent of the same owner. */
|
|
18518
|
-
toAgentId:
|
|
18577
|
+
toAgentId: z75.string().uuid()
|
|
18519
18578
|
}).strict();
|
|
18520
|
-
var AgentUserSkillShareWriteSchema =
|
|
18521
|
-
agentId:
|
|
18522
|
-
skillId:
|
|
18523
|
-
version:
|
|
18524
|
-
toAgentId:
|
|
18525
|
-
requestKey:
|
|
18526
|
-
});
|
|
18527
|
-
var AgentUserSkillShareResultSchema =
|
|
18528
|
-
skillId:
|
|
18529
|
-
version:
|
|
18530
|
-
toAgentId:
|
|
18531
|
-
status:
|
|
18532
|
-
requestId:
|
|
18579
|
+
var AgentUserSkillShareWriteSchema = z75.object({
|
|
18580
|
+
agentId: z75.string().uuid(),
|
|
18581
|
+
skillId: z75.string().uuid(),
|
|
18582
|
+
version: z75.number().int().positive().optional(),
|
|
18583
|
+
toAgentId: z75.string().uuid(),
|
|
18584
|
+
requestKey: z75.string().uuid()
|
|
18585
|
+
});
|
|
18586
|
+
var AgentUserSkillShareResultSchema = z75.object({
|
|
18587
|
+
skillId: z75.string().uuid(),
|
|
18588
|
+
version: z75.number().int().positive(),
|
|
18589
|
+
toAgentId: z75.string().uuid(),
|
|
18590
|
+
status: z75.enum(["assigned", "pending"]),
|
|
18591
|
+
requestId: z75.string().uuid().nullable(),
|
|
18533
18592
|
/**
|
|
18534
18593
|
* Issue #4461: true when the version holds text from outside the owner (imported from GitHub, or
|
|
18535
18594
|
* saved in a turn that handled untrusted content), so even a share with the agent itself or a
|
|
18536
18595
|
* share in free mode waits for the owner's approval.
|
|
18537
18596
|
*/
|
|
18538
|
-
untrustedContent:
|
|
18597
|
+
untrustedContent: z75.literal(true).optional()
|
|
18539
18598
|
});
|
|
18540
18599
|
|
|
18541
18600
|
// ../../packages/shared/dist/lib/user-skill-write.js
|
|
@@ -19336,7 +19395,7 @@ function piCodingAgentTools(options) {
|
|
|
19336
19395
|
}
|
|
19337
19396
|
|
|
19338
19397
|
// ../../packages/shared/dist/task-templates/templates.js
|
|
19339
|
-
import { z as
|
|
19398
|
+
import { z as z76 } from "zod";
|
|
19340
19399
|
|
|
19341
19400
|
// ../../packages/shared/dist/task-templates/catalogue.js
|
|
19342
19401
|
var taskTemplateCatalogue = [
|
|
@@ -20668,38 +20727,38 @@ var BRIEF_HEADINGS = [
|
|
|
20668
20727
|
"Boundaries",
|
|
20669
20728
|
"How selection works"
|
|
20670
20729
|
];
|
|
20671
|
-
var tokenSchema =
|
|
20672
|
-
key:
|
|
20673
|
-
label:
|
|
20674
|
-
placeholder:
|
|
20675
|
-
defaultValue:
|
|
20676
|
-
required:
|
|
20730
|
+
var tokenSchema = z76.object({
|
|
20731
|
+
key: z76.string().regex(/^[a-z][a-zA-Z0-9]*$/),
|
|
20732
|
+
label: z76.string().min(1),
|
|
20733
|
+
placeholder: z76.string().min(1),
|
|
20734
|
+
defaultValue: z76.string().min(1).optional(),
|
|
20735
|
+
required: z76.boolean()
|
|
20677
20736
|
}).strict();
|
|
20678
|
-
var readinessItemSchema =
|
|
20679
|
-
key:
|
|
20680
|
-
label:
|
|
20681
|
-
help:
|
|
20682
|
-
input:
|
|
20683
|
-
placeholder:
|
|
20684
|
-
defaultValue:
|
|
20685
|
-
publicAccess:
|
|
20686
|
-
required:
|
|
20737
|
+
var readinessItemSchema = z76.object({
|
|
20738
|
+
key: z76.string().regex(/^[a-z][a-zA-Z0-9]*$/),
|
|
20739
|
+
label: z76.string().min(1),
|
|
20740
|
+
help: z76.string().min(1),
|
|
20741
|
+
input: z76.enum(["shortText", "longText", "url"]),
|
|
20742
|
+
placeholder: z76.string().min(1),
|
|
20743
|
+
defaultValue: z76.string().min(1).optional(),
|
|
20744
|
+
publicAccess: z76.enum(["required", "notApplicable"]),
|
|
20745
|
+
required: z76.boolean()
|
|
20687
20746
|
}).strict().superRefine((item, ctx) => {
|
|
20688
20747
|
if (item.publicAccess === "required" && item.input !== "url") {
|
|
20689
20748
|
ctx.addIssue({
|
|
20690
|
-
code:
|
|
20749
|
+
code: z76.ZodIssueCode.custom,
|
|
20691
20750
|
message: "Public-access readiness items must use a URL input.",
|
|
20692
20751
|
path: ["input"]
|
|
20693
20752
|
});
|
|
20694
20753
|
}
|
|
20695
20754
|
});
|
|
20696
|
-
var briefSectionSchemas = BRIEF_HEADINGS.map((heading) =>
|
|
20697
|
-
var baseTemplateSchema =
|
|
20698
|
-
id:
|
|
20699
|
-
label:
|
|
20700
|
-
shortDescription:
|
|
20701
|
-
titleTemplate:
|
|
20702
|
-
icon:
|
|
20755
|
+
var briefSectionSchemas = BRIEF_HEADINGS.map((heading) => z76.object({ heading: z76.literal(heading), body: z76.string().min(1) }).strict());
|
|
20756
|
+
var baseTemplateSchema = z76.object({
|
|
20757
|
+
id: z76.enum(TASK_TEMPLATE_IDS),
|
|
20758
|
+
label: z76.string().min(1),
|
|
20759
|
+
shortDescription: z76.string().min(1),
|
|
20760
|
+
titleTemplate: z76.string().min(1),
|
|
20761
|
+
icon: z76.enum([
|
|
20703
20762
|
"activity",
|
|
20704
20763
|
"bug",
|
|
20705
20764
|
"chart",
|
|
@@ -20717,37 +20776,37 @@ var baseTemplateSchema = z75.object({
|
|
|
20717
20776
|
"sparkles",
|
|
20718
20777
|
"transfer"
|
|
20719
20778
|
]),
|
|
20720
|
-
motif:
|
|
20721
|
-
durationHours:
|
|
20722
|
-
tags:
|
|
20723
|
-
bestFor:
|
|
20724
|
-
details:
|
|
20725
|
-
tokens:
|
|
20726
|
-
readiness:
|
|
20727
|
-
brief:
|
|
20779
|
+
motif: z76.enum(["grid", "rays", "rings", "signal", "steps"]),
|
|
20780
|
+
durationHours: z76.number().int().min(24).max(720),
|
|
20781
|
+
tags: z76.array(z76.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)).min(3).max(5).refine((tags) => new Set(tags).size === tags.length, "Template tags must be unique."),
|
|
20782
|
+
bestFor: z76.tuple([z76.string().min(1), z76.string().min(1), z76.string().min(1)]),
|
|
20783
|
+
details: z76.object({ includes: z76.string().min(1), success: z76.string().min(1) }).strict(),
|
|
20784
|
+
tokens: z76.array(tokenSchema).min(2).max(3),
|
|
20785
|
+
readiness: z76.array(readinessItemSchema).min(1).max(3),
|
|
20786
|
+
brief: z76.tuple(briefSectionSchemas).readonly()
|
|
20728
20787
|
}).strict();
|
|
20729
|
-
var catalogueSchema =
|
|
20730
|
-
baseTemplateSchema.extend({ mode:
|
|
20788
|
+
var catalogueSchema = z76.array(z76.discriminatedUnion("mode", [
|
|
20789
|
+
baseTemplateSchema.extend({ mode: z76.literal("bounty") }),
|
|
20731
20790
|
baseTemplateSchema.extend({
|
|
20732
|
-
mode:
|
|
20733
|
-
modeDefaults:
|
|
20791
|
+
mode: z76.literal("claim"),
|
|
20792
|
+
modeDefaults: z76.object({ stakeRequired: z76.literal(false), stakeBps: z76.literal("0") }).strict()
|
|
20734
20793
|
}),
|
|
20735
20794
|
baseTemplateSchema.extend({
|
|
20736
|
-
mode:
|
|
20737
|
-
modeDefaults:
|
|
20795
|
+
mode: z76.literal("pitch"),
|
|
20796
|
+
modeDefaults: z76.object({ pitchDeadline: z76.string().regex(/^[1-9]\d*$/) }).strict()
|
|
20738
20797
|
}),
|
|
20739
20798
|
baseTemplateSchema.extend({
|
|
20740
|
-
mode:
|
|
20741
|
-
modeDefaults:
|
|
20742
|
-
metricDescription:
|
|
20743
|
-
metricTarget:
|
|
20799
|
+
mode: z76.literal("benchmark"),
|
|
20800
|
+
modeDefaults: z76.object({
|
|
20801
|
+
metricDescription: z76.string().min(1),
|
|
20802
|
+
metricTarget: z76.string().min(1)
|
|
20744
20803
|
}).strict()
|
|
20745
20804
|
}),
|
|
20746
20805
|
baseTemplateSchema.extend({
|
|
20747
|
-
mode:
|
|
20748
|
-
modeDefaults:
|
|
20749
|
-
auctionType:
|
|
20750
|
-
bidDeadline:
|
|
20806
|
+
mode: z76.literal("auction"),
|
|
20807
|
+
modeDefaults: z76.object({
|
|
20808
|
+
auctionType: z76.enum(["english", "reverse_english"]),
|
|
20809
|
+
bidDeadline: z76.string().regex(/^[1-9]\d*$/)
|
|
20751
20810
|
}).strict()
|
|
20752
20811
|
})
|
|
20753
20812
|
]));
|
|
@@ -20940,6 +20999,8 @@ export {
|
|
|
20940
20999
|
AgentChainsResponseSchema,
|
|
20941
21000
|
SERVICE_HIRE_ACCEPT_POLICIES,
|
|
20942
21001
|
ServiceHireAcceptPolicySchema,
|
|
21002
|
+
HIRE_OWNER_CONFIRMS_NOTICE,
|
|
21003
|
+
ownerConfirmsHire,
|
|
20943
21004
|
AGENT_LISTING_LIMITS,
|
|
20944
21005
|
CAPABILITY_LIMIT_MESSAGE,
|
|
20945
21006
|
AgentListingChangeSchema,
|