@mossbear/protocol 0.1.0-alpha.114 → 0.1.0-alpha.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/bundles.d.ts +662 -0
  2. package/dist/bundles.d.ts.map +1 -0
  3. package/dist/bundles.js +454 -0
  4. package/dist/bundles.js.map +1 -0
  5. package/dist/bundles.test.d.ts +2 -0
  6. package/dist/bundles.test.d.ts.map +1 -0
  7. package/dist/bundles.test.js +61 -0
  8. package/dist/bundles.test.js.map +1 -0
  9. package/dist/comments.d.ts +1405 -0
  10. package/dist/comments.d.ts.map +1 -0
  11. package/dist/comments.js +683 -0
  12. package/dist/comments.js.map +1 -0
  13. package/dist/comments.test.d.ts +2 -0
  14. package/dist/comments.test.d.ts.map +1 -0
  15. package/dist/comments.test.js +64 -0
  16. package/dist/comments.test.js.map +1 -0
  17. package/dist/guideHistory.d.ts +643 -0
  18. package/dist/guideHistory.d.ts.map +1 -0
  19. package/dist/guideHistory.js +343 -0
  20. package/dist/guideHistory.js.map +1 -0
  21. package/dist/guideHistory.test.d.ts +2 -0
  22. package/dist/guideHistory.test.d.ts.map +1 -0
  23. package/dist/guideHistory.test.js +35 -0
  24. package/dist/guideHistory.test.js.map +1 -0
  25. package/dist/guideImport.d.ts +398 -0
  26. package/dist/guideImport.d.ts.map +1 -0
  27. package/dist/guideImport.js +350 -0
  28. package/dist/guideImport.js.map +1 -0
  29. package/dist/guideImport.test.d.ts +2 -0
  30. package/dist/guideImport.test.d.ts.map +1 -0
  31. package/dist/guideImport.test.js +62 -0
  32. package/dist/guideImport.test.js.map +1 -0
  33. package/dist/guideSnapshot.d.ts +105 -0
  34. package/dist/guideSnapshot.d.ts.map +1 -0
  35. package/dist/guideSnapshot.js +101 -0
  36. package/dist/guideSnapshot.js.map +1 -0
  37. package/dist/guideSnapshot.test.d.ts +2 -0
  38. package/dist/guideSnapshot.test.d.ts.map +1 -0
  39. package/dist/guideSnapshot.test.js +49 -0
  40. package/dist/guideSnapshot.test.js.map +1 -0
  41. package/dist/schemas.d.ts +5122 -11710
  42. package/dist/schemas.d.ts.map +1 -1
  43. package/dist/schemas.js +61 -2816
  44. package/dist/schemas.js.map +1 -1
  45. package/dist/search.d.ts +1222 -0
  46. package/dist/search.d.ts.map +1 -0
  47. package/dist/search.js +474 -0
  48. package/dist/search.js.map +1 -0
  49. package/dist/search.test.d.ts +2 -0
  50. package/dist/search.test.d.ts.map +1 -0
  51. package/dist/search.test.js +64 -0
  52. package/dist/search.test.js.map +1 -0
  53. package/dist/sessionContracts.test.d.ts +2 -0
  54. package/dist/sessionContracts.test.d.ts.map +1 -0
  55. package/dist/sessionContracts.test.js +75 -0
  56. package/dist/sessionContracts.test.js.map +1 -0
  57. package/dist/sessionDigest.d.ts +149 -0
  58. package/dist/sessionDigest.d.ts.map +1 -0
  59. package/dist/sessionDigest.js +57 -0
  60. package/dist/sessionDigest.js.map +1 -0
  61. package/dist/sessionGrade.d.ts +184 -0
  62. package/dist/sessionGrade.d.ts.map +1 -0
  63. package/dist/sessionGrade.js +130 -0
  64. package/dist/sessionGrade.js.map +1 -0
  65. package/dist/types.d.ts +4 -27
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/types.js.map +1 -1
  68. package/dist/usageOnly.d.ts +5 -5
  69. package/dist/wirePrimitives.d.ts +173 -0
  70. package/dist/wirePrimitives.d.ts.map +1 -0
  71. package/dist/wirePrimitives.js +210 -0
  72. package/dist/wirePrimitives.js.map +1 -0
  73. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * the schemas are the single source of truth. Do not add hand-declared
6
6
  * interfaces here; add a schema to schemas.ts and derive the type instead.
7
7
  */
