Skip to content

Make tool an abstract base with a tool-native subtype and drop source #3450

Closed

Description

@malibio

Overview

Make tool an abstract base with a tool-native core subtype for NodeSpace's built-in tools, and remove the source field: the subtype says where a tool comes from (ADR-086 §12).

Problem Statement

  • tool has seeded nodes and a behaviour but no schema; its fields (handler, description, parameter_schema, source, enabled) are undeclared.
  • The trust gate is a string comparison. In available_tools() (packages/agent/src/local_agent/tools.rs) it is source == "internal" || enabled. With remote tools coming (MCP, REST, CLI), each kind needs its own binding fields and its own trust rule, which one flat type with a source string can't express.

Proposed Solution

  1. tool (abstract) declares name (content), description (embedded), parameter_schema (JSON Schema; nesting depth ≤ 9, no open additionalProperties, per ADR-038) and enabled.
  2. tool-native declares handler (the Rust handler key). It is always trusted. The seeded tool nodes become tool-native.
  3. Delete source. The trust gate becomes a per-subtype behaviour rule: native tools are always offered; future remote subtypes are offered only when enabled.
  4. available_tools() lists every tool subtype through the subtype-aware query on tool.
  5. tool-mcp, tool-rest and tool-cli are added when remote bindings are designed; none exists in this issue.

Architecture Impact

Implements decisions/086-core-node-types-defined-once-typed-by-category.md §12 (nodespace-docs), with ADR-038 (tools as registry nodes generated into typed tools). Update architecture/prompt-skill-system.md in the same PR.

Acceptance Criteria

  • tool is abstract and tool-native is a core subtype, each with a declared schema; creating a bare tool is refused (tests)
  • No source field exists; the trust gate is the subtype's behaviour rule (test with a fixture remote-style subtype that isn't enabled)
  • Seeded tools are tool-native nodes, and available_tools() builds the tool surface from them (test)
  • Follows development/node-type-sequence.md; the node-types.md tool sheets updated in the same PR
  • bun run test:changed passes; bun run quality:fix clean

Technical Specifications

Reference Files

  • packages/core/src/models/core_schemas.rs, packages/core/src/behaviors/mod.rs (ToolNodeBehavior)
  • packages/agent/src/skill_pipeline.rs (seed_tool_nodes)
  • packages/agent/src/local_agent/tools.rs (available_tools)

Dependencies

Non-Goals

  • Remote tool subtypes and their bindings
  • A tool search surface

Activity

  1. malibio commented on Oct 2, 2026

    @malibio
    CollaboratorAuthor

    Baseline — Frontend: 309 test files passed, 5606 tests passed

  2. self-assigned this
    on Oct 2, 2026
  3. malibio commented on Oct 2, 2026

    @malibio
    CollaboratorAuthor

    Node type sequence — classification: tool becomes an abstract base (structured: parameter_schema is an object), and tool-native is a new core subtype of it (structured through the inherited field; generic wire shape, like tool had). State: description, parameter_schema, enabled stay on tool (bucket tool); handler moves to tool-native (bucket tool-native); source is deleted — the subtype says where a tool comes from. No relationships, no lifecycle fields. Structural rule (no children) and participation (embedded) stay declared on tool and reach the subtype through the chain.

  4. added a commit that references this issue on Oct 2, 2026
    e495c4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions