@msg91comm/m91 0.0.0-stage → 1.2.0

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/LICENSE +21 -0
  3. package/README.md +647 -2
  4. package/dist/src/client.d.ts +165 -0
  5. package/dist/src/client.d.ts.map +1 -0
  6. package/dist/src/client.js +221 -0
  7. package/dist/src/client.js.map +1 -0
  8. package/dist/src/exceptions.d.ts +114 -0
  9. package/dist/src/exceptions.d.ts.map +1 -0
  10. package/dist/src/exceptions.js +199 -0
  11. package/dist/src/exceptions.js.map +1 -0
  12. package/dist/src/http.d.ts +71 -0
  13. package/dist/src/http.d.ts.map +1 -0
  14. package/dist/src/http.js +150 -0
  15. package/dist/src/http.js.map +1 -0
  16. package/dist/src/index.d.ts +49 -0
  17. package/dist/src/index.d.ts.map +1 -0
  18. package/dist/src/index.js +45 -0
  19. package/dist/src/index.js.map +1 -0
  20. package/dist/src/integrations/claude-agent-sdk.d.ts +63 -0
  21. package/dist/src/integrations/claude-agent-sdk.d.ts.map +1 -0
  22. package/dist/src/integrations/claude-agent-sdk.js +109 -0
  23. package/dist/src/integrations/claude-agent-sdk.js.map +1 -0
  24. package/dist/src/integrations/google-adk.d.ts +47 -0
  25. package/dist/src/integrations/google-adk.d.ts.map +1 -0
  26. package/dist/src/integrations/google-adk.js +84 -0
  27. package/dist/src/integrations/google-adk.js.map +1 -0
  28. package/dist/src/integrations/index.d.ts +26 -0
  29. package/dist/src/integrations/index.d.ts.map +1 -0
  30. package/dist/src/integrations/index.js +25 -0
  31. package/dist/src/integrations/index.js.map +1 -0
  32. package/dist/src/integrations/langchain.d.ts +94 -0
  33. package/dist/src/integrations/langchain.d.ts.map +1 -0
  34. package/dist/src/integrations/langchain.js +129 -0
  35. package/dist/src/integrations/langchain.js.map +1 -0
  36. package/dist/src/integrations/langgraph.d.ts +79 -0
  37. package/dist/src/integrations/langgraph.d.ts.map +1 -0
  38. package/dist/src/integrations/langgraph.js +114 -0
  39. package/dist/src/integrations/langgraph.js.map +1 -0
  40. package/dist/src/integrations/mastra.d.ts +75 -0
  41. package/dist/src/integrations/mastra.d.ts.map +1 -0
  42. package/dist/src/integrations/mastra.js +109 -0
  43. package/dist/src/integrations/mastra.js.map +1 -0
  44. package/dist/src/integrations/openai-agents.d.ts +61 -0
  45. package/dist/src/integrations/openai-agents.d.ts.map +1 -0
  46. package/dist/src/integrations/openai-agents.js +127 -0
  47. package/dist/src/integrations/openai-agents.js.map +1 -0
  48. package/dist/src/integrations/specs.d.ts +173 -0
  49. package/dist/src/integrations/specs.d.ts.map +1 -0
  50. package/dist/src/integrations/specs.js +217 -0
  51. package/dist/src/integrations/specs.js.map +1 -0
  52. package/dist/src/integrations/vercel-ai.d.ts +74 -0
  53. package/dist/src/integrations/vercel-ai.d.ts.map +1 -0
  54. package/dist/src/integrations/vercel-ai.js +102 -0
  55. package/dist/src/integrations/vercel-ai.js.map +1 -0
  56. package/dist/src/integrations/zod-shapes.d.ts +19 -0
  57. package/dist/src/integrations/zod-shapes.d.ts.map +1 -0
  58. package/dist/src/integrations/zod-shapes.js +44 -0
  59. package/dist/src/integrations/zod-shapes.js.map +1 -0
  60. package/dist/src/models.d.ts +274 -0
  61. package/dist/src/models.d.ts.map +1 -0
  62. package/dist/src/models.js +383 -0
  63. package/dist/src/models.js.map +1 -0
  64. package/dist/src/platform.d.ts +176 -0
  65. package/dist/src/platform.d.ts.map +1 -0
  66. package/dist/src/platform.js +286 -0
  67. package/dist/src/platform.js.map +1 -0
  68. package/dist/src/url-builder.d.ts +65 -0
  69. package/dist/src/url-builder.d.ts.map +1 -0
  70. package/dist/src/url-builder.js +167 -0
  71. package/dist/src/url-builder.js.map +1 -0
  72. package/examples/approval-gate.ts +35 -0
  73. package/examples/basic-alert.ts +53 -0
  74. package/examples/claude-agent-sdk.ts +23 -0
  75. package/examples/deep-agents.ts +31 -0
  76. package/examples/google-adk.ts +39 -0
  77. package/examples/langchain-agent.ts +65 -0
  78. package/examples/langgraph-hitl.ts +70 -0
  79. package/examples/mastra.ts +41 -0
  80. package/examples/openai-agents.ts +33 -0
  81. package/examples/vercel-ai-agent.ts +34 -0
  82. package/examples/webhook-urls.ts +44 -0
  83. package/package.json +135 -4
  84. package/src/client.ts +324 -0
  85. package/src/exceptions.ts +229 -0
  86. package/src/http.ts +174 -0
  87. package/src/index.ts +91 -0
  88. package/src/integrations/claude-agent-sdk.ts +158 -0
  89. package/src/integrations/google-adk.ts +122 -0
  90. package/src/integrations/index.ts +27 -0
  91. package/src/integrations/langchain.ts +207 -0
  92. package/src/integrations/langgraph.ts +142 -0
  93. package/src/integrations/mastra.ts +178 -0
  94. package/src/integrations/openai-agents.ts +173 -0
  95. package/src/integrations/specs.ts +328 -0
  96. package/src/integrations/vercel-ai.ts +151 -0
  97. package/src/integrations/zod-shapes.ts +55 -0
  98. package/src/models.ts +660 -0
  99. package/src/platform.ts +343 -0
  100. package/src/url-builder.ts +225 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A Deep Agent that can plan and research on its own, but rings a phone before
