@armoriq/sdk-dev 0.2.13 → 0.2.15

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 (70) hide show
  1. package/README.md +3 -3
  2. package/dist/_build_env.d.ts +26 -0
  3. package/dist/_build_env.d.ts.map +1 -0
  4. package/dist/_build_env.js +59 -0
  5. package/dist/_build_env.js.map +1 -0
  6. package/dist/client.d.ts +0 -13
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +65 -30
  9. package/dist/client.js.map +1 -1
  10. package/dist/credentials.d.ts.map +1 -0
  11. package/dist/credentials.js.map +1 -0
  12. package/dist/exceptions.d.ts +4 -2
  13. package/dist/exceptions.d.ts.map +1 -1
  14. package/dist/exceptions.js +6 -2
  15. package/dist/exceptions.js.map +1 -1
  16. package/dist/models.d.ts +0 -2
  17. package/dist/models.d.ts.map +1 -1
  18. package/package.json +2 -7
  19. package/dist/cli/commands/login.d.ts +0 -4
  20. package/dist/cli/commands/login.d.ts.map +0 -1
  21. package/dist/cli/commands/login.js +0 -221
  22. package/dist/cli/commands/login.js.map +0 -1
  23. package/dist/cli/commands/logout.d.ts +0 -2
  24. package/dist/cli/commands/logout.d.ts.map +0 -1
  25. package/dist/cli/commands/logout.js +0 -14
  26. package/dist/cli/commands/logout.js.map +0 -1
  27. package/dist/cli/commands/whoami.d.ts +0 -2
  28. package/dist/cli/commands/whoami.d.ts.map +0 -1
  29. package/dist/cli/commands/whoami.js +0 -22
  30. package/dist/cli/commands/whoami.js.map +0 -1
  31. package/dist/cli/credentials.d.ts.map +0 -1
  32. package/dist/cli/credentials.js.map +0 -1
  33. package/dist/cli/index.d.ts +0 -3
  34. package/dist/cli/index.d.ts.map +0 -1
  35. package/dist/cli/index.js +0 -33
  36. package/dist/cli/index.js.map +0 -1
  37. package/dist/integrations/anthropic.d.ts +0 -18
  38. package/dist/integrations/anthropic.d.ts.map +0 -1
  39. package/dist/integrations/anthropic.js +0 -27
  40. package/dist/integrations/anthropic.js.map +0 -1
  41. package/dist/integrations/crewai.d.ts +0 -68
  42. package/dist/integrations/crewai.d.ts.map +0 -1
  43. package/dist/integrations/crewai.js +0 -178
  44. package/dist/integrations/crewai.js.map +0 -1
  45. package/dist/integrations/google-adk.d.ts +0 -72
  46. package/dist/integrations/google-adk.d.ts.map +0 -1
  47. package/dist/integrations/google-adk.js +0 -260
  48. package/dist/integrations/google-adk.js.map +0 -1
  49. package/dist/integrations/index.d.ts +0 -29
  50. package/dist/integrations/index.d.ts.map +0 -1
  51. package/dist/integrations/index.js +0 -37
  52. package/dist/integrations/index.js.map +0 -1
  53. package/dist/integrations/langchain.d.ts +0 -20
  54. package/dist/integrations/langchain.d.ts.map +0 -1
  55. package/dist/integrations/langchain.js +0 -28
  56. package/dist/integrations/langchain.js.map +0 -1
  57. package/dist/integrations/openai.d.ts +0 -19
  58. package/dist/integrations/openai.d.ts.map +0 -1
  59. package/dist/integrations/openai.js +0 -28
  60. package/dist/integrations/openai.js.map +0 -1
  61. package/dist/plan-builder.d.ts +0 -36
  62. package/dist/plan-builder.d.ts.map +0 -1
  63. package/dist/plan-builder.js +0 -98
  64. package/dist/plan-builder.js.map +0 -1
  65. package/dist/session.d.ts +0 -152
  66. package/dist/session.d.ts.map +0 -1
  67. package/dist/session.js +0 -547
  68. package/dist/session.js.map +0 -1
  69. /package/dist/{cli/credentials.d.ts → credentials.d.ts} +0 -0
  70. /package/dist/{cli/credentials.js → credentials.js} +0 -0
