Skip to content

[AAASM-3415] 🔧 (native): Forward teamId/parentAgentId on native register#165

Merged
Chisanan232 merged 6 commits into
masterfrom
v0.0.1/AAASM-3415/lineage_register_node
Jun 19, 2026
Merged

[AAASM-3415] 🔧 (native): Forward teamId/parentAgentId on native register#165
Chisanan232 merged 6 commits into
masterfrom
v0.0.1/AAASM-3415/lineage_register_node

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Target

  • Task summary:

    When the Node SDK moved to native gRPC Register (Epic AAASM-3395 / AAASM-3403), the native register path stopped forwarding the lineage/team fields the old REST register sent. teamId drives team-budget attribution; parentAgentId drives the topology graph. This restores forwarding over the native path.

  • Task tickets:

  • Key point change:

    • native/aa-ffi-node RegisterOptions gains team_id / parent_agent_id; register sets them on the aa-sdk-client AssemblyConfig. index.d.ts regenerated.
    • TS RegisterOptions gains teamId / parentAgentId; buildRegisterOptions sets each only when present so an unset field stays absent.
    • AssemblyConfig (TS) already exposed teamId / parentAgentId; this wires them through to register.
    • Bumped the shared aa-sdk-client / aa-proto git-SHA pin to the agent-assembly AAASM-3415 commit that adds the AssemblyConfig fields. No proto change was needed (the wire already carries both fields).

Effecting Scope

  • Action Types:

    • ✏️ Modifying existing something
      • 🟢 No breaking change
    • 🔧 Fixing bug
  • Scopes:

    • 🪡 API client and transport
    • 🫀 Data model and types
    • 🧪 Testing
      • 🧪 Unit testing
    • 🚀 Building
      • 🔗 Dependencies
  • Additional description:

    pnpm native:build (against the new pin) · pnpm typecheck · pnpm native:check-types · pnpm lint · pnpm test → 307 passed / 2 skipped (incl. 2 new forwarding tests in tests/native-register.test.ts). cargo clippy --all-targets -- -D warnings on the shim clean. The shim's 2-space style is preserved (the diff is a minimal +11 lines — cargo fmt's default 4-space reformat was not applied as the repo has no rustfmt.toml and CI does not gate on it).

Description

  • New parameters are optional and additive — None / omitted leaves the agent team-unscoped / root, preserving current behaviour.
  • Cross-repo pin dependency: the git-SHA pin points at agent-assembly's AAASM-3415 branch tip (209572bc…); move it to the squash-merge commit once PR #1160 merges. Not hard-blocked since no proto change was needed.

🤖 Generated with Claude Code

Chisanan232 and others added 4 commits June 19, 2026 16:31
Move the aa-sdk-client/aa-proto git-SHA pin to the agent-assembly
AAASM-3415 branch tip, which adds team_id/parent_agent_id to
AssemblyConfig. Move to the squash-merge commit once PR #1160 lands.

refs AAASM-3415

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RegisterOptions gains team_id/parent_agent_id and register() sets them on
AssemblyConfig so the native gRPC Register carries the agent's team-budget
scoping and topology lineage (AAASM-3415). Regenerated index.d.ts.

refs AAASM-3415

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RegisterOptions (TS) gains teamId/parentAgentId and buildRegisterOptions
sets each when present, so initAssembly's team/parent config reaches the
native register and the gateway gets team scoping + topology (AAASM-3415).

refs AAASM-3415

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add initAssembly forwarding tests: teamId/parentAgentId reach the native
register when set, and are omitted when unconfigured (AAASM-3415).

refs AAASM-3415

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/init-assembly.ts 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Chisanan232 Chisanan232 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Claude Code — PR review (AAASM-3415, node-sdk)

Verdict: ✅ approve — but merge AFTER agent-assembly #1160 + re-pin. CI green (quality, pin-consistency, module-smoke, Analyze); only codecov/patch red (Rust-shim lines uncovered by JS tests — advisory, non-blocking).

  • napi RegisterOptions + TS RegisterOptions/buildRegisterOptions forward teamId/parentAgentId; index.d.ts regenerated. pnpm test 307 pass/2 skip (2 new); typecheck/lint/clippy clean. Kept the shim's 2-space style (minimal +11 diff; repo doesn't gate on rustfmt). ✅

⚠️ Pin dependency: pins aa-sdk-client/aa-proto to agent-assembly branch-tip 209572bc. After #1160 squash-merges, re-pin to the merge commit + re-push (pin-consistency gate will re-run), THEN merge. (I can handle the re-pin once #1160 is in.)

Chisanan232 and others added 2 commits June 19, 2026 22:37
…8e40)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…trip cases

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@Chisanan232 Chisanan232 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Claude Code — re-pin + test pass (AAASM-3415, node)

✅ Re-pin clean + coverage strengthened — merge-ready. Re-pinned aa-sdk-client/aa-proto → merged fdff8e40; aa-* crates share one git rev (pin-consistency) green; all 3 agent-assembly git deps on the single rev. pnpm native:build rebuilt with no index.d.ts drift.

New tests/register-lineage-forwarding.test.ts (7 tests) covers: full config→RegisterOptions exact shape; only-teamId (parent omitted); only-parentAgentId (team omitted); neither; unicode round-trip; long-value no-truncation; empty-string teamId treated as unset — all via the public initAssembly path. Suite 314 pass / 2 skip; typecheck + lint clean. Only codecov/patch red (advisory). Good to merge.

@Chisanan232 Chisanan232 merged commit a5a4eaa into master Jun 19, 2026
16 of 17 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-3415/lineage_register_node branch June 19, 2026 14:52
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