@xuda.io/ai_module 1.1.5601 → 1.1.5603
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/index.mjs +20 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1387,6 +1387,7 @@ Execute shell commands on the remote machine through SSH, for example:
|
|
|
1387
1387
|
ssh -o BatchMode=yes -o StrictHostKeyChecking=no ${get_codex_remote_host(ip)} "<command>"
|
|
1388
1388
|
|
|
1389
1389
|
Do not assume the current local filesystem is the remote machine. Use SSH for inspection, edits, installs, and command execution unless the user explicitly asks for local work.
|
|
1390
|
+
For generated websites or other large file payloads, create the files first on the local Xuda server in a temporary working directory, validate them locally, then copy them to the remote machine with scp and use SSH only for remote placement, permissions, service reloads, and verification. Avoid embedding long HTML, CSS, JavaScript, JSON, or scripts inside nested ssh heredocs because shell quoting can corrupt the generated files.
|
|
1390
1391
|
|
|
1391
1392
|
User request:
|
|
1392
1393
|
${prompt}`;
|
|
@@ -4302,6 +4303,7 @@ const contactGuardrailAgent = new Agent({
|
|
|
4302
4303
|
// };
|
|
4303
4304
|
|
|
4304
4305
|
export const submit_chat_conversation = async function (req, job_id, headers) {
|
|
4306
|
+
debugger;
|
|
4305
4307
|
const { profile_id, uid, metadata = {}, accepted_plan_item_id } = req;
|
|
4306
4308
|
let { conversation_id } = req;
|
|
4307
4309
|
try {
|
|
@@ -5073,13 +5075,27 @@ const get_dashboard_cpi_zod_item = function (key, val = {}, options = {}) {
|
|
|
5073
5075
|
if (val.enum?.length) {
|
|
5074
5076
|
const enum_values = val.enum.filter((item) => typeof item !== 'undefined');
|
|
5075
5077
|
if (!enum_values.length) {
|
|
5076
|
-
schema = z.
|
|
5078
|
+
schema = z.string();
|
|
5077
5079
|
} else if (enum_values.length === 1) {
|
|
5078
|
-
|
|
5080
|
+
switch (typeof enum_values[0]) {
|
|
5081
|
+
case 'number':
|
|
5082
|
+
schema = z.number();
|
|
5083
|
+
break;
|
|
5084
|
+
case 'boolean':
|
|
5085
|
+
schema = z.boolean();
|
|
5086
|
+
break;
|
|
5087
|
+
default:
|
|
5088
|
+
schema = z.string();
|
|
5089
|
+
break;
|
|
5090
|
+
}
|
|
5079
5091
|
} else if (enum_values.every((item) => typeof item === 'string')) {
|
|
5080
5092
|
schema = z.enum(enum_values);
|
|
5093
|
+
} else if (enum_values.every((item) => typeof item === 'number')) {
|
|
5094
|
+
schema = z.number();
|
|
5095
|
+
} else if (enum_values.every((item) => typeof item === 'boolean')) {
|
|
5096
|
+
schema = z.boolean();
|
|
5081
5097
|
} else {
|
|
5082
|
-
schema = z.
|
|
5098
|
+
schema = z.string();
|
|
5083
5099
|
}
|
|
5084
5100
|
} else {
|
|
5085
5101
|
switch (val.type) {
|
|
@@ -5108,7 +5124,7 @@ const get_dashboard_cpi_zod_item = function (key, val = {}, options = {}) {
|
|
|
5108
5124
|
break;
|
|
5109
5125
|
}
|
|
5110
5126
|
default:
|
|
5111
|
-
schema = z.
|
|
5127
|
+
schema = z.string();
|
|
5112
5128
|
break;
|
|
5113
5129
|
}
|
|
5114
5130
|
}
|