@elevasis/sdk 1.35.0 → 1.36.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/cli.cjs +187 -13
- package/dist/index.d.ts +80 -150
- package/dist/test-utils/index.d.ts +82 -152
- package/dist/test-utils/index.js +84 -26
- package/dist/types/worker/index.d.ts +2 -2
- package/dist/types/worker/platform.d.ts +1 -0
- package/dist/worker/index.js +84 -26
- package/package.json +4 -4
- package/reference/claude-config/registries/skill-coverage.json +1 -0
- package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +30 -0
- package/reference/rules/ui.md +8 -5
- package/reference/sdk/cli-management.mdx +2 -0
package/dist/cli.cjs
CHANGED
|
@@ -24975,6 +24975,8 @@ function ora(options) {
|
|
|
24975
24975
|
var import_path2 = require("path");
|
|
24976
24976
|
var import_promises = require("fs/promises");
|
|
24977
24977
|
var import_fs2 = require("fs");
|
|
24978
|
+
var import_crypto = require("crypto");
|
|
24979
|
+
var import_url = require("url");
|
|
24978
24980
|
init_source();
|
|
24979
24981
|
|
|
24980
24982
|
// ../../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js
|
|
@@ -45805,7 +45807,7 @@ function wrapAction(commandName, fn) {
|
|
|
45805
45807
|
// package.json
|
|
45806
45808
|
var package_default = {
|
|
45807
45809
|
name: "@elevasis/sdk",
|
|
45808
|
-
version: "1.
|
|
45810
|
+
version: "1.36.0",
|
|
45809
45811
|
description: "SDK for building Elevasis organization resources",
|
|
45810
45812
|
type: "module",
|
|
45811
45813
|
bin: {
|
|
@@ -45883,8 +45885,8 @@ var package_default = {
|
|
|
45883
45885
|
var SDK_VERSION = package_default.version;
|
|
45884
45886
|
|
|
45885
45887
|
// src/cli/commands/deploy.ts
|
|
45886
|
-
function getEsbuild() {
|
|
45887
|
-
const consumerRequire = (0, import_module.createRequire)(
|
|
45888
|
+
function getEsbuild(packageRoot = getPackageRoot()) {
|
|
45889
|
+
const consumerRequire = (0, import_module.createRequire)((0, import_path2.resolve)(packageRoot, "package.json"));
|
|
45888
45890
|
return consumerRequire("esbuild");
|
|
45889
45891
|
}
|
|
45890
45892
|
function resolveBareSpecifier(specifier, importer) {
|
|
@@ -45951,10 +45953,11 @@ function createBundleWorkspaceTsPlugin() {
|
|
|
45951
45953
|
}
|
|
45952
45954
|
};
|
|
45953
45955
|
}
|
|
45954
|
-
async function loadTsModule(filePath) {
|
|
45955
|
-
const
|
|
45956
|
-
const
|
|
45957
|
-
const
|
|
45956
|
+
async function loadTsModule(filePath, options = {}) {
|
|
45957
|
+
const packageRoot = options.packageRoot ?? getPackageRoot();
|
|
45958
|
+
const esbuild = getEsbuild(packageRoot);
|
|
45959
|
+
const absPath = (0, import_path2.isAbsolute)(filePath) ? filePath : (0, import_path2.resolve)(packageRoot, filePath);
|
|
45960
|
+
const tmpOut = (0, import_path2.resolve)(packageRoot, `.elevasis-tmp-${process.pid}-${Date.now()}-${(0, import_crypto.randomUUID)()}.mjs`);
|
|
45958
45961
|
try {
|
|
45959
45962
|
await esbuild.build({
|
|
45960
45963
|
entryPoints: [absPath],
|
|
@@ -45967,8 +45970,7 @@ async function loadTsModule(filePath) {
|
|
|
45967
45970
|
plugins: [createBundleWorkspaceTsPlugin()],
|
|
45968
45971
|
logLevel: "silent"
|
|
45969
45972
|
});
|
|
45970
|
-
|
|
45971
|
-
return await import(fileUrl);
|
|
45973
|
+
return await import((0, import_url.pathToFileURL)(tmpOut).href);
|
|
45972
45974
|
} finally {
|
|
45973
45975
|
try {
|
|
45974
45976
|
const { unlinkSync: unlinkSync3 } = await import("fs");
|
|
@@ -49813,13 +49815,13 @@ init_config();
|
|
|
49813
49815
|
var import_path3 = require("path");
|
|
49814
49816
|
var import_fs3 = require("fs");
|
|
49815
49817
|
var ORG_MODEL_REL_PATH = "core/config/organization-model.ts";
|
|
49816
|
-
async function loadOrgModel(projectRoot) {
|
|
49818
|
+
async function loadOrgModel(projectRoot, options = {}) {
|
|
49817
49819
|
const orgModelPath = (0, import_path3.resolve)(projectRoot, ORG_MODEL_REL_PATH);
|
|
49818
49820
|
if (!(0, import_fs3.existsSync)(orgModelPath)) {
|
|
49819
49821
|
return DEFAULT_ORGANIZATION_MODEL;
|
|
49820
49822
|
}
|
|
49821
49823
|
try {
|
|
49822
|
-
const mod = await loadTsModule(orgModelPath);
|
|
49824
|
+
const mod = await loadTsModule(orgModelPath, { packageRoot: options.packageRoot });
|
|
49823
49825
|
const model = mod["organizationModel"] ?? mod["canonicalOrganizationModel"] ?? mod["default"];
|
|
49824
49826
|
if (model && typeof model === "object" && "systems" in model) {
|
|
49825
49827
|
return model;
|
|
@@ -52196,6 +52198,166 @@ function registerSessionCommands(program3) {
|
|
|
52196
52198
|
registerSessionEnd(program3);
|
|
52197
52199
|
}
|
|
52198
52200
|
|
|
52201
|
+
// src/cli/commands/grant/grant.ts
|
|
52202
|
+
init_source();
|
|
52203
|
+
init_config();
|
|
52204
|
+
function printJson8(value) {
|
|
52205
|
+
console.log(JSON.stringify(value, null, 2));
|
|
52206
|
+
}
|
|
52207
|
+
function appendQuery7(params, key, value) {
|
|
52208
|
+
if (value === void 0 || value === null || value === "" || value === false) return;
|
|
52209
|
+
params.set(key, String(value));
|
|
52210
|
+
}
|
|
52211
|
+
function endpointWithQuery7(endpoint, params) {
|
|
52212
|
+
const query = params.toString();
|
|
52213
|
+
return query ? `${endpoint}?${query}` : endpoint;
|
|
52214
|
+
}
|
|
52215
|
+
function parseJson2(value, label) {
|
|
52216
|
+
if (value === void 0) return void 0;
|
|
52217
|
+
try {
|
|
52218
|
+
return JSON.parse(value);
|
|
52219
|
+
} catch (error46) {
|
|
52220
|
+
const message = error46 instanceof Error ? error46.message : String(error46);
|
|
52221
|
+
throw new Error(`Invalid JSON for ${label}: ${message}`);
|
|
52222
|
+
}
|
|
52223
|
+
}
|
|
52224
|
+
function parsePositiveInt(value, label) {
|
|
52225
|
+
if (value === void 0) return void 0;
|
|
52226
|
+
const parsed = Number(value);
|
|
52227
|
+
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
52228
|
+
throw new Error(`${label} must be a positive integer`);
|
|
52229
|
+
}
|
|
52230
|
+
return parsed;
|
|
52231
|
+
}
|
|
52232
|
+
function parseOrigins(value) {
|
|
52233
|
+
if (value === void 0) return void 0;
|
|
52234
|
+
const origins = value.split(",").map((origin) => origin.trim()).filter(Boolean);
|
|
52235
|
+
return origins.length > 0 ? origins : void 0;
|
|
52236
|
+
}
|
|
52237
|
+
function deriveSlugFromResourceId(resourceId) {
|
|
52238
|
+
const slug = resourceId.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
52239
|
+
if (!slug) {
|
|
52240
|
+
throw new Error("--resource must contain at least one alphanumeric character when --slug is omitted");
|
|
52241
|
+
}
|
|
52242
|
+
return slug;
|
|
52243
|
+
}
|
|
52244
|
+
function getPublicPath(slug) {
|
|
52245
|
+
return `/public/agents/${encodeURIComponent(slug)}`;
|
|
52246
|
+
}
|
|
52247
|
+
function resolvePublicUrl(slug, publicBaseUrl) {
|
|
52248
|
+
const path3 = getPublicPath(slug);
|
|
52249
|
+
const baseUrl = publicBaseUrl ?? process.env.ELEVASIS_PUBLIC_BASE_URL ?? process.env.ELEVASIS_PUBLIC_APP_URL;
|
|
52250
|
+
if (!baseUrl) return path3;
|
|
52251
|
+
try {
|
|
52252
|
+
return new URL(path3, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`).toString();
|
|
52253
|
+
} catch {
|
|
52254
|
+
throw new Error("--public-base-url must be a valid URL");
|
|
52255
|
+
}
|
|
52256
|
+
}
|
|
52257
|
+
function printGrant(grant) {
|
|
52258
|
+
const status = grant.isDisabled ? "disabled" : "active";
|
|
52259
|
+
console.log(source_default.white(` ${source_default.bold(grant.slug)} ${source_default.gray(status)}`));
|
|
52260
|
+
console.log(source_default.gray(` Agent: ${grant.resourceId}`));
|
|
52261
|
+
console.log(source_default.gray(` Mode: ${grant.mode}${grant.requiresCode ? " (code required)" : ""}`));
|
|
52262
|
+
console.log(source_default.gray(` Origins: ${grant.allowedOrigins.length > 0 ? grant.allowedOrigins.join(", ") : "any"}`));
|
|
52263
|
+
console.log(source_default.gray(` Limits: turns=${grant.maxTurnsPerSession}, sessions/visitor=${grant.maxSessionsPerVisitor}`));
|
|
52264
|
+
if (grant.expiresAt) console.log(source_default.gray(` Expires: ${new Date(grant.expiresAt).toLocaleString()}`));
|
|
52265
|
+
if (grant.disabledAt) console.log(source_default.gray(` Disabled: ${new Date(grant.disabledAt).toLocaleString()}`));
|
|
52266
|
+
}
|
|
52267
|
+
function registerGrantList(program3) {
|
|
52268
|
+
program3.command("grant:list").description("List public/code-gated agent access grants").option("--resource-id <id>", "Filter by agent resource ID").option("--include-disabled", "Include disabled grants").option("--api-url <url>", "API base URL").option("--json", "Output as JSON").action(
|
|
52269
|
+
wrapAction("grant:list", async (options) => {
|
|
52270
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52271
|
+
const params = new URLSearchParams();
|
|
52272
|
+
appendQuery7(params, "resourceId", options.resourceId);
|
|
52273
|
+
appendQuery7(params, "includeDisabled", options.includeDisabled ? "true" : void 0);
|
|
52274
|
+
const result = await apiGet(
|
|
52275
|
+
endpointWithQuery7("/api/external/agent-access-grants", params),
|
|
52276
|
+
apiUrl
|
|
52277
|
+
);
|
|
52278
|
+
if (options.json) {
|
|
52279
|
+
printJson8(result);
|
|
52280
|
+
return;
|
|
52281
|
+
}
|
|
52282
|
+
if (result.grants.length === 0) {
|
|
52283
|
+
console.log(source_default.yellow("No agent access grants found."));
|
|
52284
|
+
return;
|
|
52285
|
+
}
|
|
52286
|
+
console.log(source_default.cyan(`Agent access grants (${result.grants.length} of ${result.total}):`));
|
|
52287
|
+
for (const grant of result.grants) {
|
|
52288
|
+
printGrant(grant);
|
|
52289
|
+
console.log();
|
|
52290
|
+
}
|
|
52291
|
+
})
|
|
52292
|
+
);
|
|
52293
|
+
}
|
|
52294
|
+
function registerGrantCreate(program3) {
|
|
52295
|
+
program3.command("grant:create").description("Create a public/code-gated agent access grant").requiredOption("--resource <id>", "Agent resource ID to expose").option("--slug <slug>", "Public slug; defaults to normalized --resource").option("--mode <mode>", "Access mode: public | code", "public").option("--code <code>", "Access code for --mode code").option("--origins <origins>", "Comma-separated allowed origins; omit for any origin").option("--expires-at <iso>", "ISO timestamp when the grant expires").option("--max-turns <number>", "Maximum turns per public session").option("--max-sessions <number>", "Maximum sessions per visitor").option("--branding <json>", "Branding metadata JSON object").option("--capture-fields <json>", "Capture fields JSON array").option("--tool-policy <json>", "Tool policy JSON object").option("--public-base-url <url>", "Client public app base URL for printed public URL").option("--api-url <url>", "API base URL").option("--json", "Output as JSON").action(
|
|
52296
|
+
wrapAction("grant:create", async (options) => {
|
|
52297
|
+
const mode = options.mode ?? "public";
|
|
52298
|
+
if (mode !== "public" && mode !== "code") {
|
|
52299
|
+
throw new Error("--mode must be public or code");
|
|
52300
|
+
}
|
|
52301
|
+
if (mode === "code" && !options.code) {
|
|
52302
|
+
throw new Error("--code is required when --mode code");
|
|
52303
|
+
}
|
|
52304
|
+
const slug = options.slug ?? deriveSlugFromResourceId(options.resource);
|
|
52305
|
+
const body = {
|
|
52306
|
+
resourceId: options.resource,
|
|
52307
|
+
slug,
|
|
52308
|
+
mode
|
|
52309
|
+
};
|
|
52310
|
+
if (options.code) body.code = options.code;
|
|
52311
|
+
if (options.expiresAt) body.expiresAt = options.expiresAt;
|
|
52312
|
+
const allowedOrigins = parseOrigins(options.origins);
|
|
52313
|
+
if (allowedOrigins) body.allowedOrigins = allowedOrigins;
|
|
52314
|
+
const maxTurns = parsePositiveInt(options.maxTurns, "--max-turns");
|
|
52315
|
+
if (maxTurns !== void 0) body.maxTurnsPerSession = maxTurns;
|
|
52316
|
+
const maxSessions = parsePositiveInt(options.maxSessions, "--max-sessions");
|
|
52317
|
+
if (maxSessions !== void 0) body.maxSessionsPerVisitor = maxSessions;
|
|
52318
|
+
const branding = parseJson2(options.branding, "--branding");
|
|
52319
|
+
if (branding !== void 0) body.branding = branding;
|
|
52320
|
+
const captureFields = parseJson2(options.captureFields, "--capture-fields");
|
|
52321
|
+
if (captureFields !== void 0) body.captureFields = captureFields;
|
|
52322
|
+
const toolPolicy = parseJson2(options.toolPolicy, "--tool-policy");
|
|
52323
|
+
if (toolPolicy !== void 0) body.toolPolicy = toolPolicy;
|
|
52324
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52325
|
+
const result = await apiPost("/api/external/agent-access-grants", body, apiUrl);
|
|
52326
|
+
if (options.json) {
|
|
52327
|
+
printJson8(result.grant);
|
|
52328
|
+
return;
|
|
52329
|
+
}
|
|
52330
|
+
console.log(source_default.green(`Created agent access grant ${result.grant.slug}.`));
|
|
52331
|
+
console.log(source_default.gray(` Public URL: ${resolvePublicUrl(result.grant.slug, options.publicBaseUrl)}`));
|
|
52332
|
+
printGrant(result.grant);
|
|
52333
|
+
})
|
|
52334
|
+
);
|
|
52335
|
+
}
|
|
52336
|
+
function registerGrantDisable(program3) {
|
|
52337
|
+
program3.command("grant:disable <slug>").description("Disable an agent access grant without deleting it").option("--api-url <url>", "API base URL").option("--json", "Output as JSON").action(
|
|
52338
|
+
wrapAction("grant:disable", async (slug, options) => {
|
|
52339
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52340
|
+
const result = await apiPost(
|
|
52341
|
+
`/api/external/agent-access-grants/${encodeURIComponent(slug)}/disable`,
|
|
52342
|
+
{},
|
|
52343
|
+
apiUrl
|
|
52344
|
+
);
|
|
52345
|
+
if (options.json) {
|
|
52346
|
+
printJson8(result.grant);
|
|
52347
|
+
return;
|
|
52348
|
+
}
|
|
52349
|
+
console.log(source_default.green(`Disabled agent access grant ${result.grant.slug}.`));
|
|
52350
|
+
})
|
|
52351
|
+
);
|
|
52352
|
+
}
|
|
52353
|
+
|
|
52354
|
+
// src/cli/commands/grant/index.ts
|
|
52355
|
+
function registerGrantCommands(program3) {
|
|
52356
|
+
registerGrantList(program3);
|
|
52357
|
+
registerGrantCreate(program3);
|
|
52358
|
+
registerGrantDisable(program3);
|
|
52359
|
+
}
|
|
52360
|
+
|
|
52199
52361
|
// src/cli/commands/om/index.ts
|
|
52200
52362
|
function registerOmScaffoldCommands(program3) {
|
|
52201
52363
|
program3.command("om:scaffold:system").description("Guide creation of a new system entry in core/config/organization-model/systems.ts").option("--id <path>", "dot-notated system path, e.g. sales.crm (prompted if absent)").option("--title <title>", "display title (prompted if absent)").option("--kind <kind>", "system kind: operational | analytical | support (prompted if absent)").option("--api-backed", "emit apiInterface block and remind to add resource IDs").option("--dry-run", "print proposed TypeScript block without writing").action(async (opts) => {
|
|
@@ -52315,14 +52477,22 @@ var JsonFileArgError = class extends Error {
|
|
|
52315
52477
|
this.name = "JsonFileArgError";
|
|
52316
52478
|
}
|
|
52317
52479
|
};
|
|
52480
|
+
function isWindowsAbsolutePath(path3) {
|
|
52481
|
+
return /^[A-Za-z]:[\\/]/.test(path3) || /^[/\\]{2}[^/\\]+[/\\][^/\\]+/.test(path3);
|
|
52482
|
+
}
|
|
52483
|
+
function resolveCliPath(base, path3) {
|
|
52484
|
+
if (isWindowsAbsolutePath(path3)) return import_node_path16.win32.normalize(path3);
|
|
52485
|
+
if ((0, import_node_path16.isAbsolute)(path3)) return path3;
|
|
52486
|
+
if (isWindowsAbsolutePath(base)) return import_node_path16.win32.resolve(base, path3);
|
|
52487
|
+
return (0, import_node_path16.resolve)(base, path3);
|
|
52488
|
+
}
|
|
52318
52489
|
function resolveJsonFilePath(path3, options) {
|
|
52319
52490
|
if (path3.trim() === "") {
|
|
52320
52491
|
throw new JsonFileArgError("@json: requires a file path", "EMPTY_JSON_FILE_REF");
|
|
52321
52492
|
}
|
|
52322
|
-
if ((0, import_node_path16.isAbsolute)(path3)) return path3;
|
|
52323
52493
|
const cwd = options.cwd ?? process.cwd();
|
|
52324
52494
|
const projectRoot = (options.findProjectRoot ?? tryFindProjectRoot)(cwd);
|
|
52325
|
-
return (
|
|
52495
|
+
return resolveCliPath(projectRoot ?? cwd, path3);
|
|
52326
52496
|
}
|
|
52327
52497
|
function readJsonFileReference(ref, options) {
|
|
52328
52498
|
const relativeOrAbsolutePath = ref.slice(JSON_FILE_PREFIX.length);
|
|
@@ -52440,6 +52610,9 @@ Commands:
|
|
|
52440
52610
|
elevasis-sdk session:list List agent sessions
|
|
52441
52611
|
elevasis-sdk session:get <id> Get session details
|
|
52442
52612
|
elevasis-sdk session:end <id> End an active agent session
|
|
52613
|
+
elevasis-sdk grant:list List public/code-gated agent access grants
|
|
52614
|
+
elevasis-sdk grant:create --resource <id> Create an agent access grant
|
|
52615
|
+
elevasis-sdk grant:disable <slug> Disable an agent access grant
|
|
52443
52616
|
elevasis-sdk acquisition:list:list List acquisition lists
|
|
52444
52617
|
elevasis-sdk acquisition:deal:list List acquisition deals
|
|
52445
52618
|
elevasis-sdk knowledge:generate Generate knowledge nodes from MDX files
|
|
@@ -52477,6 +52650,7 @@ registerQueueCommands(program2);
|
|
|
52477
52650
|
registerScheduleCommands(program2);
|
|
52478
52651
|
registerAgentCommands(program2);
|
|
52479
52652
|
registerSessionCommands(program2);
|
|
52653
|
+
registerGrantCommands(program2);
|
|
52480
52654
|
registerAcquisitionCommands(program2);
|
|
52481
52655
|
registerKnowledgeCommands(program2);
|
|
52482
52656
|
registerRequestCommands(program2);
|
package/dist/index.d.ts
CHANGED
|
@@ -1428,9 +1428,6 @@ type Json = string | number | boolean | null | {
|
|
|
1428
1428
|
[key: string]: Json | undefined;
|
|
1429
1429
|
} | Json[];
|
|
1430
1430
|
type Database = {
|
|
1431
|
-
__InternalSupabase: {
|
|
1432
|
-
PostgrestVersion: "12.2.3 (519615d)";
|
|
1433
|
-
};
|
|
1434
1431
|
public: {
|
|
1435
1432
|
Tables: {
|
|
1436
1433
|
acq_artifacts: {
|
|
@@ -2630,6 +2627,74 @@ type Database = {
|
|
|
2630
2627
|
}
|
|
2631
2628
|
];
|
|
2632
2629
|
};
|
|
2630
|
+
agent_access_grants: {
|
|
2631
|
+
Row: {
|
|
2632
|
+
allowed_origins: string[];
|
|
2633
|
+
branding: Json;
|
|
2634
|
+
capture_fields: Json;
|
|
2635
|
+
code_hash: string | null;
|
|
2636
|
+
code_salt: string | null;
|
|
2637
|
+
created_at: string;
|
|
2638
|
+
disabled_at: string | null;
|
|
2639
|
+
expires_at: string | null;
|
|
2640
|
+
id: string;
|
|
2641
|
+
max_sessions_per_visitor: number;
|
|
2642
|
+
max_turns_per_session: number;
|
|
2643
|
+
mode: string;
|
|
2644
|
+
organization_id: string;
|
|
2645
|
+
resource_id: string;
|
|
2646
|
+
slug: string;
|
|
2647
|
+
tool_policy: Json;
|
|
2648
|
+
updated_at: string;
|
|
2649
|
+
};
|
|
2650
|
+
Insert: {
|
|
2651
|
+
allowed_origins?: string[];
|
|
2652
|
+
branding?: Json;
|
|
2653
|
+
capture_fields?: Json;
|
|
2654
|
+
code_hash?: string | null;
|
|
2655
|
+
code_salt?: string | null;
|
|
2656
|
+
created_at?: string;
|
|
2657
|
+
disabled_at?: string | null;
|
|
2658
|
+
expires_at?: string | null;
|
|
2659
|
+
id?: string;
|
|
2660
|
+
max_sessions_per_visitor?: number;
|
|
2661
|
+
max_turns_per_session?: number;
|
|
2662
|
+
mode?: string;
|
|
2663
|
+
organization_id: string;
|
|
2664
|
+
resource_id: string;
|
|
2665
|
+
slug: string;
|
|
2666
|
+
tool_policy?: Json;
|
|
2667
|
+
updated_at?: string;
|
|
2668
|
+
};
|
|
2669
|
+
Update: {
|
|
2670
|
+
allowed_origins?: string[];
|
|
2671
|
+
branding?: Json;
|
|
2672
|
+
capture_fields?: Json;
|
|
2673
|
+
code_hash?: string | null;
|
|
2674
|
+
code_salt?: string | null;
|
|
2675
|
+
created_at?: string;
|
|
2676
|
+
disabled_at?: string | null;
|
|
2677
|
+
expires_at?: string | null;
|
|
2678
|
+
id?: string;
|
|
2679
|
+
max_sessions_per_visitor?: number;
|
|
2680
|
+
max_turns_per_session?: number;
|
|
2681
|
+
mode?: string;
|
|
2682
|
+
organization_id?: string;
|
|
2683
|
+
resource_id?: string;
|
|
2684
|
+
slug?: string;
|
|
2685
|
+
tool_policy?: Json;
|
|
2686
|
+
updated_at?: string;
|
|
2687
|
+
};
|
|
2688
|
+
Relationships: [
|
|
2689
|
+
{
|
|
2690
|
+
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
2691
|
+
columns: ["organization_id"];
|
|
2692
|
+
isOneToOne: false;
|
|
2693
|
+
referencedRelation: "organizations";
|
|
2694
|
+
referencedColumns: ["id"];
|
|
2695
|
+
}
|
|
2696
|
+
];
|
|
2697
|
+
};
|
|
2633
2698
|
api_keys: {
|
|
2634
2699
|
Row: {
|
|
2635
2700
|
created_at: string | null;
|
|
@@ -3537,138 +3602,6 @@ type Database = {
|
|
|
3537
3602
|
};
|
|
3538
3603
|
Relationships: [];
|
|
3539
3604
|
};
|
|
3540
|
-
agent_access_grants: {
|
|
3541
|
-
Row: {
|
|
3542
|
-
allowed_origins: string[];
|
|
3543
|
-
branding: Json;
|
|
3544
|
-
capture_fields: Json;
|
|
3545
|
-
code_hash: string | null;
|
|
3546
|
-
code_salt: string | null;
|
|
3547
|
-
created_at: string;
|
|
3548
|
-
disabled_at: string | null;
|
|
3549
|
-
expires_at: string | null;
|
|
3550
|
-
id: string;
|
|
3551
|
-
max_sessions_per_visitor: number;
|
|
3552
|
-
max_turns_per_session: number;
|
|
3553
|
-
mode: string;
|
|
3554
|
-
organization_id: string;
|
|
3555
|
-
resource_id: string;
|
|
3556
|
-
slug: string;
|
|
3557
|
-
tool_policy: Json;
|
|
3558
|
-
updated_at: string;
|
|
3559
|
-
};
|
|
3560
|
-
Insert: {
|
|
3561
|
-
allowed_origins?: string[];
|
|
3562
|
-
branding?: Json;
|
|
3563
|
-
capture_fields?: Json;
|
|
3564
|
-
code_hash?: string | null;
|
|
3565
|
-
code_salt?: string | null;
|
|
3566
|
-
created_at?: string;
|
|
3567
|
-
disabled_at?: string | null;
|
|
3568
|
-
expires_at?: string | null;
|
|
3569
|
-
id?: string;
|
|
3570
|
-
max_sessions_per_visitor?: number;
|
|
3571
|
-
max_turns_per_session?: number;
|
|
3572
|
-
mode?: string;
|
|
3573
|
-
organization_id: string;
|
|
3574
|
-
resource_id: string;
|
|
3575
|
-
slug: string;
|
|
3576
|
-
tool_policy?: Json;
|
|
3577
|
-
updated_at?: string;
|
|
3578
|
-
};
|
|
3579
|
-
Update: {
|
|
3580
|
-
allowed_origins?: string[];
|
|
3581
|
-
branding?: Json;
|
|
3582
|
-
capture_fields?: Json;
|
|
3583
|
-
code_hash?: string | null;
|
|
3584
|
-
code_salt?: string | null;
|
|
3585
|
-
created_at?: string;
|
|
3586
|
-
disabled_at?: string | null;
|
|
3587
|
-
expires_at?: string | null;
|
|
3588
|
-
id?: string;
|
|
3589
|
-
max_sessions_per_visitor?: number;
|
|
3590
|
-
max_turns_per_session?: number;
|
|
3591
|
-
mode?: string;
|
|
3592
|
-
organization_id?: string;
|
|
3593
|
-
resource_id?: string;
|
|
3594
|
-
slug?: string;
|
|
3595
|
-
tool_policy?: Json;
|
|
3596
|
-
updated_at?: string;
|
|
3597
|
-
};
|
|
3598
|
-
Relationships: [
|
|
3599
|
-
{
|
|
3600
|
-
foreignKeyName: "agent_access_grants_organization_id_fkey";
|
|
3601
|
-
columns: ["organization_id"];
|
|
3602
|
-
isOneToOne: false;
|
|
3603
|
-
referencedRelation: "organizations";
|
|
3604
|
-
referencedColumns: ["id"];
|
|
3605
|
-
}
|
|
3606
|
-
];
|
|
3607
|
-
};
|
|
3608
|
-
agent_chat_capabilities: {
|
|
3609
|
-
Row: {
|
|
3610
|
-
created_at: string;
|
|
3611
|
-
expires_at: string;
|
|
3612
|
-
grant_id: string;
|
|
3613
|
-
id: string;
|
|
3614
|
-
organization_id: string;
|
|
3615
|
-
origin: string | null;
|
|
3616
|
-
resource_id: string;
|
|
3617
|
-
revoked_at: string | null;
|
|
3618
|
-
session_id: string | null;
|
|
3619
|
-
token_hash: string;
|
|
3620
|
-
visitor_id: string | null;
|
|
3621
|
-
};
|
|
3622
|
-
Insert: {
|
|
3623
|
-
created_at?: string;
|
|
3624
|
-
expires_at: string;
|
|
3625
|
-
grant_id: string;
|
|
3626
|
-
id?: string;
|
|
3627
|
-
organization_id: string;
|
|
3628
|
-
origin?: string | null;
|
|
3629
|
-
resource_id: string;
|
|
3630
|
-
revoked_at?: string | null;
|
|
3631
|
-
session_id?: string | null;
|
|
3632
|
-
token_hash: string;
|
|
3633
|
-
visitor_id?: string | null;
|
|
3634
|
-
};
|
|
3635
|
-
Update: {
|
|
3636
|
-
created_at?: string;
|
|
3637
|
-
expires_at?: string;
|
|
3638
|
-
grant_id?: string;
|
|
3639
|
-
id?: string;
|
|
3640
|
-
organization_id?: string;
|
|
3641
|
-
origin?: string | null;
|
|
3642
|
-
resource_id?: string;
|
|
3643
|
-
revoked_at?: string | null;
|
|
3644
|
-
session_id?: string | null;
|
|
3645
|
-
token_hash?: string;
|
|
3646
|
-
visitor_id?: string | null;
|
|
3647
|
-
};
|
|
3648
|
-
Relationships: [
|
|
3649
|
-
{
|
|
3650
|
-
foreignKeyName: "agent_chat_capabilities_grant_id_fkey";
|
|
3651
|
-
columns: ["grant_id"];
|
|
3652
|
-
isOneToOne: false;
|
|
3653
|
-
referencedRelation: "agent_access_grants";
|
|
3654
|
-
referencedColumns: ["id"];
|
|
3655
|
-
},
|
|
3656
|
-
{
|
|
3657
|
-
foreignKeyName: "agent_chat_capabilities_organization_id_fkey";
|
|
3658
|
-
columns: ["organization_id"];
|
|
3659
|
-
isOneToOne: false;
|
|
3660
|
-
referencedRelation: "organizations";
|
|
3661
|
-
referencedColumns: ["id"];
|
|
3662
|
-
},
|
|
3663
|
-
{
|
|
3664
|
-
foreignKeyName: "agent_chat_capabilities_session_id_fkey";
|
|
3665
|
-
columns: ["session_id"];
|
|
3666
|
-
isOneToOne: false;
|
|
3667
|
-
referencedRelation: "sessions";
|
|
3668
|
-
referencedColumns: ["session_id"];
|
|
3669
|
-
}
|
|
3670
|
-
];
|
|
3671
|
-
};
|
|
3672
3605
|
organizations: {
|
|
3673
3606
|
Row: {
|
|
3674
3607
|
config: Json;
|
|
@@ -4567,11 +4500,11 @@ type Database = {
|
|
|
4567
4500
|
Returns: undefined;
|
|
4568
4501
|
};
|
|
4569
4502
|
auth_jwt_claims: {
|
|
4570
|
-
Args: never
|
|
4503
|
+
Args: Record<PropertyKey, never>;
|
|
4571
4504
|
Returns: Json;
|
|
4572
4505
|
};
|
|
4573
4506
|
auth_uid_safe: {
|
|
4574
|
-
Args: never
|
|
4507
|
+
Args: Record<PropertyKey, never>;
|
|
4575
4508
|
Returns: string;
|
|
4576
4509
|
};
|
|
4577
4510
|
can_assign_role_in_org: {
|
|
@@ -4582,7 +4515,7 @@ type Database = {
|
|
|
4582
4515
|
Returns: boolean;
|
|
4583
4516
|
};
|
|
4584
4517
|
current_user_is_platform_admin: {
|
|
4585
|
-
Args: never
|
|
4518
|
+
Args: Record<PropertyKey, never>;
|
|
4586
4519
|
Returns: boolean;
|
|
4587
4520
|
};
|
|
4588
4521
|
current_user_shares_org_with: {
|
|
@@ -4592,11 +4525,11 @@ type Database = {
|
|
|
4592
4525
|
Returns: boolean;
|
|
4593
4526
|
};
|
|
4594
4527
|
current_user_supabase_id: {
|
|
4595
|
-
Args: never
|
|
4528
|
+
Args: Record<PropertyKey, never>;
|
|
4596
4529
|
Returns: string;
|
|
4597
4530
|
};
|
|
4598
4531
|
detect_stalled_executions: {
|
|
4599
|
-
Args: never
|
|
4532
|
+
Args: Record<PropertyKey, never>;
|
|
4600
4533
|
Returns: undefined;
|
|
4601
4534
|
};
|
|
4602
4535
|
execute_session_turn: {
|
|
@@ -4617,7 +4550,7 @@ type Database = {
|
|
|
4617
4550
|
}[];
|
|
4618
4551
|
};
|
|
4619
4552
|
get_platform_credential_kek: {
|
|
4620
|
-
Args: never
|
|
4553
|
+
Args: Record<PropertyKey, never>;
|
|
4621
4554
|
Returns: string;
|
|
4622
4555
|
};
|
|
4623
4556
|
get_storage_org_id: {
|
|
@@ -4627,7 +4560,7 @@ type Database = {
|
|
|
4627
4560
|
Returns: string;
|
|
4628
4561
|
};
|
|
4629
4562
|
get_workos_user_id: {
|
|
4630
|
-
Args: never
|
|
4563
|
+
Args: Record<PropertyKey, never>;
|
|
4631
4564
|
Returns: string;
|
|
4632
4565
|
};
|
|
4633
4566
|
has_org_access: {
|
|
@@ -4635,10 +4568,7 @@ type Database = {
|
|
|
4635
4568
|
action?: string;
|
|
4636
4569
|
org_id: string;
|
|
4637
4570
|
system_path: string;
|
|
4638
|
-
}
|
|
4639
|
-
Returns: boolean;
|
|
4640
|
-
} | {
|
|
4641
|
-
Args: {
|
|
4571
|
+
} | {
|
|
4642
4572
|
action?: string;
|
|
4643
4573
|
system_path: string;
|
|
4644
4574
|
};
|
|
@@ -4674,15 +4604,15 @@ type Database = {
|
|
|
4674
4604
|
Returns: Json;
|
|
4675
4605
|
};
|
|
4676
4606
|
process_due_schedules: {
|
|
4677
|
-
Args: never
|
|
4607
|
+
Args: Record<PropertyKey, never>;
|
|
4678
4608
|
Returns: Json;
|
|
4679
4609
|
};
|
|
4680
4610
|
recompute_all_memberships: {
|
|
4681
|
-
Args: never
|
|
4611
|
+
Args: Record<PropertyKey, never>;
|
|
4682
4612
|
Returns: undefined;
|
|
4683
4613
|
};
|
|
4684
4614
|
repair_membership_role_assignments: {
|
|
4685
|
-
Args: never
|
|
4615
|
+
Args: Record<PropertyKey, never>;
|
|
4686
4616
|
Returns: {
|
|
4687
4617
|
membership_id: string;
|
|
4688
4618
|
organization_id: string;
|
|
@@ -4712,7 +4642,7 @@ type Database = {
|
|
|
4712
4642
|
Returns: string;
|
|
4713
4643
|
};
|
|
4714
4644
|
upsert_user_profile: {
|
|
4715
|
-
Args: never
|
|
4645
|
+
Args: Record<PropertyKey, never>;
|
|
4716
4646
|
Returns: {
|
|
4717
4647
|
profile_display_name: string;
|
|
4718
4648
|
profile_email: string;
|