@wrongstack/plugins 0.284.0 → 0.285.0
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 +18 -14
- package/dist/accessibility-auditor/index.d.ts +38 -0
- package/dist/accessibility-auditor/index.d.ts.map +1 -0
- package/dist/accessibility-auditor.d.ts +2 -40
- package/dist/accessibility-auditor.js +5 -5
- package/dist/agent-handoff/index.d.ts +35 -0
- package/dist/agent-handoff/index.d.ts.map +1 -0
- package/dist/agent-handoff.d.ts +2 -37
- package/dist/agent-handoff.js +3 -2
- package/dist/api-compatibility-gate/index.d.ts +36 -0
- package/dist/api-compatibility-gate/index.d.ts.map +1 -0
- package/dist/api-compatibility-gate.d.ts +2 -38
- package/dist/api-compatibility-gate.js +6 -6
- package/dist/auto-doc/index.d.ts +20 -0
- package/dist/auto-doc/index.d.ts.map +1 -0
- package/dist/auto-doc.d.ts +2 -22
- package/dist/auto-doc.js +5 -5
- package/dist/auto-escalate/index.d.ts +43 -0
- package/dist/auto-escalate/index.d.ts.map +1 -0
- package/dist/auto-escalate.d.ts +2 -45
- package/dist/auto-escalate.js +5 -2
- package/dist/auto-i18n-extractor/index.d.ts +34 -0
- package/dist/auto-i18n-extractor/index.d.ts.map +1 -0
- package/dist/auto-i18n-extractor.d.ts +2 -36
- package/dist/auto-i18n-extractor.js +5 -5
- package/dist/branch-guard/index.d.ts +32 -0
- package/dist/branch-guard/index.d.ts.map +1 -0
- package/dist/branch-guard.d.ts +2 -34
- package/dist/branch-guard.js +4 -4
- package/dist/catalog.d.ts +39 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/changelog-writer/index.d.ts +71 -0
- package/dist/changelog-writer/index.d.ts.map +1 -0
- package/dist/changelog-writer.d.ts +2 -73
- package/dist/changelog-writer.js +9 -5
- package/dist/checkpoint/index.d.ts +53 -0
- package/dist/checkpoint/index.d.ts.map +1 -0
- package/dist/checkpoint.d.ts +2 -55
- package/dist/checkpoint.js +6 -6
- package/dist/code-metrics/index.d.ts +29 -0
- package/dist/code-metrics/index.d.ts.map +1 -0
- package/dist/code-metrics.d.ts +2 -31
- package/dist/code-metrics.js +5 -5
- package/dist/commit-validator/index.d.ts +31 -0
- package/dist/commit-validator/index.d.ts.map +1 -0
- package/dist/commit-validator.d.ts +2 -33
- package/dist/commit-validator.js +5 -3
- package/dist/config-validator/index.d.ts +46 -0
- package/dist/config-validator/index.d.ts.map +1 -0
- package/dist/config-validator.d.ts +2 -48
- package/dist/config-validator.js +8 -4
- package/dist/context-pins/index.d.ts +43 -0
- package/dist/context-pins/index.d.ts.map +1 -0
- package/dist/context-pins.d.ts +2 -45
- package/dist/context-pins.js +5 -5
- package/dist/cost-tracker/index.d.ts +51 -0
- package/dist/cost-tracker/index.d.ts.map +1 -0
- package/dist/cost-tracker.d.ts +2 -53
- package/dist/cost-tracker.js +4 -4
- package/dist/cron/index.d.ts +12 -0
- package/dist/cron/index.d.ts.map +1 -0
- package/dist/cron.d.ts +2 -14
- package/dist/cron.js +3 -2
- package/dist/dead-code-detector/index.d.ts +32 -0
- package/dist/dead-code-detector/index.d.ts.map +1 -0
- package/dist/dead-code-detector.d.ts +2 -34
- package/dist/dead-code-detector.js +5 -5
- package/dist/dep-guard/index.d.ts +63 -0
- package/dist/dep-guard/index.d.ts.map +1 -0
- package/dist/dep-guard.d.ts +2 -65
- package/dist/dep-guard.js +6 -2
- package/dist/dependency-vulnerability-gate/index.d.ts +33 -0
- package/dist/dependency-vulnerability-gate/index.d.ts.map +1 -0
- package/dist/dependency-vulnerability-gate.d.ts +2 -35
- package/dist/dependency-vulnerability-gate.js +5 -5
- package/dist/diff-summary/index.d.ts +34 -0
- package/dist/diff-summary/index.d.ts.map +1 -0
- package/dist/diff-summary.d.ts +2 -36
- package/dist/diff-summary.js +5 -5
- package/dist/doc-sync-guard/index.d.ts +31 -0
- package/dist/doc-sync-guard/index.d.ts.map +1 -0
- package/dist/doc-sync-guard.d.ts +2 -33
- package/dist/doc-sync-guard.js +4 -4
- package/dist/duplicate-code-detector/index.d.ts +31 -0
- package/dist/duplicate-code-detector/index.d.ts.map +1 -0
- package/dist/duplicate-code-detector.d.ts +2 -33
- package/dist/duplicate-code-detector.js +5 -5
- package/dist/error-lens/index.d.ts +65 -0
- package/dist/error-lens/index.d.ts.map +1 -0
- package/dist/error-lens.d.ts +2 -67
- package/dist/error-lens.js +5 -2
- package/dist/feature-flag-tracker/index.d.ts +36 -0
- package/dist/feature-flag-tracker/index.d.ts.map +1 -0
- package/dist/feature-flag-tracker.d.ts +2 -38
- package/dist/feature-flag-tracker.js +5 -5
- package/dist/file-watcher/index.d.ts +12 -0
- package/dist/file-watcher/index.d.ts.map +1 -0
- package/dist/file-watcher.d.ts +2 -14
- package/dist/file-watcher.js +7 -7
- package/dist/format-on-save/index.d.ts +33 -0
- package/dist/format-on-save/index.d.ts.map +1 -0
- package/dist/format-on-save.d.ts +2 -35
- package/dist/format-on-save.js +6 -6
- package/dist/git-autocommit/index.d.ts +15 -0
- package/dist/git-autocommit/index.d.ts.map +1 -0
- package/dist/git-autocommit.d.ts +2 -17
- package/dist/git-autocommit.js +5 -5
- package/dist/import-organizer/index.d.ts +50 -0
- package/dist/import-organizer/index.d.ts.map +1 -0
- package/dist/import-organizer.d.ts +2 -52
- package/dist/import-organizer.js +6 -6
- package/dist/index.d.ts +186 -64
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +946 -394
- package/dist/injection-shield/index.d.ts +47 -0
- package/dist/injection-shield/index.d.ts.map +1 -0
- package/dist/injection-shield.d.ts +2 -49
- package/dist/injection-shield.js +4 -2
- package/dist/interface-contract-guard/index.d.ts +35 -0
- package/dist/interface-contract-guard/index.d.ts.map +1 -0
- package/dist/interface-contract-guard.d.ts +2 -37
- package/dist/interface-contract-guard.js +5 -5
- package/dist/knowledge-graph/index.d.ts +43 -0
- package/dist/knowledge-graph/index.d.ts.map +1 -0
- package/dist/knowledge-graph.d.ts +2 -45
- package/dist/knowledge-graph.js +5 -5
- package/dist/license-audit-gate/index.d.ts +32 -0
- package/dist/license-audit-gate/index.d.ts.map +1 -0
- package/dist/license-audit-gate.d.ts +2 -34
- package/dist/license-audit-gate.js +5 -5
- package/dist/lint-gate/index.d.ts +31 -0
- package/dist/lint-gate/index.d.ts.map +1 -0
- package/dist/lint-gate.d.ts +2 -33
- package/dist/lint-gate.js +7 -7
- package/dist/llm-cache/index.d.ts +54 -0
- package/dist/llm-cache/index.d.ts.map +1 -0
- package/dist/llm-cache.d.ts +2 -56
- package/dist/llm-cache.js +6 -4
- package/dist/loop-breaker/index.d.ts +4 -0
- package/dist/loop-breaker/index.d.ts.map +1 -0
- package/dist/loop-breaker.d.ts +2 -5
- package/dist/loop-breaker.js +4 -4
- package/dist/migration-planner/index.d.ts +28 -0
- package/dist/migration-planner/index.d.ts.map +1 -0
- package/dist/migration-planner.d.ts +2 -30
- package/dist/migration-planner.js +5 -5
- package/dist/model-router/index.d.ts +67 -0
- package/dist/model-router/index.d.ts.map +1 -0
- package/dist/model-router.d.ts +2 -69
- package/dist/model-router.js +5 -2
- package/dist/notify-hub/index.d.ts +43 -0
- package/dist/notify-hub/index.d.ts.map +1 -0
- package/dist/notify-hub.d.ts +2 -45
- package/dist/notify-hub.js +3 -2
- package/dist/path-guard/index.d.ts +52 -0
- package/dist/path-guard/index.d.ts.map +1 -0
- package/dist/path-guard.d.ts +2 -54
- package/dist/path-guard.js +5 -2
- package/dist/performance-regression-gate/index.d.ts +31 -0
- package/dist/performance-regression-gate/index.d.ts.map +1 -0
- package/dist/performance-regression-gate.d.ts +2 -33
- package/dist/performance-regression-gate.js +5 -5
- package/dist/plugin-stack-observer/index.d.ts +33 -0
- package/dist/plugin-stack-observer/index.d.ts.map +1 -0
- package/dist/plugin-stack-observer.d.ts +2 -35
- package/dist/plugin-stack-observer.js +3 -2
- package/dist/pr-drafter/index.d.ts +33 -0
- package/dist/pr-drafter/index.d.ts.map +1 -0
- package/dist/pr-drafter.d.ts +2 -35
- package/dist/pr-drafter.js +6 -6
- package/dist/prompt-firewall/index.d.ts +55 -0
- package/dist/prompt-firewall/index.d.ts.map +1 -0
- package/dist/prompt-firewall.d.ts +2 -57
- package/dist/prompt-firewall.js +5 -2
- package/dist/refactor-suggester/index.d.ts +36 -0
- package/dist/refactor-suggester/index.d.ts.map +1 -0
- package/dist/refactor-suggester.d.ts +2 -38
- package/dist/refactor-suggester.js +5 -5
- package/dist/release-notes-generator/index.d.ts +25 -0
- package/dist/release-notes-generator/index.d.ts.map +1 -0
- package/dist/release-notes-generator.d.ts +2 -27
- package/dist/release-notes-generator.js +28 -10
- package/dist/runtime/index.d.ts +124 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +216 -0
- package/dist/schema-evolution-guard/index.d.ts +40 -0
- package/dist/schema-evolution-guard/index.d.ts.map +1 -0
- package/dist/schema-evolution-guard.d.ts +2 -42
- package/dist/schema-evolution-guard.js +5 -5
- package/dist/secret-scanner/index.d.ts +32 -0
- package/dist/secret-scanner/index.d.ts.map +1 -0
- package/dist/secret-scanner.d.ts +2 -34
- package/dist/secret-scanner.js +3 -2
- package/dist/security-hotspot-scanner/index.d.ts +28 -0
- package/dist/security-hotspot-scanner/index.d.ts.map +1 -0
- package/dist/security-hotspot-scanner.d.ts +2 -30
- package/dist/security-hotspot-scanner.js +5 -5
- package/dist/semantic-search-indexer/index.d.ts +36 -0
- package/dist/semantic-search-indexer/index.d.ts.map +1 -0
- package/dist/semantic-search-indexer.d.ts +2 -38
- package/dist/semantic-search-indexer.js +22 -6
- package/dist/semver-bump/index.d.ts +24 -0
- package/dist/semver-bump/index.d.ts.map +1 -0
- package/dist/semver-bump.d.ts +2 -26
- package/dist/semver-bump.js +10 -8
- package/dist/session-recap/index.d.ts +48 -0
- package/dist/session-recap/index.d.ts.map +1 -0
- package/dist/session-recap.d.ts +2 -50
- package/dist/session-recap.js +6 -4
- package/dist/shell-check/index.d.ts +14 -0
- package/dist/shell-check/index.d.ts.map +1 -0
- package/dist/shell-check.d.ts +2 -16
- package/dist/shell-check.js +6 -6
- package/dist/smart-rename/index.d.ts +24 -0
- package/dist/smart-rename/index.d.ts.map +1 -0
- package/dist/smart-rename.d.ts +2 -26
- package/dist/smart-rename.js +5 -5
- package/dist/spec-linker/index.d.ts +49 -0
- package/dist/spec-linker/index.d.ts.map +1 -0
- package/dist/spec-linker.d.ts +2 -51
- package/dist/spec-linker.js +20100 -244
- package/dist/template-engine/index.d.ts +13 -0
- package/dist/template-engine/index.d.ts.map +1 -0
- package/dist/template-engine.d.ts +2 -15
- package/dist/template-engine.js +7 -7
- package/dist/test-coverage-gate/index.d.ts +35 -0
- package/dist/test-coverage-gate/index.d.ts.map +1 -0
- package/dist/test-coverage-gate.d.ts +2 -37
- package/dist/test-coverage-gate.js +5 -5
- package/dist/test-flake-detector/index.d.ts +25 -0
- package/dist/test-flake-detector/index.d.ts.map +1 -0
- package/dist/test-flake-detector.d.ts +2 -27
- package/dist/test-flake-detector.js +98 -13
- package/dist/test-generator/index.d.ts +30 -0
- package/dist/test-generator/index.d.ts.map +1 -0
- package/dist/test-generator.d.ts +2 -32
- package/dist/test-generator.js +5 -5
- package/dist/test-runner-gate/index.d.ts +35 -0
- package/dist/test-runner-gate/index.d.ts.map +1 -0
- package/dist/test-runner-gate.d.ts +2 -37
- package/dist/test-runner-gate.js +6 -6
- package/dist/todo-listener/index.d.ts +35 -0
- package/dist/todo-listener/index.d.ts.map +1 -0
- package/dist/todo-listener.d.ts +2 -37
- package/dist/todo-listener.js +3 -2
- package/dist/todo-tracker/index.d.ts +4 -0
- package/dist/todo-tracker/index.d.ts.map +1 -0
- package/dist/todo-tracker.d.ts +2 -5
- package/dist/todo-tracker.js +5 -5
- package/dist/token-budget/index.d.ts +38 -0
- package/dist/token-budget/index.d.ts.map +1 -0
- package/dist/token-budget.d.ts +2 -40
- package/dist/token-budget.js +3 -2
- package/dist/token-throttle/index.d.ts +52 -0
- package/dist/token-throttle/index.d.ts.map +1 -0
- package/dist/token-throttle.d.ts +2 -54
- package/dist/token-throttle.js +6 -2
- package/dist/type-gate/index.d.ts +35 -0
- package/dist/type-gate/index.d.ts.map +1 -0
- package/dist/type-gate.d.ts +2 -37
- package/dist/type-gate.js +236 -43
- package/package.json +10 -7
package/dist/semver-bump.d.ts
CHANGED
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* semver-bump plugin — Conventional-commit-driven semver version bumps.
|
|
5
|
-
*
|
|
6
|
-
* Tools registered:
|
|
7
|
-
* - semver_bump: Determine and apply the next version bump
|
|
8
|
-
* - semver_current: Show the current version from package.json
|
|
9
|
-
* - semver_changelog: Generate a changelog between two versions
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
type BumpType = 'major' | 'minor' | 'patch' | 'auto';
|
|
13
|
-
interface ConventionalCommit {
|
|
14
|
-
hash: string;
|
|
15
|
-
type: string;
|
|
16
|
-
scope?: string | undefined;
|
|
17
|
-
message: string;
|
|
18
|
-
breaking: boolean;
|
|
19
|
-
}
|
|
20
|
-
/** Parse a conventional-commit subject line. Accepts the breaking `!` both
|
|
21
|
-
* before and after the scope (`feat!: x`, `feat(api)!: x`). */
|
|
22
|
-
declare function parseConventional(subject: string): Omit<ConventionalCommit, 'hash'>;
|
|
23
|
-
declare function determineBump(commits: ConventionalCommit[]): BumpType;
|
|
24
|
-
declare const plugin: Plugin;
|
|
25
|
-
|
|
26
|
-
export { plugin as default, determineBump, parseConventional };
|
|
1
|
+
export * from './semver-bump/index.js';
|
|
2
|
+
export { default } from './semver-bump/index.js';
|
package/dist/semver-bump.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { expectDefined } from '@wrongstack/core';
|
|
2
|
-
import { toErrorMessage } from '@wrongstack/core/utils';
|
|
3
|
-
import { execFileSync } from 'child_process';
|
|
4
|
-
import { existsSync, readFileSync, writeFileSync, readdirSync } from 'fs';
|
|
5
|
-
import { join, resolve, isAbsolute, relative } from 'path';
|
|
6
|
-
|
|
7
1
|
// src/semver-bump/index.ts
|
|
2
|
+
import { expectDefined } from "@wrongstack/core";
|
|
3
|
+
import { toErrorMessage } from "@wrongstack/core/utils";
|
|
4
|
+
import { execFileSync } from "node:child_process";
|
|
5
|
+
import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
8
7
|
var API_VERSION = "^0.1.10";
|
|
9
8
|
function resolveProjectRoot(rawCwd, root = process.cwd()) {
|
|
10
9
|
if (typeof rawCwd !== "string" || rawCwd.length === 0) return root;
|
|
@@ -517,5 +516,8 @@ var plugin = {
|
|
|
517
516
|
}
|
|
518
517
|
};
|
|
519
518
|
var semver_bump_default = plugin;
|
|
520
|
-
|
|
521
|
-
|
|
519
|
+
export {
|
|
520
|
+
semver_bump_default as default,
|
|
521
|
+
determineBump,
|
|
522
|
+
parseConventional
|
|
523
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* session-recap plugin — Stop hook that posts a one-page summary
|
|
3
|
+
* of the session to the project mailbox when the agent loop ends.
|
|
4
|
+
*
|
|
5
|
+
* As the session runs, the plugin accumulates lightweight metrics
|
|
6
|
+
* from the agent's EventBus:
|
|
7
|
+
*
|
|
8
|
+
* - Total input/output tokens (per model)
|
|
9
|
+
* - Tool-call counts (per tool name)
|
|
10
|
+
* - Git commits made during the session
|
|
11
|
+
* - Elapsed wall-clock time
|
|
12
|
+
*
|
|
13
|
+
* On `Stop`, the hook reads `api.session.transcriptPath` (the JSONL
|
|
14
|
+
* session log) for any extra detail the metrics stream didn't catch
|
|
15
|
+
* — last user prompt, last assistant output, final todo state —
|
|
16
|
+
* then composes a compact summary and posts it to `api.mailbox.send`
|
|
17
|
+
* with `type: 'status'` and a high-signal subject.
|
|
18
|
+
*
|
|
19
|
+
* Use cases:
|
|
20
|
+
* - End-of-day handoff — a second agent opens the mailbox and
|
|
21
|
+
* sees what the previous session finished
|
|
22
|
+
* - Audit — every session leaves a breadcrumb
|
|
23
|
+
* - Shadow agents can monitor the recap stream for anomalies
|
|
24
|
+
*
|
|
25
|
+
* Config (`config.extensions['session-recap']`):
|
|
26
|
+
*
|
|
27
|
+
* ```jsonc
|
|
28
|
+
* {
|
|
29
|
+
* "enabled": true,
|
|
30
|
+
* "subjectPrefix": "session recap: ",
|
|
31
|
+
* "includeTranscriptTail": 3,
|
|
32
|
+
* "maxBodyChars": 8000
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* Host requirements:
|
|
37
|
+
* - Requires `api.mailbox` (added in commit 31dde5ba). When absent
|
|
38
|
+
* the hook logs a one-shot warn and silently no-ops.
|
|
39
|
+
* - Requires `api.session.transcriptPath` to read the JSONL.
|
|
40
|
+
* Minimal hosts without a session writer skip the transcript tail
|
|
41
|
+
* but still post the metrics summary.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
import type { Plugin } from '@wrongstack/core';
|
|
46
|
+
declare const plugin: Plugin;
|
|
47
|
+
export default plugin;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session-recap/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA4M/C,QAAA,MAAM,MAAM,EAAE,MA4Yb,CAAC;eAEa,MAAM"}
|
package/dist/session-recap.d.ts
CHANGED
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* session-recap plugin — Stop hook that posts a one-page summary
|
|
5
|
-
* of the session to the project mailbox when the agent loop ends.
|
|
6
|
-
*
|
|
7
|
-
* As the session runs, the plugin accumulates lightweight metrics
|
|
8
|
-
* from the agent's EventBus:
|
|
9
|
-
*
|
|
10
|
-
* - Total input/output tokens (per model)
|
|
11
|
-
* - Tool-call counts (per tool name)
|
|
12
|
-
* - Git commits made during the session
|
|
13
|
-
* - Elapsed wall-clock time
|
|
14
|
-
*
|
|
15
|
-
* On `Stop`, the hook reads `api.session.transcriptPath` (the JSONL
|
|
16
|
-
* session log) for any extra detail the metrics stream didn't catch
|
|
17
|
-
* — last user prompt, last assistant output, final todo state —
|
|
18
|
-
* then composes a compact summary and posts it to `api.mailbox.send`
|
|
19
|
-
* with `type: 'status'` and a high-signal subject.
|
|
20
|
-
*
|
|
21
|
-
* Use cases:
|
|
22
|
-
* - End-of-day handoff — a second agent opens the mailbox and
|
|
23
|
-
* sees what the previous session finished
|
|
24
|
-
* - Audit — every session leaves a breadcrumb
|
|
25
|
-
* - Shadow agents can monitor the recap stream for anomalies
|
|
26
|
-
*
|
|
27
|
-
* Config (`config.extensions['session-recap']`):
|
|
28
|
-
*
|
|
29
|
-
* ```jsonc
|
|
30
|
-
* {
|
|
31
|
-
* "enabled": true,
|
|
32
|
-
* "subjectPrefix": "session recap: ",
|
|
33
|
-
* "includeTranscriptTail": 3,
|
|
34
|
-
* "maxBodyChars": 8000
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* Host requirements:
|
|
39
|
-
* - Requires `api.mailbox` (added in commit 31dde5ba). When absent
|
|
40
|
-
* the hook logs a one-shot warn and silently no-ops.
|
|
41
|
-
* - Requires `api.session.transcriptPath` to read the JSONL.
|
|
42
|
-
* Minimal hosts without a session writer skip the transcript tail
|
|
43
|
-
* but still post the metrics summary.
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
declare const plugin: Plugin;
|
|
49
|
-
|
|
50
|
-
export { plugin as default };
|
|
1
|
+
export * from './session-recap/index.js';
|
|
2
|
+
export { default } from './session-recap/index.js';
|
package/dist/session-recap.js
CHANGED
|
@@ -80,7 +80,7 @@ async function readTranscriptTail(transcriptPath, n) {
|
|
|
80
80
|
if (!transcriptPath || n <= 0) return [];
|
|
81
81
|
let raw;
|
|
82
82
|
try {
|
|
83
|
-
const { readFile } = await import(
|
|
83
|
+
const { readFile } = await import("node:fs/promises");
|
|
84
84
|
raw = await readFile(transcriptPath, "utf-8");
|
|
85
85
|
} catch {
|
|
86
86
|
return [];
|
|
@@ -182,7 +182,8 @@ var plugin = {
|
|
|
182
182
|
const p = payload;
|
|
183
183
|
const toolName = p?.tool ?? p?.name ?? eventName;
|
|
184
184
|
if (typeof toolName === "string") bumpToolCount(toolName);
|
|
185
|
-
if (toolName === "git_autocommit" || toolName.startsWith("git "))
|
|
185
|
+
if (toolName === "git_autocommit" || toolName.startsWith("git ")) {
|
|
186
|
+
}
|
|
186
187
|
});
|
|
187
188
|
state.eventUnsubscribers.push(offTool);
|
|
188
189
|
const offResult = api.onPattern("tool.result", (_event, payload) => {
|
|
@@ -417,5 +418,6 @@ Tokens: ${recap.tokens.total.input} in / ${recap.tokens.total.output} out
|
|
|
417
418
|
}
|
|
418
419
|
};
|
|
419
420
|
var session_recap_default = plugin;
|
|
420
|
-
|
|
421
|
-
|
|
421
|
+
export {
|
|
422
|
+
session_recap_default as default
|
|
423
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* shell-check plugin — Runs shellcheck analysis on bash/shell scripts.
|
|
3
|
+
*
|
|
4
|
+
* Tools registered:
|
|
5
|
+
* - shellcheck: Run shellcheck on specific files OR recursively scan a directory.
|
|
6
|
+
*
|
|
7
|
+
* Note: The former `shellcheck (scan mode)` tool has been merged into `shellcheck`
|
|
8
|
+
* via the `directory` + `pattern` parameters. Pass `files` for specific
|
|
9
|
+
* files, or `directory` (optionally with `pattern`) for recursive scanning.
|
|
10
|
+
*/
|
|
11
|
+
import type { Plugin } from '@wrongstack/core';
|
|
12
|
+
declare const plugin: Plugin;
|
|
13
|
+
export default plugin;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell-check/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAmK/C,QAAA,MAAM,MAAM,EAAE,MAgPb,CAAC;eAEa,MAAM"}
|
package/dist/shell-check.d.ts
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* shell-check plugin — Runs shellcheck analysis on bash/shell scripts.
|
|
5
|
-
*
|
|
6
|
-
* Tools registered:
|
|
7
|
-
* - shellcheck: Run shellcheck on specific files OR recursively scan a directory.
|
|
8
|
-
*
|
|
9
|
-
* Note: The former `shellcheck (scan mode)` tool has been merged into `shellcheck`
|
|
10
|
-
* via the `directory` + `pattern` parameters. Pass `files` for specific
|
|
11
|
-
* files, or `directory` (optionally with `pattern`) for recursive scanning.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
declare const plugin: Plugin;
|
|
15
|
-
|
|
16
|
-
export { plugin as default };
|
|
1
|
+
export * from './shell-check/index.js';
|
|
2
|
+
export { default } from './shell-check/index.js';
|
package/dist/shell-check.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { execSync, execFileSync } from 'child_process';
|
|
2
|
-
import { readdirSync, existsSync } from 'fs';
|
|
3
|
-
import { join, isAbsolute, resolve, relative } from 'path';
|
|
4
|
-
|
|
5
1
|
// src/shell-check/index.ts
|
|
2
|
+
import { execFileSync, execSync } from "node:child_process";
|
|
3
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
4
|
+
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
6
5
|
var API_VERSION = "^0.1.10";
|
|
7
6
|
function withinProject(p) {
|
|
8
7
|
const root = process.cwd();
|
|
@@ -276,5 +275,6 @@ var plugin = {
|
|
|
276
275
|
}
|
|
277
276
|
};
|
|
278
277
|
var shell_check_default = plugin;
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
export {
|
|
279
|
+
shell_check_default as default
|
|
280
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* smart-rename plugin — whole-word identifier rename inside a single source
|
|
3
|
+
* file using regex replacement.
|
|
4
|
+
*
|
|
5
|
+
* Tool registered:
|
|
6
|
+
* - smart_rename : Replace whole-word occurrences of oldName with newName.
|
|
7
|
+
*
|
|
8
|
+
* No hooks are registered.
|
|
9
|
+
*
|
|
10
|
+
* Config (`config.extensions['smart-rename']`):
|
|
11
|
+
*
|
|
12
|
+
* ```jsonc
|
|
13
|
+
* {
|
|
14
|
+
* "enabled": true,
|
|
15
|
+
* "extensions": [".ts", ".tsx", ".js", ".jsx"]
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
import type { Plugin } from '@wrongstack/core';
|
|
22
|
+
declare const plugin: Plugin;
|
|
23
|
+
export default plugin;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/smart-rename/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA0F/C,QAAA,MAAM,MAAM,EAAE,MAqIb,CAAC;eAEa,MAAM"}
|
package/dist/smart-rename.d.ts
CHANGED
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* smart-rename plugin — whole-word identifier rename inside a single source
|
|
5
|
-
* file using regex replacement.
|
|
6
|
-
*
|
|
7
|
-
* Tool registered:
|
|
8
|
-
* - smart_rename : Replace whole-word occurrences of oldName with newName.
|
|
9
|
-
*
|
|
10
|
-
* No hooks are registered.
|
|
11
|
-
*
|
|
12
|
-
* Config (`config.extensions['smart-rename']`):
|
|
13
|
-
*
|
|
14
|
-
* ```jsonc
|
|
15
|
-
* {
|
|
16
|
-
* "enabled": true,
|
|
17
|
-
* "extensions": [".ts", ".tsx", ".js", ".jsx"]
|
|
18
|
-
* }
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
declare const plugin: Plugin;
|
|
25
|
-
|
|
26
|
-
export { plugin as default };
|
|
1
|
+
export * from './smart-rename/index.js';
|
|
2
|
+
export { default } from './smart-rename/index.js';
|
package/dist/smart-rename.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync } from 'fs';
|
|
2
|
-
import { extname, resolve, isAbsolute, relative } from 'path';
|
|
3
|
-
|
|
4
1
|
// src/smart-rename/index.ts
|
|
2
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { extname, isAbsolute, relative, resolve } from "node:path";
|
|
5
4
|
var API_VERSION = "^0.1.10";
|
|
6
5
|
var state = {
|
|
7
6
|
renameCount: 0,
|
|
@@ -166,5 +165,6 @@ var plugin = {
|
|
|
166
165
|
}
|
|
167
166
|
};
|
|
168
167
|
var smart_rename_default = plugin;
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
export {
|
|
169
|
+
smart_rename_default as default
|
|
170
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spec-linker plugin — markdown link auditor for plugin references.
|
|
3
|
+
*
|
|
4
|
+
* Two hooks:
|
|
5
|
+
* 1. **PostToolUse** on `write|edit` — READ-ONLY. Scans the saved
|
|
6
|
+
* file for unlinked plugin references and surfaces them to the
|
|
7
|
+
* LLM via `additionalContext`. The LLM decides whether to fix
|
|
8
|
+
* the file in a follow-up edit.
|
|
9
|
+
*
|
|
10
|
+
* 2. **PreToolUse** on `write` (NOT `edit`) — AUTO-FIX. When the
|
|
11
|
+
* `autoFix` config is `true`, scans the would-be content and
|
|
12
|
+
* returns a `modifiedInput.content` where each unlinked plugin
|
|
13
|
+
* reference is wrapped in a markdown link. The tool executor
|
|
14
|
+
* then writes the fixed content instead of the original.
|
|
15
|
+
*
|
|
16
|
+
* Why `write` only and not `edit`? The `edit` tool's input shape
|
|
17
|
+
* is `{ path, old_string, new_string }` — `new_string` is a small
|
|
18
|
+
* patch, not the whole file. To auto-fix `edit` cleanly we'd have
|
|
19
|
+
* to either:
|
|
20
|
+
* - parse the file, find where `old_string` lives, substitute
|
|
21
|
+
* `new_string` with the auto-fixed version, and re-derive
|
|
22
|
+
* the new `old_string` (a hard string-diff problem), or
|
|
23
|
+
* - reject `edit` and force `write` (bad UX).
|
|
24
|
+
* Both are too complex for the win. `write` is the common case
|
|
25
|
+
* for new files; `edit` stays read-only and the PostToolUse
|
|
26
|
+
* context tells the LLM what to fix.
|
|
27
|
+
*
|
|
28
|
+
* The plugin catalog is sourced from `../catalog.js` (single source
|
|
29
|
+
* of truth — adding a new plugin to the catalog table there is
|
|
30
|
+
* enough for this plugin to start detecting it).
|
|
31
|
+
*
|
|
32
|
+
* Config (`config.extensions['spec-linker']`):
|
|
33
|
+
*
|
|
34
|
+
* ```jsonc
|
|
35
|
+
* {
|
|
36
|
+
* "enabled": true,
|
|
37
|
+
* "fileGlobs": ["**\/*.md", "**\/*.mdx"],
|
|
38
|
+
* "maxReferences": 8,
|
|
39
|
+
* "autoFix": false // when true, PreToolUse on `write` wraps unlinked
|
|
40
|
+
* // references in markdown links via modifiedInput
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
import type { Plugin } from '@wrongstack/core';
|
|
47
|
+
declare const plugin: Plugin;
|
|
48
|
+
export default plugin;
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec-linker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAwP/C,QAAA,MAAM,MAAM,EAAE,MAuOb,CAAC;eAEa,MAAM"}
|
package/dist/spec-linker.d.ts
CHANGED
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* spec-linker plugin — markdown link auditor for plugin references.
|
|
5
|
-
*
|
|
6
|
-
* Two hooks:
|
|
7
|
-
* 1. **PostToolUse** on `write|edit` — READ-ONLY. Scans the saved
|
|
8
|
-
* file for unlinked plugin references and surfaces them to the
|
|
9
|
-
* LLM via `additionalContext`. The LLM decides whether to fix
|
|
10
|
-
* the file in a follow-up edit.
|
|
11
|
-
*
|
|
12
|
-
* 2. **PreToolUse** on `write` (NOT `edit`) — AUTO-FIX. When the
|
|
13
|
-
* `autoFix` config is `true`, scans the would-be content and
|
|
14
|
-
* returns a `modifiedInput.content` where each unlinked plugin
|
|
15
|
-
* reference is wrapped in a markdown link. The tool executor
|
|
16
|
-
* then writes the fixed content instead of the original.
|
|
17
|
-
*
|
|
18
|
-
* Why `write` only and not `edit`? The `edit` tool's input shape
|
|
19
|
-
* is `{ path, old_string, new_string }` — `new_string` is a small
|
|
20
|
-
* patch, not the whole file. To auto-fix `edit` cleanly we'd have
|
|
21
|
-
* to either:
|
|
22
|
-
* - parse the file, find where `old_string` lives, substitute
|
|
23
|
-
* `new_string` with the auto-fixed version, and re-derive
|
|
24
|
-
* the new `old_string` (a hard string-diff problem), or
|
|
25
|
-
* - reject `edit` and force `write` (bad UX).
|
|
26
|
-
* Both are too complex for the win. `write` is the common case
|
|
27
|
-
* for new files; `edit` stays read-only and the PostToolUse
|
|
28
|
-
* context tells the LLM what to fix.
|
|
29
|
-
*
|
|
30
|
-
* The plugin catalog is sourced from `../catalog.js` (single source
|
|
31
|
-
* of truth — adding a new plugin to the catalog table there is
|
|
32
|
-
* enough for this plugin to start detecting it).
|
|
33
|
-
*
|
|
34
|
-
* Config (`config.extensions['spec-linker']`):
|
|
35
|
-
*
|
|
36
|
-
* ```jsonc
|
|
37
|
-
* {
|
|
38
|
-
* "enabled": true,
|
|
39
|
-
* "fileGlobs": ["**\/*.md", "**\/*.mdx"],
|
|
40
|
-
* "maxReferences": 8,
|
|
41
|
-
* "autoFix": false // when true, PreToolUse on `write` wraps unlinked
|
|
42
|
-
* // references in markdown links via modifiedInput
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
declare const plugin: Plugin;
|
|
50
|
-
|
|
51
|
-
export { plugin as default };
|
|
1
|
+
export * from './spec-linker/index.js';
|
|
2
|
+
export { default } from './spec-linker/index.js';
|