fix(core): correct listener routes, test expectations, and comment markers post-merge

Add ptyConnectApiRoutes to createListenerRoutes so PTY WebSocket
connections work through the Kilo listener layer. Bump
gitlab-ai-provider to 6.8.0 and drop it from the supply-chain
quarantine exclusion list.

Realign kilocode_change comment markers to their correct lines across
tui-schema, session.sql, and several test/story files. Update ACP
auth tests to expect Kilo-branded agent name and method IDs, fix
httpapi-ui test to assert 404 for the disabled fallback UI proxy,
and point the OAuth branding test at the relocated codex plugin path.

Add new test coverage for the ACP Agent interface contract and
primaryWorktree resolution across normal repos, linked worktrees,
submodules, and paths with spaces. Refresh TUI inline-tool-wrap
snapshots and session recording fixtures to reflect current branding.
This commit is contained in:
Imanol Maiztegui
2026-06-19 13:17:38 +02:00
parent 351c2e4fc7
commit 0ab78cb8bb
17 changed files with 100 additions and 36 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: Bug report
description: Report an issue that should be fixed (avoid pasting giant AI generated summaries or your issue may be closed/ignored)
description: Report an issue that should be fixed
labels: ["bug"]
body:
- type: textarea
+2 -8
View File
@@ -483,7 +483,7 @@
"drizzle-orm": "catalog:",
"effect": "catalog:",
"fuzzysort": "3.1.0",
"gitlab-ai-provider": "6.7.0",
"gitlab-ai-provider": "6.8.0",
"google-auth-library": "10.5.0",
"gray-matter": "4.0.3",
"htmlparser2": "8.0.2",
@@ -3052,7 +3052,7 @@
"github-from-package": ["github-from-package@0.0.0", "", {}, "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="],
"gitlab-ai-provider": ["gitlab-ai-provider@6.7.0", "", { "dependencies": { "@anthropic-ai/sdk": "^0.71.0", "@anycable/core": "^0.9.2", "graphql-request": "^6.1.0", "isomorphic-ws": "^5.0.0", "openai": "^6.16.0", "socket.io-client": "^4.8.1", "vscode-jsonrpc": "^8.2.1", "zod": "^3.25.76" }, "peerDependencies": { "@ai-sdk/provider": ">=3.0.0", "@ai-sdk/provider-utils": ">=4.0.0" } }, "sha512-J7apROAmDwDJcLPcbQ9YQiPhyFN1Vvt/f3ugsePaUnzh3sedfHCHGETgG0Mm0dJCB2rC7DYwmV/sgxLQcQ/sjw=="],
"gitlab-ai-provider": ["gitlab-ai-provider@6.8.0", "", { "dependencies": { "@anthropic-ai/sdk": "^0.71.0", "@anycable/core": "^0.9.2", "graphql-request": "^6.1.0", "isomorphic-ws": "^5.0.0", "openai": "^6.16.0", "socket.io-client": "^4.8.1", "vscode-jsonrpc": "^8.2.1", "zod": "^3.25.76" }, "peerDependencies": { "@ai-sdk/provider": ">=3.0.0", "@ai-sdk/provider-utils": ">=4.0.0" } }, "sha512-KwHASXkHtDcgrzTXZVp9Dyx6t8m9nK0R2fCm47MWcxxQ1kOBt3f2LZugtu1kOby8i4Sbd+kvBSYM66PGkDclng=="],
"glob": ["glob@13.0.5", "", { "dependencies": { "minimatch": "^10.2.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-BzXxZg24Ibra1pbQ/zE7Kys4Ua1ks7Bn6pKLkVPZ9FZe4JQS6/Q7ef3LG1H+k7lUf5l4T3PLSyYyYJVYUvfgTw=="],
@@ -4510,8 +4510,6 @@
"@opencode-ai/core/@aws-sdk/credential-providers": ["@aws-sdk/credential-providers@3.993.0", "", { "dependencies": { "@aws-sdk/client-cognito-identity": "3.993.0", "@aws-sdk/core": "^3.973.11", "@aws-sdk/credential-provider-cognito-identity": "^3.972.3", "@aws-sdk/credential-provider-env": "^3.972.9", "@aws-sdk/credential-provider-http": "^3.972.11", "@aws-sdk/credential-provider-ini": "^3.972.9", "@aws-sdk/credential-provider-login": "^3.972.9", "@aws-sdk/credential-provider-node": "^3.972.10", "@aws-sdk/credential-provider-process": "^3.972.9", "@aws-sdk/credential-provider-sso": "^3.972.9", "@aws-sdk/credential-provider-web-identity": "^3.972.9", "@aws-sdk/nested-clients": "3.993.0", "@aws-sdk/types": "^3.973.1", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.23.2", "@smithy/credential-provider-imds": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/property-provider": "^4.2.8", "@smithy/types": "^4.12.0", "tslib": "^2.6.2" } }, "sha512-1M/nukgPSLqe9krzOKHnE8OylUaKAiokAV3xRLdeExVHcRE7WG5uzCTKWTj1imKvPjDqXq/FWhlbbdWIn7xIwA=="],
"@opencode-ai/core/gitlab-ai-provider": ["gitlab-ai-provider@6.8.0", "", { "dependencies": { "@anthropic-ai/sdk": "^0.71.0", "@anycable/core": "^0.9.2", "graphql-request": "^6.1.0", "isomorphic-ws": "^5.0.0", "openai": "^6.16.0", "socket.io-client": "^4.8.1", "vscode-jsonrpc": "^8.2.1", "zod": "^3.25.76" }, "peerDependencies": { "@ai-sdk/provider": ">=3.0.0", "@ai-sdk/provider-utils": ">=4.0.0" } }, "sha512-KwHASXkHtDcgrzTXZVp9Dyx6t8m9nK0R2fCm47MWcxxQ1kOBt3f2LZugtu1kOby8i4Sbd+kvBSYM66PGkDclng=="],
"@opencode-ai/core/venice-ai-sdk-provider": ["venice-ai-sdk-provider@2.0.2", "", { "dependencies": { "@ai-sdk/openai-compatible": "^2.0.47", "@ai-sdk/provider": "^3.0.10", "@ai-sdk/provider-utils": "^4.0.27" }, "peerDependencies": { "ai": "^6.0.90" } }, "sha512-aoa05nI3BTK5aGbjBflq+Gfln2AHAkwNbWuGGvCzUIsOfp5Y3iPD4O4PUGDAEiWVJWbjpPn0KfDa0H/HebwsaA=="],
"@opencode-ai/storybook/@storybook/addon-a11y": ["@storybook/addon-a11y@10.4.4", "", { "dependencies": { "@storybook/global": "^5.0.0", "axe-core": "^4.2.0" }, "peerDependencies": { "storybook": "^10.4.4" } }, "sha512-/eUCx/6Ozq5grauwm/NqKtlW0oJ26b6GNesXrMuFID8WLg/qLEKf79Awfz9XrmyWxe7loD40K952r7AA5Oc23A=="],
@@ -4994,10 +4992,6 @@
"@opencode-ai/core/@aws-sdk/credential-providers/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.993.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.11", "@aws-sdk/middleware-host-header": "^3.972.3", "@aws-sdk/middleware-logger": "^3.972.3", "@aws-sdk/middleware-recursion-detection": "^3.972.3", "@aws-sdk/middleware-user-agent": "^3.972.11", "@aws-sdk/region-config-resolver": "^3.972.3", "@aws-sdk/types": "^3.973.1", "@aws-sdk/util-endpoints": "3.993.0", "@aws-sdk/util-user-agent-browser": "^3.972.3", "@aws-sdk/util-user-agent-node": "^3.972.9", "@smithy/config-resolver": "^4.4.6", "@smithy/core": "^3.23.2", "@smithy/fetch-http-handler": "^5.3.9", "@smithy/hash-node": "^4.2.8", "@smithy/invalid-dependency": "^4.2.8", "@smithy/middleware-content-length": "^4.2.8", "@smithy/middleware-endpoint": "^4.4.16", "@smithy/middleware-retry": "^4.4.33", "@smithy/middleware-serde": "^4.2.9", "@smithy/middleware-stack": "^4.2.8", "@smithy/node-config-provider": "^4.3.8", "@smithy/node-http-handler": "^4.4.10", "@smithy/protocol-http": "^5.3.8", "@smithy/smithy-client": "^4.11.5", "@smithy/types": "^4.12.0", "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.32", "@smithy/util-defaults-mode-node": "^4.2.35", "@smithy/util-endpoints": "^3.2.8", "@smithy/util-middleware": "^4.2.8", "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-iOq86f2H67924kQUIPOAvlmMaOAvOLoDOIb66I2YqSUpMYB6ufiuJW3RlREgskxv86S5qKzMnfy/X6CqMjK6XQ=="],
"@opencode-ai/core/gitlab-ai-provider/@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.71.2", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-TGNDEUuEstk/DKu0/TflXAEt+p+p/WhTlFzEnoosvbaDU2LTjm42igSdlL0VijrKpWejtOKxX0b8A7uc+XiSAQ=="],
"@opencode-ai/core/gitlab-ai-provider/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
"@opencode-ai/core/venice-ai-sdk-provider/@ai-sdk/openai-compatible": ["@ai-sdk/openai-compatible@2.0.50", "", { "dependencies": { "@ai-sdk/provider": "3.0.10", "@ai-sdk/provider-utils": "4.0.29" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-HyuxddF2Yv5G8qxK/0uksAINjQ4h6TpwOqHuqzsCM0u78/JWAW2OXcIplQeB44PIAORgPjbMzrw9DhnPYHMskA=="],
"@opencode-ai/core/venice-ai-sdk-provider/@ai-sdk/provider": ["@ai-sdk/provider@3.0.10", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-Q3BZ27qfpYqnCYGvE3vt+Qi6LGOF9R5Nmzn+9JoM1lCRsD9mYaIhfJLkSunN48nfGXJ6n+XNV0J/XVpqGQl7Dw=="],
+1 -1
View File
@@ -2,7 +2,7 @@
exact = true
# Keep Kilo's longer supply-chain quarantine while allowing packages that must track coordinated releases.
minimumReleaseAge = 410520 # seconds (~4.75 days / ~114 hours)
minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-x64", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "gitlab-ai-provider"]
minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-x64", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid"]
[test]
root = "./do-not-run-tests-from-root"
+1 -1
View File
@@ -143,7 +143,7 @@
"drizzle-orm": "catalog:",
"effect": "catalog:",
"fuzzysort": "3.1.0",
"gitlab-ai-provider": "6.7.0",
"gitlab-ai-provider": "6.8.0",
"google-auth-library": "10.5.0",
"gray-matter": "4.0.3",
"htmlparser2": "8.0.2",
@@ -79,8 +79,8 @@ export const TuiInfo = Schema.Struct({
plugin_enabled: Schema.optional(Schema.Record(Schema.String, Schema.Boolean)),
leader_timeout: Schema.optional(KeymapLeaderTimeout),
attention: Schema.optional(Attention),
title_icon: Schema.optional(KiloTitleIcon.Value),
prompt: Schema.optional(Prompt), // kilocode_change
title_icon: Schema.optional(KiloTitleIcon.Value), // kilocode_change
prompt: Schema.optional(Prompt),
scroll_speed: Schema.optional(ScrollSpeed).annotate({
description: "TUI scroll speed",
}),
+1 -1
View File
@@ -16,7 +16,7 @@ const OAUTH_PORT = 1456
const OAUTH_REDIRECT_PATH = "/auth/callback"
const OAUTH_TOKEN_PATH = "/auth/token"
const ROUTER_REFRESH_INTERVAL_MS = 5 * 60 * 1000
const OAUTH_SCOPES = "genai:read inference:query" // kilocode_change
const OAUTH_SCOPES = "genai:read inference:query"
interface ImplicitTokenPayload {
access_token: string
@@ -259,7 +259,7 @@ export function createRoutes(
// kilocode_change start - keep listener routes local while application services come from AppRuntime
export function createListenerRoutes(corsOptions?: CorsOptions) {
return Layer.mergeAll(rootApiRoutes, eventApiRoutes, instanceRoutes, docRoute, uiRoute).pipe(
return Layer.mergeAll(rootApiRoutes, eventApiRoutes, ptyConnectApiRoutes, instanceRoutes, docRoute, uiRoute).pipe(
provideKiloListenerRoutes(corsOptions),
)
}
+2 -2
View File
@@ -32,8 +32,8 @@ export const SessionTable = sqliteTable(
summary_additions: integer(),
summary_deletions: integer(),
summary_files: integer(),
summary_diffs: text({ mode: "json" }).$type<Snapshot.SummaryFileDiff[]>(),
metadata: text({ mode: "json" }).$type<Record<string, unknown>>(), // kilocode_change
summary_diffs: text({ mode: "json" }).$type<Snapshot.SummaryFileDiff[]>(), // kilocode_change
metadata: text({ mode: "json" }).$type<Record<string, unknown>>(),
cost: real().notNull().default(0),
tokens_input: integer().notNull().default(0),
tokens_output: integer().notNull().default(0),
@@ -21,7 +21,7 @@ describe("opencode acp initialize/auth subprocess", () => {
expect(initialized.agentCapabilities?.sessionCapabilities?.fork).toEqual({})
expect(initialized.agentCapabilities?.sessionCapabilities?.list).toEqual({})
expect(initialized.agentCapabilities?.sessionCapabilities?.resume).toEqual({})
expect(initialized.agentInfo?.name).toBe("OpenCode")
expect(initialized.agentInfo?.name).toBe("Kilo") // kilocode_change
}),
60_000,
)
@@ -33,9 +33,10 @@ describe("opencode acp initialize/auth subprocess", () => {
const acp = yield* createAcpClient({ opencode })
const initialized = yield* initialize(acp)
expect(initialized.authMethods?.[0]?.id).toBe("opencode-login")
expect(initialized.authMethods?.[0]?.id).toBe("kilo-login") // kilocode_change
expect(initialized.authMethods?.[0]?._meta?.["terminal-auth"]).toBeDefined()
expect(yield* acp.request<AuthenticateResponse>("authenticate", { methodId: "opencode-login" })).toMatchObject({
expect(yield* acp.request<AuthenticateResponse>("authenticate", { methodId: "kilo-login" })).toMatchObject({
// kilocode_change
result: {},
})
@@ -53,7 +54,7 @@ describe("opencode acp initialize/auth subprocess", () => {
const acp = yield* createAcpClient({ opencode })
const initialized = yield* acp.request<InitializeResponse>("initialize", { protocolVersion: 1 })
expect(initialized.result?.authMethods?.[0]?.id).toBe("opencode-login")
expect(initialized.result?.authMethods?.[0]?.id).toBe("kilo-login") // kilocode_change
expect(initialized.result?.authMethods?.[0]?._meta?.["terminal-auth"]).toBeUndefined()
}),
60_000,
@@ -6,8 +6,8 @@ exports[`TUI inline tool wrapping snapshots consecutive grep, glob, and read row
✱ Glob "**/*db*" in packages/opencode (6 matches)
→ Read packages/opencode/src/storage/db.ts [offset=1, limit=130]
→ Read packages/opencode/src/index.ts [offset=1, limit=100]
✱ Grep "export const OPENCODE_DB|OPENCODE_DB|OPENCODE_DEV|Global\\.
Path\\.data|data =" in packages/opencode/src (115 matches)"
✱ Grep "export const KILO_DB|KILO_DB|KILO_DEV|Global\\.Path\\.
data|data =" in packages/opencode/src (115 matches)"
`;
exports[`TUI inline tool wrapping snapshots expanded tool errors under the tool text 1`] = `
@@ -17,8 +17,8 @@ exports[`TUI inline tool wrapping snapshots expanded tool errors under the tool
→ Read packages/opencode/src/storage/db.ts [offset=1, limit=130]
→ Read packages/opencode/src/index.ts [offset=1, limit=100]
No LSP server available for this file type.
✱ Grep "export const OPENCODE_DB|OPENCODE_DB|OPENCODE_DEV|Global\\.
Path\\.data|data =" in packages/opencode/src (115 matches)"
✱ Grep "export const KILO_DB|KILO_DB|KILO_DEV|Global\\.Path\\.
data|data =" in packages/opencode/src (115 matches)"
`;
exports[`TUI inline tool wrapping keeps separation after a shell output block 1`] = `
@@ -35,8 +35,8 @@ exports[`TUI inline tool wrapping keeps separation after a shell output block 1`
✱ Glob "**/*db*" in packages/opencode (6 matches)
→ Read packages/opencode/src/storage/db.ts [offset=1, limit=130]
→ Read packages/opencode/src/index.ts [offset=1, limit=100]
✱ Grep "export const OPENCODE_DB|OPENCODE_DB|OPENCODE_DEV|Global\\.
Path\\.data|data =" in packages/opencode/src (115 matches)"
✱ Grep "export const KILO_DB|KILO_DB|KILO_DEV|Global\\.Path\\.
data|data =" in packages/opencode/src (115 matches)"
`;
exports[`TUI inline tool wrapping keeps separation after a padded user message 1`] = `
@@ -49,6 +49,6 @@ exports[`TUI inline tool wrapping keeps separation after a padded user message 1
✱ Glob "**/*db*" in packages/opencode (6 matches)
→ Read packages/opencode/src/storage/db.ts [offset=1, limit=130]
→ Read packages/opencode/src/index.ts [offset=1, limit=100]
✱ Grep "export const OPENCODE_DB|OPENCODE_DB|OPENCODE_DEV|Global\\.
Path\\.data|data =" in packages/opencode/src (115 matches)"
✱ Grep "export const KILO_DB|KILO_DB|KILO_DEV|Global\\.Path\\.
data|data =" in packages/opencode/src (115 matches)"
`;
@@ -22,7 +22,7 @@
"headers": {
"content-type": "application/json"
},
"body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]}],\"instructions\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review \\u2014 never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` \\u2014 for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` \\u2014 for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\",\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-openai-oauth-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"stream\":true}"
"body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]}],\"instructions\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\",\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-openai-oauth-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"stream\":true,\"include\":[\"reasoning.encrypted_content\"]}"
},
"response": {
"status": 200,
@@ -38,7 +38,7 @@
"headers": {
"content-type": "application/json"
},
"body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]},{\"type\":\"function_call\",\"call_id\":\"call_uoEsDnHNhxMLpCUy6hqEyHme\",\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":{}}\"},{\"type\":\"function_call_output\",\"call_id\":\"call_uoEsDnHNhxMLpCUy6hqEyHme\",\"output\":\"{\\\"temperature\\\":22,\\\"condition\\\":\\\"sunny\\\"}\"}],\"instructions\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review \\u2014 never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` \\u2014 for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` \\u2014 for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\",\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-openai-oauth-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"stream\":true}"
"body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]},{\"type\":\"function_call\",\"call_id\":\"call_uoEsDnHNhxMLpCUy6hqEyHme\",\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":{}}\"},{\"type\":\"function_call_output\",\"call_id\":\"call_uoEsDnHNhxMLpCUy6hqEyHme\",\"output\":\"{\\\"temperature\\\":22,\\\"condition\\\":\\\"sunny\\\"}\"}],\"instructions\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\",\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-openai-oauth-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"stream\":true,\"include\":[\"reasoning.encrypted_content\"]}"
},
"response": {
"status": 200,
@@ -22,7 +22,7 @@
"headers": {
"content-type": "application/json"
},
"body": "{\"model\":\"gpt-5.2-codex\",\"input\":[{\"role\":\"system\",\"content\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review \\u2014 never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` \\u2014 for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` \\u2014 for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-opencode-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"max_output_tokens\":32000,\"stream\":true}"
"body": "{\"model\":\"gpt-5.2-codex\",\"input\":[{\"role\":\"system\",\"content\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-opencode-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"max_output_tokens\":32000,\"stream\":true,\"include\":[\"reasoning.encrypted_content\"]}"
},
"response": {
"status": 200,
@@ -40,7 +40,7 @@
"headers": {
"content-type": "application/json"
},
"body": "{\"model\":\"gpt-5.2-codex\",\"input\":[{\"role\":\"system\",\"content\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review \\u2014 never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` \\u2014 for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` \\u2014 for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]},{\"type\":\"function_call\",\"call_id\":\"call_DfI0RwTrlaizfnQ9zkJC8rks\",\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":{}}\"},{\"type\":\"function_call_output\",\"call_id\":\"call_DfI0RwTrlaizfnQ9zkJC8rks\",\"output\":\"{\\\"temperature\\\":22,\\\"condition\\\":\\\"sunny\\\"}\"}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-opencode-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"max_output_tokens\":32000,\"stream\":true}"
"body": "{\"model\":\"gpt-5.2-codex\",\"input\":[{\"role\":\"system\",\"content\":\"You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\n# Personality\\n\\n- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.\\n- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.\\n- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.\\n- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.\\n\\n# Code\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n\\n## Suggestions\\n\\n- Use the `question` tool only when you need an actual answer from the user.\\n- If the `suggest` tool is available, use it ONLY to offer a local code review never for other actions like committing, pushing, running tests, or any other next step.\\n- When you have completed non-trivial file-changing work and you are at least 90% confident the task is fully addressed, use `suggest` to offer a local code review.\\n- Do not withhold a review suggestion merely because the work was reactive, fixed CI/lint failures, touched docs/config, or happened around commit/push work. If there are meaningful changes to review, suggest it.\\n- Do not suggest review when there are no file changes, when the change is small or trivial (typo-only, comment-only, formatting-only, or tiny single-line tweaks), when the coding session is fixing another local or remote code review, or when a local code review suggestion has already been made in the current session.\\n- Do not suggest it after every edit or partial implementation turn.\\n- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.\\n- When suggesting a code review, choose the right command for the action prompt:\\n - `/local-review-uncommitted` for reviewing uncommitted working-tree changes (staged, unstaged, and untracked files).\\n - `/local-review` for reviewing all committed changes on the current branch vs its base branch.\\n - Prefer `/local-review-uncommitted` when the work you just did has not been committed yet.\\nAnswer using tools when appropriate.\\nUse the get_weather tool exactly once to look up Paris, then reply with exactly: Paris is sunny.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]},{\"type\":\"function_call\",\"call_id\":\"call_DfI0RwTrlaizfnQ9zkJC8rks\",\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":{}}\"},{\"type\":\"function_call_output\",\"call_id\":\"call_DfI0RwTrlaizfnQ9zkJC8rks\",\"output\":\"{\\\"temperature\\\":22,\\\"condition\\\":\\\"sunny\\\"}\"}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get the current weather for a city.\",\"parameters\":{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}],\"store\":false,\"prompt_cache_key\":\"session-recorded-opencode-loop\",\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"max_output_tokens\":32000,\"stream\":true,\"include\":[\"reasoning.encrypted_content\"]}"
},
"response": {
"status": 200,
@@ -0,0 +1,25 @@
import { expect, test } from "bun:test"
import type { Agent as ACPAgent } from "@agentclientprotocol/sdk"
import { ACP } from "@/acp/agent"
const methods = [
"initialize",
"authenticate",
"newSession",
"loadSession",
"listSessions",
"resumeSession",
"closeSession",
"unstable_forkSession",
"setSessionConfigOption",
"setSessionMode",
"unstable_setSessionModel",
"prompt",
"cancel",
] as const satisfies readonly (keyof ACPAgent)[]
test("ACP Agent exposes every supported SDK-routed method", () => {
for (const method of methods) {
expect(typeof ACP.Agent.prototype[method], `Missing ACP Agent method: ${method}`).toBe("function")
}
})
@@ -5,7 +5,7 @@ const root = path.join(__dirname, "..", "..")
describe("Kilo OAuth branding", () => {
test("Codex OAuth browser flow uses Kilo branding", async () => {
const src = await Bun.file(path.join(root, "src", "plugin", "codex.ts")).text()
const src = await Bun.file(path.join(root, "src", "plugin", "openai", "codex.ts")).text()
expect(src).toContain('originator: "kilo"')
expect(src).toContain('"User-Agent": `kilo/${InstallationVersion}`')
@@ -0,0 +1,44 @@
import { $ } from "bun"
import { describe, expect, test } from "bun:test"
import path from "path"
import { primaryWorktree } from "../../src/kilocode/primary-worktree"
import { tmpdir } from "../fixture/fixture"
describe("primaryWorktree", () => {
test("returns the current checkout for a normal repository", async () => {
await using repo = await tmpdir({ git: true })
expect(primaryWorktree(repo.path)).toBe(repo.path)
})
test("returns the primary checkout for a linked worktree", async () => {
await using repo = await tmpdir({ git: true })
const worktree = path.join(repo.path, ".kilo", "worktrees", "feature")
await $`git worktree add -b primary-worktree-test ${worktree}`.cwd(repo.path).quiet()
expect(primaryWorktree(worktree)).toBe(repo.path)
})
test("returns undefined outside a Git repository", async () => {
await using dir = await tmpdir()
expect(primaryWorktree(dir.path)).toBeUndefined()
})
test("supports repository paths containing spaces", async () => {
await using dir = await tmpdir()
const repo = path.join(dir.path, "repo with spaces")
await $`git init ${repo}`.quiet()
expect(primaryWorktree(repo)).toBe(repo)
})
test("returns a submodule checkout instead of its internal git directory", async () => {
await using parent = await tmpdir({ git: true })
await using child = await tmpdir({ git: true })
await $`git -c protocol.file.allow=always submodule add ${child.path} sub`.cwd(parent.path).quiet()
const submodule = path.join(parent.path, "sub")
expect(primaryWorktree(submodule)).toBe(submodule)
})
})
@@ -339,7 +339,7 @@ describe("HttpApi UI fallback", () => {
headers: { authorization: `Basic ${btoa("opencode:sec:ret")}` },
})
expect(response.status).toBe(200)
expect(response.status).toBe(404) // kilocode_change - auth succeeds, but Kilo does not proxy a fallback UI
}),
)
@@ -318,7 +318,7 @@ const TOOL_SAMPLES = {
tool: "bash",
input: { command: "bun test --filter session", description: "Run session tests" },
output:
"bun test v1.3.14\n\n✓ session-turn.test.tsx (3 tests) 45ms\n✓ message-part.test.tsx (7 tests) 120ms\n\nTest Suites: 2 passed, 2 total\nTests: 10 passed, 10 total\nTime: 0.89s", // kilocode_change
"bun test v1.3.14\n\n✓ session-turn.test.tsx (3 tests) 45ms\n✓ message-part.test.tsx (7 tests) 120ms\n\nTest Suites: 2 passed, 2 total\nTests: 10 passed, 10 total\nTime: 0.89s",
title: "Run session tests",
metadata: { command: "bun test --filter session" },
},