mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-16 14:01:06 +00:00
Merge pull request #272 from getcompanion-ai/grind
Add durable grind mode and non-mutating Companion OS checks
This commit is contained in:
commit
f58ff785ce
19 changed files with 1252 additions and 9 deletions
|
|
@ -995,12 +995,15 @@ export interface RegisteredCommand {
|
|||
// Extension API
|
||||
// ============================================================================
|
||||
|
||||
type ExtensionHandlerResult<R> = [R] extends [undefined]
|
||||
? Promise<void> | void
|
||||
: Promise<R | undefined> | R | undefined;
|
||||
|
||||
/** Handler function type for events */
|
||||
// biome-ignore lint/suspicious/noConfusingVoidType: void allows bare return statements
|
||||
export type ExtensionHandler<E, R = undefined> = (
|
||||
event: E,
|
||||
ctx: ExtensionContext,
|
||||
) => Promise<R | void> | R | void;
|
||||
) => ExtensionHandlerResult<R>;
|
||||
|
||||
/**
|
||||
* ExtensionAPI passed to extension factory functions.
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import { rm } from "node:fs/promises";
|
|||
import { join } from "node:path";
|
||||
import { URL } from "node:url";
|
||||
import type { AgentSession, AgentSessionEvent } from "../agent-session.js";
|
||||
import type { Settings } from "../settings-manager.js";
|
||||
import { extractMessageText, getLastAssistantText } from "./helpers.js";
|
||||
import {
|
||||
type GatewayEvent,
|
||||
type GatewayQueuedMessage,
|
||||
HttpError,
|
||||
type ManagedGatewaySession,
|
||||
} from "./internal-types.js";
|
||||
|
|
@ -29,7 +29,6 @@ import type {
|
|||
HistoryPart,
|
||||
ModelInfo,
|
||||
} from "./types.js";
|
||||
import type { Settings } from "../settings-manager.js";
|
||||
import {
|
||||
createVercelStreamListener,
|
||||
errorVercelStream,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue