@mossbear/protocol 0.1.0-alpha.106 → 0.1.0-alpha.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas.d.ts CHANGED
@@ -592,11 +592,35 @@ export declare function displayNameSchema(maxLength: number): v.SchemaWithPipe<r
592
592
  /** A bundle's display name. Bundles are addressed by slug; this is the label. */
593
593
  export declare const BUNDLE_NAME_MAX_LENGTH = 200;
594
594
  export declare const BundleSlugSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
595
+ /**
596
+ * A publisher's lowercase handle: the prefix of a published bundle's address,
597
+ * `<handle>/<slug>` (`mossbear/guides`). Slugs are unique per workspace, so a
598
+ * bare slug names one of the caller's own bundles and a published bundle is
599
+ * named through its publisher.
600
+ */
601
+ export declare const PUBLISHER_HANDLE_PATTERN: RegExp;
602
+ export declare const PublisherHandleSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
603
+ /** The longest publisher name a reader is shown. */
604
+ export declare const PUBLISHER_NAME_MAX_LENGTH = 100;
605
+ /**
606
+ * Who publishes a bundle, as a reader sees it. Present only on a bundle that is
607
+ * published; absent is the ordinary case, a bundle of the caller's own.
608
+ */
609
+ export declare const BundlePublisherSchema: v.ObjectSchema<{
610
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
611
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
612
+ }, undefined>;
613
+ /** A published bundle's address, `<handle>/<slug>`. */
614
+ export declare const PublishedBundleAddressSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 104, undefined>, v.CheckAction<string, "address must be <publisher handle>/<bundle slug>">]>;
615
+ /**
616
+ * An artifact's description as a writer sends it: one paragraph of plain text,
617
+ * with no line breaks or other control characters, so it saves on Enter like a
618
+ * title, prints safely in a terminal, and stays a plain YAML
619
+ * scalar in a Markdown artifact's frontmatter. Blank text is refused rather than
620
+ * stored: `null` is how a description is cleared, so "none" has one shape.
621
+ */
622
+ export declare const ArtifactDescriptionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "description must not be blank">, v.MaxLengthAction<string, 1000, "description must be at most 1000 characters">, v.CheckAction<string, "description must be one line of text, with no control characters">]>;
595
623
  export declare const BundleSchema: v.ObjectSchema<{
596
- readonly id: v.StringSchema<undefined>;
597
- readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
598
- readonly name: v.StringSchema<undefined>;
599
- readonly createdAt: v.StringSchema<undefined>;
600
624
  /**
601
625
  * The project id of the repo that owns this bundle's items, when one claims it
602
626
  * (`subscription-delivery-target-plan.md` → slice 3). Absent is the ordinary
@@ -609,13 +633,19 @@ export declare const BundleSchema: v.ObjectSchema<{
609
633
  * server's listing unchanged.
610
634
  */
611
635
  readonly home: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
636
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
637
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
638
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
639
+ }, undefined>, undefined>;
640
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
641
+ readonly id: v.StringSchema<undefined>;
642
+ readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
643
+ readonly name: v.StringSchema<undefined>;
644
+ readonly createdAt: v.StringSchema<undefined>;
645
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
612
646
  }, undefined>;
613
647
  export declare const BundleListResponseSchema: v.ObjectSchema<{
614
648
  readonly bundles: v.ArraySchema<v.ObjectSchema<{
615
- readonly id: v.StringSchema<undefined>;
616
- readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
617
- readonly name: v.StringSchema<undefined>;
618
- readonly createdAt: v.StringSchema<undefined>;
619
649
  /**
620
650
  * The project id of the repo that owns this bundle's items, when one claims it
621
651
  * (`subscription-delivery-target-plan.md` → slice 3). Absent is the ordinary
@@ -628,6 +658,16 @@ export declare const BundleListResponseSchema: v.ObjectSchema<{
628
658
  * server's listing unchanged.
629
659
  */
630
660
  readonly home: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
661
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
662
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
663
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
664
+ }, undefined>, undefined>;
665
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
666
+ readonly id: v.StringSchema<undefined>;
667
+ readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
668
+ readonly name: v.StringSchema<undefined>;
669
+ readonly createdAt: v.StringSchema<undefined>;
670
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
631
671
  }, undefined>, undefined>;
632
672
  }, undefined>;
633
673
  /**
@@ -687,6 +727,17 @@ export declare const SubscriptionScopeSchema: v.PicklistSchema<["repo", "user"],
687
727
  */
688
728
  export declare const DeliverTargetSchema: v.PicklistSchema<["repo", "global"], undefined>;
689
729
  export declare const ResolvedSubscriptionSchema: v.ObjectSchema<{
730
+ /**
731
+ * The address this bundle was resolved from, when the caller named it as
732
+ * `<handle>/<slug>` in `repoBundleAddresses` rather than by id. Lets the
733
+ * caller pair each committed address with the id it stands for.
734
+ */
735
+ readonly address: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 104, undefined>, v.CheckAction<string, "address must be <publisher handle>/<bundle slug>">]>, undefined>;
736
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
737
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
738
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
739
+ }, undefined>, undefined>;
740
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
690
741
  readonly id: v.StringSchema<undefined>;
691
742
  readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
692
743
  readonly name: v.StringSchema<undefined>;
@@ -742,12 +793,31 @@ export declare const ResolvedSubscriptionSchema: v.ObjectSchema<{
742
793
  * being refused as bad input. Raised by Codex on #735.
743
794
  */
744
795
  export declare const MAX_REPO_BUNDLE_IDS = 500;
796
+ /** Capped for the reason `MAX_REPO_BUNDLE_IDS` gives. */
797
+ export declare const MAX_REPO_BUNDLE_ADDRESSES = 64;
745
798
  export declare const ResolveSubscriptionsRequestSchema: v.ObjectSchema<{
746
799
  readonly repoBundleIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MaxLengthAction<string[], 500, undefined>]>;
800
+ /**
801
+ * Published bundles the committed config names by address,
802
+ * `<handle>/<slug>`, rather than by id. Optional, so a CLI that sends only
803
+ * ids is answered as before.
804
+ */
805
+ readonly repoBundleAddresses: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 104, undefined>, v.CheckAction<string, "address must be <publisher handle>/<bundle slug>">]>, undefined>, v.MaxLengthAction<string[], 64, undefined>]>, undefined>;
747
806
  }, undefined>;
748
807
  export declare const ResolveSubscriptionsResponseSchema: v.ObjectSchema<{
749
808
  /** The effective delivery set, de-duplicated by bundle id. */
750
809
  readonly bundles: v.ArraySchema<v.ObjectSchema<{
810
+ /**
811
+ * The address this bundle was resolved from, when the caller named it as
812
+ * `<handle>/<slug>` in `repoBundleAddresses` rather than by id. Lets the
813
+ * caller pair each committed address with the id it stands for.
814
+ */
815
+ readonly address: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 104, undefined>, v.CheckAction<string, "address must be <publisher handle>/<bundle slug>">]>, undefined>;
816
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
817
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
818
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
819
+ }, undefined>, undefined>;
820
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
751
821
  readonly id: v.StringSchema<undefined>;
752
822
  readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
753
823
  readonly name: v.StringSchema<undefined>;
@@ -793,10 +863,24 @@ export declare const ResolveSubscriptionsResponseSchema: v.ObjectSchema<{
793
863
  * Committed ids the caller cannot see. **Reported, never dropped** — the line
794
864
  * was put in the config deliberately by whoever owns the repo, so a non-member
795
865
  * gets a named failure rather than deletion advice.
866
+ *
867
+ * It also names the caller's **account** subscriptions whose bundle they can
868
+ * no longer read: one unpublished, or in a workspace they left. The row is
869
+ * still theirs, so a sync must hold retirement for it as for a repo id it
870
+ * cannot see, rather than read its absence as an empty bundle.
796
871
  */
797
872
  readonly unresolved: v.ArraySchema<v.ObjectSchema<{
798
873
  readonly id: v.StringSchema<undefined>;
799
874
  }, undefined>, undefined>;
875
+ /**
876
+ * Committed addresses (`repoBundleAddresses`) that name no published bundle.
877
+ * Kept apart from `unresolved`, whose entries are ids, so a CLI that reads
878
+ * `id` off every entry is never handed one without it. Absent when the
879
+ * request named no address.
880
+ */
881
+ readonly unresolvedAddresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
882
+ readonly address: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 104, undefined>, v.CheckAction<string, "address must be <publisher handle>/<bundle slug>">]>;
883
+ }, undefined>, undefined>, undefined>;
800
884
  /**
801
885
  * Account-level settings the sync needs, carried on the response every sync
802
886
  * already fetches rather than on a request of their own.
@@ -873,16 +957,13 @@ export declare const SubscribeBundleResponseSchema: v.ObjectSchema<{
873
957
  readonly muted: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
874
958
  }, undefined>;
875
959
  export declare const CreateBundleRequestSchema: v.ObjectSchema<{
960
+ readonly description: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "description must not be blank">, v.MaxLengthAction<string, 1000, "description must be at most 1000 characters">, v.CheckAction<string, "description must be one line of text, with no control characters">]>, undefined>, undefined>;
876
961
  readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
877
962
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>, v.CheckAction<string, "Remove the invisible characters from this name — copying text from another app often brings them along.">, v.RegexAction<string, "Remove the invisible characters from this name — copying text from another app often brings them along.">]>;
878
963
  readonly workspaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
879
964
  }, undefined>;
880
965
  export declare const CreateBundleResponseSchema: v.ObjectSchema<{
881
966
  readonly bundle: v.ObjectSchema<{
882
- readonly id: v.StringSchema<undefined>;
883
- readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
884
- readonly name: v.StringSchema<undefined>;
885
- readonly createdAt: v.StringSchema<undefined>;
886
967
  /**
887
968
  * The project id of the repo that owns this bundle's items, when one claims it
888
969
  * (`subscription-delivery-target-plan.md` → slice 3). Absent is the ordinary
@@ -895,6 +976,16 @@ export declare const CreateBundleResponseSchema: v.ObjectSchema<{
895
976
  * server's listing unchanged.
896
977
  */
897
978
  readonly home: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
979
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
980
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
981
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
982
+ }, undefined>, undefined>;
983
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
984
+ readonly id: v.StringSchema<undefined>;
985
+ readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
986
+ readonly name: v.StringSchema<undefined>;
987
+ readonly createdAt: v.StringSchema<undefined>;
988
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
898
989
  }, undefined>;
899
990
  }, undefined>;
900
991
  export declare const SCOPED_TOKEN_MAX_GRANTS = 200;
@@ -1039,17 +1130,15 @@ export declare const UpdateBundleRequestSchema: v.SchemaWithPipe<readonly [v.Obj
1039
1130
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>, v.CheckAction<string, "Remove the invisible characters from this name — copying text from another app often brings them along.">, v.RegexAction<string, "Remove the invisible characters from this name — copying text from another app often brings them along.">]>, undefined>;
1040
1131
  readonly home: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>;
1041
1132
  readonly columns: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>, v.CheckAction<string[], "columns must not repeat a key">]>, undefined>, undefined>;
1133
+ readonly description: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "description must not be blank">, v.MaxLengthAction<string, 1000, "description must be at most 1000 characters">, v.CheckAction<string, "description must be one line of text, with no control characters">]>, undefined>, undefined>;
1042
1134
  }, undefined>, v.CheckAction<{
1043
1135
  name?: string | undefined;
1044
1136
  home?: string | null | undefined;
1045
1137
  columns?: string[] | null | undefined;
1046
- }, "name, home or columns is required">]>;
1138
+ description?: string | null | undefined;
1139
+ }, "name, home, columns or description is required">]>;
1047
1140
  export declare const UpdateBundleResponseSchema: v.ObjectSchema<{
1048
1141
  readonly bundle: v.ObjectSchema<{
1049
- readonly id: v.StringSchema<undefined>;
1050
- readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
1051
- readonly name: v.StringSchema<undefined>;
1052
- readonly createdAt: v.StringSchema<undefined>;
1053
1142
  /**
1054
1143
  * The project id of the repo that owns this bundle's items, when one claims it
1055
1144
  * (`subscription-delivery-target-plan.md` → slice 3). Absent is the ordinary
@@ -1062,6 +1151,16 @@ export declare const UpdateBundleResponseSchema: v.ObjectSchema<{
1062
1151
  * server's listing unchanged.
1063
1152
  */
1064
1153
  readonly home: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1154
+ readonly publisher: v.OptionalSchema<v.ObjectSchema<{
1155
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 100, undefined>]>;
1156
+ readonly handle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "handle must be lowercase alphanumeric with hyphens">]>;
1157
+ }, undefined>, undefined>;
1158
+ readonly readOnly: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
1159
+ readonly id: v.StringSchema<undefined>;
1160
+ readonly slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "slug must be lowercase alphanumeric with hyphens, at most 64 characters">]>;
1161
+ readonly name: v.StringSchema<undefined>;
1162
+ readonly createdAt: v.StringSchema<undefined>;
1163
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1065
1164
  }, undefined>;
1066
1165
  }, undefined>;
1067
1166
  export declare const DeleteBundleResponseSchema: v.ObjectSchema<{
@@ -1079,14 +1178,6 @@ export declare const ContextItemTypeSchema: v.PicklistSchema<string[], undefined
1079
1178
  export declare const ContextItemTypeFilterSchema: v.PicklistSchema<string[], undefined>;
1080
1179
  export declare const CaptureContentTypeSchema: v.PicklistSchema<("content" | "asset")[], undefined>;
1081
1180
  export { MAX_CONTEXT_CONTENT_BYTES };
1082
- /**
1083
- * An artifact's description as a writer sends it: one paragraph of plain text,
1084
- * with no line breaks or other control characters, so it saves on Enter like a
1085
- * title, prints safely in a terminal, and stays a plain YAML
1086
- * scalar in a Markdown artifact's frontmatter. Blank text is refused rather than
1087
- * stored: `null` is how a description is cleared, so "none" has one shape.
1088
- */
1089
- export declare const ArtifactDescriptionSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "description must not be blank">, v.MaxLengthAction<string, 1000, "description must be at most 1000 characters">, v.CheckAction<string, "description must be one line of text, with no control characters">]>;
1090
1181
  /**
1091
1182
  * Max alias paths one guide reports. Three root instruction files and two
1092
1183
  * skills directories are the whole population today
@@ -1178,6 +1269,7 @@ export declare const CommentFindingStateSchema: v.PicklistSchema<["ready", "wait
1178
1269
  export type CommentFindingState = v.InferOutput<typeof CommentFindingStateSchema>;
1179
1270
  /** Where a commented artifact is published from (`ArtifactComment.publishedFrom`). */
1180
1271
  export declare const CommentPublishedFromSchema: v.ObjectSchema<{
1272
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1181
1273
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1182
1274
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1183
1275
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1253,6 +1345,7 @@ export declare const ArtifactCommentSchema: v.ObjectSchema<{
1253
1345
  * Mossbear-owned.
1254
1346
  */
1255
1347
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
1348
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1256
1349
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1257
1350
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1258
1351
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1383,6 +1476,7 @@ export declare const ContextItemCommentSchema: v.ObjectSchema<{
1383
1476
  * Mossbear-owned.
1384
1477
  */
1385
1478
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
1479
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1386
1480
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1387
1481
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1388
1482
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1486,6 +1580,8 @@ export declare const CommitShaSchema: v.SchemaWithPipe<readonly [v.StringSchema<
1486
1580
  * projection path that publication and delivery could disagree about.
1487
1581
  */
1488
1582
  export declare const GitSourceSchema: v.ObjectSchema<{
1583
+ /** Unverified display label, never an ownership key or a remote URL. */
1584
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1489
1585
  /**
1490
1586
  * The committed `project.id` of the source repository — the same id space as
1491
1587
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -1676,6 +1772,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1676
1772
  * Mossbear-owned.
1677
1773
  */
1678
1774
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
1775
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1679
1776
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1680
1777
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1681
1778
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -1767,6 +1864,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1767
1864
  approved?: boolean | undefined;
1768
1865
  findingState?: "ready" | "waiting" | undefined;
1769
1866
  publishedFrom?: {
1867
+ repository?: string | undefined;
1770
1868
  projectId: string;
1771
1869
  branch: string | null;
1772
1870
  thisRepo?: boolean | undefined;
@@ -1809,6 +1907,8 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1809
1907
  * without a usable path is a broken item, not a broken response.
1810
1908
  */
1811
1909
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
1910
+ /** Unverified display label, never an ownership key or a remote URL. */
1911
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
1812
1912
  /**
1813
1913
  * The committed `project.id` of the source repository — the same id space as
1814
1914
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -1918,6 +2018,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1918
2018
  approved?: boolean | undefined;
1919
2019
  findingState?: "ready" | "waiting" | undefined;
1920
2020
  publishedFrom?: {
2021
+ repository?: string | undefined;
1921
2022
  projectId: string;
1922
2023
  branch: string | null;
1923
2024
  thisRepo?: boolean | undefined;
@@ -1935,6 +2036,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1935
2036
  }[] | undefined;
1936
2037
  updatedAt: string;
1937
2038
  gitSource?: {
2039
+ repository?: string | undefined;
1938
2040
  projectId: string;
1939
2041
  commitSha: string;
1940
2042
  branch?: string | undefined;
@@ -1993,6 +2095,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
1993
2095
  approved?: boolean | undefined;
1994
2096
  findingState?: "ready" | "waiting" | undefined;
1995
2097
  publishedFrom?: {
2098
+ repository?: string | undefined;
1996
2099
  projectId: string;
1997
2100
  branch: string | null;
1998
2101
  thisRepo?: boolean | undefined;
@@ -2010,6 +2113,7 @@ export declare const ContextItemSchema: v.SchemaWithPipe<readonly [v.ObjectSchem
2010
2113
  }[] | undefined;
2011
2114
  updatedAt: string;
2012
2115
  gitSource?: {
2116
+ repository?: string | undefined;
2013
2117
  projectId: string;
2014
2118
  commitSha: string;
2015
2119
  branch?: string | undefined;
@@ -2188,6 +2292,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2188
2292
  * Mossbear-owned.
2189
2293
  */
2190
2294
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
2295
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
2191
2296
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2192
2297
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
2193
2298
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -2279,6 +2384,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2279
2384
  approved?: boolean | undefined;
2280
2385
  findingState?: "ready" | "waiting" | undefined;
2281
2386
  publishedFrom?: {
2387
+ repository?: string | undefined;
2282
2388
  projectId: string;
2283
2389
  branch: string | null;
2284
2390
  thisRepo?: boolean | undefined;
@@ -2321,6 +2427,8 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2321
2427
  * without a usable path is a broken item, not a broken response.
2322
2428
  */
2323
2429
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
2430
+ /** Unverified display label, never an ownership key or a remote URL. */
2431
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
2324
2432
  /**
2325
2433
  * The committed `project.id` of the source repository — the same id space as
2326
2434
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -2430,6 +2538,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2430
2538
  approved?: boolean | undefined;
2431
2539
  findingState?: "ready" | "waiting" | undefined;
2432
2540
  publishedFrom?: {
2541
+ repository?: string | undefined;
2433
2542
  projectId: string;
2434
2543
  branch: string | null;
2435
2544
  thisRepo?: boolean | undefined;
@@ -2447,6 +2556,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2447
2556
  }[] | undefined;
2448
2557
  updatedAt: string;
2449
2558
  gitSource?: {
2559
+ repository?: string | undefined;
2450
2560
  projectId: string;
2451
2561
  commitSha: string;
2452
2562
  branch?: string | undefined;
@@ -2505,6 +2615,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2505
2615
  approved?: boolean | undefined;
2506
2616
  findingState?: "ready" | "waiting" | undefined;
2507
2617
  publishedFrom?: {
2618
+ repository?: string | undefined;
2508
2619
  projectId: string;
2509
2620
  branch: string | null;
2510
2621
  thisRepo?: boolean | undefined;
@@ -2522,6 +2633,7 @@ export declare const ContextItemsResponseSchema: v.ObjectSchema<{
2522
2633
  }[] | undefined;
2523
2634
  updatedAt: string;
2524
2635
  gitSource?: {
2636
+ repository?: string | undefined;
2525
2637
  projectId: string;
2526
2638
  commitSha: string;
2527
2639
  branch?: string | undefined;
@@ -2718,6 +2830,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
2718
2830
  * Mossbear-owned.
2719
2831
  */
2720
2832
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
2833
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
2721
2834
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2722
2835
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
2723
2836
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -2809,6 +2922,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
2809
2922
  approved?: boolean | undefined;
2810
2923
  findingState?: "ready" | "waiting" | undefined;
2811
2924
  publishedFrom?: {
2925
+ repository?: string | undefined;
2812
2926
  projectId: string;
2813
2927
  branch: string | null;
2814
2928
  thisRepo?: boolean | undefined;
@@ -2851,6 +2965,8 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
2851
2965
  * without a usable path is a broken item, not a broken response.
2852
2966
  */
2853
2967
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
2968
+ /** Unverified display label, never an ownership key or a remote URL. */
2969
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
2854
2970
  /**
2855
2971
  * The committed `project.id` of the source repository — the same id space as
2856
2972
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -2960,6 +3076,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
2960
3076
  approved?: boolean | undefined;
2961
3077
  findingState?: "ready" | "waiting" | undefined;
2962
3078
  publishedFrom?: {
3079
+ repository?: string | undefined;
2963
3080
  projectId: string;
2964
3081
  branch: string | null;
2965
3082
  thisRepo?: boolean | undefined;
@@ -2977,6 +3094,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
2977
3094
  }[] | undefined;
2978
3095
  updatedAt: string;
2979
3096
  gitSource?: {
3097
+ repository?: string | undefined;
2980
3098
  projectId: string;
2981
3099
  commitSha: string;
2982
3100
  branch?: string | undefined;
@@ -3035,6 +3153,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
3035
3153
  approved?: boolean | undefined;
3036
3154
  findingState?: "ready" | "waiting" | undefined;
3037
3155
  publishedFrom?: {
3156
+ repository?: string | undefined;
3038
3157
  projectId: string;
3039
3158
  branch: string | null;
3040
3159
  thisRepo?: boolean | undefined;
@@ -3052,6 +3171,7 @@ export declare const BundleArtifactsResponseSchema: v.ObjectSchema<{
3052
3171
  }[] | undefined;
3053
3172
  updatedAt: string;
3054
3173
  gitSource?: {
3174
+ repository?: string | undefined;
3055
3175
  projectId: string;
3056
3176
  commitSha: string;
3057
3177
  branch?: string | undefined;
@@ -3354,6 +3474,7 @@ export declare const ItemCommentWithSubjectSchema: v.ObjectSchema<{
3354
3474
  * Mossbear-owned.
3355
3475
  */
3356
3476
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
3477
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
3357
3478
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3358
3479
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
3359
3480
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -3500,6 +3621,7 @@ export declare const ItemCommentsResponseSchema: v.ObjectSchema<{
3500
3621
  * Mossbear-owned.
3501
3622
  */
3502
3623
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
3624
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
3503
3625
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3504
3626
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
3505
3627
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -4167,6 +4289,8 @@ export declare const ArtifactSchema: v.ObjectSchema<{
4167
4289
  }[], 8, undefined>]>, undefined>;
4168
4290
  /** Present iff git owns this artifact. */
4169
4291
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
4292
+ /** Unverified display label, never an ownership key or a remote URL. */
4293
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4170
4294
  /**
4171
4295
  * The committed `project.id` of the source repository — the same id space as
4172
4296
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -4241,6 +4365,7 @@ export declare const ArtifactSchema: v.ObjectSchema<{
4241
4365
  * Mossbear-owned.
4242
4366
  */
4243
4367
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
4368
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4244
4369
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4245
4370
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4246
4371
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -4332,6 +4457,7 @@ export declare const ArtifactSchema: v.ObjectSchema<{
4332
4457
  approved?: boolean | undefined;
4333
4458
  findingState?: "ready" | "waiting" | undefined;
4334
4459
  publishedFrom?: {
4460
+ repository?: string | undefined;
4335
4461
  projectId: string;
4336
4462
  branch: string | null;
4337
4463
  thisRepo?: boolean | undefined;
@@ -4350,156 +4476,397 @@ export declare const ArtifactSchema: v.ObjectSchema<{
4350
4476
  readonly createdAt: v.StringSchema<undefined>;
4351
4477
  readonly updatedAt: v.StringSchema<undefined>;
4352
4478
  }, undefined>;
4353
- /**
4354
- * A guide publication: the bytes at an agent-guidance path, published from the
4355
- * repository that homes the bundle, land as a guide rather than a document.
4356
- *
4357
- * `format` is the discovery format of the path, the one import records.
4358
- * `members` is a skill's member files, relative to its directory, and is
4359
- * authoritative when present: a stored member it omits is removed, unless it
4360
- * is listed in `skippedPaths` (present at the ref, but not sendable). Only a
4361
- * `skill-md` publication carries members.
4362
- */
4363
- export declare const GuidePublishSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4364
- readonly format: v.PicklistSchema<["agents-md", "agents-dir", "claude-md", "claude-rules", "cursorrules", "cursor-rules", "skill-md"], undefined>;
4365
- readonly members: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
4366
- readonly path: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, v.CheckAction<string, "path must not shadow the skill’s own SKILL.md">]>;
4367
- readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "rawContent must be at most 524288 bytes">]>;
4368
- /** As on {@link RawSkillMemberFileSchema}: absent is not `false`. */
4369
- readonly executable: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4370
- }, undefined>, undefined>, v.MaxLengthAction<{
4371
- path: string;
4372
- content: string;
4373
- executable?: boolean | undefined;
4374
- }[], 64, undefined>, v.CheckAction<{
4375
- path: string;
4376
- content: string;
4377
- executable?: boolean | undefined;
4378
- }[], "member paths must be unique (case-insensitive)">]>, undefined>;
4379
- readonly skippedPaths: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>, undefined>, v.MaxLengthAction<string[], 256, undefined>]>, undefined>;
4380
- /**
4381
- * The repository's other copies of this file, such as a skill's twin in
4382
- * the other skills folder, each published as an alias of this guide rather
4383
- * than a guide of its own. Each must be an alias path of the published one
4384
- * (`aliasPathSiblings`). Additive: an alias it omits is kept.
4385
- */
4386
- readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>, v.MaxLengthAction<string[], 8, undefined>]>, undefined>;
4387
- }, undefined>, v.CheckAction<{
4388
- format: "agents-md" | "agents-dir" | "claude-md" | "claude-rules" | "cursorrules" | "cursor-rules" | "skill-md";
4389
- members?: {
4390
- path: string;
4391
- content: string;
4392
- executable?: boolean | undefined;
4393
- }[] | undefined;
4394
- skippedPaths?: string[] | undefined;
4395
- aliases?: string[] | undefined;
4396
- }, "only a skill-md guide carries members">]>;
4397
- export type GuidePublish = v.InferOutput<typeof GuidePublishSchema>;
4398
- /**
4399
- * Create an artifact. Always a create: it takes no id, and an update is a
4400
- * separate request. `bundle` is optional for an unrestricted caller, who files
4401
- * later; a scoped credential must name a bundle it may write, and the server
4402
- * refuses a scoped create without one.
4403
- */
4404
- /**
4405
- * The identity a guide's files carry with them: a skill's
4406
- * `metadata.mossbear-id`. An opaque lookup key, resolved only inside the
4407
- * publishing workspace, so it grants nothing even though it sits in public
4408
- * repos. Both an artifact id and a `nanoid()` fit it.
4409
- */
4410
- export declare const IdentityKeySchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "an identity key is letters, digits, `-` and `_`">]>;
4411
- /** How many keys one identity lookup may ask about: a declared set, not more. */
4412
- export declare const MAX_IDENTITY_LOOKUP_ENTRIES = 500;
4413
- /**
4414
- * Ask what publishing each key at a path would do in the workspace of `bundle`
4415
- * (a bundle id the publishing repo homes), before anything is sent. Read-only.
4416
- */
4417
- export declare const ResolveIdentitiesRequestSchema: v.StrictObjectSchema<{
4418
- readonly bundle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4419
- readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
4420
- readonly entries: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
4421
- readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "an identity key is letters, digits, `-` and `_`">]>;
4422
- readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>;
4423
- }, undefined>, undefined>, v.MinLengthAction<{
4424
- key: string;
4425
- path: string;
4426
- }[], 1, undefined>, v.MaxLengthAction<{
4427
- key: string;
4428
- path: string;
4429
- }[], 500, undefined>]>;
4430
- }, undefined>;
4431
- /**
4432
- * What a publication carrying a key would do, decided by the server's one
4433
- * transfer rule:
4434
- *
4435
- * - `mint`: no artifact in this workspace holds the key, so a new one takes it.
4436
- * - `current`: this repo's own artifact at this path holds it; an ordinary update.
4437
- * - `move`: this repo's own artifact holds it at another path (a folder rename).
4438
- * - `transfer`: another repo's artifact holds it and its home retired it, so
4439
- * it moves here with its versions, comments and grading.
4440
- * - `refused`: the holder cannot move here now; `refusal` says why and what to do.
4441
- */
4442
- export declare const IdentityClaimKindSchema: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4443
- /** What an artifact carries with it, for a preview to name before a yes. */
4444
- export declare const IdentityHistorySchema: v.ObjectSchema<{
4445
- readonly artifactId: v.StringSchema<undefined>;
4446
- /** Comment threads not yet resolved. */
4447
- readonly openComments: v.NumberSchema<undefined>;
4448
- /** Grading verdicts recorded against it. */
4449
- readonly verdicts: v.NumberSchema<undefined>;
4450
- }, undefined>;
4451
- export declare const IdentityResolutionSchema: v.ObjectSchema<{
4452
- readonly key: v.StringSchema<undefined>;
4453
- readonly path: v.StringSchema<undefined>;
4454
- readonly claim: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4455
- /** The sentence for a `refused` claim, written for whoever published. */
4456
- readonly refusal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4479
+ /** A list row with no body or comment payload; never a full Artifact. */
4480
+ export declare const ArtifactMetadataSchema: v.StrictObjectSchema<Omit<{
4481
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4482
+ readonly name: v.StringSchema<undefined>;
4483
+ readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
4484
+ readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4485
+ /** What the artifact is, as a reader names it: {@link artifactKindOf}. */
4486
+ readonly kind: v.PicklistSchema<readonly ["markdown", "html", "code", "photo", "file", "guide"], undefined>;
4487
+ /** Set when the artifact is a photo: its stored parts, never their bytes. */
4488
+ readonly asset: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
4489
+ readonly parts: v.ArraySchema<v.ObjectSchema<{
4490
+ readonly role: v.PicklistSchema<readonly ["original", "display", "thumb"], undefined>;
4491
+ readonly mediaType: v.PicklistSchema<readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "image/heic", "image/heif"], undefined>;
4492
+ readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4493
+ readonly width: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4494
+ readonly height: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4495
+ }, undefined>, undefined>;
4496
+ }, undefined>, undefined>, undefined>;
4497
+ /** Monotonic content version; echo it back as `expectedVersion` to update. */
4498
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4499
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4500
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4501
+ /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4502
+ readonly capture: v.BooleanSchema<undefined>;
4457
4503
  /**
4458
- * The artifact holding the key. Absent for `mint`, and for a refusal that
4459
- * may not describe it (a holder outside the caller's grants).
4504
+ * When a capture was marked done, which takes it out of the inbox and nothing
4505
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
4460
4506
  */
