Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Aug 18, 2025

Summary

Implements TarkoNPMPackageManager to support dynamic agent loading from NPM packages as requested in issue #1177.

Key Features

  • Smart Package Resolution: Supports both full package names (@omni-tars/agent) and shortcut syntax (omni-tarstarko-omni-tars)
  • Parallel Resolution Strategy: Tries tarko-{name} first, then falls back to {name} with priority handling
  • Global Package Store: Maintains local cache at ~/.tarko/packages/ with registry metadata
  • Tarko Compliance Validation: Ensures packages are valid Tarko agents before installation
  • CLI Integration: Seamlessly integrated with tarko run command with --update and --tag options
  • Comprehensive Error Handling: Provides helpful suggestions when packages aren't found

Usage Examples

# Full package names
tarko run @omni-tars/agent
tarko run tarko-my-agent

# Shortcut syntax
tarko run omni-tars  # Resolves to tarko-omni-tars
tarko run github     # Resolves to tarko-github

# Package management
tarko run my-agent --update
tarko run my-agent --tag beta

Implementation Details

  • Created new package @tarko/npm-package-manager with core functionality
  • Updated agent-cli to integrate NPM package resolution in resolveAgentFromCLIArgument
  • Added comprehensive test coverage for package resolution and validation
  • Follows existing project patterns and conventions

Close: #1177

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

- Add @tarko/npm-package-manager with smart package resolution
- Support shortcut syntax: 'omni-tars' → 'tarko-omni-tars'
- Parallel resolution strategy with priority handling
- Global package store with local registry
- Tarko compliance validation for packages
- Integration with agent-cli for seamless NPM agent loading
- Comprehensive error handling with helpful suggestions
@netlify
Copy link

netlify bot commented Aug 18, 2025

Deploy Preview for agent-tars-docs failed.

Name Link
🔨 Latest commit 8d63842
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68a363647a4ae60008a1164e

@ulivz ulivz changed the title feat(tarko): implement TarkoNPMPackageManager for dynamic agent loading feat(tarko): support dynamic agent npm package manager Aug 18, 2025
@ulivz ulivz changed the title feat(tarko): support dynamic agent npm package manager feat(tarko): support dynamic agent from npm package manager Aug 18, 2025
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.

feat: implement TarkoNPMPackageManager for dynamic agent loading

2 participants