@elevasis/sdk 1.35.1 → 1.36.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/cli.cjs +204 -10
- package/dist/index.js +1 -0
- package/dist/test-utils/index.d.ts +1 -1
- package/dist/test-utils/index.js +10 -10
- package/dist/types/worker/index.d.ts +1 -1
- package/dist/worker/index.js +10 -10
- package/package.json +2 -2
- 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/dist/cli.cjs
CHANGED
|
@@ -44925,6 +44925,7 @@ function serializeOrganization(resources) {
|
|
|
44925
44925
|
status: agent.config.status,
|
|
44926
44926
|
links: agent.config.links,
|
|
44927
44927
|
category: agent.config.category,
|
|
44928
|
+
sessionCapable: agent.config.sessionCapable ?? false,
|
|
44928
44929
|
...getGovernanceMetadata(resourceId, agent.config.resource)
|
|
44929
44930
|
});
|
|
44930
44931
|
commandViewAgents.push({
|
|
@@ -45807,7 +45808,7 @@ function wrapAction(commandName, fn) {
|
|
|
45807
45808
|
// package.json
|
|
45808
45809
|
var package_default = {
|
|
45809
45810
|
name: "@elevasis/sdk",
|
|
45810
|
-
version: "1.
|
|
45811
|
+
version: "1.36.1",
|
|
45811
45812
|
description: "SDK for building Elevasis organization resources",
|
|
45812
45813
|
type: "module",
|
|
45813
45814
|
bin: {
|
|
@@ -51943,15 +51944,23 @@ function registerAgentGet(program3) {
|
|
|
51943
51944
|
printJson6(definition);
|
|
51944
51945
|
return;
|
|
51945
51946
|
}
|
|
51946
|
-
|
|
51947
|
-
|
|
51948
|
-
|
|
51949
|
-
|
|
51950
|
-
|
|
51947
|
+
const config3 = definition.config ?? {};
|
|
51948
|
+
const name = config3.name ?? definition.name ?? config3.resourceId ?? definition.resourceId ?? id;
|
|
51949
|
+
const resourceId = config3.resourceId ?? definition.resourceId ?? id;
|
|
51950
|
+
const type = config3.type ?? definition.type ?? "agent";
|
|
51951
|
+
const description = config3.description ?? definition.description;
|
|
51952
|
+
const kind = config3.kind ?? definition.agentKind;
|
|
51953
|
+
const sessionCapable = config3.sessionCapable ?? definition.sessionCapable;
|
|
51954
|
+
const status = config3.status ?? definition.status;
|
|
51955
|
+
console.log(source_default.magenta(`Agent: ${name}`));
|
|
51956
|
+
console.log(source_default.gray(` ID: ${resourceId}`));
|
|
51957
|
+
console.log(source_default.gray(` Type: ${type}`));
|
|
51958
|
+
if (description) console.log(source_default.gray(` Description: ${description}`));
|
|
51959
|
+
if (kind) console.log(source_default.gray(` Kind: ${kind}`));
|
|
51951
51960
|
if (definition.systemPath) console.log(source_default.gray(` System: ${definition.systemPath}`));
|
|
51952
51961
|
if (definition.actsAsRoleId) console.log(source_default.gray(` Acts as role: ${definition.actsAsRoleId}`));
|
|
51953
|
-
console.log(source_default.gray(` Session capable: ${
|
|
51954
|
-
if (
|
|
51962
|
+
console.log(source_default.gray(` Session capable: ${sessionCapable ? "yes" : "no"}`));
|
|
51963
|
+
if (status) console.log(source_default.gray(` Status: ${status}`));
|
|
51955
51964
|
})
|
|
51956
51965
|
);
|
|
51957
51966
|
}
|
|
@@ -52048,6 +52057,14 @@ function messageText(message) {
|
|
|
52048
52057
|
if (value !== void 0) return String(value);
|
|
52049
52058
|
return JSON.stringify(message, null, 2);
|
|
52050
52059
|
}
|
|
52060
|
+
async function fetchLatestAssistantMessage(sessionId, apiUrl) {
|
|
52061
|
+
const result = await fetchSessionMessages(sessionId, apiUrl, { all: true });
|
|
52062
|
+
for (let i = result.messages.length - 1; i >= 0; i -= 1) {
|
|
52063
|
+
const role = result.messages[i].role ?? result.messages[i].messageType;
|
|
52064
|
+
if (role === "assistant") return result.messages[i];
|
|
52065
|
+
}
|
|
52066
|
+
return result.messages[result.messages.length - 1];
|
|
52067
|
+
}
|
|
52051
52068
|
function printMessage(message) {
|
|
52052
52069
|
const index = message.messageIndex === void 0 ? "" : `#${message.messageIndex}`;
|
|
52053
52070
|
const role = message.role ?? message.messageType ?? "message";
|
|
@@ -52143,8 +52160,21 @@ function registerSessionTurn(program3) {
|
|
|
52143
52160
|
console.log(source_default.gray(` Execution ID: ${result.executionId}`));
|
|
52144
52161
|
if (result.duration !== void 0) console.log(source_default.gray(` Duration: ${result.duration}ms`));
|
|
52145
52162
|
console.log();
|
|
52146
|
-
|
|
52147
|
-
|
|
52163
|
+
const hasOutput = result.output !== void 0 && result.output !== null;
|
|
52164
|
+
if (hasOutput) {
|
|
52165
|
+
console.log(source_default.green("Output:"));
|
|
52166
|
+
console.log(JSON.stringify(result.output, null, 2));
|
|
52167
|
+
return;
|
|
52168
|
+
}
|
|
52169
|
+
const latest = await fetchLatestAssistantMessage(id, apiUrl);
|
|
52170
|
+
if (latest) {
|
|
52171
|
+
console.log(source_default.green("Reply:"));
|
|
52172
|
+
printMessage(latest);
|
|
52173
|
+
} else {
|
|
52174
|
+
console.log(source_default.green("Output:"));
|
|
52175
|
+
console.log(JSON.stringify(result.output, null, 2));
|
|
52176
|
+
console.log(source_default.gray(" (no structured output; run `session:messages` to view the transcript)"));
|
|
52177
|
+
}
|
|
52148
52178
|
})
|
|
52149
52179
|
);
|
|
52150
52180
|
}
|
|
@@ -52198,6 +52228,166 @@ function registerSessionCommands(program3) {
|
|
|
52198
52228
|
registerSessionEnd(program3);
|
|
52199
52229
|
}
|
|
52200
52230
|
|
|
52231
|
+
// src/cli/commands/grant/grant.ts
|
|
52232
|
+
init_source();
|
|
52233
|
+
init_config();
|
|
52234
|
+
function printJson8(value) {
|
|
52235
|
+
console.log(JSON.stringify(value, null, 2));
|
|
52236
|
+
}
|
|
52237
|
+
function appendQuery7(params, key, value) {
|
|
52238
|
+
if (value === void 0 || value === null || value === "" || value === false) return;
|
|
52239
|
+
params.set(key, String(value));
|
|
52240
|
+
}
|
|
52241
|
+
function endpointWithQuery7(endpoint, params) {
|
|
52242
|
+
const query = params.toString();
|
|
52243
|
+
return query ? `${endpoint}?${query}` : endpoint;
|
|
52244
|
+
}
|
|
52245
|
+
function parseJson2(value, label) {
|
|
52246
|
+
if (value === void 0) return void 0;
|
|
52247
|
+
try {
|
|
52248
|
+
return JSON.parse(value);
|
|
52249
|
+
} catch (error46) {
|
|
52250
|
+
const message = error46 instanceof Error ? error46.message : String(error46);
|
|
52251
|
+
throw new Error(`Invalid JSON for ${label}: ${message}`);
|
|
52252
|
+
}
|
|
52253
|
+
}
|
|
52254
|
+
function parsePositiveInt(value, label) {
|
|
52255
|
+
if (value === void 0) return void 0;
|
|
52256
|
+
const parsed = Number(value);
|
|
52257
|
+
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
52258
|
+
throw new Error(`${label} must be a positive integer`);
|
|
52259
|
+
}
|
|
52260
|
+
return parsed;
|
|
52261
|
+
}
|
|
52262
|
+
function parseOrigins(value) {
|
|
52263
|
+
if (value === void 0) return void 0;
|
|
52264
|
+
const origins = value.split(",").map((origin) => origin.trim()).filter(Boolean);
|
|
52265
|
+
return origins.length > 0 ? origins : void 0;
|
|
52266
|
+
}
|
|
52267
|
+
function deriveSlugFromResourceId(resourceId) {
|
|
52268
|
+
const slug = resourceId.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
52269
|
+
if (!slug) {
|
|
52270
|
+
throw new Error("--resource must contain at least one alphanumeric character when --slug is omitted");
|
|
52271
|
+
}
|
|
52272
|
+
return slug;
|
|
52273
|
+
}
|
|
52274
|
+
function getPublicPath(slug) {
|
|
52275
|
+
return `/public/agents/${encodeURIComponent(slug)}`;
|
|
52276
|
+
}
|
|
52277
|
+
function resolvePublicUrl(slug, publicBaseUrl) {
|
|
52278
|
+
const path3 = getPublicPath(slug);
|
|
52279
|
+
const baseUrl = publicBaseUrl ?? process.env.ELEVASIS_PUBLIC_BASE_URL ?? process.env.ELEVASIS_PUBLIC_APP_URL;
|
|
52280
|
+
if (!baseUrl) return path3;
|
|
52281
|
+
try {
|
|
52282
|
+
return new URL(path3, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`).toString();
|
|
52283
|
+
} catch {
|
|
52284
|
+
throw new Error("--public-base-url must be a valid URL");
|
|
52285
|
+
}
|
|
52286
|
+
}
|
|
52287
|
+
function printGrant(grant) {
|
|
52288
|
+
const status = grant.isDisabled ? "disabled" : "active";
|
|
52289
|
+
console.log(source_default.white(` ${source_default.bold(grant.slug)} ${source_default.gray(status)}`));
|
|
52290
|
+
console.log(source_default.gray(` Agent: ${grant.resourceId}`));
|
|
52291
|
+
console.log(source_default.gray(` Mode: ${grant.mode}${grant.requiresCode ? " (code required)" : ""}`));
|
|
52292
|
+
console.log(source_default.gray(` Origins: ${grant.allowedOrigins.length > 0 ? grant.allowedOrigins.join(", ") : "any"}`));
|
|
52293
|
+
console.log(source_default.gray(` Limits: turns=${grant.maxTurnsPerSession}, sessions/visitor=${grant.maxSessionsPerVisitor}`));
|
|
52294
|
+
if (grant.expiresAt) console.log(source_default.gray(` Expires: ${new Date(grant.expiresAt).toLocaleString()}`));
|
|
52295
|
+
if (grant.disabledAt) console.log(source_default.gray(` Disabled: ${new Date(grant.disabledAt).toLocaleString()}`));
|
|
52296
|
+
}
|
|
52297
|
+
function registerGrantList(program3) {
|
|
52298
|
+
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(
|
|
52299
|
+
wrapAction("grant:list", async (options) => {
|
|
52300
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52301
|
+
const params = new URLSearchParams();
|
|
52302
|
+
appendQuery7(params, "resourceId", options.resourceId);
|
|
52303
|
+
appendQuery7(params, "includeDisabled", options.includeDisabled ? "true" : void 0);
|
|
52304
|
+
const result = await apiGet(
|
|
52305
|
+
endpointWithQuery7("/api/external/agent-access-grants", params),
|
|
52306
|
+
apiUrl
|
|
52307
|
+
);
|
|
52308
|
+
if (options.json) {
|
|
52309
|
+
printJson8(result);
|
|
52310
|
+
return;
|
|
52311
|
+
}
|
|
52312
|
+
if (result.grants.length === 0) {
|
|
52313
|
+
console.log(source_default.yellow("No agent access grants found."));
|
|
52314
|
+
return;
|
|
52315
|
+
}
|
|
52316
|
+
console.log(source_default.cyan(`Agent access grants (${result.grants.length} of ${result.total}):`));
|
|
52317
|
+
for (const grant of result.grants) {
|
|
52318
|
+
printGrant(grant);
|
|
52319
|
+
console.log();
|
|
52320
|
+
}
|
|
52321
|
+
})
|
|
52322
|
+
);
|
|
52323
|
+
}
|
|
52324
|
+
function registerGrantCreate(program3) {
|
|
52325
|
+
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(
|
|
52326
|
+
wrapAction("grant:create", async (options) => {
|
|
52327
|
+
const mode = options.mode ?? "public";
|
|
52328
|
+
if (mode !== "public" && mode !== "code") {
|
|
52329
|
+
throw new Error("--mode must be public or code");
|
|
52330
|
+
}
|
|
52331
|
+
if (mode === "code" && !options.code) {
|
|
52332
|
+
throw new Error("--code is required when --mode code");
|
|
52333
|
+
}
|
|
52334
|
+
const slug = options.slug ?? deriveSlugFromResourceId(options.resource);
|
|
52335
|
+
const body = {
|
|
52336
|
+
resourceId: options.resource,
|
|
52337
|
+
slug,
|
|
52338
|
+
mode
|
|
52339
|
+
};
|
|
52340
|
+
if (options.code) body.code = options.code;
|
|
52341
|
+
if (options.expiresAt) body.expiresAt = options.expiresAt;
|
|
52342
|
+
const allowedOrigins = parseOrigins(options.origins);
|
|
52343
|
+
if (allowedOrigins) body.allowedOrigins = allowedOrigins;
|
|
52344
|
+
const maxTurns = parsePositiveInt(options.maxTurns, "--max-turns");
|
|
52345
|
+
if (maxTurns !== void 0) body.maxTurnsPerSession = maxTurns;
|
|
52346
|
+
const maxSessions = parsePositiveInt(options.maxSessions, "--max-sessions");
|
|
52347
|
+
if (maxSessions !== void 0) body.maxSessionsPerVisitor = maxSessions;
|
|
52348
|
+
const branding = parseJson2(options.branding, "--branding");
|
|
52349
|
+
if (branding !== void 0) body.branding = branding;
|
|
52350
|
+
const captureFields = parseJson2(options.captureFields, "--capture-fields");
|
|
52351
|
+
if (captureFields !== void 0) body.captureFields = captureFields;
|
|
52352
|
+
const toolPolicy = parseJson2(options.toolPolicy, "--tool-policy");
|
|
52353
|
+
if (toolPolicy !== void 0) body.toolPolicy = toolPolicy;
|
|
52354
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52355
|
+
const result = await apiPost("/api/external/agent-access-grants", body, apiUrl);
|
|
52356
|
+
if (options.json) {
|
|
52357
|
+
printJson8(result.grant);
|
|
52358
|
+
return;
|
|
52359
|
+
}
|
|
52360
|
+
console.log(source_default.green(`Created agent access grant ${result.grant.slug}.`));
|
|
52361
|
+
console.log(source_default.gray(` Public URL: ${resolvePublicUrl(result.grant.slug, options.publicBaseUrl)}`));
|
|
52362
|
+
printGrant(result.grant);
|
|
52363
|
+
})
|
|
52364
|
+
);
|
|
52365
|
+
}
|
|
52366
|
+
function registerGrantDisable(program3) {
|
|
52367
|
+
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(
|
|
52368
|
+
wrapAction("grant:disable", async (slug, options) => {
|
|
52369
|
+
const apiUrl = resolveApiUrl(options.apiUrl);
|
|
52370
|
+
const result = await apiPost(
|
|
52371
|
+
`/api/external/agent-access-grants/${encodeURIComponent(slug)}/disable`,
|
|
52372
|
+
{},
|
|
52373
|
+
apiUrl
|
|
52374
|
+
);
|
|
52375
|
+
if (options.json) {
|
|
52376
|
+
printJson8(result.grant);
|
|
52377
|
+
return;
|
|
52378
|
+
}
|
|
52379
|
+
console.log(source_default.green(`Disabled agent access grant ${result.grant.slug}.`));
|
|
52380
|
+
})
|
|
52381
|
+
);
|
|
52382
|
+
}
|
|
52383
|
+
|
|
52384
|
+
// src/cli/commands/grant/index.ts
|
|
52385
|
+
function registerGrantCommands(program3) {
|
|
52386
|
+
registerGrantList(program3);
|
|
52387
|
+
registerGrantCreate(program3);
|
|
52388
|
+
registerGrantDisable(program3);
|
|
52389
|
+
}
|
|
52390
|
+
|
|
52201
52391
|
// src/cli/commands/om/index.ts
|
|
52202
52392
|
function registerOmScaffoldCommands(program3) {
|
|
52203
52393
|
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) => {
|
|
@@ -52450,6 +52640,9 @@ Commands:
|
|
|
52450
52640
|
elevasis-sdk session:list List agent sessions
|
|
52451
52641
|
elevasis-sdk session:get <id> Get session details
|
|
52452
52642
|
elevasis-sdk session:end <id> End an active agent session
|
|
52643
|
+
elevasis-sdk grant:list List public/code-gated agent access grants
|
|
52644
|
+
elevasis-sdk grant:create --resource <id> Create an agent access grant
|
|
52645
|
+
elevasis-sdk grant:disable <slug> Disable an agent access grant
|
|
52453
52646
|
elevasis-sdk acquisition:list:list List acquisition lists
|
|
52454
52647
|
elevasis-sdk acquisition:deal:list List acquisition deals
|
|
52455
52648
|
elevasis-sdk knowledge:generate Generate knowledge nodes from MDX files
|
|
@@ -52487,6 +52680,7 @@ registerQueueCommands(program2);
|
|
|
52487
52680
|
registerScheduleCommands(program2);
|
|
52488
52681
|
registerAgentCommands(program2);
|
|
52489
52682
|
registerSessionCommands(program2);
|
|
52683
|
+
registerGrantCommands(program2);
|
|
52490
52684
|
registerAcquisitionCommands(program2);
|
|
52491
52685
|
registerKnowledgeCommands(program2);
|
|
52492
52686
|
registerRequestCommands(program2);
|
package/dist/index.js
CHANGED
|
@@ -5226,6 +5226,7 @@ function serializeOrganization(resources) {
|
|
|
5226
5226
|
status: agent.config.status,
|
|
5227
5227
|
links: agent.config.links,
|
|
5228
5228
|
category: agent.config.category,
|
|
5229
|
+
sessionCapable: agent.config.sessionCapable ?? false,
|
|
5229
5230
|
...getGovernanceMetadata(resourceId, agent.config.resource)
|
|
5230
5231
|
});
|
|
5231
5232
|
commandViewAgents.push({
|
|
@@ -10797,7 +10797,7 @@ type TypedAdapter<TMap extends ToolMethodMap$1> = {
|
|
|
10797
10797
|
*
|
|
10798
10798
|
* Parent -> Worker: { type: 'abort' } (graceful abort before terminate)
|
|
10799
10799
|
*
|
|
10800
|
-
* Worker -> Parent: { type: 'log', entry: { level, message, timestamp, executionId } }
|
|
10800
|
+
* Worker -> Parent: { type: 'log', entry: { level, message, timestamp, executionId, context? } }
|
|
10801
10801
|
*
|
|
10802
10802
|
* Worker -> Parent: { type: 'tool-call', id, tool, method, params, credential? }
|
|
10803
10803
|
* Parent -> Worker: { type: 'tool-result', id, result?, error?, code? }
|
package/dist/test-utils/index.js
CHANGED
|
@@ -10203,10 +10203,10 @@ async function executeWorkflow(workflow, input, context) {
|
|
|
10203
10203
|
}
|
|
10204
10204
|
function buildWorkerExecutionContext(params) {
|
|
10205
10205
|
const { executionId } = params;
|
|
10206
|
-
const postLog = (level, message) => {
|
|
10206
|
+
const postLog = (level, message, logContext) => {
|
|
10207
10207
|
parentPort.postMessage({
|
|
10208
10208
|
type: "log",
|
|
10209
|
-
entry: { level, message, timestamp: (/* @__PURE__ */ new Date()).toISOString(), executionId }
|
|
10209
|
+
entry: { level, message, timestamp: (/* @__PURE__ */ new Date()).toISOString(), executionId, context: logContext }
|
|
10210
10210
|
});
|
|
10211
10211
|
};
|
|
10212
10212
|
return {
|
|
@@ -10221,21 +10221,21 @@ function buildWorkerExecutionContext(params) {
|
|
|
10221
10221
|
signal: params.signal,
|
|
10222
10222
|
store: /* @__PURE__ */ new Map(),
|
|
10223
10223
|
logger: {
|
|
10224
|
-
debug: (msg) => {
|
|
10224
|
+
debug: (msg, logContext) => {
|
|
10225
10225
|
console.log(`[debug] ${msg}`);
|
|
10226
|
-
postLog("info", msg);
|
|
10226
|
+
postLog("info", msg, logContext);
|
|
10227
10227
|
},
|
|
10228
|
-
info: (msg) => {
|
|
10228
|
+
info: (msg, logContext) => {
|
|
10229
10229
|
console.log(`[info] ${msg}`);
|
|
10230
|
-
postLog("info", msg);
|
|
10230
|
+
postLog("info", msg, logContext);
|
|
10231
10231
|
},
|
|
10232
|
-
warn: (msg) => {
|
|
10232
|
+
warn: (msg, logContext) => {
|
|
10233
10233
|
console.warn(`[warn] ${msg}`);
|
|
10234
|
-
postLog("warn", msg);
|
|
10234
|
+
postLog("warn", msg, logContext);
|
|
10235
10235
|
},
|
|
10236
|
-
error: (msg) => {
|
|
10236
|
+
error: (msg, logContext) => {
|
|
10237
10237
|
console.error(`[error] ${msg}`);
|
|
10238
|
-
postLog("error", msg);
|
|
10238
|
+
postLog("error", msg, logContext);
|
|
10239
10239
|
}
|
|
10240
10240
|
},
|
|
10241
10241
|
onMessageEvent: async (event) => {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Parent -> Worker: { type: 'abort' } (graceful abort before terminate)
|
|
18
18
|
*
|
|
19
|
-
* Worker -> Parent: { type: 'log', entry: { level, message, timestamp, executionId } }
|
|
19
|
+
* Worker -> Parent: { type: 'log', entry: { level, message, timestamp, executionId, context? } }
|
|
20
20
|
*
|
|
21
21
|
* Worker -> Parent: { type: 'tool-call', id, tool, method, params, credential? }
|
|
22
22
|
* Parent -> Worker: { type: 'tool-result', id, result?, error?, code? }
|
package/dist/worker/index.js
CHANGED
|
@@ -6874,10 +6874,10 @@ async function executeWorkflow(workflow, input, context) {
|
|
|
6874
6874
|
}
|
|
6875
6875
|
function buildWorkerExecutionContext(params) {
|
|
6876
6876
|
const { executionId } = params;
|
|
6877
|
-
const postLog = (level, message) => {
|
|
6877
|
+
const postLog = (level, message, logContext) => {
|
|
6878
6878
|
parentPort.postMessage({
|
|
6879
6879
|
type: "log",
|
|
6880
|
-
entry: { level, message, timestamp: (/* @__PURE__ */ new Date()).toISOString(), executionId }
|
|
6880
|
+
entry: { level, message, timestamp: (/* @__PURE__ */ new Date()).toISOString(), executionId, context: logContext }
|
|
6881
6881
|
});
|
|
6882
6882
|
};
|
|
6883
6883
|
return {
|
|
@@ -6892,21 +6892,21 @@ function buildWorkerExecutionContext(params) {
|
|
|
6892
6892
|
signal: params.signal,
|
|
6893
6893
|
store: /* @__PURE__ */ new Map(),
|
|
6894
6894
|
logger: {
|
|
6895
|
-
debug: (msg) => {
|
|
6895
|
+
debug: (msg, logContext) => {
|
|
6896
6896
|
console.log(`[debug] ${msg}`);
|
|
6897
|
-
postLog("info", msg);
|
|
6897
|
+
postLog("info", msg, logContext);
|
|
6898
6898
|
},
|
|
6899
|
-
info: (msg) => {
|
|
6899
|
+
info: (msg, logContext) => {
|
|
6900
6900
|
console.log(`[info] ${msg}`);
|
|
6901
|
-
postLog("info", msg);
|
|
6901
|
+
postLog("info", msg, logContext);
|
|
6902
6902
|
},
|
|
6903
|
-
warn: (msg) => {
|
|
6903
|
+
warn: (msg, logContext) => {
|
|
6904
6904
|
console.warn(`[warn] ${msg}`);
|
|
6905
|
-
postLog("warn", msg);
|
|
6905
|
+
postLog("warn", msg, logContext);
|
|
6906
6906
|
},
|
|
6907
|
-
error: (msg) => {
|
|
6907
|
+
error: (msg, logContext) => {
|
|
6908
6908
|
console.error(`[error] ${msg}`);
|
|
6909
|
-
postLog("error", msg);
|
|
6909
|
+
postLog("error", msg, logContext);
|
|
6910
6910
|
}
|
|
6911
6911
|
},
|
|
6912
6912
|
onMessageEvent: async (event) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"tsup": "^8.0.0",
|
|
59
59
|
"typescript": "5.9.2",
|
|
60
60
|
"zod": "^4.1.0",
|
|
61
|
-
"@repo/core": "0.
|
|
61
|
+
"@repo/core": "0.49.1",
|
|
62
62
|
"@repo/eslint-config": "0.0.0",
|
|
63
63
|
"@repo/typescript-config": "0.0.0"
|
|
64
64
|
},
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"agent": "operator-facing deployed-agent introspection",
|
|
12
12
|
"session": "operator-facing session introspection",
|
|
13
13
|
"queue": "HITL approval queue — surfaced in the UI",
|
|
14
|
+
"grant": "operator-facing public agent access management",
|
|
14
15
|
"schedule": "operator-facing scheduler control",
|
|
15
16
|
"note": "CLI-only in tenant context; /notes is monorepo-internal, not propagated",
|
|
16
17
|
"ui": "infra-only dev toggle (ui:use-local / ui:use-published)",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Agent grants, execution visualizer, and Operations sidebar release train
|
|
2
|
+
|
|
3
|
+
This train publishes coordinated platform updates across `@elevasis/core`, `@elevasis/ui`,
|
|
4
|
+
and `@elevasis/sdk`, then syncs the external template baseline.
|
|
5
|
+
|
|
6
|
+
## What changes for tenant projects
|
|
7
|
+
|
|
8
|
+
1. `@elevasis/sdk` adds `grant:list`, `grant:create`, and `grant:disable` for
|
|
9
|
+
managing public/code-gated agent access grants through the platform API.
|
|
10
|
+
2. `@elevasis/ui` adds shared agent public/private controls and improves the
|
|
11
|
+
agent execution visualizer with per-iteration tool activity.
|
|
12
|
+
3. `@elevasis/core` adds the grant audit activity contract used by platform
|
|
13
|
+
activity feeds.
|
|
14
|
+
4. The template `.claude/registries/skill-coverage.json` now explicitly waives
|
|
15
|
+
the `grant` CLI domain as operator-facing access-management tooling.
|
|
16
|
+
|
|
17
|
+
## Operator action
|
|
18
|
+
|
|
19
|
+
- Run the prepared external sync manifest from the SDK ship artifact.
|
|
20
|
+
- Verify each derived project updates `.claude/registries/skill-coverage.json`.
|
|
21
|
+
- After package baselines are bumped, verify derived package manifests point at
|
|
22
|
+
the newly published `@elevasis/core`, `@elevasis/ui`, and `@elevasis/sdk`
|
|
23
|
+
versions selected by the release steps.
|
|
24
|
+
|
|
25
|
+
## Manual-review exclusions
|
|
26
|
+
|
|
27
|
+
Operations sidebar root-route parity for `external/nirvana-marketing` and
|
|
28
|
+
`external/ZentaraHQ` is intentionally excluded from this ship train. Their
|
|
29
|
+
root routes are project-specific merge-managed surfaces and should be reviewed
|
|
30
|
+
manually before adopting the template Operations manifest mount.
|