4461
- readonly holder: v.OptionalSchema<v.ObjectSchema<{
4462
- readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4463
- /** The repo that publishes it, or null for one no repo owns. */
4464
- readonly sourceProjectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4465
- /** Slugs of the bundles holding it, which a transfer leaves when another repo homes them. */
4466
- readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
4467
- readonly artifactId: v.StringSchema<undefined>;
4468
- /** Comment threads not yet resolved. */
4469
- readonly openComments: v.NumberSchema<undefined>;
4470
- /** Grading verdicts recorded against it. */
4471
- readonly verdicts: v.NumberSchema<undefined>;
4472
- }, undefined>, undefined>;
4507
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4508
+ /** Null for binary content, which is not served inline. */
4509
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4473
4510
  /**
4474
- * A different artifact this repo already has at `path`, which a move or a
4475
- * transfer would supersede: switched off and stripped of its path, keeping
4476
- * its own history.
4511
+ * What a person or their agent says about the artifact, as plain text, on
4512
+ * every kind: a Markdown artifact's frontmatter `description` (repeated from
4513
+ * `content`), and a stored field for anything without frontmatter, such as a
4514
+ * photo. Null when there is none. Data, never instructions. Optional because
4515
+ * a server that predates it sends nothing.
4477
4516
  */
4478
- readonly supersedes: v.OptionalSchema<v.ObjectSchema<{
4479
- readonly artifactId: v.StringSchema<undefined>;
4480
- /** Comment threads not yet resolved. */
4481
- readonly openComments: v.NumberSchema<undefined>;
4482
- /** Grading verdicts recorded against it. */
4483
- readonly verdicts: v.NumberSchema<undefined>;
4484
- }, undefined>, undefined>;
4485
- }, undefined>;
4486
- export declare const ResolveIdentitiesResponseSchema: v.ObjectSchema<{
4487
- readonly resolutions: v.ArraySchema<v.ObjectSchema<{
4488
- readonly key: v.StringSchema<undefined>;
4489
- readonly path: v.StringSchema<undefined>;
4490
- readonly claim: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4491
- /** The sentence for a `refused` claim, written for whoever published. */
4492
- readonly refusal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4493
- /**
4494
- * The artifact holding the key. Absent for `mint`, and for a refusal that
4495
- * may not describe it (a holder outside the caller's grants).
4496
- */
4497
- readonly holder: v.OptionalSchema<v.ObjectSchema<{
4498
- readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4499
- /** The repo that publishes it, or null for one no repo owns. */
4500
- readonly sourceProjectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4501
- /** Slugs of the bundles holding it, which a transfer leaves when another repo homes them. */
4502
- readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
4517
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4518
+ readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4519
+ readonly root: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>, undefined>;
4520
+ readonly path: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>, undefined>;
4521
+ readonly projectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4522
+ readonly pathProjectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4523
+ readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4524
+ readonly root: v.PicklistSchema<["project", "global"], undefined>;
4525
+ readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>;
4526
+ }, undefined>, undefined>, v.MaxLengthAction<{
4527
+ root: "project" | "global";
4528
+ path: string;
4529
+ }[], 8, undefined>]>, undefined>;
4530
+ /** Present iff git owns this artifact. */
4531
+ readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
4532
+ /** Unverified display label, never an ownership key or a remote URL. */
4533
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4534
+ /**
4535
+ * The committed `project.id` of the source repository — the same id space as
4536
+ * an item's delivery-scoping `projectId` below, but a different fact: that one
4537
+ * says which repo an item is materialized into and is stamped onto
4538
+ * Mossbear-owned rows too, this one says who may edit it.
4539
+ */
4540
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>;
4541
+ readonly commitSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "commitSha must be 40 or 64 lowercase hex characters">]>;
4542
+ /**
4543
+ * The branch the publishing commit was on. **The one optional member**: a
4544
+ * detached HEAD has none to record. Publishers read it back to tell a copy
4545
+ * from another branch, whose commit a squash merge may have discarded, from
4546
+ * one of the published branch itself.
4547
+ */
4548
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4549
+ }, undefined>, undefined>, undefined>;
4550
+ /** Absent, not empty, when there are none. Absence is not a verdict. */
4551
+ readonly comments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4552
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4553
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
4554
+ /** Current source location of an anchored passage, or its lost quote. */
4555
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
4556
+ readonly quote: v.StringSchema<undefined>;
4557
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
4558
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
4559
+ readonly start: v.NumberSchema<undefined>;
4560
+ readonly end: v.NumberSchema<undefined>;
4561
+ }, undefined>, undefined>;
4562
+ }, undefined>, undefined>;
4563
+ /** The comment's text, already wrapped in the response's untrusted markers. */
4564
+ readonly body: v.StringSchema<undefined>;
4565
+ /**
4566
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
4567
+ * Present only on a Mossbear comment. The comment's `body` begins with the
4568
+ * claim (what goes wrong); this carries what the claim rests on.
4569
+ */
4570
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
4571
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
4572
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
4573
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4574
+ /** What the drafter did not read, fixed per tier. */
4575
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4576
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
4577
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4578
+ }, undefined>, undefined>;
4579
+ /**
4580
+ * Whether the person approved a comment Mossbear drafted. Present on every
4581
+ * Mossbear comment and absent on a person's or an agent's, which are
4582
+ * requests as written. `false` is a draft nobody has read yet: a reader shows
4583
+ * it to the user and acts only on their go-ahead. Only a client that reports
4584
+ * a version able to mark drafts is ever listed one, so an older reader that
4585
+ * strips this field never receives a draft it would print as a request.
4586
+ */
4587
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4588
+ /**
4589
+ * Whether an open Mossbear finding is the agent's to act on. `ready` means the
4590
+ * person accepted it, or its evidence spans enough separate days to need no
4591
+ * Accept. `waiting` means it waits on the person: show it to the user and
4592
+ * change nothing unless they say so. Present only on an open Mossbear comment.
4593
+ * A server that predates the field omits it, and a reader then falls back to
4594
+ * `approved`. This is a new name rather than a new meaning for `state`,
4595
+ * which already says open or resolved.
4596
+ */
4597
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
4598
+ /**
4599
+ * Where the artifact is published from, when Mossbear records one: the
4600
+ * committed `project.id` of the repository whose commits own it, and the
4601
+ * branch it was published from (null when none was recorded). `thisRepo` is
4602
+ * true when that is the repo the read declared, false when it is another repo,
4603
+ * and absent when the read declared no repo. The field is absent when Mossbear
4604
+ * records no publishing repo, which is not a claim that the artifact is
4605
+ * Mossbear-owned.
4606
+ */
4607
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
4608
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4609
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4610
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4611
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4612
+ }, undefined>, undefined>;
4613
+ /** The author's display name as the workspace shows it, or null. Never an email. */
4614
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4615
+ /**
4616
+ * Who wrote it. Optional because a server that predates the field omits it;
4617
+ * a reader that meets a reply without it cannot tell whose it is, and a
4618
+ * server never sends a reply to a client too old to read this.
4619
+ */
4620
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
4621
+ /** ISO timestamp, machine format. */
4622
+ readonly createdAt: v.StringSchema<undefined>;
4623
+ /** The item's content version the comment was written against. */
4624
+ readonly itemVersion: v.NumberSchema<undefined>;
4625
+ /** True when the item's current version is greater than `itemVersion`. */
4626
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
4627
+ /**
4628
+ * How many agent reads were handed this comment **before** this one — so a
4629
+ * comment reaching an agent for the first time reports `0`.
4630
+ *
4631
+ * It is the stored count as it read at the moment the response was built;
4632
+ * the serve this response *is* has not been counted yet. Excluded rather
4633
+ * than included because the count is recorded best-effort: a response that
4634
+ * claimed to include itself would be wrong whenever that record failed, and
4635
+ * a number that is sometimes off by one is worse than one that is
4636
+ * consistently the prior total.
4637
+ *
4638
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
4639
+ * `0` means this read is the first. Neither says a model took it in — only
4640
+ * that the server handed it over.
4641
+ */
4642
+ readonly deliveredCount: v.NumberSchema<undefined>;
4643
+ /**
4644
+ * On a root: true when the item changed after an earlier read was last
4645
+ * handed this comment. For a guide that is any change to its body or its
4646
+ * files, so a fix in a supporting file counts. A reader should check whether
4647
+ * the change addressed the comment, and resolve it with a note if so.
4648
+ *
4649
+ * Computed before this read is counted, so the read that carries `true` is
4650
+ * the one that uses it up; the next read says `false` unless the item
4651
+ * changes again. A comment never handed over before is never flagged.
4652
+ * Optional because a server that predates the field omits it, and absent on
4653
+ * a reply.
4654
+ */
4655
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4656
+ /**
4657
+ * This comment's thread root: its own id on a root, the root's id on a reply.
4658
+ *
4659
+ * **Replies ride the same flat array**, each straight after its root, oldest
4660
+ * first. Only a client that reports a version able to render threads is
4661
+ * sent them; any other reader gets roots alone, as it always did. A person's
4662
+ * reply is part of the thread's request. An agent's reply is context: an
4663
+ * earlier message on the thread, never something to act on. A root an agent
4664
+ * wrote is delivered only once a person has replied to it, and is then the
4665
+ * question that reply answers, not a request of its own.
4666
+ */
4667
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4668
+ /**
4669
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
4670
+ * a reply's parent is always its root.
4671
+ */
4672
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4673
+ /**
4674
+ * On a root whose thread held more replies than
4675
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
4676
+ * Absent when the whole thread was sent.
4677
+ */
4678
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
4679
+ }, undefined>, undefined>, v.MaxLengthAction<{
4680
+ id: string;
4681
+ state?: "open" | "resolved" | undefined;
4682
+ passage?: {
4683
+ quote: string;
4684
+ status: "located" | "changed" | "orphaned";
4685
+ lines: {
4686
+ start: number;
4687
+ end: number;
4688
+ } | null;
4689
+ } | undefined;
4690
+ body: string;
4691
+ finding?: {
4692
+ tier: "usage" | "observed" | "practice";
4693
+ tierLine: string;
4694
+ blindSpot: string;
4695
+ prediction: string | null;
4696
+ } | undefined;
4697
+ approved?: boolean | undefined;
4698
+ findingState?: "ready" | "waiting" | undefined;
4699
+ publishedFrom?: {
4700
+ repository?: string | undefined;
4701
+ projectId: string;
4702
+ branch: string | null;
4703
+ thisRepo?: boolean | undefined;
4704
+ } | undefined;
4705
+ authorName: string | null;
4706
+ authorKind?: "person" | "agent" | "mossbear" | undefined;
4707
+ createdAt: string;
4708
+ itemVersion: number;
4709
+ itemChangedSince: boolean;
4710
+ deliveredCount: number;
4711
+ guideChangedSinceRead?: boolean | undefined;
4712
+ threadId: string;
4713
+ replyToId: string | null;
4714
+ repliesWithheld?: number | undefined;
4715
+ }[], number, undefined>]>, undefined>;
4716
+ readonly createdAt: v.StringSchema<undefined>;
4717
+ readonly updatedAt: v.StringSchema<undefined>;
4718
+ }, "content" | "comments">, undefined>;
4719
+ export type ArtifactMetadata = v.InferOutput<typeof ArtifactMetadataSchema>;
4720
+ /**
4721
+ * A guide publication: the bytes at an agent-guidance path, published from the
4722
+ * repository that homes the bundle, land as a guide rather than a document.
4723
+ *
4724
+ * `format` is the discovery format of the path, the one import records.
4725
+ * `members` is a skill's member files, relative to its directory, and is
4726
+ * authoritative when present: a stored member it omits is removed, unless it
4727
+ * is listed in `skippedPaths` (present at the ref, but not sendable). Only a
4728
+ * `skill-md` publication carries members.
4729
+ */
4730
+ export declare const GuidePublishSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4731
+ readonly format: v.PicklistSchema<["agents-md", "agents-dir", "claude-md", "claude-rules", "cursorrules", "cursor-rules", "skill-md"], undefined>;
4732
+ readonly members: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
4733
+ readonly path: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, v.CheckAction<string, "path must not shadow the skill’s own SKILL.md">]>;
4734
+ readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "rawContent must be at most 524288 bytes">]>;
4735
+ /** As on {@link RawSkillMemberFileSchema}: absent is not `false`. */
4736
+ readonly executable: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4737
+ }, undefined>, undefined>, v.MaxLengthAction<{
4738
+ path: string;
4739
+ content: string;
4740
+ executable?: boolean | undefined;
4741
+ }[], 64, undefined>, v.CheckAction<{
4742
+ path: string;
4743
+ content: string;
4744
+ executable?: boolean | undefined;
4745
+ }[], "member paths must be unique (case-insensitive)">]>, undefined>;
4746
+ readonly skippedPaths: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>, undefined>, v.MaxLengthAction<string[], 256, undefined>]>, undefined>;
4747
+ /**
4748
+ * The repository's other copies of this file, such as a skill's twin in
4749
+ * the other skills folder, each published as an alias of this guide rather
4750
+ * than a guide of its own. Each must be an alias path of the published one
4751
+ * (`aliasPathSiblings`). Additive: an alias it omits is kept.
4752
+ */
4753
+ readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>, v.MaxLengthAction<string[], 8, undefined>]>, undefined>;
4754
+ }, undefined>, v.CheckAction<{
4755
+ format: "agents-md" | "agents-dir" | "claude-md" | "claude-rules" | "cursorrules" | "cursor-rules" | "skill-md";
4756
+ members?: {
4757
+ path: string;
4758
+ content: string;
4759
+ executable?: boolean | undefined;
4760
+ }[] | undefined;
4761
+ skippedPaths?: string[] | undefined;
4762
+ aliases?: string[] | undefined;
4763
+ }, "only a skill-md guide carries members">]>;
4764
+ export type GuidePublish = v.InferOutput<typeof GuidePublishSchema>;
4765
+ /**
4766
+ * Create an artifact. Always a create: it takes no id, and an update is a
4767
+ * separate request. `bundle` is optional for an unrestricted caller, who files
4768
+ * later; a scoped credential must name a bundle it may write, and the server
4769
+ * refuses a scoped create without one.
4770
+ */
4771
+ /**
4772
+ * The identity a guide's files carry with them: a skill's
4773
+ * `metadata.mossbear-id`. An opaque lookup key, resolved only inside the
4774
+ * publishing workspace, so it grants nothing even though it sits in public
4775
+ * repos. Both an artifact id and a `nanoid()` fit it.
4776
+ */
4777
+ export declare const IdentityKeySchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "an identity key is letters, digits, `-` and `_`">]>;
4778
+ /** How many keys one identity lookup may ask about: a declared set, not more. */
4779
+ export declare const MAX_IDENTITY_LOOKUP_ENTRIES = 500;
4780
+ /**
4781
+ * Ask what publishing each key at a path would do in the workspace of `bundle`
4782
+ * (a bundle id the publishing repo homes), before anything is sent. Read-only.
4783
+ */
4784
+ export declare const ResolveIdentitiesRequestSchema: v.StrictObjectSchema<{
4785
+ readonly bundle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4786
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
4787
+ readonly entries: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
4788
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "an identity key is letters, digits, `-` and `_`">]>;
4789
+ readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>;
4790
+ }, undefined>, undefined>, v.MinLengthAction<{
4791
+ key: string;
4792
+ path: string;
4793
+ }[], 1, undefined>, v.MaxLengthAction<{
4794
+ key: string;
4795
+ path: string;
4796
+ }[], 500, undefined>]>;
4797
+ }, undefined>;
4798
+ /**
4799
+ * What a publication carrying a key would do, decided by the server's one
4800
+ * transfer rule:
4801
+ *
4802
+ * - `mint`: no artifact in this workspace holds the key, so a new one takes it.
4803
+ * - `current`: this repo's own artifact at this path holds it; an ordinary update.
4804
+ * - `move`: this repo's own artifact holds it at another path (a folder rename).
4805
+ * - `transfer`: another repo's artifact holds it and its home retired it, so
4806
+ * it moves here with its versions, comments and grading.
4807
+ * - `refused`: the holder cannot move here now; `refusal` says why and what to do.
4808
+ */
4809
+ export declare const IdentityClaimKindSchema: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4810
+ /** What an artifact carries with it, for a preview to name before a yes. */
4811
+ export declare const IdentityHistorySchema: v.ObjectSchema<{
4812
+ readonly artifactId: v.StringSchema<undefined>;
4813
+ /** Comment threads not yet resolved. */
4814
+ readonly openComments: v.NumberSchema<undefined>;
4815
+ /** Grading verdicts recorded against it. */
4816
+ readonly verdicts: v.NumberSchema<undefined>;
4817
+ }, undefined>;
4818
+ export declare const IdentityResolutionSchema: v.ObjectSchema<{
4819
+ readonly key: v.StringSchema<undefined>;
4820
+ readonly path: v.StringSchema<undefined>;
4821
+ readonly claim: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4822
+ /** The sentence for a `refused` claim, written for whoever published. */
4823
+ readonly refusal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4824
+ /**
4825
+ * The artifact holding the key. Absent for `mint`, and for a refusal that
4826
+ * may not describe it (a holder outside the caller's grants).
4827
+ */
4828
+ readonly holder: v.OptionalSchema<v.ObjectSchema<{
4829
+ readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4830
+ /** The repo that publishes it, or null for one no repo owns. */
4831
+ readonly sourceProjectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4832
+ /** Slugs of the bundles holding it, which a transfer leaves when another repo homes them. */
4833
+ readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
4834
+ readonly artifactId: v.StringSchema<undefined>;
4835
+ /** Comment threads not yet resolved. */
4836
+ readonly openComments: v.NumberSchema<undefined>;
4837
+ /** Grading verdicts recorded against it. */
4838
+ readonly verdicts: v.NumberSchema<undefined>;
4839
+ }, undefined>, undefined>;
4840
+ /**
4841
+ * A different artifact this repo already has at `path`, which a move or a
4842
+ * transfer would supersede: switched off and stripped of its path, keeping
4843
+ * its own history.
4844
+ */
4845
+ readonly supersedes: v.OptionalSchema<v.ObjectSchema<{
4846
+ readonly artifactId: v.StringSchema<undefined>;
4847
+ /** Comment threads not yet resolved. */
4848
+ readonly openComments: v.NumberSchema<undefined>;
4849
+ /** Grading verdicts recorded against it. */
4850
+ readonly verdicts: v.NumberSchema<undefined>;
4851
+ }, undefined>, undefined>;
4852
+ }, undefined>;
4853
+ export declare const ResolveIdentitiesResponseSchema: v.ObjectSchema<{
4854
+ readonly resolutions: v.ArraySchema<v.ObjectSchema<{
4855
+ readonly key: v.StringSchema<undefined>;
4856
+ readonly path: v.StringSchema<undefined>;
4857
+ readonly claim: v.PicklistSchema<["mint", "current", "move", "transfer", "refused"], undefined>;
4858
+ /** The sentence for a `refused` claim, written for whoever published. */
4859
+ readonly refusal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4860
+ /**
4861
+ * The artifact holding the key. Absent for `mint`, and for a refusal that
4862
+ * may not describe it (a holder outside the caller's grants).
4863
+ */
4864
+ readonly holder: v.OptionalSchema<v.ObjectSchema<{
4865
+ readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4866
+ /** The repo that publishes it, or null for one no repo owns. */
4867
+ readonly sourceProjectId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4868
+ /** Slugs of the bundles holding it, which a transfer leaves when another repo homes them. */
4869
+ readonly bundles: v.ArraySchema<v.StringSchema<undefined>, undefined>;
4503
4870
  readonly artifactId: v.StringSchema<undefined>;
4504
4871
  /** Comment threads not yet resolved. */
4505
4872
  readonly openComments: v.NumberSchema<undefined>;
@@ -4579,6 +4946,8 @@ export declare const CreateArtifactRequestSchema: v.StrictObjectSchema<{
4579
4946
  * `path` and `bundle` beside it.
4580
4947
  */
4581
4948
  readonly gitSource: v.OptionalSchema<v.ObjectSchema<{
4949
+ /** Unverified display label, never an ownership key or a remote URL. */
4950
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4582
4951
  /**
4583
4952
  * The committed `project.id` of the source repository — the same id space as
4584
4953
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -4745,6 +5114,8 @@ export declare const UpdateArtifactRequestFieldsSchema: v.StrictObjectSchema<{
4745
5114
  * with no path it is refused (400).
4746
5115
  */
4747
5116
  readonly gitSource: v.OptionalSchema<v.ObjectSchema<{
5117
+ /** Unverified display label, never an ownership key or a remote URL. */
5118
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4748
5119
  /**
4749
5120
  * The committed `project.id` of the source repository — the same id space as
4750
5121
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -4909,6 +5280,8 @@ export declare const UpdateArtifactRequestSchema: v.SchemaWithPipe<readonly [v.S
4909
5280
  * with no path it is refused (400).
4910
5281
  */
4911
5282
  readonly gitSource: v.OptionalSchema<v.ObjectSchema<{
5283
+ /** Unverified display label, never an ownership key or a remote URL. */
5284
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
4912
5285
  /**
4913
5286
  * The committed `project.id` of the source repository — the same id space as
4914
5287
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -4999,6 +5372,7 @@ export declare const UpdateArtifactRequestSchema: v.SchemaWithPipe<readonly [v.S
4999
5372
  authored?: boolean | undefined;
5000
5373
  projectId?: string | undefined;
5001
5374
  gitSource?: {
5375
+ repository?: string | undefined;
5002
5376
  projectId: string;
5003
5377
  commitSha: string;
5004
5378
  branch?: string | undefined;
@@ -5028,6 +5402,8 @@ export declare const UpdateArtifactRequestSchema: v.SchemaWithPipe<readonly [v.S
5028
5402
  */
5029
5403
  export declare const WithdrawArtifactRequestSchema: v.StrictObjectSchema<{
5030
5404
  readonly gitSource: v.ObjectSchema<{
5405
+ /** Unverified display label, never an ownership key or a remote URL. */
5406
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5031
5407
  /**
5032
5408
  * The committed `project.id` of the source repository — the same id space as
5033
5409
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -5092,10 +5468,24 @@ export declare const ArtifactHistoryQuerySchema: v.ObjectSchema<{
5092
5468
  * revision's bytes while `artifact.version` stays the current version, so the
5093
5469
  * value to send back as `expectedVersion` never depends on what was selected.
5094
5470
  * A version that was never saved is a 404, not the nearest one.
5471
+ * Instead, `expectedVersion` plus `expectedBodyToken` pin a live head and refuse
5472
+ * a mismatch with 409, including an autosave that kept the saved version.
5473
+ * These selectors cannot be combined.
5095
5474
  */
5096
- export declare const ReadArtifactQuerySchema: v.ObjectSchema<{
5475
+ export declare const ReadArtifactQuerySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
5097
5476
  readonly version: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
5098
- }, undefined>;
5477
+ /** Pair the saved version with a live-body token when hydrating a cache. */
5478
+ readonly expectedVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
5479
+ readonly expectedBodyToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
5480
+ }, undefined>, v.CheckAction<{
5481
+ version?: number | undefined;
5482
+ expectedVersion?: number | undefined;
5483
+ expectedBodyToken?: string | undefined;
5484
+ }, "A historical revision and a current-head precondition cannot be combined.">, v.CheckAction<{
5485
+ version?: number | undefined;
5486
+ expectedVersion?: number | undefined;
5487
+ expectedBodyToken?: string | undefined;
5488
+ }, "A current-head precondition requires both expectedVersion and expectedBodyToken.">]>;
5099
5489
  /** Which revision the content in a read response is. */
5100
5490
  export declare const ArtifactSelectedRevisionSchema: v.ObjectSchema<{
5101
5491
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
@@ -5156,6 +5546,8 @@ export declare const ReadArtifactResponseSchema: v.ObjectSchema<{
5156
5546
  }[], 8, undefined>]>, undefined>;
5157
5547
  /** Present iff git owns this artifact. */
5158
5548
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
5549
+ /** Unverified display label, never an ownership key or a remote URL. */
5550
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5159
5551
  /**
5160
5552
  * The committed `project.id` of the source repository — the same id space as
5161
5553
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -5230,6 +5622,7 @@ export declare const ReadArtifactResponseSchema: v.ObjectSchema<{
5230
5622
  * Mossbear-owned.
5231
5623
  */
5232
5624
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
5625
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5233
5626
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5234
5627
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5235
5628
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -5321,6 +5714,7 @@ export declare const ReadArtifactResponseSchema: v.ObjectSchema<{
5321
5714
  approved?: boolean | undefined;
5322
5715
  findingState?: "ready" | "waiting" | undefined;
5323
5716
  publishedFrom?: {
5717
+ repository?: string | undefined;
5324
5718
  projectId: string;
5325
5719
  branch: string | null;
5326
5720
  thisRepo?: boolean | undefined;
@@ -5345,6 +5739,8 @@ export declare const ReadArtifactResponseSchema: v.ObjectSchema<{
5345
5739
  readonly current: v.BooleanSchema<undefined>;
5346
5740
  readonly contentHash: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
5347
5741
  }, undefined>;
5742
+ /** The live head's token, even when a different historical revision is selected. */
5743
+ readonly headBodyToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
5348
5744
  /** Delimiters for comment bodies, present when any comment is returned. */
5349
5745
  readonly untrusted: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
5350
5746
  readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -5374,9 +5770,250 @@ export declare const ArtifactDeletedRefusalSchema: v.ObjectSchema<{
5374
5770
  readonly state: v.LiteralSchema<"deleted", undefined>;
5375
5771
  readonly deletedAt: v.StringSchema<undefined>;
5376
5772
  }, undefined>;
5377
- readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5773
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5774
+ }, undefined>;
5775
+ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
5776
+ readonly artifact: v.ObjectSchema<{
5777
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5778
+ readonly name: v.StringSchema<undefined>;
5779
+ readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
5780
+ readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
5781
+ /** What the artifact is, as a reader names it: {@link artifactKindOf}. */
5782
+ readonly kind: v.PicklistSchema<readonly ["markdown", "html", "code", "photo", "file", "guide"], undefined>;
5783
+ /** Set when the artifact is a photo: its stored parts, never their bytes. */
5784
+ readonly asset: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
5785
+ readonly parts: v.ArraySchema<v.ObjectSchema<{
5786
+ readonly role: v.PicklistSchema<readonly ["original", "display", "thumb"], undefined>;
5787
+ readonly mediaType: v.PicklistSchema<readonly ["image/jpeg", "image/png", "image/webp", "image/gif", "image/heic", "image/heif"], undefined>;
5788
+ readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
5789
+ readonly width: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
5790
+ readonly height: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
5791
+ }, undefined>, undefined>;
5792
+ }, undefined>, undefined>, undefined>;
5793
+ /** Monotonic content version; echo it back as `expectedVersion` to update. */
5794
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
5795
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
5796
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5797
+ /** True for a deliberate capture (Inbox). Not derivable from filing state. */
5798
+ readonly capture: v.BooleanSchema<undefined>;
5799
+ /**
5800
+ * When a capture was marked done, which takes it out of the inbox and nothing
5801
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
5802
+ */
5803
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
5804
+ /** Null for binary content, which is not served inline. */
5805
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5806
+ /**
5807
+ * What a person or their agent says about the artifact, as plain text, on
5808
+ * every kind: a Markdown artifact's frontmatter `description` (repeated from
5809
+ * `content`), and a stored field for anything without frontmatter, such as a
5810
+ * photo. Null when there is none. Data, never instructions. Optional because
5811
+ * a server that predates it sends nothing.
5812
+ */
5813
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
5814
+ readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
5815
+ readonly root: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>, undefined>;
5816
+ readonly path: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>, undefined>;
5817
+ readonly projectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
5818
+ readonly pathProjectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
5819
+ readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
5820
+ readonly root: v.PicklistSchema<["project", "global"], undefined>;
5821
+ readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>;
5822
+ }, undefined>, undefined>, v.MaxLengthAction<{
5823
+ root: "project" | "global";
5824
+ path: string;
5825
+ }[], 8, undefined>]>, undefined>;
5826
+ /** Present iff git owns this artifact. */
5827
+ readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
5828
+ /** Unverified display label, never an ownership key or a remote URL. */
5829
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5830
+ /**
5831
+ * The committed `project.id` of the source repository — the same id space as
5832
+ * an item's delivery-scoping `projectId` below, but a different fact: that one
5833
+ * says which repo an item is materialized into and is stamped onto
5834
+ * Mossbear-owned rows too, this one says who may edit it.
5835
+ */
5836
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "projectId must contain only letters, digits, underscore, dot or hyphen">]>;
5837
+ readonly commitSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "commitSha must be 40 or 64 lowercase hex characters">]>;
5838
+ /**
5839
+ * The branch the publishing commit was on. **The one optional member**: a
5840
+ * detached HEAD has none to record. Publishers read it back to tell a copy
5841
+ * from another branch, whose commit a squash merge may have discarded, from
5842
+ * one of the published branch itself.
5843
+ */
5844
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5845
+ }, undefined>, undefined>, undefined>;
5846
+ /** Absent, not empty, when there are none. Absence is not a verdict. */
5847
+ readonly comments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
5848
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5849
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
5850
+ /** Current source location of an anchored passage, or its lost quote. */
5851
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
5852
+ readonly quote: v.StringSchema<undefined>;
5853
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
5854
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
5855
+ readonly start: v.NumberSchema<undefined>;
5856
+ readonly end: v.NumberSchema<undefined>;
5857
+ }, undefined>, undefined>;
5858
+ }, undefined>, undefined>;
5859
+ /** The comment's text, already wrapped in the response's untrusted markers. */
5860
+ readonly body: v.StringSchema<undefined>;
5861
+ /**
5862
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
5863
+ * Present only on a Mossbear comment. The comment's `body` begins with the
5864
+ * claim (what goes wrong); this carries what the claim rests on.
5865
+ */
5866
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
5867
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
5868
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
5869
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
5870
+ /** What the drafter did not read, fixed per tier. */
5871
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
5872
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
5873
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5874
+ }, undefined>, undefined>;
5875
+ /**
5876
+ * Whether the person approved a comment Mossbear drafted. Present on every
5877
+ * Mossbear comment and absent on a person's or an agent's, which are
5878
+ * requests as written. `false` is a draft nobody has read yet: a reader shows
5879
+ * it to the user and acts only on their go-ahead. Only a client that reports
5880
+ * a version able to mark drafts is ever listed one, so an older reader that
5881
+ * strips this field never receives a draft it would print as a request.
5882
+ */
5883
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5884
+ /**
5885
+ * Whether an open Mossbear finding is the agent's to act on. `ready` means the
5886
+ * person accepted it, or its evidence spans enough separate days to need no
5887
+ * Accept. `waiting` means it waits on the person: show it to the user and
5888
+ * change nothing unless they say so. Present only on an open Mossbear comment.
5889
+ * A server that predates the field omits it, and a reader then falls back to
5890
+ * `approved`. This is a new name rather than a new meaning for `state`,
5891
+ * which already says open or resolved.
5892
+ */
5893
+ readonly findingState: v.OptionalSchema<v.PicklistSchema<["ready", "waiting"], undefined>, undefined>;
5894
+ /**
5895
+ * Where the artifact is published from, when Mossbear records one: the
5896
+ * committed `project.id` of the repository whose commits own it, and the
5897
+ * branch it was published from (null when none was recorded). `thisRepo` is
5898
+ * true when that is the repo the read declared, false when it is another repo,
5899
+ * and absent when the read declared no repo. The field is absent when Mossbear
5900
+ * records no publishing repo, which is not a claim that the artifact is
5901
+ * Mossbear-owned.
5902
+ */
5903
+ readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
5904
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5905
+ readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5906
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5907
+ readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5908
+ }, undefined>, undefined>;
5909
+ /** The author's display name as the workspace shows it, or null. Never an email. */
5910
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5911
+ /**
5912
+ * Who wrote it. Optional because a server that predates the field omits it;
5913
+ * a reader that meets a reply without it cannot tell whose it is, and a
5914
+ * server never sends a reply to a client too old to read this.
5915
+ */
5916
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
5917
+ /** ISO timestamp, machine format. */
5918
+ readonly createdAt: v.StringSchema<undefined>;
5919
+ /** The item's content version the comment was written against. */
5920
+ readonly itemVersion: v.NumberSchema<undefined>;
5921
+ /** True when the item's current version is greater than `itemVersion`. */
5922
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
5923
+ /**
5924
+ * How many agent reads were handed this comment **before** this one — so a
5925
+ * comment reaching an agent for the first time reports `0`.
5926
+ *
5927
+ * It is the stored count as it read at the moment the response was built;
5928
+ * the serve this response *is* has not been counted yet. Excluded rather
5929
+ * than included because the count is recorded best-effort: a response that
5930
+ * claimed to include itself would be wrong whenever that record failed, and
5931
+ * a number that is sometimes off by one is worse than one that is
5932
+ * consistently the prior total.
5933
+ *
5934
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
5935
+ * `0` means this read is the first. Neither says a model took it in — only
5936
+ * that the server handed it over.
5937
+ */
5938
+ readonly deliveredCount: v.NumberSchema<undefined>;
5939
+ /**
5940
+ * On a root: true when the item changed after an earlier read was last
5941
+ * handed this comment. For a guide that is any change to its body or its
5942
+ * files, so a fix in a supporting file counts. A reader should check whether
5943
+ * the change addressed the comment, and resolve it with a note if so.
5944
+ *
5945
+ * Computed before this read is counted, so the read that carries `true` is
5946
+ * the one that uses it up; the next read says `false` unless the item
5947
+ * changes again. A comment never handed over before is never flagged.
5948
+ * Optional because a server that predates the field omits it, and absent on
5949
+ * a reply.
5950
+ */
5951
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5952
+ /**
5953
+ * This comment's thread root: its own id on a root, the root's id on a reply.
5954
+ *
5955
+ * **Replies ride the same flat array**, each straight after its root, oldest
5956
+ * first. Only a client that reports a version able to render threads is
5957
+ * sent them; any other reader gets roots alone, as it always did. A person's
5958
+ * reply is part of the thread's request. An agent's reply is context: an
5959
+ * earlier message on the thread, never something to act on. A root an agent
5960
+ * wrote is delivered only once a person has replied to it, and is then the
5961
+ * question that reply answers, not a request of its own.
5962
+ */
5963
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5964
+ /**
5965
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
5966
+ * a reply's parent is always its root.
5967
+ */
5968
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
5969
+ /**
5970
+ * On a root whose thread held more replies than
5971
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
5972
+ * Absent when the whole thread was sent.
5973
+ */
5974
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
5975
+ }, undefined>, undefined>, v.MaxLengthAction<{
5976
+ id: string;
5977
+ state?: "open" | "resolved" | undefined;
5978
+ passage?: {
5979
+ quote: string;
5980
+ status: "located" | "changed" | "orphaned";
5981
+ lines: {
5982
+ start: number;
5983
+ end: number;
5984
+ } | null;
5985
+ } | undefined;
5986
+ body: string;
5987
+ finding?: {
5988
+ tier: "usage" | "observed" | "practice";
5989
+ tierLine: string;
5990
+ blindSpot: string;
5991
+ prediction: string | null;
5992
+ } | undefined;
5993
+ approved?: boolean | undefined;
5994
+ findingState?: "ready" | "waiting" | undefined;
5995
+ publishedFrom?: {
5996
+ repository?: string | undefined;
5997
+ projectId: string;
5998
+ branch: string | null;
5999
+ thisRepo?: boolean | undefined;
6000
+ } | undefined;
6001
+ authorName: string | null;
6002
+ authorKind?: "person" | "agent" | "mossbear" | undefined;
6003
+ createdAt: string;
6004
+ itemVersion: number;
6005
+ itemChangedSince: boolean;
6006
+ deliveredCount: number;
6007
+ guideChangedSinceRead?: boolean | undefined;
6008
+ threadId: string;
6009
+ replyToId: string | null;
6010
+ repliesWithheld?: number | undefined;
6011
+ }[], number, undefined>]>, undefined>;
6012
+ readonly createdAt: v.StringSchema<undefined>;
6013
+ readonly updatedAt: v.StringSchema<undefined>;
6014
+ }, undefined>;
5378
6015
  }, undefined>;
