Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude/skills/update-acp/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: update-acp
description: Audit or update AgentOS against the latest stable ACP v1 schema, including its manual sidecar client, public types, and SDK-backed adapters.
---

# Update ACP

1. Read `ACP_IMPLEMENTED_SCHEMA_VERSION` in `crates/agentos-sidecar/src/acp_extension.rs`.
2. Find the latest `schema-v1.*` in [ACP releases](https://github.com/agentclientprotocol/agent-client-protocol/releases) and inspect its `schema.json` plus [`schema/v1/CHANGELOG.md`](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/v1/CHANGELOG.md). Separately check `npm view @agentclientprotocol/sdk version`, its published types, and its [changelog](https://github.com/agentclientprotocol/typescript-sdk/blob/main/CHANGELOG.md). Ignore unstable v2 and keep wire `protocolVersion` separate.
3. Update together:
- Adapters/dependencies/tests: `registry/agent/` and `pnpm-lock.yaml`.
- Public types/client/tests: `packages/core/src/agent-session-types.ts`, `packages/core/src/agent-os.ts`, and `packages/core/tests/`.
- Manual JSON-RPC/compatibility/tests: `crates/agentos-sidecar/src/acp_extension.rs`, `crates/agentos-sidecar/tests/`, and `crates/agentos-sidecar-core/src/engine.rs`.
- Internal generated protocol only if its AgentOS extension contract changes: `crates/agentos-protocol/` and `packages/core/src/sidecar/`.
4. Preserve unknown additive JSON fields, run scoped adapter/core/sidecar tests plus type checks, and update `ACP_IMPLEMENTED_SCHEMA_VERSION` only after the stable schema is fully audited and implemented.
23 changes: 23 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,29 @@ the guest — over inventing a softer fallback that hides the failure.
reason. Fast tests where the configured safeguard fires should stay in the
default suite.

## Gigacode Performance Investigations

- For cold-start latency, run `gigacode` directly and use the plain
`[gigacode]` phase lines and durations mirrored from `daemon.log` while the
client waits for provider bootstrap. These startup lines are intentionally
human-readable and separate from Pino session logs.
- Investigate Gigacode latency from its per-session Pino JSONL logs, not by
inferring timing from the OpenCode screen or the aggregate `daemon.log`.
- Logs live at
`~/.local/state/gigacode/session-logs/<open-code-session-id>.jsonl` by default,
or under `$GIGACODE_STATE_DIR/session-logs/` when that override is set.
- Reproduce one turn in a fresh session, identify the newest log with
`ls -lt ~/.local/state/gigacode/session-logs`, then inspect its ordered
`event` and `durationMs` fields with `jq`.
- Compare `rivet.actor.resolved`, `agentos.session.created`,
`agentos.prompt.completed`, `prompt.completed`, `session.idle`, and
`agentos.connection.disposed` before optimizing. The actor event measures
resolution of the shared per-cwd workspace actor; the ACP event measures the
distinct harness session created inside it.
- Preserve the raw JSONL file when reporting a regression. Use
`GIGACODE_LOG_LEVEL` to change the Pino level; performance phase records are
emitted at `info`.

## Version Control

- Commit and PR titles are plain conventional commits with no coding-agent
Expand Down
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"includes": [
"packages/**/*.ts",
"examples/**/*.ts",
"experiments/**/*.ts",
"!packages/core/src/sidecar/generated-protocol.ts",
"!_secure-exec-sibling",
"!/**/node_modules"
Expand Down
30 changes: 30 additions & 0 deletions crates/agentos-actor-plugin/src/actions/contract_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,34 @@ pub const ACTION_CONTRACTS: &[ActionContract] = &[
ts_signature:
"createSession: (c: Ctx, agentType: string, options?: CreateSessionOptions) => Promise<string>;",
},
ActionContract {
name: "probeAgentConfig",
reply_shape: ReplyShape::Array,
ts_signature:
"probeAgentConfig: (c: Ctx, agentType: string, options?: CreateSessionOptions) => Promise<SessionConfigOption[]>;",
},
ActionContract {
name: "sendPrompt",
reply_shape: ReplyShape::Object(&["response", "text"]),
ts_signature: "sendPrompt: (c: Ctx, sessionId: string, text: string) => Promise<PromptResult>;",
},
ActionContract {
name: "sendPromptAsync",
reply_shape: ReplyShape::Unit,
ts_signature: "sendPromptAsync: ( c: Ctx, sessionId: string, text: string, requestId: string, ) => Promise<void>;",
},
ActionContract {
name: "setSessionModel",
reply_shape: ReplyShape::Object(&["id", "jsonrpc", "result"]),
ts_signature:
"setSessionModel: (c: Ctx, sessionId: string, model: string) => Promise<JsonRpcResponse>;",
},
ActionContract {
name: "cancelSession",
reply_shape: ReplyShape::Object(&["id", "jsonrpc", "result"]),
ts_signature:
"cancelSession: (c: Ctx, sessionId: string) => Promise<JsonRpcResponse>;",
},
ActionContract {
name: "closeSession",
reply_shape: ReplyShape::Unit,
Expand Down Expand Up @@ -259,6 +282,11 @@ pub const EVENT_CONTRACTS: &[EventContract] = &[
payload_shape: ReplyShape::Object(&["event", "sessionId"]),
ts_signature: "sessionEvent: SessionEventPayload;",
},
EventContract {
name: "promptResult",
payload_shape: ReplyShape::Object(&["error", "requestId", "result"]),
ts_signature: "promptResult: PromptResultEventPayload;",
},
EventContract {
name: "permissionRequest",
payload_shape: ReplyShape::Object(&["request", "sessionId"]),
Expand Down Expand Up @@ -366,9 +394,11 @@ const TYPE_IMPORTS: &[TsImport] = &[
module: "@rivet-dev/agentos-core",
names: &[
"ExecResult",
"JsonRpcResponse",
"PermissionReply",
"ProcessInfo",
"ProcessTreeNode",
"SessionConfigOption",
"SpawnedProcessInfo",
"VirtualStat",
],
Expand Down
Loading
Loading