@zk-tech/ag-ui-business-core
v1.0.1
Published
Business-oriented AG-UI runtime shared by `zk-web`, CLI, and the VS Code extension.
Readme
@zk-tech/ag-ui-business-core
Business-oriented AG-UI runtime shared by zk-web, CLI, and the VS Code extension.
Usage
import { Agent, InterruptReason, type Message } from '@zk-tech/ag-ui-business-core';Only the root entrypoint is supported. Do not import internal files or src/* paths.
Custom Fetch
You can inject a custom fetch implementation through SDKConfig. The SDK still builds the request URL, headers, body, and SSE-specific headers; your custom fetch only handles the actual transport.
import { Agent } from '@zk-tech/ag-ui-business-core';
const agent = new Agent({
apiBaseUrl: 'https://example.com',
apiKey: 'token',
fetch: async (input, init) => {
return fetch(input, {
...init,
headers: {
...init?.headers,
'x-client': 'cli',
},
});
},
});This is useful for CLI or VS Code extension runtimes where you want to add proxying, logging, retrying, or custom authentication behavior.
Development
pnpm --filter @zk-tech/ag-ui-business-core run buildpnpm --filter @zk-tech/ag-ui-business-core run devpnpm --filter @zk-tech/ag-ui-business-core run testpnpm --filter @zk-tech/ag-ui-business-core run type-check
Publishing
Package versioning is managed through Changesets. The publish workflow runs build, test, and type-check before publishing.