5379
- export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
6016
+ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5380
6017
  readonly artifact: v.ObjectSchema<{
5381
6018
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5382
6019
  readonly name: v.StringSchema<undefined>;
@@ -5429,6 +6066,8 @@ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
5429
6066
  }[], 8, undefined>]>, undefined>;
5430
6067
  /** Present iff git owns this artifact. */
5431
6068
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
6069
+ /** Unverified display label, never an ownership key or a remote URL. */
6070
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5432
6071
  /**
5433
6072
  * The committed `project.id` of the source repository — the same id space as
5434
6073
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -5503,6 +6142,7 @@ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
5503
6142
  * Mossbear-owned.
5504
6143
  */
5505
6144
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
6145
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5506
6146
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5507
6147
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5508
6148
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -5594,6 +6234,7 @@ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
5594
6234
  approved?: boolean | undefined;
5595
6235
  findingState?: "ready" | "waiting" | undefined;
5596
6236
  publishedFrom?: {
6237
+ repository?: string | undefined;
5597
6238
  projectId: string;
5598
6239
  branch: string | null;
5599
6240
  thisRepo?: boolean | undefined;
@@ -5613,8 +6254,74 @@ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
5613
6254
  readonly updatedAt: v.StringSchema<undefined>;
5614
6255
  }, undefined>;
