lua-cli 3.54.0 → 3.55.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/api-exports.d.ts +135 -91
- package/dist/api-exports.js +392 -111
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1124 -309
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +82 -76
- package/dist/workflow-builder.d.ts +7 -4
- package/dist/workflow-builder.js +322 -71
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +3 -3
- package/docs/api/Data.md +19 -4
- package/package.json +2 -1
- package/template/package.json +1 -1
- package/template-web-app/web/package.json +2 -3
- package/template-web-app/web/src/index.css +0 -2
- package/template-web-app/web/src/main.tsx +1 -9
package/dist/workflow-builder.js
CHANGED
|
@@ -1028,6 +1028,8 @@ import { z as z5 } from "zod";
|
|
|
1028
1028
|
import { z as z6 } from "zod";
|
|
1029
1029
|
import { z as z7 } from "zod";
|
|
1030
1030
|
import { z as z8 } from "zod";
|
|
1031
|
+
import { z as z9 } from "zod";
|
|
1032
|
+
import { z as z10 } from "zod";
|
|
1031
1033
|
var __defProp4 = Object.defineProperty;
|
|
1032
1034
|
var __name4 = /* @__PURE__ */ __name((target, value3) => __defProp4(target, "name", { value: value3, configurable: true }), "__name");
|
|
1033
1035
|
var PLUMBING_THREAD_CHANNELS = [
|
|
@@ -1346,6 +1348,7 @@ var INTEGRATION_PASSTHROUGH_READ_METHODS = [
|
|
|
1346
1348
|
"GET",
|
|
1347
1349
|
"HEAD"
|
|
1348
1350
|
];
|
|
1351
|
+
var INTEGRATION_PASSTHROUGH_MAX_BASE64_RESPONSE_BYTES = 25 * 1024 * 1024;
|
|
1349
1352
|
function isIntegrationPassthroughReadMethod(method) {
|
|
1350
1353
|
return typeof method === "string" && INTEGRATION_PASSTHROUGH_READ_METHODS.includes(method.toUpperCase());
|
|
1351
1354
|
}
|
|
@@ -6699,7 +6702,7 @@ function mergeRichPartMirrorMessages(messages, sameTurnGroup) {
|
|
|
6699
6702
|
break;
|
|
6700
6703
|
}
|
|
6701
6704
|
if (folded) continue;
|
|
6702
|
-
const content = message.content.filter((part) => part.type !== "data-lua-tool-step");
|
|
6705
|
+
const content = message.content.filter((part) => part.type !== "data-lua-tool-step" && part.type !== "data-lua-reasoning-time" && part.type !== "data-lua-reply-timing");
|
|
6703
6706
|
if (content.length === 0) continue;
|
|
6704
6707
|
if (content.length !== message.content.length) {
|
|
6705
6708
|
merged.push({
|
|
@@ -6761,6 +6764,61 @@ function foldRichPartsIntoMessages(messages, records, makeMessage, sameTurnGroup
|
|
|
6761
6764
|
}
|
|
6762
6765
|
__name(foldRichPartsIntoMessages, "foldRichPartsIntoMessages");
|
|
6763
6766
|
__name4(foldRichPartsIntoMessages, "foldRichPartsIntoMessages");
|
|
6767
|
+
function readStoredReplyVersion(metadata) {
|
|
6768
|
+
const md = metadata && typeof metadata === "object" ? metadata : void 0;
|
|
6769
|
+
const value3 = md?.replyVersion;
|
|
6770
|
+
const stamp = value3 && typeof value3.group === "string" && value3.group && typeof value3.index === "number" && Number.isInteger(value3.index) && value3.index >= 1 ? {
|
|
6771
|
+
group: value3.group,
|
|
6772
|
+
index: value3.index
|
|
6773
|
+
} : null;
|
|
6774
|
+
return {
|
|
6775
|
+
stamp,
|
|
6776
|
+
inactive: md?.inactiveVersion === true
|
|
6777
|
+
};
|
|
6778
|
+
}
|
|
6779
|
+
__name(readStoredReplyVersion, "readStoredReplyVersion");
|
|
6780
|
+
__name4(readStoredReplyVersion, "readStoredReplyVersion");
|
|
6781
|
+
function applyReplyVersions(messages, markOf, includeVersions) {
|
|
6782
|
+
const blocks = [];
|
|
6783
|
+
const indicesByGroup = /* @__PURE__ */ new Map();
|
|
6784
|
+
let current = null;
|
|
6785
|
+
for (const message of messages) {
|
|
6786
|
+
const mark = markOf(message);
|
|
6787
|
+
if (message.role === "user") {
|
|
6788
|
+
current = mark?.stamp ? {
|
|
6789
|
+
...mark.stamp,
|
|
6790
|
+
inactive: mark.inactive
|
|
6791
|
+
} : null;
|
|
6792
|
+
if (current) {
|
|
6793
|
+
const seen = indicesByGroup.get(current.group) ?? /* @__PURE__ */ new Set();
|
|
6794
|
+
seen.add(current.index);
|
|
6795
|
+
indicesByGroup.set(current.group, seen);
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
blocks.push(current);
|
|
6799
|
+
}
|
|
6800
|
+
const out = [];
|
|
6801
|
+
messages.forEach((message, i) => {
|
|
6802
|
+
const block = blocks[i];
|
|
6803
|
+
if (!block) {
|
|
6804
|
+
out.push(message);
|
|
6805
|
+
return;
|
|
6806
|
+
}
|
|
6807
|
+
if (block.inactive && !includeVersions) return;
|
|
6808
|
+
out.push({
|
|
6809
|
+
...message,
|
|
6810
|
+
replyVersion: {
|
|
6811
|
+
group: block.group,
|
|
6812
|
+
index: block.index,
|
|
6813
|
+
total: indicesByGroup.get(block.group)?.size ?? 1,
|
|
6814
|
+
active: !block.inactive
|
|
6815
|
+
}
|
|
6816
|
+
});
|
|
6817
|
+
});
|
|
6818
|
+
return out;
|
|
6819
|
+
}
|
|
6820
|
+
__name(applyReplyVersions, "applyReplyVersions");
|
|
6821
|
+
__name4(applyReplyVersions, "applyReplyVersions");
|
|
6764
6822
|
var WORK_ITEMS_KEY = "_luaWorkItems";
|
|
6765
6823
|
var MAX_WORK_ITEMS = 100;
|
|
6766
6824
|
var LIMITS = {
|
|
@@ -11882,6 +11940,7 @@ function composeAgentPaneRuntimeContext(input) {
|
|
|
11882
11940
|
__name(composeAgentPaneRuntimeContext, "composeAgentPaneRuntimeContext");
|
|
11883
11941
|
__name4(composeAgentPaneRuntimeContext, "composeAgentPaneRuntimeContext");
|
|
11884
11942
|
var WEB_APP_ENTRY_HTML_MAX_CHARS = 256 * 1024;
|
|
11943
|
+
var WEB_APP_MAX_ASSETS = 1e3;
|
|
11885
11944
|
var WEB_APP_MAX_ASSET_BYTES = 8 * 1024 * 1024;
|
|
11886
11945
|
var WEB_APP_HEALTH_KEY_TTL_SECONDS = 15 * 60;
|
|
11887
11946
|
var WEB_APP_HEALTH_MIN_FAILURES = 3;
|
|
@@ -13676,6 +13735,74 @@ var customMcpMountUpsertBodySchema = z6.object({
|
|
|
13676
13735
|
}).strict().optional(),
|
|
13677
13736
|
timeout: customMcpTimeoutSchema.optional()
|
|
13678
13737
|
}).strict();
|
|
13738
|
+
var opaque = z7.record(z7.unknown());
|
|
13739
|
+
var summaryHash = z7.string().regex(/^[0-9a-f]{64}$/);
|
|
13740
|
+
var defaultWebAppBriefRequestSchema = z7.object({
|
|
13741
|
+
agentId: z7.string().min(1).max(200),
|
|
13742
|
+
orgId: z7.string().min(1).max(200).optional(),
|
|
13743
|
+
/** A rebuild: the brief the app was built from. The new brief keeps its entity, fields and statuses. */
|
|
13744
|
+
previous: z7.object({
|
|
13745
|
+
brief: opaque
|
|
13746
|
+
}).optional(),
|
|
13747
|
+
/**
|
|
13748
|
+
* Another agent's brief (same template id + version) and the `summaryHash` it was made from. Used without a model
|
|
13749
|
+
* call only when the hash equals this agent's, its schema version is current and it is valid here; else ignored.
|
|
13750
|
+
*/
|
|
13751
|
+
reuse: z7.object({
|
|
13752
|
+
brief: opaque,
|
|
13753
|
+
summaryHash
|
|
13754
|
+
}).optional()
|
|
13755
|
+
});
|
|
13756
|
+
var DEFAULT_WEB_APP_BRIEF_SOURCES = [
|
|
13757
|
+
"model",
|
|
13758
|
+
"fallback",
|
|
13759
|
+
"reused",
|
|
13760
|
+
"previous"
|
|
13761
|
+
];
|
|
13762
|
+
var defaultWebAppBriefUsageSchema = z7.object({
|
|
13763
|
+
inputTokens: z7.number().nonnegative(),
|
|
13764
|
+
outputTokens: z7.number().nonnegative(),
|
|
13765
|
+
cacheReadTokens: z7.number().nonnegative(),
|
|
13766
|
+
cacheWriteTokens: z7.number().nonnegative()
|
|
13767
|
+
});
|
|
13768
|
+
var briefResponseBase = z7.object({
|
|
13769
|
+
source: z7.enum(DEFAULT_WEB_APP_BRIEF_SOURCES),
|
|
13770
|
+
brief: opaque,
|
|
13771
|
+
names: opaque,
|
|
13772
|
+
capabilitySignature: z7.string().min(1),
|
|
13773
|
+
model: z7.string().optional(),
|
|
13774
|
+
usage: defaultWebAppBriefUsageSchema,
|
|
13775
|
+
costUsd: z7.number().nonnegative()
|
|
13776
|
+
});
|
|
13777
|
+
var defaultWebAppBriefResponseSchema = z7.discriminatedUnion("reusable", [
|
|
13778
|
+
briefResponseBase.extend({
|
|
13779
|
+
reusable: z7.literal(true),
|
|
13780
|
+
summaryHash
|
|
13781
|
+
}),
|
|
13782
|
+
briefResponseBase.extend({
|
|
13783
|
+
reusable: z7.literal(false)
|
|
13784
|
+
})
|
|
13785
|
+
]);
|
|
13786
|
+
var defaultWebAppBriefKeyRequestSchema = z7.object({
|
|
13787
|
+
agentId: z7.string().min(1).max(200)
|
|
13788
|
+
});
|
|
13789
|
+
var defaultWebAppBriefKeyResponseSchema = z7.object({
|
|
13790
|
+
summaryHash,
|
|
13791
|
+
schemaVersion: z7.number().int().positive()
|
|
13792
|
+
});
|
|
13793
|
+
var DEFAULT_WEB_APP_BRIEF_ERROR_CODES = [
|
|
13794
|
+
"AGENT_NOT_FOUND",
|
|
13795
|
+
"BRIEF_INVALID",
|
|
13796
|
+
"BRIEF_UNAVAILABLE"
|
|
13797
|
+
];
|
|
13798
|
+
var defaultWebAppBriefErrorSchema = z7.object({
|
|
13799
|
+
code: z7.enum(DEFAULT_WEB_APP_BRIEF_ERROR_CODES),
|
|
13800
|
+
message: z7.string().optional(),
|
|
13801
|
+
problems: z7.array(z7.string()).optional(),
|
|
13802
|
+
model: z7.string().optional(),
|
|
13803
|
+
usage: defaultWebAppBriefUsageSchema.optional(),
|
|
13804
|
+
costUsd: z7.number().nonnegative().optional()
|
|
13805
|
+
});
|
|
13679
13806
|
function maskMcpServerHeaders(server) {
|
|
13680
13807
|
const { headers, ...rest } = server;
|
|
13681
13808
|
const headerNames = Object.keys(headers ?? {});
|
|
@@ -13770,63 +13897,63 @@ var BILLING_VERSION_KINDS = [
|
|
|
13770
13897
|
"catalog",
|
|
13771
13898
|
"custom"
|
|
13772
13899
|
];
|
|
13773
|
-
var planKeyString =
|
|
13774
|
-
var planPriceSchema =
|
|
13775
|
-
amountUsd:
|
|
13776
|
-
interval:
|
|
13900
|
+
var planKeyString = z8.string().regex(/^[a-z0-9][a-z0-9-]{0,47}$/, "lowercase letters, digits and dashes");
|
|
13901
|
+
var planPriceSchema = z8.object({
|
|
13902
|
+
amountUsd: z8.number().nonnegative(),
|
|
13903
|
+
interval: z8.enum([
|
|
13777
13904
|
"month",
|
|
13778
13905
|
"year"
|
|
13779
13906
|
]),
|
|
13780
|
-
per:
|
|
13907
|
+
per: z8.enum([
|
|
13781
13908
|
"workspace",
|
|
13782
13909
|
"seat"
|
|
13783
13910
|
])
|
|
13784
13911
|
}).strict();
|
|
13785
13912
|
var limitsShape = Object.fromEntries(PLAN_LIMIT_KEYS.map((k) => [
|
|
13786
13913
|
k,
|
|
13787
|
-
|
|
13914
|
+
z8.number().int().nonnegative().nullable().optional()
|
|
13788
13915
|
]));
|
|
13789
13916
|
var featuresShape = Object.fromEntries(PLAN_FEATURE_KEYS.map((k) => [
|
|
13790
13917
|
k,
|
|
13791
|
-
|
|
13918
|
+
z8.boolean().optional()
|
|
13792
13919
|
]));
|
|
13793
|
-
var billingPlanSchema =
|
|
13920
|
+
var billingPlanSchema = z8.object({
|
|
13794
13921
|
key: planKeyString,
|
|
13795
|
-
name:
|
|
13922
|
+
name: z8.string().min(1).max(80),
|
|
13796
13923
|
/** Absent = a workspace plan. An agent-team plan prices a hired team; it sets no limits or features. */
|
|
13797
|
-
kind:
|
|
13924
|
+
kind: z8.enum([
|
|
13798
13925
|
"workspace",
|
|
13799
13926
|
"agent-team"
|
|
13800
13927
|
]).optional(),
|
|
13801
|
-
tagline:
|
|
13802
|
-
visible:
|
|
13803
|
-
order:
|
|
13928
|
+
tagline: z8.string().max(200).optional(),
|
|
13929
|
+
visible: z8.boolean(),
|
|
13930
|
+
order: z8.number().int(),
|
|
13804
13931
|
price: planPriceSchema.nullable(),
|
|
13805
|
-
stripeProductId:
|
|
13806
|
-
stripePriceId:
|
|
13807
|
-
actionsPerPeriod:
|
|
13808
|
-
trialDays:
|
|
13809
|
-
limits:
|
|
13810
|
-
features:
|
|
13811
|
-
invoice:
|
|
13812
|
-
collectionMode:
|
|
13932
|
+
stripeProductId: z8.string().optional(),
|
|
13933
|
+
stripePriceId: z8.string().optional(),
|
|
13934
|
+
actionsPerPeriod: z8.number().int().nonnegative(),
|
|
13935
|
+
trialDays: z8.number().int().nonnegative().optional(),
|
|
13936
|
+
limits: z8.object(limitsShape).strict(),
|
|
13937
|
+
features: z8.object(featuresShape).strict(),
|
|
13938
|
+
invoice: z8.object({
|
|
13939
|
+
collectionMode: z8.enum([
|
|
13813
13940
|
"card",
|
|
13814
13941
|
"invoice"
|
|
13815
13942
|
]),
|
|
13816
|
-
dueDays:
|
|
13817
|
-
lines:
|
|
13818
|
-
description:
|
|
13819
|
-
amountUsd:
|
|
13943
|
+
dueDays: z8.number().int().nonnegative(),
|
|
13944
|
+
lines: z8.array(z8.object({
|
|
13945
|
+
description: z8.string().min(1),
|
|
13946
|
+
amountUsd: z8.number().nonnegative()
|
|
13820
13947
|
}).strict())
|
|
13821
13948
|
}).strict().optional()
|
|
13822
13949
|
}).strict();
|
|
13823
|
-
var topUpPackSchema =
|
|
13950
|
+
var topUpPackSchema = z8.object({
|
|
13824
13951
|
key: planKeyString,
|
|
13825
|
-
name:
|
|
13826
|
-
priceUsd:
|
|
13827
|
-
actions:
|
|
13828
|
-
stripeProductId:
|
|
13829
|
-
stripePriceId:
|
|
13952
|
+
name: z8.string().min(1).max(80),
|
|
13953
|
+
priceUsd: z8.number().positive(),
|
|
13954
|
+
actions: z8.number().int().positive(),
|
|
13955
|
+
stripeProductId: z8.string().optional(),
|
|
13956
|
+
stripePriceId: z8.string().optional()
|
|
13830
13957
|
}).strict();
|
|
13831
13958
|
function resolvePlanEntitlements(plan) {
|
|
13832
13959
|
const limits = {};
|
|
@@ -13858,35 +13985,42 @@ function isPlanRefusal(body) {
|
|
|
13858
13985
|
}
|
|
13859
13986
|
__name(isPlanRefusal, "isPlanRefusal");
|
|
13860
13987
|
__name4(isPlanRefusal, "isPlanRefusal");
|
|
13861
|
-
var billingSignupConfigSchema =
|
|
13862
|
-
enabled:
|
|
13863
|
-
defaultVersionKey:
|
|
13864
|
-
allowlistEmails:
|
|
13865
|
-
friendsPlan:
|
|
13866
|
-
versionKey:
|
|
13988
|
+
var billingSignupConfigSchema = z8.object({
|
|
13989
|
+
enabled: z8.boolean(),
|
|
13990
|
+
defaultVersionKey: z8.string().min(1).nullable(),
|
|
13991
|
+
allowlistEmails: z8.array(z8.string().email().toLowerCase()).max(500),
|
|
13992
|
+
friendsPlan: z8.object({
|
|
13993
|
+
versionKey: z8.string().min(1),
|
|
13867
13994
|
planKey: planKeyString
|
|
13868
13995
|
}).strict().nullable()
|
|
13869
13996
|
}).strict();
|
|
13870
|
-
var billingVersionDraftPatchSchema =
|
|
13871
|
-
revision:
|
|
13872
|
-
name:
|
|
13873
|
-
kind:
|
|
13874
|
-
engine:
|
|
13875
|
-
defaultPlanKey:
|
|
13876
|
-
plans:
|
|
13877
|
-
topUpPacks:
|
|
13878
|
-
forOrgIds:
|
|
13879
|
-
legacyCheckout:
|
|
13880
|
-
voiceAndDelegationAsActions:
|
|
13881
|
-
notes:
|
|
13997
|
+
var billingVersionDraftPatchSchema = z8.object({
|
|
13998
|
+
revision: z8.number().int().nonnegative().optional(),
|
|
13999
|
+
name: z8.string().min(1).max(80).optional(),
|
|
14000
|
+
kind: z8.enum(BILLING_VERSION_KINDS).optional(),
|
|
14001
|
+
engine: z8.enum(BILLING_ENGINES).optional(),
|
|
14002
|
+
defaultPlanKey: z8.string().optional(),
|
|
14003
|
+
plans: z8.array(billingPlanSchema).optional(),
|
|
14004
|
+
topUpPacks: z8.array(topUpPackSchema).optional(),
|
|
14005
|
+
forOrgIds: z8.array(z8.string().min(1)).optional(),
|
|
14006
|
+
legacyCheckout: z8.boolean().optional(),
|
|
14007
|
+
voiceAndDelegationAsActions: z8.boolean().optional(),
|
|
14008
|
+
notes: z8.string().max(2e3).optional()
|
|
13882
14009
|
}).strict();
|
|
13883
14010
|
var billingVersionDraftCreateSchema = billingVersionDraftPatchSchema.extend({
|
|
13884
|
-
key:
|
|
13885
|
-
copyFrom:
|
|
14011
|
+
key: z8.string().min(2),
|
|
14012
|
+
copyFrom: z8.string().optional()
|
|
14013
|
+
}).strict();
|
|
14014
|
+
var EXISTING_SUBSCRIPTION_POLICIES = [
|
|
14015
|
+
"keep",
|
|
14016
|
+
"next-renewal"
|
|
14017
|
+
];
|
|
14018
|
+
var billingVersionEditSchema = billingVersionDraftPatchSchema.extend({
|
|
14019
|
+
existingSubscriptions: z8.enum(EXISTING_SUBSCRIPTION_POLICIES).optional()
|
|
13886
14020
|
}).strict();
|
|
13887
|
-
var assignBillingPlanSchema =
|
|
13888
|
-
versionKey:
|
|
13889
|
-
planKey:
|
|
14021
|
+
var assignBillingPlanSchema = z8.object({
|
|
14022
|
+
versionKey: z8.string().min(1),
|
|
14023
|
+
planKey: z8.string().optional()
|
|
13890
14024
|
}).strict();
|
|
13891
14025
|
function planKeyList() {
|
|
13892
14026
|
return Object.keys(PLAN_KEYS).map((key) => ({
|
|
@@ -13910,30 +14044,85 @@ function parseWith(schema, body) {
|
|
|
13910
14044
|
}
|
|
13911
14045
|
__name(parseWith, "parseWith");
|
|
13912
14046
|
__name4(parseWith, "parseWith");
|
|
13913
|
-
var billingActionRatesSchema =
|
|
13914
|
-
voiceActionsPerMinute:
|
|
14047
|
+
var billingActionRatesSchema = z8.object({
|
|
14048
|
+
voiceActionsPerMinute: z8.number().nonnegative()
|
|
13915
14049
|
}).strict();
|
|
13916
14050
|
var BILLING_MOVE_DEFAULT_NOTICE_DAYS = 90;
|
|
13917
|
-
var
|
|
13918
|
-
|
|
14051
|
+
var BILLING_MOVE_NOTICE_KINDS = [
|
|
14052
|
+
"scheduled",
|
|
14053
|
+
"reminder",
|
|
14054
|
+
"done"
|
|
14055
|
+
];
|
|
14056
|
+
var BILLING_MOVE_WHEN = [
|
|
14057
|
+
"notice",
|
|
14058
|
+
"now"
|
|
14059
|
+
];
|
|
14060
|
+
var keyString = z9.string().regex(/^[a-z0-9][a-z0-9-]{1,63}$/, "lowercase letters, digits and dashes");
|
|
14061
|
+
var emailTextSchema = z9.object({
|
|
14062
|
+
subject: z9.string().trim().min(1).max(200).optional(),
|
|
14063
|
+
title: z9.string().trim().min(1).max(200).optional(),
|
|
14064
|
+
body: z9.string().trim().min(1).max(2e3).optional()
|
|
14065
|
+
}).strict();
|
|
14066
|
+
var billingMoveDraftSchema = z9.object({
|
|
13919
14067
|
key: keyString,
|
|
13920
|
-
name:
|
|
14068
|
+
name: z9.string().min(1).max(120),
|
|
13921
14069
|
fromVersionKey: keyString,
|
|
13922
14070
|
toVersionKey: keyString,
|
|
13923
14071
|
/** Every plan of the source version → a plan of the target version. */
|
|
13924
|
-
planMap:
|
|
13925
|
-
noticeDays:
|
|
14072
|
+
planMap: z9.record(z9.string().min(1), z9.string().min(1)),
|
|
14073
|
+
noticeDays: z9.number().int().min(0).max(730).default(BILLING_MOVE_DEFAULT_NOTICE_DAYS),
|
|
13926
14074
|
/** Absent ⇒ every org on the source version. */
|
|
13927
|
-
orgIds:
|
|
13928
|
-
excludeOrgIds:
|
|
13929
|
-
notes:
|
|
14075
|
+
orgIds: z9.array(z9.string().min(1)).max(1e4).optional(),
|
|
14076
|
+
excludeOrgIds: z9.array(z9.string().min(1)).max(1e4).default([]),
|
|
14077
|
+
notes: z9.string().max(2e3).optional(),
|
|
13930
14078
|
/** Actions per leftover credit when a credits version moves to an actions version; required then. */
|
|
13931
|
-
creditsToActionsRate:
|
|
14079
|
+
creditsToActionsRate: z9.number().positive().max(1e4).optional(),
|
|
14080
|
+
when: z9.enum(BILLING_MOVE_WHEN).default("notice"),
|
|
14081
|
+
/** Which owner emails this move sends; all off sends nothing. */
|
|
14082
|
+
emails: z9.object({
|
|
14083
|
+
scheduled: z9.boolean(),
|
|
14084
|
+
reminder: z9.boolean(),
|
|
14085
|
+
done: z9.boolean()
|
|
14086
|
+
}).strict().default({
|
|
14087
|
+
scheduled: true,
|
|
14088
|
+
reminder: true,
|
|
14089
|
+
done: true
|
|
14090
|
+
}),
|
|
14091
|
+
/** Staff wording per email, replacing ours; the list of what changes is always added. */
|
|
14092
|
+
emailText: z9.object({
|
|
14093
|
+
scheduled: emailTextSchema.optional(),
|
|
14094
|
+
reminder: emailTextSchema.optional(),
|
|
14095
|
+
done: emailTextSchema.optional()
|
|
14096
|
+
}).strict().optional()
|
|
13932
14097
|
}).strict().refine((m) => m.fromVersionKey !== m.toVersionKey, {
|
|
13933
14098
|
message: "source and target version must differ"
|
|
13934
14099
|
});
|
|
13935
|
-
var
|
|
13936
|
-
|
|
14100
|
+
var billingMovePatchSchema = z9.object({
|
|
14101
|
+
name: z9.string().min(1).max(120).optional(),
|
|
14102
|
+
noticeDays: z9.number().int().min(0).max(730).optional(),
|
|
14103
|
+
when: z9.enum(BILLING_MOVE_WHEN).optional(),
|
|
14104
|
+
emails: z9.object({
|
|
14105
|
+
scheduled: z9.boolean(),
|
|
14106
|
+
reminder: z9.boolean(),
|
|
14107
|
+
done: z9.boolean()
|
|
14108
|
+
}).strict().optional(),
|
|
14109
|
+
emailText: z9.object({
|
|
14110
|
+
scheduled: emailTextSchema.optional(),
|
|
14111
|
+
reminder: emailTextSchema.optional(),
|
|
14112
|
+
done: emailTextSchema.optional()
|
|
14113
|
+
}).strict().optional(),
|
|
14114
|
+
notes: z9.string().max(2e3).optional()
|
|
14115
|
+
}).strict();
|
|
14116
|
+
var billingMoveOrgDateSchema = z9.object({
|
|
14117
|
+
effectiveAt: z9.coerce.date()
|
|
14118
|
+
}).strict();
|
|
14119
|
+
var billingMoveEmailPreviewSchema = z9.object({
|
|
14120
|
+
orgId: z9.string().min(1).optional(),
|
|
14121
|
+
kind: z9.enum(BILLING_MOVE_NOTICE_KINDS),
|
|
14122
|
+
/** Unsaved wording to try, so the dialog shows the email before the move is created. */
|
|
14123
|
+
subject: z9.string().max(200).optional(),
|
|
14124
|
+
title: z9.string().max(200).optional(),
|
|
14125
|
+
body: z9.string().max(2e3).optional()
|
|
13937
14126
|
}).strict();
|
|
13938
14127
|
function parseWith2(schema, body) {
|
|
13939
14128
|
const r = schema.safeParse(body);
|
|
@@ -13947,10 +14136,72 @@ function parseWith2(schema, body) {
|
|
|
13947
14136
|
}
|
|
13948
14137
|
__name(parseWith2, "parseWith2");
|
|
13949
14138
|
__name4(parseWith2, "parseWith");
|
|
14139
|
+
var DWA_BUILD_MAX_BUNDLE_BYTES = 12 * 1024 * 1024;
|
|
14140
|
+
var sha256Hex = z10.string().regex(/^[a-f0-9]{64}$/);
|
|
14141
|
+
var defaultWebAppBundleAssetSchema = z10.object({
|
|
14142
|
+
path: z10.string().min(1).max(512),
|
|
14143
|
+
hash: sha256Hex,
|
|
14144
|
+
size: z10.number().int().nonnegative().max(WEB_APP_MAX_ASSET_BYTES),
|
|
14145
|
+
contentType: z10.string().min(1).max(200),
|
|
14146
|
+
base64: z10.string()
|
|
14147
|
+
});
|
|
14148
|
+
var defaultWebAppBundleToolSchema = z10.object({
|
|
14149
|
+
name: z10.string().min(1).max(64),
|
|
14150
|
+
description: z10.string().max(2e3),
|
|
14151
|
+
inputSchema: z10.unknown().optional(),
|
|
14152
|
+
outputSchema: z10.unknown().optional(),
|
|
14153
|
+
/** gzip + base64, as `lua push skill` sends a tool. */
|
|
14154
|
+
code: z10.string().min(1)
|
|
14155
|
+
});
|
|
14156
|
+
var defaultWebAppBundleSchema = z10.object({
|
|
14157
|
+
format: z10.literal(1),
|
|
14158
|
+
templateVersion: z10.string().regex(/^\d+\.\d+\.\d+$/),
|
|
14159
|
+
webApp: z10.object({
|
|
14160
|
+
name: z10.string().regex(/^[a-z][a-z0-9-]{1,39}$/),
|
|
14161
|
+
title: z10.string().max(200).optional(),
|
|
14162
|
+
description: z10.string().max(1e3).optional(),
|
|
14163
|
+
routes: z10.array(z10.object({
|
|
14164
|
+
key: z10.string(),
|
|
14165
|
+
method: z10.string(),
|
|
14166
|
+
path: z10.string(),
|
|
14167
|
+
description: z10.string().optional()
|
|
14168
|
+
}).passthrough()).min(1),
|
|
14169
|
+
hasFetch: z10.boolean(),
|
|
14170
|
+
nav: z10.array(z10.object({
|
|
14171
|
+
path: z10.string(),
|
|
14172
|
+
label: z10.string(),
|
|
14173
|
+
icon: z10.string().optional()
|
|
14174
|
+
}).passthrough()),
|
|
14175
|
+
csp: z10.record(z10.array(z10.string())).optional(),
|
|
14176
|
+
branding: z10.record(z10.unknown()).optional(),
|
|
14177
|
+
bundlesAgentPane: z10.boolean(),
|
|
14178
|
+
uiVersion: z10.string().max(64).optional(),
|
|
14179
|
+
entryHtml: z10.string().min(1).max(WEB_APP_ENTRY_HTML_MAX_CHARS),
|
|
14180
|
+
/** The route bundle, uncompressed. */
|
|
14181
|
+
code: z10.string().min(1),
|
|
14182
|
+
codeSha256: sha256Hex,
|
|
14183
|
+
assets: z10.array(defaultWebAppBundleAssetSchema).max(WEB_APP_MAX_ASSETS),
|
|
14184
|
+
compiler: z10.object({
|
|
14185
|
+
vite: z10.string().optional()
|
|
14186
|
+
})
|
|
14187
|
+
}),
|
|
14188
|
+
skill: z10.object({
|
|
14189
|
+
name: z10.string().regex(/^dwa-[a-z0-9-]+$/),
|
|
14190
|
+
title: z10.string().max(200).optional(),
|
|
14191
|
+
description: z10.string().min(1).max(2e3),
|
|
14192
|
+
context: z10.unknown(),
|
|
14193
|
+
tools: z10.array(defaultWebAppBundleToolSchema).min(1).max(10)
|
|
14194
|
+
}),
|
|
14195
|
+
/** What the pod's smoke run answered, route by route: every one 2xx or the build failed. */
|
|
14196
|
+
smoke: z10.array(z10.object({
|
|
14197
|
+
route: z10.string(),
|
|
14198
|
+
status: z10.number().int()
|
|
14199
|
+
})).min(1)
|
|
14200
|
+
});
|
|
13950
14201
|
|
|
13951
14202
|
// ../workflow-graph/dist/index.mjs
|
|
13952
14203
|
import { createHash } from "crypto";
|
|
13953
|
-
import { z as
|
|
14204
|
+
import { z as z11 } from "zod";
|
|
13954
14205
|
import { z as z22 } from "zod";
|
|
13955
14206
|
import { createHash as createHash2 } from "crypto";
|
|
13956
14207
|
var __defProp5 = Object.defineProperty;
|
|
@@ -14245,8 +14496,8 @@ var rows = /* @__PURE__ */ __name5((s, path, page) => ({
|
|
|
14245
14496
|
var fromKnowledge = /* @__PURE__ */ __name5((k) => ({
|
|
14246
14497
|
knowledge: k
|
|
14247
14498
|
}), "fromKnowledge");
|
|
14248
|
-
var SideEffectsSchema =
|
|
14249
|
-
var JobResourcesSchema =
|
|
14499
|
+
var SideEffectsSchema = z11.enum(WORKFLOW_SIDE_EFFECTS);
|
|
14500
|
+
var JobResourcesSchema = z11.enum(WORKFLOW_JOB_RESOURCES);
|
|
14250
14501
|
var WORKFLOW_MODEL_TEMPLATE_ROOT = "initData";
|
|
14251
14502
|
var WORKFLOW_MODEL_TEMPLATE_RE = /^\$\{\s*initData\.([A-Za-z0-9_.\-[\]]+)\s*(?:\|([^}]*))?\}$/;
|
|
14252
14503
|
var PATH_SEGMENT_RE = /^[A-Za-z0-9_-]+(?:\[(?:0|[1-9]\d*)\])*$/;
|