@@ -1,178 +0,0 @@
1
- "use strict";
2
- /**
3
- * ArmorIQ — CrewAI integration.
4
- *
5
- * Port of armoriq_sdk.integrations.crewai (Python). CrewAI is
6
- * primarily a Python framework; this TS integration works against the
7
- * experimental `@crewaijs/crewai` npm port.
8
- *
9
- * Pattern (same as Python):
10
- * 1. Collect every tool from the crew's agents that exposes `.mcp`
11
- * and `.action` properties (these are the Armoriq-bound tools).
12
- * 2. Build a plan and mint an intent token via ArmorIQSession.
13
- * 3. Patch each tool's `_run` (or `invoke`) to route through the
14
- * Armoriq proxy via `session.dispatch`.
15
- * 4. Restore the originals after kickoff.
16
- *
17
- * Usage:
18
- *
19
- * import { ArmorIQCrew } from '@armoriq/sdk-dev/integrations/crewai';
20
- *
21
- * const crew = new ArmorIQCrew({
22
- * agents: [...], tasks: [...],
23
- * armoriqClient: client,
24
- * llm: 'gpt-4o',
25
- * });
26
- * const result = await crew.kickoff();
27
- *
28
- * If `crewai` (the JS port) is not installed, instantiation throws
29
- * with install instructions — matching the Python behavior.
30
- */
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.ArmorIQCrew = void 0;
33
- function tryRequireCrewai() {
34
- try {
35
- // eslint-disable-next-line @typescript-eslint/no-var-requires
36
- return require('crewai');
37
- }
38
- catch {
39
- try {
40
- // eslint-disable-next-line @typescript-eslint/no-var-requires
41
- return require('@crewaijs/crewai');
42
- }
43
- catch (err) {
44
- throw new Error('crewai is not installed.\n' +
45
- 'Install a CrewAI JS port: npm install crewai (or @crewaijs/crewai).\n' +
46
- `Underlying error: ${err?.message ?? err}`);
47
- }
48
- }
49
- }
50
- function collectArmoriqTools(agents) {
51
- const seen = new Set();
52
- const tools = [];
53
- for (const agent of agents) {
54
- for (const tool of agent?.tools ?? []) {
55
- if (tool && typeof tool.mcp === 'string' && typeof tool.action === 'string') {
56
- if (!seen.has(tool)) {
57
- seen.add(tool);
58
- tools.push(tool);
59
- }
60
- }
61
- }
62
- }
63
- return tools;
64
- }
65
- function buildToolCalls(tools) {
66
- const seen = new Set();
67
- const out = [];
68
- for (const t of tools) {
69
- const key = `${t.mcp}__${t.action}`;
70
- if (!seen.has(key)) {
71
- seen.add(key);
72
- out.push({ name: key, args: {} });
73
- }
74
- }
75
- return out;
76
- }
77
- function deriveGoal(tasks) {
78
- const parts = [];
79
- for (const t of tasks) {
80
- const d = t.description ?? t.expected_output;
81
- if (d)
82
- parts.push(d);
83
- }
84
- return parts.length ? parts.join(' ') : 'Execute crew tasks';
85
- }
86
- class ArmorIQCrew {
87
- crew;
88
- armoriqClient;
89
- llm;
90
- validitySeconds;
91
- agents;
92
- tasks;
93
- session = null;
94
- constructor(options) {
95
- const crewai = tryRequireCrewai();
96
- const Crew = crewai.Crew ?? crewai.default?.Crew;
97
- if (!Crew) {
98
- throw new Error('The installed crewai package does not export a Crew class.');
99
- }
100
- const { armoriqClient, llm, tokenValiditySeconds, agents, tasks, ...rest } = options;
101
- this.armoriqClient = armoriqClient;
102
- this.llm = llm ?? 'agent';
103
- this.validitySeconds = tokenValiditySeconds ?? 3600;
104
- this.agents = agents;
105
- this.tasks = tasks;
106
- this.crew = new Crew({ agents, tasks, ...rest });
107
- }
108
- async issueToken() {
109
- const tools = collectArmoriqTools(this.agents);
110
- if (tools.length === 0) {
111
- // eslint-disable-next-line no-console
112
- console.warn('[ArmorIQCrew] No ArmorIQ tools found; crew runs without ArmorIQ verification.');
113
- return null;
114
- }
115
- const toolCalls = buildToolCalls(tools);
116
- const session = this.armoriqClient.startSession({
117
- llm: this.llm,
118
- validitySeconds: this.validitySeconds,
119
- });
120
- await session.startPlan(toolCalls, { goal: deriveGoal(this.tasks) });
121
- return session;
122
- }
123
- patchTools(session) {
124
- const restorers = [];
125
- const patched = new Set();
126
- for (const agent of this.agents) {
127
- for (const tool of agent?.tools ?? []) {
128
- if (!patched.has(tool) &&
129
- typeof tool.mcp === 'string' &&
130
- typeof tool.action === 'string') {
131
- patched.add(tool);
132
- const original = tool._run ?? tool.invoke;
133
- const method = tool.invoke ? 'invoke' : '_run';
134
- // Use a typed route through Armoriq.
135
- const wrapped = async (...args) => {
136
- const params = (args[0] && typeof args[0] === 'object') ? args[0] : {};
137
- const result = await session.dispatch(`${tool.mcp}__${tool.action}`, params);
138
- return typeof result === 'string' ? result : JSON.stringify(result);
139
- };
140
- try {
141
- tool[method] = wrapped;
142
- }
143
- catch {
144
- Object.defineProperty(tool, method, { value: wrapped, writable: true });
145
- }
146
- restorers.push(() => {
147
- try {
148
- tool[method] = original;
149
- }
150
- catch {
151
- Object.defineProperty(tool, method, { value: original, writable: true });
152
- }
153
- });
154
- }
155
- }
156
- }
157
- return restorers;
158
- }
159
- async kickoff(inputs) {
160
- this.session = await this.issueToken();
161
- const restorers = this.session ? this.patchTools(this.session) : [];
162
- try {
163
- if (typeof this.crew.kickoff === 'function') {
164
- return await this.crew.kickoff(inputs);
165
- }
166
- throw new Error('The installed crewai Crew has no kickoff() method.');
167
- }
168
- finally {
169
- for (const r of restorers)
170
- r();
171
- }
172
- }
173
- get crewaiCrew() {
174
- return this.crew;
175
- }
176
- }
177
- exports.ArmorIQCrew = ArmorIQCrew;
178
- //# sourceMappingURL=crewai.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crewai.js","sourceRoot":"","sources":["../../src/integrations/crewai.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAkCH,SAAS,gBAAgB;IACvB,IAAI,CAAC;QACH,8DAA8D;QAC9D,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YACH,8DAA8D;YAC9D,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CACb,4BAA4B;gBAC1B,wEAAwE;gBACxE,qBAAqB,GAAG,EAAE,OAAO,IAAI,GAAG,EAAE,CAC7C,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAuB;IAClD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAO,CAAC;IAC5B,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;YACtC,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,GAAG,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AoD,CAAC,CAAC;QACxE,CAAC;gBAAS,CAAC;YACT,KAAK,MAAM,CAAC,IAAI,SAAS;gBAAE,CAAC,EAAE,CAAC;QACjC,CAAC;IACH,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAxGD,kCAwGC"}
@@ -1,72 +0,0 @@
1
- /**
2
- * ArmorIQ — Google ADK integration.
3
- *
4
- * Wraps the SDK as an ADK `BasePlugin`. Plugin instance is passed to
5
- * `Runner` (or `InMemoryRunner`) via `plugins: [...]`. End-user agent
6
- * code is unchanged from a plain ADK setup except for:
7
- * 1. one extra import
8
- * 2. one `new ArmorIQADK({ ... })` line
9
- * 3. passing it into the runner's `plugins` array
10
- * 4. pointing MCPToolset at the Armoriq proxy URL instead of stdio
11
- *
12
- * Usage:
13
- *
14
- * import { LlmAgent, MCPToolset, InMemoryRunner } from '@google/adk';
15
- * import { ArmorIQADK } from '@armoriq/sdk-dev/integrations/google-adk';
16
- *
17
- * const armoriq = new ArmorIQADK({ apiKey: API_KEY, proxyUrl: PROXY_URL });
18
- *
19
- * const agent = new LlmAgent({
20
- * model: 'gemini-2.5-flash',
21
- * name: 'stripe_agent',
22
- * instruction: 'You are a Stripe assistant.',
23
- * tools: [new MCPToolset({ ... `${PROXY_URL}/mcp/Stripe` ... })],
24
- * });
25
- *
26
- * const runner = new InMemoryRunner({ agent, plugins: [armoriq] });
27
- *
28
- * Requires: `npm install @google/adk` alongside `@armoriq/sdk`.
29
- * `@google/adk` is declared as an optional peer dep so users who don't
30
- * use ADK don't pay for it.
31
- */
32
- import { ArmorIQClient } from '../client';
33
- import { SessionMode } from '../session';
34
- import { McpCredentialMap } from '../models';
35
- import { ToolNameParser } from '../plan-builder';
36
- export interface ArmorIQADKOptions {
37
- /** Pass an existing ArmorIQClient, OR provide apiKey to construct one. */
38
- client?: ArmorIQClient;
39
- apiKey?: string;
40
- proxyUrl?: string;
41
- userId?: string;
42
- agentId?: string;
43
- /** Per-MCP runtime credentials; usually loaded from env automatically. */
44
- mcpCredentials?: McpCredentialMap;
45
- /** Used when ADK tool names aren't namespaced as `<MCP>__<action>`. */
46
- defaultMcpName?: string;
47
- /** Override the default `<MCP>__<action>` parser. */
48
- toolNameParser?: ToolNameParser;
49
- /** LLM identifier recorded on the captured plan (audit only). */
50
- llm?: string;
51
- /** Token validity in seconds (default 3600). */
52
- validitySeconds?: number;
53
- /** Plugin name for ADK's plugin registry (default 'armoriq'). */
54
- pluginName?: string;
55
- /**
56
- * Where the policy decision is evaluated.
57
- * - 'local' (default): SDK verifies the intent token + evaluates
58
- * policy in-process. NO proxy in the data path.
59
- * - 'proxy': SDK calls the proxy with enforce_only=true.
60
- */
61
- mode?: SessionMode;
62
- }
63
- /**
64
- * Public class. Constructed lazily so importing this module doesn't
65
- * trigger the @google/adk lookup until the user actually instantiates.
66
- *
67
- * Use:
68
- * const armoriq = new ArmorIQADK({ apiKey, proxyUrl });
69
- * const runner = new InMemoryRunner({ agent, plugins: [armoriq] });
70
- */
71
- export declare const ArmorIQADK: new (opts: ArmorIQADKOptions) => any;
72
- //# sourceMappingURL=google-adk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"google-adk.d.ts","sourceRoot":"","sources":["../../src/integrations/google-adk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAkB,WAAW,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAY,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAgCjD,MAAM,WAAW,iBAAiB;IAChC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAwND;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,IAAI,EAAE,iBAAiB,KAAK,GAQlD,CAAC"}
@@ -1,260 +0,0 @@
1
- "use strict";
2
- /**
3
- * ArmorIQ — Google ADK integration.
4
- *
5
- * Wraps the SDK as an ADK `BasePlugin`. Plugin instance is passed to
6
- * `Runner` (or `InMemoryRunner`) via `plugins: [...]`. End-user agent
7
- * code is unchanged from a plain ADK setup except for:
8
- * 1. one extra import
9
- * 2. one `new ArmorIQADK({ ... })` line
10
- * 3. passing it into the runner's `plugins` array
11
- * 4. pointing MCPToolset at the Armoriq proxy URL instead of stdio
12
- *
13
- * Usage:
14
- *
15
- * import { LlmAgent, MCPToolset, InMemoryRunner } from '@google/adk';
16
- * import { ArmorIQADK } from '@armoriq/sdk-dev/integrations/google-adk';
17
- *
18
- * const armoriq = new ArmorIQADK({ apiKey: API_KEY, proxyUrl: PROXY_URL });
19
- *
20
- * const agent = new LlmAgent({
21
- * model: 'gemini-2.5-flash',
22
- * name: 'stripe_agent',
23
- * instruction: 'You are a Stripe assistant.',
24
- * tools: [new MCPToolset({ ... `${PROXY_URL}/mcp/Stripe` ... })],
25
- * });
26
- *
27
- * const runner = new InMemoryRunner({ agent, plugins: [armoriq] });
28
- *
29
- * Requires: `npm install @google/adk` alongside `@armoriq/sdk`.
30
- * `@google/adk` is declared as an optional peer dep so users who don't
31
- * use ADK don't pay for it.
32
- */
33
- Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.ArmorIQADK = void 0;
35
- const client_1 = require("../client");
36
- let _BasePluginCache = null;
37
- function loadBasePlugin() {
38
- if (_BasePluginCache)
39
- return _BasePluginCache;
40
- try {
41
- // Try multiple resolution strategies. The SDK is a dependency of
42
- // the consumer, so `require('@google/adk')` from here resolves in
43
- // the SDK's own node_modules (where the package isn't installed).
44
- // We use createRequire from the consumer's working directory so the
45
- // lookup walks the consumer's node_modules tree instead.
46
- const { createRequire } = require('module');
47
- const consumerRequire = createRequire(process.cwd() + '/package.json');
48
- const adk = consumerRequire('@google/adk');
49
- _BasePluginCache = adk.BasePlugin;
50
- if (!_BasePluginCache) {
51
- throw new Error('@google/adk is installed but does not export BasePlugin.');
52
- }
53
- return _BasePluginCache;
54
- }
55
- catch (err) {
56
- throw new Error('ArmorIQADK requires @google/adk to be installed. ' +
57
- 'Install it: npm install @google/adk\n' +
58
- `Underlying error: ${err?.message ?? err}`);
59
- }
60
- }
61
- /**
62
- * Returns a class that extends ADK's `BasePlugin` at runtime, so the
63
- * SDK doesn't have to import @google/adk at module load.
64
- */
65
- function buildArmorIQADKClass() {
66
- const BasePlugin = loadBasePlugin();
67
- return class ArmorIQADKImpl extends BasePlugin {
68
- armoriqClient;
69
- // Keyed by invocationId (stable string) rather than object identity,
70
- // because ADK's afterModelCallback and beforeToolCallback receive
71
- // different Context object instances for the same invocation.
72
- sessions = new Map();
73
- opts;
74
- constructor(opts) {
75
- super(opts.pluginName ?? 'armoriq');
76
- this.opts = opts;
77
- this.armoriqClient =
78
- opts.client ??
79
- new client_1.ArmorIQClient({
80
- apiKey: opts.apiKey,
81
- proxyEndpoint: opts.proxyUrl,
82
- userId: opts.userId,
83
- agentId: opts.agentId,
84
- mcpCredentials: opts.mcpCredentials,
85
- });
86
- }
87
- /**
88
- * After the model returns: extract function calls, mint an intent
89
- * token, stash a session keyed off the callbackContext for the
90
- * matching beforeToolCallback to consume.
91
- */
92
- async afterModelCallback(params) {
93
- const { callbackContext, llmResponse } = params;
94
- const parts = llmResponse?.content?.parts ?? [];
95
- const toolCalls = parts
96
- .filter((p) => p && p.functionCall && p.functionCall.name)
97
- .map((p) => ({
98
- name: p.functionCall.name,
99
- args: p.functionCall.args ?? {},
100
- }));
101
- if (toolCalls.length === 0)
102
- return undefined;
103
- const session = this.armoriqClient.startSession({
104
- defaultMcpName: this.opts.defaultMcpName,
105
- toolNameParser: this.opts.toolNameParser,
106
- llm: this.opts.llm,
107
- validitySeconds: this.opts.validitySeconds,
108
- mode: this.opts.mode ?? 'local',
109
- });
110
- // ADK's userContent is a Content object ({role, parts}), not a string.
111
- const rawContent = callbackContext?.userContent ??
112
- callbackContext?.invocationContext?.userContent;
113
- let goal = 'agent task';
114
- if (typeof rawContent === 'string') {
115
- goal = rawContent;
116
- }
117
- else if (rawContent?.parts) {
118
- const texts = rawContent.parts
119
- .filter((p) => typeof p?.text === 'string')
120
- .map((p) => p.text);
121
- if (texts.length > 0)
122
- goal = texts.join(' ');
123
- }
124
- await session.startPlan(toolCalls, { goal });
125
- const invocationId = callbackContext?.invocationContext?.invocationId ??
126
- callbackContext?.invocationId ??
127
- 'default';
128
- this.sessions.set(invocationId, session);
129
- return undefined; // do not modify the LLM response
130
- }
131
- /**
132
- * Before each tool call: enforce policy. If blocked, return an
133
- * error object (short-circuits the tool). If allowed, return
134
- * undefined so ADK calls the MCP directly — the agent's own
135
- * MCPToolset handles the connection with its own credentials.
136
- */
137
- async beforeToolCallback(params) {
138
- const { tool, toolArgs, toolContext } = params;
139
- const invocationId = toolContext?.invocationContext?.invocationId ??
140
- toolContext?.invocationId ??
141
- 'default';
142
- const session = this.sessions.get(invocationId);
143
- if (!session)
144
- return undefined;
145
- const toolName = tool?.name ?? String(tool);
146
- // Pull user email if present (set by ADK runner for the request).
147
- const userEmail = toolContext?.userEmail ??
148
- toolContext?.invocationContext?.userEmail ??
149
- toolContext?.invocationContext?.userId;
150
- // session.check() picks local vs proxy based on session.mode and
151
- // handles the delegation flow on a 'hold' decision.
152
- const decision = await session.check(toolName, toolArgs ?? {}, { userEmail });
153
- if (!decision.allowed) {
154
- // Mark this tool call as blocked so afterToolCallback skips
155
- // its success-path audit and writes a 'failed' record instead.
156
- toolContext.__armoriq_blocked = decision;
157
- // Report the block to the audit log NOW (before short-circuit)
158
- // so AIGraph reflects the correct status.
159
- try {
160
- await session.report(toolName, toolArgs ?? {}, {
161
- blocked: true,
162
- reason: decision.reason,
163
- action: decision.action,
164
- delegationId: decision.delegationId,
165
- }, {
166
- status: 'failed',
167
- errorMessage: decision.reason || `Blocked by policy (${decision.action})`,
168
- });
169
- }
170
- catch {
171
- // never fail the request because audit failed
172
- }
173
- // Return a clear, structured message that the LLM can interpret
174
- // and surface to the user verbatim.
175
- const policy = decision.matchedPolicy ? ` (policy: ${decision.matchedPolicy})` : '';
176
- let userMessage;
177
- if (decision.action === 'hold' && decision.delegationId) {
178
- userMessage =
179
- `This action requires approval${policy}. ` +
180
- `An approval request has been sent (id: ${decision.delegationId}). ` +
181
- `Once approved, please re-run this request to proceed. ` +
182
- `Reason: ${decision.reason ?? 'policy-hold'}.`;
183
- }
184
- else if (decision.action === 'hold') {
185
- userMessage =
186
- `This action requires approval before it can run${policy}. ` +
187
- `Reason: ${decision.reason ?? 'policy-hold'}.`;
188
- }
189
- else {
190
- userMessage =
191
- `This action is not permitted by your organization's policy${policy}. ` +
192
- `Reason: ${decision.reason ?? 'policy-blocked'}.`;
193
- }
194
- return {
195
- error: userMessage,
196
- armoriq_enforcement: {
197
- blocked: true,
198
- action: decision.action,
199
- reason: decision.reason,
200
- matchedPolicy: decision.matchedPolicy,
201
- tool: toolName,
202
- delegationId: decision.delegationId,
203
- },
204
- };
205
- }
206
- // Store start time for duration tracking in afterToolCallback
207
- toolContext.__armoriq_start = Date.now();
208
- return undefined; // let ADK call the MCP directly
209
- }
210
- /**
211
- * After each tool call: report execution to audit log.
212
- * This fires AFTER the MCP returns its result — the agent called
213
- * the MCP directly, and now we record what happened.
214
- */
215
- async afterToolCallback(params) {
216
- const { tool, toolArgs, toolContext, result } = params;
217
- const invocationId = toolContext?.invocationContext?.invocationId ??
218
- toolContext?.invocationId ??
219
- 'default';
220
- const session = this.sessions.get(invocationId);
221
- if (!session)
222
- return undefined;
223
- // If beforeToolCallback already blocked this call, the audit was
224
- // written there. Don't double-audit.
225
- if (toolContext.__armoriq_blocked) {
226
- return undefined;
227
- }
228
- const toolName = tool?.name ?? String(tool);
229
- const startTime = toolContext.__armoriq_start;
230
- const durationMs = startTime ? Date.now() - startTime : undefined;
231
- const hasError = result?.error || result?.isError;
232
- await session.report(toolName, toolArgs ?? {}, result, {
233
- status: hasError ? 'failed' : 'success',
234
- errorMessage: hasError ? String(result.error || result.isError) : undefined,
235
- durationMs,
236
- });
237
- return undefined;
238
- }
239
- get armoriqSdk() {
240
- return this.armoriqClient;
241
- }
242
- };
243
- }
244
- let _CachedClass = null;
245
- /**
246
- * Public class. Constructed lazily so importing this module doesn't
247
- * trigger the @google/adk lookup until the user actually instantiates.
248
- *
249
- * Use:
250
- * const armoriq = new ArmorIQADK({ apiKey, proxyUrl });
251
- * const runner = new InMemoryRunner({ agent, plugins: [armoriq] });
252
- */
253
- exports.ArmorIQADK = new Proxy(function () { }, {
254
- construct(_target, args) {
255
- if (!_CachedClass)
256
- _CachedClass = buildArmorIQADKClass();
257
- return new _CachedClass(...args);
258
- },
259
- });
260
- //# sourceMappingURL=google-adk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"google-adk.js","sourceRoot":"","sources":["../../src/integrations/google-adk.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AAEH,sCAA0C;AAS1C,IAAI,gBAAgB,GAAmB,IAAI,CAAC;AAC5C,SAAS,cAAc;IACrB,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,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IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,SAAS,GAAI,WAAmB,CAAC,eAAe,CAAC;YACvD,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAElE,MAAM,QAAQ,GAAG,MAAM,EAAE,KAAK,IAAI,MAAM,EAAE,OAAO,CAAC;YAClD,MAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,EAAE;gBACrD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;gBACvC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;gBAC3E,UAAU;aACX,CAAC,CAAC;YAEH,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,UAAU;YACZ,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC;AAED,IAAI,YAAY,GAAmB,IAAI,CAAC;AAExC;;;;;;;GAOG;AACU,QAAA,UAAU,GAAyC,IAAI,KAAK,CACvE,cAAa,CAAQ,EACrB;IACE,SAAS,CAAC,OAAO,EAAE,IAAI;QACrB,IAAI,CAAC,YAAY;YAAE,YAAY,GAAG,oBAAoB,EAAE,CAAC;QACzD,OAAO,IAAI,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;CACF,CACK,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * ArmorIQ SDK — Framework integrations.
3
- *
4
- * Mirrors the shape of armoriq_sdk.integrations in the Python SDK.
5
- * Each integration is importable on its own subpath so consumers only
6
- * pay for the peer dep they actually use, e.g.:
7
- *
8
- * import { ArmorIQADK } from '@armoriq/sdk-dev/integrations/google-adk';
9
- * import { ArmorIQCrew } from '@armoriq/sdk-dev/integrations/crewai';
10
- * import { ArmorIQLangChain } from '@armoriq/sdk-dev/integrations/langchain';
11
- * import { ArmorIQOpenAI } from '@armoriq/sdk-dev/integrations/openai';
12
- * import { ArmorIQAnthropic } from '@armoriq/sdk-dev/integrations/anthropic';
13
- *
14
- * Availability:
15
- * google-adk → real (wraps ADK's BasePlugin)
16
- * crewai → real (port) (wraps CrewAI Crew.kickoff)
17
- * langchain → Coming Soon
18
- * openai → Coming Soon
19
- * anthropic → Coming Soon
20
- *
21
- * Vertex AI: no separate file — Vertex agents run under Google ADK, so
22
- * ArmorIQADK covers Vertex too.
23
- */
24
- export { ArmorIQADK, ArmorIQADKOptions } from './google-adk';
25
- export { ArmorIQCrew, ArmorIQCrewOptions } from './crewai';
26
- export { ArmorIQLangChain, ArmorIQLangChainOptions } from './langchain';
27
- export { ArmorIQOpenAI, ArmorIQOpenAIOptions } from './openai';
28
- export { ArmorIQAnthropic, ArmorIQAnthropicOptions } from './anthropic';
29
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /**
3
- * ArmorIQ SDK — Framework integrations.
4
- *
5
- * Mirrors the shape of armoriq_sdk.integrations in the Python SDK.
6
- * Each integration is importable on its own subpath so consumers only
7
- * pay for the peer dep they actually use, e.g.:
8
- *
9
- * import { ArmorIQADK } from '@armoriq/sdk-dev/integrations/google-adk';
10
- * import { ArmorIQCrew } from '@armoriq/sdk-dev/integrations/crewai';
11
- * import { ArmorIQLangChain } from '@armoriq/sdk-dev/integrations/langchain';
12
- * import { ArmorIQOpenAI } from '@armoriq/sdk-dev/integrations/openai';
13
- * import { ArmorIQAnthropic } from '@armoriq/sdk-dev/integrations/anthropic';
14
- *
15
- * Availability:
16
- * google-adk → real (wraps ADK's BasePlugin)
17
- * crewai → real (port) (wraps CrewAI Crew.kickoff)
18
- * langchain → Coming Soon
19
- * openai → Coming Soon
20
- * anthropic → Coming Soon
21
- *
22
- * Vertex AI: no separate file — Vertex agents run under Google ADK, so
23
- * ArmorIQADK covers Vertex too.
24
- */
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ArmorIQAnthropic = exports.ArmorIQOpenAI = exports.ArmorIQLangChain = exports.ArmorIQCrew = exports.ArmorIQADK = void 0;
27
- var google_adk_1 = require("./google-adk");
28
- Object.defineProperty(exports, "ArmorIQADK", { enumerable: true, get: function () { return google_adk_1.ArmorIQADK; } });
29
- var crewai_1 = require("./crewai");
30
- Object.defineProperty(exports, "ArmorIQCrew", { enumerable: true, get: function () { return crewai_1.ArmorIQCrew; } });
31
- var langchain_1 = require("./langchain");
32
- Object.defineProperty(exports, "ArmorIQLangChain", { enumerable: true, get: function () { return langchain_1.ArmorIQLangChain; } });
33
- var openai_1 = require("./openai");
34
- Object.defineProperty(exports, "ArmorIQOpenAI", { enumerable: true, get: function () { return openai_1.ArmorIQOpenAI; } });
35
- var anthropic_1 = require("./anthropic");
36
- Object.defineProperty(exports, "ArmorIQAnthropic", { enumerable: true, get: function () { return anthropic_1.ArmorIQAnthropic; } });
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAEH,2CAA6D;AAApD,wGAAA,UAAU,OAAA;AACnB,mCAA2D;AAAlD,qGAAA,WAAW,OAAA;AACpB,yCAAwE;AAA/D,6GAAA,gBAAgB,OAAA;AACzB,mCAA+D;AAAtD,uGAAA,aAAa,OAAA;AACtB,yCAAwE;AAA/D,6GAAA,gBAAgB,OAAA"}
@@ -1,20 +0,0 @@
1
- /**
2
- * ArmorIQ — LangChain integration. (Coming Soon)
3
- *
4
- * Planned surface mirrors the Python SDK's ArmorIQLangChain (currently
5
- * stubbed in Python too). When implemented, this will wrap LangChain.js
6
- * `StructuredTool` / `Tool` instances so their `invoke()` routes through
7
- * the Armoriq proxy via ArmorIQSession.
8
- *
9
- * Requires: `npm install @langchain/core langchain`
10
- */
11
- import { ArmorIQClient } from '../client';
12
- export interface ArmorIQLangChainOptions {
13
- armoriqClient: ArmorIQClient;
14
- llm?: string;
15
- [key: string]: any;
16
- }
17
- export declare class ArmorIQLangChain {
18
- constructor(_options: ArmorIQLangChainOptions);
19
- }
20
- //# sourceMappingURL=langchain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"langchain.d.ts","sourceRoot":"","sources":["../../src/integrations/langchain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,aAAa,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,qBAAa,gBAAgB;gBACf,QAAQ,EAAE,uBAAuB;CAY9C"}