@agent-assembly/sdk 0.0.1-alpha.9.1 → 0.0.1-beta.1

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,41 @@
1
+ "use strict";
2
+ /**
3
+ * Public re-exports for the per-framework governance patch hooks
4
+ * (AAASM-2922).
5
+ *
6
+ * These let consumers apply a single framework's governance hook manually,
7
+ * instead of relying on `initAssembly()` to patch every detected framework.
8
+ * Only the user-facing patch/unpatch/has surface and the option/module
9
+ * interfaces those functions take as parameters are re-exported here;
10
+ * internal helpers (wrappers, patch-state, capture/record utilities) stay
11
+ * private to their hook modules.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.hasOpenAIAgentsSDK = exports.unpatchOpenAIAgents = exports.patchOpenAIAgents = exports.patchLangChain = exports.hasMastra = exports.unpatchMastra = exports.patchMastra = exports.hasLangGraph = exports.unpatchLangGraph = exports.patchLangGraph = exports.hasVercelAiSdk = exports.unpatchVercelAiSdk = exports.patchVercelAiSdk = void 0;
15
+ // Vercel AI SDK
16
+ var ai_sdk_js_1 = require("./ai-sdk.js");
17
+ Object.defineProperty(exports, "patchVercelAiSdk", { enumerable: true, get: function () { return ai_sdk_js_1.patchVercelAiSdk; } });
18
+ Object.defineProperty(exports, "unpatchVercelAiSdk", { enumerable: true, get: function () { return ai_sdk_js_1.unpatchVercelAiSdk; } });
19
+ var ai_sdk_detection_js_1 = require("./ai-sdk-detection.js");
20
+ Object.defineProperty(exports, "hasVercelAiSdk", { enumerable: true, get: function () { return ai_sdk_detection_js_1.hasVercelAiSdk; } });
21
+ // LangGraph
22
+ var langgraph_js_1 = require("./langgraph.js");
23
+ Object.defineProperty(exports, "patchLangGraph", { enumerable: true, get: function () { return langgraph_js_1.patchLangGraph; } });
24
+ Object.defineProperty(exports, "unpatchLangGraph", { enumerable: true, get: function () { return langgraph_js_1.unpatchLangGraph; } });
25
+ var langgraph_detection_js_1 = require("./langgraph-detection.js");
26
+ Object.defineProperty(exports, "hasLangGraph", { enumerable: true, get: function () { return langgraph_detection_js_1.hasLangGraph; } });
27
+ // Mastra
28
+ var mastra_js_1 = require("./mastra.js");
29
+ Object.defineProperty(exports, "patchMastra", { enumerable: true, get: function () { return mastra_js_1.patchMastra; } });
30
+ Object.defineProperty(exports, "unpatchMastra", { enumerable: true, get: function () { return mastra_js_1.unpatchMastra; } });
31
+ var mastra_detection_js_1 = require("./mastra-detection.js");
32
+ Object.defineProperty(exports, "hasMastra", { enumerable: true, get: function () { return mastra_detection_js_1.hasMastra; } });
33
+ // LangChain
34
+ var langchain_js_1 = require("./langchain.js");
35
+ Object.defineProperty(exports, "patchLangChain", { enumerable: true, get: function () { return langchain_js_1.patchLangChain; } });
36
+ // OpenAI Agents
37
+ var openai_agents_js_1 = require("./openai-agents.js");
38
+ Object.defineProperty(exports, "patchOpenAIAgents", { enumerable: true, get: function () { return openai_agents_js_1.patchOpenAIAgents; } });
39
+ Object.defineProperty(exports, "unpatchOpenAIAgents", { enumerable: true, get: function () { return openai_agents_js_1.unpatchOpenAIAgents; } });
40
+ var openai_agents_detection_js_1 = require("./openai-agents-detection.js");
41
+ Object.defineProperty(exports, "hasOpenAIAgentsSDK", { enumerable: true, get: function () { return openai_agents_detection_js_1.hasOpenAIAgentsSDK; } });
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.PolicyViolationError = exports.createNoopGatewayClient = exports.findAasmBinary = exports.INSTALL_HINT = exports.runWithAgentId = exports.currentAgentId = exports.encodeCallStackNode = exports.encodeAuditEvent = exports.decodeCallStackNode = exports.decodeAuditEvent = exports.ENFORCEMENT_MODES = exports.withAssembly = exports.initAssembly = void 0;
4
18
  var init_assembly_js_1 = require("./core/init-assembly.js");
@@ -27,3 +41,8 @@ var index_js_5 = require("./gateway/index.js");
27
41
  Object.defineProperty(exports, "createNoopGatewayClient", { enumerable: true, get: function () { return index_js_5.createNoopGatewayClient; } });
28
42
  var index_js_6 = require("./errors/index.js");
29
43
  Object.defineProperty(exports, "PolicyViolationError", { enumerable: true, get: function () { return index_js_6.PolicyViolationError; } });
44
+ // Per-framework governance patch hooks (AAASM-2922). The curated public
45
+ // surface lives in src/hooks/index.ts; re-export it here and via the
46
+ // `@agent-assembly/sdk/hooks` subpath so consumers can apply a single
47
+ // framework's hook manually.
48
+ __exportStar(require("./hooks/index.js"), exports);
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Public re-exports for the per-framework governance patch hooks
3
+ * (AAASM-2922).
4
+ *
5
+ * These let consumers apply a single framework's governance hook manually,
6
+ * instead of relying on `initAssembly()` to patch every detected framework.
7
+ * Only the user-facing patch/unpatch/has surface and the option/module
8
+ * interfaces those functions take as parameters are re-exported here;
9
+ * internal helpers (wrappers, patch-state, capture/record utilities) stay
10
+ * private to their hook modules.
11
+ */
12
+ // Vercel AI SDK
13
+ export { patchVercelAiSdk, unpatchVercelAiSdk } from "./ai-sdk.js";
14
+ export { hasVercelAiSdk } from "./ai-sdk-detection.js";
15
+ // LangGraph
16
+ export { patchLangGraph, unpatchLangGraph } from "./langgraph.js";
17
+ export { hasLangGraph } from "./langgraph-detection.js";
18
+ // Mastra
19
+ export { patchMastra, unpatchMastra } from "./mastra.js";
20
+ export { hasMastra } from "./mastra-detection.js";
21
+ // LangChain
22
+ export { patchLangChain } from "./langchain.js";
23
+ // OpenAI Agents
24
+ export { patchOpenAIAgents, unpatchOpenAIAgents } from "./openai-agents.js";
25
+ export { hasOpenAIAgentsSDK } from "./openai-agents-detection.js";
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gBAAgB;AAChB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,YAAY;AACZ,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,SAAS;AACT,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,YAAY;AACZ,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC"}
package/dist/esm/index.js CHANGED
@@ -11,4 +11,9 @@ export { currentAgentId, runWithAgentId } from "./lineage/index.js";
11
11
  export { INSTALL_HINT, findAasmBinary } from "./runtime.js";