3
+ * it writes files or runs shell commands.
4
+ *
5
+ * M91_SEND_LINK=... ANTHROPIC_API_KEY=... npx tsx examples/deep-agents.ts
6
+ */
7
+
8
+ import { MemorySaver } from '@langchain/langgraph';
9
+ import { createDeepAgent } from 'deepagents';
10
+
11
+ import { M91Client } from '@msg91comm/m91';
12
+ import { invokeWithM91Approvals } from '@msg91comm/m91/integrations/langchain';
13
+
14
+ const client = new M91Client(process.env.M91_SEND_LINK!);
15
+
16
+ const agent = createDeepAgent({
17
+ model: 'anthropic:claude-sonnet-4-5',
18
+ systemPrompt: 'You are a release engineer.',
19
+ // These tools pause the run; invokeWithM91Approvals rings a phone for each.
20
+ interruptOn: { write_file: true, edit_file: true, execute: true },
21
+ checkpointer: new MemorySaver(),
22
+ });
23
+
24
+ const result = await invokeWithM91Approvals(
25
+ agent,
26
+ { messages: [{ role: 'user', content: 'Write the release notes for v2.4 to RELEASE.md.' }] },
27
+ { configurable: { thread_id: 'release-v2.4' } },
28
+ client,
29
+ { timeoutSeconds: 600 },
30
+ );
31
+ console.log(result.messages.at(-1)?.content);
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A Google ADK agent whose refunds ring a phone before they run.
3
+ *
4
+ * M91_SEND_LINK=... GOOGLE_GENAI_API_KEY=... npx tsx examples/google-adk.ts
5
+ */
6
+
7
+ import { FunctionTool, InMemoryRunner, LlmAgent } from '@google/adk';
8
+ import { z } from 'zod';
9
+
10
+ import { M91Client } from '@msg91comm/m91';
11
+ import { createM91BeforeToolCallback } from '@msg91comm/m91/integrations/google-adk';
12
+
13
+ const client = new M91Client(process.env.M91_SEND_LINK!);
14
+
15
+ const issueRefund = new FunctionTool({
16
+ name: 'issue_refund',
17
+ description: 'Refund an order to the original payment method.',
18
+ parameters: z.object({ orderId: z.string(), amountInr: z.number() }),
19
+ execute: async ({ orderId, amountInr }) => ({ status: 'refunded', orderId, amountInr }),
20
+ });
21
+
22
+ const agent = new LlmAgent({
23
+ name: 'support_agent',
24
+ model: 'gemini-2.5-flash',
25
+ instruction: 'Resolve refund requests. If a refund is rejected, tell the customer why.',
26
+ tools: [issueRefund],
27
+ beforeToolCallback: createM91BeforeToolCallback(client, { tools: ['issue_refund'] }),
28
+ });
29
+
30
+ const runner = new InMemoryRunner({ agent, appName: 'm91-example' });
31
+ const session = await runner.sessionService.createSession({ appName: 'm91-example', userId: 'u1' });
32
+ for await (const event of runner.runAsync({
33
+ userId: 'u1',
34
+ sessionId: session.id,
35
+ newMessage: { role: 'user', parts: [{ text: 'Order ORD-40122 never arrived. Refund 4,800 INR.' }] },
36
+ })) {
37
+ const text = event.content?.parts?.map((p) => p.text ?? '').join('');
38
+ if (text) console.log(text);
39
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * A LangChain agent that has to ask before it spends money.
3
+ *
4
+ * The interesting part is not the wiring — it is the system prompt. A tool the
5
+ * model *can* call is not a tool the model *will* call, and "ask a human before
6
+ * anything irreversible" has to be stated as a rule with a list, not implied.
7
+ */
8
+
9
+ import { ChatAnthropic } from '@langchain/anthropic';
10
+ import { createReactAgent } from '@langchain/langgraph/prebuilt';
11
+
12
+ import { M91Client } from '@msg91comm/m91';
13
+ import { createM91AlertTool, createM91ApprovalTool } from '@msg91comm/m91/integrations/langchain';
14
+
15
+ const client = new M91Client(process.env.M91_SEND_LINK!);
16
+
17
+ const tools = [
18
+ await createM91ApprovalTool(client), // blocks until a human answers
19
+ await createM91AlertTool(client), // wakes somebody and carries on
20
+ // ...your own tools: issueRefund, deploy, deleteAccount, and so on.
21
+ ];
22
+
23
+ const SYSTEM = `You are an operations agent with access to production systems.
24
+
25
+ Before ANY of the following, you must call m91_request_approval and wait for the
26
+ answer:
27
+ - moving money: refunds, payouts, charges, credits
28
+ - deleting or overwriting anything a customer owns
29
+ - deploying, rolling back, or changing production configuration
30
+ - sending a message to a customer on the company's behalf
31
+
32
+ Rules for that call:
33
+ - \`title\` is what somebody reads on a lock screen at 3am. Name the action and
34
+ the amount or the target: "Refund 48,000 on ORD-40122?" — not "approve action".
35
+ - \`description\` is everything they need to answer without asking you anything.
36
+ - \`customId\` is derived from the thing being decided — the order id, the
37
+ commit sha, the account id. Never a timestamp, never a UUID: it is what
38
+ stops a retry raising a second alert, and what closes the alert afterwards.
39
+ - The result is "approved" or "rejected". If it is not exactly "approved",
40
+ do not do the thing. Say what you were going to do and stop.
41
+
42
+ Use m91_send_alert, which does not wait, when something has already gone wrong
43
+ and a human needs to know now — a failed job, a breach, a stuck queue. Do not
44
+ use it for anything that could wait until morning: it wakes people up.`;
45
+
46
+ const agent = createReactAgent({
47
+ llm: new ChatAnthropic({ model: 'claude-sonnet-5' }),
48
+ tools,
49
+ prompt: SYSTEM,
50
+ });
51
+
52
+ // The agent pauses here — a phone rings, somebody taps Approve or Reject, and
53
+ // the run continues with their answer in the transcript.
54
+ const result = await agent.invoke({
55
+ messages: [
56
+ {
57
+ role: 'user',
58
+ content:
59
+ 'Customer on order ORD-40122 says their item never arrived. ' +
60
+ 'Look into it and refund them if it checks out.',
61
+ },
62
+ ],
63
+ });
64
+
65
+ console.log(result.messages.at(-1)?.content);
@@ -0,0 +1,70 @@
1
+ /**
2
+ * LangGraph's `interrupt()` pattern, with M91 filling the gap.
3
+ *
4
+ * LangGraph knows how to stop a graph and resume it. What it has no opinion
5
+ * about is how the human finds out it stopped — and the default answer is that
6
+ * somebody notices a paused run in a web UI. At 2am, for a graph that paused
7
+ * because it wants to move money, nobody does.
8
+ *
9
+ * M91 is the part between the pause and the resume.
10
+ */
11
+
12
+ import { Annotation, Command, END, MemorySaver, START, StateGraph, interrupt } from '@langchain/langgraph';
13
+
14
+ import { M91Client } from '@msg91comm/m91';
15
+ import { M91InterruptNotifier } from '@msg91comm/m91/integrations/langgraph';
16
+
17
+ const client = new M91Client(process.env.M91_SEND_LINK!);
18
+ const notifier = new M91InterruptNotifier(client, { severity: 'HIGH', timeoutMs: 600_000 });
19
+
20
+ const State = Annotation.Root({
21
+ id: Annotation<string>,
22
+ amount: Annotation<number>,
23
+ result: Annotation<string>,
24
+ });
25
+
26
+ const builder = new StateGraph(State)
27
+ .addNode('riskyAction', (state) => {
28
+ if (state.amount > 10_000) {
29
+ // The graph stops here and hands the payload out to the orchestrator.
30
+ const decision = interrupt({
31
+ question: `Approve payment of ₹${state.amount.toLocaleString()} on order ${state.id}?`,
32
+ customId: `payment-${state.id}`,
33
+ });
34
+ if (decision !== 'approved') return { result: 'payment_rejected' };
35
+ }
36
+ // await executePayment(state);
37
+ return { result: 'payment_completed' };
38
+ })
39
+ .addEdge(START, 'riskyAction')
40
+ .addEdge('riskyAction', END);
41
+
42
+ const graph = builder.compile({ checkpointer: new MemorySaver() });
43
+ const config = { configurable: { thread_id: 'order-40122' } };
44
+
45
+ let result = await graph.invoke({ id: 'ORD-40122', amount: 48_000 }, config);
46
+
47
+ if (result.__interrupt__) {
48
+ const data = result.__interrupt__[0].value as { question: string; customId: string };
49
+
50
+ // A phone rings at full volume, through Do Not Disturb, until somebody
51
+ // answers — and gets a voice call if 45 seconds pass in silence.
52
+ const decision = await notifier.notify({
53
+ title: data.question,
54
+ customId: data.customId, // the graph chose it, and it is stable
55
+ });
56
+
57
+ result = await graph.invoke(new Command({ resume: decision }), config);
58
+ }
59
+
60
+ console.log(result.result);
61
+
62
+ // The same thing as a node, when you would rather the graph own it:
63
+ //
64
+ // import { createM91ApprovalNode } from '@msg91comm/m91/integrations/langgraph';
65
+ // builder.addNode('approveRefund', createM91ApprovalNode(client, {
66
+ // approveLabel: 'Process Refund', rejectLabel: 'Hold Refund', timeoutMs: 600_000,
67
+ // }));
68
+ //
69
+ // It reads `title`/`question` and `customId` from state, and writes
70
+ // { decision, approved } back for the next edge to branch on.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * A Mastra agent whose refunds need a person's approval, by phone.
3
+ *
4
+ * M91_SEND_LINK=... OPENAI_API_KEY=... npx tsx examples/mastra.ts
5
+ */
6
+
7
+ import { Mastra } from '@mastra/core';
8
+ import { Agent } from '@mastra/core/agent';
9
+ import { createTool } from '@mastra/core/tools';
10
+ import { z } from 'zod';
11
+
12
+ import { M91Client } from '@msg91comm/m91';
13
+ import { generateWithM91Approvals } from '@msg91comm/m91/integrations/mastra';
14
+
15
+ const client = new M91Client(process.env.M91_SEND_LINK!);
16
+
17
+ const issueRefund = createTool({
18
+ id: 'issue-refund',
19
+ description: 'Refund an order to the original payment method.',
20
+ inputSchema: z.object({ orderId: z.string(), amountInr: z.number() }),
21
+ requireApproval: true,
22
+ execute: async ({ orderId, amountInr }) => ({ status: 'refunded', orderId, amountInr }),
23
+ });
24
+
25
+ const support = new Agent({
26
+ id: 'support',
27
+ name: 'Support',
28
+ instructions: 'Resolve refund requests. If a refund is declined, tell the customer why.',
29
+ model: 'openai/gpt-5-mini',
30
+ tools: { issueRefund },
31
+ });
32
+
33
+ // Suspended runs live in Mastra's storage: add a storage provider here in production.
34
+ const mastra = new Mastra({ agents: { support } });
35
+
36
+ const output = await generateWithM91Approvals(
37
+ mastra.getAgent('support'),
38
+ 'Order ORD-40122 never arrived. Refund 4,800 INR.',
39
+ client,
40
+ );
41
+ console.log(output.text);
@@ -0,0 +1,33 @@
1
+ /**
2
+ * An OpenAI Agents SDK agent whose refunds need a person's approval, by phone.
3
+ *
4
+ * M91_SEND_LINK=... OPENAI_API_KEY=... npx tsx examples/openai-agents.ts
5
+ */
6
+
7
+ import { Agent, tool } from '@openai/agents';
8
+ import { z } from 'zod';
9
+
10
+ import { M91Client } from '@msg91comm/m91';
11
+ import { runWithM91Approvals } from '@msg91comm/m91/integrations/openai-agents';
12
+
13
+ const client = new M91Client(process.env.M91_SEND_LINK!);
14
+
15
+ const issueRefund = tool({
16
+ name: 'issue_refund',
17
+ description: 'Refund an order to the original payment method.',
18
+ parameters: z.object({ orderId: z.string(), amountInr: z.number() }),
19
+ // The SDK pauses here; runWithM91Approvals rings a phone and resumes.
20
+ needsApproval: true,
21
+ execute: async ({ orderId, amountInr }) => `Refunded ${amountInr} INR on ${orderId}.`,
22
+ });
23
+
24
+ const agent = new Agent({
25
+ name: 'Support',
26
+ instructions: 'Resolve refund requests. If a refund is not approved, tell the customer why.',
27
+ tools: [issueRefund],
28
+ });
29
+
30
+ const result = await runWithM91Approvals(agent, 'Order ORD-40122 never arrived. Refund 4,800 INR.', client, {
31
+ timeoutSeconds: 600,
32
+ });
33
+ console.log(result.finalOutput);
@@ -0,0 +1,34 @@
1
+ /**
2
+ * An agent on the Vercel AI SDK that asks before it deletes anything.
3
+ */
4
+
5
+ import { openai } from '@ai-sdk/openai';
6
+ import { generateText, stepCountIs } from 'ai';
7
+
8
+ import { M91Client } from '@msg91comm/m91';
9
+ import { createM91AlertTool, createM91ApprovalTool } from '@msg91comm/m91/integrations/vercel-ai';
10
+
11
+ const client = new M91Client(process.env.M91_SEND_LINK!);
12
+
13
+ const { text } = await generateText({
14
+ model: openai('gpt-4o'),
15
+ system:
16
+ 'You are an operations agent. Before anything irreversible — deleting customer ' +
17
+ 'data, moving money, deploying to production — you must call m91_request_approval ' +
18
+ 'and wait. Give it a title naming the action and its target, a description with ' +
19
+ 'everything the person needs to decide, and a customId derived from what is being ' +
20
+ 'decided (never a timestamp). Proceed only on exactly "approved". ' +
21
+ 'Use m91_send_alert, which does not wait, to report something that has already ' +
22
+ 'gone wrong and needs somebody now.',
23
+ tools: {
24
+ m91_request_approval: await createM91ApprovalTool(client),
25
+ m91_send_alert: await createM91AlertTool(client),
26
+ // ...your own tools
27
+ },
28
+ stopWhen: stepCountIs(10),
29
+ prompt:
30
+ 'Account acct_8821 has asked to be deleted under GDPR. Verify the request and, ' +
31
+ 'if it is valid, delete the account.',
32
+ });
33
+
34
+ console.log(text);
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Alert URLs for tools whose only integration field is "URL to call".
3
+ *
4
+ * Grafana, Sentry, UptimeRobot, Zapier, a GitHub Action, a cron `curl`, an iOS
5
+ * Shortcut, a browser bookmark, an `<img>` tag in a status page. No client, no
6
+ * headers, no code — which is the point: this is the difference between M91
7
+ * being wired into something this afternoon and being wired in never.
8
+ */
9
+
10
+ import { M91URLBuilder } from '@msg91comm/m91';
11
+
12
+ const builder = new M91URLBuilder(process.env.M91_SEND_LINK!);
13
+
14
+ // Paste this into Grafana's webhook URL field.
15
+ console.log(
16
+ builder.build('CPU above 95% on prod-server-3', {
17
+ severity: 'HIGH',
18
+ customId: 'cpu-high-prod3',
19
+ // First label is SHARED — one person takes it on and it clears for the rest.
20
+ // The others are PERSONAL: an acknowledgement that leaves it looking for an owner.
21
+ respond: ['On it', 'Escalate'],
22
+ }),
23
+ );
24
+
25
+ // The bare link. Opening it RAISES NOTHING and answers with the channel's name,
26
+ // so whoever is pasting it can see they picked the right team. That is also why
27
+ // a link preview, a crawler or a mail scanner touching the URL wakes nobody.
28
+ console.log(builder.testUrl());
29
+
30
+ // A batch, for generating a dashboard's worth at once.
31
+ for (const url of builder.buildMany([
32
+ { title: 'Disk above 90% on prod-3', customId: 'disk-high-prod3', severity: 'MEDIUM' },
33
+ { title: 'Certificate expires in 48 hours', customId: 'cert-expiry', severity: 'LOW' },
34
+ { title: 'Payment gateway unreachable', customId: 'gateway-down', severity: 'CRITICAL' },
35
+ ])) {
36
+ console.log(url);
37
+ }
38
+
39
+ // In a crontab, where there is no Node at all:
40
+ //
41
+ // 0 9 * * * curl -fsS "https://m91-api.msg91.com/s/TOKEN?title=Daily+backup+did+not+run&severity=HIGH"
42
+ //
43
+ // The URL contains the token, so it is a credential. Keep it out of anything
44
+ // public, and out of anything that ends up in a screenshot.
package/package.json CHANGED
@@ -1,6 +1,137 @@
1
1
  {
2
2
  "name": "@msg91comm/m91",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.2.0",
4
+ "description": "Critical alerting and human-in-the-loop approval for AI agents and on-call systems",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "MSG91",
8
+ "keywords": [
9
+ "alerting",
10
+ "on-call",
11
+ "paging",
12
+ "human-in-the-loop",
13
+ "agent",
14
+ "approval",
15
+ "escalation",
16
+ "langchain",
17
+ "langgraph",
18
+ "langchainjs",
19
+ "vercel-ai",
20
+ "ai-sdk",
21
+ "openai-agents",
22
+ "claude-agent-sdk",
23
+ "google-adk",
24
+ "mastra",
25
+ "tool-approval"
26
+ ],
27
+ "homepage": "https://m91-api.msg91.com/docs",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/MSG91/m91-sdk.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/MSG91/m91-sdk/issues"
34
+ },
35
+ "main": "./dist/src/index.js",
36
+ "types": "./dist/src/index.d.ts",
37
+ "exports": {
38
+ "./package.json": "./package.json",
39
+ ".": {
40
+ "types": "./dist/src/index.d.ts",
41
+ "default": "./dist/src/index.js"
42
+ },
43
+ "./integrations/langchain": {
44
+ "types": "./dist/src/integrations/langchain.d.ts",
45
+ "default": "./dist/src/integrations/langchain.js"
46
+ },
47
+ "./integrations/langgraph": {
48
+ "types": "./dist/src/integrations/langgraph.d.ts",
49
+ "default": "./dist/src/integrations/langgraph.js"
50
+ },
51
+ "./integrations/vercel-ai": {
52
+ "types": "./dist/src/integrations/vercel-ai.d.ts",
53
+ "default": "./dist/src/integrations/vercel-ai.js"
54
+ },
55
+ "./integrations/openai-agents": {
56
+ "types": "./dist/src/integrations/openai-agents.d.ts",
57
+ "default": "./dist/src/integrations/openai-agents.js"
58
+ },
59
+ "./integrations/claude-agent-sdk": {
60
+ "types": "./dist/src/integrations/claude-agent-sdk.d.ts",
61
+ "default": "./dist/src/integrations/claude-agent-sdk.js"
62
+ },
63
+ "./integrations/google-adk": {
64
+ "types": "./dist/src/integrations/google-adk.d.ts",
65
+ "default": "./dist/src/integrations/google-adk.js"
66
+ },
67
+ "./integrations/mastra": {
68
+ "types": "./dist/src/integrations/mastra.d.ts",
69
+ "default": "./dist/src/integrations/mastra.js"
70
+ }
71
+ },
72
+ "files": [
73
+ "dist/src",
74
+ "src",
75
+ "examples",
76
+ "README.md",
77
+ "CHANGELOG.md",
78
+ "LICENSE"
79
+ ],
80
+ "engines": {
81
+ "node": ">=18.0.0"
82
+ },
83
+ "scripts": {
84
+ "build": "tsc",
85
+ "test": "tsc && node --test dist/tests/*.test.js",
86
+ "prepublishOnly": "npm run build"
87
+ },
88
+ "devDependencies": {
89
+ "@anthropic-ai/claude-agent-sdk": "^0.3.308",
90
+ "@google/adk": "^2.3.0",
91
+ "@langchain/core": "^1.2.20",
92
+ "@mastra/core": "^1.79.0",
93
+ "@openai/agents": "^0.21.0",
94
+ "@types/node": "^22.0.0",
95
+ "ai": "^7.0.148",
96
+ "deepagents": "^1.15.1",
97
+ "langchain": "^1.5.18",
98
+ "typescript": "^5.4.0",
99
+ "zod": "^4.6.7"
100
+ },
101
+ "peerDependencies": {
102
+ "@anthropic-ai/claude-agent-sdk": ">=0.3.0",
103
+ "@google/adk": ">=2.3.0",
104
+ "@langchain/core": ">=0.2.0",
105
+ "@langchain/langgraph": ">=0.2.0",
106
+ "@mastra/core": ">=1.79.0",
107
+ "@openai/agents": ">=0.21.0",
108
+ "ai": ">=5.0.0",
109
+ "zod": ">=3.0.0"
110
+ },
111
+ "peerDependenciesMeta": {
112
+ "@anthropic-ai/claude-agent-sdk": {
113
+ "optional": true
114
+ },
115
+ "@google/adk": {
116
+ "optional": true
117
+ },
118
+ "@langchain/core": {
119
+ "optional": true
120
+ },
121
+ "@langchain/langgraph": {
122
+ "optional": true
123
+ },
124
+ "@mastra/core": {
125
+ "optional": true
126
+ },
127
+ "@openai/agents": {
128
+ "optional": true
129
+ },
130
+ "ai": {
131
+ "optional": true
132
+ },
133
+ "zod": {
134
+ "optional": true
135
+ }
136
+ }
137
+ }