Skip to content

refactor(core): move session control facts into agent runtime#1342

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/core-pr-b-kernel-control-plane
Jun 29, 2026
Merged

refactor(core): move session control facts into agent runtime#1342
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/core-pr-b-kernel-control-plane

Conversation

@limityan

@limityan limityan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move provider-neutral session/config/summary facts, session-state labels, dialog-turn id/stats, context-profile policy, and /btw runtime tracking into bitfun-agent-runtime.
  • Move the persisted session state sidecar shape and processing-state sanitization out of core persistence; core keeps storage IO, metadata merging, workspace path resolution, and old-path compatibility facades.
  • Move the round-level tool confirmation gate into the runtime confirmation owner while core keeps config reads and tool registry lookup.
  • Refine the decomposition architecture docs so external systems are modeled as boundary resources, Product Assembly remains the concrete composition root, and non-assembly layers consume stable APIs/ports instead of concrete platform providers.
  • Add boundary required rules/self-tests and focused contracts to prevent session/context/confirmation owner rollback.

Compatibility and risk

  • No behavior or wire change intended. Session defaults, persisted state JSON shape, session-state serialization/labels, dialog-turn id generation, /btw token semantics, and tool-confirmation skip/permission semantics are covered by tests.
  • Existing bitfun-core compatibility paths are preserved, including both bitfun_core::agentic::core::SessionKind and bitfun_core::agentic::core::session::SessionKind.
  • bitfun-agent-runtime adds only a contracts-layer dependency on bitfun-core-types for SessionKind; it remains free of bitfun-core, Tauri, product-full, assembly, and concrete manager dependencies.
  • The architecture docs now distinguish compile dependency, assembly-time registration, runtime port calls, and external resource calls; external systems are not treated as a repository layer.
  • The SDK facade was kept narrow: session config/summary types are owned by the runtime module but are not added to the SDK re-export surface.

Verification

  • node --test scripts/check-core-boundaries.test.mjs
  • node scripts/check-core-boundaries.mjs
  • pnpm run check:repo-hygiene
  • cargo test -p bitfun-agent-runtime
  • cargo check -p bitfun-core --no-default-features
  • cargo check -p bitfun-core --features product-full
  • cargo metadata --no-deps --format-version 1
  • git diff --check gcwing/main...HEAD
  • cargo check --workspace

cargo check --workspace and product-full checks report existing rmcp deprecation warnings in services-integrations/src/mcp/protocol/client_info.rs; no new warnings from this PR were observed.

@limityan limityan force-pushed the yanzhn/core-pr-b-kernel-control-plane branch from 7e8328a to 68dc9ff Compare June 29, 2026 08:59
@limityan limityan changed the title refactor(core): move session context facts into agent runtime refactor(core): move session control facts into agent runtime Jun 29, 2026
@limityan limityan force-pushed the yanzhn/core-pr-b-kernel-control-plane branch 2 times, most recently from 8612963 to b65a1be Compare June 29, 2026 09:44
@limityan limityan force-pushed the yanzhn/core-pr-b-kernel-control-plane branch from b65a1be to de2a60b Compare June 29, 2026 10:01
@limityan limityan merged commit a6951e9 into GCWing:main Jun 29, 2026
4 checks passed
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