Skip to content

Add the ai-chat-acp core subtype (inert core side) - #4300

Merged
mstomar125 merged 2 commits into
mainfrom
issue-4292-ai-chat-acp-core
Nov 18, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-4292-ai-chat-acp-core

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

DO NOT MERGE until the agent owner agrees

The last commit (agent_loop: handle ai-chat-acp in the chat-kind match (agent-owner sign-off needed)) is the ONE => None arm in packages/agent/src/local_agent/agent_loop.rs, forced by the new enum variant (exhaustive match). It is the only change under packages/agent, in its own commit so it can be dropped if the owner prefers to make the edit. Also hold until the paired docs PR (nodespace-docs #162) is ready to publish (see Sequencing).

What

Inert core side of the accepted decision "Native ACP chats are a core subtype". Nothing launches or drives a session.

  • Kind: core_subtype (parent ai-chat); category: flat; wire: Typed { update: false }; not embedded, inherits every chat rule.
  • Fields: session_status (closed enum active/ended, default active, required), session_id (text, local_only, system protection).
  • Message parent rule: ai-chat-message must have a parent of ai-chat-acp or ai-chat-native.
  • Wire struct AiChatAcpNode, convert arms, promoted fields, behavior, generated TypeScript, frontend converter/guard, icon and label entries; ai-chat-acp listed in CORE_TYPES_WITHOUT_PLUGIN with a reason (no viewer or plugin until the session side lands).
  • Shape record regenerated; change-log entries: new type additive, message structure rule rows rebuild, stored message schema parent declaration additive.
  • Tests: registry, schema, wire contract, behavior, create/retype rebucketing (native to acp and back), closed schema, message parent accepted under acp and refused elsewhere, query for ai-chat, no inbound references, embedding exclusion, frontend converter and normalize.

Not done here: message part fields, viewer, retype entry point in the native viewer, session behaviour.

Sequencing

Docs sheet: nodespace-docs #162. The merge gate reads docs main resolved when it starts, so merge #162 just before bun run merge of this PR, and revert it if this PR is ejected.

Refs #4292

🤖 Generated with Claude Code

@mstomar125

Copy link
Copy Markdown
Contributor Author

Merge queue: #4300 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing origin/main and running bun run test:changed, fix, push, and re-run bun run merge 4300.

PASS [   0.304s] (1075/6005) nodespace-agent::it create_question_task::the_task_and_the_person_may_be_named_by_title
        PASS [   0.254s] (1076/6005) nodespace-agent::it create_task::a_project_that_does_not_exist_or_is_not_one_refuses_with_nothing_created
        PASS [   0.350s] (1077/6005) nodespace-agent::it create_task::a_change_to_code_is_an_issue_and_a_project_is_found_by_id
        PASS [   0.217s] (1078/6005) nodespace-agent::it extends_chain_tool_results_test::empty_search_on_a_subtype_names_inherited_filterable_fields
        FAIL [   3.111s] (1079/6005) nodespace-agent pty::manager::tests::ultra_short_lived_processes_are_pruned
  stdout ───
    running 1 test
    test pty::manager::tests::ultra_short_lived_processes_are_pruned ... FAILED
    failures:
    failures:
        pty::manager::tests::ultra_short_lived_processes_are_pruned
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1057 filtered out; finished in 3.09s
  stderr ───
    thread 'pty::manager::tests::ultra_short_lived_processes_are_pruned' (14997328) panicked at packages/agent/src/pty/manager.rs:214:9:
    manager len 1 did not reach 0 within 3s
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  Cancelling due to test failure: 9 tests still running
        PASS [   0.246s] (1080/6005) nodespace-agent::it create_task::one_call_writes_the_task_its_brief_its_checklist_and_its_project_link
        PASS [   0.227s] (1081/6005) nodespace-agent::it extends_chain_tool_results_test::get_node_on_a_subtype_returns_and_lists_inherited_fields
        PASS [   0.311s] (1082/6005) nodespace-agent::it create_task::a_task_with_no_brief_or_no_checklist_is_refused_with_nothing_created
        PASS [   0.273s] (1083/6005) nodespace-agent::it get_related_nodes_both_direction::builtin_reverse_name_with_both_direction_reports_each_node_once
        PASS [   0.245s] (1084/6005) nodespace-agent::it get_related_nodes_both_direction::forward_name_with_both_direction_still_unions_directions
        PASS [   0.181s] (1085/6005) nodespace-agent::it get_related_nodes_both_direction::reverse_name_with_both_direction_reports_each_node_once
        PASS [   0.196s] (1086/6005) nodespace-agent::it get_related_nodes_both_direction::reverse_name_equal_to_forward_name_reports_each_node_once
        PASS [   0.164s] (1087/6005) nodespace-agent::it link_field_values::the_write_tools_take_a_link_and_refuse_a_bare_string
        PASS [   4.052s] (1088/6005) nodespace-agent pty::session::tests::an_agents_own_variables_are_forwarded_and_no_others
────────────
     Summary [   9.939s] 1088/6005 tests run: 1087 passed, 1 failed, 121 skipped
        FAIL [   3.111s] (1079/6005) nodespace-agent pty::manager::tests::ultra_short_lived_processes_are_pruned
warning: 4917/6005 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed
error: script "rust:test:workspace" exited with code 100
error: script "rust:test" exited with code 100
[stage exited with code 100]

  full output: /var/folders/3w/y9kj522n1_j9wqmt6vl_sb6r0000gp/T/nodespace-gate-logs/_gate-merge-2026-11-18T10-23-46-596Z/rust-test-rust-workspace-nextest.log

✗ rust:test (Rust workspace, nextest) failed — merge blocked.
  Fix the failure, push, and re-run: bun run merge <PR#>

mstomar125 and others added 2 commits November 18, 2026 11:47
…ssage parent rule)

A third chat subtype beside ai-chat-native and ai-chat-pty, per the accepted
decision that native ACP chats are a core subtype. Kind core_subtype, category
flat, wire Typed { update: false }, parent ai-chat.

- registry entry, ALL, and the message parent rule now must_have_parent_of
  [ai-chat-acp, ai-chat-native]
- seeded schema: session_status (closed enum active/ended, default active) and
  session_id (text, local_only)
- AiChatAcpNode wire struct, convert arms and promoted fields, generated
  TypeScript, behavior, frontend converter/guard and display entries
- shape record regenerated with change-log entries
- tests for the registry, schema, wire, behavior, retype rebucketing, closed
  schema, message parent and the frontend converter

Nothing launches or drives a session; that side is not part of this change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…gn-off needed)

Adding CoreNodeType::AiChatAcp breaks the exhaustive match in the type-to-skill
mapping. One `=> None` arm, nothing else under packages/agent. Separable: drop
this commit if the agent owner prefers to make the edit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-4292-ai-chat-acp-core branch from 641a0d3 to b777f3f Compare November 18, 2026 10:47
@mstomar125
mstomar125 merged commit 7b6ab43 into main Nov 18, 2026
@mstomar125
mstomar125 deleted the issue-4292-ai-chat-acp-core branch November 18, 2026 10:47
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