@wix/ditto-codegen-public 1.0.476 → 1.0.478

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.
Files changed (2) hide show
  1. package/dist/out.js +10 -36
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -12830,7 +12830,6 @@ var require_checkpoint = __commonJS({
12830
12830
  var types_1 = require_types_impl3();
12831
12831
  var http_client_1 = require_index_node();
12832
12832
  var FALLBACK_COMMIT_MESSAGE = "Auto-save";
12833
- var EML_MARKER = "generate-eml.ts";
12834
12833
  var SET_COMMIT_MESSAGE_TOOL = "set-commit-message";
12835
12834
  var MAX_CHECKPOINT_ERROR_LENGTH = 1e3;
12836
12835
  var TRUNCATION_SUFFIX = "\u2026";
@@ -12945,12 +12944,6 @@ var require_checkpoint = __commonJS({
12945
12944
  const trimmed = value.trim();
12946
12945
  return trimmed.length > 0 ? trimmed : void 0;
12947
12946
  };
12948
- var readBashCommand = (input) => {
12949
- if (typeof input !== "object" || input === null)
12950
- return void 0;
12951
- const value = input.command;
12952
- return typeof value === "string" ? value : void 0;
12953
- };
12954
12947
  var checkpointPluginFactory = (ctx) => {
12955
12948
  const { host, job } = ctx;
12956
12949
  const accessToken = host.auth.getAccessToken();
@@ -13055,40 +13048,21 @@ var require_checkpoint = __commonJS({
13055
13048
  rules: buildCheckpointRules(),
13056
13049
  tools: buildCheckpointTools(),
13057
13050
  // The agent calls `set-commit-message` (registered as a host tool from
13058
- // the plugin's `tools` field) as the first thing it does. We capture
13059
- // the value here. Then later, when the EML script runs (mid-flow), we
13060
- // use the captured value for the early checkpoint.
13051
+ // the plugin's `tools` field) as the first thing it does. We capture the
13052
+ // value here and use it for the checkpoint at flow end.
13061
13053
  async onToolUse({ tool, state }) {
13062
13054
  if (state.status === "error")
13063
13055
  return;
13064
- if (tool === SET_COMMIT_MESSAGE_TOOL) {
13065
- const message = readToolCommitMessage(state.input);
13066
- if (message)
13067
- capturedCommitMessage = message;
13068
- return;
13069
- }
13070
- if (outcome)
13071
- return;
13072
- if (tool !== "bash")
13073
- return;
13074
- const command = readBashCommand(state.input);
13075
- if (!command || !command.includes(EML_MARKER))
13056
+ if (tool !== SET_COMMIT_MESSAGE_TOOL)
13076
13057
  return;
13077
- const commitMessage = capturedCommitMessage ?? FALLBACK_COMMIT_MESSAGE;
13078
- try {
13079
- await commitCheckpoint(commitMessage);
13080
- } catch {
13081
- }
13058
+ const message = readToolCommitMessage(state.input);
13059
+ if (message)
13060
+ capturedCommitMessage = message;
13082
13061
  },
13083
- // Flow-end fallback: only fires if onToolUse didn't already create the
13084
- // checkpoint. Re-throws an earlier failure so the task is marked failed.
13062
+ // Creates the checkpoint once the flow is over. Throws on failure, which
13063
+ // the runner reports as a plugin failure. A conflict handed off to AI
13064
+ // resolution is not a failure.
13085
13065
  async onFlowEnd({ codegenFailed, filesChanged }) {
13086
- if (outcome?.status === "failed")
13087
- throw outcome.error;
13088
- if (outcome?.status === "created")
13089
- return;
13090
- if (outcome?.status === "resolvingGitConflicts")
13091
- return;
13092
13066
  if (codegenFailed)
13093
13067
  return;
13094
13068
  if (!filesChanged)
@@ -15147,7 +15121,7 @@ var require_git_conflicts_rules = __commonJS({
15147
15121
  exports2.GIT_CONFLICTS_RULES = `CORE PRINCIPLES:
15148
15122
  - You are a Git merge conflict resolver. Your ONLY job is to fix merge conflict markers in files.
15149
15123
  - Do NOT generate new features, refactor code, or make changes beyond resolving conflicts.
15150
- - NEVER use mocks, placeholders, or TODOs.
15124
+ - Do NOT introduce new mocks, placeholders, debug logging, or TODOs while resolving conflicts. Keep any that either side already contains \u2014 they may be there because the user asked for them.
15151
15125
 
15152
15126
  UNDERSTAND INTENT FIRST:
15153
15127
  - Before resolving a conflict, understand WHAT each side was trying to accomplish and WHY \u2014 not just which lines differ. Read enough of the surrounding file (and the imports/usages the conflict touches) to know the intent of both sides.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.476",
3
+ "version": "1.0.478",
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": "b00e5087ab99a56911dcace77fb99fa76a2acc00bdae9f7d3d1ccd63"
32
+ "falconPackageHash": "08e7a6012a59f25529773b267a6c5d6d7e88cf5f6455ee0b9c89426e"
33
33
  }