8
- import { ActionEntrySchema, ActionOutcomeSchema, ActionSkillLoadSchema, AgentConfigSchema, GuideDiscoveryRootSchema, GuideFileFormatSchema, DashboardGuideSuggestionSchema, DashboardSessionUsageSchema, SkillUsageEntrySchema, DashboardSkillUsageSchema, DashboardSyncActionSchema, DashboardSyncRequestSchema, ExtractedFeedbackBatchSchema, ExtractedSkillSuggestionSchema, AttachBundleMemberRequestSchema, AttachBundleMemberResponseSchema, AttachBundleMembersResponseSchema, AttachBundleMembersResultSchema, BundleSchema, BundleGrantSchema, CreateScopedTokenRequestSchema, CreateScopedTokenResponseSchema, ListScopedTokensResponseSchema, ScopedTokenSchema, BundleListResponseSchema, ResolveSubscriptionsRequestSchema, ResolveSubscriptionsResponseSchema, ResolvedSubscriptionSchema, BundlePublisherSchema, SubscriptionScopeSchema, DeliverTargetSchema, SubscribeBundleRequestSchema, SubscribeBundleResponseSchema, CreateBundleRequestSchema, CreateBundleResponseSchema, DetachBundleMemberResponseSchema, ContextItemTypeSchema, ContextItemSchema, GitSourceSchema, ContextItemsResponseSchema, CaptureRequestSchema, CapturedItemSchema, CaptureResponseSchema, MarkDoneRequestSchema, MarkDoneResponseSchema, ArtifactSchema, ArtifactRoleSchema, ArtifactFormatSchema, ArtifactStateSchema, ArtifactPassageSelectorSchema, ArtifactSourceRefSchema, ArtifactRecordedSourceRefSchema, CreateArtifactRequestSchema, IdentityClaimKindSchema, IdentityResolutionSchema, ResolveIdentitiesRequestSchema, ResolveIdentitiesResponseSchema, UpdateArtifactRequestSchema, ReadArtifactQuerySchema, ArtifactSelectedRevisionSchema, ReadArtifactResponseSchema, CreateArtifactResponseSchema, UpdateArtifactResponseSchema, DeleteArtifactResponseSchema, WithdrawArtifactRequestSchema, WithdrawArtifactResponseSchema, ArtifactRevisionSchema, ArtifactRevisionDetailSchema, ArtifactHistoryResponseSchema, ArtifactVersionConflictSchema, ArtifactDeletedRefusalSchema, DeletedArtifactSchema, ArtifactDraftSchema, UpsertArtifactDraftRequestSchema, UpsertArtifactDraftResponseSchema, ListArtifactDraftsResponseSchema, RetireArtifactDraftsRequestSchema, RetireArtifactDraftsResponseSchema, ArtifactVersionSchema, ArtifactVersionDetailSchema, BundleArtifactVersionsResponseSchema, BundleArtifactsResponseSchema, GuideBundleResponseSchema, GuidingTierSchema, ProposalCitationSchema, GuideSnapshotSchema, PlatformKindSchema, RawGuideFilePayloadSchema, RawSkillMemberFileSchema, RuleManifestFileSchema, RuleFileManifestSchema, CommitAnchorSchema, RulesImportRequestSchema, TokenUsageSchema, VerdictSchema } from './schemas.js';
8
+ import { ActionEntrySchema, ActionOutcomeSchema, ActionSkillLoadSchema, AgentConfigSchema, GuideDiscoveryRootSchema, DashboardGuideSuggestionSchema, DashboardSessionUsageSchema, SkillUsageEntrySchema, DashboardSkillUsageSchema, DashboardSyncActionSchema, DashboardSyncRequestSchema, ExtractedFeedbackBatchSchema, ExtractedSkillSuggestionSchema, BundleGrantSchema, CreateScopedTokenRequestSchema, CreateScopedTokenResponseSchema, ListScopedTokensResponseSchema, ScopedTokenSchema, ContextItemTypeSchema, ContextItemSchema, GitSourceSchema, ContextItemsResponseSchema, CaptureRequestSchema, CapturedItemSchema, CaptureResponseSchema, MarkDoneRequestSchema, MarkDoneResponseSchema, ArtifactSchema, ArtifactRoleSchema, ArtifactFormatSchema, ArtifactStateSchema, ArtifactPassageSelectorSchema, ArtifactSourceRefSchema, ArtifactRecordedSourceRefSchema, CreateArtifactRequestSchema, IdentityClaimKindSchema, IdentityResolutionSchema, ResolveIdentitiesRequestSchema, ResolveIdentitiesResponseSchema, UpdateArtifactRequestSchema, ReadArtifactQuerySchema, ArtifactSelectedRevisionSchema, ReadArtifactResponseSchema, CreateArtifactResponseSchema, UpdateArtifactResponseSchema, DeleteArtifactResponseSchema, WithdrawArtifactRequestSchema, WithdrawArtifactResponseSchema, ArtifactRevisionSchema, ArtifactRevisionDetailSchema, ArtifactHistoryResponseSchema, ArtifactVersionConflictSchema, ArtifactDeletedRefusalSchema, DeletedArtifactSchema, ArtifactDraftSchema, UpsertArtifactDraftRequestSchema, UpsertArtifactDraftResponseSchema, ListArtifactDraftsResponseSchema, RetireArtifactDraftsRequestSchema, RetireArtifactDraftsResponseSchema, ArtifactVersionSchema, ArtifactVersionDetailSchema, BundleArtifactVersionsResponseSchema, BundleArtifactsResponseSchema, GuidingTierSchema, ProposalCitationSchema, PlatformKindSchema, CommitAnchorSchema, TokenUsageSchema, VerdictSchema } from './schemas.js';
9
9
  import type * as v from 'valibot';
10
10
  export declare const PROTOCOL_VERSION: "1";
11
11
  /** Verdict values — shared wire picklist (`VerdictSchema`). */
@@ -18,40 +18,14 @@ export type Verdict = v.InferOutput<typeof VerdictSchema>;
18
18
  export type GuidingTier = v.InferOutput<typeof GuidingTierSchema>;
19
19
  /** Agent platform identifier. */
20
20
  export type PlatformKind = v.InferOutput<typeof PlatformKindSchema>;
21
- /** Supported raw guide file format. */
22
- export type GuideFileFormat = v.InferOutput<typeof GuideFileFormatSchema>;
23
21
  /** Which discovery root a guide file's path is relative to. */
24
22
  export type GuideDiscoveryRoot = v.InferOutput<typeof GuideDiscoveryRootSchema>;
25
- export type GuideSnapshot = v.InferOutput<typeof GuideSnapshotSchema>;
26
- export type GuideBundleResponse = v.InferOutput<typeof GuideBundleResponseSchema>;
27
- export type RawGuideFilePayload = v.InferOutput<typeof RawGuideFilePayloadSchema>;
28
- export type RawSkillMemberFile = v.InferOutput<typeof RawSkillMemberFileSchema>;
29
- export type RulesImportRequest = v.InferOutput<typeof RulesImportRequestSchema>;
30
- export type RuleManifestFile = v.InferOutput<typeof RuleManifestFileSchema>;
31
- export type RuleFileManifest = v.InferOutput<typeof RuleFileManifestSchema>;
32
23
  export type CommitAnchor = v.InferOutput<typeof CommitAnchorSchema>;
33
- export type Bundle = v.InferOutput<typeof BundleSchema>;
34
24
  export type BundleGrant = v.InferOutput<typeof BundleGrantSchema>;
35
25
  export type ScopedToken = v.InferOutput<typeof ScopedTokenSchema>;
36
26
  export type CreateScopedTokenRequest = v.InferOutput<typeof CreateScopedTokenRequestSchema>;
37
27
  export type CreateScopedTokenResponse = v.InferOutput<typeof CreateScopedTokenResponseSchema>;
38
28
  export type ListScopedTokensResponse = v.InferOutput<typeof ListScopedTokensResponseSchema>;
39
- export type BundleListResponse = v.InferOutput<typeof BundleListResponseSchema>;
40
- export type SubscriptionScope = v.InferOutput<typeof SubscriptionScopeSchema>;
41
- export type ResolvedSubscription = v.InferOutput<typeof ResolvedSubscriptionSchema>;
42
- export type BundlePublisher = v.InferOutput<typeof BundlePublisherSchema>;
43
- export type DeliverTarget = v.InferOutput<typeof DeliverTargetSchema>;
44
- export type SubscribeBundleRequest = v.InferOutput<typeof SubscribeBundleRequestSchema>;
45
- export type SubscribeBundleResponse = v.InferOutput<typeof SubscribeBundleResponseSchema>;
46
- export type ResolveSubscriptionsRequest = v.InferOutput<typeof ResolveSubscriptionsRequestSchema>;
47
- export type ResolveSubscriptionsResponse = v.InferOutput<typeof ResolveSubscriptionsResponseSchema>;
48
- export type CreateBundleRequest = v.InferOutput<typeof CreateBundleRequestSchema>;
49
- export type CreateBundleResponse = v.InferOutput<typeof CreateBundleResponseSchema>;
50
- export type AttachBundleMemberRequest = v.InferOutput<typeof AttachBundleMemberRequestSchema>;
51
- export type AttachBundleMembersResult = v.InferOutput<typeof AttachBundleMembersResultSchema>;
52
- export type AttachBundleMembersResponse = v.InferOutput<typeof AttachBundleMembersResponseSchema>;
53
- export type AttachBundleMemberResponse = v.InferOutput<typeof AttachBundleMemberResponseSchema>;
54
- export type DetachBundleMemberResponse = v.InferOutput<typeof DetachBundleMemberResponseSchema>;
55
29
  export type ContextItemType = v.InferOutput<typeof ContextItemTypeSchema>;
56
30
  export type ContextItem = v.InferOutput<typeof ContextItemSchema>;
57
31
  /** Where a git-owned artifact comes from; absent on a Mossbear-owned one. */
@@ -113,4 +87,7 @@ export type UpsertArtifactDraftResponse = v.InferOutput<typeof UpsertArtifactDra
113
87
  export type ListArtifactDraftsResponse = v.InferOutput<typeof ListArtifactDraftsResponseSchema>;
114
88
  export type RetireArtifactDraftsRequest = v.InferOutput<typeof RetireArtifactDraftsRequestSchema>;
115
89
  export type RetireArtifactDraftsResponse = v.InferOutput<typeof RetireArtifactDraftsResponseSchema>;
90
+ export type { GuideFileFormat, RawGuideFilePayload, RawSkillMemberFile, RulesImportRequest, } from './guideImport.js';
91
+ export type { Bundle, BundleListResponse, SubscriptionScope, ResolvedSubscription, BundlePublisher, DeliverTarget, SubscribeBundleRequest, SubscribeBundleResponse, ResolveSubscriptionsRequest, ResolveSubscriptionsResponse, CreateBundleRequest, CreateBundleResponse, AttachBundleMemberRequest, AttachBundleMembersResult, AttachBundleMembersResponse, AttachBundleMemberResponse, DetachBundleMemberResponse, } from './bundles.js';
92
+ export type { GuideSnapshot, GuideBundleResponse, RuleManifestFile, RuleFileManifest, } from './guideSnapshot.js';
116
93
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,iCAAiC,EACjC,+BAA+B,EAC/B,YAAY,EACZ,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,iBAAiB,EACjB,wBAAwB,EACxB,iCAAiC,EACjC,kCAAkC,EAClC,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB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A4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oBAAoB,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsGH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6EH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,CAAA"}
@@ -61,7 +61,7 @@ export declare const UsageOnlySessionSchema: v.SchemaWithPipe<readonly [v.Strict
61
61
  }[], "Duplicate usage occurrence">]>;
62
62
  }, undefined>, v.CheckAction<{
63
63
  sessionKey: string;
64
- harness: "claude_code" | "codex" | "opencode" | "antigravity";
64
+ harness: "claude_code" | "codex" | "antigravity" | "opencode";
65
65
  snapshotSequence: number;
66
66
  startedAt: number;
67
67
  endedAt?: number | undefined;
@@ -121,7 +121,7 @@ export declare const UsageOnlySyncRequestSchema: v.StrictObjectSchema<{
121
121
  }[], "Duplicate usage occurrence">]>;
