@wix/ditto-codegen-public 1.0.491 → 1.0.492
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/assets/commit-message-rule.md +1 -0
- package/dist/out.js +23 -10
- package/package.json +2 -2
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
COMMIT MESSAGE:
|
|
2
2
|
First thing, before writing any code, call the `set-commit-message` tool. See its description for format and length.
|
|
3
|
+
Your code is saved to the site automatically when your run ends, with that message. You cannot see or check the save, so do not say you cannot confirm it.
|
package/dist/out.js
CHANGED
|
@@ -12717,7 +12717,7 @@ var require_brik_import = __commonJS({
|
|
|
12717
12717
|
exports2.BRIK_IMPORT_RULES = void 0;
|
|
12718
12718
|
exports2.BRIK_IMPORT_RULES = `# Brik Tool Import Rules
|
|
12719
12719
|
|
|
12720
|
-
|
|
12720
|
+
Check with \`glob\` whether \`.wix/agentInput/brikMeta.json\` exists. If it exists AND its \`brikMeta\` object has \`promptVariant\` set to \`skill-v1\`, this job is a Brik tool import: you MUST invoke the \`wix-brik\` skill FIRST and follow it exactly. It owns the import itself - scaffolding the Editor React Component, running the deterministic import script over \`.wix/agentInput/brikImport.json\`, splicing the tool's creative code, then installing dependencies and building plus generating the manifest. Do NOT derive the component's public surface yourself and do NOT re-tune the manifest.
|
|
12721
12721
|
|
|
12722
12722
|
The skill does NOT replace step 5 of the workflow: its \`npx wix build\` transpiles without typechecking. Once its DONE WHEN checks pass, still run step 5 as the workflow says, and fix whatever it reports in your spliced code only - never in the script-written surface.
|
|
12723
12723
|
|
|
@@ -12843,7 +12843,7 @@ var require_user_attachments = __commonJS({
|
|
|
12843
12843
|
exports2.USER_ATTACHMENTS_RULES = void 0;
|
|
12844
12844
|
exports2.USER_ATTACHMENTS_RULES = `# User Attachment Rules
|
|
12845
12845
|
|
|
12846
|
-
|
|
12846
|
+
Check with \`glob\` whether \`.wix/agentInput/userAttachments.json\` exists. If it does, the user uploaded files with this request. Its \`userAttachments\` list gives each file's \`fileName\` (as the user named it), \`path\` (under \`.wix/agentInput/attachments/\`), \`mimeType\`, \`sizeBytes\` and \`status\`. Only files with \`status\` \`downloaded\` are on disk; any other status says why the file is missing, and you must not claim to have used it.
|
|
12847
12847
|
|
|
12848
12848
|
- Read the files the request refers to before you write any code. When the request doesn't say which, read them all.
|
|
12849
12849
|
- When you build or change an Editor React Component from them, first read the \`wix-app\` skill's \`references/editor-react-component/USER-SOURCES.md\` in full, if the skill has it, and follow it: it says how to port the user's code, match a design and upload their images.
|
|
@@ -14568,7 +14568,7 @@ ${environmentIdentity}`;
|
|
|
14568
14568
|
- \`multi-edit\` to apply N find-and-replace edits across one or more files in one call. NEVER call \`edit\` more than once per turn \u2014 use multi-edit instead. \`edit\` is reserved for a single edit to one file. When ${multiEditContextClause} across N files, use ONE \`multi-edit\` with all N edits.
|
|
14569
14569
|
- \`apply_patch\` (when available): inside each \`*** Update File\` section, list hunks in FILE ORDER, top to bottom. The applier only searches forward from where the previous hunk matched, so a hunk whose lines sit ABOVE the previous one fails with "Failed to find expected lines" even though the lines exist \u2014 the whole patch is then rejected. Unsure of the order? Re-read the file first, or split into one patch per hunk.
|
|
14570
14570
|
- Tool arguments are strict JSON, and \`write\`/\`edit\`/\`batch-write\`/\`multi-edit\`/\`apply_patch\` write \`content\`/\`oldString\`/\`newString\`/\`patchText\` to disk EXACTLY as decoded from that JSON \u2014 there is no second unescaping pass, so encode for the ONE decode that happens. Use \`\\n\`/\`\\t\`/\`\\"\` in the JSON when you want the file to contain a REAL newline/tab/quote character (a raw unescaped newline inside a JSON string value breaks parsing). If the file itself must contain the two LITERAL characters backslash-then-n (e.g. inside a string literal like \`.join('\\n')\`, a regex, or an already-escaped JSON value), escape the backslash itself in your JSON so it survives the one decode intact \u2014 do NOT emit a bare \`\\n\` expecting a tool to turn it back into two literal characters for you; none of them do.
|
|
14571
|
-
- For tools where no batch variant exists (e.g. \`grep\`, \`glob\`), still emit MULTIPLE \`tool_use\` blocks in a SINGLE response when the calls are independent. Sequential turns waste a model round-trip per call.`;
|
|
14571
|
+
- For tools where no batch variant exists (e.g. \`grep\`, \`glob\`), still emit MULTIPLE \`tool_use\` blocks in a SINGLE response when the calls are independent. Sequential turns waste a model round-trip per call. If \`grep\` fails with "Ripgrep JSON record exceeded", a matching line is huge (a minified or generated file): do not repeat it, search that file with \`bash\` (\`grep -o -E '.{0,120}PATTERN.{0,120}' <file>\`) or read the part you need with \`read\` and an offset.`;
|
|
14572
14572
|
}
|
|
14573
14573
|
}
|
|
14574
14574
|
});
|
|
@@ -15680,6 +15680,9 @@ var require_config = __commonJS({
|
|
|
15680
15680
|
// harmless read.
|
|
15681
15681
|
"/root/.config/opencode/rules/**": "allow",
|
|
15682
15682
|
"/root/.opencode/**": "allow",
|
|
15683
|
+
// A failed `npm install` prints the path of its log here, and agents read it
|
|
15684
|
+
// to see why. Same auto-reject as above otherwise.
|
|
15685
|
+
"/root/.npm/_logs/**": "allow",
|
|
15683
15686
|
"/tmp/**": "allow"
|
|
15684
15687
|
};
|
|
15685
15688
|
var PLANNING_TOOLS_DENIED = {
|
|
@@ -17799,6 +17802,7 @@ var require_executor = __commonJS({
|
|
|
17799
17802
|
exports2.applyPostRunValidation = applyPostRunValidation;
|
|
17800
17803
|
exports2.executeOpenCode = executeOpenCode;
|
|
17801
17804
|
exports2.resolveFinalRunCost = resolveFinalRunCost;
|
|
17805
|
+
exports2.buildOpenCodeInvocation = buildOpenCodeInvocation;
|
|
17802
17806
|
var child_process_1 = require("child_process");
|
|
17803
17807
|
var ditto_codegen_types_12 = require_dist4();
|
|
17804
17808
|
var config_12 = require_config();
|
|
@@ -17975,18 +17979,22 @@ var require_executor = __commonJS({
|
|
|
17975
17979
|
});
|
|
17976
17980
|
return { ...usage, cost: runCost };
|
|
17977
17981
|
}
|
|
17978
|
-
|
|
17982
|
+
var MAX_PROMPT_ARG_BYTES = 64 * 1024;
|
|
17983
|
+
function buildOpenCodeInvocation(prompt, continueSession) {
|
|
17979
17984
|
const sessionArgs = continueSession ? ["--continue"] : [];
|
|
17980
|
-
|
|
17985
|
+
const args = [
|
|
17981
17986
|
"run",
|
|
17982
17987
|
...sessionArgs,
|
|
17983
17988
|
"--print-logs",
|
|
17984
17989
|
"--log-level",
|
|
17985
17990
|
"ERROR",
|
|
17986
17991
|
"--format",
|
|
17987
|
-
"json"
|
|
17988
|
-
prompt
|
|
17992
|
+
"json"
|
|
17989
17993
|
];
|
|
17994
|
+
if (Buffer.byteLength(prompt) > MAX_PROMPT_ARG_BYTES) {
|
|
17995
|
+
return { args, stdinPrompt: prompt };
|
|
17996
|
+
}
|
|
17997
|
+
return { args: [...args, prompt] };
|
|
17990
17998
|
}
|
|
17991
17999
|
async function executeOpenCodeOnce(options, attempt, maxAttempts, toolUsage) {
|
|
17992
18000
|
const { prompt, outputPath, projectId, onStdout, onStderr, continueSession = false } = options;
|
|
@@ -18024,7 +18032,7 @@ var require_executor = __commonJS({
|
|
|
18024
18032
|
finalize
|
|
18025
18033
|
};
|
|
18026
18034
|
try {
|
|
18027
|
-
const args =
|
|
18035
|
+
const { args, stdinPrompt } = buildOpenCodeInvocation(prompt, continueSession);
|
|
18028
18036
|
logger_12.logger.info("[OpenCode] Executing opencode run", {
|
|
18029
18037
|
attempt,
|
|
18030
18038
|
maxRetries: maxAttempts,
|
|
@@ -18041,9 +18049,14 @@ var require_executor = __commonJS({
|
|
|
18041
18049
|
ctx.child = (0, child_process_1.spawn)("opencode", args, {
|
|
18042
18050
|
cwd: outputPath,
|
|
18043
18051
|
env,
|
|
18044
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
18052
|
+
stdio: [stdinPrompt === void 0 ? "ignore" : "pipe", "pipe", "pipe"],
|
|
18045
18053
|
detached: true
|
|
18046
18054
|
});
|
|
18055
|
+
if (stdinPrompt !== void 0) {
|
|
18056
|
+
ctx.child.stdin?.on("error", () => {
|
|
18057
|
+
});
|
|
18058
|
+
ctx.child.stdin?.end(stdinPrompt);
|
|
18059
|
+
}
|
|
18047
18060
|
timers.timeoutId = (0, process_handlers_1.setupTotalTimeout)(ctx);
|
|
18048
18061
|
timers.idleCheckId = (0, process_handlers_1.setupIdleWatchdog)(ctx);
|
|
18049
18062
|
(0, process_handlers_1.setupStdoutHandler)(ctx, onStdout);
|
|
@@ -23608,7 +23621,7 @@ var require_bi_events = __commonJS({
|
|
|
23608
23621
|
var types_1 = require_types_impl();
|
|
23609
23622
|
var bi_logger_1 = require_bi_logger2();
|
|
23610
23623
|
var logger_12 = require_logger();
|
|
23611
|
-
var MAX_JOB_INPUT_LENGTH =
|
|
23624
|
+
var MAX_JOB_INPUT_LENGTH = 5e3;
|
|
23612
23625
|
var TRUNCATION_SUFFIX = "\u2026";
|
|
23613
23626
|
var JOB_STATUS_MAP = {
|
|
23614
23627
|
COMPLETED: "successful",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.492",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "2af551fe25ec6f9cf9f40e58d6be2436e7f01c0f383bd854d1160092"
|
|
33
33
|
}
|