12
12
  export { createNoopGatewayClient } from "./gateway/index.js";
13
13
  export { PolicyViolationError } from "./errors/index.js";
14
+ // Per-framework governance patch hooks (AAASM-2922). The curated public
15
+ // surface lives in src/hooks/index.ts; re-export it here and via the
16
+ // `@agent-assembly/sdk/hooks` subpath so consumers can apply a single
17
+ // framework's hook manually.
18
+ export * from "./hooks/index.js";
14
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,uEAAuE;AACvE,wEAAwE;AACxE,mEAAmE;AACnE,uEAAuE;AACvE,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAU5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,uEAAuE;AACvE,wEAAwE;AACxE,mEAAmE;AACnE,uEAAuE;AACvE,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAU5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,wEAAwE;AACxE,qEAAqE;AACrE,sEAAsE;AACtE,6BAA6B;AAC7B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Public re-exports for the per-framework governance patch hooks
3
+ * (AAASM-2922).
4
+ *
5
+ * These let consumers apply a single framework's governance hook manually,
6
+ * instead of relying on `initAssembly()` to patch every detected framework.
7
+ * Only the user-facing patch/unpatch/has surface and the option/module
8
+ * interfaces those functions take as parameters are re-exported here;
9
+ * internal helpers (wrappers, patch-state, capture/record utilities) stay
10
+ * private to their hook modules.
11
+ */
12
+ export { patchVercelAiSdk, unpatchVercelAiSdk } from "./ai-sdk.js";
13
+ export type { PatchVercelAiSdkOptions, VercelAiSdkModule } from "./ai-sdk.js";
14
+ export { hasVercelAiSdk } from "./ai-sdk-detection.js";
15
+ export { patchLangGraph, unpatchLangGraph } from "./langgraph.js";
16
+ export type { PatchLangGraphOptions, LangGraphModule } from "./langgraph.js";
17
+ export { hasLangGraph } from "./langgraph-detection.js";
18
+ export { patchMastra, unpatchMastra } from "./mastra.js";
19
+ export type { PatchMastraOptions, MastraModule } from "./mastra.js";
20
+ export { hasMastra } from "./mastra-detection.js";
21
+ export { patchLangChain } from "./langchain.js";
22
+ export { patchOpenAIAgents, unpatchOpenAIAgents } from "./openai-agents.js";
23
+ export type { PatchOpenAIAgentsOptions } from "./openai-agents.js";
24
+ export { hasOpenAIAgentsSDK } from "./openai-agents-detection.js";
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -11,4 +11,5 @@ export type { GatewayClient } from "./gateway/index.js";
11
11
  export type { GatewayApprovalResult, GatewayCheckRequest, GatewayDecision, GatewayPromptScan, GatewayRecordEvent, GatewayResultRecord } from "./types/index.js";
