@agentix-security/nextjs 0.1.2 → 0.1.5

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.
package/dist/index.cjs CHANGED
@@ -230,6 +230,12 @@ var DEFAULT_CONTROL_PLANE = "https://agentix-control-plane.onrender.com";
230
230
  var AgentixSDK = class {
231
231
  constructor(config) {
232
232
  this.config = config;
233
+ if (config.routes) {
234
+ for (const [intent, route] of Object.entries(config.routes)) {
235
+ this.registerIntent(intent);
236
+ this.registerIntentRoute(intent, route);
237
+ }
238
+ }
233
239
  }
234
240
  config;
235
241
  lease = null;
package/dist/index.d.cts CHANGED
@@ -70,6 +70,9 @@ interface AgentixSDKConfig {
70
70
  declareLimit?: number;
71
71
  declareWindowMs?: number;
72
72
  controlPlaneAdminKey?: string;
73
+ /** Map of intent → route string (e.g. { read_jobs: 'GET /api/jobs' }).
74
+ * Registered at init time so routes appear in discovery before any request. */
75
+ routes?: Record<string, string>;
73
76
  }
74
77
 
75
78
  declare class AgentixSDK {
package/dist/index.d.ts CHANGED
@@ -70,6 +70,9 @@ interface AgentixSDKConfig {
70
70
  declareLimit?: number;
71
71
  declareWindowMs?: number;
72
72
  controlPlaneAdminKey?: string;
73
+ /** Map of intent → route string (e.g. { read_jobs: 'GET /api/jobs' }).
74
+ * Registered at init time so routes appear in discovery before any request. */
75
+ routes?: Record<string, string>;
73
76
  }
74
77
 
75
78
  declare class AgentixSDK {
package/dist/index.js CHANGED
@@ -228,6 +228,12 @@ var DEFAULT_CONTROL_PLANE = "https://agentix-control-plane.onrender.com";
228
228
  var AgentixSDK = class {
229
229
  constructor(config) {
230
230
  this.config = config;
231
+ if (config.routes) {
232
+ for (const [intent, route] of Object.entries(config.routes)) {
233
+ this.registerIntent(intent);
234
+ this.registerIntentRoute(intent, route);
235
+ }
236
+ }
231
237
  }
232
238
  config;
233
239
  lease = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentix-security/nextjs",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "Agentix Next.js adapter — AI agent intent-based authorization for Next.js apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",