@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.
Files changed (25) hide show
  1. package/dist/agent-compatibility.json +1 -1
  2. package/dist/{api-YDCOGL5P.js → api-Z62WOOLX.js} +2 -2
  3. package/dist/{channels-K4AKXBRM.js → channels-GBQLRNED.js} +4 -4
  4. package/dist/{chunk-O56EUZVG.js → chunk-523X35HE.js} +4 -4
  5. package/dist/{chunk-CBLGBZ67.js → chunk-6UDGOZHP.js} +3 -3
  6. package/dist/{chunk-5EUSU7QA.js → chunk-G4MAYAZW.js} +13 -25
  7. package/dist/{chunk-LC5VE4EQ.js → chunk-JAFX6DHV.js} +1313 -1252
  8. package/dist/{chunk-VQ6X6FME.js → chunk-K3Y73YWH.js} +2 -2
  9. package/dist/{chunk-7OC73WUN.js → chunk-KU66VTU6.js} +1 -1
  10. package/dist/{chunk-YCWWBCXW.js → chunk-LZ2P3FIL.js} +5 -5
  11. package/dist/{chunk-LL2SVODK.js → chunk-N5L4URHF.js} +1 -1
  12. package/dist/{chunk-JPAOL63U.js → chunk-PXQP62WF.js} +3 -3
  13. package/dist/{chunk-HZ6KGGNX.js → chunk-QSOEZINA.js} +8 -8
  14. package/dist/{chunk-CCK7JYVX.js → chunk-RMK5EAPR.js} +1 -1
  15. package/dist/{chunk-DE5YYAHJ.js → chunk-XREEFYEQ.js} +6 -2
  16. package/dist/{doctor-UA5ST7KE.js → doctor-3LW4N6KW.js} +9 -9
  17. package/dist/index.js +46 -21
  18. package/dist/{launch-TMSW4WPX.js → launch-2YOUARKA.js} +11 -11
  19. package/dist/pi-extensions/xgate.cjs +19 -10
  20. package/dist/{read-auth-PN6FJNKK.js → read-auth-IBCYKPKD.js} +3 -3
  21. package/dist/{reconcile-VVNRBYY7.js → reconcile-7DVTUPJ6.js} +4 -4
  22. package/dist/{status-VQ7V3CIS.js → status-3GNXUWOL.js} +9 -9
  23. package/dist/{sync-pull-UKSVJFMY.js → sync-pull-MIEB5XAF.js} +4 -4
  24. package/dist/{task-access-grants-QBORD7RL.js → task-access-grants-5B3CSCP4.js} +2 -2
  25. 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