5615
6256
  }, undefined>;
5616
- export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5617
- readonly artifact: v.ObjectSchema<{
6257
+ /** Most artifacts one page of `GET /api/v1/artifacts` returns, and the default. */
6258
+ export declare const MAX_LIST_ARTIFACTS_LIMIT = 500;
6259
+ export declare const DEFAULT_LIST_ARTIFACTS_LIMIT = 100;
6260
+ /**
6261
+ * `GET /api/v1/artifacts`: the query string, as an object of its values.
6262
+ *
6263
+ * Every filter narrows; none is required. `inbox=true` is the Inbox: the
6264
+ * caller's own captures that are not done, not deleted and not filed, so it
6265
+ * cannot be combined with `bundle`. `bundle` is a bundle id. `kind` is a
6266
+ * comma-separated list of {@link ARTIFACT_KINDS}. `since` is an ISO timestamp
6267
+ * compared with when the artifact was created, which is also the order: newest
6268
+ * first. `cursor` is the previous page's `nextCursor`, opaque to the caller.
6269
+ *
6270
+ * There is no text query: finding by text is `GET /api/v1/search`.
6271
+ *
6272
+ * `comments=none` asks to be handed no comments, and not to be counted as
6273
+ * having received any, for a caller that will not show them.
6274
+ */
6275
+ export declare const ListArtifactsQuerySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
6276
+ readonly inbox: v.OptionalSchema<v.PicklistSchema<["true", "false"], "inbox must be true or false">, undefined>;
6277
+ readonly bundle: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
6278
+ readonly kind: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string[]>, v.ArraySchema<v.PicklistSchema<readonly ["markdown", "html", "code", "photo", "file", "guide"], `kind must be one of ${string}`>, undefined>, v.MinLengthAction<("markdown" | "guide" | "html" | "code" | "photo" | "file")[], 1, undefined>]>, undefined>;
6279
+ readonly since: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "since must be an ISO timestamp">]>, undefined>;
6280
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "limit must be a whole number from 1 to 500">, v.TransformAction<any, number>, v.MinValueAction<number, 1, "limit must be a whole number from 1 to 500">, v.MaxValueAction<number, 500, "limit must be a whole number from 1 to 500">]>, string>;
6281
+ readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>, undefined>;
6282
+ readonly comments: v.OptionalSchema<v.LiteralSchema<"none", undefined>, undefined>;
6283
+ /** Omit bodies and comments without fetching external source bytes. */
6284
+ readonly view: v.OptionalSchema<v.LiteralSchema<"metadata", undefined>, undefined>;
6285
+ /** The CLI release asking, so thread replies reach only one that renders them. */
6286
+ readonly cli: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
6287
+ }, undefined>, v.CheckAction<{
6288
+ inbox?: "true" | "false" | undefined;
6289
+ bundle?: string | undefined;
6290
+ kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
6291
+ since?: string | undefined;
6292
+ limit: number;
6293
+ cursor?: string | undefined;
6294
+ comments?: "none" | undefined;
6295
+ view?: "metadata" | undefined;
6296
+ cli?: string | undefined;
6297
+ }, "The inbox holds only unfiled captures, so inbox and bundle cannot be combined.">, v.TransformAction<{
6298
+ inbox?: "true" | "false" | undefined;
6299
+ bundle?: string | undefined;
6300
+ kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
6301
+ since?: string | undefined;
6302
+ limit: number;
6303
+ cursor?: string | undefined;
6304
+ comments?: "none" | undefined;
6305
+ view?: "metadata" | undefined;
6306
+ cli?: string | undefined;
6307
+ }, {
6308
+ inbox: boolean;
6309
+ bundle?: string | undefined;
6310
+ kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
6311
+ since?: string | undefined;
6312
+ limit: number;
6313
+ cursor?: string | undefined;
6314
+ comments?: "none" | undefined;
6315
+ view?: "metadata" | undefined;
6316
+ cli?: string | undefined;
6317
+ }>]>;
6318
+ export type ListArtifactsQuery = v.InferOutput<typeof ListArtifactsQuerySchema>;
6319
+ /**
6320
+ * One page of the artifact listing, newest first. `nextCursor` is null on the
6321
+ * last page. `untrusted` delimits comment bodies, as on a read.
6322
+ */
6323
+ export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
6324
+ readonly artifacts: v.ArraySchema<v.ObjectSchema<{
5618
6325
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5619
6326
  readonly name: v.StringSchema<undefined>;
5620
6327
  readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
@@ -5666,6 +6373,8 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5666
6373
  }[], 8, undefined>]>, undefined>;
