@kalo-ai/plugin-example
v0.1.0
Published
Reference Kalo AI plugin demonstrating tools, settings, prompt extensions, and storage
Maintainers
Readme
@kalo-ai/plugin-example
Reference Kalo plugin demonstrating the standard default / kaloPlugin export contract, schema-driven settings, an Agent tool, a bounded System Prompt extension, configuration migration, and secret-field warnings.
Install in Kalo
After this package is published, open Settings → Plugins and use one exact reference:
npm:@kalo-ai/[email protected]
jsr:@kalo-ai/[email protected]Kalo downloads the final self-contained esm.sh bundle once, stores the JavaScript and SHA-256 in IndexedDB, and loads it offline afterward. Newly installed plugins remain disabled until explicitly enabled.
Tool
example_echoThe tool is only intended for explicit testing. It applies the configured prefix, output mode, repeat count, and uppercase option.
Settings demonstrated
- text
- password / secret warning
- number
- toggle
- select
- config migration from version 1 to 2
The example password value is stored locally for UI testing and is not returned by the tool.
Package exports
export const examplePlugin = definePlugin({ /* ... */ });
export const kaloPlugin = examplePlugin;
export default kaloPlugin;Publishing
package.json is the only version source. Validate both artifacts before a release:
bun run --filter @kalo-ai/plugin-example build
bun run --filter @kalo-ai/plugin-example pack:check
cd packages/plugin-example
VERSION="$(node -p "require('./package.json').version")"
deno publish --dry-run --set-version "$VERSION"
cd ../..Initial registry bootstrap only
The first npm version must be published interactively because Trusted Publisher settings live on an existing package. Run npm directly so Passkey/WebAuthn can use the terminal:
npm login --auth-type=web
cd packages/plugin-example
npm publish --access public --auth-type=webCreate @kalo-ai/plugin-example on JSR, link it to fenwei-dev/kalo-ai, then publish the same version:
VERSION="$(node -p "require('./package.json').version")"
deno publish --set-version "$VERSION"
cd ../..After npm bootstrap, configure its Trusted Publisher with GitHub owner fenwei-dev, repository kalo-ai, workflow filename publish-plugin-example.yml, no environment, and the npm publish allowed action.
Except for this initial bootstrap, do not publish npm or JSR versions manually. Use the GitHub OIDC workflow for subsequent releases.
Subsequent releases through GitHub Actions
cd packages/plugin-example
npm version patch --no-git-tag-version
cd ../..
bun install --ignore-scripts
bun run check
bun test
bun run build
VERSION="$(node -p "require('./packages/plugin-example/package.json').version")"
git add packages/plugin-example/package.json bun.lock
git commit -m "chore(plugin-example): release $VERSION"
git push origin main
git tag -a "plugin-example-v$VERSION" -m "plugin-example v$VERSION"
git push origin "plugin-example-v$VERSION"The workflow publishes npm and JSR with GitHub OIDC. Existing versions are skipped safely during recovery runs.
Security
This plugin runs without a sandbox when installed in Kalo, just like every user-installed plugin. Review the exact package version before enabling it.
