@mossbear/protocol 0.1.0-alpha.97 → 0.1.0-alpha.99

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
@@ -415,12 +415,6 @@ export declare const GuideImportAliasForkSchema: v.ObjectSchema<{
415
415
  readonly paths: 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.MinLengthAction<string[], 2, undefined>]>;
416
416
  }, undefined>;
417
417
  export type GuideImportAliasFork = v.InferOutput<typeof GuideImportAliasForkSchema>;
418
- export declare const RawGuideFileDeletionSchema: v.ObjectSchema<{
419
- readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
420
- readonly format: v.PicklistSchema<["agents-md", "agents-dir", "claude-md", "claude-rules", "cursorrules", "cursor-rules", "skill-md"], undefined>;
421
- }, undefined>;
422
- /** Max number of deletions accepted in a single `POST /api/rules/deletions` request. */
423
- export declare const MAX_RULE_DELETIONS_BATCH = 500;
424
418
  /**
425
419
  * One guide to stop delivering, addressed the way the **import** route already
426
420
  * resolves an existing guide: `(root, path)` plus the envelope's checkout and
@@ -510,9 +504,6 @@ export declare function parseRuleUnlinkRequest(data: unknown): {
510
504
  repoId?: string | undefined;
511
505
  projectId?: string | undefined;
512
506
  };
513
- export declare const RuleDeletionsRequestSchema: v.ObjectSchema<{
514
- readonly deletions: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnknownSchema, undefined>, v.MaxLengthAction<unknown[], 500, undefined>]>;
515
- }, undefined>;
516
507
  /**
517
508
  * The sentence a caller gets back when a display name carries a character that
518
509
  * cannot be seen. It is written for the person who typed the name, not for the
@@ -3565,14 +3556,6 @@ export declare const BeginPhotoUploadResponseSchema: v.VariantSchema<"state", [v
3565
3556
  }, undefined>;
3566
3557
  }, undefined>], undefined>;
3567
3558
  export type BeginPhotoUploadResponse = v.InferOutput<typeof BeginPhotoUploadResponseSchema>;
3568
- /** Max number of ids accepted in a single `POST /api/v1/context/inbox/archive` request. */
3569
- export declare const MAX_INBOX_ARCHIVE_BATCH = 500;
3570
- export declare const InboxArchiveRequestSchema: v.ObjectSchema<{
3571
- readonly ids: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MinLengthAction<string[], 1, undefined>, v.MaxLengthAction<string[], 500, undefined>]>;
3572
- }, undefined>;
3573
- export declare const InboxArchiveResponseSchema: v.ObjectSchema<{
3574
- readonly archived: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
3575
- }, undefined>;
3576
3559
  export declare const ArtifactVersionSchema: v.ObjectSchema<{
3577
3560
  readonly id: v.StringSchema<undefined>;
3578
3561
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
@@ -3638,12 +3621,13 @@ export declare const CreatableArtifactFormatSchema: v.PicklistSchema<[...("markd
3638
3621
  /** Largest version an artifact can carry: the version column is a 32-bit integer. */
3639
3622
  export declare const MAX_ARTIFACT_VERSION = 2147483647;
3640
3623
  /**
3641
- * Lifecycle state of an artifact. `removed` is a tombstone: the publishing
3624
+ * Lifecycle state of an artifact. `deleted` is in the Trash: hidden and
3625
+ * restorable for the workspace's retention period. `removed` is a tombstone: the publishing
3642
3626
  * repository deleted the file, and the artifact still reports its last revision.
3643
3627
  * Aliases and anything else that is not content are not artifacts and never
3644
3628
  * appear here.
3645
3629
  */
3646
- export declare const ArtifactStateSchema: v.PicklistSchema<["live", "archived", "removed"], undefined>;
3630
+ export declare const ArtifactStateSchema: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
3647
3631
  /** Most source references one saved revision may pin. */
3648
3632
  export declare const MAX_ARTIFACT_SOURCE_REFS = 50;
3649
3633
  /**
@@ -3791,10 +3775,15 @@ export declare const ArtifactSchema: v.ObjectSchema<{
3791
3775
  readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
3792
3776
  /** Monotonic content version; echo it back as `expectedVersion` to update. */
3793
3777
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
3794
- readonly state: v.PicklistSchema<["live", "archived", "removed"], undefined>;
3778
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
3795
3779
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3796
3780
  /** True for a deliberate capture (Inbox). Not derivable from filing state. */
3797
3781
  readonly capture: v.BooleanSchema<undefined>;
3782
+ /**
3783
+ * When a capture was marked done, which takes it out of the inbox and nothing
3784
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
3785
+ */
3786
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
3798
3787
  /** Null for binary content, which is not served inline. */
3799
3788
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3800
3789
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -4133,6 +4122,8 @@ export declare const CreateArtifactRequestSchema: v.StrictObjectSchema<{
4133
4122
  * them records none.
4134
4123
  */
4135
4124
  export declare const UpdateArtifactRequestSchema: v.StrictObjectSchema<{
4125
+ /** Dashboard autosave boundary; omitted retains every ordinary edit. */
4126
+ readonly checkpoint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4136
4127
  readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "content must be at most 524288 bytes">]>;
4137
4128
  readonly expectedVersion: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4138
4129
  readonly sources: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -4247,13 +4238,14 @@ export declare const UpdateArtifactRequestSchema: v.StrictObjectSchema<{
4247
4238
  /**
4248
4239
  * Tombstone an artifact: the commit that published it has since deleted the
4249
4240
  * file. The row and its history are kept, marked removed, and it is no longer
4250
- * delivered. That is not archive, which takes the artifact out of every bundle.
4241
+ * delivered. That is withdrawal, not Delete, which moves the artifact to the
4242
+ * Trash and out of every bundle.
4251
4243
  *
4252
4244
  * `gitSource` is required because a tombstone's whole claim is which revision
4253
4245
  * removed the file. `expectedVersion` is the optional precondition the caller
4254
4246
  * last read.
4255
4247
  */
4256
- export declare const RemoveArtifactRequestSchema: v.StrictObjectSchema<{
4248
+ export declare const WithdrawArtifactRequestSchema: v.StrictObjectSchema<{
4257
4249
  readonly gitSource: v.ObjectSchema<{
4258
4250
  /**
4259
4251
  * The committed `project.id` of the source repository — the same id space as
@@ -4288,8 +4280,21 @@ export declare const RemoveArtifactRequestSchema: v.StrictObjectSchema<{
4288
4280
  */
4289
4281
  readonly onlyMemberOf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
4290
4282
  }, undefined>;
4291
- /** Archive an artifact. The body is optional; `projectId` is the same checkout claim as on update. */
4292
- export declare const ArchiveArtifactRequestSchema: v.StrictObjectSchema<{
4283
+ /**
4284
+ * Delete an artifact: move it to the Trash, restorable for the workspace's
4285
+ * retention period. The body is optional; `projectId` is the same checkout
4286
+ * claim as on update.
4287
+ */
4288
+ export declare const DeleteArtifactRequestSchema: v.StrictObjectSchema<{
4289
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4290
+ }, undefined>;
4291
+ /**
4292
+ * Restore an artifact from the Trash. The same optional checkout claim as Delete:
4293
+ * an artifact a repository publishes, or one held by a bundle a repository
4294
+ * homes, is restored only from that checkout. The claim identifies the
4295
+ * checkout and grants no access of its own.
4296
+ */
4297
+ export declare const RestoreArtifactRequestSchema: v.StrictObjectSchema<{
4293
4298
  readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4294
4299
  }, undefined>;
4295
4300
  /**
@@ -4325,10 +4330,15 @@ export declare const ReadArtifactResponseSchema: v.ObjectSchema<{
4325
4330
  readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4326
4331
  /** Monotonic content version; echo it back as `expectedVersion` to update. */
4327
4332
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4328
- readonly state: v.PicklistSchema<["live", "archived", "removed"], undefined>;
4333
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4329
4334
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4330
4335
  /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4331
4336
  readonly capture: v.BooleanSchema<undefined>;
4337
+ /**
4338
+ * When a capture was marked done, which takes it out of the inbox and nothing
4339
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
4340
+ */
4341
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4332
4342
  /** Null for binary content, which is not served inline. */
4333
4343
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4334
4344
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -4519,10 +4529,15 @@ export declare const CreateArtifactResponseSchema: v.ObjectSchema<{
4519
4529
  readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4520
4530
  /** Monotonic content version; echo it back as `expectedVersion` to update. */
4521
4531
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4522
- readonly state: v.PicklistSchema<["live", "archived", "removed"], undefined>;
4532
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4523
4533
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4524
4534
  /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4525
4535
  readonly capture: v.BooleanSchema<undefined>;
4536
+ /**
4537
+ * When a capture was marked done, which takes it out of the inbox and nothing
4538
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
4539
+ */
4540
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4526
4541
  /** Null for binary content, which is not served inline. */
4527
4542
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4528
4543
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -4700,10 +4715,397 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
4700
4715
  readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4701
4716
  /** Monotonic content version; echo it back as `expectedVersion` to update. */
4702
4717
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4703
- readonly state: v.PicklistSchema<["live", "archived", "removed"], undefined>;
4718
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4704
4719
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4705
4720
  /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4706
4721
  readonly capture: v.BooleanSchema<undefined>;
4722
+ /**
4723
+ * When a capture was marked done, which takes it out of the inbox and nothing
4724
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
4725
+ */
4726
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4727
+ /** Null for binary content, which is not served inline. */
4728
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4729
+ readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4730
+ readonly root: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>, undefined>;
4731
+ 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>;
4732
+ readonly projectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4733
+ readonly pathProjectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4734
+ readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4735
+ readonly root: v.PicklistSchema<["project", "global"], undefined>;
4736
+ 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">]>;
4737
+ }, undefined>, undefined>, v.MaxLengthAction<{
4738
+ root: "project" | "global";
4739
+ path: string;
4740
+ }[], 8, undefined>]>, undefined>;
4741
+ /** Present iff git owns this artifact. */
4742
+ readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
4743
+ /**
4744
+ * The committed `project.id` of the source repository — the same id space as
4745
+ * an item's delivery-scoping `projectId` below, but a different fact: that one
4746
+ * says which repo an item is materialized into and is stamped onto
4747
+ * Mossbear-owned rows too, this one says who may edit it.
4748
+ */
4749
+ 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">]>;
4750
+ readonly commitSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "commitSha must be 40 or 64 lowercase hex characters">]>;
4751
+ /**
4752
+ * The branch the publishing commit was on. **The one optional member**: a
4753
+ * detached HEAD has none to record. Publishers read it back to tell a copy
4754
+ * from another branch, whose commit a squash merge may have discarded, from
4755
+ * one of the published branch itself.
4756
+ */
4757
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4758
+ }, undefined>, undefined>, undefined>;
4759
+ /** Absent, not empty, when there are none. Absence is not a verdict. */
4760
+ readonly comments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4761
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4762
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
4763
+ /** Current source location of an anchored passage, or its lost quote. */
4764
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
4765
+ readonly quote: v.StringSchema<undefined>;
4766
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
4767
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
4768
+ readonly start: v.NumberSchema<undefined>;
4769
+ readonly end: v.NumberSchema<undefined>;
4770
+ }, undefined>, undefined>;
4771
+ }, undefined>, undefined>;
4772
+ /** The comment's text, already wrapped in the response's untrusted markers. */
4773
+ readonly body: v.StringSchema<undefined>;
4774
+ /**
4775
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
4776
+ * Present only on a Mossbear comment. The comment's `body` begins with the
4777
+ * claim (what goes wrong); this carries what the claim rests on.
4778
+ */
4779
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
4780
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
4781
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
4782
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4783
+ /** What the drafter did not read, fixed per tier. */
4784
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4785
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
4786
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4787
+ }, undefined>, undefined>;
4788
+ /**
4789
+ * Whether the person approved a comment Mossbear drafted. Present on every
4790
+ * Mossbear comment and absent on a person's or an agent's, which are
4791
+ * requests as written. `false` is a draft nobody has read yet: a reader shows
4792
+ * it to the user and acts only on their go-ahead. Only a client that reports
4793
+ * a version able to mark drafts is ever listed one, so an older reader that
4794
+ * strips this field never receives a draft it would print as a request.
4795
+ */
4796
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4797
+ /** The author's display name as the workspace shows it, or null. Never an email. */
4798
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4799
+ /**
4800
+ * Who wrote it. Optional because a server that predates the field omits it;
4801
+ * a reader that meets a reply without it cannot tell whose it is, and a
4802
+ * server never sends a reply to a client too old to read this.
4803
+ */
4804
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
4805
+ /** ISO timestamp, machine format. */
4806
+ readonly createdAt: v.StringSchema<undefined>;
4807
+ /** The item's content version the comment was written against. */
4808
+ readonly itemVersion: v.NumberSchema<undefined>;
4809
+ /** True when the item's current version is greater than `itemVersion`. */
4810
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
4811
+ /**
4812
+ * How many agent reads were handed this comment **before** this one — so a
4813
+ * comment reaching an agent for the first time reports `0`.
4814
+ *
4815
+ * It is the stored count as it read at the moment the response was built;
4816
+ * the serve this response *is* has not been counted yet. Excluded rather
4817
+ * than included because the count is recorded best-effort: a response that
4818
+ * claimed to include itself would be wrong whenever that record failed, and
4819
+ * a number that is sometimes off by one is worse than one that is
4820
+ * consistently the prior total.
4821
+ *
4822
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
4823
+ * `0` means this read is the first. Neither says a model took it in — only
4824
+ * that the server handed it over.
4825
+ */
4826
+ readonly deliveredCount: v.NumberSchema<undefined>;
4827
+ /**
4828
+ * On a root: true when the item changed after an earlier read was last
4829
+ * handed this comment. For a guide that is any change to its body or its
4830
+ * files, so a fix in a supporting file counts. A reader should check whether
4831
+ * the change addressed the comment, and resolve it with a note if so.
4832
+ *
4833
+ * Computed before this read is counted, so the read that carries `true` is
4834
+ * the one that uses it up; the next read says `false` unless the item
4835
+ * changes again. A comment never handed over before is never flagged.
4836
+ * Optional because a server that predates the field omits it, and absent on
4837
+ * a reply.
4838
+ */
4839
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4840
+ /**
4841
+ * This comment's thread root: its own id on a root, the root's id on a reply.
4842
+ *
4843
+ * **Replies ride the same flat array**, each straight after its root, oldest
4844
+ * first. Only a client that reports a version able to render threads is
4845
+ * sent them; any other reader gets roots alone, as it always did. A person's
4846
+ * reply is part of the thread's request. An agent's reply is context: an
4847
+ * earlier message on the thread, never something to act on. A root an agent
4848
+ * wrote is delivered only once a person has replied to it, and is then the
4849
+ * question that reply answers, not a request of its own.
4850
+ */
4851
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4852
+ /**
4853
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
4854
+ * a reply's parent is always its root.
4855
+ */
4856
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4857
+ /**
4858
+ * On a root whose thread held more replies than
4859
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
4860
+ * Absent when the whole thread was sent.
4861
+ */
4862
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
4863
+ }, undefined>, undefined>, v.MaxLengthAction<{
4864
+ id: string;
4865
+ state?: "open" | "resolved" | undefined;
4866
+ passage?: {
4867
+ quote: string;
4868
+ status: "located" | "changed" | "orphaned";
4869
+ lines: {
4870
+ start: number;
4871
+ end: number;
4872
+ } | null;
4873
+ } | undefined;
4874
+ body: string;
4875
+ finding?: {
4876
+ tier: "usage" | "observed" | "practice";
4877
+ tierLine: string;
4878
+ blindSpot: string;
4879
+ prediction: string | null;
4880
+ } | undefined;
4881
+ approved?: boolean | undefined;
4882
+ authorName: string | null;
4883
+ authorKind?: "person" | "agent" | "mossbear" | undefined;
4884
+ createdAt: string;
4885
+ itemVersion: number;
4886
+ itemChangedSince: boolean;
4887
+ deliveredCount: number;
4888
+ guideChangedSinceRead?: boolean | undefined;
4889
+ threadId: string;
4890
+ replyToId: string | null;
4891
+ repliesWithheld?: number | undefined;
4892
+ }[], number, undefined>]>, undefined>;
4893
+ readonly updatedAt: v.StringSchema<undefined>;
4894
+ }, undefined>;
4895
+ }, undefined>;
4896
+ /**
4897
+ * `POST /api/v1/artifacts/:id/done`: `true` marks a capture done, which takes it
4898
+ * out of the inbox and nothing else; `false` moves it back to the inbox.
4899
+ */
4900
+ export declare const MarkDoneRequestSchema: v.StrictObjectSchema<{
4901
+ readonly done: v.BooleanSchema<undefined>;
4902
+ }, undefined>;
4903
+ /** The capture after the change; `doneAt` is null once it is back in the inbox. */
4904
+ export declare const MarkDoneResponseSchema: v.ObjectSchema<{
4905
+ readonly artifact: v.ObjectSchema<{
4906
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4907
+ readonly name: v.StringSchema<undefined>;
4908
+ readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
4909
+ readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4910
+ /** Monotonic content version; echo it back as `expectedVersion` to update. */
4911
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4912
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4913
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4914
+ /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4915
+ readonly capture: v.BooleanSchema<undefined>;
4916
+ /**
4917
+ * When a capture was marked done, which takes it out of the inbox and nothing
4918
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
4919
+ */
4920
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4921
+ /** Null for binary content, which is not served inline. */
4922
+ readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4923
+ readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4924
+ readonly root: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>, undefined>;
4925
+ 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>;
4926
+ readonly projectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4927
+ readonly pathProjectId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4928
+ readonly aliases: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4929
+ readonly root: v.PicklistSchema<["project", "global"], undefined>;
4930
+ 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">]>;
4931
+ }, undefined>, undefined>, v.MaxLengthAction<{
4932
+ root: "project" | "global";
4933
+ path: string;
4934
+ }[], 8, undefined>]>, undefined>;
4935
+ /** Present iff git owns this artifact. */
4936
+ readonly gitSource: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
4937
+ /**
4938
+ * The committed `project.id` of the source repository — the same id space as
4939
+ * an item's delivery-scoping `projectId` below, but a different fact: that one
4940
+ * says which repo an item is materialized into and is stamped onto
4941
+ * Mossbear-owned rows too, this one says who may edit it.
4942
+ */
4943
+ 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">]>;
4944
+ readonly commitSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "commitSha must be 40 or 64 lowercase hex characters">]>;
4945
+ /**
4946
+ * The branch the publishing commit was on. **The one optional member**: a
4947
+ * detached HEAD has none to record. Publishers read it back to tell a copy
4948
+ * from another branch, whose commit a squash merge may have discarded, from
4949
+ * one of the published branch itself.
4950
+ */
4951
+ readonly branch: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4952
+ }, undefined>, undefined>, undefined>;
4953
+ /** Absent, not empty, when there are none. Absence is not a verdict. */
4954
+ readonly comments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
4955
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4956
+ readonly state: v.OptionalSchema<v.PicklistSchema<["open", "resolved"], undefined>, undefined>;
4957
+ /** Current source location of an anchored passage, or its lost quote. */
4958
+ readonly passage: v.OptionalSchema<v.ObjectSchema<{
4959
+ readonly quote: v.StringSchema<undefined>;
4960
+ readonly status: v.PicklistSchema<["located", "changed", "orphaned"], undefined>;
4961
+ readonly lines: v.NullableSchema<v.ObjectSchema<{
4962
+ readonly start: v.NumberSchema<undefined>;
4963
+ readonly end: v.NumberSchema<undefined>;
4964
+ }, undefined>, undefined>;
4965
+ }, undefined>, undefined>;
4966
+ /** The comment's text, already wrapped in the response's untrusted markers. */
4967
+ readonly body: v.StringSchema<undefined>;
4968
+ /**
4969
+ * What a comment Mossbear wrote is: a finding about the item, never an edit.
4970
+ * Present only on a Mossbear comment. The comment's `body` begins with the
4971
+ * claim (what goes wrong); this carries what the claim rests on.
4972
+ */
4973
+ readonly finding: v.OptionalSchema<v.ObjectSchema<{
4974
+ readonly tier: v.PicklistSchema<["observed", "usage", "practice"], undefined>;
4975
+ /** How the finding is known, in one line: "Seen in 3 sessions (2026-09-15 – 2026-10-03)". */
4976
+ readonly tierLine: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4977
+ /** What the drafter did not read, fixed per tier. */
4978
+ readonly blindSpot: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>;
4979
+ /** What should change in later sessions if the finding is fixed, wrapped in the untrusted markers. */
4980
+ readonly prediction: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4981
+ }, undefined>, undefined>;
4982
+ /**
4983
+ * Whether the person approved a comment Mossbear drafted. Present on every
4984
+ * Mossbear comment and absent on a person's or an agent's, which are
4985
+ * requests as written. `false` is a draft nobody has read yet: a reader shows
4986
+ * it to the user and acts only on their go-ahead. Only a client that reports
4987
+ * a version able to mark drafts is ever listed one, so an older reader that
4988
+ * strips this field never receives a draft it would print as a request.
4989
+ */
4990
+ readonly approved: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4991
+ /** The author's display name as the workspace shows it, or null. Never an email. */
4992
+ readonly authorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4993
+ /**
4994
+ * Who wrote it. Optional because a server that predates the field omits it;
4995
+ * a reader that meets a reply without it cannot tell whose it is, and a
4996
+ * server never sends a reply to a client too old to read this.
4997
+ */
4998
+ readonly authorKind: v.OptionalSchema<v.PicklistSchema<["person", "agent", "mossbear"], undefined>, undefined>;
4999
+ /** ISO timestamp, machine format. */
5000
+ readonly createdAt: v.StringSchema<undefined>;
5001
+ /** The item's content version the comment was written against. */
5002
+ readonly itemVersion: v.NumberSchema<undefined>;
5003
+ /** True when the item's current version is greater than `itemVersion`. */
5004
+ readonly itemChangedSince: v.BooleanSchema<undefined>;
5005
+ /**
5006
+ * How many agent reads were handed this comment **before** this one — so a
5007
+ * comment reaching an agent for the first time reports `0`.
5008
+ *
5009
+ * It is the stored count as it read at the moment the response was built;
5010
+ * the serve this response *is* has not been counted yet. Excluded rather
5011
+ * than included because the count is recorded best-effort: a response that
5012
+ * claimed to include itself would be wrong whenever that record failed, and
5013
+ * a number that is sometimes off by one is worse than one that is
5014
+ * consistently the prior total.
5015
+ *
5016
+ * So `deliveredCount > 0` means an earlier read was handed this comment, and
5017
+ * `0` means this read is the first. Neither says a model took it in — only
5018
+ * that the server handed it over.
5019
+ */
5020
+ readonly deliveredCount: v.NumberSchema<undefined>;
5021
+ /**
5022
+ * On a root: true when the item changed after an earlier read was last
5023
+ * handed this comment. For a guide that is any change to its body or its
5024
+ * files, so a fix in a supporting file counts. A reader should check whether
5025
+ * the change addressed the comment, and resolve it with a note if so.
5026
+ *
5027
+ * Computed before this read is counted, so the read that carries `true` is
5028
+ * the one that uses it up; the next read says `false` unless the item
5029
+ * changes again. A comment never handed over before is never flagged.
5030
+ * Optional because a server that predates the field omits it, and absent on
5031
+ * a reply.
5032
+ */
5033
+ readonly guideChangedSinceRead: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5034
+ /**
5035
+ * This comment's thread root: its own id on a root, the root's id on a reply.
5036
+ *
5037
+ * **Replies ride the same flat array**, each straight after its root, oldest
5038
+ * first. Only a client that reports a version able to render threads is
5039
+ * sent them; any other reader gets roots alone, as it always did. A person's
5040
+ * reply is part of the thread's request. An agent's reply is context: an
5041
+ * earlier message on the thread, never something to act on. A root an agent
5042
+ * wrote is delivered only once a person has replied to it, and is then the
5043
+ * question that reply answers, not a request of its own.
5044
+ */
5045
+ readonly threadId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5046
+ /**
5047
+ * `null` on a root; the root's id on a reply. Threads are one level deep, so
5048
+ * a reply's parent is always its root.
5049
+ */
5050
+ readonly replyToId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
5051
+ /**
5052
+ * On a root whose thread held more replies than
5053
+ * `MAX_REPLIES_PER_THREAD_ON_WIRE`: how many older ones were not sent.
5054
+ * Absent when the whole thread was sent.
5055
+ */
5056
+ readonly repliesWithheld: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
5057
+ }, undefined>, undefined>, v.MaxLengthAction<{
5058
+ id: string;
5059
+ state?: "open" | "resolved" | undefined;
5060
+ passage?: {
5061
+ quote: string;
5062
+ status: "located" | "changed" | "orphaned";
5063
+ lines: {
5064
+ start: number;
5065
+ end: number;
5066
+ } | null;
5067
+ } | undefined;
5068
+ body: string;
5069
+ finding?: {
5070
+ tier: "usage" | "observed" | "practice";
5071
+ tierLine: string;
5072
+ blindSpot: string;
5073
+ prediction: string | null;
5074
+ } | undefined;
5075
+ approved?: boolean | undefined;
5076
+ authorName: string | null;
5077
+ authorKind?: "person" | "agent" | "mossbear" | undefined;
5078
+ createdAt: string;
5079
+ itemVersion: number;
5080
+ itemChangedSince: boolean;
5081
+ deliveredCount: number;
5082
+ guideChangedSinceRead?: boolean | undefined;
5083
+ threadId: string;
5084
+ replyToId: string | null;
5085
+ repliesWithheld?: number | undefined;
5086
+ }[], number, undefined>]>, undefined>;
5087
+ readonly updatedAt: v.StringSchema<undefined>;
5088
+ }, undefined>;
5089
+ }, undefined>;
5090
+ /** The artifact after Delete, `state: 'deleted'`. */
5091
+ export declare const DeleteArtifactResponseSchema: v.ObjectSchema<{
5092
+ readonly deleted: v.LiteralSchema<true, undefined>;
5093
+ readonly artifact: v.ObjectSchema<{
5094
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5095
+ readonly name: v.StringSchema<undefined>;
5096
+ readonly role: v.PicklistSchema<["guidance", "criteria", "content"], undefined>;
5097
+ readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
5098
+ /** Monotonic content version; echo it back as `expectedVersion` to update. */
5099
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
5100
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
5101
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5102
+ /** True for a deliberate capture (Inbox). Not derivable from filing state. */
5103
+ readonly capture: v.BooleanSchema<undefined>;
5104
+ /**
5105
+ * When a capture was marked done, which takes it out of the inbox and nothing
5106
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
5107
+ */
5108
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4707
5109
  /** Null for binary content, which is not served inline. */
4708
5110
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4709
5111
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -4874,7 +5276,7 @@ export declare const UpdateArtifactResponseSchema: v.ObjectSchema<{
4874
5276
  }, undefined>;
4875
5277
  }, undefined>;
4876
5278
  /** The tombstoned artifact, `state: 'removed'`. */
4877
- export declare const RemoveArtifactResponseSchema: v.ObjectSchema<{
5279
+ export declare const WithdrawArtifactResponseSchema: v.ObjectSchema<{
4878
5280
  readonly artifact: v.ObjectSchema<{
4879
5281
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4880
5282
  readonly name: v.StringSchema<undefined>;
@@ -4882,10 +5284,15 @@ export declare const RemoveArtifactResponseSchema: v.ObjectSchema<{
4882
5284
  readonly format: v.PicklistSchema<["markdown", "html", "binary", "code"], undefined>;
4883
5285
  /** Monotonic content version; echo it back as `expectedVersion` to update. */
4884
5286
  readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
4885
- readonly state: v.PicklistSchema<["live", "archived", "removed"], undefined>;
5287
+ readonly state: v.PicklistSchema<["live", "deleted", "removed"], undefined>;
4886
5288
  readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4887
5289
  /** True for a deliberate capture (Inbox). Not derivable from filing state. */
4888
5290
  readonly capture: v.BooleanSchema<undefined>;
5291
+ /**
5292
+ * When a capture was marked done, which takes it out of the inbox and nothing
5293
+ * else: a done artifact is still `state: 'live'`. Null while it waits.
5294
+ */
5295
+ readonly doneAt: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
4889
5296
  /** Null for binary content, which is not served inline. */
4890
5297
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4891
5298
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -8838,10 +9245,6 @@ export declare function parseGuideMemberFilesResponse(data: unknown): {
8838
9245
  contentHash: string;
8839
9246
  }[];
8840
9247
  };
8841
- export declare function parseRawGuideFileDeletion(data: unknown): {
8842
- path: string;
8843
- format: "agents-md" | "agents-dir" | "claude-md" | "claude-rules" | "cursorrules" | "cursor-rules" | "skill-md";
8844
- };
8845
9248
  export declare function parseBundleListResponse(data: unknown): {
8846
9249
  bundles: {
8847
9250
  id: string;
@@ -9169,12 +9572,6 @@ export declare function parseBundleArtifactVersionsResponse(data: unknown): {
9169
9572
  }[];
9170
9573
  nextCursor: number | null;
9171
9574
  };
9172
- export declare function parseInboxArchiveRequest(data: unknown): {
9173
- ids: string[];
9174
- };
9175
- export declare function parseInboxArchiveResponse(data: unknown): {
9176
- archived: number;
9177
- };
9178
9575
  export declare function parseDashboardSyncRequest(data: unknown): {
9179
9576
  actions?: {
9180
9577
  id?: string | undefined;