@soat/sdk 0.104.0 → 0.106.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.
package/dist/index.mjs CHANGED
@@ -3035,6 +3035,23 @@ var Guardrails = class {
3035
3035
  });
3036
3036
  }
3037
3037
  };
3038
+ var Iam = class {
3039
+ /**
3040
+ * Check a permission of the calling credential
3041
+ *
3042
+ * Evaluates the calling credential's own policies (its owner's and, for an API key or OAuth token, its boundary and project scope) for an action the deployment registered (`IAM_REGISTRATIONS_CONFIG`) on an SRN, with the engine the runtime's own routes use. A denial is `200` with `allowed: false`, never `403`. Only policies are evaluated: the answer says nothing about whether the resource exists.
3043
+ */
3044
+ static checkIamPermission(options) {
3045
+ return (options.client ?? client).post({
3046
+ url: "/api/v1/iam/check",
3047
+ ...options,
3048
+ headers: {
3049
+ "Content-Type": "application/json",
3050
+ ...options.headers
3051
+ }
3052
+ });
3053
+ }
3054
+ };
3038
3055
  var IngestionRules = class {
3039
3056
  /**
3040
3057
  * List ingestion rules
@@ -4349,9 +4366,9 @@ var Playbooks = class {
4349
4366
  };
4350
4367
  var Policies = class {
4351
4368
  /**
4352
- * List all policies
4369
+ * List policies
4353
4370
  *
4354
- * Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user.
4371
+ * Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without either, the unrestricted admin lists every policy, global and project ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user.
4355
4372
  *
4356
4373
  */
4357
4374
  static listPolicies(options) {
@@ -4363,7 +4380,7 @@ var Policies = class {
4363
4380
  /**
4364
4381
  * Create a policy
4365
4382
  *
4366
- * Creates a new global policy. Requires admin role.
4383
+ * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`. Without a project, creates a global policy, which only the unrestricted admin may.
4367
4384
  */
4368
4385
  static createPolicy(options) {
4369
4386
  return (options.client ?? client).post({
@@ -4378,7 +4395,7 @@ var Policies = class {
4378
4395
  /**
4379
4396
  * Delete a policy
4380
4397
  *
4381
- * Deletes a global policy. Requires admin role. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent or webhook names it in its `policy_ids`.
4398
+ * Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent or webhook names it in its `policy_ids`.
4382
4399
  */
4383
4400
  static deletePolicy(options) {
4384
4401
  return (options.client ?? client).delete({
@@ -4389,7 +4406,7 @@ var Policies = class {
4389
4406
  /**
4390
4407
  * Get a policy
4391
4408
  *
4392
- * Returns details of a specific policy. Requires admin role.
4409
+ * Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
4393
4410
  */
4394
4411
  static getPolicy(options) {
4395
4412
  return (options.client ?? client).get({
@@ -4400,7 +4417,7 @@ var Policies = class {
4400
4417
  /**
4401
4418
  * Update a policy
4402
4419
  *
4403
- * Updates an existing global policy. Requires admin role.
4420
+ * Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
4404
4421
  */
4405
4422
  static updatePolicy(options) {
4406
4423
  return (options.client ?? client).put({
@@ -5245,6 +5262,8 @@ var Tools = class {
5245
5262
  *
5246
5263
  * A credential scoped to a project the tool is shared with, through an accepted share, calls it in that project: the calling project's guardrails adjudicate it, it is metered there with `publisher_project_id`, and the tool receives the calling project as the `calling_project_id` tool context key.
5247
5264
  *
5265
+ * `actor_id` runs the call for an actor without a session or a generation, such as a scheduled sync reading each user's own data through their OAuth connection.
5266
+ *
5248
5267
  */
5249
5268
  static callTool(options) {
5250
5269
  return (options.client ?? client).post({
@@ -6000,6 +6019,7 @@ var SoatClient = class {
6000
6019
  formations;
6001
6020
  generations;
6002
6021
  guardrails;
6022
+ iam;
6003
6023
  ingestionRules;
6004
6024
  knowledge;
6005
6025
  memories;
@@ -6055,6 +6075,7 @@ var SoatClient = class {
6055
6075
  this.formations = bindResource(Formations, httpClient);
6056
6076
  this.generations = bindResource(Generations, httpClient);
6057
6077
  this.guardrails = bindResource(Guardrails, httpClient);
6078
+ this.iam = bindResource(Iam, httpClient);
6058
6079
  this.ingestionRules = bindResource(IngestionRules, httpClient);
6059
6080
  this.knowledge = bindResource(Knowledge, httpClient);
6060
6081
  this.memories = bindResource(Memories, httpClient);
@@ -6083,4 +6104,4 @@ var SoatClient = class {
6083
6104
  }
6084
6105
  };
6085
6106
  //#endregion
6086
- export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, OauthClients, OauthConnections, Orchestrations, Playbooks, Policies, Projects, Quotas, Secrets, Sessions, Shares, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
6107
+ export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, Iam, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, OauthClients, OauthConnections, Orchestrations, Playbooks, Policies, Projects, Quotas, Secrets, Sessions, Shares, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.104.0",
3
+ "version": "0.106.0",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",