@axonpush/wizard 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: ts-mastra
3
+ description: Integrate AxonPush tracing into a Mastra project
4
+ ---
5
+
6
+ # AxonPush + Mastra Integration
7
+
8
+ Integrate AxonPush tracing into a project using Mastra.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushMastraHooks` with tool and workflow lifecycle methods
13
+ - Events: `tool.*.start`, `tool.*.end`, `workflow.start`, `workflow.end`, `workflow.error`
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { AxonPushMastraHooks } from "@axonpush/sdk/integrations/mastra";
20
+
21
+ const axonpush = new AxonPush({
22
+ apiKey: process.env.AXONPUSH_API_KEY!,
23
+ tenantId: process.env.AXONPUSH_TENANT_ID!,
24
+ baseUrl: process.env.AXONPUSH_BASE_URL,
25
+ });
26
+
27
+ const hooks = new AxonPushMastraHooks({
28
+ client: axonpush,
29
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
30
+ agentId: "mastra",
31
+ });
32
+
33
+ // In your workflow or agent:
34
+ // hooks.onWorkflowStart("my-workflow", input);
35
+ // hooks.beforeToolUse("tool-name", input);
36
+ // hooks.afterToolUse("tool-name", output);
37
+ // hooks.onWorkflowEnd("my-workflow", output);
38
+ // hooks.onWorkflowError("my-workflow", error);
39
+ ```
40
+
41
+ ## Steps
42
+
43
+ 1. Install `@axonpush/sdk` using the project's package manager
44
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
45
+ 3. Find the main workflow or agent entry point
46
+ 4. Add imports and create the hooks instance
47
+ 5. Call the appropriate hook methods at workflow/tool lifecycle points
48
+
49
+ ## Fail-Open
50
+
51
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, hook calls are silently suppressed.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: ts-openai-agents
3
+ description: Integrate AxonPush tracing into a TypeScript OpenAI Agents SDK project
4
+ ---
5
+
6
+ # AxonPush + OpenAI Agents SDK (TypeScript) Integration
7
+
8
+ Integrate AxonPush tracing into a TypeScript project using the OpenAI Agents SDK.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushRunHooks` that traces agent runs, tool calls, and handoffs
13
+ - Events: `agent.run.start`, `agent.run.end`, `tool.*.start`, `tool.*.end`, `agent.handoff`
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { AxonPushRunHooks } from "@axonpush/sdk/integrations/openai-agents";
20
+
21
+ const axonpush = new AxonPush({
22
+ apiKey: process.env.AXONPUSH_API_KEY!,
23
+ tenantId: process.env.AXONPUSH_TENANT_ID!,
24
+ baseUrl: process.env.AXONPUSH_BASE_URL,
25
+ });
26
+
27
+ const hooks = new AxonPushRunHooks({
28
+ client: axonpush,
29
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
30
+ });
31
+
32
+ // const result = await Runner.run(agent, input, { hooks });
33
+ ```
34
+
35
+ ## Steps
36
+
37
+ 1. Install `@axonpush/sdk` using the project's package manager
38
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
39
+ 3. Find the main file where Runner.run() is called
40
+ 4. Add the imports and AxonPush client initialization
41
+ 5. Pass `hooks` to `Runner.run()`
42
+
43
+ ## Fail-Open
44
+
45
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, tracing hooks are silently suppressed.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ts-vercel-ai
3
+ description: Integrate AxonPush tracing into a Vercel AI SDK project
4
+ ---
5
+
6
+ # AxonPush + Vercel AI SDK Integration
7
+
8
+ Integrate AxonPush tracing into a project using the Vercel AI SDK.
9
+
10
+ ## What gets added
11
+
12
+ - `axonPushMiddleware` that wraps generateText/streamText with tracing
13
+ - Events: `llm.start`, `llm.end`, `llm.token` (streaming)
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { axonPushMiddleware } from "@axonpush/sdk/integrations/vercel-ai";
20
+ import { generateText, streamText, wrapLanguageModel } from "ai";
21
+
22
+ const axonpush = new AxonPush({
23
+ apiKey: process.env.AXONPUSH_API_KEY!,
24
+ tenantId: process.env.AXONPUSH_TENANT_ID!,
25
+ baseUrl: process.env.AXONPUSH_BASE_URL,
26
+ });
27
+
28
+ const middleware = axonPushMiddleware({
29
+ client: axonpush,
30
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
31
+ agentId: "vercel-ai",
32
+ });
33
+
34
+ // Option A: wrap the model
35
+ // const tracedModel = wrapLanguageModel({ model: openai("gpt-4o"), middleware });
36
+ // const result = await generateText({ model: tracedModel, prompt: "..." });
37
+
38
+ // Option B: pass middleware directly (if supported)
39
+ // const result = await generateText({ model, prompt: "...", experimental_telemetry: { middleware } });
40
+ ```
41
+
42
+ ## Steps
43
+
44
+ 1. Install `@axonpush/sdk` using the project's package manager
45
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
46
+ 3. Find files that call `generateText()` or `streamText()`
47
+ 4. Add imports and create the middleware
48
+ 5. Wrap the language model using `wrapLanguageModel({ model, middleware })`
49
+
50
+ ## Fail-Open
51
+
52
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, the middleware passes through without tracing.