12
12
  export { createNoopGatewayClient } from "./gateway/index.js";
13
13
  export { PolicyViolationError } from "./errors/index.js";
14
+ export * from "./hooks/index.js";
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,YAAY,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe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,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAKzD,cAAc,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-assembly/sdk",
3
- "version": "0.0.1-alpha.9.1",
3
+ "version": "0.0.1-beta.1",
4
4
  "description": "TypeScript SDK for Agent Assembly",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -21,6 +21,11 @@
21
21
  "import": "./dist/esm/index.js",
22
22
  "require": "./dist/cjs/index.js",
23
23
  "types": "./dist/types/index.d.ts"
24
+ },
25
+ "./hooks": {
26
+ "import": "./dist/esm/hooks/index.js",
27
+ "require": "./dist/cjs/hooks/index.js",
28
+ "types": "./dist/types/hooks/index.d.ts"
24
29
  }
25
30
  },
26
31
  "peerDependencies": {
@@ -59,10 +64,10 @@
59
64
  "nodejs"
60
65
  ],
61
66
  "optionalDependencies": {
62
- "@agent-assembly/runtime-darwin-arm64": "0.0.1-alpha.9",
63
- "@agent-assembly/runtime-darwin-x64": "0.0.1-alpha.9",
64
- "@agent-assembly/runtime-linux-arm64": "0.0.1-alpha.9",
65
- "@agent-assembly/runtime-linux-x64": "0.0.1-alpha.9"
67
+ "@agent-assembly/runtime-darwin-arm64": "0.0.1-beta.1",
68
+ "@agent-assembly/runtime-darwin-x64": "0.0.1-beta.1",
69
+ "@agent-assembly/runtime-linux-arm64": "0.0.1-beta.1",
70
+ "@agent-assembly/runtime-linux-x64": "0.0.1-beta.1"
66
71
  },
67
72
  "files": [
68
73
  "dist/",