5667
6374
  /** Present iff git owns this artifact. */
5668
6375
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
6376
+ /** Unverified display label, never an ownership key or a remote URL. */
6377
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5669
6378
  /**
5670
6379
  * The committed `project.id` of the source repository — the same id space as
5671
6380
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -5740,6 +6449,7 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5740
6449
  * Mossbear-owned.
5741
6450
  */
5742
6451
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
6452
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5743
6453
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5744
6454
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
5745
6455
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -5831,6 +6541,7 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5831
6541
  approved?: boolean | undefined;
5832
6542
  findingState?: "ready" | "waiting" | undefined;
5833
6543
  publishedFrom?: {
6544
+ repository?: string | undefined;
5834
6545
  projectId: string;
5835
6546
  branch: string | null;
5836
6547
  thisRepo?: boolean | undefined;
@@ -5848,71 +6559,20 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
5848
6559
  }[], number, undefined>]>, undefined>;
5849
6560
  readonly createdAt: v.StringSchema<undefined>;
5850
6561
  readonly updatedAt: v.StringSchema<undefined>;
5851
- }, undefined>;
6562
+ }, undefined>, undefined>;
6563
+ readonly nextCursor: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6564
+ readonly untrusted: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
6565
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6566
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6567
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6568
+ readonly note: v.StringSchema<undefined>;
6569
+ }, undefined>, undefined>, undefined>;
5852
6570
  }, undefined>;
