Skip to content

Let extensions contribute World State sections - #30100

Merged
jif-oai merged 1 commit into
mainfrom
jif/skill-runtime-foundation
Jun 25, 2026
Merged

Let extensions contribute World State sections#30100
jif-oai merged 1 commit into
mainfrom
jif/skill-runtime-foundation

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why

#29856 already owns the durable thread intent and exact environment binding. This PR adds only the small missing extension boundary: an extension can contribute one named World State section, while core still owns persistence, diffing, and model-visible fragment types.

This lets skills stay in the skills extension instead of moving their runtime into core.

Shape

extension-owned state
        |
        | contribute section id + JSON snapshot + renderer
        v
core World State
        |
        | compare with the previous snapshot
        v
no message, or one incremental model-visible update

The extension API is deliberately small:

fn contribute_world_state(...) -> Vec<WorldStateSectionContribution>

Core adapts the rendered result to ContextualUserFragment, records the snapshot, and keeps the existing compaction/resume behavior.

What changes

  • Adds extension-owned World State section contributions.
  • Calls those contributors from the existing per-step World State builder.
  • Restores durable selected capability roots into extension thread state on resume.
  • Keeps the actual model-context fragment and rollout machinery in core.

What does not change

Example

step 1 snapshot: skills = []
step 2 snapshot: skills = [executor-demo:deploy]

core asks the skills extension to render only that change.

Stack

  1. This PR: let extensions contribute World State sections.
  2. Project executor skills through the skills extension.
  3. Pin one MCP runtime to each model step.
  4. Project selected MCP/app/connector metadata by environment availability.
  5. One end-to-end integration scenario.

@jif-oai
jif-oai force-pushed the jif/skill-runtime-foundation branch from 884b07b to 920e737 Compare June 25, 2026 19:59
@jif-oai jif-oai changed the title Consolidate the authority-neutral skill runtime Let extensions contribute World State sections Jun 25, 2026
@jif-oai
jif-oai marked this pull request as ready for review June 25, 2026 20:04
@jif-oai
jif-oai requested a review from a team as a code owner June 25, 2026 20:04

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

Copy link
Copy Markdown
Contributor

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: 920e737543

ℹ️ 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 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 address that feedback".

Comment thread codex-rs/core/src/context/world_state/mod.rs
Comment thread codex-rs/core/src/context/world_state/mod.rs
Comment thread codex-rs/ext/extension-api/src/contributors/world_state.rs
Comment thread codex-rs/core/src/context/world_state/mod.rs
@jif-oai
jif-oai force-pushed the jif/skill-runtime-foundation branch from 920e737 to cdfb338 Compare June 25, 2026 20:14
@jif-oai
jif-oai merged commit c9e6d97 into main Jun 25, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/skill-runtime-foundation branch June 25, 2026 21:23
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants