@wayai/cli 0.3.277 → 0.3.278
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/index.js +50 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12598,7 +12598,7 @@ var init_chunk_BPCNB5RT = __esm({
|
|
|
12598
12598
|
}
|
|
12599
12599
|
});
|
|
12600
12600
|
|
|
12601
|
-
// ../../packages/core/dist/chunk-
|
|
12601
|
+
// ../../packages/core/dist/chunk-TXQWDP2F.js
|
|
12602
12602
|
function toolParametersViolations(params) {
|
|
12603
12603
|
try {
|
|
12604
12604
|
if (containsKanbanPlaceholders(params)) return [];
|
|
@@ -12609,6 +12609,19 @@ function toolParametersViolations(params) {
|
|
|
12609
12609
|
return [{ path: "", message: "parameters are nested too deeply to serialize" }];
|
|
12610
12610
|
}
|
|
12611
12611
|
}
|
|
12612
|
+
function configText(config, key) {
|
|
12613
|
+
return config !== null && typeof config === "object" ? nonBlank(config[key]) : void 0;
|
|
12614
|
+
}
|
|
12615
|
+
function statedToolDescription(text4) {
|
|
12616
|
+
const description2 = nonBlank(text4);
|
|
12617
|
+
return description2 === DEFAULT_TOOL_CONFIG_DESCRIPTION ? void 0 : description2;
|
|
12618
|
+
}
|
|
12619
|
+
function toolConfigDescription(config) {
|
|
12620
|
+
return statedToolDescription(configText(config, "description"));
|
|
12621
|
+
}
|
|
12622
|
+
function offeredToolDescription(config, toolDescription) {
|
|
12623
|
+
return toolConfigDescription(config) ?? nonBlank(toolDescription);
|
|
12624
|
+
}
|
|
12612
12625
|
function refineToolConfig(value, ctx) {
|
|
12613
12626
|
const raw = value.tool_config;
|
|
12614
12627
|
if (raw == null) return;
|
|
@@ -12639,14 +12652,16 @@ function refineToolConfig(value, ctx) {
|
|
|
12639
12652
|
});
|
|
12640
12653
|
}
|
|
12641
12654
|
}
|
|
12642
|
-
var toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
|
|
12643
|
-
var
|
|
12644
|
-
"../../packages/core/dist/chunk-
|
|
12655
|
+
var nonBlank, DEFAULT_TOOL_CONFIG_DESCRIPTION, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, toolReplaySettingsFields, toolReplaySettingsSchema, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody;
|
|
12656
|
+
var init_chunk_TXQWDP2F = __esm({
|
|
12657
|
+
"../../packages/core/dist/chunk-TXQWDP2F.js"() {
|
|
12645
12658
|
"use strict";
|
|
12646
12659
|
init_chunk_WEXVYJ5H();
|
|
12647
12660
|
init_chunk_HZ6CADSY();
|
|
12648
12661
|
init_chunk_EVXGKOJV();
|
|
12649
12662
|
init_zod();
|
|
12663
|
+
nonBlank = (text4) => typeof text4 === "string" && text4.trim() !== "" ? text4 : void 0;
|
|
12664
|
+
DEFAULT_TOOL_CONFIG_DESCRIPTION = "Function description";
|
|
12650
12665
|
toolIdParam = external_exports.object({ id: uuidSchema });
|
|
12651
12666
|
listToolsQuery = external_exports.object({ agent_id: uuidSchema, hub_id: uuidSchema });
|
|
12652
12667
|
toolAgentQuery = external_exports.object({ agent_id: uuidSchema, hub_id: uuidSchema });
|
|
@@ -14009,7 +14024,7 @@ var init_chunk_7NQZRSSJ = __esm({
|
|
|
14009
14024
|
}
|
|
14010
14025
|
});
|
|
14011
14026
|
|
|
14012
|
-
// ../../packages/core/dist/chunk-
|
|
14027
|
+
// ../../packages/core/dist/chunk-NAW4LACQ.js
|
|
14013
14028
|
function declaresNoConnection(agent) {
|
|
14014
14029
|
return agent.connection === null && !agent.connection_id;
|
|
14015
14030
|
}
|
|
@@ -14022,6 +14037,28 @@ function customToolConnectionRefusal(agentName, tool) {
|
|
|
14022
14037
|
if (tool.connection || tool.connection_id) return null;
|
|
14023
14038
|
return `Agent "${agentName}", tool "${tool.name}": connection is required. A custom tool calls through one of the hub's connections: name it.`;
|
|
14024
14039
|
}
|
|
14040
|
+
function customToolDescriptionAfterPush(entry, row, writtenConfig) {
|
|
14041
|
+
const written = row ? writtenConfig : entry.config;
|
|
14042
|
+
const stated = toolConfigDescription(written);
|
|
14043
|
+
if (stated !== void 0 && stated !== toolConfigDescription(row?.tool_config)) return { description: stated };
|
|
14044
|
+
const keepsNoText = row !== void 0 && offeredToolDescription(row.tool_config, row.tool_description) === void 0;
|
|
14045
|
+
const sent = entry.description === null ? "" : entry.description;
|
|
14046
|
+
const fieldCanMove = !row || entry.id === row.tool_id || toolConfigDescription(entry.config) === void 0;
|
|
14047
|
+
if (fieldCanMove && sent !== void 0 && sent !== (row?.tool_description ?? "")) {
|
|
14048
|
+
const text4 = statedToolDescription(sent);
|
|
14049
|
+
if (text4 !== void 0) return { description: text4 };
|
|
14050
|
+
return keepsNoText ? {} : { refused: "description" };
|
|
14051
|
+
}
|
|
14052
|
+
if (row && written === void 0) return {};
|
|
14053
|
+
const kept = stated ?? offeredToolDescription(void 0, row?.tool_description);
|
|
14054
|
+
if (kept !== void 0) return { description: kept };
|
|
14055
|
+
if (keepsNoText) return {};
|
|
14056
|
+
return { refused: row ? "config.description" : "description" };
|
|
14057
|
+
}
|
|
14058
|
+
function customToolDescriptionRefusal(agentName, entry, row, writtenConfig) {
|
|
14059
|
+
const field = customToolDescriptionAfterPush(entry, row, writtenConfig).refused;
|
|
14060
|
+
return field ? `Agent "${agentName}", tool "${entry.name}": ${field} is required. An agent is not offered a tool with no description: say what the tool does in ${field}.` : null;
|
|
14061
|
+
}
|
|
14025
14062
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
14026
14063
|
const agents = config.agents;
|
|
14027
14064
|
if (!Array.isArray(agents)) return;
|
|
@@ -14735,10 +14772,10 @@ function skillSectionsAsResources(scope) {
|
|
|
14735
14772
|
};
|
|
14736
14773
|
}
|
|
14737
14774
|
var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, HUB_AS_CODE_AGENT_TOOL_KEYS, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, flagEntriesOf, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, MAX_HUB_AS_CODE_DEPTH, NAMED_DEPTH_SEGMENTS, NAMED_DEPTH_KEY_CHARS, fieldName, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
|
|
14738
|
-
var
|
|
14739
|
-
"../../packages/core/dist/chunk-
|
|
14775
|
+
var init_chunk_NAW4LACQ = __esm({
|
|
14776
|
+
"../../packages/core/dist/chunk-NAW4LACQ.js"() {
|
|
14740
14777
|
"use strict";
|
|
14741
|
-
|
|
14778
|
+
init_chunk_TXQWDP2F();
|
|
14742
14779
|
init_chunk_HRKVCI5A();
|
|
14743
14780
|
init_chunk_IW7D2QOD();
|
|
14744
14781
|
init_chunk_LBDH7LCG();
|
|
@@ -16344,8 +16381,8 @@ var init_contracts = __esm({
|
|
|
16344
16381
|
init_chunk_E4DIIOOE();
|
|
16345
16382
|
init_chunk_7CYHPF35();
|
|
16346
16383
|
init_chunk_BPCNB5RT();
|
|
16347
|
-
|
|
16348
|
-
|
|
16384
|
+
init_chunk_NAW4LACQ();
|
|
16385
|
+
init_chunk_TXQWDP2F();
|
|
16349
16386
|
init_chunk_HRKVCI5A();
|
|
16350
16387
|
init_chunk_IW7D2QOD();
|
|
16351
16388
|
init_chunk_2YEGUQR7();
|
|
@@ -22700,8 +22737,8 @@ var init_hub_materializer = __esm({
|
|
|
22700
22737
|
var init_ci = __esm({
|
|
22701
22738
|
"../../packages/core/dist/contracts/ci.js"() {
|
|
22702
22739
|
"use strict";
|
|
22703
|
-
|
|
22704
|
-
|
|
22740
|
+
init_chunk_NAW4LACQ();
|
|
22741
|
+
init_chunk_TXQWDP2F();
|
|
22705
22742
|
init_chunk_HRKVCI5A();
|
|
22706
22743
|
init_chunk_IW7D2QOD();
|
|
22707
22744
|
init_chunk_2YEGUQR7();
|
|
@@ -27764,7 +27801,7 @@ New hub: "${newHub.hubName}" (${hubType})`);
|
|
|
27764
27801
|
const parsed = parseHubFolder(newHub.hubFolder, { allowNewHub: true });
|
|
27765
27802
|
const refusals = (parsed.agents ?? []).flatMap((agent) => [
|
|
27766
27803
|
agentConnectionRefusal(agent),
|
|
27767
|
-
...(agent.tools?.custom ?? []).
|
|
27804
|
+
...(agent.tools?.custom ?? []).flatMap((tool) => [customToolConnectionRefusal(agent.name, tool), customToolDescriptionRefusal(agent.name, tool)])
|
|
27768
27805
|
]).filter((refusal2) => refusal2 !== null);
|
|
27769
27806
|
if (refusals.length > 0) throw expected(refusals.join("\n"));
|
|
27770
27807
|
console.log("Creating hub...");
|