@jpkme/diff-review 0.1.15 → 0.1.16
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/lib/acp-policy.mjs +10 -2
- package/lib/acp-policy.test.mjs +27 -0
- package/lib/output-name.mjs +7 -0
- package/lib/prompt.mjs +3 -2
- package/lib/prompt.test.mjs +37 -0
- package/lib/review-dir.mjs +14 -1
- package/lib/review.mjs +36 -4
- package/lib/review.test.mjs +35 -0
- package/lib/validate.mjs +10 -0
- package/lib/validate.test.mjs +47 -0
- package/package.json +1 -1
- package/schema.json +16 -1
- package/web/build/client/_app/immutable/assets/3.DB-bJJq2.css +1 -0
- package/web/build/client/_app/immutable/assets/3.DB-bJJq2.css.br +0 -0
- package/web/build/client/_app/immutable/assets/3.DB-bJJq2.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/{storage.TlsiS-AP.css → storage.BxR6930R.css} +1 -1
- package/web/build/client/_app/immutable/assets/storage.BxR6930R.css.br +0 -0
- package/web/build/client/_app/immutable/assets/{storage.TlsiS-AP.css.gz → storage.BxR6930R.css.gz} +0 -0
- package/web/build/client/_app/immutable/chunks/BLMWhW3J.js +1 -0
- package/web/build/client/_app/immutable/chunks/BLMWhW3J.js.br +1 -0
- package/web/build/client/_app/immutable/chunks/BLMWhW3J.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{D8WOD_eS.js → CXhIC34H.js} +1 -1
- package/web/build/client/_app/immutable/chunks/CXhIC34H.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/CXhIC34H.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/DHO7NTh1.js +2 -0
- package/web/build/client/_app/immutable/chunks/DHO7NTh1.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/DHO7NTh1.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/DpxY75GB.js +215 -0
- package/web/build/client/_app/immutable/chunks/DpxY75GB.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/DpxY75GB.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{BpVtXA-T.js → cYiFfRa3.js} +1 -1
- package/web/build/client/_app/immutable/chunks/cYiFfRa3.js.br +1 -0
- package/web/build/client/_app/immutable/chunks/cYiFfRa3.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/{app.BjJsHui4.js → app.CCv57mvp.js} +2 -2
- package/web/build/client/_app/immutable/entry/app.CCv57mvp.js.br +0 -0
- package/web/build/client/_app/immutable/entry/app.CCv57mvp.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/start.B012TSbW.js +1 -0
- package/web/build/client/_app/immutable/entry/start.B012TSbW.js.br +1 -0
- package/web/build/client/_app/immutable/entry/start.B012TSbW.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/0.slrnBioC.js +1 -0
- package/web/build/client/_app/immutable/nodes/0.slrnBioC.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/0.slrnBioC.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/1.Bs5JdO4l.js +1 -0
- package/web/build/client/_app/immutable/nodes/1.Bs5JdO4l.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/1.Bs5JdO4l.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/2.D5ULH3EX.js +10 -0
- package/web/build/client/_app/immutable/nodes/2.D5ULH3EX.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/2.D5ULH3EX.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/3.hjzQQgyj.js +173 -0
- package/web/build/client/_app/immutable/nodes/3.hjzQQgyj.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/3.hjzQQgyj.js.gz +0 -0
- package/web/build/client/_app/version.json +1 -1
- package/web/build/client/_app/version.json.br +0 -0
- package/web/build/client/_app/version.json.gz +0 -0
- package/web/build/handler.js +3 -3
- package/web/build/index.js +3 -3
- package/web/build/server/chunks/{0-DUStDOsr.js → 0-D7NSxn1-.js} +2 -2
- package/web/build/server/chunks/{0-DUStDOsr.js.map → 0-D7NSxn1-.js.map} +1 -1
- package/web/build/server/chunks/1-DboYz8Fw.js +7 -0
- package/web/build/server/chunks/{1-DUj63QTT.js.map → 1-DboYz8Fw.js.map} +1 -1
- package/web/build/server/chunks/2-B7LX817Q.js +7 -0
- package/web/build/server/chunks/2-B7LX817Q.js.map +1 -0
- package/web/build/server/chunks/3-DgJ_LmTL.js +7 -0
- package/web/build/server/chunks/{3-C7UD6rei.js.map → 3-DgJ_LmTL.js.map} +1 -1
- package/web/build/server/chunks/{_server.ts-4RcoUd0l.js → _server.ts-CP5cRLhW.js} +4 -4
- package/web/build/server/chunks/{_server.ts-4RcoUd0l.js.map → _server.ts-CP5cRLhW.js.map} +1 -1
- package/web/build/server/chunks/{agent-sessions-C_hlZJKN.js → agent-sessions-2XGojSJ_.js} +84 -15
- package/web/build/server/chunks/agent-sessions-2XGojSJ_.js.map +1 -0
- package/web/build/server/chunks/{git-review-Bh1w0gak.js → git-review-jZ_JJYfv.js} +36 -8
- package/web/build/server/chunks/git-review-jZ_JJYfv.js.map +1 -0
- package/web/build/server/chunks/{handler-e2lEvjVT.js → handler-B_8yUXji.js} +3 -3
- package/web/build/server/chunks/{handler-e2lEvjVT.js.map → handler-B_8yUXji.js.map} +1 -1
- package/web/build/server/chunks/{hooks.server-Um1Sknmz.js → hooks.server-rF_eBCff.js} +3 -3
- package/web/build/server/chunks/{hooks.server-Um1Sknmz.js.map → hooks.server-rF_eBCff.js.map} +1 -1
- package/web/build/server/chunks/{index.js-C3-YX8SA.js → index.js-CGw8_Q7V.js} +884 -881
- package/web/build/server/chunks/index.js-CGw8_Q7V.js.map +1 -0
- package/web/build/server/chunks/{manifest.js-CmbRPv0j.js → manifest.js-CImZFS6G.js} +9 -9
- package/web/build/server/chunks/{manifest.js-CmbRPv0j.js.map → manifest.js-CImZFS6G.js.map} +1 -1
- package/web/build/server/chunks/{remote-1g4ayag-DMiPy1mT.js → remote-1g4ayag-BMpjk8UD.js} +4 -4
- package/web/build/server/chunks/{remote-1g4ayag-DMiPy1mT.js.map → remote-1g4ayag-BMpjk8UD.js.map} +1 -1
- package/web/build/server/chunks/{remote-wh6t6j-RlIVOUe-.js → remote-wh6t6j-dYLCg8ks.js} +19 -7
- package/web/build/server/chunks/remote-wh6t6j-dYLCg8ks.js.map +1 -0
- package/web/build/server/chunks/{validate-CAQ31C7k.js → validate-Da6e71V3.js} +34 -5
- package/web/build/server/chunks/validate-Da6e71V3.js.map +1 -0
- package/web/build/client/_app/immutable/assets/3.Cw1J6YTM.css +0 -1
- package/web/build/client/_app/immutable/assets/3.Cw1J6YTM.css.br +0 -0
- package/web/build/client/_app/immutable/assets/3.Cw1J6YTM.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/storage.TlsiS-AP.css.br +0 -0
- package/web/build/client/_app/immutable/chunks/BpVtXA-T.js.br +0 -2
- package/web/build/client/_app/immutable/chunks/BpVtXA-T.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/CUhrLa7d.js +0 -210
- package/web/build/client/_app/immutable/chunks/CUhrLa7d.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/CUhrLa7d.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/D8WOD_eS.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/D8WOD_eS.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/QvO6K-HK.js +0 -2
- package/web/build/client/_app/immutable/chunks/QvO6K-HK.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/QvO6K-HK.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/lUYXRDtZ.js +0 -1
- package/web/build/client/_app/immutable/chunks/lUYXRDtZ.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/lUYXRDtZ.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/app.BjJsHui4.js.br +0 -0
- package/web/build/client/_app/immutable/entry/app.BjJsHui4.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/start.D4unRHC4.js +0 -1
- package/web/build/client/_app/immutable/entry/start.D4unRHC4.js.br +0 -0
- package/web/build/client/_app/immutable/entry/start.D4unRHC4.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/0.Dj97JW46.js +0 -1
- package/web/build/client/_app/immutable/nodes/0.Dj97JW46.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/0.Dj97JW46.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/1.C8JJYlWG.js +0 -1
- package/web/build/client/_app/immutable/nodes/1.C8JJYlWG.js.br +0 -1
- package/web/build/client/_app/immutable/nodes/1.C8JJYlWG.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/2.CDI0Ipi4.js +0 -10
- package/web/build/client/_app/immutable/nodes/2.CDI0Ipi4.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/2.CDI0Ipi4.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/3.DVC22CDg.js +0 -171
- package/web/build/client/_app/immutable/nodes/3.DVC22CDg.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/3.DVC22CDg.js.gz +0 -0
- package/web/build/server/chunks/1-DUj63QTT.js +0 -7
- package/web/build/server/chunks/2-B4PSKe5P.js +0 -7
- package/web/build/server/chunks/2-B4PSKe5P.js.map +0 -1
- package/web/build/server/chunks/3-C7UD6rei.js +0 -7
- package/web/build/server/chunks/agent-sessions-C_hlZJKN.js.map +0 -1
- package/web/build/server/chunks/git-review-Bh1w0gak.js.map +0 -1
- package/web/build/server/chunks/index.js-C3-YX8SA.js.map +0 -1
- package/web/build/server/chunks/remote-wh6t6j-RlIVOUe-.js.map +0 -1
- package/web/build/server/chunks/validate-CAQ31C7k.js.map +0 -1
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1792507014372"}
|
|
Binary file
|
|
Binary file
|
package/web/build/handler.js
CHANGED
|
@@ -2,9 +2,9 @@ import './shims.js';
|
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:process';
|
|
5
|
-
export { h as handler } from './server/chunks/handler-
|
|
6
|
-
import './server/chunks/index.js-
|
|
7
|
-
import './server/chunks/manifest.js-
|
|
5
|
+
export { h as handler } from './server/chunks/handler-B_8yUXji.js';
|
|
6
|
+
import './server/chunks/index.js-CGw8_Q7V.js';
|
|
7
|
+
import './server/chunks/manifest.js-CImZFS6G.js';
|
|
8
8
|
import './env.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'node:crypto';
|
package/web/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import fs__default from 'node:fs';
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-
|
|
4
|
+
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-B_8yUXji.js';
|
|
5
5
|
import { env, timeout_env } from './env.js';
|
|
6
6
|
import { rm } from 'node:fs/promises';
|
|
7
7
|
import './shims.js';
|
|
@@ -11,8 +11,8 @@ import 'node:path';
|
|
|
11
11
|
import 'node:timers';
|
|
12
12
|
import 'node:querystring';
|
|
13
13
|
import 'node:stream';
|
|
14
|
-
import './server/chunks/index.js-
|
|
15
|
-
import './server/chunks/manifest.js-
|
|
14
|
+
import './server/chunks/index.js-CGw8_Q7V.js';
|
|
15
|
+
import './server/chunks/manifest.js-CImZFS6G.js';
|
|
16
16
|
import 'node:url';
|
|
17
17
|
|
|
18
18
|
const path = env('SOCKET_PATH', false);
|
|
@@ -3,9 +3,9 @@ const universal = {
|
|
|
3
3
|
"ssr": false
|
|
4
4
|
};
|
|
5
5
|
const universal_id = "src/routes/+layout.ts";
|
|
6
|
-
const imports = ["_app/immutable/nodes/0.
|
|
6
|
+
const imports = ["_app/immutable/nodes/0.slrnBioC.js","_app/immutable/chunks/CXhIC34H.js","_app/immutable/chunks/BLMWhW3J.js","_app/immutable/chunks/BZfQ9INH.js"];
|
|
7
7
|
const stylesheets = ["_app/immutable/assets/0.BKRG1f36.css"];
|
|
8
8
|
const fonts = [];
|
|
9
9
|
|
|
10
10
|
export { fonts, imports, index, stylesheets, universal, universal_id };
|
|
11
|
-
//# sourceMappingURL=0-
|
|
11
|
+
//# sourceMappingURL=0-D7NSxn1-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0-
|
|
1
|
+
{"version":3,"file":"0-D7NSxn1-.js","sources":["../../../.svelte-kit/output/server/nodes/0.js"],"sourcesContent":["\n\nexport const index = 0;\nexport const universal = {\n \"ssr\": false\n};\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.slrnBioC.js\",\"_app/immutable/chunks/CXhIC34H.js\",\"_app/immutable/chunks/BLMWhW3J.js\",\"_app/immutable/chunks/BZfQ9INH.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.BKRG1f36.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,SAAS,GAAG;AACzB,EAAE,KAAK,EAAE;AACT;AACY,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const index = 1;
|
|
2
|
+
const imports = ["_app/immutable/nodes/1.Bs5JdO4l.js","_app/immutable/chunks/CXhIC34H.js","_app/immutable/chunks/BLMWhW3J.js","_app/immutable/chunks/cYiFfRa3.js","_app/immutable/chunks/DHO7NTh1.js"];
|
|
3
|
+
const stylesheets = [];
|
|
4
|
+
const fonts = [];
|
|
5
|
+
|
|
6
|
+
export { fonts, imports, index, stylesheets };
|
|
7
|
+
//# sourceMappingURL=1-DboYz8Fw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-
|
|
1
|
+
{"version":3,"file":"1-DboYz8Fw.js","sources":["../../../.svelte-kit/output/server/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nexport const imports = [\"_app/immutable/nodes/1.Bs5JdO4l.js\",\"_app/immutable/chunks/CXhIC34H.js\",\"_app/immutable/chunks/BLMWhW3J.js\",\"_app/immutable/chunks/cYiFfRa3.js\",\"_app/immutable/chunks/DHO7NTh1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const index = 2;
|
|
2
|
+
const imports = ["_app/immutable/nodes/2.D5ULH3EX.js","_app/immutable/chunks/CXhIC34H.js","_app/immutable/chunks/DHO7NTh1.js","_app/immutable/chunks/DpxY75GB.js","_app/immutable/chunks/BLMWhW3J.js","_app/immutable/chunks/BZfQ9INH.js","_app/immutable/chunks/cYiFfRa3.js"];
|
|
3
|
+
const stylesheets = ["_app/immutable/assets/storage.BxR6930R.css","_app/immutable/assets/2.C4whE4xz.css"];
|
|
4
|
+
const fonts = [];
|
|
5
|
+
|
|
6
|
+
export { fonts, imports, index, stylesheets };
|
|
7
|
+
//# sourceMappingURL=2-B7LX817Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2-B7LX817Q.js","sources":["../../../.svelte-kit/output/server/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nexport const imports = [\"_app/immutable/nodes/2.D5ULH3EX.js\",\"_app/immutable/chunks/CXhIC34H.js\",\"_app/immutable/chunks/DHO7NTh1.js\",\"_app/immutable/chunks/DpxY75GB.js\",\"_app/immutable/chunks/BLMWhW3J.js\",\"_app/immutable/chunks/BZfQ9INH.js\",\"_app/immutable/chunks/cYiFfRa3.js\"];\nexport const stylesheets = [\"_app/immutable/assets/storage.BxR6930R.css\",\"_app/immutable/assets/2.C4whE4xz.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG,CAAC,4CAA4C,CAAC,sCAAsC;AACnG,MAAC,KAAK,GAAG;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const index = 3;
|
|
2
|
+
const imports = ["_app/immutable/nodes/3.hjzQQgyj.js","_app/immutable/chunks/CXhIC34H.js","_app/immutable/chunks/DHO7NTh1.js","_app/immutable/chunks/DpxY75GB.js","_app/immutable/chunks/BLMWhW3J.js","_app/immutable/chunks/BZfQ9INH.js"];
|
|
3
|
+
const stylesheets = ["_app/immutable/assets/storage.BxR6930R.css","_app/immutable/assets/3.DB-bJJq2.css"];
|
|
4
|
+
const fonts = [];
|
|
5
|
+
|
|
6
|
+
export { fonts, imports, index, stylesheets };
|
|
7
|
+
//# sourceMappingURL=3-DgJ_LmTL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3-
|
|
1
|
+
{"version":3,"file":"3-DgJ_LmTL.js","sources":["../../../.svelte-kit/output/server/nodes/3.js"],"sourcesContent":["\n\nexport const index = 3;\nexport const imports = [\"_app/immutable/nodes/3.hjzQQgyj.js\",\"_app/immutable/chunks/CXhIC34H.js\",\"_app/immutable/chunks/DHO7NTh1.js\",\"_app/immutable/chunks/DpxY75GB.js\",\"_app/immutable/chunks/BLMWhW3J.js\",\"_app/immutable/chunks/BZfQ9INH.js\"];\nexport const stylesheets = [\"_app/immutable/assets/storage.BxR6930R.css\",\"_app/immutable/assets/3.DB-bJJq2.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG,CAAC,4CAA4C,CAAC,sCAAsC;AACnG,MAAC,KAAK,GAAG;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as sessionInfo,
|
|
2
|
-
import { e as error } from './index.js-
|
|
3
|
-
import './validate-
|
|
1
|
+
import { s as sessionInfo, j as subscribe } from './agent-sessions-2XGojSJ_.js';
|
|
2
|
+
import { e as error } from './index.js-CGw8_Q7V.js';
|
|
3
|
+
import './validate-Da6e71V3.js';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:child_process';
|
|
6
6
|
import 'node:path';
|
|
@@ -59,4 +59,4 @@ var GET = ({ params, request }) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
export { GET };
|
|
62
|
-
//# sourceMappingURL=_server.ts-
|
|
62
|
+
//# sourceMappingURL=_server.ts-CP5cRLhW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-
|
|
1
|
+
{"version":3,"file":"_server.ts-CP5cRLhW.js","sources":["../../../.svelte-kit/output/server/entries/endpoints/api/agent/_id_/events/_server.ts.js"],"sourcesContent":["import { m as subscribe, u as sessionInfo } from \"../../../../../../chunks/agent-sessions.js\";\nimport { error } from \"@sveltejs/kit\";\n//#region src/routes/api/agent/[id]/events/+server.ts\n/** Eventos de una sesión con el agente (SSE). Al conectar manda `reset` y todo lo acumulado; después, lo nuevo. */\nvar GET = ({ params, request }) => {\n\tif (!sessionInfo(params.id)) error(404, \"La sesión del agente ya no existe.\");\n\tlet unsubscribe = null;\n\tlet ping = null;\n\tconst encoder = new TextEncoder();\n\tconst cleanup = () => {\n\t\tunsubscribe?.();\n\t\tunsubscribe = null;\n\t\tif (ping) clearInterval(ping);\n\t\tping = null;\n\t};\n\tconst stream = new ReadableStream({\n\t\tstart(controller) {\n\t\t\tconst send = (data) => {\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.enqueue(encoder.encode(`data: ${JSON.stringify(data)}\\n\\n`));\n\t\t\t\t} catch {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t};\n\t\t\tunsubscribe = subscribe(params.id, send);\n\t\t\tif (!unsubscribe) {\n\t\t\t\tcontroller.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tping = setInterval(() => {\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.enqueue(encoder.encode(\": ping\\n\\n\"));\n\t\t\t\t} catch {\n\t\t\t\t\tcleanup();\n\t\t\t\t}\n\t\t\t}, 2e4);\n\t\t\trequest.signal.addEventListener(\"abort\", () => {\n\t\t\t\tcleanup();\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} catch {}\n\t\t\t});\n\t\t},\n\t\tcancel: cleanup\n\t});\n\treturn new Response(stream, { headers: {\n\t\t\"content-type\": \"text/event-stream\",\n\t\t\"cache-control\": \"no-cache\",\n\t\tconnection: \"keep-alive\"\n\t} });\n};\n//#endregion\nexport { GET };\n"],"names":[],"mappings":";;;;;;;;;;AAEA;AACA;AACG,IAAC,GAAG,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK;AACnC,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC9E,CAAC,IAAI,WAAW,GAAG,IAAI;AACvB,CAAC,IAAI,IAAI,GAAG,IAAI;AAChB,CAAC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE;AAClC,CAAC,MAAM,OAAO,GAAG,MAAM;AACvB,EAAE,WAAW,IAAI;AACjB,EAAE,WAAW,GAAG,IAAI;AACpB,EAAE,IAAI,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;AAC/B,EAAE,IAAI,GAAG,IAAI;AACb,CAAC,CAAC;AACF,CAAC,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC;AACnC,EAAE,KAAK,CAAC,UAAU,EAAE;AACpB,GAAG,MAAM,IAAI,GAAG,CAAC,IAAI,KAAK;AAC1B,IAAI,IAAI;AACR,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5E,IAAI,CAAC,CAAC,MAAM;AACZ,KAAK,OAAO,EAAE;AACd,IAAI;AACJ,GAAG,CAAC;AACJ,GAAG,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC;AAC3C,GAAG,IAAI,CAAC,WAAW,EAAE;AACrB,IAAI,UAAU,CAAC,KAAK,EAAE;AACtB,IAAI;AACJ,GAAG;AACH,GAAG,IAAI,GAAG,WAAW,CAAC,MAAM;AAC5B,IAAI,IAAI;AACR,KAAK,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACrD,IAAI,CAAC,CAAC,MAAM;AACZ,KAAK,OAAO,EAAE;AACd,IAAI;AACJ,GAAG,CAAC,EAAE,GAAG,CAAC;AACV,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM;AAClD,IAAI,OAAO,EAAE;AACb,IAAI,IAAI;AACR,KAAK,UAAU,CAAC,KAAK,EAAE;AACvB,IAAI,CAAC,CAAC,MAAM,CAAC;AACb,GAAG,CAAC,CAAC;AACL,EAAE,CAAC;AACH,EAAE,MAAM,EAAE;AACV,EAAE,CAAC;AACH,CAAC,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE;AACxC,EAAE,cAAc,EAAE,mBAAmB;AACrC,EAAE,eAAe,EAAE,UAAU;AAC7B,EAAE,UAAU,EAAE;AACd,EAAE,EAAE,CAAC;AACL;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as getRemoteUrl, e as ensureReviewDir, w as writeDiffCache, q as readDiffCache, u as extractBranchDiff, v as loadReviewConfig, x as outputRelPath, m as makeOutputFilename, O as OUTPUT_DIR, y as writeSessionRef, c as companionPaths, d as decodePayload, t as tryResolveGitRoot, f as loadBranchDiff, z as validateAgainst, A as reviewIssues, R as REVIEW_SCHEMA, C as globMatch, D as writeDiffText, E as writeHandoffChat } from './validate-Da6e71V3.js';
|
|
2
2
|
import { existsSync, readFileSync, statSync, accessSync, constants, readdirSync, mkdirSync, writeFileSync, copyFileSync, rmSync, realpathSync } from 'node:fs';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
import { homedir, tmpdir } from 'node:os';
|
|
@@ -856,8 +856,9 @@ function checkShell(command, { repo, platform = process.platform } = {}) {
|
|
|
856
856
|
* habilitó en su agente.
|
|
857
857
|
*/
|
|
858
858
|
/**
|
|
859
|
-
* @typedef {"review" | "ask" | "edit"} PolicyMode
|
|
860
|
-
* review = generar el JSON; ask = preguntas (no puede escribir nada); edit = modificar el JSON
|
|
859
|
+
* @typedef {"review" | "ask" | "edit" | "fix"} PolicyMode
|
|
860
|
+
* review = generar el JSON; ask = preguntas (no puede escribir nada); edit = modificar el JSON;
|
|
861
|
+
* fix = editar código dentro del repo (no solo el JSON).
|
|
861
862
|
* @typedef {{ repo: string, outputFilename: string, mode: PolicyMode }} PolicyContext
|
|
862
863
|
* @typedef {{
|
|
863
864
|
* kind?: string | null,
|
|
@@ -1021,6 +1022,16 @@ function decidePermission(toolCall, { repo, outputFilename, mode }) {
|
|
|
1021
1022
|
allow: false,
|
|
1022
1023
|
reason: `${kind === "delete" ? "borrado" : "edición"} sin path`
|
|
1023
1024
|
};
|
|
1025
|
+
if (mode === "fix") {
|
|
1026
|
+
const outside = paths.find((p) => !isInside(p, repo));
|
|
1027
|
+
return outside ? {
|
|
1028
|
+
allow: false,
|
|
1029
|
+
reason: `path fuera del repo: ${outside}`
|
|
1030
|
+
} : {
|
|
1031
|
+
allow: true,
|
|
1032
|
+
reason: "escritura en el repo"
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1024
1035
|
const target = resolve(repo, outputRelPath(outputFilename));
|
|
1025
1036
|
const outside = paths.find((p) => !samePath(canonicalPath(p), canonicalPath(target)));
|
|
1026
1037
|
return outside ? {
|
|
@@ -1785,7 +1796,8 @@ var RULES = `- Ids: themes use \`t1\`, \`t2\`, …; findings use \`f1\`, \`f2\`,
|
|
|
1785
1796
|
- "blocking": true ONLY if the branch should not merge as-is. Use only with class "risk".
|
|
1786
1797
|
- When several read-only lookups are independent (files, searches), batch them in the same turn if your tools allow parallel calls.
|
|
1787
1798
|
- Write human-readable strings (intent, title, what, why, fix, notes) in Spanish. Keep enums/ids/paths/JSON keys exactly as in the schema.
|
|
1788
|
-
- Length is a soft target, not a check: aim for title ≤72 characters and what/why/fix ≤120 characters. Prefer clarity over shortening. Longer text is still valid. Do not rewrite the file only to shorten it
|
|
1799
|
+
- Length is a soft target, not a check: aim for title ≤72 characters and what/why/fix ≤120 characters. Prefer clarity over shortening. Longer text is still valid. Do not rewrite the file only to shorten it.
|
|
1800
|
+
- If the output JSON already exists and findings have \`resolution\` ({ kind: ignored|fix|corrected, detail?: string }), preserve those fields on rewrite (coverage / edit / regenerate). Keep existing finding ids when possible; do not drop or reshuffle resolutions.`;
|
|
1789
1801
|
/** @param {{ hasDiff?: boolean }} [ctx] */
|
|
1790
1802
|
function workflowLocal(base, branch, ctx = {}) {
|
|
1791
1803
|
if (ctx.hasDiff) return `Workflow:
|
|
@@ -1936,7 +1948,7 @@ ${outputSchemaBlock(meta)}
|
|
|
1936
1948
|
|
|
1937
1949
|
Include "meta" with the source/repo/branch/base above (and origin "remoteUrl" when local). "agent" and "model" are required: set "agent" to the product you are (Claude Code, Cursor, Codex, Copilot, Gemini, …) and "model" to the exact model id you are running. Do not leave placeholders or omit them; validation fails without both. "generatedAt" is optional (ISO-8601 now).
|
|
1938
1950
|
|
|
1939
|
-
Do NOT include diffs or a "files" array. The tool loads the companion \`.diff\` (or computes with git if missing) when opening the report. Do not invent hunks or paste patches into the JSON.
|
|
1951
|
+
Do NOT include diffs or a "files" array. The tool loads the companion \`.diff\` (or computes with git if missing) when opening the report. Do not invent hunks or paste patches into the JSON. If you are rewriting an existing review JSON, copy through any per-finding \`resolution\` already present.
|
|
1940
1952
|
|
|
1941
1953
|
${validateSection}`;
|
|
1942
1954
|
}
|
|
@@ -2145,15 +2157,25 @@ function materializeSeed(entry) {
|
|
|
2145
2157
|
});
|
|
2146
2158
|
} catch {}
|
|
2147
2159
|
}
|
|
2160
|
+
/** Escribe (pisa) el companion `.chat.md` de handoff si hay markdown pendiente. */
|
|
2161
|
+
function materializeHandoffChat(entry) {
|
|
2162
|
+
const text = entry.handoffChatMarkdown;
|
|
2163
|
+
if (text == null) return;
|
|
2164
|
+
try {
|
|
2165
|
+
writeHandoffChat(entry.repo, entry.outputFilename, text);
|
|
2166
|
+
} catch {}
|
|
2167
|
+
entry.handoffChatMarkdown = null;
|
|
2168
|
+
}
|
|
2148
2169
|
/** Prefijo del primer mensaje cuando la sesión ACP es nueva. */
|
|
2149
|
-
function contextPreamble(entry) {
|
|
2170
|
+
function contextPreamble(entry, handoffNote) {
|
|
2150
2171
|
materializeSeed(entry);
|
|
2172
|
+
materializeHandoffChat(entry);
|
|
2151
2173
|
const paths = companionPaths(entry.repo, entry.outputFilename);
|
|
2152
2174
|
const jsonRel = outputRelPath(entry.outputFilename);
|
|
2153
2175
|
const diffRel = `${outputRelPath(entry.outputFilename).replace(/\.json$/i, "")}.diff`;
|
|
2154
2176
|
const hasJson = existsSync(paths.json);
|
|
2155
2177
|
const hasDiff = existsSync(paths.diff);
|
|
2156
|
-
|
|
2178
|
+
const lines = [
|
|
2157
2179
|
"Context for this chat (new agent session — read these files before answering):",
|
|
2158
2180
|
`- Repo: ${entry.repo}`,
|
|
2159
2181
|
`- Branch under review: ${entry.branch}`,
|
|
@@ -2161,8 +2183,14 @@ function contextPreamble(entry) {
|
|
|
2161
2183
|
hasJson ? `- Review JSON (relative to repo root): \`${jsonRel}\` — read this file.` : `- Review JSON: not available on disk (no seed/payload was provided). Say so if you need it.`,
|
|
2162
2184
|
hasDiff ? `- Diff (relative to repo root): \`${diffRel}\` — read this file.` : `- Diff file: not available on disk (no seed/diff and git cache failed). Say so if you need it.`,
|
|
2163
2185
|
"",
|
|
2164
|
-
"
|
|
2165
|
-
|
|
2186
|
+
"The user question or fix request is the priority. The review JSON is reference context — do not re-litigate or re-review findings unless the user asks.",
|
|
2187
|
+
"",
|
|
2188
|
+
"Findings may include optional `resolution` ({ kind: ignored|fix|corrected, detail?: string }) written by the UI. Preserve those fields when editing the JSON. Corrected findings and their detail are prior work — use them as context; do not undo them unless the user asks."
|
|
2189
|
+
];
|
|
2190
|
+
const note = String(handoffNote || "").trim();
|
|
2191
|
+
if (note) lines.push("", note);
|
|
2192
|
+
lines.push("", "User message:");
|
|
2193
|
+
return lines.join("\n");
|
|
2166
2194
|
}
|
|
2167
2195
|
function permissionReasonLabel(allow, scope, deniedReason) {
|
|
2168
2196
|
if (!allow) return deniedReason;
|
|
@@ -2428,7 +2456,7 @@ function checkEntryReport(entry) {
|
|
|
2428
2456
|
function invalidJsonFixPrompt(entry, path, result) {
|
|
2429
2457
|
return `${formatCheckReport(path, validateCliCommand(entry.outputFilename), result)}
|
|
2430
2458
|
|
|
2431
|
-
Critical:
|
|
2459
|
+
Critical: fix ONLY the listed schema/validation errors above. Do NOT regenerate or reshuffle findings unnecessarily. Preserve existing finding ids and any \`resolution\` fields when possible. Do NOT only bump meta.generatedAt or rewrite notes. Edit \`${outputRelPath(entry.outputFilename).replace(/\\/g, "/")}\` so every problem above is fixed (add blocks or skipped for each missing path). Do not claim success until coverage is complete.
|
|
2432
2460
|
|
|
2433
2461
|
${TOOL_RULES}
|
|
2434
2462
|
|
|
@@ -2566,7 +2594,7 @@ async function runTurn(entry, text, mode, opts) {
|
|
|
2566
2594
|
setStatus(entry, "idle", "Cancelado.");
|
|
2567
2595
|
return;
|
|
2568
2596
|
}
|
|
2569
|
-
if (mode !== "ask") await checkOutput(entry, since, OUTPUT_AUTO_RETRIES);
|
|
2597
|
+
if (mode !== "ask" && mode !== "fix") await checkOutput(entry, since, OUTPUT_AUTO_RETRIES);
|
|
2570
2598
|
entry.busy = false;
|
|
2571
2599
|
if (entry.cancelled) setStatus(entry, "idle", "Cancelado.");
|
|
2572
2600
|
else setStatus(entry, "idle");
|
|
@@ -2608,6 +2636,8 @@ function newEntry(agent, fields) {
|
|
|
2608
2636
|
rejections: [],
|
|
2609
2637
|
needsContext: false,
|
|
2610
2638
|
seed: null,
|
|
2639
|
+
handoffNote: null,
|
|
2640
|
+
handoffChatMarkdown: null,
|
|
2611
2641
|
diffPaths: null,
|
|
2612
2642
|
pendingPermissions: /* @__PURE__ */ new Map(),
|
|
2613
2643
|
sessionAllowDenied: false,
|
|
@@ -2697,9 +2727,13 @@ async function continueReviewAfterDiff(entry, input) {
|
|
|
2697
2727
|
*/
|
|
2698
2728
|
async function openChat(input) {
|
|
2699
2729
|
const sessionId = String(input.sessionId || "").trim();
|
|
2730
|
+
const handoffNote = String(input.handoffNote || "").trim() || null;
|
|
2731
|
+
const handoffChat = input.handoffChatMarkdown != null ? String(input.handoffChatMarkdown) : null;
|
|
2700
2732
|
if (sessionId) {
|
|
2701
2733
|
for (const entry of sessions.values()) if (entry.acpSessionId === sessionId && entry.repo === input.repo) {
|
|
2702
2734
|
if (input.seed) entry.seed = input.seed;
|
|
2735
|
+
if (handoffNote) entry.handoffNote = handoffNote;
|
|
2736
|
+
if (handoffChat != null) entry.handoffChatMarkdown = handoffChat;
|
|
2703
2737
|
return info(entry);
|
|
2704
2738
|
}
|
|
2705
2739
|
}
|
|
@@ -2709,6 +2743,8 @@ async function openChat(input) {
|
|
|
2709
2743
|
acpSessionId: sessionId
|
|
2710
2744
|
});
|
|
2711
2745
|
if (input.seed) entry.seed = input.seed;
|
|
2746
|
+
if (handoffNote) entry.handoffNote = handoffNote;
|
|
2747
|
+
if (handoffChat != null) entry.handoffChatMarkdown = handoffChat;
|
|
2712
2748
|
if (!sessionId) entry.needsContext = true;
|
|
2713
2749
|
try {
|
|
2714
2750
|
if (!entry.acp) setStatus(entry, "starting", `Lanzando ${entry.agentLabel}…`);
|
|
@@ -2726,13 +2762,17 @@ function sendMessage(id, text, mode, opts) {
|
|
|
2726
2762
|
const body = text.trim();
|
|
2727
2763
|
if (!body) throw new Error("El mensaje está vacío.");
|
|
2728
2764
|
if (entry.busy) throw new Error("El agente todavía está trabajando en el pedido anterior.");
|
|
2765
|
+
const sendHandoff = String(opts?.handoffNote || "").trim();
|
|
2766
|
+
if (sendHandoff) entry.handoffNote = sendHandoff;
|
|
2767
|
+
if (opts?.handoffChatMarkdown != null) entry.handoffChatMarkdown = String(opts.handoffChatMarkdown);
|
|
2729
2768
|
let agentText = body;
|
|
2730
2769
|
if (entry.needsContext) {
|
|
2731
|
-
agentText = `${contextPreamble(entry)}\n${body}`;
|
|
2770
|
+
agentText = `${contextPreamble(entry, entry.handoffNote)}\n${body}`;
|
|
2732
2771
|
entry.needsContext = false;
|
|
2772
|
+
entry.handoffNote = null;
|
|
2733
2773
|
entry.seed = null;
|
|
2734
2774
|
}
|
|
2735
|
-
runTurn(entry, mode === "edit" ? `${agentText}\n\nApply this by editing ${entry.outputFilename} in place (keep everything else as is). Reply briefly in Spanish with what you changed.\n\n${SERVER_VALIDATES}` : `${agentText}\n\nAnswer in Spanish. This is a question about the review: do not modify any file.`, mode, {
|
|
2775
|
+
runTurn(entry, mode === "edit" ? `${agentText}\n\nApply this by editing ${entry.outputFilename} in place (keep everything else as is; preserve finding ids and any \`resolution\` fields). Reply briefly in Spanish with what you changed.\n\n${SERVER_VALIDATES}` : mode === "fix" ? `${agentText}\n\nApply ONLY the listed code fixes by editing files inside this repo. Do not rewrite the review JSON. Touch nothing else. Reply briefly in Spanish with a short per-finding detail suitable for resolution.detail.` : `${agentText}\n\nAnswer in Spanish. This is a question about the review: do not modify any file.`, mode, {
|
|
2736
2776
|
shown: body,
|
|
2737
2777
|
model: String(opts?.model || "").trim() || void 0
|
|
2738
2778
|
});
|
|
@@ -2853,6 +2893,35 @@ async function cancelTurn(id) {
|
|
|
2853
2893
|
entry.busy = false;
|
|
2854
2894
|
setStatus(entry, "idle", "Cancelado.");
|
|
2855
2895
|
}
|
|
2896
|
+
/**
|
|
2897
|
+
* Cierra la sesión de chat: ACP, Map y permisos pendientes.
|
|
2898
|
+
* La UI lo usa al cambiar de agente (el reporte / triage se mantienen).
|
|
2899
|
+
*/
|
|
2900
|
+
async function closeChat(id) {
|
|
2901
|
+
const entry = sessions.get(String(id || ""));
|
|
2902
|
+
if (!entry) return;
|
|
2903
|
+
entry.cancelled = true;
|
|
2904
|
+
for (const [requestId, pending] of [...entry.pendingPermissions]) {
|
|
2905
|
+
clearTimeout(pending.timer);
|
|
2906
|
+
entry.pendingPermissions.delete(requestId);
|
|
2907
|
+
try {
|
|
2908
|
+
pending.resolve(false, { quiet: true });
|
|
2909
|
+
} catch {}
|
|
2910
|
+
}
|
|
2911
|
+
if (entry.idleTimer) {
|
|
2912
|
+
clearTimeout(entry.idleTimer);
|
|
2913
|
+
entry.idleTimer = null;
|
|
2914
|
+
}
|
|
2915
|
+
try {
|
|
2916
|
+
if (entry.acp && entry.busy) try {
|
|
2917
|
+
await entry.acp.cancel();
|
|
2918
|
+
} catch {}
|
|
2919
|
+
entry.acp?.close();
|
|
2920
|
+
} catch {}
|
|
2921
|
+
entry.acp = null;
|
|
2922
|
+
entry.listeners.clear();
|
|
2923
|
+
sessions.delete(entry.id);
|
|
2924
|
+
}
|
|
2856
2925
|
function subscribe(id, listener) {
|
|
2857
2926
|
const entry = sessions.get(id);
|
|
2858
2927
|
if (!entry) return null;
|
|
@@ -2876,5 +2945,5 @@ function startPendingAgentRun() {
|
|
|
2876
2945
|
}
|
|
2877
2946
|
}
|
|
2878
2947
|
|
|
2879
|
-
export { agentModels as a, startReview as b, sendMessage as c, setPermissionTrust as d, cancelTurn as e,
|
|
2880
|
-
//# sourceMappingURL=agent-sessions-
|
|
2948
|
+
export { agentModels as a, startReview as b, sendMessage as c, setPermissionTrust as d, cancelTurn as e, closeChat as f, retryReview as g, openAgentLogin as h, loginCommand as i, subscribe as j, startPendingAgentRun as k, listAcpAgents as l, openChat as o, respondPermission as r, sessionInfo as s };
|
|
2949
|
+
//# sourceMappingURL=agent-sessions-2XGojSJ_.js.map
|