Skip to content

WIP: Trajectory format - #457

Open
Ankur Goyal (ankrgyl) wants to merge 7 commits into
mainfrom
trajectory
Open

Ankur Goyal (ankrgyl) wants to merge 7 commits into
mainfrom
trajectory

Conversation

@ankrgyl

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-17T22:24:21.474640Z ec2c221 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 234d7569b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

use serde_json::{Map, Value};
use std::vec::Vec;

pub struct Trajectory {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add serialization and TypeScript derives to trajectories

When consumers try to persist or exchange the new trajectory format, serde_json::to_value(&trajectory) cannot compile because Trajectory and its nested types implement neither Serialize nor Deserialize; likewise, enabling ts-rs's chrono-impl feature has no effect because none of these types derive TS or request an export. This leaves the format usable only as in-memory Rust structs and provides no generated TypeScript contract, so derive the required traits across the complete type graph.

AGENTS.md reference: AGENTS.md:L85-L89

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b70bcec55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use Lingua’s JSON value type for trajectory fields

When callers construct Trajectory metadata, tool inputs, or errors using the public lingua::serde_json::{Map, Value} types, those values are incompatible with these fields because this import resolves to the separate, standard serde_json crate. It also bypasses Lingua’s arbitrary-precision JSON wrapper, so large or high-precision numbers can be rejected or lose fidelity during trajectory round-trips. Import Map and Value from crate::serde_json, as the other universal-format modules do.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec2c221cf8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +45 to +49
export type { Trajectory } from "./generated/Trajectory";
export type { Turn } from "./generated/Turn";
export type { WorkStep } from "./generated/WorkStep";
export type { AgentResponse } from "./generated/AgentResponse";
export type { UniversalUsage } from "./generated/UniversalUsage";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Export all new trajectory constituent types

Because the package export map exposes only the root barrel, exporting just these five types leaves most of the newly generated public schema—such as Scope, Agent, Finding, FindingEvidence, Work, ToolResult, LLMAnalysis, and the token-detail types—unimportable by TypeScript consumers. This affects consumers as soon as they need a helper accepting one of these nested types or want to switch directly on the Work union; re-export the complete public trajectory type graph from this barrel.

AGENTS.md reference: AGENTS.md:L11-L14

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant