@intentic/sandbox-contract 1.259.0 → 1.263.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/contracts/personas.contract.d.ts +26 -0
  2. package/dist/contracts/personas.contract.d.ts.map +1 -1
  3. package/dist/contracts/system.contract.d.ts +30 -30
  4. package/dist/contracts/workspace.contract.d.ts +38 -0
  5. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  6. package/dist/contracts/workspace.contract.js +19 -1
  7. package/dist/contracts/workspace.contract.js.map +1 -1
  8. package/dist/index.d.ts +66 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/protocol/edge-verdict.d.ts +7 -0
  13. package/dist/protocol/edge-verdict.d.ts.map +1 -0
  14. package/dist/protocol/edge-verdict.js +14 -0
  15. package/dist/protocol/edge-verdict.js.map +1 -0
  16. package/dist/schemas/personas.d.ts +40 -0
  17. package/dist/schemas/personas.d.ts.map +1 -1
  18. package/dist/schemas/personas.js +8 -0
  19. package/dist/schemas/personas.js.map +1 -1
  20. package/dist/schemas/turn-briefing.d.ts +26 -0
  21. package/dist/schemas/turn-briefing.d.ts.map +1 -0
  22. package/dist/schemas/turn-briefing.js +70 -0
  23. package/dist/schemas/turn-briefing.js.map +1 -0
  24. package/dist/schemas/workspace-tree.d.ts +39 -0
  25. package/dist/schemas/workspace-tree.d.ts.map +1 -1
  26. package/dist/schemas/workspace-tree.js +34 -0
  27. package/dist/schemas/workspace-tree.js.map +1 -1
  28. package/package.json +15 -4
  29. package/src/contracts/workspace.contract.ts +24 -0
  30. package/src/index.ts +2 -0
  31. package/src/protocol/edge-verdict.ts +45 -0
  32. package/src/protocol/ingress-contract.ts +2 -1
  33. package/src/schemas/personas.ts +17 -0
  34. package/src/schemas/turn-briefing.ts +103 -0
  35. package/src/schemas/workspace-tree.ts +42 -0
@@ -154,6 +154,48 @@ export const WorkspaceFileAbsentSchema = z.object({
154
154
  path: z.string().describe("The path, as asked for."),
155
155
  });
156
156
  export const WorkspaceFileSchema = z.discriminatedUnion("present", [WorkspaceFilePresentSchema, WorkspaceFileAbsentSchema]);
157
+ // A file's derived text: the markdown shadow fileq keeps beside every document, picture, recording and archive, which
158
+ // is what an agent reads instead of the bytes. About the shared tree only, since a conversation's own checkout is never
159
+ // shadowed; no scope field, for that reason.
160
+ export const WorkspaceDerivedQuerySchema = z.object({
161
+ path: z
162
+ .string()
163
+ .min(1)
164
+ .describe("The file you want the text of, as a workspace path. The real file, not its shadow: where the text is kept is this route's business."),
165
+ });
166
+ export const WorkspaceDerivedPresentSchema = z.object({
167
+ present: z.literal(true).describe("There is derived text for that file."),
168
+ path: z.string().describe("The file it was derived from, as asked for."),
169
+ content: z.string().describe("The text itself, as markdown."),
170
+ deriver: z.string().describe("Which reader wrote it, and at which version, such as `pdf+ocr v1`. A file re-derives when this changes."),
171
+ derivedAt: z.string().optional().describe("When it was written, as an ISO timestamp. Absent only for a shadow whose front matter was edited by hand."),
172
+ title: z.string().optional().describe("The title the format carried, where it carried one."),
173
+ notes: z
174
+ .array(z.string())
175
+ .describe(
176
+ "Every cap and degradation the derivation hit: a sheet cut to 200 rows, a book cut at 2 MB, a scan recognised rather than read. Show these with the text, since text that was cut reading as complete is the one failure this whole feature cannot afford.",
177
+ ),
178
+ tokens: z.number().describe("Roughly what an agent spends reading it, by the same four-chars-a-token estimate every budget here uses."),
179
+ truncated: z.boolean().describe("Whether this is only the start of the shadow, cut to keep the response sendable. The file on disk holds the rest."),
180
+ stale: z
181
+ .boolean()
182
+ .describe(
183
+ "Whether the file has changed since this text was derived, compared by content rather than by clock. True means you are reading a rendering of an older version of the file, and deriving it again catches it up.",
184
+ ),
185
+ });
186
+ export const WorkspaceDerivedAbsentSchema = z.object({
187
+ present: z.literal(false).describe("There is no derived text for that file, which is the ordinary answer while background derivation is switched off."),
188
+ path: z.string().describe("The file, as asked for."),
189
+ derivable: z
190
+ .boolean()
191
+ .describe("Whether this format can be turned into text at all. True means asking for it to be derived is worth offering; false means nothing here reads this format."),
192
+ reason: z
193
+ .string()
194
+ .optional()
195
+ .describe("Why there is none, when deriving was just attempted and produced nothing: the file is too large, corrupt, or of a format no reader claims."),
196
+ });
197
+ export const WorkspaceDerivedSchema = z.discriminatedUnion("present", [WorkspaceDerivedPresentSchema, WorkspaceDerivedAbsentSchema]);
198
+ export type WorkspaceDerived = z.infer<typeof WorkspaceDerivedSchema>;
157
199
  // Resolves a possibly-partial path reference (a model's mention, a compiler's path) to the real workspace path it
158
200
  // means, matched as a suffix.
159
201
  export const WorkspaceResolveQuerySchema = WorkspaceScopeSchema.extend({