5853
- /** Most artifacts one page of `GET /api/v1/artifacts` returns, and the default. */
5854
- export declare const MAX_LIST_ARTIFACTS_LIMIT = 500;
5855
- export declare const DEFAULT_LIST_ARTIFACTS_LIMIT = 100;
5856
- /**
5857
- * `GET /api/v1/artifacts`: the query string, as an object of its values.
5858
- *
5859
- * Every filter narrows; none is required. `inbox=true` is the Inbox: the
5860
- * caller's own captures that are not done, not deleted and not filed, so it
5861
- * cannot be combined with `bundle`. `bundle` is a bundle id. `kind` is a
5862
- * comma-separated list of {@link ARTIFACT_KINDS}. `since` is an ISO timestamp
5863
- * compared with when the artifact was created, which is also the order: newest
5864
- * first. `cursor` is the previous page's `nextCursor`, opaque to the caller.
5865
- *
5866
- * There is no text query: finding by text is `GET /api/v1/search`.
5867
- *
5868
- * `comments=none` asks to be handed no comments, and not to be counted as
5869
- * having received any, for a caller that will not show them.
5870
- */
5871
- export declare const ListArtifactsQuerySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
5872
- readonly inbox: v.OptionalSchema<v.PicklistSchema<["true", "false"], "inbox must be true or false">, undefined>;
5873
- readonly bundle: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
5874
- readonly kind: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string[]>, v.ArraySchema<v.PicklistSchema<readonly ["markdown", "html", "code", "photo", "file", "guide"], `kind must be one of ${string}`>, undefined>, v.MinLengthAction<("markdown" | "guide" | "html" | "code" | "photo" | "file")[], 1, undefined>]>, undefined>;
5875
- readonly since: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "since must be an ISO timestamp">]>, undefined>;
5876
- readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "limit must be a whole number from 1 to 500">, v.TransformAction<any, number>, v.MinValueAction<number, 1, "limit must be a whole number from 1 to 500">, v.MaxValueAction<number, 500, "limit must be a whole number from 1 to 500">]>, string>;
5877
- readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>, undefined>;
5878
- readonly comments: v.OptionalSchema<v.LiteralSchema<"none", undefined>, undefined>;
5879
- /** The CLI release asking, so thread replies reach only one that renders them. */
5880
- readonly cli: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
5881
- }, undefined>, v.CheckAction<{
5882
- inbox?: "true" | "false" | undefined;
5883
- bundle?: string | undefined;
5884
- kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
5885
- since?: string | undefined;
5886
- limit: number;
5887
- cursor?: string | undefined;
5888
- comments?: "none" | undefined;
5889
- cli?: string | undefined;
5890
- }, "The inbox holds only unfiled captures, so inbox and bundle cannot be combined.">, v.TransformAction<{
5891
- inbox?: "true" | "false" | undefined;
5892
- bundle?: string | undefined;
5893
- kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
5894
- since?: string | undefined;
5895
- limit: number;
5896
- cursor?: string | undefined;
5897
- comments?: "none" | undefined;
5898
- cli?: string | undefined;
5899
- }, {
5900
- inbox: boolean;
5901
- bundle?: string | undefined;
5902
- kind?: ("markdown" | "guide" | "html" | "code" | "photo" | "file")[] | undefined;
5903
- since?: string | undefined;
5904
- limit: number;
5905
- cursor?: string | undefined;
5906
- comments?: "none" | undefined;
5907
- cli?: string | undefined;
5908
- }>]>;
5909
- export type ListArtifactsQuery = v.InferOutput<typeof ListArtifactsQuerySchema>;
5910
- /**
5911
- * One page of the artifact listing, newest first. `nextCursor` is null on the
5912
- * last page. `untrusted` delimits comment bodies, as on a read.
5913
- */
5914
- export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
5915
- readonly artifacts: v.ArraySchema<v.ObjectSchema<{
6571
+ export type ListArtifactsResponse = v.InferOutput<typeof ListArtifactsResponseSchema>;
6572
+ /** Explicit projection; missing bodies must not be mistaken for empty content. */
6573
+ export declare const ListArtifactMetadataResponseSchema: v.ObjectSchema<{
6574
+ readonly projection: v.LiteralSchema<"metadata", undefined>;
6575
+ readonly artifacts: v.ArraySchema<v.StrictObjectSchema<Omit<{
5916
6576
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5917
6577
  readonly name: v.StringSchema<undefined>;
5918
6578
  readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
@@ -5964,6 +6624,8 @@ export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
5964
6624
  }[], 8, undefined>]>, undefined>;
5965
6625
  /** Present iff git owns this artifact. */
5966
6626
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
6627
+ /** Unverified display label, never an ownership key or a remote URL. */
6628
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
5967
6629
  /**
5968
6630
  * The committed `project.id` of the source repository — the same id space as
5969
6631
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -6038,6 +6700,7 @@ export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
6038
6700
  * Mossbear-owned.
6039
6701
  */
6040
6702
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
6703
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6041
6704
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6042
6705
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
6043
6706
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -6129,6 +6792,7 @@ export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
6129
6792
  approved?: boolean | undefined;
6130
6793
  findingState?: "ready" | "waiting" | undefined;
6131
6794
  publishedFrom?: {
6795
+ repository?: string | undefined;
6132
6796
  projectId: string;
6133
6797
  branch: string | null;
6134
6798
  thisRepo?: boolean | undefined;
@@ -6146,16 +6810,172 @@ export declare const ListArtifactsResponseSchema: v.ObjectSchema<{
6146
6810
  }[], number, undefined>]>, undefined>;
6147
6811
  readonly createdAt: v.StringSchema<undefined>;
6148
6812
  readonly updatedAt: v.StringSchema<undefined>;
6149
- }, undefined>, undefined>;
6813
+ }, "content" | "comments">, undefined>, undefined>;
6150
6814
  readonly nextCursor: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6151
- readonly untrusted: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
6152
- readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6153
- readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6154
- readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6155
- readonly note: v.StringSchema<undefined>;
6156
- }, undefined>, undefined>, undefined>;
6157
6815
  }, undefined>;
6158
- export type ListArtifactsResponse = v.InferOutput<typeof ListArtifactsResponseSchema>;
6816
+ export type ListArtifactMetadataResponse = v.InferOutput<typeof ListArtifactMetadataResponseSchema>;
6817
+ /** Maximum heads in a reconciliation manifest; overflow is explicitly incomplete. */
6818
+ export declare const MAX_ARTIFACT_MANIFEST_HEADS = 10000;
6819
+ export declare const ArtifactManifestQuerySchema: v.StrictObjectSchema<{
6820
+ readonly bundle: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
6821
+ }, undefined>;
6822
+ export type ArtifactManifestQuery = v.InferOutput<typeof ArtifactManifestQuerySchema>;
6823
+ export declare const ArtifactManifestScopeSchema: v.StrictObjectSchema<{
6824
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6825
+ readonly bundleId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6826
+ readonly principalId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6827
+ }, undefined>;
6828
+ export type ArtifactManifestScope = v.InferOutput<typeof ArtifactManifestScopeSchema>;
6829
+ export declare const ArtifactManifestHeadSchema: v.StrictObjectSchema<{
6830
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6831
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6832
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6833
+ }, undefined>;
6834
+ /** Bounded body hydration, separate from metadata/comment snapshots. */
6835
+ export declare const MAX_ARTIFACT_BODY_BATCH_HEADS = 50;
6836
+ export declare const MAX_ARTIFACT_BODY_BATCH_CONTENT_BYTES: number;
6837
+ export declare const MAX_ARTIFACT_BODY_BATCH_REQUEST_BYTES: number;
6838
+ export declare const ArtifactBodyBatchRequestSchema: v.StrictObjectSchema<{
6839
+ readonly bundle: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
6840
+ readonly heads: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
6841
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
6842
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6843
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6844
+ }, undefined>, undefined>, v.MinLengthAction<{
6845
+ id: string;
6846
+ bodyToken: string;
6847
+ version: number;
6848
+ }[], 1, undefined>, v.MaxLengthAction<{
6849
+ id: string;
6850
+ bodyToken: string;
6851
+ version: number;
6852
+ }[], 50, undefined>, v.CheckAction<{
6853
+ id: string;
6854
+ bodyToken: string;
6855
+ version: number;
6856
+ }[], "Duplicate artifact IDs">]>;
6857
+ }, undefined>;
6858
+ export type ArtifactBodyBatchRequest = v.InferOutput<typeof ArtifactBodyBatchRequestSchema>;
6859
+ export declare const ArtifactBodyBatchResultSchema: v.VariantSchema<"status", [v.StrictObjectSchema<{
6860
+ readonly status: v.LiteralSchema<"ok", undefined>;
6861
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6862
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
6863
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6864
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6865
+ }, undefined>, ...v.StrictObjectSchema<{
6866
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
6867
+ readonly status: v.LiteralSchema<"unavailable" | "changed" | "deferred" | "oversized", undefined>;
6868
+ }, undefined>[]], undefined>;
6869
+ export type ArtifactBodyBatchResult = v.InferOutput<typeof ArtifactBodyBatchResultSchema>;
6870
+ export declare const ArtifactBodyBatchResponseSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
6871
+ readonly scope: v.StrictObjectSchema<{
6872
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6873
+ readonly bundleId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6874
+ readonly principalId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6875
+ }, undefined>;
6876
+ readonly results: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"status", [v.StrictObjectSchema<{
6877
+ readonly status: v.LiteralSchema<"ok", undefined>;
6878
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6879
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
6880
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6881
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6882
+ }, undefined>, ...v.StrictObjectSchema<{
6883
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>;
6884
+ readonly status: v.LiteralSchema<"unavailable" | "changed" | "deferred" | "oversized", undefined>;
6885
+ }, undefined>[]], undefined>, undefined>, v.MinLengthAction<({
6886
+ status: "ok";
6887
+ content: string | null;
6888
+ id: string;
6889
+ bodyToken: string;
6890
+ version: number;
6891
+ } | {
6892
+ id: string;
6893
+ status: "unavailable" | "changed" | "deferred" | "oversized";
6894
+ })[], 1, undefined>, v.MaxLengthAction<({
6895
+ status: "ok";
6896
+ content: string | null;
6897
+ id: string;
6898
+ bodyToken: string;
6899
+ version: number;
6900
+ } | {
6901
+ id: string;
6902
+ status: "unavailable" | "changed" | "deferred" | "oversized";
6903
+ })[], 50, undefined>, v.CheckAction<({
6904
+ status: "ok";
6905
+ content: string | null;
6906
+ id: string;
6907
+ bodyToken: string;
6908
+ version: number;
6909
+ } | {
6910
+ id: string;
6911
+ status: "unavailable" | "changed" | "deferred" | "oversized";
6912
+ })[], "Duplicate artifact IDs">]>;
6913
+ }, undefined>, v.CheckAction<{
6914
+ scope: {
6915
+ userId: string;
6916
+ bundleId: string | null;
6917
+ principalId: string | null;
6918
+ };
6919
+ results: ({
6920
+ status: "ok";
6921
+ content: string | null;
6922
+ id: string;
6923
+ bodyToken: string;
6924
+ version: number;
6925
+ } | {
6926
+ id: string;
6927
+ status: "unavailable" | "changed" | "deferred" | "oversized";
6928
+ })[];
6929
+ }, "Body batch content budget exceeded">]>;
6930
+ export type ArtifactBodyBatchResponse = v.InferOutput<typeof ArtifactBodyBatchResponseSchema>;
6931
+ /**
6932
+ * Only a complete manifest identifies the whole authorized head set. A client
6933
+ * must still hydrate those exact versions and body tokens before marking its cache complete.
6934
+ */
6935
+ export declare const ArtifactManifestResponseSchema: v.VariantSchema<"complete", [v.StrictObjectSchema<{
6936
+ readonly scope: v.StrictObjectSchema<{
6937
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6938
+ readonly bundleId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6939
+ readonly principalId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6940
+ }, undefined>;
6941
+ readonly complete: v.LiteralSchema<true, undefined>;
6942
+ readonly fingerprint: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6943
+ readonly artifacts: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
6944
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6945
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6946
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6947
+ }, undefined>, undefined>, v.MaxLengthAction<{
6948
+ bodyToken: string;
6949
+ id: string;
6950
+ version: number;
6951
+ }[], 10000, undefined>, v.CheckAction<{
6952
+ bodyToken: string;
6953
+ id: string;
6954
+ version: number;
6955
+ }[], "Duplicate artifact IDs">]>;
6956
+ }, undefined>, v.StrictObjectSchema<{
6957
+ readonly scope: v.StrictObjectSchema<{
6958
+ readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6959
+ readonly bundleId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6960
+ readonly principalId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
6961
+ }, undefined>;
6962
+ readonly complete: v.LiteralSchema<false, undefined>;
6963
+ readonly fingerprint: v.NullSchema<undefined>;
6964
+ readonly artifacts: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
6965
+ readonly bodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
6966
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6967
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
6968
+ }, undefined>, undefined>, v.MaxLengthAction<{
6969
+ bodyToken: string;
6970
+ id: string;
6971
+ version: number;
6972
+ }[], 10000, undefined>, v.CheckAction<{
6973
+ bodyToken: string;
6974
+ id: string;
6975
+ version: number;
6976
+ }[], "Duplicate artifact IDs">]>;
6977
+ }, undefined>], undefined>;
6978
+ export type ArtifactManifestResponse = v.InferOutput<typeof ArtifactManifestResponseSchema>;
6159
6979
  /**
6160
6980
  * `POST /api/v1/artifacts/:id/done`: `true` marks a capture done, which takes it
6161
6981
  * out of the inbox and nothing else; `false` moves it back to the inbox.
@@ -6217,6 +7037,8 @@ export declare const MarkDoneResponseSchema: v.ObjectSchema<{
6217
7037
  }[], 8, undefined>]>, undefined>;
6218
7038
  /** Present iff git owns this artifact. */
