@wix/ditto-codegen-public 1.0.440 → 1.0.441
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/out.js +24 -81
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -12075,80 +12075,6 @@ var require_rules_writer = __commonJS({
|
|
|
12075
12075
|
}
|
|
12076
12076
|
});
|
|
12077
12077
|
|
|
12078
|
-
// dist/opencode-integration/generated-plugins.js
|
|
12079
|
-
var require_generated_plugins = __commonJS({
|
|
12080
|
-
"dist/opencode-integration/generated-plugins.js"(exports2) {
|
|
12081
|
-
"use strict";
|
|
12082
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12083
|
-
exports2.OPENCODE_PLUGIN_DIR = void 0;
|
|
12084
|
-
exports2.writeGeneratedPlugin = writeGeneratedPlugin;
|
|
12085
|
-
var promises_1 = require("fs/promises");
|
|
12086
|
-
var os_1 = require("os");
|
|
12087
|
-
var path_12 = require("path");
|
|
12088
|
-
var logger_12 = require_logger();
|
|
12089
|
-
exports2.OPENCODE_PLUGIN_DIR = (0, path_12.join)((0, os_1.homedir)(), ".config", "opencode", "plugin");
|
|
12090
|
-
async function writeGeneratedPlugin(filename, source) {
|
|
12091
|
-
await (0, promises_1.mkdir)(exports2.OPENCODE_PLUGIN_DIR, { recursive: true });
|
|
12092
|
-
await (0, promises_1.writeFile)((0, path_12.join)(exports2.OPENCODE_PLUGIN_DIR, filename), source, "utf-8");
|
|
12093
|
-
logger_12.logger.info("[OpenCode] Wrote generated plugin", { plugin: filename });
|
|
12094
|
-
}
|
|
12095
|
-
}
|
|
12096
|
-
});
|
|
12097
|
-
|
|
12098
|
-
// dist/opencode-integration/node-modules-guard.js
|
|
12099
|
-
var require_node_modules_guard = __commonJS({
|
|
12100
|
-
"dist/opencode-integration/node-modules-guard.js"(exports2) {
|
|
12101
|
-
"use strict";
|
|
12102
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12103
|
-
exports2.GUARD_PLUGIN_PATH = exports2.GUARD_MESSAGE = exports2.MAX_SPELUNK_CALLS = void 0;
|
|
12104
|
-
exports2.isSpelunkCommand = isSpelunkCommand;
|
|
12105
|
-
exports2.buildGuardPluginSource = buildGuardPluginSource;
|
|
12106
|
-
exports2.writeGuardPlugin = writeGuardPlugin;
|
|
12107
|
-
var path_12 = require("path");
|
|
12108
|
-
var generated_plugins_1 = require_generated_plugins();
|
|
12109
|
-
var READ_VERB_RE = /(^|[\s|;&(])(grep|rg|cat|head|tail|sed|awk|less|more|strings|find)\b/;
|
|
12110
|
-
var SDK_INTERNALS_RE = /node_modules\/(@wix|vite|astro)\b/;
|
|
12111
|
-
exports2.MAX_SPELUNK_CALLS = 2;
|
|
12112
|
-
exports2.GUARD_MESSAGE = `BLOCKED: node_modules is not a documentation source, and the exploratory budget (${exports2.MAX_SPELUNK_CALLS} lookups) is used up. The API you are hunting is already documented:
|
|
12113
|
-
- Wix Data items CRUD: import { items } from "@wix/data" (items.query/get/insert/update/remove).
|
|
12114
|
-
- Dashboard host SDK (toasts, navigation): import { dashboard } from "@wix/dashboard".
|
|
12115
|
-
For anything more (CSS-module/asset typing, component config, etc.), re-read the wix-app skill's references with batch-read, or call SearchWixSDKDocumentation / ReadFullDocsMethodSchema. Do not retry this command.`;
|
|
12116
|
-
function isSpelunkCommand(command) {
|
|
12117
|
-
return READ_VERB_RE.test(command) && SDK_INTERNALS_RE.test(command);
|
|
12118
|
-
}
|
|
12119
|
-
var GUARD_PLUGIN_FILENAME = "node-modules-guard.ts";
|
|
12120
|
-
exports2.GUARD_PLUGIN_PATH = (0, path_12.join)(generated_plugins_1.OPENCODE_PLUGIN_DIR, GUARD_PLUGIN_FILENAME);
|
|
12121
|
-
function buildGuardPluginSource() {
|
|
12122
|
-
return `// Generated by @wix/ditto-codegen (node-modules-guard) \u2014 do not edit.
|
|
12123
|
-
const READ_VERB_RE = /${READ_VERB_RE.source}/;
|
|
12124
|
-
const SDK_INTERNALS_RE = /${SDK_INTERNALS_RE.source}/;
|
|
12125
|
-
const MAX_SPELUNK_CALLS = ${exports2.MAX_SPELUNK_CALLS};
|
|
12126
|
-
const GUARD_MESSAGE = ${JSON.stringify(exports2.GUARD_MESSAGE)};
|
|
12127
|
-
|
|
12128
|
-
let spelunkCalls = 0;
|
|
12129
|
-
|
|
12130
|
-
export const NodeModulesGuard = async () => ({
|
|
12131
|
-
"tool.execute.before": async (
|
|
12132
|
-
input: { tool: string },
|
|
12133
|
-
output: { args: { command?: string } },
|
|
12134
|
-
) => {
|
|
12135
|
-
if (input.tool !== "bash") return;
|
|
12136
|
-
const command = output.args?.command ?? "";
|
|
12137
|
-
if (!READ_VERB_RE.test(command) || !SDK_INTERNALS_RE.test(command)) return;
|
|
12138
|
-
spelunkCalls += 1;
|
|
12139
|
-
if (spelunkCalls > MAX_SPELUNK_CALLS) {
|
|
12140
|
-
throw new Error(GUARD_MESSAGE);
|
|
12141
|
-
}
|
|
12142
|
-
},
|
|
12143
|
-
});
|
|
12144
|
-
`;
|
|
12145
|
-
}
|
|
12146
|
-
async function writeGuardPlugin() {
|
|
12147
|
-
await (0, generated_plugins_1.writeGeneratedPlugin)(GUARD_PLUGIN_FILENAME, buildGuardPluginSource());
|
|
12148
|
-
}
|
|
12149
|
-
}
|
|
12150
|
-
});
|
|
12151
|
-
|
|
12152
12078
|
// ../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/cjs/build/types.impl.js
|
|
12153
12079
|
var require_types_impl2 = __commonJS({
|
|
12154
12080
|
"../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/cjs/build/types.impl.js"(exports2) {
|
|
@@ -15705,7 +15631,6 @@ var require_config = __commonJS({
|
|
|
15705
15631
|
var constants_1 = require_constants5();
|
|
15706
15632
|
var subagents_1 = require_subagents();
|
|
15707
15633
|
var rules_writer_12 = require_rules_writer();
|
|
15708
|
-
var node_modules_guard_12 = require_node_modules_guard();
|
|
15709
15634
|
var environments_12 = require_environments();
|
|
15710
15635
|
var CodeGenService_12 = require_CodeGenService();
|
|
15711
15636
|
exports2.DEFAULT_TIMEOUT_MS = 20 * 60 * 1e3;
|
|
@@ -15843,7 +15768,7 @@ var require_config = __commonJS({
|
|
|
15843
15768
|
]: "deny",
|
|
15844
15769
|
external_directory: READABLE_EXTERNAL_DIRS
|
|
15845
15770
|
};
|
|
15846
|
-
function buildConfig(instructionPaths, permission, {
|
|
15771
|
+
function buildConfig(instructionPaths, permission, { isCodeWritingFlow = false, withAgents = false } = {}) {
|
|
15847
15772
|
return {
|
|
15848
15773
|
model: exports2.DEFAULT_MODEL,
|
|
15849
15774
|
small_model: exports2.DEFAULT_SMALL_MODEL,
|
|
@@ -15855,7 +15780,7 @@ var require_config = __commonJS({
|
|
|
15855
15780
|
lsp: false,
|
|
15856
15781
|
mcp: WIX_MCP_CONFIG,
|
|
15857
15782
|
watcher: { ignore: WATCHER_IGNORE_PATTERNS },
|
|
15858
|
-
...
|
|
15783
|
+
...isCodeWritingFlow ? { autoupdate: false, share: "disabled" } : {},
|
|
15859
15784
|
// Only code-writing flows register subagents. The read-only ask flow must
|
|
15860
15785
|
// not: its primary agent re-opens `task`, which would let the write-capable
|
|
15861
15786
|
// validator subagent run in a flow meant to stay read-only.
|
|
@@ -15896,12 +15821,12 @@ var require_config = __commonJS({
|
|
|
15896
15821
|
return buildConfig(paths(env.askRules), ASK_PERMISSIONS);
|
|
15897
15822
|
case CodeGenService_12.TaskKind.FIX_GIT_CONFLICTS:
|
|
15898
15823
|
return buildConfig(paths(env.gitConflictsRules), GIT_CONFLICTS_PERMISSIONS, {
|
|
15899
|
-
|
|
15824
|
+
isCodeWritingFlow: true,
|
|
15900
15825
|
withAgents: true
|
|
15901
15826
|
});
|
|
15902
15827
|
default:
|
|
15903
15828
|
return buildConfig(paths(env.codegenRules), CODEGEN_PERMISSIONS, {
|
|
15904
|
-
|
|
15829
|
+
isCodeWritingFlow: true,
|
|
15905
15830
|
withAgents: true
|
|
15906
15831
|
});
|
|
15907
15832
|
}
|
|
@@ -15909,6 +15834,26 @@ var require_config = __commonJS({
|
|
|
15909
15834
|
}
|
|
15910
15835
|
});
|
|
15911
15836
|
|
|
15837
|
+
// dist/opencode-integration/generated-plugins.js
|
|
15838
|
+
var require_generated_plugins = __commonJS({
|
|
15839
|
+
"dist/opencode-integration/generated-plugins.js"(exports2) {
|
|
15840
|
+
"use strict";
|
|
15841
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
15842
|
+
exports2.OPENCODE_PLUGIN_DIR = void 0;
|
|
15843
|
+
exports2.writeGeneratedPlugin = writeGeneratedPlugin;
|
|
15844
|
+
var promises_1 = require("fs/promises");
|
|
15845
|
+
var os_1 = require("os");
|
|
15846
|
+
var path_12 = require("path");
|
|
15847
|
+
var logger_12 = require_logger();
|
|
15848
|
+
exports2.OPENCODE_PLUGIN_DIR = (0, path_12.join)((0, os_1.homedir)(), ".config", "opencode", "plugin");
|
|
15849
|
+
async function writeGeneratedPlugin(filename, source) {
|
|
15850
|
+
await (0, promises_1.mkdir)(exports2.OPENCODE_PLUGIN_DIR, { recursive: true });
|
|
15851
|
+
await (0, promises_1.writeFile)((0, path_12.join)(exports2.OPENCODE_PLUGIN_DIR, filename), source, "utf-8");
|
|
15852
|
+
logger_12.logger.info("[OpenCode] Wrote generated plugin", { plugin: filename });
|
|
15853
|
+
}
|
|
15854
|
+
}
|
|
15855
|
+
});
|
|
15856
|
+
|
|
15912
15857
|
// dist/opencode-integration/subagent-tool-logger.js
|
|
15913
15858
|
var require_subagent_tool_logger = __commonJS({
|
|
15914
15859
|
"dist/opencode-integration/subagent-tool-logger.js"(exports2) {
|
|
@@ -24289,7 +24234,6 @@ var logger_1 = require_logger();
|
|
|
24289
24234
|
var skills_installer_1 = require_skills_installer();
|
|
24290
24235
|
var rules_writer_1 = require_rules_writer();
|
|
24291
24236
|
var tools_writer_1 = require_tools_writer();
|
|
24292
|
-
var node_modules_guard_1 = require_node_modules_guard();
|
|
24293
24237
|
var tool_policies_1 = require_tool_policies3();
|
|
24294
24238
|
var skills_override_1 = require_skills_override();
|
|
24295
24239
|
var generated_files_guard_1 = require_generated_files_guard();
|
|
@@ -24372,7 +24316,6 @@ async function initOpenCode() {
|
|
|
24372
24316
|
]),
|
|
24373
24317
|
(0, skills_installer_1.applySkillsOverride)((0, codegen_flow_helpers_1.getOutputPath)(), logger_1.logger),
|
|
24374
24318
|
(0, tools_writer_1.writeToolFiles)(pluginArtifacts.tools),
|
|
24375
|
-
(0, node_modules_guard_1.writeGuardPlugin)(),
|
|
24376
24319
|
(0, generated_files_guard_1.writeGeneratedFilesGuardPlugin)(),
|
|
24377
24320
|
(0, subagent_tool_logger_1.writeSubagentToolLoggerPlugin)(),
|
|
24378
24321
|
(0, tool_policies_1.writeToolPoliciesPlugin)(toolPolicies)
|
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.441",
|
|
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": "b04a4f2857569aa9b70fbf2fc57a6b3c7db84e442334799481a9cc6c"
|
|
33
33
|
}
|