@shrkcrft/inspector 0.1.0-alpha.2 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-brief.d.ts.map +1 -1
- package/dist/agent-brief.js +59 -10
- package/dist/agent-contract-gate.d.ts.map +1 -1
- package/dist/agent-contract-gate.js +25 -2
- package/dist/agent-instructions.d.ts.map +1 -1
- package/dist/agent-instructions.js +11 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +1 -3
- package/dist/ai-readiness.d.ts +84 -9
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +181 -35
- package/dist/apply-dispatch-trace.d.ts +1 -2
- package/dist/apply-dispatch-trace.d.ts.map +1 -1
- package/dist/apply-dispatch-trace.js +0 -9
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +4 -6
- package/dist/area-map.d.ts +0 -5
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +0 -10
- package/dist/changed-preflight.d.ts +7 -0
- package/dist/changed-preflight.d.ts.map +1 -1
- package/dist/changed-preflight.js +56 -9
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +20 -6
- package/dist/check-guardrail-globs.d.ts +16 -0
- package/dist/check-guardrail-globs.d.ts.map +1 -0
- package/dist/check-guardrail-globs.js +38 -0
- package/dist/code-intelligence-doctor.d.ts +21 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -0
- package/dist/code-intelligence-doctor.js +985 -0
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +23 -0
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-adoption-diff.d.ts.map +1 -1
- package/dist/construct-adoption-diff.js +2 -1
- package/dist/construct-adoption.d.ts.map +1 -1
- package/dist/construct-adoption.js +10 -11
- package/dist/construct-inference.d.ts.map +1 -1
- package/dist/construct-inference.js +5 -2
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +2 -10
- package/dist/contract-file-rule.d.ts +8 -0
- package/dist/contract-file-rule.d.ts.map +1 -1
- package/dist/contract-file-rule.js +8 -3
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +2 -10
- package/dist/contradictions.d.ts +8 -1
- package/dist/contradictions.d.ts.map +1 -1
- package/dist/contradictions.js +37 -35
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +2 -10
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +14 -1
- package/dist/dashboard/dashboard-knowledge.d.ts +8 -0
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -0
- package/dist/dashboard/dashboard-knowledge.js +259 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +5 -10
- package/dist/delegate-catalog.d.ts +45 -0
- package/dist/delegate-catalog.d.ts.map +1 -0
- package/dist/delegate-catalog.js +50 -0
- package/dist/delegate-doctor.d.ts +15 -0
- package/dist/delegate-doctor.d.ts.map +1 -0
- package/dist/delegate-doctor.js +36 -0
- package/dist/delegate-pack-recipes.d.ts +29 -0
- package/dist/delegate-pack-recipes.d.ts.map +1 -0
- package/dist/delegate-pack-recipes.js +77 -0
- package/dist/demo-script.d.ts +0 -1
- package/dist/demo-script.d.ts.map +1 -1
- package/dist/demo-script.js +0 -43
- package/dist/docs-check.js +1 -1
- package/dist/drift-baseline.d.ts.map +1 -1
- package/dist/drift-baseline.js +5 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +2 -16
- package/dist/git-helpers.d.ts +15 -0
- package/dist/git-helpers.d.ts.map +1 -1
- package/dist/git-helpers.js +51 -4
- package/dist/helper-registry.d.ts +27 -54
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +16 -517
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +14 -7
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/ingest-drafts.js +8 -4
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +2 -10
- package/dist/monorepo-onboarding.js +2 -2
- package/dist/onboarding-report.d.ts.map +1 -1
- package/dist/onboarding-report.js +5 -1
- package/dist/onboarding.d.ts +1 -1
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +9 -66
- package/dist/ownership.js +2 -10
- package/dist/pack-contributions-inventory.d.ts +0 -1
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +17 -29
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +2 -10
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +4 -11
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +18 -2
- package/dist/pack-test-runner.js +2 -10
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +5 -10
- package/dist/plan-simulation.d.ts +13 -0
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +19 -28
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +2 -10
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +3 -11
- package/dist/policy-test.js +3 -11
- package/dist/profile-registry.d.ts +0 -1
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +4 -32
- package/dist/propose-knowledge.d.ts +15 -0
- package/dist/propose-knowledge.d.ts.map +1 -1
- package/dist/propose-knowledge.js +37 -4
- package/dist/quality-baseline.d.ts.map +1 -1
- package/dist/quality-baseline.js +3 -1
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +3 -9
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +2 -10
- package/dist/registry-lifecycle.d.ts +6 -0
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +137 -10
- package/dist/release-readiness.js +3 -3
- package/dist/repo-memory.d.ts.map +1 -1
- package/dist/repo-memory.js +3 -1
- package/dist/reposet.js +1 -1
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +7 -2
- package/dist/repository-knowledge-model.d.ts +1 -1
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-stats.d.ts.map +1 -1
- package/dist/repository-stats.js +3 -1
- package/dist/resolve-verification-commands.d.ts +26 -0
- package/dist/resolve-verification-commands.d.ts.map +1 -0
- package/dist/resolve-verification-commands.js +55 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +14 -17
- package/dist/rule-drift.d.ts.map +1 -1
- package/dist/rule-drift.js +24 -9
- package/dist/rule-scaffold.d.ts.map +1 -1
- package/dist/rule-scaffold.js +12 -4
- package/dist/scaffold-patterns.js +2 -10
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +3 -1
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +2 -10
- package/dist/self-config-doctor-v2.d.ts +1 -1
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +6 -10
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +7 -13
- package/dist/sharkcraft-inspector.d.ts +14 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +103 -1
- package/dist/start-here.d.ts +2 -2
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +16 -1
- package/dist/synthesize-from-onboarding.d.ts +68 -0
- package/dist/synthesize-from-onboarding.d.ts.map +1 -0
- package/dist/synthesize-from-onboarding.js +508 -0
- package/dist/task-packet.d.ts +13 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +59 -6
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +1 -31
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +2 -10
- package/dist/template-drift.d.ts +7 -0
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +14 -6
- package/dist/test-impact.d.ts.map +1 -1
- package/dist/test-impact.js +5 -2
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +12 -17
- package/dist/universal-search.d.ts +0 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +0 -12
- package/dist/why-file.js +66 -22
- package/package.json +18 -18
- package/dist/plugin-lifecycle-profile-registry.d.ts +0 -52
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +0 -1
- package/dist/plugin-lifecycle-profile-registry.js +0 -202
- package/dist/plugin-lifecycle.d.ts +0 -132
- package/dist/plugin-lifecycle.d.ts.map +0 -1
- package/dist/plugin-lifecycle.js +0 -477
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift-baseline.d.ts","sourceRoot":"","sources":["../src/drift-baseline.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,yCAAyC,CAAC;IAClD,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AAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,MAAM,GACd,cAAc,CAehB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAOrE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,qBAAqB,EACjC,YAAY,EAAE,MAAM,GACnB,wBAAwB,GAAG,IAAI,CAwBjC"}
|
package/dist/drift-baseline.js
CHANGED
|
@@ -35,7 +35,10 @@ export function createDriftBaseline(inspection, outFile) {
|
|
|
35
35
|
const baseline = {
|
|
36
36
|
schema: DRIFT_BASELINE_SCHEMA,
|
|
37
37
|
createdAt: nowIso(),
|
|
38
|
-
|
|
38
|
+
// Store only the repo basename, not the absolute path — baselines are
|
|
39
|
+
// committed to version control and absolute paths leak the author's
|
|
40
|
+
// filesystem layout into the public repo.
|
|
41
|
+
projectRoot: nodePath.basename(inspection.projectRoot),
|
|
39
42
|
findings,
|
|
40
43
|
};
|
|
41
44
|
mkdirSync(nodePath.dirname(outFile), { recursive: true });
|
|
@@ -70,7 +73,7 @@ export function compareDriftBaseline(inspection, baselineFile) {
|
|
|
70
73
|
current: {
|
|
71
74
|
schema: DRIFT_BASELINE_SCHEMA,
|
|
72
75
|
createdAt: nowIso(),
|
|
73
|
-
projectRoot: inspection.projectRoot,
|
|
76
|
+
projectRoot: nodePath.basename(inspection.projectRoot),
|
|
74
77
|
findings: currentList,
|
|
75
78
|
},
|
|
76
79
|
existing,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-ingestion.d.ts","sourceRoot":"","sources":["../src/feedback-ingestion.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,SAAS,eAAe;IACxB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,IAAI,SAAS;IACb,KAAK,UAAU;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AAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAEnE;AAqMD,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CAClC;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAiDjB;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAIjB;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,SAAS;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE;gBAAE,aAAa,CAAC,EAAE,OAAO,CAAA;aAAE,GAAG,IAAI,CAAA;SAAE,EAAE,CAAA;KAAE,CAAC;CAC5G,GAAG,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAuBpC;AAYD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAmCrE"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
-
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
-
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
-
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
return path;
|
|
8
|
-
};
|
|
9
1
|
/**
|
|
10
2
|
* Feedback ingestion.
|
|
11
3
|
*
|
|
@@ -21,8 +13,8 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
21
13
|
* Schema: sharkcraft.feedback-ingestion/v1
|
|
22
14
|
*/
|
|
23
15
|
import { existsSync, readFileSync } from 'node:fs';
|
|
24
|
-
import { pathToFileURL } from 'node:url';
|
|
25
16
|
import * as nodePath from 'node:path';
|
|
17
|
+
import { importModuleViaLoader } from '@shrkcrft/core';
|
|
26
18
|
export const FEEDBACK_INGESTION_SCHEMA = 'sharkcraft.feedback-ingestion/v1';
|
|
27
19
|
export var FeedbackBucket;
|
|
28
20
|
(function (FeedbackBucket) {
|
|
@@ -151,12 +143,6 @@ const KEYWORD_RULES = [
|
|
|
151
143
|
targetArea: 'mcp',
|
|
152
144
|
suggestedCommands: ['shrk commands list --filter mcp'],
|
|
153
145
|
},
|
|
154
|
-
{
|
|
155
|
-
pattern: /\b(plugin)\b/i,
|
|
156
|
-
tags: ['plugin'],
|
|
157
|
-
targetArea: 'plugin-lifecycle',
|
|
158
|
-
suggestedCommands: ['shrk plugin lifecycle list', 'shrk plugin rename <old> <new>'],
|
|
159
|
-
},
|
|
160
146
|
{
|
|
161
147
|
pattern: /\b(helper[s]?)\b/i,
|
|
162
148
|
tags: ['helpers'],
|
|
@@ -349,7 +335,7 @@ async function importDefaultArray(absPath) {
|
|
|
349
335
|
try {
|
|
350
336
|
if (!existsSync(absPath))
|
|
351
337
|
return [];
|
|
352
|
-
const mod = (await
|
|
338
|
+
const mod = (await importModuleViaLoader(absPath));
|
|
353
339
|
return Array.isArray(mod.default) ? mod.default : [];
|
|
354
340
|
}
|
|
355
341
|
catch {
|
package/dist/git-helpers.d.ts
CHANGED
|
@@ -22,5 +22,20 @@ export declare function getGitRoot(cwd: string): string | null;
|
|
|
22
22
|
export declare function getGitBranch(cwd: string): string | null;
|
|
23
23
|
export declare function getChangedFiles(cwd: string, opts?: IGitChangedOptions): string[];
|
|
24
24
|
export declare function getStatusSummary(cwd: string): IGitStatusSummary;
|
|
25
|
+
export interface ICommitInfo {
|
|
26
|
+
readonly hash: string;
|
|
27
|
+
readonly shortHash: string;
|
|
28
|
+
readonly subject: string;
|
|
29
|
+
readonly files: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Commit subjects (and the files each touched) in the range `<since>..HEAD`,
|
|
33
|
+
* newest first. Deterministic (git only; no model). Returns [] outside a git
|
|
34
|
+
* repo or on any git error. Used by `knowledge propose` to annotate drafted
|
|
35
|
+
* entries with the commit that surfaced them ("why this entry now").
|
|
36
|
+
*/
|
|
37
|
+
export declare function getCommitSubjects(cwd: string, opts: {
|
|
38
|
+
since: string;
|
|
39
|
+
}): ICommitInfo[];
|
|
25
40
|
export declare function parseLines(text: string): string[];
|
|
26
41
|
//# sourceMappingURL=git-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-helpers.d.ts","sourceRoot":"","sources":["../src/git-helpers.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,K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AED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAyC/D;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,EAAE,CA6BrF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAKjD"}
|
package/dist/git-helpers.js
CHANGED
|
@@ -41,12 +41,18 @@ export function getChangedFiles(cwd, opts = {}) {
|
|
|
41
41
|
const set = new Set(parseLines(a.stdout));
|
|
42
42
|
if (opts.includeWorktree && !opts.staged && !opts.since) {
|
|
43
43
|
// Include untracked + working-tree changes via `git status --porcelain`.
|
|
44
|
-
|
|
44
|
+
// `-uall` expands untracked directories to individual files (default
|
|
45
|
+
// `--porcelain` collapses them to a single `dir/` entry, which undercounts);
|
|
46
|
+
// `.gitignore` is still honored.
|
|
47
|
+
const s = runGit(cwd, ['status', '--porcelain', '-uall']);
|
|
45
48
|
if (s.ok) {
|
|
46
49
|
for (const line of s.stdout.split('\n')) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
// Strip the two-char XY status + leading space, then take the new path
|
|
51
|
+
// for rename/copy entries (`R old -> new`).
|
|
52
|
+
const raw = line.slice(3).trim();
|
|
53
|
+
const path = raw.includes(' -> ') ? raw.slice(raw.indexOf(' -> ') + 4).trim() : raw;
|
|
54
|
+
if (path)
|
|
55
|
+
set.add(path);
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
}
|
|
@@ -102,6 +108,47 @@ export function getStatusSummary(cwd) {
|
|
|
102
108
|
out.staged === 0 && out.modified === 0 && out.untracked === 0 && out.conflicts === 0;
|
|
103
109
|
return out;
|
|
104
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Commit subjects (and the files each touched) in the range `<since>..HEAD`,
|
|
113
|
+
* newest first. Deterministic (git only; no model). Returns [] outside a git
|
|
114
|
+
* repo or on any git error. Used by `knowledge propose` to annotate drafted
|
|
115
|
+
* entries with the commit that surfaced them ("why this entry now").
|
|
116
|
+
*/
|
|
117
|
+
export function getCommitSubjects(cwd, opts) {
|
|
118
|
+
if (!isGitRepo(cwd))
|
|
119
|
+
return [];
|
|
120
|
+
const range = `${opts.since}..HEAD`;
|
|
121
|
+
// NUL-delimited records: \0<hash>\t<subject> then one file path per line.
|
|
122
|
+
const r = runGit(cwd, [
|
|
123
|
+
'log',
|
|
124
|
+
'--no-merges',
|
|
125
|
+
'--name-only',
|
|
126
|
+
'--pretty=format:%x00%H%x09%s',
|
|
127
|
+
range,
|
|
128
|
+
]);
|
|
129
|
+
if (!r.ok)
|
|
130
|
+
return [];
|
|
131
|
+
const out = [];
|
|
132
|
+
for (const chunk of r.stdout.split('\0')) {
|
|
133
|
+
if (!chunk.trim())
|
|
134
|
+
continue;
|
|
135
|
+
const lines = chunk.split('\n');
|
|
136
|
+
const header = lines[0] ?? '';
|
|
137
|
+
const tab = header.indexOf('\t');
|
|
138
|
+
if (tab < 0)
|
|
139
|
+
continue;
|
|
140
|
+
const hash = header.slice(0, tab).trim();
|
|
141
|
+
if (!hash)
|
|
142
|
+
continue;
|
|
143
|
+
const subject = header.slice(tab + 1).trim();
|
|
144
|
+
const files = lines
|
|
145
|
+
.slice(1)
|
|
146
|
+
.map((l) => l.trim())
|
|
147
|
+
.filter((l) => l.length > 0);
|
|
148
|
+
out.push({ hash, shortHash: hash.slice(0, 8), subject, files });
|
|
149
|
+
}
|
|
150
|
+
return out;
|
|
151
|
+
}
|
|
105
152
|
export function parseLines(text) {
|
|
106
153
|
return text
|
|
107
154
|
.split('\n')
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Helper plan generators
|
|
2
|
+
* Helper plan generators.
|
|
3
3
|
*
|
|
4
4
|
* Helpers are one-shot plan-v2 producers for small, well-bounded edits.
|
|
5
|
-
*
|
|
5
|
+
* Dry-run by default and idempotent where the plan engine supports it.
|
|
6
6
|
*
|
|
7
|
-
* No helper writes source directly. The output is a structured
|
|
8
|
-
* containing planned ops (using the existing plan-v2
|
|
9
|
-
* list of advisory conflicts
|
|
7
|
+
* No helper writes source directly. The output is a structured
|
|
8
|
+
* `IHelperPlan` containing planned ops (using the existing plan-v2
|
|
9
|
+
* operation set) and a list of advisory conflicts.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Project-specific helpers contributed by packs travel in pack-contributed
|
|
14
|
-
* playbooks/scaffolds; the engine just provides the generic shapes.
|
|
11
|
+
* The engine ships zero built-in helpers. Helpers come from pack
|
|
12
|
+
* contributions when needed.
|
|
15
13
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
AddBarrelExport = "core.add-barrel-export",
|
|
22
|
-
RemoveBarrelExport = "core.remove-barrel-export",
|
|
23
|
-
AddEventEntry = "core.add-event-entry",
|
|
24
|
-
RemoveEventEntry = "core.remove-event-entry",
|
|
25
|
-
AddDefaultRegistration = "core.add-default-registration",
|
|
26
|
-
RemoveDefaultRegistration = "core.remove-default-registration",
|
|
27
|
-
AddComposerEntry = "core.add-composer-entry",
|
|
28
|
-
RemoveComposerEntry = "core.remove-composer-entry",
|
|
29
|
-
RenamePluginFolder = "core.rename-plugin-folder",
|
|
30
|
-
RemoveUserPluginEntry = "core.remove-user-plugin-entry"
|
|
31
|
-
}
|
|
14
|
+
/**
|
|
15
|
+
* Helper ids are free-form strings — the engine ships zero built-in
|
|
16
|
+
* helpers. Pack contributions register their own ids.
|
|
17
|
+
*/
|
|
18
|
+
export type HelperId = string;
|
|
32
19
|
export interface IHelperDefinition {
|
|
33
20
|
id: HelperId;
|
|
34
21
|
description: string;
|
|
@@ -43,48 +30,34 @@ export interface IHelperDefinition {
|
|
|
43
30
|
}
|
|
44
31
|
export declare const HELPERS: ReadonlyArray<IHelperDefinition>;
|
|
45
32
|
export interface IHelperPlanOp {
|
|
33
|
+
kind: 'append' | 'insert-after' | 'insert-before' | 'create' | 'replace';
|
|
46
34
|
targetPath: string;
|
|
47
|
-
|
|
35
|
+
snippet?: string;
|
|
36
|
+
anchor?: string;
|
|
37
|
+
fromPattern?: string;
|
|
48
38
|
}
|
|
49
39
|
export interface IHelperPlan {
|
|
50
40
|
schema: 'sharkcraft.helper-plan/v1';
|
|
51
41
|
helperId: HelperId;
|
|
52
|
-
|
|
53
|
-
ops:
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
generatedAt: string;
|
|
43
|
+
ops: readonly IHelperPlanOp[];
|
|
44
|
+
conflicts: readonly string[];
|
|
45
|
+
manualSteps: ReadonlyArray<{
|
|
46
|
+
kind: string;
|
|
47
|
+
description: string;
|
|
48
|
+
}>;
|
|
56
49
|
destructive: boolean;
|
|
57
|
-
|
|
50
|
+
requiresHumanReview: boolean;
|
|
58
51
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Convert a helper plan into a saved plan (synthetic templateId) so
|
|
61
|
-
* it flows through `shrk apply`. Helper ops are persisted as v2 operation
|
|
62
|
-
* intents; the apply path evaluates them against the live file system.
|
|
63
|
-
* Unsigned by default; call `signPlan` separately when desired.
|
|
64
|
-
*/
|
|
65
52
|
export declare const HELPER_SYNTHETIC_TEMPLATE = "__helper__";
|
|
66
|
-
export declare function helperPlanToSavedPlan(plan: IHelperPlan, projectRoot: string): {
|
|
67
|
-
schema: 'sharkcraft.plan/v2';
|
|
68
|
-
templateId: string;
|
|
69
|
-
variables: Record<string, string>;
|
|
70
|
-
projectRoot: string;
|
|
71
|
-
createdAt: string;
|
|
72
|
-
expectedChanges: {
|
|
73
|
-
type: string;
|
|
74
|
-
relativePath: string;
|
|
75
|
-
sizeBytes: number;
|
|
76
|
-
operation: Record<string, unknown>;
|
|
77
|
-
}[];
|
|
78
|
-
note?: string;
|
|
79
|
-
};
|
|
80
53
|
interface IHelperBuildInput {
|
|
81
54
|
helperId: HelperId;
|
|
82
55
|
projectRoot: string;
|
|
83
56
|
vars: Record<string, string>;
|
|
84
|
-
|
|
85
|
-
profile?: IPluginLifecycleProfile;
|
|
57
|
+
profile?: unknown;
|
|
86
58
|
}
|
|
87
|
-
export declare function buildHelperPlan(
|
|
59
|
+
export declare function buildHelperPlan(_input: IHelperBuildInput): IHelperPlan;
|
|
60
|
+
export declare function helperPlanToSavedPlan(plan: IHelperPlan, _projectRoot: string): unknown;
|
|
88
61
|
export declare function renderHelperPlanText(plan: IHelperPlan): string;
|
|
89
62
|
export {};
|
|
90
63
|
//# sourceMappingURL=helper-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-registry.d.ts","sourceRoot":"","sources":["../src/helper-registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"helper-registry.d.ts","sourceRoot":"","sources":["../src/helper-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,QAAQ,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpF;AAED,eAAO,MAAM,OAAO,EA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