@elevasis/sdk 1.34.1 → 1.35.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
CHANGED
|
@@ -45805,7 +45805,7 @@ function wrapAction(commandName, fn) {
|
|
|
45805
45805
|
// package.json
|
|
45806
45806
|
var package_default = {
|
|
45807
45807
|
name: "@elevasis/sdk",
|
|
45808
|
-
version: "1.
|
|
45808
|
+
version: "1.35.0",
|
|
45809
45809
|
description: "SDK for building Elevasis organization resources",
|
|
45810
45810
|
type: "module",
|
|
45811
45811
|
bin: {
|
|
@@ -10898,6 +10898,11 @@ interface RunWorkflowOptions {
|
|
|
10898
10898
|
adapters?: Record<string, unknown>;
|
|
10899
10899
|
context?: RunWorkflowContext;
|
|
10900
10900
|
}
|
|
10901
|
+
type RunLinearWorkflowContext = RunWorkflowContext;
|
|
10902
|
+
interface RunLinearWorkflowOptions {
|
|
10903
|
+
adapters?: Record<string, unknown>;
|
|
10904
|
+
context?: RunLinearWorkflowContext;
|
|
10905
|
+
}
|
|
10901
10906
|
interface WorkflowStepEvent {
|
|
10902
10907
|
type: string;
|
|
10903
10908
|
stepId?: string;
|
|
@@ -10914,7 +10919,17 @@ interface RunWorkflowResult<TOutput = unknown> {
|
|
|
10914
10919
|
logs: LogEntry[];
|
|
10915
10920
|
stepEvents: WorkflowStepEvent[];
|
|
10916
10921
|
}
|
|
10922
|
+
interface LinearWorkflowStepEvent {
|
|
10923
|
+
type: 'step-completed';
|
|
10924
|
+
stepId: string;
|
|
10925
|
+
output: unknown;
|
|
10926
|
+
}
|
|
10927
|
+
interface RunLinearWorkflowResult<TOutput = unknown> {
|
|
10928
|
+
output: TOutput;
|
|
10929
|
+
stepEvents: LinearWorkflowStepEvent[];
|
|
10930
|
+
}
|
|
10917
10931
|
declare function runWorkflow<TOutput = unknown>(definition: WorkflowDefinition, input: unknown, options?: RunWorkflowOptions): Promise<RunWorkflowResult<TOutput>>;
|
|
10932
|
+
declare function runLinearWorkflow<TOutput = unknown>(definition: WorkflowDefinition, input: unknown, options?: RunLinearWorkflowOptions): Promise<RunLinearWorkflowResult<TOutput>>;
|
|
10918
10933
|
|
|
10919
10934
|
interface AssertResourceRegistryOptions {
|
|
10920
10935
|
organizationName?: string;
|
|
@@ -10956,5 +10971,5 @@ declare const createMockStripe: (_credential: string, overrides?: MockAdapterOve
|
|
|
10956
10971
|
declare const createMockAnymailfinder: (_credential: string, overrides?: MockAdapterOverrides<AnymailfinderToolMap>) => TypedAdapter<AnymailfinderToolMap>;
|
|
10957
10972
|
declare const createMockMillionVerifier: (_credential: string, overrides?: MockAdapterOverrides<MillionVerifierToolMap>) => TypedAdapter<MillionVerifierToolMap>;
|
|
10958
10973
|
|
|
10959
|
-
export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runWorkflow };
|
|
10960
|
-
export type { AssertResourceRegistryOptions, MockAdapterOverrides, MockLlmAdapter, RunWorkflowContext, RunWorkflowOptions, RunWorkflowResult, WorkflowStepEvent };
|
|
10974
|
+
export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runLinearWorkflow, runWorkflow };
|
|
10975
|
+
export type { AssertResourceRegistryOptions, LinearWorkflowStepEvent, MockAdapterOverrides, MockLlmAdapter, RunLinearWorkflowContext, RunLinearWorkflowOptions, RunLinearWorkflowResult, RunWorkflowContext, RunWorkflowOptions, RunWorkflowResult, WorkflowStepEvent };
|
package/dist/test-utils/index.js
CHANGED
|
@@ -10394,6 +10394,29 @@ function extractStepEvents(logs) {
|
|
|
10394
10394
|
];
|
|
10395
10395
|
});
|
|
10396
10396
|
}
|
|
10397
|
+
function createLinearWorkflowContext(workflow, stepId, options) {
|
|
10398
|
+
const context = options.context ?? {};
|
|
10399
|
+
return {
|
|
10400
|
+
executionId: context.executionId ?? `test-${workflow.config.resourceId}`,
|
|
10401
|
+
organizationId: context.organizationId ?? "test-org",
|
|
10402
|
+
organizationName: context.organizationName ?? "Test Organization",
|
|
10403
|
+
resourceId: workflow.config.resourceId,
|
|
10404
|
+
sessionId: context.sessionId ?? `test-session-${stepId}`,
|
|
10405
|
+
sessionTurnNumber: context.sessionTurnNumber,
|
|
10406
|
+
parentExecutionId: context.parentExecutionId,
|
|
10407
|
+
executionDepth: context.executionDepth ?? 0,
|
|
10408
|
+
adapters: options.adapters,
|
|
10409
|
+
store: /* @__PURE__ */ new Map(),
|
|
10410
|
+
logger: {
|
|
10411
|
+
debug: () => void 0,
|
|
10412
|
+
info: () => void 0,
|
|
10413
|
+
warn: () => void 0,
|
|
10414
|
+
error: () => void 0
|
|
10415
|
+
},
|
|
10416
|
+
onMessageEvent: async () => void 0,
|
|
10417
|
+
onHeartbeat: async () => void 0
|
|
10418
|
+
};
|
|
10419
|
+
}
|
|
10397
10420
|
async function runWorkflow(definition, input, options = {}) {
|
|
10398
10421
|
const context = options.context ?? {};
|
|
10399
10422
|
const { output, logs } = await executeWorkflow(definition, input, {
|
|
@@ -10412,6 +10435,31 @@ async function runWorkflow(definition, input, options = {}) {
|
|
|
10412
10435
|
stepEvents: extractStepEvents(logs)
|
|
10413
10436
|
};
|
|
10414
10437
|
}
|
|
10438
|
+
async function runLinearWorkflow(definition, input, options = {}) {
|
|
10439
|
+
let currentStepId = definition.entryPoint;
|
|
10440
|
+
let currentInput = definition.contract.inputSchema.parse(input);
|
|
10441
|
+
const stepEvents = [];
|
|
10442
|
+
while (currentStepId) {
|
|
10443
|
+
const step = definition.steps[currentStepId];
|
|
10444
|
+
if (!step) {
|
|
10445
|
+
throw new Error(`Workflow step "${currentStepId}" is not registered`);
|
|
10446
|
+
}
|
|
10447
|
+
const stepInput = step.inputSchema.parse(currentInput);
|
|
10448
|
+
const output = step.outputSchema.parse(
|
|
10449
|
+
await step.handler(stepInput, createLinearWorkflowContext(definition, currentStepId, options))
|
|
10450
|
+
);
|
|
10451
|
+
stepEvents.push({ type: "step-completed", stepId: currentStepId, output });
|
|
10452
|
+
currentInput = output;
|
|
10453
|
+
if (step.next === null) {
|
|
10454
|
+
currentStepId = null;
|
|
10455
|
+
} else if (step.next.type === "linear") {
|
|
10456
|
+
currentStepId = step.next.target;
|
|
10457
|
+
} else {
|
|
10458
|
+
throw new Error("runLinearWorkflow only supports linear workflow steps");
|
|
10459
|
+
}
|
|
10460
|
+
}
|
|
10461
|
+
return { output: currentInput, stepEvents };
|
|
10462
|
+
}
|
|
10415
10463
|
|
|
10416
10464
|
// src/test-utils/registry.ts
|
|
10417
10465
|
function assertResourceRegistry(spec, options = {}) {
|
|
@@ -27573,4 +27621,4 @@ chai/index.js:
|
|
|
27573
27621
|
*)
|
|
27574
27622
|
*/
|
|
27575
27623
|
|
|
27576
|
-
export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runWorkflow };
|
|
27624
|
+
export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runLinearWorkflow, runWorkflow };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"tsup": "^8.0.0",
|
|
59
59
|
"typescript": "5.9.2",
|
|
60
60
|
"zod": "^4.1.0",
|
|
61
|
-
"@repo/core": "0.
|
|
62
|
-
"@repo/
|
|
63
|
-
"@repo/
|
|
61
|
+
"@repo/core": "0.48.0",
|
|
62
|
+
"@repo/eslint-config": "0.0.0",
|
|
63
|
+
"@repo/typescript-config": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"lint": "eslint src --max-warnings 0",
|
|
@@ -10,8 +10,10 @@ Read-only browser primitives for the Organization Model knowledge graph.
|
|
|
10
10
|
| `KnowledgeTree` | By-feature primary tree with hierarchical features and multi-governance duplication. |
|
|
11
11
|
| `KnowledgeNodeList` | Legacy flat list of node summary cards; exported for compatibility. |
|
|
12
12
|
| `KnowledgeNodeView` | Single knowledge-node detail view using `NodeDescribeShell` and relationship groups. |
|
|
13
|
-
| `KnowledgeSearchBar` | Client-side search over `_generated/knowledge-search-index.json`. |
|
|
14
|
-
| `
|
|
13
|
+
| `KnowledgeSearchBar` | Client-side search over `_generated/knowledge-search-index.json`. |
|
|
14
|
+
| `KnowledgeNodeDetailRouteView` | Shared `/knowledge/$nodeId` content route view; apps keep TanStack route adapters and navigation wiring local. |
|
|
15
|
+
| `KnowledgeRouteIds` helpers | Decode route ids, resolve Knowledge route targets, and derive route labels for app-local breadcrumbs. |
|
|
16
|
+
| `KnowledgeSidebarMiddle` | Deprecated legacy sidebar middle section; active sidebar lives under `features/knowledge/sidebar`. |
|
|
15
17
|
| `KNOWLEDGE_ITEMS` | Deprecated default sidebar nav items retained for compatibility. |
|
|
16
18
|
| `KnowledgeMDXProvider`, `useKnowledgeAllowlist`, `KNOWLEDGE_ALLOWLIST` | MDX runtime allowlist (`Card`, `Cards`, `Step`, `Steps`, `Callout`, `Tab`, `Tabs`). |
|
|
17
19
|
| `KNOWLEDGE_BODIES` | Build-time-compiled MDX components keyed by node id. |
|