mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-27 20:29:44 +02:00
Merge origin/dev into feat/code-mode-acp-client
Resolve conflicts in shared/runs.ts and renderer/App.tsx. - runs.ts: keep both the code-mode run events (code-run-event, code-run-permission-request) and dev's tool-permission-auto-decision event, in the schemas and the RunEvent union. - App.tsx switch: keep both the code-run-* cases and dev's tool-permission-auto-decision case. - App.tsx permission render: take dev's nullable permRequest guard + AutoPermissionDecision UI, minus the onSwitchAgent handler this branch removed (agent is switched via the chip, not in-chat).
This commit is contained in:
commit
fd434cc52c
17 changed files with 637 additions and 77 deletions
|
|
@ -17,10 +17,15 @@ export const LlmModelConfig = z.object({
|
|||
headers: z.record(z.string(), z.string()).optional(),
|
||||
model: z.string().optional(),
|
||||
models: z.array(z.string()).optional(),
|
||||
knowledgeGraphModel: z.string().optional(),
|
||||
meetingNotesModel: z.string().optional(),
|
||||
liveNoteAgentModel: z.string().optional(),
|
||||
autoPermissionDecisionModel: z.string().optional(),
|
||||
})).optional(),
|
||||
// Per-category model overrides (BYOK only — signed-in users always get
|
||||
// the curated gateway defaults). Read by helpers in core/models/defaults.ts.
|
||||
knowledgeGraphModel: z.string().optional(),
|
||||
meetingNotesModel: z.string().optional(),
|
||||
liveNoteAgentModel: z.string().optional(),
|
||||
autoPermissionDecisionModel: z.string().optional(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const StartEvent = BaseRunEvent.extend({
|
|||
agentName: z.string(),
|
||||
model: z.string(),
|
||||
provider: z.string(),
|
||||
permissionMode: z.enum(["manual", "auto"]).optional(),
|
||||
// useCase/subUseCase tag the run for analytics. Optional on read so legacy
|
||||
// run files written before these fields existed still parse cleanly.
|
||||
useCase: z.enum([
|
||||
|
|
@ -128,6 +129,15 @@ export const CodeRunPermissionRequestEvent = BaseRunEvent.extend({
|
|||
ask: PermissionAsk,
|
||||
});
|
||||
|
||||
export const ToolPermissionAutoDecisionEvent = BaseRunEvent.extend({
|
||||
type: z.literal("tool-permission-auto-decision"),
|
||||
toolCallId: z.string(),
|
||||
toolCall: ToolCallPart,
|
||||
permission: ToolPermissionMetadata.optional(),
|
||||
decision: z.enum(["allow", "deny"]),
|
||||
reason: z.string(),
|
||||
});
|
||||
|
||||
export const RunErrorEvent = BaseRunEvent.extend({
|
||||
type: z.literal("error"),
|
||||
error: z.string(),
|
||||
|
|
@ -154,6 +164,7 @@ export const RunEvent = z.union([
|
|||
ToolPermissionResponseEvent,
|
||||
CodeRunStreamEvent,
|
||||
CodeRunPermissionRequestEvent,
|
||||
ToolPermissionAutoDecisionEvent,
|
||||
RunErrorEvent,
|
||||
RunStoppedEvent,
|
||||
]);
|
||||
|
|
@ -186,6 +197,7 @@ export const Run = z.object({
|
|||
agentId: z.string(),
|
||||
model: z.string(),
|
||||
provider: z.string(),
|
||||
permissionMode: z.enum(["manual", "auto"]).optional(),
|
||||
useCase: UseCase.optional(),
|
||||
subUseCase: z.string().optional(),
|
||||
log: z.array(RunEvent),
|
||||
|
|
@ -205,6 +217,7 @@ export const CreateRunOptions = z.object({
|
|||
agentId: z.string(),
|
||||
model: z.string().optional(),
|
||||
provider: z.string().optional(),
|
||||
permissionMode: z.enum(["manual", "auto"]).optional(),
|
||||
useCase: UseCase.optional(),
|
||||
subUseCase: z.string().optional(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue