novyx 3.1.0 → 3.2.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.
- package/dist/index.d.mts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +27 -0
- package/dist/index.mjs +27 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -715,7 +715,32 @@ declare class Novyx {
|
|
|
715
715
|
memoryHealth(): Promise<Record<string, any>>;
|
|
716
716
|
private _controlRequest;
|
|
717
717
|
/** Submit an action to Novyx Control for governed execution. */
|
|
718
|
+
/**
|
|
719
|
+
* Submit a governed action envelope to a separate Novyx Control instance.
|
|
720
|
+
* Legacy path. For the main Novyx Cloud governance flow, use `submitAction()`.
|
|
721
|
+
*/
|
|
718
722
|
actionSubmit(connector: string, operation: string, payload: Record<string, any>): Promise<any>;
|
|
723
|
+
/**
|
|
724
|
+
* Submit an action to the main Novyx Cloud governance flow.
|
|
725
|
+
*
|
|
726
|
+
* Evaluates against built-in + custom YAML policies (tenant-wide and
|
|
727
|
+
* optionally agent-scoped) via `POST /v1/actions` on the main API.
|
|
728
|
+
* Returns one of three statuses:
|
|
729
|
+
* - `"allowed"` — passed all policies
|
|
730
|
+
* - `"blocked"` — critical violation, action stopped
|
|
731
|
+
* - `"pending_review"` — high-severity violation routed to approval queue
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* const result = await nx.submitAction("send_invoice", { amount: 50000 }, {
|
|
735
|
+
* agent_id: "billing-bot",
|
|
736
|
+
* });
|
|
737
|
+
* if (result.status === "pending_review") {
|
|
738
|
+
* console.log(`Awaiting approval: ${result.policy_result.action_id}`);
|
|
739
|
+
* }
|
|
740
|
+
*/
|
|
741
|
+
submitAction(action: string, params?: Record<string, any>, opts?: {
|
|
742
|
+
agent_id?: string;
|
|
743
|
+
}): Promise<Record<string, any>>;
|
|
719
744
|
/** Get the status of a Control action. */
|
|
720
745
|
actionStatus(actionId: string): Promise<any>;
|
|
721
746
|
/** List recent Control actions. */
|
package/dist/index.d.ts
CHANGED
|
@@ -715,7 +715,32 @@ declare class Novyx {
|
|
|
715
715
|
memoryHealth(): Promise<Record<string, any>>;
|
|
716
716
|
private _controlRequest;
|
|
717
717
|
/** Submit an action to Novyx Control for governed execution. */
|
|
718
|
+
/**
|
|
719
|
+
* Submit a governed action envelope to a separate Novyx Control instance.
|
|
720
|
+
* Legacy path. For the main Novyx Cloud governance flow, use `submitAction()`.
|
|
721
|
+
*/
|
|
718
722
|
actionSubmit(connector: string, operation: string, payload: Record<string, any>): Promise<any>;
|
|
723
|
+
/**
|
|
724
|
+
* Submit an action to the main Novyx Cloud governance flow.
|
|
725
|
+
*
|
|
726
|
+
* Evaluates against built-in + custom YAML policies (tenant-wide and
|
|
727
|
+
* optionally agent-scoped) via `POST /v1/actions` on the main API.
|
|
728
|
+
* Returns one of three statuses:
|
|
729
|
+
* - `"allowed"` — passed all policies
|
|
730
|
+
* - `"blocked"` — critical violation, action stopped
|
|
731
|
+
* - `"pending_review"` — high-severity violation routed to approval queue
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* const result = await nx.submitAction("send_invoice", { amount: 50000 }, {
|
|
735
|
+
* agent_id: "billing-bot",
|
|
736
|
+
* });
|
|
737
|
+
* if (result.status === "pending_review") {
|
|
738
|
+
* console.log(`Awaiting approval: ${result.policy_result.action_id}`);
|
|
739
|
+
* }
|
|
740
|
+
*/
|
|
741
|
+
submitAction(action: string, params?: Record<string, any>, opts?: {
|
|
742
|
+
agent_id?: string;
|
|
743
|
+
}): Promise<Record<string, any>>;
|
|
719
744
|
/** Get the status of a Control action. */
|
|
720
745
|
actionStatus(actionId: string): Promise<any>;
|
|
721
746
|
/** List recent Control actions. */
|
package/dist/index.js
CHANGED
|
@@ -851,9 +851,36 @@ var Novyx = class {
|
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
853
|
/** Submit an action to Novyx Control for governed execution. */
|
|
854
|
+
/**
|
|
855
|
+
* Submit a governed action envelope to a separate Novyx Control instance.
|
|
856
|
+
* Legacy path. For the main Novyx Cloud governance flow, use `submitAction()`.
|
|
857
|
+
*/
|
|
854
858
|
async actionSubmit(connector, operation, payload) {
|
|
855
859
|
return this._controlRequest("POST", `/v1/actions/${connector}/${operation}`, { body: payload });
|
|
856
860
|
}
|
|
861
|
+
/**
|
|
862
|
+
* Submit an action to the main Novyx Cloud governance flow.
|
|
863
|
+
*
|
|
864
|
+
* Evaluates against built-in + custom YAML policies (tenant-wide and
|
|
865
|
+
* optionally agent-scoped) via `POST /v1/actions` on the main API.
|
|
866
|
+
* Returns one of three statuses:
|
|
867
|
+
* - `"allowed"` — passed all policies
|
|
868
|
+
* - `"blocked"` — critical violation, action stopped
|
|
869
|
+
* - `"pending_review"` — high-severity violation routed to approval queue
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* const result = await nx.submitAction("send_invoice", { amount: 50000 }, {
|
|
873
|
+
* agent_id: "billing-bot",
|
|
874
|
+
* });
|
|
875
|
+
* if (result.status === "pending_review") {
|
|
876
|
+
* console.log(`Awaiting approval: ${result.policy_result.action_id}`);
|
|
877
|
+
* }
|
|
878
|
+
*/
|
|
879
|
+
async submitAction(action, params = {}, opts) {
|
|
880
|
+
const body = { action, params };
|
|
881
|
+
if (opts?.agent_id !== void 0) body.agent_id = opts.agent_id;
|
|
882
|
+
return this._request("POST", "/v1/actions", { body });
|
|
883
|
+
}
|
|
857
884
|
/** Get the status of a Control action. */
|
|
858
885
|
async actionStatus(actionId) {
|
|
859
886
|
return this._controlRequest("GET", `/v1/actions/${actionId}`);
|
package/dist/index.mjs
CHANGED
|
@@ -818,9 +818,36 @@ var Novyx = class {
|
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
/** Submit an action to Novyx Control for governed execution. */
|
|
821
|
+
/**
|
|
822
|
+
* Submit a governed action envelope to a separate Novyx Control instance.
|
|
823
|
+
* Legacy path. For the main Novyx Cloud governance flow, use `submitAction()`.
|
|
824
|
+
*/
|
|
821
825
|
async actionSubmit(connector, operation, payload) {
|
|
822
826
|
return this._controlRequest("POST", `/v1/actions/${connector}/${operation}`, { body: payload });
|
|
823
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Submit an action to the main Novyx Cloud governance flow.
|
|
830
|
+
*
|
|
831
|
+
* Evaluates against built-in + custom YAML policies (tenant-wide and
|
|
832
|
+
* optionally agent-scoped) via `POST /v1/actions` on the main API.
|
|
833
|
+
* Returns one of three statuses:
|
|
834
|
+
* - `"allowed"` — passed all policies
|
|
835
|
+
* - `"blocked"` — critical violation, action stopped
|
|
836
|
+
* - `"pending_review"` — high-severity violation routed to approval queue
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* const result = await nx.submitAction("send_invoice", { amount: 50000 }, {
|
|
840
|
+
* agent_id: "billing-bot",
|
|
841
|
+
* });
|
|
842
|
+
* if (result.status === "pending_review") {
|
|
843
|
+
* console.log(`Awaiting approval: ${result.policy_result.action_id}`);
|
|
844
|
+
* }
|
|
845
|
+
*/
|
|
846
|
+
async submitAction(action, params = {}, opts) {
|
|
847
|
+
const body = { action, params };
|
|
848
|
+
if (opts?.agent_id !== void 0) body.agent_id = opts.agent_id;
|
|
849
|
+
return this._request("POST", "/v1/actions", { body });
|
|
850
|
+
}
|
|
824
851
|
/** Get the status of a Control action. */
|
|
825
852
|
async actionStatus(actionId) {
|
|
826
853
|
return this._controlRequest("GET", `/v1/actions/${actionId}`);
|