@wix/ditto-codegen-public 1.0.395 → 1.0.397
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 +32 -13
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -10737,8 +10737,9 @@ var require_environment = __commonJS({
|
|
|
10737
10737
|
"../codegen-types/dist/types/environment.js"(exports2) {
|
|
10738
10738
|
"use strict";
|
|
10739
10739
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10740
|
-
exports2.CODEGEN_ENVIRONMENT_HEADER = void 0;
|
|
10740
|
+
exports2.CODEGEN_CHARGING_MODE_HEADER = exports2.CODEGEN_ENVIRONMENT_HEADER = void 0;
|
|
10741
10741
|
exports2.CODEGEN_ENVIRONMENT_HEADER = "x-codegen-environment";
|
|
10742
|
+
exports2.CODEGEN_CHARGING_MODE_HEADER = "x-codegen-charging-mode";
|
|
10742
10743
|
}
|
|
10743
10744
|
});
|
|
10744
10745
|
|
|
@@ -11744,7 +11745,8 @@ var require_dist5 = __commonJS({
|
|
|
11744
11745
|
askRules: [],
|
|
11745
11746
|
gitConflictsRules: [],
|
|
11746
11747
|
decisionCheckers: [],
|
|
11747
|
-
plugins: []
|
|
11748
|
+
plugins: [],
|
|
11749
|
+
chargingMode: "app"
|
|
11748
11750
|
};
|
|
11749
11751
|
}
|
|
11750
11752
|
});
|
|
@@ -14077,7 +14079,8 @@ var require_dist8 = __commonJS({
|
|
|
14077
14079
|
askRules: [],
|
|
14078
14080
|
gitConflictsRules: [],
|
|
14079
14081
|
decisionCheckers: [],
|
|
14080
|
-
plugins: [codegen_checkpoint_plugin_1.checkpointPluginFactory]
|
|
14082
|
+
plugins: [codegen_checkpoint_plugin_1.checkpointPluginFactory],
|
|
14083
|
+
chargingMode: "app"
|
|
14081
14084
|
};
|
|
14082
14085
|
}
|
|
14083
14086
|
});
|
|
@@ -14428,7 +14431,8 @@ var require_dist10 = __commonJS({
|
|
|
14428
14431
|
askRules: [],
|
|
14429
14432
|
gitConflictsRules: [],
|
|
14430
14433
|
decisionCheckers: [],
|
|
14431
|
-
plugins: [codegen_feature_vibe_plugin_1.featureVibePluginFactory]
|
|
14434
|
+
plugins: [codegen_feature_vibe_plugin_1.featureVibePluginFactory],
|
|
14435
|
+
chargingMode: "app"
|
|
14432
14436
|
};
|
|
14433
14437
|
}
|
|
14434
14438
|
});
|
|
@@ -14774,11 +14778,16 @@ var require_config = __commonJS({
|
|
|
14774
14778
|
];
|
|
14775
14779
|
function getProviderConfig() {
|
|
14776
14780
|
const environment = process.env.CODEGEN_ENVIRONMENT;
|
|
14781
|
+
const chargingMode = (0, environments_12.getCodegenEnvironmentConfig)().chargingMode ?? "app";
|
|
14777
14782
|
const headers = {
|
|
14778
14783
|
// Tell the proxy which environment this request belongs to so it can
|
|
14779
14784
|
// select the matching upstream API key. Forwarded verbatim — the proxy
|
|
14780
14785
|
// owns validation and the default.
|
|
14781
14786
|
...environment ? { [ditto_codegen_types_12.CODEGEN_ENVIRONMENT_HEADER]: environment } : {},
|
|
14787
|
+
// How the request is billed; the proxy resolves auth accordingly.
|
|
14788
|
+
[ditto_codegen_types_12.CODEGEN_CHARGING_MODE_HEADER]: chargingMode,
|
|
14789
|
+
// The user's Wix token — needed to resolve the account (credits mode) and
|
|
14790
|
+
// authorize the project.
|
|
14782
14791
|
...currentAccessToken ? { Authorization: `Bearer ${currentAccessToken}` } : {}
|
|
14783
14792
|
};
|
|
14784
14793
|
return {
|
|
@@ -21072,12 +21081,12 @@ var require_biEvents = __commonJS({
|
|
|
21072
21081
|
}
|
|
21073
21082
|
const codegenAgentParams = {
|
|
21074
21083
|
job_id: report.jobId,
|
|
21075
|
-
job_input: report.jobInput,
|
|
21076
21084
|
extra_data: report.extraData,
|
|
21077
21085
|
Job_cost: report.jobCost,
|
|
21078
21086
|
dev_machine_session_id: report.devMachineSessionId,
|
|
21079
21087
|
run_kind: report.runKind,
|
|
21080
|
-
environment: report.environment
|
|
21088
|
+
environment: report.environment,
|
|
21089
|
+
msid: report.msid
|
|
21081
21090
|
};
|
|
21082
21091
|
logger_12.logger.info("Reporting BI event 299 (generic session start)", codegenAgentParams);
|
|
21083
21092
|
try {
|
|
@@ -21124,7 +21133,8 @@ var require_biEvents = __commonJS({
|
|
|
21124
21133
|
job_status: report.taskStatus ? JOB_STATUS_MAP[report.taskStatus] ?? report.taskStatus : void 0,
|
|
21125
21134
|
job_skills_used: report.skillsUsed ? skillsArrayToMap(report.skillsUsed) : void 0,
|
|
21126
21135
|
job_extensions_created: report.extensionsCreated ? JSON.stringify(report.extensionsCreated) : void 0,
|
|
21127
|
-
job_duration: report.jobDuration
|
|
21136
|
+
job_duration: report.jobDuration,
|
|
21137
|
+
msid: report.msid
|
|
21128
21138
|
};
|
|
21129
21139
|
logger_12.logger.info("Reporting BI event 304 (generic session end)", codegenAgentParams);
|
|
21130
21140
|
try {
|
|
@@ -21172,7 +21182,8 @@ var require_biEvents = __commonJS({
|
|
|
21172
21182
|
error_json: report.errorJson,
|
|
21173
21183
|
is_retryble: report.isRetryable !== void 0 ? String(report.isRetryable) : void 0,
|
|
21174
21184
|
is_expected: report.isExpected,
|
|
21175
|
-
extra_data: report.extraData
|
|
21185
|
+
extra_data: report.extraData,
|
|
21186
|
+
msid: report.msid
|
|
21176
21187
|
};
|
|
21177
21188
|
logger_12.logger.info("Reporting BI event 305 (generic session error)", codegenAgentParams);
|
|
21178
21189
|
try {
|
|
@@ -21246,9 +21257,9 @@ var require_opencode_init = __commonJS({
|
|
|
21246
21257
|
jobId,
|
|
21247
21258
|
taskId,
|
|
21248
21259
|
appId: context_12.ctx.projectId,
|
|
21260
|
+
msid: context_12.ctx.metasiteId,
|
|
21249
21261
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
21250
21262
|
runKind: kind,
|
|
21251
|
-
jobInput: JSON.stringify(history),
|
|
21252
21263
|
environment
|
|
21253
21264
|
};
|
|
21254
21265
|
logger_12.logger.info("[OpenCode Init] Starting task", { taskId });
|
|
@@ -21446,9 +21457,9 @@ var require_opencode_iterate = __commonJS({
|
|
|
21446
21457
|
jobId,
|
|
21447
21458
|
taskId,
|
|
21448
21459
|
appId: context_12.ctx.projectId,
|
|
21460
|
+
msid: context_12.ctx.metasiteId,
|
|
21449
21461
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
21450
21462
|
runKind: kind,
|
|
21451
|
-
jobInput: JSON.stringify(chatHistory),
|
|
21452
21463
|
environment
|
|
21453
21464
|
};
|
|
21454
21465
|
logger_12.logger.info("[OpenCode Iterate] Starting task", { taskId });
|
|
@@ -21633,9 +21644,9 @@ var require_opencode_ask = __commonJS({
|
|
|
21633
21644
|
jobId,
|
|
21634
21645
|
taskId,
|
|
21635
21646
|
appId: context_12.ctx.projectId,
|
|
21647
|
+
msid: context_12.ctx.metasiteId,
|
|
21636
21648
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
21637
21649
|
runKind: kind,
|
|
21638
|
-
jobInput: JSON.stringify(chatHistory),
|
|
21639
21650
|
environment
|
|
21640
21651
|
};
|
|
21641
21652
|
logger_12.logger.info("[OpenCode Ask] Starting task", { taskId });
|
|
@@ -21810,9 +21821,9 @@ var require_opencode_fix_git_conflicts = __commonJS({
|
|
|
21810
21821
|
jobId,
|
|
21811
21822
|
taskId,
|
|
21812
21823
|
appId: context_12.ctx.projectId,
|
|
21824
|
+
msid: context_12.ctx.metasiteId,
|
|
21813
21825
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
21814
21826
|
runKind: kind,
|
|
21815
|
-
jobInput: JSON.stringify(chatHistory),
|
|
21816
21827
|
environment
|
|
21817
21828
|
};
|
|
21818
21829
|
logger_12.logger.info("[OpenCode Git Conflicts] Starting task", { taskId });
|
|
@@ -21966,6 +21977,7 @@ var require_job_cancellation_monitor = __commonJS({
|
|
|
21966
21977
|
jobId,
|
|
21967
21978
|
taskId: store.taskId,
|
|
21968
21979
|
appId: this.projectId,
|
|
21980
|
+
msid: store.metasiteId,
|
|
21969
21981
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
21970
21982
|
runKind: store.kind,
|
|
21971
21983
|
taskStatus: "CANCELLED",
|
|
@@ -22054,6 +22066,7 @@ var require_job_timeout_monitor = __commonJS({
|
|
|
22054
22066
|
jobId,
|
|
22055
22067
|
taskId: store.taskId,
|
|
22056
22068
|
appId: context_12.ctx.projectId,
|
|
22069
|
+
msid: context_12.ctx.metasiteId,
|
|
22057
22070
|
devMachineSessionId: process.env.CODEGEN_SESSION_ID,
|
|
22058
22071
|
runKind: store.kind,
|
|
22059
22072
|
environment
|
|
@@ -22429,7 +22442,13 @@ async function processJob(job) {
|
|
|
22429
22442
|
}
|
|
22430
22443
|
const payload = task.input ?? task.payload ?? {};
|
|
22431
22444
|
const plugins = buildPluginsForTask(jobId, task.id, task.kind, payload);
|
|
22432
|
-
await job_context_storage_1.jobContextStorage.run({
|
|
22445
|
+
await job_context_storage_1.jobContextStorage.run({
|
|
22446
|
+
jobId,
|
|
22447
|
+
taskId: task.id,
|
|
22448
|
+
kind: task.kind,
|
|
22449
|
+
plugins,
|
|
22450
|
+
metasiteId: context_1.ctx.metasiteId
|
|
22451
|
+
}, async () => {
|
|
22433
22452
|
logger_1.logger.info("[Job] Start processing", { taskKind: task.kind });
|
|
22434
22453
|
context_1.ctx.setJobStatus(jobId, CodeGenService_1.Status.RUNNING);
|
|
22435
22454
|
logger_1.logger.info("[Job] Marked job RUNNING", { initTaskId: task.id });
|
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.397",
|
|
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": "3684f6224ad8e1cf1c5eb60a17727f8448f1f7cc0d79dcefc42157f6"
|
|
33
33
|
}
|