@elevasis/sdk 1.54.0 → 1.56.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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/{chunk-ZAVFBZHM.js → chunk-72ZGICTR.js} +247 -6
- package/dist/{chunk-OT4CHFQJ.js → chunk-R3J6BEPO.js} +54 -5
- package/dist/cli.cjs +153 -15
- package/dist/index.d.ts +46 -16
- package/dist/index.js +1 -1
- package/dist/node/index.d.ts +1 -8
- package/dist/node/index.js +3 -14
- package/dist/test-utils/index.js +2 -2
- package/dist/worker/index.d.ts +9 -0
- package/dist/worker/index.js +2 -2
- package/package.json +4 -4
- package/reference/_navigation.md +3 -3
- package/reference/_reference-manifest.json +3 -3
- package/reference/packages/core/src/knowledge/README.md +1 -1
- package/reference/packages/ui/src/knowledge/README.md +32 -32
- package/reference/rules/error-handling.md +50 -1
- package/reference/rules/execution.md +63 -7
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +3 -1
- package/reference/scaffold/recipes/extend-lead-gen.md +2 -1
- package/reference/scaffold/reference/contracts.md +30 -21
- package/reference/sdk/framework/project-structure.mdx +1 -3
- package/reference/ui/exports.mdx +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -23791,14 +23791,25 @@ var init_systems = __esm({
|
|
|
23791
23791
|
* position-derived paths. Both still exist on this schema for backward compat.
|
|
23792
23792
|
*/
|
|
23793
23793
|
systems: external_exports.lazy(() => external_exports.record(external_exports.string().trim().min(1).max(100), SystemEntrySchema)).optional(),
|
|
23794
|
-
/**
|
|
23794
|
+
/**
|
|
23795
|
+
* @deprecated Use systems. Accepted as a compatibility alias during the ontology bridge.
|
|
23796
|
+
*
|
|
23797
|
+
* Accepted on INPUT only. Parsing used to mirror `systems` into this key so that
|
|
23798
|
+
* either spelling could be read off a parsed model, which meant every parsed System
|
|
23799
|
+
* carried the same children twice. Readers that walked both keys then visited each
|
|
23800
|
+
* nested System twice -- `getOrgOsRouteContractSystems` reported 11 checked paths
|
|
23801
|
+
* against command-center's 7 real Systems and would have raised every nested-System
|
|
23802
|
+
* failure as two failures -- and readers that walked this key alone looked correct
|
|
23803
|
+
* while depending entirely on the mirror. Both defects were live. The mirror is gone:
|
|
23804
|
+
* a parsed model now carries children under whichever key the author wrote, so read
|
|
23805
|
+
* `system.systems ?? system.subsystems` (helpers.ts, validation.ts, ontology.ts,
|
|
23806
|
+
* selectDeclaredSystems.ts, validateManifests.ts and SystemOpsView.tsx all do).
|
|
23807
|
+
*/
|
|
23795
23808
|
subsystems: external_exports.lazy(() => external_exports.record(external_exports.string().trim().min(1).max(100), SystemEntrySchema)).optional()
|
|
23796
23809
|
}).strict().refine((system) => system.label !== void 0 || system.title !== void 0, {
|
|
23797
23810
|
path: ["label"],
|
|
23798
23811
|
message: "System must provide label or title"
|
|
23799
|
-
})
|
|
23800
|
-
(system) => system.systems !== void 0 && system.subsystems === void 0 ? { ...system, subsystems: system.systems } : system
|
|
23801
|
-
);
|
|
23812
|
+
});
|
|
23802
23813
|
SystemsDomainSchema = external_exports.record(external_exports.string(), SystemEntrySchema).refine((record2) => Object.entries(record2).every(([key, entry]) => entry.id === key), {
|
|
23803
23814
|
message: "Each system entry id must match its map key"
|
|
23804
23815
|
}).default({});
|
|
@@ -47048,6 +47059,20 @@ var init_api2 = __esm({
|
|
|
47048
47059
|
}
|
|
47049
47060
|
});
|
|
47050
47061
|
|
|
47062
|
+
// ../core/src/platform/errors/index.ts
|
|
47063
|
+
var init_errors6 = __esm({
|
|
47064
|
+
"../core/src/platform/errors/index.ts"() {
|
|
47065
|
+
"use strict";
|
|
47066
|
+
}
|
|
47067
|
+
});
|
|
47068
|
+
|
|
47069
|
+
// ../core/src/platform/errors/disclosure.ts
|
|
47070
|
+
var init_disclosure = __esm({
|
|
47071
|
+
"../core/src/platform/errors/disclosure.ts"() {
|
|
47072
|
+
"use strict";
|
|
47073
|
+
}
|
|
47074
|
+
});
|
|
47075
|
+
|
|
47051
47076
|
// ../core/src/platform/index.ts
|
|
47052
47077
|
var init_platform = __esm({
|
|
47053
47078
|
"../core/src/platform/index.ts"() {
|
|
@@ -47057,6 +47082,8 @@ var init_platform = __esm({
|
|
|
47057
47082
|
init_registry();
|
|
47058
47083
|
init_sse();
|
|
47059
47084
|
init_api2();
|
|
47085
|
+
init_errors6();
|
|
47086
|
+
init_disclosure();
|
|
47060
47087
|
}
|
|
47061
47088
|
});
|
|
47062
47089
|
|
|
@@ -47424,7 +47451,7 @@ var init_sse_executions = __esm({
|
|
|
47424
47451
|
});
|
|
47425
47452
|
|
|
47426
47453
|
// ../core/src/execution/core/api-schemas.ts
|
|
47427
|
-
var PayloadSchema, OptionalPayloadSchema, ExecutionTargetSchema, OriginTrackingSchema, ExternalExecuteRequestSchema, ExternalExecuteResponseSchema, ExecutionEngineExecuteRequestSchema, ExecutionEngineExecuteResponseSchema, CreateCommandQueueTaskSchema, SubmitDecisionSchema, ListCommandQueueTasksSchema, ListExecutionsSchema, DeleteExecutionsSchema;
|
|
47454
|
+
var PayloadSchema, OptionalPayloadSchema, ExecutionTargetSchema, OriginTrackingSchema, ExternalExecuteRequestSchema, ExternalExecuteResponseSchema, ExecutionEngineExecuteRequestSchema, ExecutionEngineExecuteResponseSchema, CreateCommandQueueTaskSchema, SubmitDecisionSchema, ListCommandQueueTasksSchema, ExecutionStatusSchema, ResourceIdParamSchema, ResourceExecutionParamsSchema, ListExecutionsSchema, ListAllExecutionsSchema, DeleteExecutionsSchema, PatchExecutionBodySchema;
|
|
47428
47455
|
var init_api_schemas = __esm({
|
|
47429
47456
|
"../core/src/execution/core/api-schemas.ts"() {
|
|
47430
47457
|
"use strict";
|
|
@@ -47506,12 +47533,35 @@ var init_api_schemas = __esm({
|
|
|
47506
47533
|
status: external_exports.enum(["pending", "approved", "rejected", "expired"]).optional(),
|
|
47507
47534
|
limit: PageLimitSchema.default(20)
|
|
47508
47535
|
}).strict();
|
|
47509
|
-
|
|
47510
|
-
|
|
47536
|
+
ExecutionStatusSchema = external_exports.enum(["pending", "running", "completed", "failed", "warning"]);
|
|
47537
|
+
ResourceIdParamSchema = external_exports.object({
|
|
47538
|
+
resourceId: NonEmptyStringSchema.max(255)
|
|
47511
47539
|
}).strict();
|
|
47540
|
+
ResourceExecutionParamsSchema = external_exports.object({
|
|
47541
|
+
resourceId: NonEmptyStringSchema.max(255),
|
|
47542
|
+
executionId: NonEmptyStringSchema.max(255)
|
|
47543
|
+
}).strict();
|
|
47544
|
+
ListExecutionsSchema = external_exports.object({
|
|
47545
|
+
resourceStatus: external_exports.enum(["dev", "prod", "all"]).default("all"),
|
|
47546
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
47547
|
+
offset: PageOffsetSchema
|
|
47548
|
+
});
|
|
47549
|
+
ListAllExecutionsSchema = external_exports.object({
|
|
47550
|
+
resourceId: NonEmptyStringSchema.max(255).optional(),
|
|
47551
|
+
status: external_exports.enum([...ExecutionStatusSchema.options, "all"]).optional(),
|
|
47552
|
+
resourceStatus: external_exports.enum(["dev", "prod", "all"]).optional(),
|
|
47553
|
+
startDate: external_exports.coerce.number().int().nonnegative().optional(),
|
|
47554
|
+
endDate: external_exports.coerce.number().int().nonnegative().optional(),
|
|
47555
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
47556
|
+
offset: PageOffsetSchema
|
|
47557
|
+
});
|
|
47512
47558
|
DeleteExecutionsSchema = external_exports.object({
|
|
47513
47559
|
resourceStatus: external_exports.enum(["dev", "prod"]).optional()
|
|
47514
47560
|
}).strict();
|
|
47561
|
+
PatchExecutionBodySchema = external_exports.object({
|
|
47562
|
+
status: external_exports.enum(["completed", "failed", "warning"]),
|
|
47563
|
+
error: external_exports.string().max(5e3).optional()
|
|
47564
|
+
}).strict();
|
|
47515
47565
|
}
|
|
47516
47566
|
});
|
|
47517
47567
|
|
|
@@ -48149,6 +48199,85 @@ var init_schemas6 = __esm({
|
|
|
48149
48199
|
}
|
|
48150
48200
|
});
|
|
48151
48201
|
|
|
48202
|
+
// ../core/src/operations/observability/api-schemas.ts
|
|
48203
|
+
var ErrorSeveritySchema, ExecutionIdParamSchema, ErrorIdParamSchema, ObservabilityDateRangeQuerySchema, ExecutionLogsQuerySchema, ErrorDetailsQuerySchema, ErrorDistributionQuerySchema, ErrorTrendsQuerySchema, TopFailingResourcesQuerySchema, RecentExecutionsByResourceQuerySchema, CostTrendsQuerySchema, ResourceHealthTargetSchema, ResourcesHealthBodySchema, SystemHealthResourceKindSchema, SystemHealthResourceDescriptorSchema, SystemHealthBodySchema;
|
|
48204
|
+
var init_api_schemas3 = __esm({
|
|
48205
|
+
"../core/src/operations/observability/api-schemas.ts"() {
|
|
48206
|
+
"use strict";
|
|
48207
|
+
init_zod();
|
|
48208
|
+
init_validation();
|
|
48209
|
+
ErrorSeveritySchema = external_exports.enum(["critical", "warning", "info"]);
|
|
48210
|
+
ExecutionIdParamSchema = external_exports.object({ executionId: NonEmptyStringSchema.max(255) }).strict();
|
|
48211
|
+
ErrorIdParamSchema = external_exports.object({ errorId: external_exports.string().uuid() }).strict();
|
|
48212
|
+
ObservabilityDateRangeQuerySchema = external_exports.object({
|
|
48213
|
+
startDate: TimestampSchema.optional(),
|
|
48214
|
+
endDate: TimestampSchema.optional()
|
|
48215
|
+
});
|
|
48216
|
+
ExecutionLogsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48217
|
+
page: external_exports.coerce.number().int().min(1).default(1),
|
|
48218
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
48219
|
+
// Left as bounded strings rather than enums. The service passes both straight into `.eq()`, and an
|
|
48220
|
+
// unknown value returns an empty page rather than misbehaving — so an enum here would assert a
|
|
48221
|
+
// catalog this schema has no way to keep in step with the column.
|
|
48222
|
+
resourceType: external_exports.string().max(100).optional(),
|
|
48223
|
+
status: external_exports.string().max(50).optional(),
|
|
48224
|
+
search: external_exports.string().max(200).optional()
|
|
48225
|
+
});
|
|
48226
|
+
ErrorDetailsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48227
|
+
page: external_exports.coerce.number().int().min(1).default(1),
|
|
48228
|
+
limit: PageLimitSchema.default(DEFAULT_PAGE_LIMIT),
|
|
48229
|
+
errorType: external_exports.string().max(100).optional(),
|
|
48230
|
+
severity: ErrorSeveritySchema.optional(),
|
|
48231
|
+
search: external_exports.string().max(200).optional(),
|
|
48232
|
+
// Tri-state on the wire: 'true' and 'false' filter, anything else (including 'all', which the
|
|
48233
|
+
// Command Center sends) means no filter. Coercing to a boolean here would make 'all' read as true.
|
|
48234
|
+
resolved: external_exports.enum(["true", "false", "all"]).optional()
|
|
48235
|
+
});
|
|
48236
|
+
ErrorDistributionQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48237
|
+
groupBy: external_exports.enum(["type", "severity"]).default("type")
|
|
48238
|
+
});
|
|
48239
|
+
ErrorTrendsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48240
|
+
granularity: external_exports.enum(["hour", "day"]).default("day")
|
|
48241
|
+
});
|
|
48242
|
+
TopFailingResourcesQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48243
|
+
limit: PageLimitSchema.default(10)
|
|
48244
|
+
});
|
|
48245
|
+
RecentExecutionsByResourceQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48246
|
+
limit: PageLimitSchema.optional()
|
|
48247
|
+
});
|
|
48248
|
+
CostTrendsQuerySchema = ObservabilityDateRangeQuerySchema.extend({
|
|
48249
|
+
granularity: external_exports.enum(["hour", "day"]).default("hour")
|
|
48250
|
+
});
|
|
48251
|
+
ResourceHealthTargetSchema = external_exports.object({
|
|
48252
|
+
entityType: NonEmptyStringSchema.max(100),
|
|
48253
|
+
entityId: NonEmptyStringSchema.max(255)
|
|
48254
|
+
}).strict();
|
|
48255
|
+
ResourcesHealthBodySchema = external_exports.object({
|
|
48256
|
+
resources: external_exports.array(ResourceHealthTargetSchema).min(1).max(20),
|
|
48257
|
+
startDate: TimestampSchema,
|
|
48258
|
+
endDate: TimestampSchema,
|
|
48259
|
+
granularity: external_exports.enum(["hour", "day"])
|
|
48260
|
+
}).strict();
|
|
48261
|
+
SystemHealthResourceKindSchema = external_exports.enum(["workflow", "agent", "integration", "script"]);
|
|
48262
|
+
SystemHealthResourceDescriptorSchema = external_exports.object({
|
|
48263
|
+
id: NonEmptyStringSchema.max(255),
|
|
48264
|
+
kind: SystemHealthResourceKindSchema,
|
|
48265
|
+
systemPath: external_exports.string().max(500).optional(),
|
|
48266
|
+
executable: external_exports.boolean().optional()
|
|
48267
|
+
}).strict();
|
|
48268
|
+
SystemHealthBodySchema = external_exports.object({
|
|
48269
|
+
systemPath: NonEmptyStringSchema.max(500),
|
|
48270
|
+
includeDescendants: external_exports.boolean().optional(),
|
|
48271
|
+
startDate: TimestampSchema,
|
|
48272
|
+
endDate: TimestampSchema,
|
|
48273
|
+
granularity: external_exports.enum(["hour", "day"]).optional(),
|
|
48274
|
+
directResources: external_exports.array(SystemHealthResourceDescriptorSchema).optional(),
|
|
48275
|
+
descendantResources: external_exports.array(SystemHealthResourceDescriptorSchema).optional(),
|
|
48276
|
+
resources: external_exports.array(SystemHealthResourceDescriptorSchema).optional()
|
|
48277
|
+
}).strict();
|
|
48278
|
+
}
|
|
48279
|
+
});
|
|
48280
|
+
|
|
48152
48281
|
// ../core/src/operations/observability/utils.ts
|
|
48153
48282
|
var init_utils5 = __esm({
|
|
48154
48283
|
"../core/src/operations/observability/utils.ts"() {
|
|
@@ -48162,6 +48291,7 @@ var init_observability = __esm({
|
|
|
48162
48291
|
"use strict";
|
|
48163
48292
|
init_types13();
|
|
48164
48293
|
init_schemas6();
|
|
48294
|
+
init_api_schemas3();
|
|
48165
48295
|
init_utils5();
|
|
48166
48296
|
}
|
|
48167
48297
|
});
|
|
@@ -48192,7 +48322,7 @@ var init_types14 = __esm({
|
|
|
48192
48322
|
|
|
48193
48323
|
// ../core/src/operations/activities/api-schemas.ts
|
|
48194
48324
|
var ActivityTypeSchema, ActivityStatusSchema, MetadataSchema, CreateActivitySchema, ActivityTrendQuerySchema, ListActivitiesQuerySchema;
|
|
48195
|
-
var
|
|
48325
|
+
var init_api_schemas4 = __esm({
|
|
48196
48326
|
"../core/src/operations/activities/api-schemas.ts"() {
|
|
48197
48327
|
"use strict";
|
|
48198
48328
|
init_zod();
|
|
@@ -48250,7 +48380,7 @@ var init_activities = __esm({
|
|
|
48250
48380
|
"../core/src/operations/activities/index.ts"() {
|
|
48251
48381
|
"use strict";
|
|
48252
48382
|
init_types14();
|
|
48253
|
-
|
|
48383
|
+
init_api_schemas4();
|
|
48254
48384
|
init_sse_events3();
|
|
48255
48385
|
}
|
|
48256
48386
|
});
|
|
@@ -48689,7 +48819,7 @@ var init_acquisition = __esm({
|
|
|
48689
48819
|
|
|
48690
48820
|
// ../core/src/business/clients/api-schemas.ts
|
|
48691
48821
|
var ClientStatusSchema, ClientSourceSchema, ClientIdParamsSchema, ListClientsQuerySchema, ClientRefSchema, ClientResponseSchema, ClientDealRefSchema, ClientProjectRefSchema, ClientCompanyRefSchema, ClientContactRefSchema, ClientLineageSchema, ClientDetailResponseSchema, ClientListResponseSchema, ClientStatusResponseSchema, CreateClientRequestSchema, UpdateClientRequestSchema;
|
|
48692
|
-
var
|
|
48822
|
+
var init_api_schemas5 = __esm({
|
|
48693
48823
|
"../core/src/business/clients/api-schemas.ts"() {
|
|
48694
48824
|
"use strict";
|
|
48695
48825
|
init_zod();
|
|
@@ -48803,7 +48933,7 @@ var init_api_schemas4 = __esm({
|
|
|
48803
48933
|
var init_clients = __esm({
|
|
48804
48934
|
"../core/src/business/clients/index.ts"() {
|
|
48805
48935
|
"use strict";
|
|
48806
|
-
|
|
48936
|
+
init_api_schemas5();
|
|
48807
48937
|
}
|
|
48808
48938
|
});
|
|
48809
48939
|
|
|
@@ -48951,18 +49081,26 @@ var init_provider_registry = __esm({
|
|
|
48951
49081
|
}
|
|
48952
49082
|
});
|
|
48953
49083
|
|
|
49084
|
+
// ../core/src/integrations/oauth/errors.ts
|
|
49085
|
+
var init_errors7 = __esm({
|
|
49086
|
+
"../core/src/integrations/oauth/errors.ts"() {
|
|
49087
|
+
"use strict";
|
|
49088
|
+
}
|
|
49089
|
+
});
|
|
49090
|
+
|
|
48954
49091
|
// ../core/src/integrations/oauth/index.ts
|
|
48955
49092
|
var init_oauth = __esm({
|
|
48956
49093
|
"../core/src/integrations/oauth/index.ts"() {
|
|
48957
49094
|
"use strict";
|
|
48958
49095
|
init_types19();
|
|
48959
49096
|
init_provider_registry();
|
|
49097
|
+
init_errors7();
|
|
48960
49098
|
}
|
|
48961
49099
|
});
|
|
48962
49100
|
|
|
48963
49101
|
// ../core/src/integrations/credentials/api-schemas.ts
|
|
48964
49102
|
var CredentialTypeSchema, CredentialValueSchema, CreateCredentialRequestSchema, CreateCredentialResponseSchema, ListCredentialsResponseSchema, UpdateCredentialParamsSchema, UpdateCredentialRequestSchema, DeleteCredentialParamsSchema, VerifyCredentialParamsSchema, VerifyCredentialResponseSchema;
|
|
48965
|
-
var
|
|
49103
|
+
var init_api_schemas6 = __esm({
|
|
48966
49104
|
"../core/src/integrations/credentials/api-schemas.ts"() {
|
|
48967
49105
|
"use strict";
|
|
48968
49106
|
init_zod();
|
|
@@ -49038,7 +49176,7 @@ var init_api_schemas5 = __esm({
|
|
|
49038
49176
|
var init_credentials2 = __esm({
|
|
49039
49177
|
"../core/src/integrations/credentials/index.ts"() {
|
|
49040
49178
|
"use strict";
|
|
49041
|
-
|
|
49179
|
+
init_api_schemas6();
|
|
49042
49180
|
}
|
|
49043
49181
|
});
|
|
49044
49182
|
|
|
@@ -49439,7 +49577,7 @@ var init_package = __esm({
|
|
|
49439
49577
|
"package.json"() {
|
|
49440
49578
|
package_default = {
|
|
49441
49579
|
name: "@elevasis/sdk",
|
|
49442
|
-
version: "1.
|
|
49580
|
+
version: "1.56.0",
|
|
49443
49581
|
description: "SDK for building Elevasis organization resources",
|
|
49444
49582
|
type: "module",
|
|
49445
49583
|
bin: {
|
|
@@ -54633,7 +54771,7 @@ function formatText(results) {
|
|
|
54633
54771
|
const divider = "-".repeat(header.length + 20);
|
|
54634
54772
|
const rows = results.map((n) => {
|
|
54635
54773
|
const summary = n.summary.length > 80 ? n.summary.slice(0, 77) + "..." : n.summary;
|
|
54636
|
-
return `${n.kind.padEnd(kindWidth)} ${n.id.padEnd(idWidth)} ${n.title} \
|
|
54774
|
+
return `${n.kind.padEnd(kindWidth)} ${n.id.padEnd(idWidth)} ${n.title} \u2014 ${summary}`;
|
|
54637
54775
|
});
|
|
54638
54776
|
return [header, divider, ...rows].join("\n");
|
|
54639
54777
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1591,6 +1591,16 @@ interface WorkflowStep extends WorkflowStepDefinition {
|
|
|
1591
1591
|
inputSchema: z.ZodSchema;
|
|
1592
1592
|
outputSchema: z.ZodSchema;
|
|
1593
1593
|
next: NextConfig;
|
|
1594
|
+
/**
|
|
1595
|
+
* How long this one step may run, in milliseconds. Omitted, the step is bounded only by the
|
|
1596
|
+
* execution ceiling (`DEFAULT_EXECUTION_TIMEOUT`, 2 hours), which is what every step used to get.
|
|
1597
|
+
*
|
|
1598
|
+
* `WorkflowConfig` deliberately still has no `constraints` field: a per-workflow override would
|
|
1599
|
+
* only restate the execution ceiling the caller already sets when it arms the deadline, whereas
|
|
1600
|
+
* "this HTTP step should never take more than 5 seconds" is a property of the step and has no
|
|
1601
|
+
* other place to live.
|
|
1602
|
+
*/
|
|
1603
|
+
timeout?: number;
|
|
1594
1604
|
}
|
|
1595
1605
|
interface WorkflowDefinition {
|
|
1596
1606
|
config: WorkflowConfig;
|
|
@@ -4387,13 +4397,6 @@ type Database = {
|
|
|
4387
4397
|
referencedRelation: "users";
|
|
4388
4398
|
referencedColumns: ["id"];
|
|
4389
4399
|
},
|
|
4390
|
-
{
|
|
4391
|
-
foreignKeyName: "prj_notes_milestone_id_fkey";
|
|
4392
|
-
columns: ["milestone_id"];
|
|
4393
|
-
isOneToOne: false;
|
|
4394
|
-
referencedRelation: "prj_milestones";
|
|
4395
|
-
referencedColumns: ["id"];
|
|
4396
|
-
},
|
|
4397
4400
|
{
|
|
4398
4401
|
foreignKeyName: "prj_notes_organization_id_fkey";
|
|
4399
4402
|
columns: ["organization_id"];
|
|
@@ -4407,13 +4410,6 @@ type Database = {
|
|
|
4407
4410
|
isOneToOne: false;
|
|
4408
4411
|
referencedRelation: "prj_projects";
|
|
4409
4412
|
referencedColumns: ["id"];
|
|
4410
|
-
},
|
|
4411
|
-
{
|
|
4412
|
-
foreignKeyName: "prj_notes_task_id_fkey";
|
|
4413
|
-
columns: ["task_id"];
|
|
4414
|
-
isOneToOne: false;
|
|
4415
|
-
referencedRelation: "prj_tasks";
|
|
4416
|
-
referencedColumns: ["id"];
|
|
4417
4413
|
}
|
|
4418
4414
|
];
|
|
4419
4415
|
};
|
|
@@ -6337,8 +6333,20 @@ interface ProcessingStateEntry {
|
|
|
6337
6333
|
type ProcessingState = Partial<Record<LeadGenStageKey, ProcessingStateEntry>>;
|
|
6338
6334
|
type CompanyProcessingState = ProcessingState;
|
|
6339
6335
|
type ContactProcessingState = ProcessingState;
|
|
6340
|
-
/**
|
|
6341
|
-
|
|
6336
|
+
/**
|
|
6337
|
+
* @deprecated Use `processingState`. Retained only as a compile-time/read-shape bridge for
|
|
6338
|
+
* external tenants.
|
|
6339
|
+
*
|
|
6340
|
+
* `null`, not `unknown`. The DB column is gone and every response returns null, so `unknown` was
|
|
6341
|
+
* describing a value that cannot occur -- it forced a narrow on a field that is always null while
|
|
6342
|
+
* still type-checking a comparison against a stage name that can never match. Narrowing it turns
|
|
6343
|
+
* that dead comparison into a compile error pointing at `processingState`, which is the migration.
|
|
6344
|
+
*
|
|
6345
|
+
* The WRITE path stays permissive on purpose: the update request schemas keep
|
|
6346
|
+
* `pipelineStatus: z.unknown().optional()` so a tenant still sending the old field gets a no-op
|
|
6347
|
+
* rather than a rejected request.
|
|
6348
|
+
*/
|
|
6349
|
+
type LegacyPipelineStatus = null;
|
|
6342
6350
|
/**
|
|
6343
6351
|
* Enrichment data collected for a company from various sources.
|
|
6344
6352
|
*/
|
|
@@ -14266,6 +14274,28 @@ interface AgentConstraints {
|
|
|
14266
14274
|
timeout?: number;
|
|
14267
14275
|
maxSessionMemoryKeys?: number;
|
|
14268
14276
|
maxMemoryTokens?: number;
|
|
14277
|
+
/**
|
|
14278
|
+
* Spend ceilings for the whole turn, checked between iterations against
|
|
14279
|
+
* `ExecutionContext.aiUsageCollector`. Both are unset by default -- `maxIterations` and `timeout`
|
|
14280
|
+
* bound how MANY calls and how LONG, but nothing bounded how much those calls cost, so an agent
|
|
14281
|
+
* that picked an expensive model or a huge context could spend without limit inside a budget it
|
|
14282
|
+
* was technically respecting.
|
|
14283
|
+
*
|
|
14284
|
+
* Enforced only where a collector is injected (every coordinator-run execution). An agent run
|
|
14285
|
+
* without one is unbounded, the same as one that declares no ceiling.
|
|
14286
|
+
*
|
|
14287
|
+
* Note that **sync nested executions share the parent's collector**, so these ceilings cover the
|
|
14288
|
+
* agent and everything it invokes synchronously. That is the behaviour a spend ceiling should
|
|
14289
|
+
* have, but it does mean a parent's ceiling can be reached by a child's spend.
|
|
14290
|
+
*/
|
|
14291
|
+
maxCostUsd?: number;
|
|
14292
|
+
maxTotalTokens?: number;
|
|
14293
|
+
/**
|
|
14294
|
+
* How many times the agent may emit a byte-identical plan in a row before the turn is stopped
|
|
14295
|
+
* (default 3, in `processActions`). Raise it for an agent whose job legitimately involves
|
|
14296
|
+
* repeating itself -- polling one endpoint until it reports ready is the case this exists for.
|
|
14297
|
+
*/
|
|
14298
|
+
maxIdenticalIterations?: number;
|
|
14269
14299
|
}
|
|
14270
14300
|
interface AgentDefinition {
|
|
14271
14301
|
config: AgentConfig;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineSingleStepWorkflow, defineTopology, defineTopologyRelationship, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isBuiltInReadinessProfile, isZodType, lookupReadinessProfile, parseTopologyNodeRef, registerReadinessProfile, resolveContractRef, runDiagnostic, splitName, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance } from './chunk-
|
|
1
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineSingleStepWorkflow, defineTopology, defineTopologyRelationship, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isBuiltInReadinessProfile, isZodType, lookupReadinessProfile, parseTopologyNodeRef, registerReadinessProfile, resolveContractRef, runDiagnostic, splitName, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance } from './chunk-R3J6BEPO.js';
|
|
2
2
|
export { projectDeploymentSpec, projectTopologyRelationships, toSdkResourceDescriptor, withPlatformAgentResourceDescriptor, withPlatformAgentResourceDescriptors, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors } from './chunk-QF2RNYYX.js';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -44,15 +44,8 @@ interface KnowledgeNodeInput {
|
|
|
44
44
|
summary: string;
|
|
45
45
|
body: string;
|
|
46
46
|
}
|
|
47
|
-
interface KnowledgeSearchEntry {
|
|
48
|
-
id: string;
|
|
49
|
-
title: string;
|
|
50
|
-
summary: string;
|
|
51
|
-
bodyText: string;
|
|
52
|
-
}
|
|
53
47
|
interface CodegenResult {
|
|
54
48
|
bodiesTsx: string;
|
|
55
|
-
searchIndex: KnowledgeSearchEntry[];
|
|
56
49
|
}
|
|
57
50
|
/**
|
|
58
51
|
* Compiles knowledge nodes into generated file contents.
|
|
@@ -71,4 +64,4 @@ interface ResolvedKnowledgeLayout {
|
|
|
71
64
|
declare function runKnowledgeCodegen(layout: ResolvedKnowledgeLayout): Promise<void>;
|
|
72
65
|
|
|
73
66
|
export { generateKnowledgeBodies, generateKnowledgeNodes, generateKnowledgeNodesTs, readKnowledgeNodeMdx, runKnowledgeCodegen };
|
|
74
|
-
export type { CodegenResult, GenerateKnowledgeNodesOptions, GenerateKnowledgeNodesResult, KnowledgeCodegenNode, KnowledgeKind, KnowledgeNodeInput,
|
|
67
|
+
export type { CodegenResult, GenerateKnowledgeNodesOptions, GenerateKnowledgeNodesResult, KnowledgeCodegenNode, KnowledgeKind, KnowledgeNodeInput, ResolvedKnowledgeLayout };
|
package/dist/node/index.js
CHANGED
|
@@ -393,9 +393,6 @@ To add a component:
|
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function stripToPlainText(body) {
|
|
397
|
-
return body.replace(/^(import|export)\s+.+$/gm, "").replace(/<[A-Z][^>]*>/g, "").replace(/<\/[A-Z][^>]*>/g, "").replace(/^#{1,6}\s+/gm, "").replace(/[*_`~]/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\n{3,}/g, "\n\n").trim();
|
|
398
|
-
}
|
|
399
396
|
var BODIES_HEADER = [
|
|
400
397
|
"// @generated by generate-knowledge-bodies -- DO NOT EDIT",
|
|
401
398
|
"// Regenerate: pnpm scaffold:sync",
|
|
@@ -457,11 +454,10 @@ async function generateKnowledgeBodies(nodes) {
|
|
|
457
454
|
"> = {}",
|
|
458
455
|
""
|
|
459
456
|
].join("\n");
|
|
460
|
-
return { bodiesTsx: bodiesTsx2
|
|
457
|
+
return { bodiesTsx: bodiesTsx2 };
|
|
461
458
|
}
|
|
462
459
|
const nodeComments = [];
|
|
463
460
|
const mapEntries = [];
|
|
464
|
-
const searchIndex = [];
|
|
465
461
|
for (const node of nodes) {
|
|
466
462
|
if (/^(import|export)\s+/m.test(node.body)) {
|
|
467
463
|
throw new Error(
|
|
@@ -475,15 +471,13 @@ async function generateKnowledgeBodies(nodes) {
|
|
|
475
471
|
});
|
|
476
472
|
const fnBodyCode = String(compiled);
|
|
477
473
|
validateComponents(node.id, fnBodyCode);
|
|
478
|
-
const bodyText = stripToPlainText(node.body);
|
|
479
|
-
searchIndex.push({ id: node.id, title: node.title, summary: node.summary, bodyText });
|
|
480
474
|
nodeComments.push(`// Node: ${node.id} (${node.kind})`);
|
|
481
475
|
mapEntries.push(` '${node.id}': makeKnowledgeComponent(${JSON.stringify(fnBodyCode)})`);
|
|
482
476
|
}
|
|
483
477
|
const mapBlock = `export const KNOWLEDGE_BODIES: Record<string, ComponentType<KnowledgeBodyProps>> = {
|
|
484
478
|
` + mapEntries.join(",\n") + "\n}\n";
|
|
485
479
|
const bodiesTsx = BODIES_HEADER + FACTORY_BLOCK + MAP_HEADER + (nodeComments.length > 0 ? nodeComments.join("\n") + "\n\n" : "") + mapBlock;
|
|
486
|
-
return { bodiesTsx
|
|
480
|
+
return { bodiesTsx };
|
|
487
481
|
}
|
|
488
482
|
async function runKnowledgeCodegen(layout) {
|
|
489
483
|
let nodes;
|
|
@@ -504,14 +498,9 @@ async function runKnowledgeCodegen(layout) {
|
|
|
504
498
|
});
|
|
505
499
|
nodes = result.nodes;
|
|
506
500
|
}
|
|
507
|
-
const { bodiesTsx
|
|
501
|
+
const { bodiesTsx } = await generateKnowledgeBodies(nodes);
|
|
508
502
|
mkdirSync(layout.generatedDir, { recursive: true });
|
|
509
503
|
writeFileSync(resolve(layout.generatedDir, "knowledge-bodies.tsx"), bodiesTsx, "utf8");
|
|
510
|
-
writeFileSync(
|
|
511
|
-
resolve(layout.generatedDir, "knowledge-search-index.json"),
|
|
512
|
-
JSON.stringify(searchIndex, null, 2) + "\n",
|
|
513
|
-
"utf8"
|
|
514
|
-
);
|
|
515
504
|
}
|
|
516
505
|
|
|
517
506
|
export { generateKnowledgeBodies, generateKnowledgeNodes, generateKnowledgeNodesTs, readKnowledgeNodeMdx, runKnowledgeCodegen };
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { executeWorkflow } from '../chunk-
|
|
2
|
-
import { validateDeploymentSpec, validateRelationships } from '../chunk-
|
|
1
|
+
import { executeWorkflow } from '../chunk-72ZGICTR.js';
|
|
2
|
+
import { validateDeploymentSpec, validateRelationships } from '../chunk-R3J6BEPO.js';
|
|
3
3
|
import '../chunk-QF2RNYYX.js';
|
|
4
4
|
import { vi } from 'vitest';
|
|
5
5
|
|
package/dist/worker/index.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ interface TokenUsage {
|
|
|
14
14
|
outputTokens: number;
|
|
15
15
|
cost?: number;
|
|
16
16
|
model?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Anthropic excludes cache reads and writes from the wire `input_tokens`, and `AIUsageCollector`
|
|
19
|
+
* adds them back when it records a call. They are forwarded here so the worker-side collector the
|
|
20
|
+
* spend ceiling reads folds them in exactly as the parent's does — without them the worker's token
|
|
21
|
+
* total silently runs below the figure `execution_metrics` persists, and a `maxTotalTokens` ceiling
|
|
22
|
+
* would be enforced against the smaller number.
|
|
23
|
+
*/
|
|
24
|
+
cacheReadInputTokens?: number;
|
|
25
|
+
cacheCreationInputTokens?: number;
|
|
17
26
|
}
|
|
18
27
|
/** Resolved credential returned by platform.getCredential() */
|
|
19
28
|
interface PlatformCredential {
|
package/dist/worker/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ListBuilderResultSchema, ListBuilderResultsSchema, PlatformToolError, acqDb, approval, artifacts, classifyPlatformToolError, content, createAdapter, createAnymailfinderAdapter, createApifyAdapter, createAttioAdapter, createCaptionGenerationWorkflow, createCaptureInstagramMetricsWorkflow, createClickUpAdapter, createDropboxAdapter, createGmailAdapter, createGoogleSheetsAdapter, createImageAnalysisWorkflow, createInstagramAdapter, createInstantlyAdapter, createMillionVerifierAdapter, createPublishInstagramWorkflow, createResendAdapter, createSignatureApiAdapter, createStripeAdapter, createTombaAdapter, crm, email, executeWorkflow, execution, generateHmacToken, list, listBuilderWorkflow, llm, notifications, pdf, platform, projects, scheduler, startWorker, storage, toContentMetrics } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ListBuilderResultSchema, ListBuilderResultsSchema, PlatformToolError, acqDb, approval, artifacts, classifyPlatformToolError, content, createAdapter, createAnymailfinderAdapter, createApifyAdapter, createAttioAdapter, createCaptionGenerationWorkflow, createCaptureInstagramMetricsWorkflow, createClickUpAdapter, createDropboxAdapter, createGmailAdapter, createGoogleSheetsAdapter, createImageAnalysisWorkflow, createInstagramAdapter, createInstantlyAdapter, createMillionVerifierAdapter, createPublishInstagramWorkflow, createResendAdapter, createSignatureApiAdapter, createStripeAdapter, createTombaAdapter, crm, email, executeWorkflow, execution, generateHmacToken, list, listBuilderWorkflow, llm, notifications, pdf, platform, projects, scheduler, startWorker, storage, toContentMetrics } from '../chunk-72ZGICTR.js';
|
|
2
|
+
import '../chunk-R3J6BEPO.js';
|
|
3
3
|
import '../chunk-QF2RNYYX.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.56.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"typescript": "5.9.2",
|
|
64
64
|
"vitest": "^3.2.4",
|
|
65
65
|
"zod": "^4.1.0",
|
|
66
|
-
"@repo/core": "0.
|
|
67
|
-
"@repo/
|
|
68
|
-
"@repo/
|
|
66
|
+
"@repo/core": "0.72.0",
|
|
67
|
+
"@repo/eslint-config": "0.0.0",
|
|
68
|
+
"@repo/typescript-config": "0.0.0"
|
|
69
69
|
},
|
|
70
70
|
"license": "MIT",
|
|
71
71
|
"engines": {
|
package/reference/_navigation.md
CHANGED
|
@@ -162,7 +162,7 @@ Package entries indexed: 63.
|
|
|
162
162
|
| Theme | `packages/ui/src/theme/README.md` | Published theme entry for downstream applications. | (not specified) |
|
|
163
163
|
| Graph | `packages/ui/src/graph/README.md` | Published graph helper and visualization entry. | (not specified) |
|
|
164
164
|
| Theme Presets | `packages/ui/src/theme/presets/README.md` | Published THEME_PRESETS tuple, ThemePresetName union, and ThemePresetEnum Zod enum, defined locally and kept manually aligned with the canonical list in packages/core/src/auth/multi-tenancy/theme-presets.ts. | (not specified) |
|
|
165
|
-
| Knowledge | `packages/ui/src/knowledge/README.md` | Published knowledge browser primitives: Browser, Tree, NodeList, NodeView, SearchBar, MDX provider, and the
|
|
165
|
+
| Knowledge | `packages/ui/src/knowledge/README.md` | Published knowledge browser primitives: Browser, Tree, NodeList, NodeView, SearchBar, MDX provider, and the KnowledgeBodiesMap type. Machinery only -- each consumer supplies its own compiled corpus via the required knowledgeBodies prop. | (not specified) |
|
|
166
166
|
|
|
167
167
|
---
|
|
168
168
|
|
|
@@ -226,9 +226,9 @@ Agent rules indexed: 19.
|
|
|
226
226
|
| Platform | `rules/platform.md` | Platform conventions -- SDK workflows, agents, deployment, resource registry | Authoring a workflow or agent definition, or registering a resource in the registry. |
|
|
227
227
|
| Deployment | `rules/deployment.md` | Deployment workflow -- check-first, dev vs prod, version bumping, common errors | Before any deploy -- a plain `run deploy` targets production by default. |
|
|
228
228
|
| Content | `rules/content.md` | Building the content System behind the shipped pipeline, item, and distribution routes -- which recipe to read, and the catalog vocabulary that is model-owned rather than coded | Editing anything under `ui/src/routes/content/` -- items, pipelines, distributions, or a review gate. |
|
|
229
|
-
| Execution Model | `rules/execution.md` | Execution model -- timeouts, memory, concurrency, org isolation
|
|
229
|
+
| Execution Model | `rules/execution.md` | Execution model -- per-step and agent timeouts, spend ceilings, memory, concurrency, org isolation | Hitting a timeout, memory ceiling, concurrency limit, or org-isolation question at runtime. |
|
|
230
230
|
| Agent Runtime | `rules/agent-runtime.md` | Agent runtime behavior -- iteration response shape, session memory and replay, prose normalization, and why a redeploy is what makes a platform fix live | Debugging an agent turn -- a missing reply, a corrupted one, a session that forgot, or an unenforced schema. |
|
|
231
|
-
| Error Handling | `rules/error-handling.md` | Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry | Writing or debugging a step handler that throws, catches, or retries. |
|
|
231
|
+
| Error Handling | `rules/error-handling.md` | Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry, /api/external error envelope | Writing or debugging a step handler that throws, catches, or retries. |
|
|
232
232
|
| Observability | `rules/observability.md` | Observability -- context.logger API, execution inspection, step-level context | Adding logging to a step handler, or inspecting a past execution. |
|
|
233
233
|
|
|
234
234
|
### Orientation
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
"subpath": "./knowledge",
|
|
876
876
|
"kind": "subpath",
|
|
877
877
|
"title": "Knowledge",
|
|
878
|
-
"description": "Published knowledge browser primitives: Browser, Tree, NodeList, NodeView, SearchBar, MDX provider, and the
|
|
878
|
+
"description": "Published knowledge browser primitives: Browser, Tree, NodeList, NodeView, SearchBar, MDX provider, and the KnowledgeBodiesMap type. Machinery only -- each consumer supplies its own compiled corpus via the required knowledgeBodies prop.",
|
|
879
879
|
"group": "Visual",
|
|
880
880
|
"order": 3,
|
|
881
881
|
"sourcePath": "packages/ui/src/knowledge/index.ts",
|
|
@@ -948,7 +948,7 @@
|
|
|
948
948
|
{
|
|
949
949
|
"packageName": "@elevasis/sdk",
|
|
950
950
|
"title": "Execution Model",
|
|
951
|
-
"description": "Execution model -- timeouts, memory, concurrency, org isolation
|
|
951
|
+
"description": "Execution model -- per-step and agent timeouts, spend ceilings, memory, concurrency, org isolation",
|
|
952
952
|
"group": "Operations",
|
|
953
953
|
"order": 4,
|
|
954
954
|
"loadWhen": "Hitting a timeout, memory ceiling, concurrency limit, or org-isolation question at runtime.",
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
{
|
|
969
969
|
"packageName": "@elevasis/sdk",
|
|
970
970
|
"title": "Error Handling",
|
|
971
|
-
"description": "Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry",
|
|
971
|
+
"description": "Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry, /api/external error envelope",
|
|
972
972
|
"group": "Operations",
|
|
973
973
|
"order": 6,
|
|
974
974
|
"loadWhen": "Writing or debugging a step handler that throws, catches, or retries.",
|
|
@@ -27,7 +27,7 @@ Pure query layer over the organization graph. Browser-safe (no Node APIs); share
|
|
|
27
27
|
|
|
28
28
|
## JSON envelope
|
|
29
29
|
|
|
30
|
-
`formatJson` returns `{ path, mount, args, results }`
|
|
30
|
+
`formatJson` returns `{ path, mount, args, results }` — the same wrapped envelope used by `pnpm exec elevasis knowledge:ls --json` and `pnpm exec elevasis-sdk knowledge:ls --json`.
|
|
31
31
|
|
|
32
32
|
`governs` and `governedBy` accept either bare or graph-namespaced ids (`knowledge.foo` or `knowledge:knowledge.foo`).
|
|
33
33
|
|