6219
7039
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
7040
+ /** Unverified display label, never an ownership key or a remote URL. */
7041
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6220
7042
  /**
6221
7043
  * The committed `project.id` of the source repository — the same id space as
6222
7044
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -6291,6 +7113,7 @@ export declare const MarkDoneResponseSchema: v.ObjectSchema<{
6291
7113
  * Mossbear-owned.
6292
7114
  */
6293
7115
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
7116
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6294
7117
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6295
7118
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
6296
7119
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -6382,6 +7205,7 @@ export declare const MarkDoneResponseSchema: v.ObjectSchema<{
6382
7205
  approved?: boolean | undefined;
6383
7206
  findingState?: "ready" | "waiting" | undefined;
6384
7207
  publishedFrom?: {
7208
+ repository?: string | undefined;
6385
7209
  projectId: string;
6386
7210
  branch: string | null;
6387
7211
  thisRepo?: boolean | undefined;
@@ -6456,6 +7280,8 @@ export declare const DeleteArtifactResponseSchema: v.ObjectSchema<{
6456
7280
  }[], 8, undefined>]>, undefined>;
6457
7281
  /** Present iff git owns this artifact. */
6458
7282
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
7283
+ /** Unverified display label, never an ownership key or a remote URL. */
7284
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6459
7285
  /**
6460
7286
  * The committed `project.id` of the source repository — the same id space as
6461
7287
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -6530,6 +7356,7 @@ export declare const DeleteArtifactResponseSchema: v.ObjectSchema<{
6530
7356
  * Mossbear-owned.
6531
7357
  */
6532
7358
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
7359
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6533
7360
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6534
7361
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
6535
7362
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -6621,6 +7448,7 @@ export declare const DeleteArtifactResponseSchema: v.ObjectSchema<{
6621
7448
  approved?: boolean | undefined;
6622
7449
  findingState?: "ready" | "waiting" | undefined;
6623
7450
  publishedFrom?: {
7451
+ repository?: string | undefined;
6624
7452
  projectId: string;
6625
7453
  branch: string | null;
6626
7454
  thisRepo?: boolean | undefined;
@@ -6694,6 +7522,8 @@ export declare const WithdrawArtifactResponseSchema: v.ObjectSchema<{
6694
7522
  }[], 8, undefined>]>, undefined>;
6695
7523
  /** Present iff git owns this artifact. */
6696
7524
  readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
7525
+ /** Unverified display label, never an ownership key or a remote URL. */
7526
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6697
7527
  /**
6698
7528
  * The committed `project.id` of the source repository — the same id space as
6699
7529
  * an item's delivery-scoping `projectId` below, but a different fact: that one
@@ -6768,6 +7598,7 @@ export declare const WithdrawArtifactResponseSchema: v.ObjectSchema<{
6768
7598
  * Mossbear-owned.
6769
7599
  */
6770
7600
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
7601
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
6771
7602
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6772
7603
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
6773
7604
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -6859,6 +7690,7 @@ export declare const WithdrawArtifactResponseSchema: v.ObjectSchema<{
6859
7690
  approved?: boolean | undefined;
6860
7691
  findingState?: "ready" | "waiting" | undefined;
6861
7692
  publishedFrom?: {
7693
+ repository?: string | undefined;
6862
7694
  projectId: string;
6863
7695
  branch: string | null;
6864
7696
  thisRepo?: boolean | undefined;
@@ -7014,8 +7846,8 @@ export declare const ArtifactHistoryResponseSchema: v.ObjectSchema<{
7014
7846
  readonly nextCursor: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
7015
7847
  }, undefined>;
7016
7848
  /**
7017
- * The one refused-stale-write shape, for a direct update and a bundle-scoped one
7018
- * alike. The `code` is what separates a retryable conflict from the other 409s
7849
+ * The refused-stale-write shape for direct and bundle-scoped updates alike.
7850
+ * The `code` separates a retryable conflict from the other 409s
7019
7851
  * (a read-only artifact is permanent). Nothing was written.
7020
7852
  */
7021
7853
  export declare const ArtifactVersionConflictSchema: v.ObjectSchema<{
@@ -7025,6 +7857,16 @@ export declare const ArtifactVersionConflictSchema: v.ObjectSchema<{
7025
7857
  readonly expectedVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
7026
7858
  readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7027
7859
  }, undefined>;
7860
+ /** The requested live body no longer matches its metadata/manifest head. */
7861
+ export declare const ArtifactReadConflictSchema: v.ObjectSchema<{
7862
+ readonly error: v.StringSchema<undefined>;
7863
+ readonly code: v.LiteralSchema<"read-conflict", undefined>;
7864
+ readonly currentVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
7865
+ readonly expectedVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
7866
+ readonly currentBodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
7867
+ readonly expectedBodyToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
7868
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7869
+ }, undefined>;
7028
7870
  /**
7029
7871
  * Save a draft of an artifact from a git branch. One draft per artifact,
7030
7872
  * author and branch, so a second upload from the same branch replaces the
@@ -8778,6 +9620,7 @@ export declare const ArtifactFeedbackResponseSchema: v.ObjectSchema<{
8778
9620
  * Mossbear-owned.
8779
9621
  */
8780
9622
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
9623
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
8781
9624
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
8782
9625
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
8783
9626
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -9138,6 +9981,7 @@ export declare const ArtifactFeedbackBatchResponseSchema: v.ObjectSchema<{
9138
9981
  * Mossbear-owned.
9139
9982
  */
9140
9983
  readonly publishedFrom: v.OptionalSchema<v.ObjectSchema<{
9984
+ readonly repository: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>, v.CheckAction<string, "repository must be trimmed and hold no control characters">]>, undefined>;
9141
9985
  readonly projectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
9142
9986
  readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
9143
9987
  readonly thisRepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
@@ -10784,11 +11628,17 @@ export declare function parseGuideMemberFilesResponse(data: unknown): {
10784
11628
  };
10785
11629
  export declare function parseBundleListResponse(data: unknown): {
10786
11630
  bundles: {
11631
+ home?: string | undefined;
11632
+ publisher?: {
11633
+ name: string;
11634
+ handle: string;
11635
+ } | undefined;
11636
+ readOnly?: true | undefined;
10787
11637
  id: string;
10788
11638
  slug: string;
10789
11639
  name: string;
10790
11640
  createdAt: string;
10791
- home?: string | undefined;
11641
+ description?: string | null | undefined;
10792
11642
  }[];
10793
11643
  };
10794
11644
  export declare function parseWorkspaceListResponse(data: unknown): {
@@ -10811,17 +11661,24 @@ export declare function parseRevokeScopedTokenRequest(data: unknown): {
10811
11661
  id: string;
10812
11662
  };
10813
11663
  export declare function parseCreateBundleRequest(data: unknown): {
11664
+ description?: string | null | undefined;
10814
11665
  slug: string;
10815
11666
  name: string;
10816
11667
  workspaceId?: string | undefined;
10817
11668
  };
10818
11669
  export declare function parseCreateBundleResponse(data: unknown): {
10819
11670
  bundle: {
11671
+ home?: string | undefined;
11672
+ publisher?: {
11673
+ name: string;
11674
+ handle: string;
11675
+ } | undefined;
11676
+ readOnly?: true | undefined;
10820
11677
  id: string;
10821
11678
  slug: string;
10822
11679
  name: string;
10823
11680
  createdAt: string;
10824
- home?: string | undefined;
11681
+ description?: string | null | undefined;
10825
11682
  };
10826
11683
  };
10827
11684
  export declare function parseAttachBundleMemberRequest(data: unknown): {
@@ -10854,9 +11711,16 @@ export declare function parseSubscribeBundleResponse(data: unknown): {
10854
11711
  };
10855
11712
  export declare function parseResolveSubscriptionsRequest(data: unknown): {
10856
11713
  repoBundleIds: string[];
11714
+ repoBundleAddresses?: string[] | undefined;
10857
11715
  };
10858
11716
  export declare function parseResolveSubscriptionsResponse(data: unknown): {
10859
11717
  bundles: {
11718
+ address?: string | undefined;
11719
+ publisher?: {
11720
+ name: string;
11721
+ handle: string;
11722
+ } | undefined;
11723
+ readOnly?: true | undefined;
10860
11724
  id: string;
10861
11725
  slug: string;
10862
11726
  name: string;
@@ -10868,6 +11732,9 @@ export declare function parseResolveSubscriptionsResponse(data: unknown): {
10868
11732
  unresolved: {
10869
11733
  id: string;
10870
11734
  }[];
11735
+ unresolvedAddresses?: {
11736
+ address: string;
11737
+ }[] | undefined;
10871
11738
  account?: {
10872
11739
  deliverGlobalSkills: boolean;
10873
11740
  } | undefined;
@@ -10877,14 +11744,21 @@ export declare function parseUpdateBundleRequest(data: unknown): {
10877
11744
  name?: string | undefined;
10878
11745
  home?: string | null | undefined;
10879
11746
  columns?: string[] | null | undefined;
11747
+ description?: string | null | undefined;
10880
11748
  };
10881
11749
  export declare function parseUpdateBundleResponse(data: unknown): {
10882
11750
  bundle: {
11751
+ home?: string | undefined;
11752
+ publisher?: {
11753
+ name: string;
11754
+ handle: string;
11755
+ } | undefined;
11756
+ readOnly?: true | undefined;
10883
11757
  id: string;
10884
11758
  slug: string;
10885
11759
  name: string;
10886
11760
  createdAt: string;
10887
- home?: string | undefined;
11761
+ description?: string | null | undefined;
10888
11762
  };
10889
11763
  };
10890
11764
  export declare function parseDeleteBundleResponse(data: unknown): {
@@ -10942,6 +11816,7 @@ export declare function parseContextItemsResponse(data: unknown): {
10942
11816
  approved?: boolean | undefined;
10943
11817
  findingState?: "ready" | "waiting" | undefined;
10944
11818
  publishedFrom?: {
11819
+ repository?: string | undefined;
10945
11820
  projectId: string;
10946
11821
  branch: string | null;
10947
11822
  thisRepo?: boolean | undefined;
@@ -10959,6 +11834,7 @@ export declare function parseContextItemsResponse(data: unknown): {
10959
11834
  }[] | undefined;
10960
11835
  updatedAt: string;
10961
11836
  gitSource?: {
11837
+ repository?: string | undefined;
10962
11838
  projectId: string;
10963
11839
  commitSha: string;
10964
11840
  branch?: string | undefined;
@@ -11027,6 +11903,7 @@ export declare function parseBundleArtifactsResponse(data: unknown): {
11027
11903
  approved?: boolean | undefined;
11028
11904
  findingState?: "ready" | "waiting" | undefined;
11029
11905
  publishedFrom?: {
11906
+ repository?: string | undefined;
11030
11907
  projectId: string;
11031
11908
  branch: string | null;
11032
11909
  thisRepo?: boolean | undefined;
@@ -11044,6 +11921,7 @@ export declare function parseBundleArtifactsResponse(data: unknown): {
11044
11921
  }[] | undefined;
11045
11922
  updatedAt: string;
11046
11923
  gitSource?: {
11924
+ repository?: string | undefined;
11047
11925
  projectId: string;
11048
11926
  commitSha: string;
11049
11927
  branch?: string | undefined;
@@ -11381,6 +12259,7 @@ export declare function parseItemCommentsResponse(data: unknown): {
11381
12259
  approved?: boolean | undefined;
11382
12260
  findingState?: "ready" | "waiting" | undefined;
11383
12261
  publishedFrom?: {
12262
+ repository?: string | undefined;
11384
12263
  projectId: string;
11385
12264
  branch: string | null;
11386
12265
  thisRepo?: boolean | undefined;