npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@muselab/busbar-sf-agentscript

v0.0.2

Published

AgentScript parser, graph analysis, and LSP for Salesforce Agentforce

Readme

busbar-sf-agentscript

Crates.io docs.rs CI codecov License: MIT OR Apache-2.0

AgentScript parser, graph analysis, and LSP for Salesforce Agentforce.

AgentScript (.agent) is Salesforce's indentation-sensitive language for defining AI agent behavior in Agentforce. This project provides tooling for authoring, validating, and analyzing .agent files.

Getting Started

Choose the option that fits your workflow:

| | Best for | What you get | |---|---|---| | SF CLI Plugin | Salesforce developers | sf agency commands for validation, graph export, and CI integration | | VS Code Extension | VS Code users | Syntax highlighting, real-time diagnostics, and topic graph visualization | | LSP Server | Neovim, Helix, and other editors | Full language server for any LSP-capable editor | | Rust Crates | Rust developers | Parser, graph analysis library, and WASM support |


SF CLI Plugin

Install with the Salesforce CLI:

sf plugins install sf-plugin-busbar-agency

Validate an AgentScript file:

sf agency validate --file my-agent.agent

Export the topic reference graph:

sf agency graph --file my-agent.agent --format graphml --output graph.xml

Extract action interface definitions:

sf agency actions --file my-agent.agent

The plugin exits non-zero on errors, making it suitable for CI pipelines.


VS Code Extension

Install from the VS Code Marketplace:

code --install-extension composable-delivery.vscode-agentscript

Or download the .vsix from GitHub Releases and install manually:

code --install-extension vscode-agentscript-<version>.vsix

Features:

  • Syntax highlighting for .agent files
  • Real-time diagnostics — undefined references, cycle detection, unreachable topics
  • Hover documentation
  • Semantic token highlighting
  • Topic graph visualization (AgentScript: Show Topic Graph)
  • AgentScript Dependencies panel in the Explorer sidebar

Settings:

| Setting | Default | Description | |---|---|---| | agentscript.lsp.serverPath | auto | Path to a custom busbar-sf-agentscript-lsp binary | | agentscript.maxNumberOfProblems | 100 | Maximum diagnostics shown per file | | agentscript.trace.server | off | LSP communication tracing (off, messages, verbose) |


LSP Server

The busbar-sf-agentscript-lsp binary powers the VS Code extension and works with any LSP-capable editor.

Install

Download the pre-built binary for your platform from GitHub Releases:

| Platform | Binary | |---|---| | macOS (Apple Silicon) | busbar-sf-agentscript-lsp-aarch64-apple-darwin | | macOS (Intel) | busbar-sf-agentscript-lsp-x86_64-apple-darwin | | Linux x86_64 | busbar-sf-agentscript-lsp-x86_64-unknown-linux-gnu | | Linux aarch64 | busbar-sf-agentscript-lsp-aarch64-unknown-linux-gnu | | Windows x86_64 | busbar-sf-agentscript-lsp-x86_64-pc-windows-msvc.exe |

Or install from source:

cargo install --git https://github.com/composable-delivery/busbar-sf-agentscript busbar-sf-agentscript-lsp

Neovim

Using nvim-lspconfig:

local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')

if not configs.agentscript then
  configs.agentscript = {
    default_config = {
      cmd = { 'busbar-sf-agentscript-lsp' },
      filetypes = { 'agentscript' },
      root_dir = lspconfig.util.root_pattern('sfdx-project.json', '.git'),
    },
  }
end

lspconfig.agentscript.setup {}

Add to ~/.config/nvim/init.lua (or your config's ftdetect):

vim.filetype.add({ extension = { agent = 'agentscript' } })

Helix

Add to ~/.config/helix/languages.toml:

[[language]]
name = "agentscript"
scope = "source.agentscript"
file-types = ["agent"]
roots = ["sfdx-project.json", ".git"]
language-servers = ["agentscript-lsp"]

[language-server.agentscript-lsp]
command = "busbar-sf-agentscript-lsp"

Other Editors

Any editor supporting LSP can be configured to launch busbar-sf-agentscript-lsp as a stdio language server for files with the .agent extension.


Rust Crates

Add to Cargo.toml:

[dependencies]
# Parser only (default)
busbar-sf-agentscript = "0.1"

# Parser + graph analysis
busbar-sf-agentscript = { version = "0.1", features = ["graph"] }

# Parser + WASM bindings
busbar-sf-agentscript = { version = "0.1", features = ["wasm"] }

Parser

use busbar_sf_agentscript::parse;

let source = std::fs::read_to_string("my-agent.agent").unwrap();
let ast = parse(&source).unwrap();
println!("{} topics defined", ast.topics.len());

Graph Analysis

use busbar_sf_agentscript::{parse, graph::RefGraph};

let source = std::fs::read_to_string("my-agent.agent").unwrap();
let ast = parse(&source).unwrap();
let graph = RefGraph::from_ast(&ast).unwrap();

println!("Topics: {}", graph.topic_count());
println!("Unreachable: {:?}", graph.unreachable_topics());
println!("Unused actions: {:?}", graph.dead_actions());

Individual Crates

The umbrella crate re-exports everything, but you can depend on individual crates directly:

| Crate | docs.rs | Description | |---|---|---| | busbar-sf-agentscript | docs | Lexer, parser, AST, serializer, semantic validator, and graph analysis | | busbar-sf-agentscript-lsp | docs | LSP server binary |


AgentScript Language

AgentScript (.agent) is an indentation-sensitive (3-space) YAML-like language for defining Agentforce agent behavior. Example:

config:
   agent_name: MyAgent

variables:
   customerName: ""

start_agent:
   message: Hello! How can I help you today?

topics:
   - topic: SupportTopic
     instructions: Handle customer support requests.

     actions:
        - action: LookupCase
          type: FlowAction
          api_name: Look_Up_Case

See agent-script-recipes for real-world examples.


Workspace

src/                                        — parser, graph analysis, WASM bindings
crates/
  lsp/      busbar-sf-agentscript-lsp       — LSP server binary

packages/                                   — VS Code extension
plugin-agency/                              — SF CLI plugin (sf agency *)
tree-sitter-agentscript/                    — Tree-sitter grammar
zed-extension/                              — Zed editor extension
agent-script-recipes/                       — test fixtures (git submodule)

Contributing

See CONTRIBUTING.md. All contributions are welcome.

Local Setup

git clone https://github.com/composable-delivery/busbar-sf-agentscript
cd busbar-sf-agentscript
git submodule update --init         # recipe test fixtures
git config core.hooksPath .githooks # enable pre-commit checks

The pre-commit hook runs cargo fmt --check and cargo clippy -- -D warnings before every commit, matching CI exactly.


License

Licensed under either of

at your option.