feat(core): session.pending.list API with pending-only session_pending storage (#36126)
This commit is contained in:
parent
99156c10e6
commit
a72992e00f
43 changed files with 986 additions and 649 deletions
|
|
@ -10,7 +10,7 @@ import { Pty } from "../src/pty.js"
|
|||
import { Question } from "../src/question.js"
|
||||
import { Session } from "../src/session.js"
|
||||
import { SessionMessage } from "../src/session-message.js"
|
||||
import { SessionInput } from "../src/session-input.js"
|
||||
import { SessionPending } from "../src/session-pending.js"
|
||||
import { FileDiff } from "../src/file-diff.js"
|
||||
import { Money } from "../src/money.js"
|
||||
import { Skill } from "../src/skill.js"
|
||||
|
|
@ -39,7 +39,7 @@ describe("contract hygiene", () => {
|
|||
expect(Schema.encodeSync(Value)({ value: 1 })).toEqual({ value: "1" })
|
||||
expect(Schema.encodeSync(Value)({ value: undefined })).toEqual({})
|
||||
expect(
|
||||
Schema.encodeSync(SessionInput.SyntheticData)({
|
||||
Schema.encodeSync(SessionPending.SyntheticData)({
|
||||
text: "completed",
|
||||
description: undefined,
|
||||
metadata: undefined,
|
||||
|
|
@ -89,10 +89,10 @@ describe("contract hygiene", () => {
|
|||
Pty.Info,
|
||||
Session.ListAnchor,
|
||||
Session.Revert,
|
||||
SessionInput.UserData,
|
||||
SessionInput.SyntheticData,
|
||||
SessionInput.User,
|
||||
SessionInput.Synthetic,
|
||||
SessionPending.UserData,
|
||||
SessionPending.SyntheticData,
|
||||
SessionPending.User,
|
||||
SessionPending.Synthetic,
|
||||
].map((schema) => schema.ast.annotations?.identifier)
|
||||
|
||||
expect(identifiers.every((identifier) => typeof identifier === "string")).toBe(true)
|
||||
|
|
@ -134,7 +134,7 @@ describe("contract hygiene", () => {
|
|||
|
||||
test("reviewed session contracts use their canonical current shapes", () => {
|
||||
expect(SessionMessage.Info.ast.annotations?.identifier).toBe("Session.Message.Info")
|
||||
expect(SessionInput.Info.ast.annotations?.identifier).toBe("SessionInput.Info")
|
||||
expect(SessionPending.Info.ast.annotations?.identifier).toBe("SessionPending.Info")
|
||||
expect(Money.USD).not.toBe(Money.USDPerMillionTokens)
|
||||
expect(
|
||||
FileDiff.Info.make({ file: "src/index.ts", patch: "@@", additions: 1, deletions: 0, status: "modified" }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue