resolve merge conflicts

This commit is contained in:
marius-kilocode
2026-06-02 16:13:31 +02:00
168 changed files with 5097 additions and 3500 deletions
@@ -39,6 +39,10 @@ import { kiloScenarios } from "../../kilocode/server/httpapi-exercise-scenarios"
void (await import("@opencode-ai/core/util/log")).init({ print: false })
function cursor(input: Record<string, unknown>) {
return Buffer.from(JSON.stringify(input)).toString("base64url")
}
const scenarios: Scenario[] = [
http.protected
.get("/global/health", "global.health")
@@ -515,7 +519,10 @@ const scenarios: Scenario[] = [
yield* ctx.worktreeRemove(ctx.state.directory)
}),
),
http.protected.get("/experimental/session", "experimental.session.list").json(200, array),
http.protected
.get("/experimental/session", "experimental.session.list")
.at((ctx) => ({ path: "/experimental/session?roots=false&archived=false", headers: ctx.headers() }))
.json(200, array),
http.protected.get("/experimental/resource", "experimental.resource.list").json(),
http.protected
.post("/sync/history", "sync.history.list")
@@ -593,6 +600,64 @@ const scenarios: Scenario[] = [
},
"none",
),
http.protected
.get("/api/session", "v2.session.list.filters")
.at((ctx) => ({
path: `/api/session?${new URLSearchParams({
limit: "2",
order: "asc",
path: ".",
roots: "false",
start: "0",
search: "missing",
directory: ctx.directory ?? "",
})}`,
headers: ctx.headers(),
}))
.json(
200,
(body) => {
object(body)
array(body.items)
object(body.cursor)
},
"none",
),
http.protected
.get("/api/session", "v2.session.list.cursor")
.at((ctx) => ({
path: `/api/session?${new URLSearchParams({
limit: "2",
directory: ctx.directory ?? "",
cursor: cursor({
id: "ses_httpapi_missing",
time: 0,
order: "desc",
direction: "next",
directory: ctx.directory,
}),
})}`,
headers: ctx.headers(),
}))
.json(
200,
(body) => {
object(body)
array(body.items)
object(body.cursor)
},
"none",
),
http.protected
.get("/api/session", "v2.session.list.cursor.invalid")
.at((ctx) => ({
path: `/api/session?${new URLSearchParams({
cursor: cursor({ id: "ses_httpapi_missing", time: 0, order: "desc", direction: "next" }),
search: "not-allowed-with-cursor",
})}`,
headers: ctx.headers(),
}))
.status(400, undefined, "none"),
http.protected
.get("/api/session/{sessionID}/context", "v2.session.context")
.at((ctx) => ({
@@ -615,6 +680,53 @@ const scenarios: Scenario[] = [
},
"none",
),
http.protected
.get("/api/session/{sessionID}/message", "v2.session.messages.params")
.at((ctx) => ({
path: `${route("/api/session/{sessionID}/message", { sessionID: "ses_httpapi_missing" })}?${new URLSearchParams({
limit: "2",
order: "asc",
})}`,
headers: ctx.headers(),
}))
.json(
200,
(body) => {
object(body)
array(body.items)
object(body.cursor)
},
"none",
),
http.protected
.get("/api/session/{sessionID}/message", "v2.session.messages.cursor")
.at((ctx) => ({
path: `${route("/api/session/{sessionID}/message", { sessionID: "ses_httpapi_missing" })}?${new URLSearchParams({
limit: "2",
directory: ctx.directory ?? "",
cursor: cursor({ id: "msg_httpapi_missing", time: 0, order: "desc", direction: "next" }),
})}`,
headers: ctx.headers(),
}))
.json(
200,
(body) => {
object(body)
array(body.items)
object(body.cursor)
},
"none",
),
http.protected
.get("/api/session/{sessionID}/message", "v2.session.messages.cursor.invalid")
.at((ctx) => ({
path: `${route("/api/session/{sessionID}/message", { sessionID: "ses_httpapi_missing" })}?${new URLSearchParams({
cursor: cursor({ id: "msg_httpapi_missing", time: 0, order: "desc", direction: "next" }),
order: "asc",
})}`,
headers: ctx.headers(),
}))
.status(400, undefined, "none"),
http.protected
.post("/api/session/{sessionID}/prompt", "v2.session.prompt.invalid")
.at((ctx) => ({