122
122
  }, undefined>, v.CheckAction<{
123
123
  sessionKey: string;
124
- harness: "claude_code" | "codex" | "opencode" | "antigravity";
124
+ harness: "claude_code" | "codex" | "antigravity" | "opencode";
125
125
  snapshotSequence: number;
126
126
  startedAt: number;
127
127
  endedAt?: number | undefined;
@@ -135,7 +135,7 @@ export declare const UsageOnlySyncRequestSchema: v.StrictObjectSchema<{
135
135
  }[];
136
136
  }, "Session end precedes start">]>, undefined>, v.MinLengthAction<{
137
137
  sessionKey: string;
138
- harness: "claude_code" | "codex" | "opencode" | "antigravity";
138
+ harness: "claude_code" | "codex" | "antigravity" | "opencode";
139
139
  snapshotSequence: number;
140
140
  startedAt: number;
141
141
  endedAt?: number | undefined;
@@ -149,7 +149,7 @@ export declare const UsageOnlySyncRequestSchema: v.StrictObjectSchema<{
149
149
  }[];
150
150
  }[], 1, undefined>, v.MaxLengthAction<{
151
151
  sessionKey: string;
152
- harness: "claude_code" | "codex" | "opencode" | "antigravity";
152
+ harness: "claude_code" | "codex" | "antigravity" | "opencode";
153
153
  snapshotSequence: number;
154
154
  startedAt: number;
155
155
  endedAt?: number | undefined;
@@ -163,7 +163,7 @@ export declare const UsageOnlySyncRequestSchema: v.StrictObjectSchema<{
163
163
  }[];
164
164
  }[], 100, undefined>, v.CheckAction<{
165
165
  sessionKey: string;
166
- harness: "claude_code" | "codex" | "opencode" | "antigravity";
166
+ harness: "claude_code" | "codex" | "antigravity" | "opencode";
167
167
  snapshotSequence: number;
168
168
  startedAt: number;
169
169
  endedAt?: number | undefined;
@@ -0,0 +1,173 @@
1
+ /** Shared wire primitives. Domain modules must not depend on the aggregate schemas. */
2
+ import * as v from 'valibot';
3
+ export declare const NonEmptyStringSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ /**
5
+ * The markers every untrusted block in a response is wrapped in, plus a
6
+ * statement of what they mean.
7
+ *
8
+ * Generated per response from the content itself, so no marker-like text
9
+ * inside a block can end it early — a property `deriveDelimiterToken` checks
10
+ * rather than assumes.
11
+ *
12
+ * Named for the guide-history response it was written for and shared by every
13
+ * payload that places somebody else's words in front of an agent: a grade's
14
+ * reasoning, and now an item's comments. One marker scheme, not one per payload —
15
+ * a second scheme is a second thing a reader has to be taught to respect.
16
+ */
17
+ export declare const GuideHistoryUntrustedSchema: v.ObjectSchema<{
18
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
19
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
20
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
21
+ readonly note: v.StringSchema<undefined>;
22
+ }, undefined>;
23
+ export type GuideHistoryUntrusted = v.InferOutput<typeof GuideHistoryUntrustedSchema>;
24
+ /**
25
+ * Who wrote a comment. An agent writes under its person's account, so the
26
+ * author's name alone cannot tell a person's answer from an agent's message.
27
+ */
28
+ export declare const CommentAuthorKindSchema: v.PicklistSchema<["person", "agent", "mossbear"], undefined>;
29
+ export type CommentAuthorKind = v.InferOutput<typeof CommentAuthorKindSchema>;
30
+ /**
31
+ * The run-level verdict vocabulary — `aligned | misaligned | not_applicable`.
32
+ * `not_applicable` is a guide that was in the agent's context and that the
33
+ * session never engaged. It is not `unguided`, which is an action-level word,
34
+ * and neither is ever restated in terms of the other.
35
+ */
36
+ export declare const SESSION_GUIDE_VERDICTS: readonly ["aligned", "misaligned", "not_applicable"];
37
+ export declare const SessionGuideVerdictValueSchema: v.PicklistSchema<readonly ["aligned", "misaligned", "not_applicable"], undefined>;
38
+ export type SessionGuideVerdictValue = v.InferOutput<typeof SessionGuideVerdictValueSchema>;
39
+ /**
40
+ * Which agent harness produced a run — the CLI's harness registry, on the wire.
41
+ *
42
+ * **Deliberately not {@link PlatformKindSchema}, and not a widening of it.**
43
+ * That picklist answers a different question — which transcript format a
44
+ * *suggestion* was extracted from — over a set that includes harnesses
45
+ * `mossbear init` cannot wire (`cursor`, `copilot`) and excludes one it can
46
+ * (`antigravity`). Two questions, two sets; collapsing them would need both a
47
+ * new member and an overloaded meaning.
48
+ *
49
+ * Declared here rather than in the CLI so there is exactly one list: the CLI's
50
+ * `HarnessId` is `v.InferOutput` of this, imported as a type, so a manifest for
51
+ * a harness this schema does not name fails typecheck instead of failing at the
52
+ * sync boundary. The import is type-only on purpose — `mossbear-hook` runs once
53
+ * per agent tool call, and nothing here may enter its runtime import graph.
54
+ *
55
+ * Rides `metadata.harness` on each action (see {@link ActionMetadataSchema});
56
+ * the server reduces a session's actions to one value and writes `runs.harness`.
57
+ */
58
+ export declare const HarnessIdSchema: v.PicklistSchema<["claude_code", "codex", "antigravity", "opencode"], undefined>;
59
+ export type HarnessId = v.InferOutput<typeof HarnessIdSchema>;
60
+ /** Longest accepted repository name. An `owner/repo` path is far shorter; this bounds a folder name. */
61
+ export declare const MAX_REPOSITORY_NAME_LENGTH = 200;
62
+ /**
63
+ * The name of the repository a session ran in, as a person would recognise it:
64
+ * the `owner/repo` path of the checkout's git remote, or the checkout's folder
65
+ * name when it has no remote the CLI can read a path from.
66
+ *
67
+ * A display name, not an identity. Two forks share a name, and a folder name
68
+ * says nothing beyond itself; `projectId` and `repoId` stay the keys a reader
69
+ * joins on. The CLI keeps only the path of a remote: never its scheme,
70
+ * credentials, host, port or query, so a URL carrying a token does not leave
71
+ * the machine.
72
+ *
73
+ * Rides `metadata.repository` on each action (see {@link ActionMetadataSchema}).
74
+ * The server reduces a session's stamps to one value; absent is "unnamed",
75
+ * which is every session a CLI predating the field recorded.
76
+ */
77
+ export declare const RepositoryNameSchema: 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">]>;
78
+ /**
79
+ * A repo's declared portable identity. See `RulesImportRequestSchema.projectId`
80
+ * for why this is looser than {@link RepoIdSchema} — a declared id is
81
+ * human-authored and predates any prefix rule.
82
+ */
83
+ export declare const ProjectIdSchema: 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">]>;
84
+ /** Most artifacts one batch feedback read may name. */
85
+ export declare const MAX_ARTIFACT_FEEDBACK_BATCH = 25;
86
+ export declare const PATH_ISSUE_MESSAGES: {
87
+ readonly backslash: "path must use forward slashes";
88
+ readonly absolute: "path must be relative";
89
+ readonly control: "path must not contain control characters";
90
+ readonly segments: "path must not contain empty, \".\" or \"..\" segments";
91
+ readonly skillMd: "path must not shadow the skill’s own SKILL.md";
92
+ };
93
+ export declare const SafeRelativePosixPathSchema: 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">]>;
94
+ /**
95
+ * Which root a discovered guide file's `path` is relative to: the repo checkout
96
+ * (`project`) or the user's homedir (`global`, e.g. `.claude/CLAUDE.md`).
97
+ * Part of the import resolution key — see `RawGuideFilePayloadSchema.root`.
98
+ */
99
+ export declare const GuideDiscoveryRootSchema: v.PicklistSchema<["project", "global"], undefined>;
100
+ export declare const Sha256HexSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
101
+ /** Opaque checkout digest shared by run logs, manifests, and `runs.repo_id`. */
102
+ export declare const RepoIdSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "repoId must be repo_ followed by 32 hex chars">]>;
103
+ /**
104
+ * The workspace a repo declares its project-scoped guidance belongs to. See
105
+ * `RulesImportRequestSchema.workspaceId`.
106
+ *
107
+ * Same shape as {@link ProjectIdSchema}, and for the same reason: the id is
108
+ * minted by the server (`nanoid()`, whose alphabet this character class covers)
109
+ * but it reaches us out of a **committed, hand-editable** file, so it is
110
+ * constrained only as far as it must be to serve as a lookup key — no
111
+ * whitespace, no path separators, no control characters, bounded length.
112
+ * Whether it names a workspace this caller may reach is a membership question,
113
+ * answered against the database, not a question a regex can answer.
114
+ */
115
+ export declare const WorkspaceIdSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "workspaceId must contain only letters, digits, underscore, dot or hyphen">]>;
116
+ export declare const BoundedRawContentSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "rawContent must be at most 524288 bytes">]>;
117
+ export declare const SkippedMemberPathSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>;
118
+ /**
119
+ * The sentence a caller gets back when a display name carries a character that
120
+ * cannot be seen. It is written for the person who typed the name, not for the
121
+ * developer reading the schema. This repo's error-message rules put the
122
+ * reader first, keep the blame off them, and ask a refusal to leave them
123
+ * something to do — so the action leads and "control character",
124
+ * which is not a phrase most people can act on, never appears.
125
+ *
126
+ * "often" is doing real work in the second clause. This branch cannot tell a
127
+ * pasted name from a typed one, so it does not claim to; it names
128
+ * where such characters usually come from, which is what makes the advice
129
+ * actionable without overclaiming.
130
+ */
131
+ export declare const DISPLAY_NAME_CONTROL_CHARACTER_MESSAGE = "Remove the invisible characters from this name \u2014 copying text from another app often brings them along.";
132
+ /**
133
+ * A user-typed display name that is safe to print into a terminal line.
134
+ *
135
+ * Refuses every character in {@link DISPLAY_NAME_REFUSED_CHARACTERS}
136
+ * (`bundleSlug.ts`, where the class is defined once and explained): the control
137
+ * characters, where ESC and CR live — a CR can overwrite the line a user is
138
+ * reading, which in a tool whose job is reporting what reached their agents
139
+ * means the sentence on screen can be made to say something other than what
140
+ * happened — and the explicit bidi controls, which reorder a rendered line
141
+ * without changing a byte of it. The rest of `\p{Cf}` is admitted: the
142
+ * zero-width joiners Persian, Hindi and Bengali need, the join inside a
143
+ * multi-person emoji, a soft hyphen. Sharing the class with `displayable` is
144
+ * what keeps the boundary and the derivation saying the same thing.
145
+ *
146
+ * **Refuse, never strip.** A user typing a name is present and can be told;
147
+ * rewriting their input silently is what those same rules argue against. The
148
+ * one strip in the codebase — `displayable`, reached through
149
+ * `defaultGuidesBundleFor` in `bundleSlug.ts` — is a *derivation* with no user
150
+ * to report to, which is the exception that fixes the rule rather than a
151
+ * precedent for a second one.
152
+ *
153
+ * **Then requires one character outside `\p{Cf}`.** Admitting the joiners
154
+ * admits a name made of nothing but them, which `v.trim()` cannot see and
155
+ * `minLength(1)` counts. Such a name is refused as empty, with the same
156
+ * sentence — to the person typing it, it is a name of invisible characters
157
+ * either way.
158
+ *
159
+ * **A factory, because the max length is per-field** (64 for a workspace name,
160
+ * 200 for a bundle name) while the character rule is not. Exported rather than
161
+ * inlined so a fourth display-name field meets the rule while reading its
162
+ * neighbours — nothing enforces that it is called.
163
+ */
164
+ export declare function displayNameSchema(maxLength: number): 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.">]>;
165
+ /**
166
+ * An artifact's description as a writer sends it: one paragraph of plain text,
167
+ * with no line breaks or other control characters, so it saves on Enter like a
168
+ * title, prints safely in a terminal, and stays a plain YAML
169
+ * scalar in a Markdown artifact's frontmatter. Blank text is refused rather than
170
+ * stored: `null` is how a description is cleared, so "none" has one shape.
171
+ */
172
+ 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">]>;
173
+ //# sourceMappingURL=wirePrimitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wirePrimitives.d.ts","sourceRoot":"","sources":["../src/wirePrimitives.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAK5B,eAAO,MAAM,oBA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uB,4IAInC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sCAAsC,iHACwD,CAAA;AAE3G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,maAYlD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,2RAiBrC,CAAA"}
@@ -0,0 +1,210 @@
1
+ /** Shared wire primitives. Domain modules must not depend on the aggregate schemas. */
2
+ import * as v from 'valibot';
3
+ import { DISPLAY_NAME_REFUSED_CHARACTERS } from './bundleSlug.js';
4
+ import { MAX_ARTIFACT_DESCRIPTION_CHARS, MAX_RAW_GUIDE_CONTENT_BYTES } from './limits.js';
5
+ export const NonEmptyStringSchema = v.pipe(v.string(), v.minLength(1));
6
+ /**
7
+ * The markers every untrusted block in a response is wrapped in, plus a
8
+ * statement of what they mean.
9
+ *
10
+ * Generated per response from the content itself, so no marker-like text
11
+ * inside a block can end it early — a property `deriveDelimiterToken` checks
12
+ * rather than assumes.
13
+ *
14
+ * Named for the guide-history response it was written for and shared by every
15
+ * payload that places somebody else's words in front of an agent: a grade's
16
+ * reasoning, and now an item's comments. One marker scheme, not one per payload —
17
+ * a second scheme is a second thing a reader has to be taught to respect.
18
+ */
19
+ export const GuideHistoryUntrustedSchema = v.object({
20
+ token: NonEmptyStringSchema,
21
+ startMarker: NonEmptyStringSchema,
22
+ endMarker: NonEmptyStringSchema,
23
+ note: v.string(),
24
+ });
25
+ /**
26
+ * Who wrote a comment. An agent writes under its person's account, so the
27
+ * author's name alone cannot tell a person's answer from an agent's message.
28
+ */
29
+ export const CommentAuthorKindSchema = v.picklist(['person', 'agent', 'mossbear']);
30
+ /**
31
+ * The run-level verdict vocabulary — `aligned | misaligned | not_applicable`.
32
+ * `not_applicable` is a guide that was in the agent's context and that the
33
+ * session never engaged. It is not `unguided`, which is an action-level word,
34
+ * and neither is ever restated in terms of the other.
35
+ */
36
+ export const SESSION_GUIDE_VERDICTS = ['aligned', 'misaligned', 'not_applicable'];
37
+ export const SessionGuideVerdictValueSchema = v.picklist(SESSION_GUIDE_VERDICTS);
38
+ /**
39
+ * Which agent harness produced a run — the CLI's harness registry, on the wire.
40
+ *
41
+ * **Deliberately not {@link PlatformKindSchema}, and not a widening of it.**
42
+ * That picklist answers a different question — which transcript format a
43
+ * *suggestion* was extracted from — over a set that includes harnesses
44
+ * `mossbear init` cannot wire (`cursor`, `copilot`) and excludes one it can
45
+ * (`antigravity`). Two questions, two sets; collapsing them would need both a
46
+ * new member and an overloaded meaning.
47
+ *
48
+ * Declared here rather than in the CLI so there is exactly one list: the CLI's
49
+ * `HarnessId` is `v.InferOutput` of this, imported as a type, so a manifest for
50
+ * a harness this schema does not name fails typecheck instead of failing at the
51
+ * sync boundary. The import is type-only on purpose — `mossbear-hook` runs once
52
+ * per agent tool call, and nothing here may enter its runtime import graph.
53
+ *
54
+ * Rides `metadata.harness` on each action (see {@link ActionMetadataSchema});
55
+ * the server reduces a session's actions to one value and writes `runs.harness`.
56
+ */
57
+ export const HarnessIdSchema = v.picklist([
58
+ 'claude_code',
59
+ 'codex',
60
+ 'antigravity',
61
+ 'opencode',
62
+ ]);
63
+ /** Longest accepted repository name. An `owner/repo` path is far shorter; this bounds a folder name. */
64
+ export const MAX_REPOSITORY_NAME_LENGTH = 200;
65
+ /**
66
+ * The name of the repository a session ran in, as a person would recognise it:
67
+ * the `owner/repo` path of the checkout's git remote, or the checkout's folder
68
+ * name when it has no remote the CLI can read a path from.
69
+ *
70
+ * A display name, not an identity. Two forks share a name, and a folder name
71
+ * says nothing beyond itself; `projectId` and `repoId` stay the keys a reader
72
+ * joins on. The CLI keeps only the path of a remote: never its scheme,
73
+ * credentials, host, port or query, so a URL carrying a token does not leave
74
+ * the machine.
75
+ *
76
+ * Rides `metadata.repository` on each action (see {@link ActionMetadataSchema}).
77
+ * The server reduces a session's stamps to one value; absent is "unnamed",
78
+ * which is every session a CLI predating the field recorded.
79
+ */
80
+ export const RepositoryNameSchema = v.pipe(v.string(), v.minLength(1), v.maxLength(MAX_REPOSITORY_NAME_LENGTH), v.check((value) => value.trim() === value && !/\p{Cc}/u.test(value), 'repository must be trimmed and hold no control characters'));
81
+ /** Longest accepted `projectId`. Generated ids are far shorter; this bounds a hand-declared one. */
82
+ const MAX_PROJECT_ID_LENGTH = 128;
83
+ /**
84
+ * A repo's declared portable identity. See `RulesImportRequestSchema.projectId`
85
+ * for why this is looser than {@link RepoIdSchema} — a declared id is
86
+ * human-authored and predates any prefix rule.
87
+ */
88
+ export const ProjectIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(MAX_PROJECT_ID_LENGTH), v.regex(/^[A-Za-z0-9_.-]+$/, 'projectId must contain only letters, digits, underscore, dot or hyphen'));
89
+ /** Most artifacts one batch feedback read may name. */
90
+ export const MAX_ARTIFACT_FEEDBACK_BATCH = 25;
91
+ // A path that is safe to re-create on disk and safe to store as identity:
92
+ // forward slashes only, never absolute (POSIX or Windows drive-letter form),
93
+ // no empty / `.` / `..` segments, no control characters. Every path this
94
+ // protocol carries can end up written into a project tree, so the rule
95
+ // belongs at the schema boundary rather than in each consumer, at the boundary
96
+ // where untrusted data crosses in.
97
+ //
98
+ // Exported so the server and the CLI enforce the identical rule.
99
+ //
100
+ // The check messages each name the one edit that fixes the path, so they are
101
+ // written for the reader and exported for a server boundary to pass through.
102
+ export const PATH_ISSUE_MESSAGES = {
103
+ backslash: 'path must use forward slashes',
104
+ absolute: 'path must be relative',
105
+ control: 'path must not contain control characters',
106
+ segments: 'path must not contain empty, "." or ".." segments',
107
+ skillMd: 'path must not shadow the skill’s own SKILL.md',
108
+ };
109
+ export const SafeRelativePosixPathSchema = v.pipe(v.string(), v.minLength(1), v.maxLength(512), v.check((path) => !path.includes('\\'), PATH_ISSUE_MESSAGES.backslash), v.check((path) => !path.startsWith('/') && !/^[a-zA-Z]:/.test(path), PATH_ISSUE_MESSAGES.absolute), v.check(
110
+ // eslint-disable-next-line no-control-regex
111
+ (path) => !/[\u0000-\u001f\u007f]/.test(path), PATH_ISSUE_MESSAGES.control), v.check((path) => path
112
+ .split('/')
113
+ .every((segment) => segment !== '' && segment !== '.' && segment !== '..'), PATH_ISSUE_MESSAGES.segments));
114
+ /**
115
+ * Which root a discovered guide file's `path` is relative to: the repo checkout
116
+ * (`project`) or the user's homedir (`global`, e.g. `.claude/CLAUDE.md`).
117
+ * Part of the import resolution key — see `RawGuideFilePayloadSchema.root`.
118
+ */
119
+ export const GuideDiscoveryRootSchema = v.picklist(['project', 'global']);
120
+ export const Sha256HexSchema = v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/i));
121
+ /** Opaque checkout digest shared by run logs, manifests, and `runs.repo_id`. */
122
+ export const RepoIdSchema = v.pipe(v.string(), v.regex(/^repo_[0-9a-f]{32}$/, 'repoId must be repo_ followed by 32 hex chars'));
123
+ /** Longest accepted `workspaceId`. Server-minted ids are `nanoid()`; this bounds a hand-edited one. */
124
+ const MAX_WORKSPACE_ID_LENGTH = 128;
125
+ /**
126
+ * The workspace a repo declares its project-scoped guidance belongs to. See
127
+ * `RulesImportRequestSchema.workspaceId`.
128
+ *
129
+ * Same shape as {@link ProjectIdSchema}, and for the same reason: the id is
130
+ * minted by the server (`nanoid()`, whose alphabet this character class covers)
131
+ * but it reaches us out of a **committed, hand-editable** file, so it is
132
+ * constrained only as far as it must be to serve as a lookup key — no
133
+ * whitespace, no path separators, no control characters, bounded length.
134
+ * Whether it names a workspace this caller may reach is a membership question,
135
+ * answered against the database, not a question a regex can answer.
136
+ */
137
+ export const WorkspaceIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(MAX_WORKSPACE_ID_LENGTH), v.regex(/^[A-Za-z0-9_.-]+$/, 'workspaceId must contain only letters, digits, underscore, dot or hyphen'));
138
+ export const BoundedRawContentSchema = v.pipe(v.string(), v.check((value) => new TextEncoder().encode(value).length <= MAX_RAW_GUIDE_CONTENT_BYTES, `rawContent must be at most ${MAX_RAW_GUIDE_CONTENT_BYTES} bytes`));
139
+ // Paths (relative to the skill directory) that discovery found but could not
140
+ // import this run — binary/non-UTF-8, oversized, unreadable, or beyond the
141
+ // member cap. Deliberately looser than SkillMemberPathSchema: these describe
142
+ // what is on the user's disk and are only ever string-matched against stored
143
+ // member paths server-side (never re-created as files), so an odd on-disk
144
+ // filename must not fail the whole payload.
145
+ export const SkippedMemberPathSchema = v.pipe(v.string(), v.minLength(1), v.maxLength(512));
146
+ /**
147
+ * The sentence a caller gets back when a display name carries a character that
148
+ * cannot be seen. It is written for the person who typed the name, not for the
149
+ * developer reading the schema. This repo's error-message rules put the
150
+ * reader first, keep the blame off them, and ask a refusal to leave them
151
+ * something to do — so the action leads and "control character",
152
+ * which is not a phrase most people can act on, never appears.
153
+ *
154
+ * "often" is doing real work in the second clause. This branch cannot tell a
155
+ * pasted name from a typed one, so it does not claim to; it names
156
+ * where such characters usually come from, which is what makes the advice
157
+ * actionable without overclaiming.
158
+ */
159
+ export const DISPLAY_NAME_CONTROL_CHARACTER_MESSAGE = 'Remove the invisible characters from this name — copying text from another app often brings them along.';
160
+ /**
161
+ * A user-typed display name that is safe to print into a terminal line.
162
+ *
163
+ * Refuses every character in {@link DISPLAY_NAME_REFUSED_CHARACTERS}
164
+ * (`bundleSlug.ts`, where the class is defined once and explained): the control
165
+ * characters, where ESC and CR live — a CR can overwrite the line a user is
166
+ * reading, which in a tool whose job is reporting what reached their agents
167
+ * means the sentence on screen can be made to say something other than what
168
+ * happened — and the explicit bidi controls, which reorder a rendered line
169
+ * without changing a byte of it. The rest of `\p{Cf}` is admitted: the
170
+ * zero-width joiners Persian, Hindi and Bengali need, the join inside a
171
+ * multi-person emoji, a soft hyphen. Sharing the class with `displayable` is
172
+ * what keeps the boundary and the derivation saying the same thing.
173
+ *
174
+ * **Refuse, never strip.** A user typing a name is present and can be told;
175
+ * rewriting their input silently is what those same rules argue against. The
176
+ * one strip in the codebase — `displayable`, reached through
177
+ * `defaultGuidesBundleFor` in `bundleSlug.ts` — is a *derivation* with no user
178
+ * to report to, which is the exception that fixes the rule rather than a
179
+ * precedent for a second one.
180
+ *
181
+ * **Then requires one character outside `\p{Cf}`.** Admitting the joiners
182
+ * admits a name made of nothing but them, which `v.trim()` cannot see and
183
+ * `minLength(1)` counts. Such a name is refused as empty, with the same
184
+ * sentence — to the person typing it, it is a name of invisible characters
185
+ * either way.
186
+ *
187
+ * **A factory, because the max length is per-field** (64 for a workspace name,
188
+ * 200 for a bundle name) while the character rule is not. Exported rather than
189
+ * inlined so a fourth display-name field meets the rule while reading its
190
+ * neighbours — nothing enforces that it is called.
191
+ */
192
+ export function displayNameSchema(maxLength) {
193
+ return v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(maxLength), v.check((name) => !DISPLAY_NAME_REFUSED_CHARACTERS.test(name), DISPLAY_NAME_CONTROL_CHARACTER_MESSAGE), v.regex(/\P{Cf}/u, DISPLAY_NAME_CONTROL_CHARACTER_MESSAGE));
194
+ }
195
+ /**
196
+ * An artifact's description as a writer sends it: one paragraph of plain text,
197
+ * with no line breaks or other control characters, so it saves on Enter like a
198
+ * title, prints safely in a terminal, and stays a plain YAML
199
+ * scalar in a Markdown artifact's frontmatter. Blank text is refused rather than
200
+ * stored: `null` is how a description is cleared, so "none" has one shape.
201
+ */
202
+ export const ArtifactDescriptionSchema = v.pipe(v.string(),
203
+ // Blank includes text made only of invisible format characters, which
204
+ // `trim` cannot see, as `displayNameSchema` refuses a name of them.
205
+ v.regex(/[^\s\p{Cf}]/u, 'description must not be blank'), v.maxLength(MAX_ARTIFACT_DESCRIPTION_CHARS, `description must be at most ${MAX_ARTIFACT_DESCRIPTION_CHARS} characters`),
206
+ // The display-name class (control characters and the bidi controls, which
207
+ // reorder a printed line), plus the two Unicode line breaks: one line, and
208
+ // nothing a terminal printing it would act on.
209
+ v.check((value) => !DISPLAY_NAME_REFUSED_CHARACTERS.test(value) && !/[\u2028\u2029]/.test(value), 'description must be one line of text, with no control characters'));
210
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,EAAE,EAAE,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,EACrD,sCAAsC,CACvC,EACD,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,sCAAsC,CAAC,CAC3D,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAC7C,CAAC,CAAC,MAAM,EAAE;AACV,sEAAsE;AACtE,oEAAoE;AACpE,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,+BAA+B,CAAC,EACxD,CAAC,CAAC,SAAS,CACT,8BAA8B,EAC9B,+BAA+B,8BAA8B,aAAa,CAC3E;AACD,0EAA0E;AAC1E,2EAA2E;AAC3E,+CAA+C;AAC/C,CAAC,CAAC,KAAK,CACL,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAC/E,kEAAkE,CACnE,CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mossbear/protocol",
3
- "version": "0.1.0-alpha.114",
3
+ "version": "0.1.0-alpha.116",
4
4
  "private": false,
5
5
  "description": "Shared types and wire schemas for Mossbear — the contract between the mossbear CLI and the dashboard.",
6
6
  "license": "MIT",