@jpkme/diff-review 0.1.15 → 0.1.17
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/README.md +22 -14
- package/bin/diff-review.mjs +192 -21
- package/lib/acp-policy.mjs +10 -2
- package/lib/acp-policy.test.mjs +27 -0
- package/lib/acp.mjs +86 -10
- package/lib/agent-login.mjs +848 -36
- package/lib/agent-login.test.mjs +538 -0
- package/lib/agents.mjs +0 -39
- package/lib/agents.test.mjs +17 -24
- package/lib/extract-cache.test.mjs +162 -162
- package/lib/git.mjs +25 -9
- package/lib/model-label.mjs +20 -4
- package/lib/model-label.test.mjs +15 -2
- package/lib/output-name.mjs +7 -0
- package/lib/prompt.mjs +14 -11
- package/lib/prompt.test.mjs +49 -0
- package/lib/review-dir.mjs +14 -1
- package/lib/review-meta.mjs +11 -3
- package/lib/review-meta.test.mjs +19 -2
- package/lib/review-prep.mjs +63 -63
- package/lib/review.mjs +36 -4
- package/lib/review.test.mjs +35 -0
- package/lib/validate.mjs +11 -1
- package/lib/validate.test.mjs +47 -0
- package/lib/wait-output.test.mjs +1 -1
- package/package.json +2 -2
- package/schema.json +16 -1
- package/web/build/client/_app/immutable/assets/0.B04dzd8P.css +1 -0
- package/web/build/client/_app/immutable/assets/0.B04dzd8P.css.br +0 -0
- package/web/build/client/_app/immutable/assets/0.B04dzd8P.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/2.CQmxVXnC.css +1 -0
- package/web/build/client/_app/immutable/assets/2.CQmxVXnC.css.br +0 -0
- package/web/build/client/_app/immutable/assets/2.CQmxVXnC.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/3.BVJgADrM.css +1 -0
- package/web/build/client/_app/immutable/assets/3.BVJgADrM.css.br +0 -0
- package/web/build/client/_app/immutable/assets/3.BVJgADrM.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/storage.Ztmr3s84.css +1 -0
- package/web/build/client/_app/immutable/assets/storage.Ztmr3s84.css.br +0 -0
- package/web/build/client/_app/immutable/assets/storage.Ztmr3s84.css.gz +0 -0
- package/web/build/client/_app/immutable/chunks/B-2kfLeA.js +1 -0
- package/web/build/client/_app/immutable/chunks/B-2kfLeA.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/B-2kfLeA.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/B4SiKXUO.js +2 -0
- package/web/build/client/_app/immutable/chunks/B4SiKXUO.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/B4SiKXUO.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{D8WOD_eS.js → DA0YnpGR.js} +3 -3
- package/web/build/client/_app/immutable/chunks/DA0YnpGR.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/DA0YnpGR.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/{BpVtXA-T.js → Dv85Hz5p.js} +1 -1
- package/web/build/client/_app/immutable/chunks/Dv85Hz5p.js.br +2 -0
- package/web/build/client/_app/immutable/chunks/Dv85Hz5p.js.gz +0 -0
- package/web/build/client/_app/immutable/chunks/b-BaDYIc.js +215 -0
- package/web/build/client/_app/immutable/chunks/b-BaDYIc.js.br +0 -0
- package/web/build/client/_app/immutable/chunks/b-BaDYIc.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/app.DPUME9Z_.js +2 -0
- package/web/build/client/_app/immutable/entry/app.DPUME9Z_.js.br +0 -0
- package/web/build/client/_app/immutable/entry/app.DPUME9Z_.js.gz +0 -0
- package/web/build/client/_app/immutable/entry/start.hH87UZsD.js +1 -0
- package/web/build/client/_app/immutable/entry/start.hH87UZsD.js.br +0 -0
- package/web/build/client/_app/immutable/entry/start.hH87UZsD.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/0.BhHA-Ohy.js +1 -0
- package/web/build/client/_app/immutable/nodes/0.BhHA-Ohy.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/0.BhHA-Ohy.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/1.jjvGFUxu.js +1 -0
- package/web/build/client/_app/immutable/nodes/1.jjvGFUxu.js.br +2 -0
- package/web/build/client/_app/immutable/nodes/1.jjvGFUxu.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/2.CJTh6CGA.js +12 -0
- package/web/build/client/_app/immutable/nodes/2.CJTh6CGA.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/2.CJTh6CGA.js.gz +0 -0
- package/web/build/client/_app/immutable/nodes/3.DYAPRc_2.js +340 -0
- package/web/build/client/_app/immutable/nodes/3.DYAPRc_2.js.br +0 -0
- package/web/build/client/_app/immutable/nodes/3.DYAPRc_2.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-8NUeB9cB.js +11 -0
- package/web/build/server/chunks/{0-DUStDOsr.js.map → 0-8NUeB9cB.js.map} +1 -1
- package/web/build/server/chunks/1-BApN-ILJ.js +7 -0
- package/web/build/server/chunks/{1-DUj63QTT.js.map → 1-BApN-ILJ.js.map} +1 -1
- package/web/build/server/chunks/2-Bq7iMeQx.js +7 -0
- package/web/build/server/chunks/2-Bq7iMeQx.js.map +1 -0
- package/web/build/server/chunks/3-W0cqofyE.js +7 -0
- package/web/build/server/chunks/{3-C7UD6rei.js.map → 3-W0cqofyE.js.map} +1 -1
- package/web/build/server/chunks/_server.ts-Bu1fdGSB.js +123 -0
- package/web/build/server/chunks/_server.ts-Bu1fdGSB.js.map +1 -0
- package/web/build/server/chunks/{_server.ts-4RcoUd0l.js → _server.ts-BuUNechu.js} +5 -4
- package/web/build/server/chunks/_server.ts-BuUNechu.js.map +1 -0
- package/web/build/server/chunks/{agent-sessions-C_hlZJKN.js → agent-sessions-BArYLTW6.js} +1103 -146
- package/web/build/server/chunks/agent-sessions-BArYLTW6.js.map +1 -0
- package/web/build/server/chunks/{git-review-Bh1w0gak.js → git-review-BJ_JrFNP.js} +87 -26
- package/web/build/server/chunks/git-review-BJ_JrFNP.js.map +1 -0
- package/web/build/server/chunks/{handler-e2lEvjVT.js → handler-Df_bJiCq.js} +3 -3
- package/web/build/server/chunks/{handler-e2lEvjVT.js.map → handler-Df_bJiCq.js.map} +1 -1
- package/web/build/server/chunks/{hooks.server-Um1Sknmz.js → hooks.server-BEl7rVad.js} +4 -3
- package/web/build/server/chunks/{hooks.server-Um1Sknmz.js.map → hooks.server-BEl7rVad.js.map} +1 -1
- package/web/build/server/chunks/{index.js-C3-YX8SA.js → index.js-Bb0CZLZ_.js} +884 -881
- package/web/build/server/chunks/index.js-Bb0CZLZ_.js.map +1 -0
- package/web/build/server/chunks/manifest.js-j442duM7.js +65 -0
- package/web/build/server/chunks/manifest.js-j442duM7.js.map +1 -0
- package/web/build/server/chunks/{remote-1g4ayag-DMiPy1mT.js → remote-1g4ayag-BxKnZQPn.js} +6 -6
- package/web/build/server/chunks/remote-1g4ayag-BxKnZQPn.js.map +1 -0
- package/web/build/server/chunks/{remote-wh6t6j-RlIVOUe-.js → remote-wh6t6j-B-AHrGaN.js} +58 -12
- package/web/build/server/chunks/remote-wh6t6j-B-AHrGaN.js.map +1 -0
- package/web/build/server/chunks/{validate-CAQ31C7k.js → validate-CXjTRGnR.js} +67 -21
- package/web/build/server/chunks/validate-CXjTRGnR.js.map +1 -0
- package/web/build/client/_app/immutable/assets/0.BKRG1f36.css +0 -1
- package/web/build/client/_app/immutable/assets/0.BKRG1f36.css.br +0 -0
- package/web/build/client/_app/immutable/assets/0.BKRG1f36.css.gz +0 -0
- package/web/build/client/_app/immutable/assets/2.C4whE4xz.css +0 -1
- package/web/build/client/_app/immutable/assets/2.C4whE4xz.css.br +0 -0
- package/web/build/client/_app/immutable/assets/2.C4whE4xz.css.gz +0 -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 +0 -1
- package/web/build/client/_app/immutable/assets/storage.TlsiS-AP.css.br +0 -0
- package/web/build/client/_app/immutable/assets/storage.TlsiS-AP.css.gz +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 +0 -2
- 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/0-DUStDOsr.js +0 -11
- 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/_server.ts-4RcoUd0l.js.map +0 -1
- 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/manifest.js-CmbRPv0j.js +0 -58
- package/web/build/server/chunks/manifest.js-CmbRPv0j.js.map +0 -1
- package/web/build/server/chunks/remote-1g4ayag-DMiPy1mT.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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const manifest = (() => {
|
|
2
|
+
function __memo(fn) {
|
|
3
|
+
let value;
|
|
4
|
+
return () => value ??= (value = fn());
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
appDir: "_app",
|
|
9
|
+
appPath: "_app",
|
|
10
|
+
assets: new Set([]),
|
|
11
|
+
mimeTypes: {},
|
|
12
|
+
_: {
|
|
13
|
+
client: {start:"_app/immutable/entry/start.hH87UZsD.js",app:"_app/immutable/entry/app.DPUME9Z_.js",imports:["_app/immutable/entry/start.hH87UZsD.js","_app/immutable/chunks/B4SiKXUO.js","_app/immutable/chunks/DA0YnpGR.js","_app/immutable/entry/app.DPUME9Z_.js","_app/immutable/chunks/DA0YnpGR.js","_app/immutable/chunks/B-2kfLeA.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
|
+
nodes: [
|
|
15
|
+
__memo(() => import('./0-8NUeB9cB.js')),
|
|
16
|
+
__memo(() => import('./1-BApN-ILJ.js')),
|
|
17
|
+
__memo(() => import('./2-Bq7iMeQx.js')),
|
|
18
|
+
__memo(() => import('./3-W0cqofyE.js'))
|
|
19
|
+
],
|
|
20
|
+
remotes: {
|
|
21
|
+
'wh6t6j': __memo(() => import('./remote-wh6t6j-B-AHrGaN.js')),
|
|
22
|
+
'1g4ayag': __memo(() => import('./remote-1g4ayag-BxKnZQPn.js'))
|
|
23
|
+
},
|
|
24
|
+
routes: [
|
|
25
|
+
{
|
|
26
|
+
id: "/",
|
|
27
|
+
pattern: /^\/$/,
|
|
28
|
+
params: [],
|
|
29
|
+
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
|
30
|
+
endpoint: null
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "/api/agent/[id]/events",
|
|
34
|
+
pattern: /^\/api\/agent\/([^/]+?)\/events\/?$/,
|
|
35
|
+
params: [{"name":"id","optional":false,"rest":false,"chained":false}],
|
|
36
|
+
page: null,
|
|
37
|
+
endpoint: __memo(() => import('./_server.ts-BuUNechu.js'))
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "/api/pdf",
|
|
41
|
+
pattern: /^\/api\/pdf\/?$/,
|
|
42
|
+
params: [],
|
|
43
|
+
page: null,
|
|
44
|
+
endpoint: __memo(() => import('./_server.ts-Bu1fdGSB.js'))
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "/report/[id]",
|
|
48
|
+
pattern: /^\/report\/([^/]+?)\/?$/,
|
|
49
|
+
params: [{"name":"id","optional":false,"rest":false,"chained":false}],
|
|
50
|
+
page: { layouts: [0,], errors: [1,], leaf: 3 },
|
|
51
|
+
endpoint: null
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
prerendered_routes: new Set([]),
|
|
55
|
+
matchers: async () => {
|
|
56
|
+
|
|
57
|
+
return { };
|
|
58
|
+
},
|
|
59
|
+
server_assets: {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
})();
|
|
63
|
+
|
|
64
|
+
export { manifest as m };
|
|
65
|
+
//# sourceMappingURL=manifest.js-j442duM7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js-j442duM7.js","sources":["../../../.svelte-kit/output/server/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([]),\n\tmimeTypes: {},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.hH87UZsD.js\",app:\"_app/immutable/entry/app.DPUME9Z_.js\",imports:[\"_app/immutable/entry/start.hH87UZsD.js\",\"_app/immutable/chunks/B4SiKXUO.js\",\"_app/immutable/chunks/DA0YnpGR.js\",\"_app/immutable/entry/app.DPUME9Z_.js\",\"_app/immutable/chunks/DA0YnpGR.js\",\"_app/immutable/chunks/B-2kfLeA.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t'wh6t6j': __memo(() => import('./chunks/remote-wh6t6j.js')),\n\t\t\t'1g4ayag': __memo(() => import('./chunks/remote-1g4ayag.js'))\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/\",\n\t\t\t\tpattern: /^\\/$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/agent/[id]/events\",\n\t\t\t\tpattern: /^\\/api\\/agent\\/([^/]+?)\\/events\\/?$/,\n\t\t\t\tparams: [{\"name\":\"id\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/agent/_id_/events/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/pdf\",\n\t\t\t\tpattern: /^\\/api\\/pdf\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/pdf/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/report/[id]\",\n\t\t\t\tpattern: /^\\/report\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"id\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MA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C,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACzE,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,0BAAyD,CAAC;AAC5F,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,UAAU;AAClB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,QAAQ,EAAE,MAAM,CAAC,MAAM,OAAO,0BAA2C,CAAC;AAC9E,IAAI;AACJ,GAAG;AACH,IAAI,EAAE,EAAE,cAAc;AACtB,IAAI,OAAO,EAAE,yBAAyB;AACtC,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACzE,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as __exportAll, i as init_remote_functions, e as error } from './index.js-
|
|
2
|
-
import { q as query, c as command, a as readReviewOutput, w as writeReviewOutput$1, p as pickLocalFolder$1, b as pickReviewJsonFile, h as hydrateReviewPayload, d as describeGitError, l as loadRepoInfo, e as loadLaunchRepoInfo, t as takePendingImport, f as detectReviewOutput, r as resolveOutputName, g as loadFileLines } from './git-review-
|
|
3
|
-
import { d as decodePayload, m as makeOutputFilename } from './validate-
|
|
1
|
+
import { _ as __exportAll, i as init_remote_functions, e as error } from './index.js-Bb0CZLZ_.js';
|
|
2
|
+
import { q as query, c as command, a as readReviewOutput, w as writeReviewOutput$1, p as pickLocalFolder$1, b as pickReviewJsonFile, h as hydrateReviewPayload, d as describeGitError, i as isExpectedGitUserError, l as loadRepoInfo, e as loadLaunchRepoInfo, t as takePendingImport, f as detectReviewOutput, r as resolveOutputName, g as loadFileLines } from './git-review-BJ_JrFNP.js';
|
|
3
|
+
import { d as decodePayload, m as makeOutputFilename } from './validate-CXjTRGnR.js';
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:child_process';
|
|
@@ -24,7 +24,7 @@ var git_remote_exports = /* @__PURE__ */ __exportAll({
|
|
|
24
24
|
});
|
|
25
25
|
function fail(err) {
|
|
26
26
|
const message = describeGitError(err) || "No se pudo hablar con git.";
|
|
27
|
-
console.error("[diff-review git]", message, err);
|
|
27
|
+
if (!isExpectedGitUserError(err)) console.error("[diff-review git]", message, err);
|
|
28
28
|
error(400, message);
|
|
29
29
|
}
|
|
30
30
|
var loadRepo = /* @__PURE__ */ query("unchecked", async (input) => {
|
|
@@ -39,7 +39,7 @@ var launchContext = /* @__PURE__ */ query(async () => {
|
|
|
39
39
|
try {
|
|
40
40
|
return loadLaunchRepoInfo();
|
|
41
41
|
} catch (err) {
|
|
42
|
-
console.error("[diff-review git] launch context", describeGitError(err), err);
|
|
42
|
+
if (!isExpectedGitUserError(err)) console.error("[diff-review git] launch context", describeGitError(err), err);
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
@@ -141,4 +141,4 @@ for (const [name, fn] of Object.entries(git_remote_exports)) {
|
|
|
141
141
|
var _sveltekit_remote_1g4ayag_default = git_remote_exports;
|
|
142
142
|
|
|
143
143
|
export { _sveltekit_remote_1g4ayag_default as default };
|
|
144
|
-
//# sourceMappingURL=remote-1g4ayag-
|
|
144
|
+
//# sourceMappingURL=remote-1g4ayag-BxKnZQPn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-1g4ayag-BxKnZQPn.js","sources":["../../../.svelte-kit/output/server/chunks/git.remote.js","../../../.svelte-kit/output/server/chunks/remote-1g4ayag.js"],"sourcesContent":["import { tt as __exportAll } from \"./index-server.js\";\nimport { a as command, n as query } from \"./remote.js\";\nimport { F as makeOutputFilename, f as decodePayload } from \"./validate.js\";\nimport { a as loadFileLines, c as pickLocalFolder$1, d as resolveOutputName, f as takePendingImport, i as isExpectedGitUserError, l as pickReviewJsonFile, n as detectReviewOutput, o as loadLaunchRepoInfo, p as writeReviewOutput$1, r as hydrateReviewPayload, s as loadRepoInfo, t as describeGitError, u as readReviewOutput } from \"./git-review.js\";\nimport { error } from \"@sveltejs/kit\";\nimport { init_remote_functions } from \"@sveltejs/kit/internal\";\nimport { basename } from \"node:path\";\n//#region src/lib/report/git.remote.ts\nvar git_remote_exports = /* @__PURE__ */ __exportAll({\n\tdetectOutput: () => detectOutput,\n\tfileLines: () => fileLines,\n\thydrateFromGit: () => hydrateFromGit,\n\tlaunchContext: () => launchContext,\n\tloadDetectedOutput: () => loadDetectedOutput,\n\tloadRepo: () => loadRepo,\n\toutputName: () => outputName,\n\tpendingImport: () => pendingImport,\n\tpickLocalFolder: () => pickLocalFolder,\n\tpickReviewFile: () => pickReviewFile,\n\twriteReviewOutput: () => writeReviewOutput\n});\nfunction fail(err) {\n\tconst message = describeGitError(err) || \"No se pudo hablar con git.\";\n\tif (!isExpectedGitUserError(err)) console.error(\"[diff-review git]\", message, err);\n\terror(400, message);\n}\nvar loadRepo = /* @__PURE__ */ query(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn loadRepoInfo(input?.source, String(input?.repo || \"\").trim());\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Repo del CWD de lanzamiento, o null si no hay git. */\nvar launchContext = /* @__PURE__ */ query(async () => {\n\ttry {\n\t\treturn loadLaunchRepoInfo();\n\t} catch (err) {\n\t\tif (!isExpectedGitUserError(err)) console.error(\"[diff-review git] launch context\", describeGitError(err), err);\n\t\treturn null;\n\t}\n});\n/** JSON pendiente del CLI (DIFF_REVIEW_IMPORT_FILE); se consume al leer. */\nvar pendingImport = /* @__PURE__ */ query(async () => {\n\ttry {\n\t\treturn takePendingImport();\n\t} catch (err) {\n\t\tconsole.error(\"[diff-review git] pending import\", describeGitError(err), err);\n\t\treturn null;\n\t}\n});\n/** ¿Hay un JSON de review en la raíz del repo local? */\nvar detectOutput = /* @__PURE__ */ query(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn detectReviewOutput(String(input?.repo || \"\").trim(), input?.preferredName);\n\t} catch (err) {\n\t\tconsole.error(\"[diff-review git] detect output\", describeGitError(err), err);\n\t\treturn null;\n\t}\n});\n/** Nombre sugerido con tips cortos (branch/base). */\nvar outputName = /* @__PURE__ */ query(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn resolveOutputName(String(input?.repo || \"\").trim(), String(input?.branch || \"\").trim(), String(input?.base || \"develop\").trim());\n\t} catch (err) {\n\t\tconsole.error(\"[diff-review git] output name\", describeGitError(err), err);\n\t\treturn {\n\t\t\tfilename: makeOutputFilename({}),\n\t\t\tfingerprint: null\n\t\t};\n\t}\n});\n/** Lee un JSON detectado en el repo (sin diálogo). */\nvar loadDetectedOutput = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn readReviewOutput(String(input?.repo || \"\").trim(), String(input?.filename || \"\").trim());\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Guarda un JSON de review en `.diff-review/` (p. ej. drag-and-drop → puntero en localStorage). */\nvar writeReviewOutput = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn writeReviewOutput$1(String(input?.repo || \"\").trim(), String(input?.filename || \"\").trim(), input?.payload);\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\nvar pickLocalFolder = /* @__PURE__ */ command(\"unchecked\", async (_input) => {\n\ttry {\n\t\treturn await pickLocalFolder$1();\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Diálogo nativo de JSON; `directory` = raíz del repo local. */\nvar pickReviewFile = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst picked = await pickReviewJsonFile(input?.directory);\n\t\tif (!picked) return null;\n\t\treturn {\n\t\t\tfilename: basename(picked.path),\n\t\t\tpayload: decodePayload(picked.text)\n\t\t};\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Líneas del archivo en el branch revisado, para expandir el contexto oculto de un diff. */\nvar fileLines = /* @__PURE__ */ query(\"unchecked\", async (input) => loadFileLines({\n\trepo: String(input?.repo || \"\").trim(),\n\tbranch: String(input?.branch || \"\").trim(),\n\tbase: String(input?.base || \"develop\").trim(),\n\tsource: input?.source,\n\tpath: String(input?.path || \"\").trim()\n}));\nvar hydrateFromGit = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn hydrateReviewPayload({\n\t\t\trepo: String(input?.repo || \"\").trim(),\n\t\t\tbranch: String(input?.branch || \"\").trim(),\n\t\t\tbase: String(input?.base || \"develop\").trim(),\n\t\t\tsource: input?.source,\n\t\t\tpayload: input?.payload,\n\t\t\toutputFilename: String(input?.outputFilename || \"\").trim() || void 0\n\t\t});\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\ninit_remote_functions(git_remote_exports, \"src/lib/report/git.remote.ts\", \"1g4ayag\");\nfor (const [name, fn] of Object.entries(git_remote_exports)) {\n\tfn.__.id = \"1g4ayag/\" + name;\n\tfn.__.name = name;\n}\n//#endregion\nexport { launchContext as a, outputName as c, hydrateFromGit as i, pendingImport as l, fileLines as n, loadDetectedOutput as o, git_remote_exports as r, loadRepo as s, detectOutput as t, writeReviewOutput as u };\n","import { r as git_remote_exports } from \"./git.remote.js\";\n//#region \\0sveltekit-remote:1g4ayag\nvar _sveltekit_remote_1g4ayag_default = git_remote_exports;\n//#endreg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AC,IAAI,EAAE;AACzC,GAAG,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;AAC7C,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC,IAAI,EAAE;AAChD,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM;AACxB,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO;AAC1B,GAAG,cAAc,EAAE,MAAM,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK;AACtE,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC,OAAO,GAAG,EAAE;AACf,EAAE,IAAI,CAAC,GAAG,CAAC;AACX,CAAC;AACD,CAAC,CAAC;AACF,qBAAqB,CAAC,kBAAkB,EAAE,8BAA8B,EAAE,SAAS,CAAC;AACpF,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;AAC7D,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,GAAG,IAAI;AAC7B,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI;AAClB;;ACrIA;AACG,IAAC,iCAAiC,GAAG;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as __exportAll, i as init_remote_functions, e as error } from './index.js-
|
|
2
|
-
import { q as query, c as command, r as resolveOutputName } from './git-review-
|
|
3
|
-
import { l as listAcpAgents, a as agentModels, s as sessionInfo, b as startReview$1, o as openChat$1, c as sendMessage$1, r as respondPermission$1, d as setPermissionTrust$1, e as cancelTurn, f as
|
|
4
|
-
import './validate-
|
|
1
|
+
import { _ as __exportAll, i as init_remote_functions, e as error } from './index.js-Bb0CZLZ_.js';
|
|
2
|
+
import { q as query, c as command, r as resolveOutputName } from './git-review-BJ_JrFNP.js';
|
|
3
|
+
import { l as listAcpAgents, a as agentModels, s as sessionInfo, b as startReview$1, o as openChat$1, c as sendMessage$1, r as respondPermission$1, d as setPermissionTrust$1, e as cancelTurn, f as closeChat$1, g as retryReview$1, h as agentAccountStatus, i as openAgentLogin$1, j as openAgentLogout$1 } from './agent-sessions-BArYLTW6.js';
|
|
4
|
+
import './validate-CXjTRGnR.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:path';
|
|
@@ -15,9 +15,12 @@ import '@agentclientprotocol/sdk';
|
|
|
15
15
|
var agent_remote_exports = /* @__PURE__ */ __exportAll({
|
|
16
16
|
acpAgentModels: () => acpAgentModels,
|
|
17
17
|
acpAgents: () => acpAgents,
|
|
18
|
+
agentAccount: () => agentAccount,
|
|
18
19
|
agentSession: () => agentSession,
|
|
19
20
|
cancelAgent: () => cancelAgent,
|
|
21
|
+
closeChat: () => closeChat,
|
|
20
22
|
openAgentLogin: () => openAgentLogin,
|
|
23
|
+
openAgentLogout: () => openAgentLogout,
|
|
21
24
|
openChat: () => openChat,
|
|
22
25
|
respondPermission: () => respondPermission,
|
|
23
26
|
retryReview: () => retryReview,
|
|
@@ -87,7 +90,9 @@ var openChat = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
|
87
90
|
branch: String(input?.branch || "").trim(),
|
|
88
91
|
base: String(input?.base || "develop").trim(),
|
|
89
92
|
model: input?.model,
|
|
90
|
-
seed: input?.seed ?? null
|
|
93
|
+
seed: input?.seed ?? null,
|
|
94
|
+
handoffNote: String(input?.handoffNote || "").trim() || void 0,
|
|
95
|
+
handoffChatMarkdown: input?.handoffChatMarkdown != null ? String(input.handoffChatMarkdown) : void 0
|
|
91
96
|
});
|
|
92
97
|
} catch (err) {
|
|
93
98
|
fail(err);
|
|
@@ -95,7 +100,12 @@ var openChat = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
|
95
100
|
});
|
|
96
101
|
var sendMessage = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
97
102
|
try {
|
|
98
|
-
|
|
103
|
+
const mode = input?.mode === "edit" ? "edit" : input?.mode === "fix" ? "fix" : "ask";
|
|
104
|
+
return sendMessage$1(String(input?.id || ""), String(input?.text || ""), mode, {
|
|
105
|
+
model: String(input?.model || "").trim() || void 0,
|
|
106
|
+
handoffNote: String(input?.handoffNote || "").trim() || void 0,
|
|
107
|
+
handoffChatMarkdown: input?.handoffChatMarkdown != null ? String(input.handoffChatMarkdown) : void 0
|
|
108
|
+
});
|
|
99
109
|
} catch (err) {
|
|
100
110
|
fail(err);
|
|
101
111
|
}
|
|
@@ -127,6 +137,10 @@ var setPermissionTrust = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
|
127
137
|
var cancelAgent = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
128
138
|
await cancelTurn(String(input?.id || ""));
|
|
129
139
|
});
|
|
140
|
+
/** Cierra la sesión ACP del server (cambio de agente). No toca el reporte ni el triage. */
|
|
141
|
+
var closeChat = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
142
|
+
await closeChat$1(String(input?.id || ""));
|
|
143
|
+
});
|
|
130
144
|
/** Reintenta escribir/validar el JSON en la misma sesión de review. */
|
|
131
145
|
var retryReview = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
132
146
|
try {
|
|
@@ -135,15 +149,47 @@ var retryReview = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
|
135
149
|
fail(err);
|
|
136
150
|
}
|
|
137
151
|
});
|
|
138
|
-
/**
|
|
152
|
+
/** Cuenta activa del agente (gh / claude auth status) para el header. */
|
|
153
|
+
var agentAccount = /* @__PURE__ */ query("unchecked", async (input) => {
|
|
154
|
+
try {
|
|
155
|
+
return agentAccountStatus(String(input?.agentId || "").trim());
|
|
156
|
+
} catch (err) {
|
|
157
|
+
fail(err);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
/** Lanza el login del agente (proceso oculto / OAuth); con `id` de sesión espera exit 0 y retoma. */
|
|
139
161
|
var openAgentLogin = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
140
162
|
try {
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
const
|
|
163
|
+
const sessionId = String(input?.id || "").trim();
|
|
164
|
+
const agentId = String(input?.agentId || "").trim();
|
|
165
|
+
const host = input?.host != null ? String(input.host) : void 0;
|
|
166
|
+
const result = await openAgentLogin$1({
|
|
167
|
+
sessionId: sessionId || void 0,
|
|
168
|
+
agentId: agentId || void 0,
|
|
169
|
+
host
|
|
170
|
+
});
|
|
144
171
|
return {
|
|
145
172
|
display: result.display,
|
|
146
|
-
...
|
|
173
|
+
...result.resumed ? {
|
|
174
|
+
resumed: true,
|
|
175
|
+
hint: "Inicio de sesión ok. Reintentando…"
|
|
176
|
+
} : { hint: "Esperando que completes el inicio de sesión…" }
|
|
177
|
+
};
|
|
178
|
+
} catch (err) {
|
|
179
|
+
fail(err);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
/** Cierra sesión del agente (Copilot también desloguea `gh`) para poder elegir otra cuenta. */
|
|
183
|
+
var openAgentLogout = /* @__PURE__ */ command("unchecked", async (input) => {
|
|
184
|
+
try {
|
|
185
|
+
const result = await openAgentLogout$1({
|
|
186
|
+
sessionId: String(input?.id || "").trim() || void 0,
|
|
187
|
+
agentId: String(input?.agentId || "").trim() || void 0,
|
|
188
|
+
host: input?.host != null ? String(input.host) : void 0
|
|
189
|
+
});
|
|
190
|
+
return {
|
|
191
|
+
...result,
|
|
192
|
+
hint: result.warnings[0] || "Sesión cerrada. Elegí con qué cuenta iniciar de nuevo."
|
|
147
193
|
};
|
|
148
194
|
} catch (err) {
|
|
149
195
|
fail(err);
|
|
@@ -159,4 +205,4 @@ for (const [name, fn] of Object.entries(agent_remote_exports)) {
|
|
|
159
205
|
var _sveltekit_remote_wh6t6j_default = agent_remote_exports;
|
|
160
206
|
|
|
161
207
|
export { _sveltekit_remote_wh6t6j_default as default };
|
|
162
|
-
//# sourceMappingURL=remote-wh6t6j-
|
|
208
|
+
//# sourceMappingURL=remote-wh6t6j-B-AHrGaN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-wh6t6j-B-AHrGaN.js","sources":["../../../.svelte-kit/output/server/chunks/agent.remote.js","../../../.svelte-kit/output/server/chunks/remote-wh6t6j.js"],"sourcesContent":["import { tt as __exportAll } from \"./index-server.js\";\nimport { a as command, n as query } from \"./remote.js\";\nimport { a as openAgentLogin$1, c as respondPermission$1, d as sessionInfo, f as setPermissionTrust$1, i as listAcpAgents, l as retryReview$1, m as startReview$1, n as cancelTurn, o as openAgentLogout$1, r as closeChat$1, s as openChat$1, t as agentModels, u as sendMessage$1, v as agentAccountStatus } from \"./agent-sessions.js\";\nimport { d as resolveOutputName } from \"./git-review.js\";\nimport { error } from \"@sveltejs/kit\";\nimport { init_remote_functions } from \"@sveltejs/kit/internal\";\n//#region src/lib/report/agent.remote.ts\nvar agent_remote_exports = /* @__PURE__ */ __exportAll({\n\tacpAgentModels: () => acpAgentModels,\n\tacpAgents: () => acpAgents,\n\tagentAccount: () => agentAccount,\n\tagentSession: () => agentSession,\n\tcancelAgent: () => cancelAgent,\n\tcloseChat: () => closeChat,\n\topenAgentLogin: () => openAgentLogin,\n\topenAgentLogout: () => openAgentLogout,\n\topenChat: () => openChat,\n\trespondPermission: () => respondPermission,\n\tretryReview: () => retryReview,\n\tsendMessage: () => sendMessage,\n\tsetPermissionTrust: () => setPermissionTrust,\n\tstartReview: () => startReview\n});\nfunction fail(err) {\n\tconst message = err instanceof Error ? err.message : String(err);\n\tconsole.error(\"[diff-review agent]\", message);\n\terror(400, message);\n}\n/** Agentes instalados que se pueden lanzar desde la web (los que hablan ACP). */\nvar acpAgents = /* @__PURE__ */ query(async () => {\n\ttry {\n\t\treturn listAcpAgents();\n\t} catch (err) {\n\t\tconsole.error(\"[diff-review agent] detect\", err);\n\t\treturn [];\n\t}\n});\n/**\n* Modelos reales del agente (por ACP). La primera consulta tarda unos segundos: abre una sesión de prueba.\n* Si falla, devuelve `error` + lista vacía (la UI mantiene el fallback y puede reintentar con `force`).\n*/\nvar acpAgentModels = /* @__PURE__ */ query(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn await agentModels(String(input?.agentId || \"\"), String(input?.repo || \"\").trim() || process.cwd(), { force: Boolean(input?.force) });\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\tconsole.error(\"[diff-review agent] models\", message);\n\t\treturn {\n\t\t\tmodels: [],\n\t\t\tcurrentModel: \"\",\n\t\t\terror: message\n\t\t};\n\t}\n});\nvar agentSession = /* @__PURE__ */ query(\"unchecked\", async (input) => sessionInfo(String(input?.id || \"\")));\nvar startReview = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst repo = String(input?.repo || \"\").trim();\n\t\tconst branch = String(input?.branch || \"\").trim();\n\t\tconst base = String(input?.base || \"develop\").trim();\n\t\tif (!repo || !branch) throw new Error(\"Faltan repo y branch.\");\n\t\tconst { filename } = resolveOutputName(repo, branch, base);\n\t\treturn startReview$1({\n\t\t\trepo,\n\t\t\tbranch,\n\t\t\tbase,\n\t\t\toutputFilename: filename,\n\t\t\tagentId: String(input?.agentId || \"\"),\n\t\t\tmodel: String(input?.model || \"\").trim() || void 0\n\t\t});\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\nvar openChat = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst outputFilename = String(input?.outputFilename || \"\").trim() || resolveOutputName(String(input?.repo || \"\").trim(), String(input?.branch || \"\").trim(), String(input?.base || \"develop\").trim()).filename;\n\t\treturn await openChat$1({\n\t\t\tagentId: String(input?.agentId || \"\"),\n\t\t\tsessionId: String(input?.sessionId || \"\"),\n\t\t\toutputFilename,\n\t\t\trepo: String(input?.repo || \"\").trim(),\n\t\t\tbranch: String(input?.branch || \"\").trim(),\n\t\t\tbase: String(input?.base || \"develop\").trim(),\n\t\t\tmodel: input?.model,\n\t\t\tseed: input?.seed ?? null,\n\t\t\thandoffNote: String(input?.handoffNote || \"\").trim() || void 0,\n\t\t\thandoffChatMarkdown: input?.handoffChatMarkdown != null ? String(input.handoffChatMarkdown) : void 0\n\t\t});\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\nvar sendMessage = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst mode = input?.mode === \"edit\" ? \"edit\" : input?.mode === \"fix\" ? \"fix\" : \"ask\";\n\t\treturn sendMessage$1(String(input?.id || \"\"), String(input?.text || \"\"), mode, {\n\t\t\tmodel: String(input?.model || \"\").trim() || void 0,\n\t\t\thandoffNote: String(input?.handoffNote || \"\").trim() || void 0,\n\t\t\thandoffChatMarkdown: input?.handoffChatMarkdown != null ? String(input.handoffChatMarkdown) : void 0\n\t\t});\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\nvar respondPermission = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst requestIds = Array.isArray(input?.requestIds) ? input.requestIds.map((id) => String(id || \"\")).filter(Boolean) : void 0;\n\t\tconst scope = input?.scope === \"session\" || input?.scope === \"always\" ? input.scope : \"once\";\n\t\treturn respondPermission$1({\n\t\t\tid: String(input?.id || \"\"),\n\t\t\trequestId: input?.requestId != null ? String(input.requestId) : void 0,\n\t\t\trequestIds,\n\t\t\tallow: Boolean(input?.allow),\n\t\t\tallowAll: Boolean(input?.allowAll),\n\t\t\tscope\n\t\t});\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Activa/desactiva “confiar en esta sesión” (bypass de confirmaciones de permiso). */\nvar setPermissionTrust = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn setPermissionTrust$1(String(input?.id || \"\"), Boolean(input?.enabled));\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\nvar cancelAgent = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\tawait cancelTurn(String(input?.id || \"\"));\n});\n/** Cierra la sesión ACP del server (cambio de agente). No toca el reporte ni el triage. */\nvar closeChat = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\tawait closeChat$1(String(input?.id || \"\"));\n});\n/** Reintenta escribir/validar el JSON en la misma sesión de review. */\nvar retryReview = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn retryReview$1(String(input?.id || \"\"));\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Cuenta activa del agente (gh / claude auth status) para el header. */\nvar agentAccount = /* @__PURE__ */ query(\"unchecked\", async (input) => {\n\ttry {\n\t\treturn agentAccountStatus(String(input?.agentId || \"\").trim());\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Lanza el login del agente (proceso oculto / OAuth); con `id` de sesión espera exit 0 y retoma. */\nvar openAgentLogin = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst sessionId = String(input?.id || \"\").trim();\n\t\tconst agentId = String(input?.agentId || \"\").trim();\n\t\tconst host = input?.host != null ? String(input.host) : void 0;\n\t\tconst result = await openAgentLogin$1({\n\t\t\tsessionId: sessionId || void 0,\n\t\t\tagentId: agentId || void 0,\n\t\t\thost\n\t\t});\n\t\treturn {\n\t\t\tdisplay: result.display,\n\t\t\t...result.resumed ? {\n\t\t\t\tresumed: true,\n\t\t\t\thint: \"Inicio de sesión ok. Reintentando…\"\n\t\t\t} : { hint: \"Esperando que completes el inicio de sesión…\" }\n\t\t};\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\n/** Cierra sesión del agente (Copilot también desloguea `gh`) para poder elegir otra cuenta. */\nvar openAgentLogout = /* @__PURE__ */ command(\"unchecked\", async (input) => {\n\ttry {\n\t\tconst result = await openAgentLogout$1({\n\t\t\tsessionId: String(input?.id || \"\").trim() || void 0,\n\t\t\tagentId: String(input?.agentId || \"\").trim() || void 0,\n\t\t\thost: input?.host != null ? String(input.host) : void 0\n\t\t});\n\t\treturn {\n\t\t\t...result,\n\t\t\thint: result.warnings[0] || \"Sesión cerrada. Elegí con qué cuenta iniciar de nuevo.\"\n\t\t};\n\t} catch (err) {\n\t\tfail(err);\n\t}\n});\ninit_remote_functions(agent_remote_exports, \"src/lib/report/agent.remote.ts\", \"wh6t6j\");\nfor (const [name, fn] of Object.entries(agent_remote_exports)) {\n\tfn.__.id = \"wh6t6j/\" + name;\n\tfn.__.name = name;\n}\n//#endregion\nexport { openChat as a, setPermissionTrust as c, cancelAgent as i, agentSession as n, respondPermission as o, agent_remote_exports as r, retryReview as s, acpAgents as t };\n","import { r as agent_remote_exports } from \"./agent.remote.js\";\n//#region \\0sveltekit-remote:wh6t6j\nvar _sveltekit_remote_wh6t6j_default = agent_remote_exports;\n//#endregion\nexport { _sveltekit_remote_wh6t6j_default as default };\n"],"names":[],"mappings":";;;;;;;;;;;;;AAMA;AACA,IAAI,oBAAoB,mBAAmB,WAAW,CAAC;AACvD,CAAC,cAAc,EAAE,MAAM,cAAc;AACrC,CAAC,SAAS,EAAE,MAAM,SAAS;AAC3B,CAAC,YAAY,EAAE,MAAM,YAAY;AACjC,CAAC,YAAY,EAAE,MAAM,YAAY;AACjC,CAAC,WAAW,EAAE,MAAM,WAAW;AAC/B,CAAC,SAAS,EAAE,MAAM,SAAS;AAC3B,CAAC,cAAc,EAAE,MAAM,cAAc;AACrC,CAAC,eAAe,EAAE,MAAM,eAAe;AACvC,CAAC,QAAQ,EAAE,MAAM,QAAQ;AACzB,CAAC,iBAAiB,EAAE,MAAM,iBAAiB;AAC3C,CAAC,WAAW,EAAE,MAAM,WAAW;AAC/B,CAAC,WAAW,EAAE,MAAM,WAAW;AAC/B,CAAC,kBAAkB,EAAE,MAAM,kBAAkB;AAC7C,CAAC,WAAW,EAAE,MAAM;AACpB,CAAC,CAAC;AACF,SAAS,IAAI,CAAC,GAAG,EAAE;AACnB,CAAC,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC;AACjE,CAAC,O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) {
|
|
263
|
+
function git(repo, args, { maxBuffer = 64 * 1024 * 1024, quiet = false } = {}) {
|
|
264
264
|
return execFileSync("git", args, {
|
|
265
265
|
cwd: repo,
|
|
266
266
|
encoding: "utf8",
|
|
267
267
|
maxBuffer,
|
|
268
|
-
windowsHide: true
|
|
268
|
+
windowsHide: true,
|
|
269
|
+
...quiet ? { stdio: [
|
|
270
|
+
"ignore",
|
|
271
|
+
"pipe",
|
|
272
|
+
"ignore"
|
|
273
|
+
] } : {}
|
|
269
274
|
});
|
|
270
275
|
}
|
|
271
276
|
function resolveRev(repo, ref) {
|
|
@@ -326,24 +331,36 @@ function showFileLines(repo, rev, path) {
|
|
|
326
331
|
return lines;
|
|
327
332
|
}
|
|
328
333
|
function listBranches(repo) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
let raw = "";
|
|
335
|
+
try {
|
|
336
|
+
raw = git(repo, [
|
|
337
|
+
"for-each-ref",
|
|
338
|
+
"--sort=-committerdate",
|
|
339
|
+
"--format=%(refname:short)",
|
|
340
|
+
"refs/heads",
|
|
341
|
+
"refs/remotes"
|
|
342
|
+
], { quiet: true });
|
|
343
|
+
} catch {
|
|
344
|
+
throw new Error(`No es un repositorio git usable: ${repo}`);
|
|
345
|
+
}
|
|
346
|
+
const names = raw.split("\n").map((s) => s.trim()).filter(Boolean).map((name) => name.replace(/^origin\//, "")).filter((name) => name !== "HEAD" && !name.endsWith("/HEAD"));
|
|
336
347
|
const unique = [...new Set(names)];
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
348
|
+
let current;
|
|
349
|
+
try {
|
|
350
|
+
current = git(repo, [
|
|
351
|
+
"rev-parse",
|
|
352
|
+
"--abbrev-ref",
|
|
353
|
+
"HEAD"
|
|
354
|
+
], { quiet: true }).trim();
|
|
355
|
+
} catch {
|
|
356
|
+
throw new Error("El repositorio no tiene commits (falta HEAD).");
|
|
357
|
+
}
|
|
342
358
|
const bases = unique.filter((n) => n === "develop" || n === "main" || n === "master");
|
|
359
|
+
const defaultBase = bases.includes("develop") ? "develop" : bases.includes("main") ? "main" : bases[0] || "develop";
|
|
343
360
|
return {
|
|
344
361
|
branches: unique,
|
|
345
362
|
current,
|
|
346
|
-
defaultBase
|
|
363
|
+
defaultBase
|
|
347
364
|
};
|
|
348
365
|
}
|
|
349
366
|
/** URL del remote (origin, o el primero disponible). Vacío si no hay. */
|
|
@@ -389,7 +406,7 @@ function ensureReviewDir(repoRoot) {
|
|
|
389
406
|
if (!existsSync(ignore)) writeFileSync(ignore, "# Generado por diff-review: nada de esta carpeta va al repo.\n*\n");
|
|
390
407
|
return dir;
|
|
391
408
|
}
|
|
392
|
-
/** `diff-rev_a_b.json` → `{ json, diff, session }` dentro de `.diff-review/`. */
|
|
409
|
+
/** `diff-rev_a_b.json` → `{ json, diff, session, chat }` dentro de `.diff-review/`. */
|
|
393
410
|
function companionPaths(repoRoot, filename) {
|
|
394
411
|
const name = basename(String(filename || ""));
|
|
395
412
|
const stem = name.replace(/\.json$/i, "");
|
|
@@ -397,7 +414,9 @@ function companionPaths(repoRoot, filename) {
|
|
|
397
414
|
return {
|
|
398
415
|
json: join(dir, name),
|
|
399
416
|
diff: join(dir, `${stem}.diff`),
|
|
400
|
-
session: join(dir, `${stem}.session.json`)
|
|
417
|
+
session: join(dir, `${stem}.session.json`),
|
|
418
|
+
/** Transcript legible al cambiar de agente (se pisa en cada switch). */
|
|
419
|
+
chat: join(dir, `${stem}.chat.md`)
|
|
401
420
|
};
|
|
402
421
|
}
|
|
403
422
|
/** Dónde está el JSON de la review: `.diff-review/` primero y, si no, la raíz del repo (formato viejo). */
|
|
@@ -452,6 +471,16 @@ function writeSessionRef(repoRoot, filename, ref) {
|
|
|
452
471
|
writeFileSync(companionPaths(repoRoot, filename).session, `${JSON.stringify(full, null, 2)}\n`);
|
|
453
472
|
return full;
|
|
454
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* Guarda (pisa) el transcript legible de handoff junto al JSON.
|
|
476
|
+
* @returns {string} path absoluto del `.chat.md`
|
|
477
|
+
*/
|
|
478
|
+
function writeHandoffChat(repoRoot, filename, text) {
|
|
479
|
+
ensureReviewDir(repoRoot);
|
|
480
|
+
const { chat } = companionPaths(repoRoot, filename);
|
|
481
|
+
writeFileSync(chat, String(text ?? ""));
|
|
482
|
+
return chat;
|
|
483
|
+
}
|
|
455
484
|
//#endregion
|
|
456
485
|
//#region ../lib/extract.mjs
|
|
457
486
|
/**
|
|
@@ -827,6 +856,11 @@ var SKIP_REASONS = [
|
|
|
827
856
|
"trivial",
|
|
828
857
|
"ignored"
|
|
829
858
|
];
|
|
859
|
+
var FINDING_RESOLUTION_KINDS = [
|
|
860
|
+
"ignored",
|
|
861
|
+
"fix",
|
|
862
|
+
"corrected"
|
|
863
|
+
];
|
|
830
864
|
/** Lo que tiene que devolver el modelo en un turno. El resto lo agrega el pipeline. */
|
|
831
865
|
var REVIEW_SCHEMA = {
|
|
832
866
|
type: "object",
|
|
@@ -969,7 +1003,19 @@ var REVIEW_SCHEMA = {
|
|
|
969
1003
|
type: "string",
|
|
970
1004
|
minLength: 1
|
|
971
1005
|
},
|
|
972
|
-
fix: { type: "string" }
|
|
1006
|
+
fix: { type: "string" },
|
|
1007
|
+
resolution: {
|
|
1008
|
+
type: "object",
|
|
1009
|
+
required: ["kind"],
|
|
1010
|
+
additionalProperties: true,
|
|
1011
|
+
properties: {
|
|
1012
|
+
kind: {
|
|
1013
|
+
type: "string",
|
|
1014
|
+
enum: FINDING_RESOLUTION_KINDS
|
|
1015
|
+
},
|
|
1016
|
+
detail: { type: "string" }
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
973
1019
|
}
|
|
974
1020
|
}
|
|
975
1021
|
},
|
|
@@ -1038,7 +1084,7 @@ function reviewIssues(payload, knownPaths = []) {
|
|
|
1038
1084
|
const meta = payload?.meta && typeof payload.meta === "object" ? payload.meta : {};
|
|
1039
1085
|
const agentName = typeof meta.agent === "string" ? meta.agent.trim() : "";
|
|
1040
1086
|
const modelId = typeof meta.model === "string" ? meta.model.trim() : "";
|
|
1041
|
-
if (!agentName || agentName.startsWith("<")) errors.push("meta.agent es obligatorio: nombre del producto (Claude Code, Cursor,
|
|
1087
|
+
if (!agentName || agentName.startsWith("<")) errors.push("meta.agent es obligatorio: nombre del producto (Claude Code, Cursor, Copilot, …), sin placeholder");
|
|
1042
1088
|
if (!modelId || modelId.startsWith("<")) errors.push("meta.model es obligatorio: id exacto del modelo, sin placeholder");
|
|
1043
1089
|
const groups = Array.isArray(payload?.groups) ? payload.groups : [];
|
|
1044
1090
|
const blocks = Array.isArray(payload?.blocks) ? payload.blocks : [];
|
|
@@ -1069,5 +1115,5 @@ function reviewIssues(payload, knownPaths = []) {
|
|
|
1069
1115
|
return errors;
|
|
1070
1116
|
}
|
|
1071
1117
|
|
|
1072
|
-
export {
|
|
1073
|
-
//# sourceMappingURL=validate-
|
|
1118
|
+
export { reviewIssues as A, BLOCK_OPS as B, globMatch as C, writeDiffText as D, writeHandoffChat as E, FINDING_RESOLUTION_KINDS as F, GROUP_KINDS as G, OUTPUT_DIR as O, REVIEW_SCHEMA as R, SKIP_REASONS as S, WHY_SOURCES as W, assertGitRepo as a, branchTips as b, companionPaths as c, decodePayload as d, ensureReviewDir as e, loadBranchDiff as f, git as g, FINDING_CLASSES as h, isOutputFilename as i, FINDING_SEVERITIES as j, FINDING_KINDS as k, locateReviewFile as l, makeOutputFilename as m, fingerprint as n, listBranches as o, getRemoteUrl as p, readDiffCache as q, reviewDir as r, showFileLines as s, tryResolveGitRoot as t, extractBranchDiff as u, loadReviewConfig as v, writeDiffCache as w, outputRelPath as x, writeSessionRef as y, validateAgainst as z };
|
|
1119
|
+
//# sourceMappingURL=validate-CXjTRGnR.js.map
|