feat: let agents read supervisor story graphs
Expose saved decisions, timelines and source evidence through read-only Story Graph tools across Model, Harness and local/remote OpenCode and Continue. Supervisor enablement and runtime assignments govern discovery and calls; reads do not invoke models or modify stored evidence. Remote use requires matching Desktop and Agent changes. Make Continue discussion show the complete editable message with a separated destination and shared action layout. Sending uses the visible draft without reattaching removed context. Validation: existing focused MCP, runtime, controlled Linux Host, discussion component and Electron layout checks plus typechecks; staged diff check passed. Cross-scope fact reuse, historical reconstruction and full package acceptance remain deferred. Release note: Agents can consult saved supervisor decisions and their sources when continuing work. Continue discussion now lets you review and edit the complete message before sending.
This commit is contained in:
@@ -5,21 +5,27 @@ import { imageOperationSchema, imageToolDescriptionLimit, imageToolInputSchema }
|
||||
export const remoteImageToolSchema = z.object({
|
||||
channelId: agentIdentifierSchema,
|
||||
channelEpoch: positiveAgentSequenceSchema,
|
||||
description: z.string().min(1).max(imageToolDescriptionLimit)
|
||||
description: z.string().min(1).max(imageToolDescriptionLimit).optional(),
|
||||
storyGraph: z.boolean().optional()
|
||||
}).strict()
|
||||
|
||||
export const remoteImageToolCallSchema = z.object({
|
||||
export const remoteImageToolCallSchema = z.union([z.object({
|
||||
callId: z.string().uuid(),
|
||||
input: imageToolInputSchema
|
||||
}).strict()
|
||||
}).strict(), z.object({
|
||||
callId: z.string().uuid(),
|
||||
name: z.enum(['story_graph_list', 'story_graph_search', 'story_graph_get_context', 'story_graph_read_source']),
|
||||
input: z.record(z.string(), z.unknown())
|
||||
}).strict()])
|
||||
|
||||
export const remoteImageToolReplySchema = z.object({
|
||||
callId: z.string().uuid(),
|
||||
result: imageOperationSchema.optional(),
|
||||
storyGraphResult: z.record(z.string(), z.unknown()).optional(),
|
||||
error: z.string().max(4_000).optional()
|
||||
}).strict()
|
||||
|
||||
// References and operation metadata only. Image bytes never cross this channel.
|
||||
// Bounded graph evidence or image-operation metadata. Image bytes never cross this channel.
|
||||
export const remoteImageToolMaximumBytes = 256 * 1024
|
||||
|
||||
export function encodeRemoteImageToolMessage(value: unknown): Uint8Array {
|
||||
|
||||
Reference in New Issue
Block a user