@feng0531/dsh-code-review 0.82.3 → 0.83.1
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/RELEASE-NOTES.md +8 -7
- package/index.mjs +11 -12
- package/package.json +1 -1
- package/src/background-review.mjs +84 -11
- package/src/business-groups.mjs +1 -1
- package/src/class-bindings.mjs +45 -12
- package/src/defect-guidance.mjs +158 -16
- package/src/dsh-model.mjs +107 -15
- package/src/git-history.mjs +202 -56
- package/src/git.mjs +64 -34
- package/src/import-bindings.mjs +74 -65
- package/src/job-progress.mjs +21 -0
- package/src/model-contract.mjs +17 -1
- package/src/primary-input.mjs +85 -26
- package/src/project-report.mjs +22 -5
- package/src/project-review-service.mjs +177 -37
- package/src/project-snapshot.mjs +101 -40
- package/src/prompts.mjs +9 -0
- package/src/protocol-guidance.mjs +13 -1
- package/src/recovery-coverage.mjs +25 -1
- package/src/retrieval-loop.mjs +66 -28
- package/src/review-jobs.mjs +6 -4
- package/src/review.mjs +36 -33
- package/src/risk-plan.mjs +1 -1
- package/src/service.mjs +136 -5
- package/src/snapshot-reader.mjs +18 -5
- package/src/snapshot.mjs +69 -42
- package/src/svn-capture-budget.mjs +22 -5
- package/src/svn-effective-mergeinfo.mjs +59 -37
- package/src/svn-eol-mapping.mjs +22 -10
- package/src/svn-history-endpoints.mjs +18 -12
- package/src/svn-history-lookup.mjs +34 -26
- package/src/svn-keyword-config.mjs +11 -8
- package/src/svn-keyword-mapping.mjs +67 -36
- package/src/svn-mergeinfo.mjs +34 -22
- package/src/svn-navigation-budget.mjs +15 -4
- package/src/svn-special.mjs +13 -8
- package/src/svn-url.mjs +18 -6
- package/src/svn-working-identity.mjs +22 -8
- package/src/svn-working-scope.mjs +16 -5
- package/src/tool-view.mjs +5 -0
- package/src/verification-loop.mjs +2 -1
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import {hash} from './content.mjs';
|
|
2
|
-
import {sameSvnUrl,canonicalSvnUrl} from './svn-url.mjs';
|
|
3
|
-
export function svnWorkingIdentity(node,rootInfo,name){
|
|
4
|
-
const expected=name==='.'?rootInfo.url:rootInfo.url.replace(/\/$/,'')+'/'+name.split('/').map(encodeURIComponent).join('/');
|
|
1
|
+
import { hash } from './content.mjs';
|
|
2
|
+
import { sameSvnUrl, canonicalSvnUrl } from './svn-url.mjs';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export function svnWorkingIdentity(node, rootInfo, name) {
|
|
5
|
+
const expected = name === '.'
|
|
6
|
+
? rootInfo.url
|
|
7
|
+
: rootInfo.url.replace(/\/$/, '') + '/' + name.split('/').map(encodeURIComponent).join('/');
|
|
8
|
+
|
|
9
|
+
if (!sameSvnUrl(node?.url, expected)) throw Object.assign(new Error('SVN node URL differs from selected working-copy path; switched ancestors are unsupported'), { code: 'SVN_SWITCHED_ANCESTOR' });
|
|
10
|
+
if (!rootInfo.repository?.uuid || node.repository?.uuid !== rootInfo.repository.uuid || node.repository?.root !== rootInfo.repository.root || node['wc-info']?.['wcroot-abspath'] !== rootInfo['wc-info']?.['wcroot-abspath']) throw Object.assign(new Error('SVN node repository or working-copy identity mismatch'), { code: 'SVN_NODE_IDENTITY' });
|
|
11
|
+
|
|
12
|
+
const source = {
|
|
13
|
+
url: canonicalSvnUrl(node.url),
|
|
14
|
+
repositoryUuid: node.repository.uuid,
|
|
15
|
+
repositoryRoot: node.repository.root,
|
|
16
|
+
revision: String(node['@_revision']),
|
|
17
|
+
kind: node['@_kind'],
|
|
18
|
+
...(node['@_kind'] === 'dir' ? { depth: node['wc-info']?.depth ?? null } : {}),
|
|
19
|
+
schedule: node['wc-info']?.schedule,
|
|
20
|
+
copyFromUrl: node['wc-info']?.['copy-from-url'] ?? null,
|
|
21
|
+
copyFromRevision: node['wc-info']?.['copy-from-rev'] ?? null,
|
|
22
|
+
};
|
|
23
|
+
return { source, fingerprint: hash(JSON.stringify(source)) };
|
|
10
24
|
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
// Describes observed evidence only; never infers a complete working tree from status.
|
|
2
|
-
export function workingScopeEvidence(rootSource,files){
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function workingScopeEvidence(rootSource, files) {
|
|
3
|
+
const revisions = [...new Set(files
|
|
4
|
+
.filter(f => f.eligibility === 'reviewable' && f.workingSource && /^[0-9]+$/.test(f.workingSource.revision))
|
|
5
|
+
.map(f => f.workingSource.revision))].sort((a, b) => Number(a) - Number(b));
|
|
6
|
+
const sparse = files
|
|
7
|
+
.filter(f => f.workingSource?.kind === 'dir' && f.workingSource.depth !== 'infinity')
|
|
8
|
+
.map(f => ({ path: f.path, depth: f.workingSource.depth ?? 'unknown' }));
|
|
9
|
+
if (rootSource.depth !== 'infinity' && !sparse.some(s => s.path === '.')) sparse.unshift({ path: '.', depth: rootSource.depth ?? 'unknown' });
|
|
10
|
+
return {
|
|
11
|
+
root: rootSource,
|
|
12
|
+
observedBaseRevisions: revisions,
|
|
13
|
+
mixedObservedRevisions: revisions.length > 1,
|
|
14
|
+
sparseDirectories: sparse,
|
|
15
|
+
inventoryComplete: false,
|
|
16
|
+
notice: 'Only selected/observed change metadata is described. Mixed revisions bind each node BASE independently, not a common historical tree. Sparse or unenumerated paths are not deletion evidence or reviewed coverage; no update/deepen/external traversal was performed.',
|
|
17
|
+
};
|
|
7
18
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Shared tool output schema + renderer for the JSON+Markdown review tools.
|
|
2
|
+
export const reviewToolOutput = {
|
|
3
|
+
schema: { type: 'object', additionalProperties: false, properties: { json: { type: 'string' }, markdown: { type: 'string' } }, required: ['json', 'markdown'] },
|
|
4
|
+
render: (_args, value) => [{ type: 'text', text: value.markdown || value.json }],
|
|
5
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { VERIFICATION_INSTRUCTIONS } from './prompts.mjs';
|
|
1
2
|
import { CONTEXT_SIDE_NOTICE } from './context-identity.mjs';
|
|
2
3
|
import { defectGuidance } from './defect-guidance.mjs';
|
|
3
4
|
import { createEvidenceReceipts } from './evidence-receipts.mjs';
|
|
4
5
|
import { retrievalLoop } from './retrieval-loop.mjs';
|
|
5
6
|
import { validateCandidateVerification } from './candidate-verification.mjs';
|
|
6
7
|
|
|
7
|
-
export
|
|
8
|
+
export { VERIFICATION_INSTRUCTIONS };
|
|
8
9
|
|
|
9
10
|
// Caller must supply the approved scope, shared beforeCall counter and the
|
|
10
11
|
// SAME enclosing timeout signal used for candidate generation. No new timer.
|