jackherd 1.1.0 → 1.3.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/CHANGELOG.md +15 -0
- package/README.md +36 -7
- package/dist/{chunk-R6MGHCD7.js → chunk-UI3AZNZF.js} +5 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.js +17 -1
- package/dist/plan-format.d.ts +7 -1
- package/dist/plan-format.js +3 -1
- package/herdr-plugin/herdr-plugin.toml +1 -1
- package/install.sh +1 -1
- package/kit/hooks/hooks/git-guard/decision.ts +10 -79
- package/kit/hooks/hooks/merge-guard/approval.ts +107 -0
- package/kit/hooks/hooks/merge-guard/decision.ts +286 -0
- package/kit/hooks/hooks/merge-guard/index.ts +56 -0
- package/kit/hooks/hooks/merge-guard/pull-request.ts +33 -0
- package/kit/hooks/hooks/merge-guard/run.ts +60 -0
- package/kit/hooks/hooks/merge-guard/settings.ts +56 -0
- package/kit/hooks/hooks/merge-guard/worker.ts +14 -0
- package/kit/hooks/hooks/shared/program-position.ts +82 -0
- package/kit/hooks/hooks/watch-guard/shell-input.ts +1 -1
- package/kit/hooks/hooks/watch-guard/starts.ts +1 -1
- package/kit/hooks/hooks.json +10 -0
- package/kit/workflow/skills/orchestrate/SKILL.md +68 -5
- package/package.json +1 -1
- package/schemas/jackherd.schema.json +35 -0
- package/src/config/schema.ts +23 -0
- package/src/sync/command-context.ts +8 -4
- package/src/sync/command.ts +27 -9
- package/src/sync/if-changed.ts +18 -8
- package/src/sync/render.ts +4 -2
- package/src/sync/report.ts +21 -0
- package/src/sync/settings-migration.ts +45 -3
- package/src/sync/settings-offer.ts +8 -2
- package/src/sync/sync.ts +7 -3
- package/src/vocabulary/index.ts +10 -0
- package/src/watch/command.ts +7 -1
- package/src/watch/report-questions.ts +16 -2
- package/src/watch/update-available.ts +26 -0
- /package/kit/hooks/hooks/{git-guard → shared}/shell.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { latestVersionIfDue, type UpdateCheck } from '../sync/if-changed'
|
|
2
|
+
import { isNewerVersion } from '../version/release'
|
|
3
|
+
|
|
4
|
+
/** The one line that wakes the coordinator when npm has a newer release; the orchestrate skill asks the user. */
|
|
5
|
+
export const updateAvailableLine = (installed: string, latest: string): string =>
|
|
6
|
+
`=== update available ${installed} → ${latest}`
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The watcher's daily look at npm, on the hook's timestamp and check, so a day holds one registry question across
|
|
10
|
+
* both. Prints a line only for a newer plain release it has not announced yet; otherwise nothing, so a quiet
|
|
11
|
+
* day costs no tokens. Call it on every poll: the timestamp decides whether npm is asked at all.
|
|
12
|
+
*/
|
|
13
|
+
export const updateAnnouncer = (
|
|
14
|
+
home: string,
|
|
15
|
+
installed: string,
|
|
16
|
+
check: UpdateCheck,
|
|
17
|
+
log: (line: string) => void,
|
|
18
|
+
): (() => Promise<void>) => {
|
|
19
|
+
let announced: string | null = null
|
|
20
|
+
return async () => {
|
|
21
|
+
const latest = await latestVersionIfDue(home, check)
|
|
22
|
+
if (latest === null || latest === announced || !isNewerVersion(latest, installed)) return
|
|
23
|
+
announced = latest
|
|
24
|
+
log(updateAvailableLine(installed, latest))
|
|
25
|
+
}
|
|
26
|
+
}
|
|
File without changes
|