- "minimax/minimax-m3": openRouterRate("minimax/minimax-m3", "0.55", "0.06", "2.2", "2026-11-20"),
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
- "moonshotai/kimi-k3": openRouterRate("moonshotai/kimi-k3", "3", "0.5", "18", "2026-11-20"),
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, or a hosted agent at its daily hire offer cap) and is unlikely to accept.
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 z56 } from "zod";
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 = z56.string().superRefine((value, ctx) => {
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: z56.ZodIssueCode.custom,
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 = z56.enum(SHOP_THEME_PRESETS);
11800
+ var ShopThemePresetSchema = z57.enum(SHOP_THEME_PRESETS);
11752
11801
  var SHOP_BG_PATTERNS = ["none", "dashed", "dotted"];
11753
- var ShopBgPatternSchema = z56.enum(SHOP_BG_PATTERNS);
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 = z56.enum(SHOP_STICKER_IDS);
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 = z56.enum(SHOP_STICKER_POSITIONS);
11774
- var ShopStickerSchema = z56.object({
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 = z56.string().max(SHOP_MARQUEE_MAX).refine(isSafeSingleLine, "Invalid characters");
11779
- var ShopAccentTaglineSchema = z56.string().max(SHOP_ACCENT_TAGLINE_MAX).refine(isSafeSingleLine, "Invalid characters");
11780
- var ShopCanvasSchema = z56.object({
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: z56.array(ShopStickerSchema).max(SHOP_STICKERS_MAX).default([])
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 = z56.enum(SHOP_CREW_STATUSES);
11789
- var ShopCrewMemberSchema = z56.object({
11790
- agentId: z56.string().min(1).max(128),
11791
- name: z56.string().min(1).max(100),
11792
- roleLabel: z56.string().max(60),
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: z56.boolean(),
11795
- skills: z56.array(z56.string()),
11843
+ visible: z57.boolean(),
11844
+ skills: z57.array(z57.string()),
11796
11845
  status: ShopCrewStatusSchema
11797
11846
  });
11798
- var ShopSampleSchema = z56.object({
11799
- id: z56.string().uuid(),
11800
- walletAddress: z56.string(),
11801
- serviceId: z56.string().uuid().nullable(),
11802
- title: z56.string().min(1).max(120),
11803
- promptExcerpt: z56.string().min(1).max(1e3),
11804
- deliverableSummary: z56.string().min(1).max(2e3),
11805
- artifactKeys: z56.array(z56.string()),
11806
- isSample: z56.literal(true),
11807
- position: z56.number().int().min(0),
11808
- createdAt: z56.string()
11809
- });
11810
- var ShopGuestbookEntrySchema = z56.object({
11811
- id: z56.string().uuid(),
11812
- walletAddress: z56.string(),
11813
- authorDisplayName: z56.string().min(1).max(80),
11814
- authorAddress: z56.string().nullable(),
11815
- body: z56.string().min(1).max(SHOP_GUESTBOOK_BODY_MAX),
11816
- createdAt: z56.string()
11817
- });
11818
- var ShopWebringEntrySchema = z56.object({
11819
- neighborWalletAddress: z56.string(),
11820
- neighborHandle: z56.string().nullable(),
11821
- neighborDisplayName: z56.string(),
11822
- endorsement: z56.string().max(160),
11823
- position: z56.number().int().min(0)
11824
- });
11825
- var ShopBoothViewSchema = z56.object({
11826
- title: z56.string().min(1).max(120),
11827
- html: z56.string(),
11828
- bytes: z56.number().int().min(1).max(SHOP_BOOTH_MAX_BYTES),
11829
- updatedAt: z56.string()
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 = z56.enum(SHOP_BOOTH_DRAFT_STATUSES);
11881
+ var ShopBoothDraftStatusSchema = z57.enum(SHOP_BOOTH_DRAFT_STATUSES);
11833
11882
  var SHOP_BOOTH_TURN_TRUSTS = ["owner", "agent", "tainted"];
11834
- var ShopBoothTurnTrustSchema = z56.enum(SHOP_BOOTH_TURN_TRUSTS);
11835
- var ShopBoothDraftSchema = z56.object({
11836
- id: z56.string().uuid(),
11837
- agentId: z56.string().nullable(),
11838
- title: z56.string().min(1).max(120),
11839
- htmlContent: z56.string(),
11840
- bytes: z56.number().int().min(1).max(SHOP_BOOTH_MAX_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: z56.string(),
11844
- decidedAt: z56.string().nullable()
11892
+ createdAt: z57.string(),
11893
+ decidedAt: z57.string().nullable()
11845
11894
  });
11846
11895
  var SHOP_TROPHY_TIERS = ["bronze", "silver", "gold"];
11847
- var ShopTrophyTierSchema = z56.enum(SHOP_TROPHY_TIERS);
11848
- var ShopTrophySchema = z56.object({
11849
- id: z56.string(),
11850
- label: z56.string(),
11851
- description: z56.string(),
11852
- unlockedAt: z56.string().nullable(),
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 = z56.enum(SHOP_ENTITLEMENT_STATUSES);
11857
- var ShopEntitlementsSchema = z56.object({
11905
+ var ShopEntitlementStatusSchema = z57.enum(SHOP_ENTITLEMENT_STATUSES);
11906
+ var ShopEntitlementsSchema = z57.object({
11858
11907
  status: ShopEntitlementStatusSchema,
11859
11908
  planId: HostedCreditPlanIdSchema.nullable(),
11860
- canUseHandle: z56.boolean(),
11861
- canUseCustomCanvas: z56.boolean(),
11862
- canUseInteractiveBooth: z56.boolean(),
11863
- maxSamples: z56.number().int().nonnegative(),
11864
- maxCrewVisible: z56.number().int().nonnegative(),
11865
- graceUntil: z56.string().nullable()
11866
- });
11867
- var ShopPnlSummarySchema = z56.object({
11868
- earningsByChain: z56.array(z56.object({
11869
- chainId: z56.number().int(),
11870
- amountBaseUnits: z56.string()
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: z56.number().int().nonnegative(),
11873
- acceptanceRate: z56.number().min(0).max(1).nullable(),
11874
- creditsSpent30d: z56.number().nonnegative(),
11875
- creditsSpentAllTime: z56.number().nonnegative(),
11876
- activeHiresCount: z56.number().int().nonnegative()
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 = z56.enum(SHOP_HANDLE_STATUSES);
11880
- var AgentShopfrontPublicSchema = z56.object({
11881
- walletAddress: z56.string(),
11882
- handle: z56.string().nullable(),
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: z56.array(ShopCrewMemberSchema),
11887
- samples: z56.array(ShopSampleSchema),
11935
+ crew: z57.array(ShopCrewMemberSchema),
11936
+ samples: z57.array(ShopSampleSchema),
11888
11937
  booth: ShopBoothViewSchema.nullable(),
11889
- webring: z56.array(ShopWebringEntrySchema),
11890
- trophies: z56.array(ShopTrophySchema),
11891
- guestbookEnabled: z56.boolean(),
11892
- guestbookCount: z56.number().int().nonnegative(),
11893
- hitCounterEnabled: z56.boolean(),
11894
- visitCount: z56.number().int().nonnegative()
11895
- });
11896
- var ShopSetupChecklistSchema = z56.object({
11897
- walletReady: z56.boolean(),
11898
- identityRegistered: z56.boolean(),
11899
- freeMarketAccess: z56.boolean(),
11900
- listingPublished: z56.boolean(),
11901
- hasService: z56.boolean()
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 = z56.enum(SHOP_PRACTICE_RUN_STATUSES);
11911
- var ShopPracticeRunSchema = z56.object({
11912
- jobId: z56.string(),
11913
- agentId: z56.string(),
11914
- agentName: z56.string(),
11915
- serviceTitle: z56.string().nullable(),
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: z56.string(),
11918
- resultExcerpt: z56.string().nullable(),
11919
- artifactKeys: z56.array(z56.string()),
11920
- createdAt: z56.string()
11921
- });
11922
- var OwnerShopfrontViewSchema = z56.object({
11923
- walletAddress: z56.string().nullable(),
11924
- handle: z56.string().nullable(),
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: z56.string().nullable(),
11975
+ graceUntil: z57.string().nullable(),
11927
11976
  entitlements: ShopEntitlementsSchema,
11928
11977
  canvas: ShopCanvasSchema,
11929
- guestbookEnabled: z56.boolean(),
11930
- hitCounterEnabled: z56.boolean(),
11931
- visitCount: z56.number().int().nonnegative(),
11932
- crew: z56.array(ShopCrewMemberSchema),
11933
- samples: z56.array(ShopSampleSchema),
11934
- webring: z56.array(ShopWebringEntrySchema),
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: z56.array(ShopBoothDraftSchema),
11985
+ boothDrafts: z57.array(ShopBoothDraftSchema),
11937
11986
  setupChecklist: ShopSetupChecklistSchema,
11938
- recentPracticeHires: z56.array(ShopPracticeRunSchema).optional()
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 = z56.object({
11941
- handle: z56.string().min(1).max(64)
11991
+ var ShopHandleResolveInputSchema = z57.object({
11992
+ handle: z57.string().min(1).max(64)
11942
11993
  });
11943
- var ShopHandleResolveResultSchema = z56.object({
11944
- handle: z56.string(),
11945
- walletAddress: z56.string(),
11946
- status: z56.enum(["active", "grace"]),
11947
- graceUntil: z56.string().nullable()
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 = z56.object({
12000
+ var ShopPublicGetInputSchema = z57.object({
11950
12001
  address: EthAddressSchema
11951
12002
  });
11952
- var ShopRecordVisitInputSchema = z56.object({
12003
+ var ShopRecordVisitInputSchema = z57.object({
11953
12004
  address: EthAddressSchema
11954
12005
  });
11955
- var ShopRecordVisitResultSchema = z56.object({
11956
- visitCount: z56.number().int().nonnegative()
12006
+ var ShopRecordVisitResultSchema = z57.object({
12007
+ visitCount: z57.number().int().nonnegative()
11957
12008
  });
11958
- var ShopHandleSetInputSchema = z56.object({
12009
+ var ShopHandleSetInputSchema = z57.object({
11959
12010
  handle: ShopHandleSchema
11960
12011
  }).strict();
11961
- var ShopConfigUpdateInputSchema = z56.object({
12012
+ var ShopConfigUpdateInputSchema = z57.object({
11962
12013
  canvas: ShopCanvasSchema.optional(),
11963
- guestbookEnabled: z56.boolean().optional(),
11964
- hitCounterEnabled: z56.boolean().optional()
12014
+ guestbookEnabled: z57.boolean().optional(),
12015
+ hitCounterEnabled: z57.boolean().optional()
11965
12016
  }).strict();
11966
- var ShopCrewUpdateInputSchema = z56.object({
11967
- members: z56.array(z56.object({
11968
- agentId: z56.string().min(1).max(128),
11969
- visible: z56.boolean(),
11970
- roleLabel: z56.string().max(60).refine(isSafeSingleLine, "Invalid characters")
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 = z56.object({
11974
- serviceId: z56.string().uuid().nullable().optional(),
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: z56.array(z56.string().min(1).max(512)).max(10).optional().default([])
12029
+ artifactKeys: z57.array(z57.string().min(1).max(512)).max(10).optional().default([])
11979
12030
  }).strict();
11980
- var ShopSampleRemoveInputSchema = z56.object({
11981
- sampleId: z56.string().uuid()
12031
+ var ShopSampleRemoveInputSchema = z57.object({
12032
+ sampleId: z57.string().uuid()
11982
12033
  }).strict();
11983
- var ShopPracticeHireInputSchema = z56.object({
11984
- serviceId: z56.string().uuid().optional(),
11985
- agentId: z56.string().min(1).max(128).optional(),
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 = z56.object({
11989
- jobId: z56.string(),
11990
- agentId: z56.string()
12039
+ var ShopPracticeHireResultSchema = z57.object({
12040
+ jobId: z57.string(),
12041
+ agentId: z57.string()
11991
12042
  });
11992
- var ShopPracticeRunsListInputSchema = z56.object({
11993
- limit: coerceNumber(z56.number().int().min(1).max(20)).default(5)
12043
+ var ShopPracticeRunsListInputSchema = z57.object({
12044
+ limit: coerceNumber(z57.number().int().min(1).max(20)).default(5)
11994
12045
  }).optional();
11995
- var ShopTasteCaptureInputSchema = z56.object({
11996
- agentId: z56.string().min(1).max(128).optional(),
11997
- target: z56.enum(["instructions", "core"]).default("instructions"),
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 = z56.object({
12002
- scope: z56.enum(["swarm", "agent"]),
12003
- path: z56.string(),
12004
- version: z56.number().int().positive()
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 = z56.object({
12007
- entries: z56.array(z56.object({
12057
+ var ShopWebringSetInputSchema = z57.object({
12058
+ entries: z57.array(z57.object({
12008
12059
  neighborWalletAddress: EthAddressSchema,
12009
- endorsement: z56.string().max(160).refine(isSafeSingleLine, "Invalid characters")
12060
+ endorsement: z57.string().max(160).refine(isSafeSingleLine, "Invalid characters")
12010
12061
  }).strict()).max(SHOP_WEBRING_MAX)
12011
12062
  }).strict();
12012
- var ShopGuestbookPostInputSchema = z56.object({
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 = z56.object({
12068
+ var ShopGuestbookListInputSchema = z57.object({
12018
12069
  address: EthAddressSchema,
12019
- limit: coerceNumber(z56.number().int().min(1).max(50)).default(20),
12020
- cursor: z56.string().min(1).max(256).optional()
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 = z56.object({
12023
- entries: z56.array(ShopGuestbookEntrySchema),
12024
- nextCursor: z56.string().nullable(),
12025
- hasMore: z56.boolean()
12073
+ var ShopGuestbookListResultSchema = z57.object({
12074
+ entries: z57.array(ShopGuestbookEntrySchema),
12075
+ nextCursor: z57.string().nullable(),
12076
+ hasMore: z57.boolean()
12026
12077
  });
12027
- var ShopGuestbookDeleteInputSchema = z56.object({
12078
+ var ShopGuestbookDeleteInputSchema = z57.object({
12028
12079
  address: EthAddressSchema,
12029
- entryId: z56.string().uuid()
12080
+ entryId: z57.string().uuid()
12030
12081
  }).strict();
12031
- var ShopGuestbookModerateInputSchema = z56.object({
12032
- entryId: z56.string().uuid()
12082
+ var ShopGuestbookModerateInputSchema = z57.object({
12083
+ entryId: z57.string().uuid()
12033
12084
  }).strict();
12034
- var ShopBoothDraftCreateInputSchema = z56.object({
12035
- agentId: z56.string().min(1).max(128).optional(),
12085
+ var ShopBoothDraftCreateInputSchema = z57.object({
12086
+ agentId: z57.string().min(1).max(128).optional(),
12036
12087
  title: safeRequiredSingleLine(120),
12037
- htmlContent: z56.string().min(1)
12088
+ htmlContent: z57.string().min(1)
12038
12089
  }).strict();
12039
- var ShopBoothDraftDecideInputSchema = z56.object({
12040
- draftId: z56.string().uuid(),
12041
- decision: z56.enum(["approve", "reject"])
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 z58 } from "zod";
12096
+ import { z as z59 } from "zod";
12046
12097
 
12047
12098
  // ../../packages/shared/dist/schemas/brief-research.schemas.js
12048
- import { z as z57 } from "zod";
12049
- var WorkingBriefSectionSchema = z57.enum([
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 = z57.string().max(2e3);
12062
- var WorkingBriefSchema = z57.object({
12063
- title: z57.string().max(200),
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: z57.array(z57.string().min(1).max(100)).max(12)
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 = z57.object({
12090
- id: z57.string().min(1).max(100),
12091
- url: z57.string().max(2e3).transform((value, context) => {
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: z57.ZodIssueCode.custom,
12146
+ code: z58.ZodIssueCode.custom,
12096
12147
  message: "Use a public HTTP(S) source URL"
12097
12148
  });
12098
- return z57.NEVER;
12149
+ return z58.NEVER;
12099
12150
  }
12100
12151
  return normalized;
12101
12152
  }),
12102
- title: z57.string().min(1).max(300),
12103
- retrievedAt: z57.string().datetime(),
12104
- finding: z57.string().max(1500)
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 = z57.array(BriefEvidenceSchema).max(12).superRefine((items, context) => {
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: z57.ZodIssueCode.custom,
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 = z57.object({
12120
- id: z57.string().min(1).max(100),
12170
+ var BriefDecisionSchema = z58.object({
12171
+ id: z58.string().min(1).max(100),
12121
12172
  section: WorkingBriefSectionSchema,
12122
12173
  value: section,
12123
- origin: z57.enum(["manual", "confirmed"]),
12124
- revision: z57.number().int().nonnegative(),
12125
- supersedes: z57.string().nullable(),
12126
- releasedByTurnId: z57.string().uuid().optional()
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 = z57.array(BriefDecisionSchema).max(10).superRefine((items, context) => {
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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 = z57.array(BriefDecisionSchema).max(200).superRefine((items, context) => {
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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: z57.ZodIssueCode.custom,
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 = z57.enum([
12260
+ var BriefResearchStatusSchema = z58.enum([
12210
12261
  "researched",
12211
12262
  "not_needed",
12212
12263
  "unavailable",
12213
12264
  "disabled"
12214
12265
  ]);
12215
- var BriefPhaseSchema = z57.enum(["planning", "researching", "drafting"]);
12216
- var BriefUsageEventSchema = z57.object({
12266
+ var BriefPhaseSchema = z58.enum(["planning", "researching", "drafting"]);
12267
+ var BriefUsageEventSchema = z58.object({
12217
12268
  stage: BriefPhaseSchema,
12218
- status: z57.enum(["dispatched", "reported"]),
12219
- inputTokens: z57.number().int().nonnegative().max(1e7).optional(),
12220
- outputTokens: z57.number().int().nonnegative().max(1e7).optional(),
12221
- searchCalls: z57.number().int().min(0).max(2).optional()
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 = z58.string().max(2e3);
12226
- var BriefFormValuesObjectSchema = z58.object({
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: z58.string().max(TASK_DESCRIPTION_MAX_LENGTH),
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: z58.boolean(),
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: z58.enum(["public", "unlisted", "private"]),
12247
- submissionVisibility: z58.enum(["public", "reveal_all", "winner_only", "never"]),
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: z58.enum(["none", "existing", "new"]),
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 = z58.preprocess(withoutLegacyHookFields, BriefFormValuesObjectSchema);
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 = z58.object({
12280
- prompt: z58.string().trim().min(1).max(500),
12281
- options: z58.array(z58.string().trim().min(1).max(80)).min(2).max(4),
12282
- allowSkip: z58.boolean()
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 = z58.object({
12285
- role: z58.enum(["user", "assistant"]),
12286
- content: z58.string().max(BRIEF_MESSAGE_MAX_LENGTH),
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 = z58.object({
12299
- message: z58.string().min(1).max(BRIEF_MESSAGE_MAX_LENGTH),
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 = z58.object({
12307
- id: z58.string().uuid(),
12308
- revision: z58.number().int().nonnegative(),
12357
+ var BriefSessionViewSchema = z59.object({
12358
+ id: z59.string().uuid(),
12359
+ revision: z59.number().int().nonnegative(),
12309
12360
  values: BriefFormValuesSchema,
12310
- originalRequest: z58.string().max(TASK_DESCRIPTION_MAX_LENGTH).optional(),
12311
- messages: z58.array(BriefMessageSchema).max(BRIEF_MAX_TURNS * 2),
12312
- claimed: z58.boolean(),
12313
- expiresAt: z58.string().datetime(),
12314
- turnsRemaining: z58.number().int().nonnegative(),
12315
- pending: z58.boolean(),
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 = z58.object({
12326
- agentId: z58.string().uuid(),
12327
- startsAt: z58.string().datetime(),
12328
- endsAt: z58.string().datetime(),
12329
- available: z58.string(),
12330
- status: z58.enum(["active", "working", "exhausted", "expired", "converted"]),
12331
- transcript: z58.array(BriefMessageSchema).max(BRIEF_MAX_TURNS * 2)
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 = z58.object({ revision: z58.number().int().nonnegative() });
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: z58.array(WorkingBriefSectionSchema).max(10).optional()
12388
+ confirmSections: z59.array(WorkingBriefSectionSchema).max(10).optional()
12338
12389
  });
12339
12390
  var BriefTurnSchema = BriefRevisionSchema.extend({
12340
- turnId: z58.string().uuid(),
12341
- message: z58.string().trim().min(1).max(BRIEF_MESSAGE_MAX_LENGTH),
12342
- releaseSections: z58.array(WorkingBriefSectionSchema).max(10).optional(),
12343
- convertToStructuredBrief: z58.boolean().optional()
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: z58.string().uuid()
12397
+ briefId: z59.string().uuid()
12347
12398
  }).strict();
12348
12399
  var BriefAgentLaunchSchema = BriefAgentHandoffInputSchema.extend({
12349
- requestKey: z58.string().uuid(),
12350
- target: z58.discriminatedUnion("kind", [
12351
- z58.object({ kind: z58.literal("new"), name: z58.string().trim().min(1).max(100) }).strict(),
12352
- z58.object({ kind: z58.literal("existing"), agentId: z58.string().uuid() }).strict()
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 = z58.object({
12356
- proposedName: z58.string().min(1).max(100),
12357
- expiresAt: z58.string().datetime(),
12358
- briefId: z58.string().uuid(),
12359
- revision: z58.number().int().nonnegative(),
12360
- description: z58.string(),
12361
- status: z58.enum([
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: z58.array(z58.object({ id: z58.string().uuid(), name: z58.string(), paused: z58.boolean() })),
12374
- canCreateAgent: z58.boolean(),
12375
- canSendToExistingAgent: z58.boolean(),
12376
- trialEndsAt: z58.string().datetime().nullable(),
12377
- trialDurationDays: z58.number().int().positive(),
12378
- trialAllowanceSubunits: z58.string(),
12379
- availableSubunits: z58.string().nullable()
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 z59 } from "zod";
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 = z59.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" });
15589
- var SwarmCoordinationPermissionsSchema = z59.object({
15590
- create: z59.boolean().default(false),
15591
- dispatch: z59.boolean().default(false),
15592
- resume: z59.boolean().default(false)
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 = z59.object({
15595
- agentId: z59.string().uuid(),
15596
- requestKey: z59.string().uuid(),
15597
- name: z59.string().trim().min(1).max(100),
15598
- responsibility: z59.string().trim().max(500),
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: z59.string().trim().max(16e3).optional(),
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: z59.number().int().min(0).optional(),
15659
+ instructionsVersion: z60.number().int().min(0).optional(),
15609
15660
  permissions: SwarmCoordinationPermissionsSchema
15610
15661
  }).strict();
15611
- var SwarmProfileSchema = z59.object({
15612
- available: z59.boolean().default(false),
15613
- agentId: z59.string().uuid(),
15614
- name: z59.string(),
15615
- responsibility: z59.string(),
15616
- instructions: z59.string(),
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: z59.number().int().default(0),
15619
- version: z59.number().int(),
15620
- generation: z59.number().int(),
15621
- creatorAgentId: z59.string().uuid().nullable(),
15622
- creatorJobId: z59.string().uuid().nullable(),
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 = z59.object({
15626
- agentId: z59.string().uuid(),
15627
- name: z59.string(),
15628
- responsibility: z59.string(),
15629
- creatorAgentId: z59.string().uuid().nullable(),
15630
- state: z59.enum([
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: z59.number().int(),
15642
- jobId: z59.string().uuid().nullable(),
15643
- runId: z59.string().uuid().nullable(),
15644
- headline: z59.string().nullable(),
15645
- progress: z59.string().nullable(),
15646
- updatedAt: z59.string().nullable(),
15647
- freshness: z59.enum(["current", "stale", "unpublished"]),
15648
- waitingFor: z59.array(z59.string().uuid()),
15649
- nextRunAt: z59.string().nullable(),
15650
- lastResult: z59.object({
15651
- jobId: z59.string().uuid(),
15652
- summary: z59.string(),
15653
- artifacts: z59.array(z59.object({ artifactId: z59.string().uuid(), sha256: z59.string(), path: z59.string() })).optional(),
15654
- finishedAt: z59.string().nullable()
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: z59.object({
15662
- jobId: z59.string().uuid(),
15712
+ lastFinished: z60.object({
15713
+ jobId: z60.string().uuid(),
15663
15714
  status: LauncherJobStatusSchema.extract(["completed", "failed", "interrupted"]),
15664
- finishedAt: z59.string().nullable()
15715
+ finishedAt: z60.string().nullable()
15665
15716
  }).nullable().optional(),
15666
- asOf: z59.string()
15717
+ asOf: z60.string()
15667
15718
  });
15668
- var SwarmOverviewSchema = z59.object({
15669
- members: z59.array(SwarmMemberSchema).max(10),
15670
- asOf: z59.string()
15719
+ var SwarmOverviewSchema = z60.object({
15720
+ members: z60.array(SwarmMemberSchema).max(10),
15721
+ asOf: z60.string()
15671
15722
  });
15672
- var artifactIds = z59.array(z59.string().uuid()).max(8).default([]);
15723
+ var artifactIds = z60.array(z60.string().uuid()).max(8).default([]);
15673
15724
  var SwarmToolInputSchemas = {
15674
- sessions_list: z59.object({}).strict(),
15675
- sessions_inspect: z59.object({ agentId: z59.string().uuid() }).strict(),
15676
- sessions_create: z59.object({
15677
- intentKey: z59.string().trim().min(1).max(100),
15678
- name: z59.string().trim().min(1).max(100),
15679
- responsibility: z59.string().trim().min(1).max(500),
15680
- instructions: z59.string().trim().min(1).max(16e3),
15681
- prompt: z59.string().trim().min(1).max(16e3)
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: z59.object({
15684
- agentId: z59.string().uuid(),
15685
- requestKey: z59.string().uuid(),
15686
- message: z59.string().trim().min(1).max(16e3),
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: z59.object({
15690
- agentId: z59.string().uuid().optional(),
15691
- before: z59.number().int().positive().optional()
15740
+ sessions_history: z60.object({
15741
+ agentId: z60.string().uuid().optional(),
15742
+ before: z60.number().int().positive().optional()
15692
15743
  }).strict(),
15693
- sessions_result: z59.object({ jobId: z59.string().uuid() }).strict(),
15694
- sessions_wait: z59.object({
15695
- jobIds: z59.array(z59.string().uuid()).min(1).max(8),
15696
- mode: z59.enum(["any", "all"]),
15697
- prompt: z59.string().trim().min(1).max(16e3),
15698
- timeoutSeconds: z59.number().int().min(60).max(604800)
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: z59.object({
15701
- headline: z59.string().trim().min(1).max(200),
15702
- progress: z59.string().trim().max(1e3),
15703
- resultSummary: z59.string().trim().max(1e3).optional(),
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: z59.object({
15707
- artifactId: z59.string().uuid(),
15757
+ sessions_read_artifact: z60.object({
15758
+ artifactId: z60.string().uuid(),
15708
15759
  saveTo: SwarmArtifactSavePathSchema.optional(),
15709
- overwrite: z59.boolean().optional()
15760
+ overwrite: z60.boolean().optional()
15710
15761
  }).strict()
15711
15762
  };
15712
- var SwarmWaitSchema = z59.object({
15713
- id: z59.string().uuid(),
15714
- sourceJobId: z59.string().uuid(),
15715
- jobIds: z59.array(z59.string().uuid()),
15716
- state: z59.enum(["pending", "delivered", "cancelled"]),
15717
- reason: z59.string().nullable(),
15718
- deadline: z59.string(),
15719
- continuationJobId: z59.string().uuid().nullable()
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 z60 } from "zod";
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) => z60.string().min(1).max(240).refine((path3) => readablePathOk(path3, strict), readablePathMessage);
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) => z60.object({
15799
+ var readableFileSchema = (strict) => z61.object({
15749
15800
  path: readablePathSchema(strict),
15750
- content: z60.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")
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: z60.string().max(USER_SKILL_SANDBOX_LIMITS.pathLength),
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: z60.boolean().default(false)
16010
+ executable: z61.boolean().default(false)
15960
16011
  };
15961
- var UserSkillSandboxTextFileSchema = z60.object({
16012
+ var UserSkillSandboxTextFileSchema = z61.object({
15962
16013
  ...sandboxFileBase,
15963
- encoding: z60.literal("utf8"),
15964
- content: z60.string().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
16014
+ encoding: z61.literal("utf8"),
16015
+ content: z61.string().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
15965
16016
  }).strict();
15966
- var UserSkillSandboxBinaryFileSchema = z60.object({
16017
+ var UserSkillSandboxBinaryFileSchema = z61.object({
15967
16018
  ...sandboxFileBase,
15968
- encoding: z60.literal("base64"),
15969
- content: z60.string().max(Math.ceil(USER_SKILL_SANDBOX_LIMITS.fileBytes / 3) * 4),
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: z60.number().int().nonnegative().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
16022
+ size: z61.number().int().nonnegative().max(USER_SKILL_SANDBOX_LIMITS.fileBytes)
15972
16023
  }).strict();
15973
- var sandboxFileSchema = (strict) => z60.discriminatedUnion("encoding", [
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) => z60.object({
16027
- name: z60.string().trim().max(100),
16028
- description: z60.string().trim().max(300),
16029
- files: z60.array(readableFileSchema(strict)).min(1).max(USER_SKILL_LIMITS.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: z60.array(sandboxFileSchema(strict)).max(USER_SKILL_SANDBOX_LIMITS.files, "A skill can contain at most 200 sandbox-only files").optional()
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 = z60.object({
16071
- skillId: z60.string().uuid(),
16072
- version: z60.number().int().positive(),
16073
- digest: z60.string().regex(/^[a-f0-9]{64}$/)
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 = z60.array(UserSkillPinSchema).max(USER_SKILL_LIMITS.assigned);
16076
- var UserSkillIdSchema = z60.object({ skillId: z60.string().uuid() });
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: z60.string().uuid(),
16079
- expectedRevision: z60.number().int().nonnegative(),
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: z60.string().uuid(),
16084
- expectedRevision: z60.number().int().nonnegative(),
16085
- note: z60.string().trim().max(500).default(""),
16086
- restoreVersion: z60.number().int().positive().optional()
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: z60.string().uuid(),
16090
- version: z60.number().int().positive().nullable(),
16091
- agents: z60.array(z60.object({ agentId: z60.string().uuid(), expectedRevision: z60.number().int().nonnegative() })).min(1).max(100)
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: z60.string().uuid(),
16095
- expectedRevision: z60.number().int().nonnegative(),
16096
- archived: z60.boolean(),
16097
- removeAssignments: z60.boolean().default(false)
16098
- });
16099
- var UserSkillSummarySchema = z60.object({
16100
- id: z60.string().uuid(),
16101
- name: z60.string(),
16102
- description: z60.string(),
16103
- archived: z60.boolean(),
16104
- latestVersion: z60.number().int(),
16105
- revision: z60.number().int(),
16106
- hasDraft: z60.boolean(),
16107
- assignedCount: z60.number().int(),
16108
- outdatedCount: z60.number().int(),
16109
- updatedAt: z60.string(),
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: z60.string().uuid().nullable().optional()
16115
- });
16116
- var UserSkillAgentSchema = z60.object({
16117
- agentId: z60.string().uuid(),
16118
- name: z60.string(),
16119
- managed: z60.boolean().optional(),
16120
- paused: z60.boolean(),
16121
- working: z60.boolean(),
16122
- revision: z60.number().int(),
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: z60.enum(["pending", "applying", "ready", "error"]),
16126
- errorCode: z60.string().nullable(),
16127
- sessionId: z60.string().nullable()
16176
+ state: z61.enum(["pending", "applying", "ready", "error"]),
16177
+ errorCode: z61.string().nullable(),
16178
+ sessionId: z61.string().nullable()
16128
16179
  });
16129
- var UserSkillLibrarySchema = z60.object({
16130
- skills: z60.array(UserSkillSummarySchema),
16131
- agents: z60.array(UserSkillAgentSchema)
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 = z60.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");
16135
- var UserSkillGithubPathSchema = z60.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");
16136
- var UserSkillCommitShaSchema = z60.string().regex(/^[a-f0-9]{40}$/, "Use a full 40-character lowercase commit SHA");
16137
- var UserSkillUploadSourceSchema = z60.object({ kind: z60.literal("upload") }).strict();
16138
- var UserSkillGithubSourceSchema = z60.object({
16139
- kind: z60.literal("github"),
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: z60.number().int().positive().optional(),
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: z60.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"),
16151
- fetchedAt: z60.string().datetime({ offset: true }),
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: z60.string().trim().max(200).nullable().optional(),
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: z60.array(z60.string().min(1).max(1024)).max(1e3)
16206
+ excludedPaths: z61.array(z61.string().min(1).max(1024)).max(1e3)
16156
16207
  }).strict();
16157
- var UserSkillAgentSourceSchema = z60.object({ kind: z60.literal("agent"), agentId: z60.string().uuid() }).strict();
16158
- var UserSkillSourceSchema = z60.discriminatedUnion("kind", [
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 = z60.discriminatedUnion("kind", [
16164
- z60.object({ kind: z60.literal("owner"), memberId: z60.string().min(1).max(256) }).strict(),
16165
- z60.object({ kind: z60.literal("agent"), agentId: z60.string().uuid() }).strict()
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 = z60.object({
16168
- version: z60.number().int(),
16169
- digest: z60.string(),
16170
- name: z60.string(),
16171
- description: z60.string(),
16172
- bytes: z60.number().int(),
16173
- fileCount: z60.number().int(),
16174
- note: z60.string(),
16175
- createdAt: z60.string(),
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 = z60.object({
16232
+ var UserSkillDetailSchema = z61.object({
16182
16233
  skill: UserSkillSummarySchema,
16183
16234
  draft: UserSkillStoredBundleSchema.nullable(),
16184
- versions: z60.array(UserSkillVersionSchema),
16185
- agents: z60.array(UserSkillAgentSchema)
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 = z60.enum(USER_SKILL_AUTHORING_MODES);
16189
- var UserSkillAuthoringModeViewSchema = z60.object({
16190
- agentId: z60.string().uuid(),
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 = z60.enum(USER_SKILL_SHARE_REQUEST_STATUSES);
16202
- var UserSkillShareRequestSchema = z60.object({
16203
- id: z60.string().uuid(),
16204
- skillId: z60.string().uuid(),
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: z60.string(),
16207
- version: z60.number().int().positive(),
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: z60.string(),
16213
- versionDescription: z60.string(),
16214
- digest: z60.string(),
16215
- fromAgentId: z60.string().uuid(),
16216
- fromAgentName: z60.string(),
16217
- toAgentId: z60.string().uuid(),
16218
- toAgentName: z60.string(),
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: z60.string(),
16221
- decidedAt: z60.string().nullable()
16271
+ createdAt: z61.string(),
16272
+ decidedAt: z61.string().nullable()
16222
16273
  });
16223
- var UserSkillShareRequestListInputSchema = z60.object({ status: z60.enum(["pending", "all"]).default("pending") }).strict();
16224
- var UserSkillShareDecisionInputSchema = z60.object({ requestId: z60.string().uuid(), decision: z60.enum(["approve", "reject"]) }).strict();
16225
- var UserSkillShareRevokeInputSchema = z60.object({ agentId: z60.string().uuid() }).strict();
16226
- var UserSkillShareRevokeResultSchema = z60.object({
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: z60.string().uuid(),
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: z60.literal("off"),
16281
+ authoringMode: z61.literal("off"),
16231
16282
  /** Each pin removed from another agent; an agent whose pin was since changed keeps it. */
16232
- removed: z60.array(z60.object({
16233
- agentId: z60.string().uuid(),
16234
- agentName: z60.string(),
16235
- skillId: z60.string().uuid(),
16236
- skillName: z60.string(),
16237
- version: z60.number().int().positive()
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: z60.array(z60.string().uuid())
16291
+ cancelledRequestIds: z61.array(z61.string().uuid())
16241
16292
  });
16242
- var UserSkillImportPreviewInputSchema = z60.object({
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: z60.string().trim().min(1).max(2048),
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: z60.string().trim().min(1).max(200).optional(),
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 = z60.object({
16254
- path: z60.string(),
16304
+ var UserSkillImportFileSchema = z61.object({
16305
+ path: z61.string(),
16255
16306
  /** Decoded bytes. */
16256
- size: z60.number().int().nonnegative(),
16307
+ size: z61.number().int().nonnegative(),
16257
16308
  /** `readable`: served through skill_read. `sandbox`: copied into the agent's VM only. */
16258
- kind: z60.enum(["readable", "sandbox"]),
16259
- executable: z60.boolean(),
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: z60.string().nullable().optional()
16315
+ text: z61.string().nullable().optional()
16265
16316
  });
16266
- var UserSkillImportExcludedSchema = z60.object({ path: z60.string(), reason: z60.string() });
16267
- var UserSkillImportPreviewSchema = z60.object({
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: z60.string(),
16321
+ ref: z61.string(),
16271
16322
  commitSha: UserSkillCommitShaSchema,
16272
- name: z60.string(),
16273
- description: z60.string(),
16274
- files: z60.array(UserSkillImportFileSchema),
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: z60.array(UserSkillImportExcludedSchema),
16277
- warnings: z60.array(z60.string()),
16278
- license: z60.string().nullable(),
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: z60.object({ skillId: z60.string().uuid(), version: z60.number().int() }).nullable(),
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: z60.string().min(1).max(8192),
16283
- expiresAt: z60.string().datetime({ offset: true })
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: z60.string().min(1).max(8192),
16287
- requestKey: z60.string().uuid(),
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: z60.number().int().nonnegative(),
16340
+ expectedRevision: z61.number().int().nonnegative(),
16290
16341
  /** Must be true when the preview listed excluded files. */
16291
- confirmExclusions: z60.boolean().default(false),
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: z60.boolean().default(false),
16297
- note: z60.string().trim().max(500).default("")
16347
+ confirmSourceChange: z61.boolean().default(false),
16348
+ note: z61.string().trim().max(500).default("")
16298
16349
  }).strict();
16299
- var UserSkillImportResultSchema = z60.object({
16350
+ var UserSkillImportResultSchema = z61.object({
16300
16351
  /** `up_to_date`: an existing version already has this content, and nothing was saved. */
16301
- status: z60.enum(["imported", "up_to_date"]),
16302
- skillId: z60.string().uuid(),
16303
- version: z60.number().int().positive(),
16304
- revision: z60.number().int().nonnegative()
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 = z60.object({
16308
- path: z60.string(),
16309
- change: z60.enum(["added", "removed", "changed"]),
16310
- kind: z60.enum(["readable", "sandbox"]),
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: z60.number().int().nonnegative().nullable(),
16363
+ size: z61.number().int().nonnegative().nullable(),
16313
16364
  /** Decoded bytes in the current version; null when added. */
16314
- previousSize: z60.number().int().nonnegative().nullable(),
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: z60.object({ added: z60.number().int().nonnegative(), removed: z60.number().int().nonnegative() }).nullable()
16371
+ lines: z61.object({ added: z61.number().int().nonnegative(), removed: z61.number().int().nonnegative() }).nullable()
16321
16372
  });
16322
- var UserSkillUpdateBaseSchema = z60.object({
16323
- skillId: z60.string().uuid(),
16373
+ var UserSkillUpdateBaseSchema = z61.object({
16374
+ skillId: z61.string().uuid(),
16324
16375
  /** The skill's latest version, which the check compares against. */
16325
- version: z60.number().int().positive(),
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: z60.string(),
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 = z60.object({
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: z60.enum(USER_SKILL_SOURCE_CHANGES),
16343
- message: z60.string()
16393
+ kind: z61.enum(USER_SKILL_SOURCE_CHANGES),
16394
+ message: z61.string()
16344
16395
  });
16345
- var UserSkillResolvedRepositorySchema = z60.object({
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: z60.number().int().positive(),
16400
+ id: z61.number().int().positive(),
16350
16401
  /** When GitHub created the repository, if it said. A transfer keeps it. */
16351
- createdAt: z60.string().datetime({ offset: true }).nullable(),
16352
- defaultBranch: z60.string()
16402
+ createdAt: z61.string().datetime({ offset: true }).nullable(),
16403
+ defaultBranch: z61.string()
16353
16404
  });
16354
- var UserSkillSourceVerificationSchema = z60.object({
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: z60.string().datetime({ offset: true }),
16408
+ importedAt: z61.string().datetime({ offset: true }),
16358
16409
  /** Why the repository is unconfirmed; also listed in the check's `warnings`. */
16359
- warning: z60.string(),
16410
+ warning: z61.string(),
16360
16411
  /** Opaque; pass it to `skillSourceVerify` unchanged before `expiresAt`. */
16361
- checkToken: z60.string().min(1).max(8192),
16362
- expiresAt: z60.string().datetime({ offset: true })
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: z60.string().min(1).max(8192),
16366
- requestKey: z60.string().uuid(),
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: z60.number().int().nonnegative(),
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: z60.boolean().default(false)
16424
+ confirmRepository: z61.boolean().default(false)
16374
16425
  }).strict();
16375
- var UserSkillSourceVerifyResultSchema = z60.object({
16376
- status: z60.literal("verified"),
16377
- skillId: z60.string().uuid(),
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: z60.number().int().positive(),
16430
+ version: z61.number().int().positive(),
16380
16431
  /** Unchanged: recording the ID changes no content. */
16381
- revision: z60.number().int().nonnegative(),
16382
- repoId: z60.number().int().positive()
16432
+ revision: z61.number().int().nonnegative(),
16433
+ repoId: z61.number().int().positive()
16383
16434
  });
16384
- var UserSkillUpdateCheckSchema = z60.discriminatedUnion("status", [
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: z60.literal("up_to_date"),
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: z60.array(z60.string()),
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: z60.literal("update_available"),
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: z60.array(UserSkillSourceChangeSchema).optional(),
16413
- changes: z60.array(UserSkillUpdateFileChangeSchema),
16414
- unchangedCount: z60.number().int().nonnegative()
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 z61 } from "zod";
16420
- var id = z61.string().min(1).max(256);
16421
- var usd = z61.string().regex(/^(0|[1-9]\d{0,9})(\.\d{1,6})?$/);
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 = z61.object({
16486
+ var ManagedCostPolicySchema = z62.object({
16436
16487
  version: id,
16437
- region: z61.enum(["global", "regional"]),
16488
+ region: z62.enum(["global", "regional"]),
16438
16489
  ownerDailyUsd: usd,
16439
16490
  platformDailyUsd: usd,
16440
16491
  computeReserveUsd: usd,
16441
16492
  retainedResourceDailyUsd: usd,
16442
- maxConcurrentOperations: z61.number().int().min(1).max(64),
16443
- maxUnresolvedOperations: z61.number().int().min(1).max(1e4),
16444
- maxUnresolvedAgeMs: z61.number().int().min(6e4).max(6048e5),
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: z61.number().int().min(6e4).max(6048e5),
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: z61.array(z61.union([
16453
- z61.enum([
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: z61.boolean(),
16515
+ nativeHelpersQualified: z62.boolean(),
16465
16516
  /** Explicit estimate for bounded native review processing/storage, including recovery. */
16466
- nativeReviewProcessing: z61.object({
16517
+ nativeReviewProcessing: z62.object({
16467
16518
  usdPerRun: usd,
16468
- qualificationEvidence: z61.string().trim().min(1).max(256)
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: z61.array(z61.object({
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: z61.enum(["openrouter", "openai-responses", "typesafe"]),
16526
+ provider: z62.enum(["openrouter", "openai-responses", "typesafe"]),
16476
16527
  rate: RoutingPublishedRateSchema,
16477
- maxInputTokens: z61.number().int().positive().max(262144),
16478
- maxOutputTokens: z61.number().int().nonnegative().max(16e3),
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: z61.number().int().positive().max(262144).optional(),
16484
- qualificationEvidence: z61.string().trim().min(1).max(256)
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: z61.enum(["manual", "refund_downward"]),
16487
- approvalEvidence: z61.string().trim().min(1).max(256),
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: z61.object({
16495
- memory: z61.enum(SANDBOX_MEMORY_TIERS).optional(),
16496
- granularity: z61.enum(SANDBOX_BILLING_GRANULARITIES).optional(),
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: z61.number().int().min(6e4).max(864e5).optional(),
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: z61.object({
16504
- small: z61.enum(SANDBOX_MEMORY_TIERS).optional(),
16505
- medium: z61.enum(SANDBOX_MEMORY_TIERS).optional(),
16506
- large: z61.enum(SANDBOX_MEMORY_TIERS).optional()
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: z61.object({
16565
+ boat: z62.object({
16515
16566
  /** Customer price over Boat's rate: published rate = Boat's rate times this (>= 1). */
16516
- markup: z61.string().regex(/^[1-9]\d{0,2}(\.\d{1,6})?$/),
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: z61.object({ small: usd, default: usd }).strict(),
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: z61.number().int().min(60).max(7200),
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 = z61.object({
16585
+ var ManagedTurnEvidenceSchema = z62.object({
16535
16586
  sessionId: id,
16536
16587
  turnId: id,
16537
16588
  subagentId: id.nullable(),
16538
- status: z61.enum([
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 = z61.object({
16599
+ var ManagedWorkEvidenceSchema = z62.object({
16549
16600
  sessionId: id,
16550
16601
  rootTurnId: id,
16551
- complete: z61.boolean(),
16552
- turns: z61.array(ManagedTurnEvidenceSchema).min(1).max(2e3)
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 z62 } from "zod";
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 = z62.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");
16580
- var CatalogOriginSchema = z62.string().url().max(2048).refine((value) => {
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 = z62.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Expected an ISO date (YYYY-MM-DD)");
16585
- var atomicAmount = z62.string().regex(/^(?:0|[1-9][0-9]*)$/, "Expected an integer atomic amount");
16586
- var CatalogEndpointSchema = z62.object({
16587
- method: z62.enum(["GET", "POST"]),
16588
- path: z62.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"),
16589
- summary: z62.string().min(1).max(200)
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 = z62.object({
16592
- name: z62.string().min(1).max(120),
16593
- url: z62.string().url().max(2048)
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 = z62.object({
16596
- chainId: z62.union([z62.literal(8453), z62.literal(84532)]),
16597
- token: z62.literal("USDC"),
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: z62.array(z62.string().regex(/^0x[0-9a-fA-F]{40}$/)).min(1).max(8).optional()
16654
+ payTo: z63.array(z63.string().regex(/^0x[0-9a-fA-F]{40}$/)).min(1).max(8).optional()
16604
16655
  }).strict();
16605
- var CatalogTrustSchema = z62.object({
16606
- tier: z62.enum(CATALOG_TRUST_TIERS),
16607
- reviewedBy: z62.string().min(1).max(120),
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: z62.string().max(2e3).optional()
16660
+ notes: z63.string().max(2e3).optional()
16610
16661
  }).strict();
16611
- var catalogEntryBase = z62.object({
16662
+ var catalogEntryBase = z63.object({
16612
16663
  id: catalogId,
16613
- name: z62.string().min(1).max(120),
16664
+ name: z63.string().min(1).max(120),
16614
16665
  provider: CatalogProviderSchema,
16615
- capabilities: z62.array(z62.enum(CATALOG_CAPABILITIES)).min(1).max(8),
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: z62.string().min(20).max(2e3),
16668
+ description: z63.string().min(20).max(2e3),
16618
16669
  // Short, exact how-to shown to the agent verbatim.
16619
- usage: z62.string().min(10).max(4e3),
16620
- docsUrl: z62.string().url().max(2048),
16670
+ usage: z63.string().min(10).max(4e3),
16671
+ docsUrl: z63.string().url().max(2048),
16621
16672
  trust: CatalogTrustSchema,
16622
- status: z62.enum(CATALOG_STATUSES),
16673
+ status: z63.enum(CATALOG_STATUSES),
16623
16674
  addedAt: isoDate
16624
16675
  });
16625
16676
  var CatalogX402EndpointEntrySchema = catalogEntryBase.extend({
16626
- kind: z62.literal("x402-endpoint"),
16677
+ kind: z63.literal("x402-endpoint"),
16627
16678
  origin: CatalogOriginSchema,
16628
- endpoints: z62.array(CatalogEndpointSchema).min(1).max(32),
16679
+ endpoints: z63.array(CatalogEndpointSchema).min(1).max(32),
16629
16680
  pricing: CatalogPricingSchema
16630
16681
  }).strict();
16631
- var CatalogEntrySchema = z62.discriminatedUnion("kind", [CatalogX402EndpointEntrySchema]);
16632
- var CatalogFileSchema = z62.object({
16633
- formatVersion: z62.literal(CATALOG_FORMAT_VERSION),
16634
- generatedAt: z62.string().datetime(),
16635
- entries: z62.array(CatalogEntrySchema)
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 = z62.object({
16638
- query: z62.string().trim().min(1).max(500),
16639
- kind: z62.enum(CATALOG_KINDS).optional(),
16640
- capabilities: z62.array(z62.enum(CATALOG_CAPABILITIES)).max(8).optional(),
16641
- tiers: z62.array(z62.enum(CATALOG_TRUST_TIERS)).max(3).optional(),
16642
- limit: z62.number().int().min(1).max(20).default(5)
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 = z62.object({
16695
+ var CatalogSearchHitSchema = z63.object({
16645
16696
  entry: CatalogEntrySchema,
16646
- score: z62.number(),
16647
- matchedCapabilities: z62.array(z62.enum(CATALOG_CAPABILITIES))
16697
+ score: z63.number(),
16698
+ matchedCapabilities: z63.array(z63.enum(CATALOG_CAPABILITIES))
16648
16699
  }).strict();
16649
- var CatalogSearchOutputSchema = z62.object({
16650
- hits: z62.array(CatalogSearchHitSchema),
16651
- total: z62.number().int().nonnegative()
16700
+ var CatalogSearchOutputSchema = z63.object({
16701
+ hits: z63.array(CatalogSearchHitSchema),
16702
+ total: z63.number().int().nonnegative()
16652
16703
  }).strict();
16653
- var CatalogGetInputSchema = z62.object({ id: catalogId }).strict();
16704
+ var CatalogGetInputSchema = z63.object({ id: catalogId }).strict();
16654
16705
 
16655
16706
  // ../../packages/shared/dist/schemas/market-wakeup.schemas.js
16656
- import { z as z63 } from "zod";
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 = z63.enum(MARKET_WAKEUP_KINDS);
16745
+ var MarketWakeupKindSchema = z64.enum(MARKET_WAKEUP_KINDS);
16695
16746
  var MARKET_WATCH_MODES = ["bounty", "claim", "pitch", "benchmark", "auction"];
16696
- var MarketWatchModeSchema = z63.enum(MARKET_WATCH_MODES);
16747
+ var MarketWatchModeSchema = z64.enum(MARKET_WATCH_MODES);
16697
16748
  var MARKET_WATCH_MAX_WAKEUPS_PER_DAY = 48;
16698
- var MarketWatchSchema = z63.object({
16699
- enabled: z63.boolean(),
16700
- modes: z63.array(MarketWatchModeSchema).max(MARKET_WATCH_MODES.length),
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: z63.string().regex(/^\d{1,12}(\.\d{1,6})?$/).default("0"),
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: z63.array(z63.string().trim().min(2).max(40)).max(10),
16705
- maxWakeupsPerDay: z63.number().int().min(1).max(MARKET_WATCH_MAX_WAKEUPS_PER_DAY)
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: z63.string().uuid()
16759
+ agentId: z64.string().uuid()
16709
16760
  }).strict();
16710
16761
  var MarketWatchViewSchema = MarketWatchSchema.extend({
16711
- agentId: z63.string().uuid(),
16712
- updatedAt: z63.string().nullable()
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 z64 } from "zod";
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 = z64.enum(MARKET_EVENT_ROLES);
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 = z64.enum(MARKET_EVENT_TYPES);
17036
- var AutomationPendingActionSchema = z64.object({
17037
- type: z64.literal("approve_gate"),
17038
- projectId: z64.number().int(),
17039
- runId: z64.string(),
17040
- step: z64.string(),
17041
- label: z64.string(),
17042
- command: z64.string()
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 = z64.enum(MARKET_EVENT_VISIBILITIES);
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 = z64.string().regex(marketEventIdPattern).refine(
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 = z64.object({
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: z64.string().nullable(),
17061
- chainId: z64.number().int(),
17062
- occurredAt: z64.string(),
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: z64.string().nullable(),
17123
+ actor: z65.string().nullable(),
17065
17124
  visibility: MarketEventVisibilitySchema,
17066
- summary: z64.string(),
17125
+ summary: z65.string(),
17067
17126
  /** Identifiers of what the event concerns (submission, pitch, bid). Never the content. */
17068
- refs: z64.record(z64.string(), z64.string()),
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: z64.array(PendingActionSchema).optional(),
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: z64.array(AutomationPendingActionSchema).optional()
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(z64.number().int().min(1).max(MARKET_EVENT_PAGE_MAX)).default(MARKET_EVENT_PAGE_DEFAULT)
17142
+ limit: coerceNumber(z65.number().int().min(1).max(MARKET_EVENT_PAGE_MAX)).default(MARKET_EVENT_PAGE_DEFAULT)
17084
17143
  };
17085
- var TaskMarketEventsInputSchema = z64.object({ taskId: z64.string().min(1).max(100), ...PageInputShape }).strict();
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 = z64.enum(MARKET_EVENT_STREAMS);
17089
- var WalletMarketEventsInputSchema = z64.object({
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: z64.enum(MARKET_EVENT_ORDERS).default("oldest"),
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(z64.number().int().min(0).max(MARKET_EVENT_WAIT_MAX_MS)).optional()
17160
+ waitMs: coerceNumber(z65.number().int().min(0).max(MARKET_EVENT_WAIT_MAX_MS)).optional()
17102
17161
  }).strict();
17103
- var MarketEventPageSchema = z64.object({
17104
- events: z64.array(MarketEventSchema),
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 = z64.enum(MARKET_EVENT_CHANNELS);
17171
+ var MarketEventChannelSchema = z65.enum(MARKET_EVENT_CHANNELS);
17113
17172
  var MARKET_EVENT_WALLET_CHANNELS = ["email", "in-app"];
17114
- var MarketEventWalletChannelSchema = z64.enum(MARKET_EVENT_WALLET_CHANNELS);
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 = z64.object({ channel: MarketEventWalletChannelSchema.optional() }).strict();
17129
- var MarketEventPreferenceSchema = z64.object({
17130
- type: z64.string(),
17187
+ var MarketEventPreferencesInputSchema = z65.object({ channel: MarketEventWalletChannelSchema.optional() }).strict();
17188
+ var MarketEventPreferenceSchema = z65.object({
17189
+ type: z65.string(),
17131
17190
  channel: MarketEventChannelSchema,
17132
- enabled: z64.boolean(),
17191
+ enabled: z65.boolean(),
17133
17192
  /** A money-losing deadline: always on, and a request to turn it off is refused. */
17134
- locked: z64.boolean()
17193
+ locked: z65.boolean()
17135
17194
  });
17136
- var MarketEventPreferencesSchema = z64.object({
17137
- preferences: z64.array(MarketEventPreferenceSchema)
17195
+ var MarketEventPreferencesSchema = z65.object({
17196
+ preferences: z65.array(MarketEventPreferenceSchema)
17138
17197
  });
17139
- var SetMarketEventPreferenceInputSchema = z64.object({ type: z64.string().min(1).max(64), enabled: z64.boolean() }).strict();
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 = z64.object({}).strict();
17147
- var MarketEventLastSeenSchema = z64.object({
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: z64.number().int().min(0).max(MARKET_EVENT_UNREAD_MAX),
17210
+ unread: z65.number().int().min(0).max(MARKET_EVENT_UNREAD_MAX),
17152
17211
  /** More events are unread than `unread` counts. */
17153
- unreadCapped: z64.boolean()
17212
+ unreadCapped: z65.boolean()
17154
17213
  });
17155
- var MarkMarketEventsSeenInputSchema = z64.object({
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 z65 } from "zod";
17162
- var DiscoveryFilterSchema = z65.object({
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: z65.boolean(),
17223
+ enabled: z66.boolean(),
17165
17224
  /** Task modes to match; empty matches every mode. */
17166
- modes: z65.array(MarketWatchModeSchema).max(MARKET_WATCH_MODES.length),
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: z65.string().regex(/^\d{1,12}(\.\d{1,6})?$/).default("0"),
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: z65.array(z65.string().trim().min(2).max(40)).max(10),
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: z65.array(z65.string().trim().min(1).max(40)).max(10),
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: z65.number().int().min(1).max(MARKET_WATCH_MAX_WAKEUPS_PER_DAY)
17233
+ maxPerDay: z66.number().int().min(1).max(MARKET_WATCH_MAX_WAKEUPS_PER_DAY)
17175
17234
  }).strict();
17176
- var DiscoveryFilterGetInputSchema = z65.object({}).strict();
17235
+ var DiscoveryFilterGetInputSchema = z66.object({}).strict();
17177
17236
  var DiscoveryFilterSetInputSchema = DiscoveryFilterSchema.extend(MarketEventSettingsWriteProofSchema.shape).strict();
17178
17237
  var DiscoveryFilterViewSchema = DiscoveryFilterSchema.extend({
17179
- wallet: z65.string(),
17238
+ wallet: z66.string(),
17180
17239
  /** Null when the wallet has never stored a filter, and the defaults are shown. */
17181
- updatedAt: z65.string().nullable(),
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: z65.enum(["skills", "none"]).nullable()
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 z66 } from "zod";
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: z66.object({
17361
- query: z66.string().trim().min(1).max(400),
17362
- maxResults: z66.number().int().min(1).max(WEB_SEARCH_MAX_RESULTS).optional()
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 z67 } from "zod";
17426
+ import { z as z68 } from "zod";
17368
17427
  var VIEW_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
17369
17428
  var ViewImageToolInputSchemas = {
17370
- view_image: z67.object({
17429
+ view_image: z68.object({
17371
17430
  /** A workspace path, such as an owner attachment's `attachments/...` path. */
17372
- path: z67.string().trim().min(1).max(1024),
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: z67.string().trim().min(1).max(2e3).optional()
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 z68 } from "zod";
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: z68.object({
17384
- path: z68.string().trim().min(1).max(1024)
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 z70 } from "zod";
17448
+ import { z as z71 } from "zod";
17390
17449
 
17391
17450
  // ../../packages/shared/dist/schemas/submission-review-decision.schemas.js
17392
- import { z as z69 } from "zod";
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 = z69.string().regex(/^[a-f0-9]{64}$/);
17445
- var QuestionId = z69.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
17446
- var OptionId = z69.string().regex(/^[a-z0-9_]{1,64}$/);
17447
- var ModelId = z69.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)(?!.*\/\/)[A-Za-z0-9._:/@-]{1,128}$/);
17448
- var Probability = z69.number().finite().min(0).max(1);
17449
- var Count = z69.number().int().nonnegative().max(2147483647);
17450
- var SubmissionReviewDecisionDraftSchema = z69.object({
17451
- callId: z69.string().uuid(),
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: z69.string().regex(/^[a-z_]{1,48}(:\d{1,6})?$/),
17454
- questionKind: z69.enum(DECISION_QUESTION_KINDS),
17455
- requirementId: z69.string().regex(/^[a-z][a-z0-9_]{0,35}$/).nullable(),
17456
- dimension: z69.enum(DECISION_DIMENSIONS).nullable(),
17457
- questionSetVersion: z69.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)[A-Za-z0-9._/-]{1,64}$/),
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: z69.enum(ROUTING_ATTEMPT_OUTCOMES),
17466
- errorClass: z69.enum(JEV_ERROR_CLASSES).nullable(),
17467
- answerType: z69.enum(DECISION_ANSWER_TYPES).nullable(),
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: z69.number().finite().nullable(),
17470
- probabilities: z69.record(OptionId, Probability).refine((map) => Object.keys(map).length <= 32).nullable(),
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: z69.enum(DECISION_GATE_OUTCOMES),
17475
- established: z69.boolean(),
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: z69.string().regex(/^\d{1,30}$/).nullable(),
17480
- costBasis: z69.enum(DECISION_COST_BASES),
17481
- callQuestionCount: z69.number().int().min(1).max(64),
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: z69.enum(DECISION_IMAGE_INPUTS).default("observation"),
17484
- imageCount: z69.number().int().min(0).max(DECISION_RECORD_MAX_IMAGES).default(0),
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: z69.boolean().default(false)
17546
+ redacted: z70.boolean().default(false)
17488
17547
  }).strict();
17489
- var Requester = z69.string().regex(/^0x[0-9a-f]{40}$/);
17548
+ var Requester = z70.string().regex(/^0x[0-9a-f]{40}$/);
17490
17549
  var Scope = {
17491
- runId: z69.string().uuid(),
17492
- chainId: z69.number().int().positive(),
17493
- submissionId: z69.string().regex(/^[A-Za-z0-9_:.-]{1,128}$/),
17494
- createdAt: z69.string().datetime()
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: z69.string().datetime()
17558
+ expiresAt: z70.string().datetime()
17500
17559
  }).strict();
17501
17560
  var SubmissionReviewDecisionExportSchema = SubmissionReviewDecisionDraftSchema.extend({
17502
17561
  ...Scope,
17503
17562
  questionSha256: Hex64.nullable(),
17504
- expiresAt: z69.string().datetime().nullable().default(null),
17505
- source: z69.enum(["live", "harness"])
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 = z69.number().finite().min(0.5).max(0.99).refine((value) => Math.abs(Math.round(value * 100) / 100 - value) < 1e-9, {
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 = z69.object({
17521
- model: z69.string().refine((model) => isPinnedDecisionModel(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: z69.string().regex(/^(?!.*\.[A-Za-z]{1,6}$)[A-Za-z0-9._/-]{1,64}$/),
17525
- thresholds: z69.object({
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: z69.number().int().min(SUBMISSION_REVIEW_MIN_STATE_BYTES).max(SUBMISSION_REVIEW_MAX_STATE_BYTES).optional(),
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: z69.enum(DECISION_IMAGE_INPUTS).optional()
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 = z70.string().regex(/^[a-f0-9]{64}$/);
17558
- var Identifier = z70.string().min(1).max(128);
17559
- var Address2 = z70.string().regex(/^0x[0-9a-fA-F]{40}$/).transform((value) => value.toLowerCase());
17560
- var Time = z70.string().datetime();
17561
- var SubmissionReviewPlannerTimeoutSchema = z70.number().int().min(3e4).max(3e5);
17562
- var SubmissionReviewProfileShape = z70.object({
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: z70.record(Identifier, Identifier).refine((models) => Object.keys(models).length <= 8),
17567
- qualityDimensions: z70.array(z70.enum(["clarity", "visual_coherence", "distinctiveness", "finish"])).min(1).max(4).refine((values) => new Set(values).size === values.length),
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 = z70.object({
17659
+ var SubmissionReviewArtifactSchema = z71.object({
17601
17660
  artifactId: Identifier,
17602
17661
  sha256: Hash,
17603
- fileName: z70.string().max(512),
17604
- mimeType: z70.string().max(128),
17605
- role: z70.string().max(64),
17606
- sizeBytes: z70.number().int().nonnegative()
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 = z70.object({
17667
+ var SubmissionReviewManifestItemSchema = z71.object({
17609
17668
  submissionId: Identifier,
17610
17669
  workerAddress: Address2,
17611
17670
  submittedAt: Time,
17612
- artifacts: z70.array(SubmissionReviewArtifactSchema).max(8)
17671
+ artifacts: z71.array(SubmissionReviewArtifactSchema).max(8)
17613
17672
  }).strict();
17614
- var SubmissionReviewSnapshotSchema = z70.object({
17673
+ var SubmissionReviewSnapshotSchema = z71.object({
17615
17674
  taskId: Identifier,
17616
- chainId: z70.number().int().positive(),
17617
- brief: z70.string().max(262144),
17675
+ chainId: z71.number().int().positive(),
17676
+ brief: z71.string().max(262144),
17618
17677
  briefSha256: Hash,
17619
17678
  profile: SubmissionReviewProfileSchema,
17620
- submissions: z70.array(SubmissionReviewManifestItemSchema).min(1).max(100)
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 = z70.object({
17686
+ var SubmissionReviewEvidenceSchema = z71.object({
17628
17687
  id: Identifier,
17629
- kind: z70.enum(["source_text", "visual_observation", "external_snapshot", "metadata"]),
17630
- scope: z70.enum(["submission_text", "post_text", "visual", "metadata"]).optional(),
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: z70.string().max(262144),
17692
+ content: z71.string().max(262144),
17634
17693
  contentSha256: Hash,
17635
- sourceUrl: z70.string().url().max(2048).refine((value) => {
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: z70.array(z70.string().max(500)).max(20)
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 = z70.object({
17716
+ var SubmissionReviewFindingSchema = z71.object({
17658
17717
  requirementId: Identifier,
17659
- statement: z70.string().min(1).max(1200),
17660
- sourceQuote: z70.string().min(1).max(2e3),
17661
- category: z70.enum(["mandatory", "conditional", "optional", "preference"]),
17662
- status: z70.enum(["supported", "unmet", "pending", "not_applicable"]),
17663
- reason: z70.string().min(1).max(2e3),
17664
- evidenceIds: z70.array(Identifier).max(32)
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 = z70.object({
17725
+ var SubmissionReviewAssessmentSchema = z71.object({
17667
17726
  submissionId: Identifier,
17668
- evidence: z70.array(SubmissionReviewEvidenceSchema).max(32),
17727
+ evidence: z71.array(SubmissionReviewEvidenceSchema).max(32),
17669
17728
  planSha256: Hash.optional(),
17670
- checklistCoverage: z70.enum(["complete", "uncertain"]).optional(),
17671
- findings: z70.array(SubmissionReviewFindingSchema).min(1).max(32),
17672
- quality: z70.array(z70.object({
17673
- dimension: z70.enum(["clarity", "visual_coherence", "distinctiveness", "finish"]),
17674
- score: z70.number().min(0).max(4).nullable(),
17675
- reason: z70.string().min(1).max(2e3),
17676
- evidenceIds: z70.array(Identifier).max(32)
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: z70.array(z70.string().max(500)).max(20)
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 = z70.object({
17750
+ var SubmissionReviewCorrectionSchema = z71.object({
17692
17751
  requirementId: Identifier,
17693
- status: z70.enum(["supported", "unmet", "pending", "not_applicable"]),
17694
- reason: z70.string().min(1).max(2e3),
17695
- evidenceIds: z70.array(Identifier).max(32)
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 z71 } from "zod";
17700
- var id2 = z71.string().min(1).max(128);
17701
- var hash = z71.string().regex(/^[a-f0-9]{64}$/);
17702
- var selection = z71.array(id2).min(1).max(100).refine((ids2) => new Set(ids2).size === ids2.length, "Submission IDs must be unique");
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 = z71.object({ taskId: id2, chainId: z71.number().int().positive().optional() }).strict();
17705
- var SubmissionReviewRunInputSchema = z71.object({ runId: z71.string().uuid(), chainId: z71.number().int().positive() }).strict();
17706
- var SubmissionReviewLookupInputSchema = z71.object({
17707
- idempotencyKey: z71.string().uuid().transform((value) => value.toLowerCase()),
17708
- chainId: z71.number().int().positive()
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: z71.enum(["latest", "remaining", "selected"]).default("latest"),
17770
+ scope: z72.enum(["latest", "remaining", "selected"]).default("latest"),
17712
17771
  submissionIds: selection.optional()
17713
17772
  }).strict();
17714
- var SubmissionReviewAuthSchema = z71.object({
17773
+ var SubmissionReviewAuthSchema = z72.object({
17715
17774
  requesterAddress: EthAddressSchema,
17716
- idempotencyKey: z71.string().uuid().transform((value) => value.toLowerCase()),
17717
- expiresAt: z71.number().int().positive().safe(),
17718
- signature: z71.string().regex(/^0x[0-9a-fA-F]+$/).max(2048)
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 = z71.object({
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: z71.number().int().positive() }).strict();
17727
- var SubmissionReviewControlInputSchema = SubmissionReviewRunInputSchema.merge(SubmissionReviewAuthSchema).extend({ action: z71.enum(["pause", "cancel", "delete"]) }).strict();
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: z71.string().uuid(), correction: SubmissionReviewCorrectionSchema }).strict();
17730
- var FeedbackQualityDimension = z71.enum([
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 = z71.discriminatedUnion("kind", [
17737
- z71.object({
17738
- kind: z71.literal("finding"),
17739
- requirementId: z71.string().regex(/^[a-z][a-z0-9_]{0,35}$/)
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
- z71.object({ kind: z71.literal("quality"), dimension: FeedbackQualityDimension }).strict()
17800
+ z72.object({ kind: z72.literal("quality"), dimension: FeedbackQualityDimension }).strict()
17742
17801
  ]);
17743
- var SubmissionReviewFeedbackNoteSchema = z71.string().transform((value) => value.normalize("NFC").trim()).pipe(z71.string().min(1).max(SUBMISSION_REVIEW_FEEDBACK_NOTE_MAX).refine((value) => (
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 = z71.enum(["agree", "disagree"]);
17806
+ var SubmissionReviewFeedbackVerdictSchema = z72.enum(["agree", "disagree"]);
17748
17807
  var SubmissionReviewFeedbackInputSchema = SubmissionReviewRunInputSchema.extend({
17749
17808
  submissionId: id2,
17750
- assessmentId: z71.string().uuid(),
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: z71.string().uuid().transform((value) => value.toLowerCase()),
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: z71.string().uuid().transform((value) => value.toLowerCase()),
17759
- grantExpiresAt: z71.number().int().positive().safe(),
17760
- grantSignature: z71.string().regex(/^0x[0-9a-fA-F]+$/).max(2048)
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 = z71.object({
17821
+ var SubmissionReviewFeedbackEntrySchema = z72.object({
17763
17822
  target: SubmissionReviewFeedbackTargetSchema,
17764
17823
  verdict: SubmissionReviewFeedbackVerdictSchema,
17765
- note: z71.string().nullable(),
17766
- createdAt: z71.string().datetime()
17824
+ note: z72.string().nullable(),
17825
+ createdAt: z72.string().datetime()
17767
17826
  });
17768
- var SubmissionReviewFeedbackOutputSchema = z71.object({
17769
- feedbackId: z71.string().uuid(),
17770
- createdAt: z71.string().datetime()
17827
+ var SubmissionReviewFeedbackOutputSchema = z72.object({
17828
+ feedbackId: z72.string().uuid(),
17829
+ createdAt: z72.string().datetime()
17771
17830
  });
17772
- var SubmissionReviewJobStatusSchema = z71.enum([
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 = z71.enum([
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 = z71.object({
17794
- compliance: z71.enum(["supported", "pending", "unmet"]),
17795
- qualityScore: z71.number().min(0).max(4).nullable(),
17796
- qualityBand: z71.enum(["strong", "mixed", "weak"]).nullable(),
17797
- recommendation: z71.enum(["shortlist", "review"]),
17798
- coverage: z71.object({
17799
- supported: z71.number().int(),
17800
- unmet: z71.number().int(),
17801
- pending: z71.number().int(),
17802
- required: z71.number().int()
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 = z71.object({
17806
- available: z71.boolean(),
17807
- reason: z71.enum([
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 = z71.object({
17818
- name: z71.literal("Submission Review"),
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: z71.literal("free_pilot"),
17823
- runSupplierCeilingMicroUsd: z71.literal("1000000"),
17824
- supportedMedia: z71.array(z71.string())
17881
+ requesterPrice: z72.literal("free_pilot"),
17882
+ runSupplierCeilingMicroUsd: z72.literal("1000000"),
17883
+ supportedMedia: z72.array(z72.string())
17825
17884
  });
17826
- var SubmissionReviewPreviewOutputSchema = z71.object({
17885
+ var SubmissionReviewPreviewOutputSchema = z72.object({
17827
17886
  taskId: id2,
17828
- chainId: z71.number().int(),
17829
- brief: z71.string(),
17887
+ chainId: z72.number().int(),
17888
+ brief: z72.string(),
17830
17889
  briefSha256: hash,
17831
17890
  profile: SubmissionReviewProfileOutputSchema,
17832
17891
  sourceFingerprint: hash,
17833
- submissionIds: z71.array(id2),
17834
- totalLatestSubmissions: z71.number().int(),
17835
- supportedSubmissions: z71.number().int(),
17836
- unsupportedSubmissions: z71.number().int(),
17837
- imageArtifacts: z71.number().int(),
17838
- canStart: z71.boolean(),
17839
- activeRunId: z71.string().uuid().nullable(),
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: z71.array(z71.string())
17900
+ limitations: z72.array(z72.string())
17842
17901
  });
17843
- var SubmissionReviewRunSummarySchema = z71.object({
17844
- runId: z71.string().uuid(),
17845
- idempotencyKey: z71.string().uuid(),
17902
+ var SubmissionReviewRunSummarySchema = z72.object({
17903
+ runId: z72.string().uuid(),
17904
+ idempotencyKey: z72.string().uuid(),
17846
17905
  taskId: id2,
17847
- chainId: z71.number().int(),
17906
+ chainId: z72.number().int(),
17848
17907
  profile: SubmissionReviewPublicProfileSchema,
17849
17908
  status: SubmissionReviewJobStatusSchema,
17850
- errorCode: z71.string().nullable(),
17851
- createdAt: z71.string().datetime(),
17852
- expiresAt: z71.string().datetime(),
17853
- total: z71.number().int(),
17854
- completed: z71.number().int(),
17855
- failed: z71.number().int(),
17856
- unsupported: z71.number().int(),
17857
- pending: z71.number().int(),
17858
- estimatedSupplierMicroUsd: z71.string().regex(/^\d+$/),
17859
- heldSupplierMicroUsd: z71.string().regex(/^\d+$/),
17860
- sourceChanged: z71.boolean()
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: z71.number().int().min(1).max(100).default(20),
17864
- cursor: z71.string().uuid().optional()
17922
+ limit: z72.number().int().min(1).max(100).default(20),
17923
+ cursor: z72.string().uuid().optional()
17865
17924
  }).strict();
17866
- var SubmissionReviewHistoryOutputSchema = z71.object({
17867
- runs: z71.array(SubmissionReviewRunSummarySchema),
17868
- nextCursor: z71.string().uuid().nullable()
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 = z71.enum(["clarity", "visual_coherence", "distinctiveness", "finish"]);
17888
- var EvidenceKind = z71.enum(["source_text", "visual_observation", "external_snapshot", "metadata"]);
17889
- var PublicHttpsUrl = z71.string().url().max(2048).refine((value) => {
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 = z71.discriminatedUnion("kind", [
17898
- z71.object({ kind: z71.literal("open_link"), url: PublicHttpsUrl }).strict(),
17899
- z71.object({ kind: z71.literal("view_artifact"), artifactId: id2 }).strict()
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 = z71.object({
17902
- findings: z71.array(z71.object({
17960
+ var SubmissionReviewExplanationsSchema = z72.object({
17961
+ findings: z72.array(z72.object({
17903
17962
  requirementId: id2,
17904
- reason: z71.enum(SUBMISSION_REVIEW_PENDING_REASONS),
17963
+ reason: z72.enum(SUBMISSION_REVIEW_PENDING_REASONS),
17905
17964
  action: SubmissionReviewResolveActionSchema
17906
17965
  }).strict()).max(32),
17907
- quality: z71.array(z71.object({
17966
+ quality: z72.array(z72.object({
17908
17967
  dimension: QualityDimension,
17909
- reason: z71.enum(SUBMISSION_REVIEW_WITHHELD_REASONS),
17968
+ reason: z72.enum(SUBMISSION_REVIEW_WITHHELD_REASONS),
17910
17969
  action: SubmissionReviewResolveActionSchema
17911
17970
  }).strict()).max(4)
17912
17971
  }).strict();
17913
- var SubmissionReviewDecisionModelSchema = z71.object({ model: id2, builds: z71.array(id2).max(8) }).strict().nullable();
17914
- var SubmissionReviewCardReasonSchema = z71.object({
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: z71.enum(["supported", "unmet", "pending"]),
17917
- sourceQuote: z71.string().min(1).max(280),
17918
- evidence: z71.object({ kind: EvidenceKind, excerpt: z71.string().max(280), artifactId: id2.optional() }).strict().nullable(),
17919
- pendingReason: z71.enum(SUBMISSION_REVIEW_PENDING_REASONS).nullable()
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 = z71.array(z71.enum(SUBMISSION_REVIEW_OUTDATED_REASONS)).min(1).max(3).nullable();
17927
- var SubmissionReviewUpgradeSchema = z71.object({
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: z71.array(id2).min(1).max(100),
17930
- estimatedUsd: z71.string().regex(/^\d+\.\d{2}$/)
17988
+ submissionIds: z72.array(id2).min(1).max(100),
17989
+ estimatedUsd: z72.string().regex(/^\d+\.\d{2}$/)
17931
17990
  }).nullable();
17932
- var SubmissionReviewResultRowSchema = z71.object({
17991
+ var SubmissionReviewResultRowSchema = z72.object({
17933
17992
  submissionId: id2,
17934
17993
  workerAddress: EthAddressSchema,
17935
- submittedAt: z71.string().datetime(),
17994
+ submittedAt: z72.string().datetime(),
17936
17995
  state: SubmissionReviewResultStateSchema,
17937
- runId: z71.string().uuid().nullable(),
17938
- assessmentId: z71.string().uuid().nullable(),
17996
+ runId: z72.string().uuid().nullable(),
17997
+ assessmentId: z72.string().uuid().nullable(),
17939
17998
  profileFingerprint: hash.nullable(),
17940
17999
  summary: SubmissionReviewSummarySchema.nullable(),
17941
- corrected: z71.boolean(),
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: z71.string().uuid().optional(),
17948
- compliance: z71.enum(["supported", "pending", "unmet"]).optional(),
17949
- qualityBand: z71.enum(["strong", "mixed", "weak"]).optional(),
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: z71.boolean().optional(),
17952
- sort: z71.enum(["rank", "newest"]).default("rank"),
17953
- limit: z71.number().int().min(1).max(100).default(24),
17954
- cursor: z71.string().max(2048).optional()
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 = z71.object({
17957
- rows: z71.array(SubmissionReviewResultRowSchema),
17958
- total: z71.number().int(),
18015
+ var SubmissionReviewResultsOutputSchema = z72.object({
18016
+ rows: z72.array(SubmissionReviewResultRowSchema),
18017
+ total: z72.number().int(),
17959
18018
  profileFingerprint: hash.nullable(),
17960
- nextCursor: z71.string().nullable(),
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 = z71.object({
17968
- runId: z71.string().uuid(),
17969
- assessmentId: z71.string().uuid(),
18026
+ var SubmissionReviewAssessmentOutputSchema = z72.object({
18027
+ runId: z72.string().uuid(),
18028
+ assessmentId: z72.string().uuid(),
17970
18029
  profile: SubmissionReviewPublicProfileSchema,
17971
- brief: z71.string(),
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: z71.boolean(),
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: z71.array(SubmissionReviewFeedbackEntrySchema).max(64).default([]),
17983
- corrections: z71.array(z71.object({
17984
- id: z71.string().uuid(),
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: z71.string().datetime(),
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 z72 } from "zod";
18098
+ import { z as z73 } from "zod";
18040
18099
  var BUG_REPORT_SOURCES = ["cli", "web", "agent"];
18041
- var BugReportSourceSchema = z72.enum(BUG_REPORT_SOURCES);
18100
+ var BugReportSourceSchema = z73.enum(BUG_REPORT_SOURCES);
18042
18101
  var BUG_REPORT_SEVERITIES = ["low", "medium", "high", "blocker"];
18043
- var BugReportSeveritySchema = z72.enum(BUG_REPORT_SEVERITIES);
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 = z72.enum(BUG_REPORT_STATUSES);
18111
+ var BugReportStatusSchema = z73.enum(BUG_REPORT_STATUSES);
18053
18112
  var BUG_REPORT_VISIBILITIES = ["public", "private"];
18054
- var BugReportVisibilitySchema = z72.enum(BUG_REPORT_VISIBILITIES);
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) => z72.string().max(max);
18060
- var BugReportContextSchema = z72.object({
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: z72.string().regex(/^0x[0-9a-fA-F]{64}$/).optional(),
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 = z72.object({
18077
- title: z72.string().trim().min(1).max(BUG_REPORT_TITLE_MAX_CHARS),
18078
- description: z72.string().trim().min(1).refine((value) => utf8Bytes(value) <= BUG_REPORT_DESCRIPTION_MAX_BYTES, {
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: z72.string().max(128).optional(),
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 = z72.object({
18089
- id: z72.string().uuid(),
18090
- duplicate: z72.boolean()
18147
+ var SubmitBugReportOutputSchema = z73.object({
18148
+ id: z73.string().uuid(),
18149
+ duplicate: z73.boolean()
18091
18150
  });
18092
- var BugReportSchema = z72.object({
18093
- id: z72.string().uuid(),
18151
+ var BugReportSchema = z73.object({
18152
+ id: z73.string().uuid(),
18094
18153
  /** The public report number, shown as #N (ADR-0321). */
18095
- number: z72.number().int(),
18154
+ number: z73.number().int(),
18096
18155
  visibility: BugReportVisibilitySchema,
18097
- title: z72.string(),
18098
- description: z72.string(),
18156
+ title: z73.string(),
18157
+ description: z73.string(),
18099
18158
  severity: BugReportSeveritySchema,
18100
18159
  source: BugReportSourceSchema,
18101
18160
  status: BugReportStatusSchema,
18102
- duplicateOfId: z72.string().uuid().nullable(),
18103
- githubIssueNumber: z72.number().int().nullable(),
18104
- githubIssueUrl: z72.string().url().nullable(),
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: z72.boolean(),
18107
- context: z72.record(z72.unknown()),
18108
- createdAt: z72.string(),
18109
- updatedAt: z72.string()
18165
+ unread: z73.boolean(),
18166
+ context: z73.record(z73.unknown()),
18167
+ createdAt: z73.string(),
18168
+ updatedAt: z73.string()
18110
18169
  });
18111
- var ListMyBugReportsInputSchema = z72.object({
18170
+ var ListMyBugReportsInputSchema = z73.object({
18112
18171
  status: BugReportStatusSchema.optional(),
18113
- limit: z72.number().int().min(1).max(100).default(50)
18172
+ limit: z73.number().int().min(1).max(100).default(50)
18114
18173
  }).default({});
18115
- var ListMyBugReportsOutputSchema = z72.object({ reports: z72.array(BugReportSchema) });
18116
- var GetBugReportInputSchema = z72.object({ id: z72.string().uuid() });
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: z72.string(),
18120
- reporterAgentId: z72.string().nullable(),
18121
- reporterIp: z72.string().nullable(),
18122
- staffNote: z72.string().nullable()
18178
+ reporterAddress: z73.string(),
18179
+ reporterAgentId: z73.string().nullable(),
18180
+ reporterIp: z73.string().nullable(),
18181
+ staffNote: z73.string().nullable()
18123
18182
  });
18124
- var ListStaffBugReportsInputSchema = z72.object({
18183
+ var ListStaffBugReportsInputSchema = z73.object({
18125
18184
  status: BugReportStatusSchema.optional(),
18126
18185
  source: BugReportSourceSchema.optional(),
18127
18186
  severity: BugReportSeveritySchema.optional(),
18128
- createdFrom: z72.string().datetime().optional(),
18129
- createdTo: z72.string().datetime().optional(),
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: z72.boolean().optional(),
18132
- limit: z72.number().int().min(1).max(200).default(50),
18133
- offset: z72.number().int().min(0).default(0)
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 = z72.object({
18136
- reports: z72.array(BugReportStaffViewSchema),
18137
- total: z72.number().int()
18194
+ var ListStaffBugReportsOutputSchema = z73.object({
18195
+ reports: z73.array(BugReportStaffViewSchema),
18196
+ total: z73.number().int()
18138
18197
  });
18139
- var UpdateBugReportInputSchema = z72.object({
18140
- id: z72.string().uuid(),
18198
+ var UpdateBugReportInputSchema = z73.object({
18199
+ id: z73.string().uuid(),
18141
18200
  status: BugReportStatusSchema.optional(),
18142
- duplicateOfId: z72.string().uuid().optional(),
18143
- staffNote: z72.string().max(BUG_REPORT_STAFF_NOTE_MAX_CHARS).nullable().optional(),
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 = z72.enum(BUG_REPORT_MESSAGE_AUTHOR_KINDS);
18159
- var BugReportMessageBodySchema = z72.string().trim().min(1).refine((value) => utf8Bytes(value) <= BUG_REPORT_DESCRIPTION_MAX_BYTES, {
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 = z72.object({
18163
- id: z72.string().uuid(),
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: z72.string(),
18167
- body: z72.string(),
18168
- createdAt: z72.string(),
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: z72.boolean()
18229
+ isNew: z73.boolean()
18171
18230
  });
18172
18231
  var BugReportDetailSchema = BugReportSchema.extend({
18173
- messages: z72.array(BugReportMessageSchema)
18232
+ messages: z73.array(BugReportMessageSchema)
18174
18233
  });
18175
18234
  var BugReportStaffDetailSchema = BugReportStaffViewSchema.extend({
18176
- messages: z72.array(BugReportMessageSchema)
18177
- });
18178
- var PostBugReportMessageInputSchema = z72.object({ id: z72.string().uuid(), body: BugReportMessageBodySchema }).strict();
18179
- var PublicBugReportSchema = z72.object({
18180
- id: z72.string().uuid(),
18181
- number: z72.number().int(),
18182
- title: z72.string(),
18183
- description: z72.string(),
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: z72.string().uuid().nullable(),
18188
- reporterAddress: z72.string(),
18189
- reporterAgentId: z72.string().nullable(),
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: z72.string().nullable().optional(),
18192
- context: z72.record(z72.unknown()),
18250
+ reporterDisplayName: z73.string().nullable().optional(),
18251
+ context: z73.record(z73.unknown()),
18193
18252
  /** Wallets that said "I have this too". */
18194
- affectedCount: z72.number().int(),
18195
- commentCount: z72.number().int(),
18196
- createdAt: z72.string(),
18197
- updatedAt: z72.string()
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 = z72.object({
18259
+ var ListPublicBugReportsInputSchema = z73.object({
18201
18260
  status: BugReportStatusSchema.optional(),
18202
18261
  /** Matched case-insensitively against the title and description. */
18203
- query: z72.string().trim().min(1).max(200).optional(),
18204
- sort: z72.enum(PUBLIC_BUG_REPORT_SORTS).default("newest"),
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(z72.number().int().min(1).max(100)).default(50),
18207
- offset: coerceNumber(z72.number().int().min(0)).default(0)
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 = z72.object({
18210
- reports: z72.array(PublicBugReportSchema),
18211
- total: z72.number().int()
18212
- });
18213
- var BugReportCommentSchema = z72.object({
18214
- id: z72.string().uuid(),
18215
- authorAddress: z72.string(),
18216
- authorAgentId: z72.string().nullable(),
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: z72.string().nullable().optional(),
18277
+ authorDisplayName: z73.string().nullable().optional(),
18219
18278
  /** The comment is by the report's reporter. */
18220
- isReporter: z72.boolean(),
18279
+ isReporter: z73.boolean(),
18221
18280
  /** Taskmarket staff wrote it; `authorAddress` is then not a wallet. */
18222
- isStaff: z72.boolean(),
18223
- body: z72.string(),
18224
- createdAt: z72.string()
18281
+ isStaff: z73.boolean(),
18282
+ body: z73.string(),
18283
+ createdAt: z73.string()
18225
18284
  });
18226
18285
  var BugReportStaffCommentSchema = BugReportCommentSchema.extend({
18227
- hiddenAt: z72.string().nullable(),
18228
- hiddenBy: z72.string().nullable(),
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: z72.boolean()
18289
+ authorBlocked: z73.boolean()
18231
18290
  });
18232
18291
  var PublicBugReportDetailSchema = PublicBugReportSchema.extend({
18233
- comments: z72.array(BugReportCommentSchema),
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: z72.number().int().nullable(),
18294
+ duplicateOfNumber: z73.number().int().nullable(),
18236
18295
  /** The signed-in viewer said "I have this too"; false when signed out. */
18237
- viewerAffected: z72.boolean()
18296
+ viewerAffected: z73.boolean()
18238
18297
  });
18239
- var GetPublicBugReportInputSchema = z72.object({
18240
- number: coerceNumber(z72.number().int().positive())
18298
+ var GetPublicBugReportInputSchema = z73.object({
18299
+ number: coerceNumber(z73.number().int().positive())
18241
18300
  });
18242
- var MarkBugReportAffectedOutputSchema = z72.object({ affectedCount: z72.number().int() });
18243
- var PostBugReportCommentInputSchema = z72.object({
18244
- id: z72.string().uuid(),
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: z72.string().max(128).optional()
18305
+ agentId: z73.string().max(128).optional()
18247
18306
  }).strict();
18248
18307
  var SignedPostBugReportCommentInputSchema = PostBugReportCommentInputSchema.extend(WalletWriteProofSchema.shape).strict();
18249
- var SetBugReportVisibilityInputSchema = z72.object({ id: z72.string().uuid(), visibility: BugReportVisibilitySchema }).strict();
18308
+ var SetBugReportVisibilityInputSchema = z73.object({ id: z73.string().uuid(), visibility: BugReportVisibilitySchema }).strict();
18250
18309
  var SignedSetBugReportVisibilityInputSchema = SetBugReportVisibilityInputSchema.extend(WalletWriteProofSchema.shape).strict();
18251
- var SignedMarkBugReportAffectedInputSchema = z72.object({ id: z72.string().uuid() }).extend(WalletWriteProofSchema.shape).strict();
18252
- var HideBugReportCommentInputSchema = z72.object({ commentId: z72.string().uuid() }).strict();
18253
- var BlockBugReportCommenterInputSchema = z72.object({ wallet: z72.string().min(1).max(128), reason: z72.string().max(500).optional() }).strict();
18254
- var UnblockBugReportCommenterInputSchema = z72.object({ wallet: z72.string().min(1).max(128) }).strict();
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 = z72.object({
18258
- id: z72.string().uuid(),
18259
- title: z72.string(),
18260
- body: z72.string(),
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: z72.number().int().nullable(),
18263
- createdAt: z72.string()
18321
+ reportNumber: z73.number().int().nullable(),
18322
+ createdAt: z73.string()
18264
18323
  });
18265
- var ActiveBugIncidentNoticeOutputSchema = z72.object({
18324
+ var ActiveBugIncidentNoticeOutputSchema = z73.object({
18266
18325
  notice: BugIncidentNoticeSchema.nullable()
18267
18326
  });
18268
- var PostBugIncidentNoticeInputSchema = z72.object({
18269
- title: z72.string().trim().min(1).max(BUG_INCIDENT_NOTICE_TITLE_MAX_CHARS),
18270
- body: z72.string().trim().min(1).max(BUG_INCIDENT_NOTICE_BODY_MAX_CHARS),
18271
- reportId: z72.string().uuid().optional()
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 = z72.object({ resolved: z72.boolean() });
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 z73 } from "zod";
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 = z73.string().min(2).max(LISTING_SUBMISSION_MAX_BYTES);
18316
- var SubmitCatalogEntryInputSchema = z73.object({
18317
- chainId: z73.number().int().positive().optional(),
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 = z73.object({
18321
- chainId: z73.number().int().positive().optional(),
18379
+ var SubmitHookListingInputSchema = z74.object({
18380
+ chainId: z74.number().int().positive().optional(),
18322
18381
  manifest: HookSubmissionManifestSchema
18323
18382
  }).extend(WalletWriteProofSchema.shape);
18324
- var ListingSubmissionCheckSchema = z73.object({
18325
- name: z73.string(),
18326
- outcome: z73.enum(["pass", "fail", "inconclusive"]),
18327
- detail: z73.string().nullable()
18328
- });
18329
- var ListingSubmissionSchema = z73.object({
18330
- id: z73.string().uuid(),
18331
- kind: z73.enum(LISTING_SUBMISSION_KINDS),
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: z73.string(),
18334
- status: z73.enum(LISTING_SUBMISSION_STATUSES),
18392
+ subject: z74.string(),
18393
+ status: z74.enum(LISTING_SUBMISSION_STATUSES),
18335
18394
  /** Null until the automatic checks have run. */
18336
- checks: z73.array(ListingSubmissionCheckSchema).nullable(),
18337
- rejectionReason: z73.string().nullable(),
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: z73.boolean(),
18340
- createdAt: z73.string(),
18341
- updatedAt: z73.string()
18398
+ listed: z74.boolean(),
18399
+ createdAt: z74.string(),
18400
+ updatedAt: z74.string()
18342
18401
  });
18343
- var ListMyListingSubmissionsInputSchema = z73.object({
18344
- kind: z73.enum(LISTING_SUBMISSION_KINDS),
18345
- status: z73.enum(LISTING_SUBMISSION_STATUSES).optional(),
18346
- limit: z73.number().int().min(1).max(100).default(50)
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 = z73.object({
18349
- submissions: z73.array(ListingSubmissionSchema)
18407
+ var ListMyListingSubmissionsOutputSchema = z74.object({
18408
+ submissions: z74.array(ListingSubmissionSchema)
18350
18409
  });
18351
18410
  var ListingSubmissionStaffViewSchema = ListingSubmissionSchema.extend({
18352
- submitterAddress: z73.string(),
18353
- submitterAgentId: z73.string().nullable(),
18354
- chainId: z73.number().int(),
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: z73.record(z73.string(), z73.unknown()),
18357
- reviewedBy: z73.string().nullable(),
18358
- reviewedAt: z73.string().nullable(),
18359
- prNumber: z73.number().int().nullable()
18360
- });
18361
- var ListStaffListingSubmissionsInputSchema = z73.object({
18362
- kind: z73.enum(LISTING_SUBMISSION_KINDS).optional(),
18363
- status: z73.enum(LISTING_SUBMISSION_STATUSES).optional(),
18364
- limit: z73.number().int().min(1).max(200).default(50),
18365
- offset: z73.number().int().min(0).max(1e5).default(0)
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 = z73.object({
18368
- submissions: z73.array(ListingSubmissionStaffViewSchema),
18369
- total: z73.number().int()
18426
+ var ListStaffListingSubmissionsOutputSchema = z74.object({
18427
+ submissions: z74.array(ListingSubmissionStaffViewSchema),
18428
+ total: z74.number().int()
18370
18429
  });
18371
- var GetListingSubmissionInputSchema = z73.object({ id: z73.string().uuid() });
18372
- var ApproveListingSubmissionInputSchema = z73.object({ id: z73.string().uuid() });
18373
- var RecordListingSubmissionPrInputSchema = z73.object({
18374
- id: z73.string().uuid(),
18375
- prNumber: z73.number().int().positive()
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: z73.boolean()
18437
+ merged: z74.boolean()
18379
18438
  });
18380
- var RejectListingSubmissionInputSchema = z73.object({
18381
- id: z73.string().uuid(),
18382
- reason: z73.string().trim().min(1).max(LISTING_SUBMISSION_REJECTION_MAX_CHARS)
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 z74 } from "zod";
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: z74.string().uuid(),
18438
- skillId: z74.string().uuid(),
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: z74.string().uuid()
18499
+ requestKey: z75.string().uuid()
18441
18500
  };
18442
- var AgentUserSkillBundleWriteSchema = z74.object({
18501
+ var AgentUserSkillBundleWriteSchema = z75.object({
18443
18502
  ...agentSkillWriteBase,
18444
18503
  bundle: UserSkillDraftBundleSchema,
18445
- note: z74.string().trim().max(500).default("")
18504
+ note: z75.string().trim().max(500).default("")
18446
18505
  });
18447
- var AgentUserSkillArchiveWriteSchema = z74.object({
18506
+ var AgentUserSkillArchiveWriteSchema = z75.object({
18448
18507
  ...agentSkillWriteBase,
18449
- removeAssignments: z74.boolean().default(false)
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 = z74.object({
18454
- skillId: z74.string().uuid(),
18455
- version: z74.number().int().positive(),
18456
- revision: z74.number().int().nonnegative()
18457
- });
18458
- var AgentUserSkillArchiveResultSchema = z74.object({
18459
- skillId: z74.string().uuid(),
18460
- archived: z74.literal(true),
18461
- revision: z74.number().int().nonnegative()
18462
- });
18463
- var hostedAgentId = z74.string().uuid().optional();
18464
- var HostedSkillCreateInputSchema = z74.object({
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: z74.string().uuid().optional(),
18525
+ skillId: z75.string().uuid().optional(),
18467
18526
  bundle: UserSkillDraftBundleSchema,
18468
- note: z74.string().trim().max(500).optional()
18527
+ note: z75.string().trim().max(500).optional()
18469
18528
  }).strict();
18470
- var HostedSkillVersionInputSchema = z74.object({
18529
+ var HostedSkillVersionInputSchema = z75.object({
18471
18530
  agentId: hostedAgentId,
18472
- skillId: z74.string().uuid(),
18531
+ skillId: z75.string().uuid(),
18473
18532
  bundle: UserSkillDraftBundleSchema,
18474
- note: z74.string().trim().max(500).optional()
18533
+ note: z75.string().trim().max(500).optional()
18475
18534
  }).strict();
18476
- var HostedSkillArchiveInputSchema = z74.object({
18535
+ var HostedSkillArchiveInputSchema = z75.object({
18477
18536
  agentId: hostedAgentId,
18478
- skillId: z74.string().uuid(),
18479
- removeAssignments: z74.boolean().optional()
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: z74.string().uuid().optional(),
18484
- confirmExclusions: z74.boolean().optional(),
18485
- note: z74.string().trim().max(500).optional()
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 = z74.object({
18546
+ var HostedSkillUpdateInputSchema = z75.object({
18488
18547
  agentId: hostedAgentId,
18489
- skillId: z74.string().uuid(),
18490
- confirmExclusions: z74.boolean().optional(),
18491
- note: z74.string().trim().max(500).optional()
18548
+ skillId: z75.string().uuid(),
18549
+ confirmExclusions: z75.boolean().optional(),
18550
+ note: z75.string().trim().max(500).optional()
18492
18551
  }).strict();
18493
- var HostedSkillListInputSchema = z74.object({ agentId: hostedAgentId }).strict();
18494
- var HostedSkillShowInputSchema = z74.object({
18552
+ var HostedSkillListInputSchema = z75.object({ agentId: hostedAgentId }).strict();
18553
+ var HostedSkillShowInputSchema = z75.object({
18495
18554
  agentId: hostedAgentId,
18496
- skillId: z74.string().uuid(),
18497
- version: z74.number().int().positive().optional(),
18498
- path: z74.string().min(1).max(240).optional(),
18499
- offset: z74.number().int().nonnegative().optional()
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 = z74.discriminatedUnion("kind", [
18502
- z74.object({ kind: z74.literal("upload") }),
18503
- z74.object({ kind: z74.literal("agent"), agentId: z74.string().uuid() }),
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 = z74.object({
18572
+ var HostedSkillShareInputSchema = z75.object({
18514
18573
  agentId: hostedAgentId,
18515
- skillId: z74.string().uuid(),
18516
- version: z74.number().int().positive().optional(),
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: z74.string().uuid()
18577
+ toAgentId: z75.string().uuid()
18519
18578
  }).strict();
18520
- var AgentUserSkillShareWriteSchema = z74.object({
18521
- agentId: z74.string().uuid(),
18522
- skillId: z74.string().uuid(),
18523
- version: z74.number().int().positive().optional(),
18524
- toAgentId: z74.string().uuid(),
18525
- requestKey: z74.string().uuid()
18526
- });
18527
- var AgentUserSkillShareResultSchema = z74.object({
18528
- skillId: z74.string().uuid(),
18529
- version: z74.number().int().positive(),
18530
- toAgentId: z74.string().uuid(),
18531
- status: z74.enum(["assigned", "pending"]),
18532
- requestId: z74.string().uuid().nullable(),
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: z74.literal(true).optional()
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 z75 } from "zod";
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 = z75.object({
20672
- key: z75.string().regex(/^[a-z][a-zA-Z0-9]*$/),
20673
- label: z75.string().min(1),
20674
- placeholder: z75.string().min(1),
20675
- defaultValue: z75.string().min(1).optional(),
20676
- required: z75.boolean()
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 = z75.object({
20679
- key: z75.string().regex(/^[a-z][a-zA-Z0-9]*$/),
20680
- label: z75.string().min(1),
20681
- help: z75.string().min(1),
20682
- input: z75.enum(["shortText", "longText", "url"]),
20683
- placeholder: z75.string().min(1),
20684
- defaultValue: z75.string().min(1).optional(),
20685
- publicAccess: z75.enum(["required", "notApplicable"]),
20686
- required: z75.boolean()
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: z75.ZodIssueCode.custom,
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) => z75.object({ heading: z75.literal(heading), body: z75.string().min(1) }).strict());
20697
- var baseTemplateSchema = z75.object({
20698
- id: z75.enum(TASK_TEMPLATE_IDS),
20699
- label: z75.string().min(1),
20700
- shortDescription: z75.string().min(1),
20701
- titleTemplate: z75.string().min(1),
20702
- icon: z75.enum([
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: z75.enum(["grid", "rays", "rings", "signal", "steps"]),
20721
- durationHours: z75.number().int().min(24).max(720),
20722
- tags: z75.array(z75.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."),
20723
- bestFor: z75.tuple([z75.string().min(1), z75.string().min(1), z75.string().min(1)]),
20724
- details: z75.object({ includes: z75.string().min(1), success: z75.string().min(1) }).strict(),
20725
- tokens: z75.array(tokenSchema).min(2).max(3),
20726
- readiness: z75.array(readinessItemSchema).min(1).max(3),
20727
- brief: z75.tuple(briefSectionSchemas).readonly()
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 = z75.array(z75.discriminatedUnion("mode", [
20730
- baseTemplateSchema.extend({ mode: z75.literal("bounty") }),
20788
+ var catalogueSchema = z76.array(z76.discriminatedUnion("mode", [
20789
+ baseTemplateSchema.extend({ mode: z76.literal("bounty") }),
20731
20790
  baseTemplateSchema.extend({
20732
- mode: z75.literal("claim"),
20733
- modeDefaults: z75.object({ stakeRequired: z75.literal(false), stakeBps: z75.literal("0") }).strict()
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: z75.literal("pitch"),
20737
- modeDefaults: z75.object({ pitchDeadline: z75.string().regex(/^[1-9]\d*$/) }).strict()
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: z75.literal("benchmark"),
20741
- modeDefaults: z75.object({
20742
- metricDescription: z75.string().min(1),
20743
- metricTarget: z75.string().min(1)
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: z75.literal("auction"),
20748
- modeDefaults: z75.object({
20749
- auctionType: z75.enum(["english", "reverse_english"]),
20750
- bidDeadline: z75.string().regex(/^[1-9]\d*$/)
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,