agentloopkit 0.24.0 → 0.24.2
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 +12 -26
- package/dist/cli/index.js +29 -7
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,26 +39,23 @@ Coding agents often move fast but leave reviewers with weak evidence: unclear sc
|
|
|
39
39
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
42
|
-
Use it with `npx`
|
|
42
|
+
Use it with `npx` from the root of the repository you want to configure:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
45
|
+
cd /path/to/your/repo
|
|
46
46
|
npx agentloopkit init --dry-run
|
|
47
|
+
npx agentloopkit init
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
See [docs/release-status.md](docs/release-status.md) for the current GitHub/npm status and update rules.
|
|
50
|
+
`init` writes files into the current directory. Do not run it from `~` unless you intend to configure your home directory. `--dry-run` previews the file changes without writing them.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
Pin the current version when you need repeatable CI or team setup:
|
|
54
53
|
|
|
55
54
|
```bash
|
|
56
|
-
npx --yes
|
|
57
|
-
npx --yes
|
|
55
|
+
npx --yes agentloopkit@0.24.2 version
|
|
56
|
+
npx --yes agentloopkit@0.24.2 init
|
|
58
57
|
```
|
|
59
58
|
|
|
60
|
-
The npm version jump has one reason: GitHub releases already exist for the intermediate AgentLoopKit versions between the npm-published `0.1.1` package and the current `v0.24.0` source line. Publishing older numbers from current `main` would create npm packages that do not match their GitHub tags. Once npm authentication or trusted publishing works, the next npm publish should ship `0.24.0`; future releases should then continue with normal sequential semver.
|
|
61
|
-
|
|
62
59
|
Run the CLI after install:
|
|
63
60
|
|
|
64
61
|
```bash
|
|
@@ -93,7 +90,7 @@ npx agentloopkit completion powershell
|
|
|
93
90
|
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-cli.gif" alt="Terminal demo running AgentLoopKit init, task contracts, active task status, task-linked verify, handoff, reports, badges, release notes, gates, and task archive commands" width="100%">
|
|
94
91
|
</p>
|
|
95
92
|
|
|
96
|
-
The VHS demo
|
|
93
|
+
The VHS demo is generated from committed sources in this repository.
|
|
97
94
|
|
|
98
95
|
Pinned team usage:
|
|
99
96
|
|
|
@@ -118,6 +115,7 @@ pnpm build
|
|
|
118
115
|
| --------------------------------------- | ------------------------------------------------------------------------------ |
|
|
119
116
|
| `agentloop init` | Generate the repo harness and config |
|
|
120
117
|
| `agentloop init --dry-run` | Preview generated files without writing them |
|
|
118
|
+
| `agentloop init --force` | Allow initialization when the current directory is your home directory |
|
|
121
119
|
| `agentloop doctor` | Check setup health, template version, commands, git state, and risk categories |
|
|
122
120
|
| `agentloop create-task` | Create a task contract in `.agentloop/tasks/` |
|
|
123
121
|
| `agentloop task list` | List task contracts and show the pinned active task |
|
|
@@ -138,7 +136,7 @@ pnpm build
|
|
|
138
136
|
| `agentloop badge` | Write a local SVG evidence badge |
|
|
139
137
|
| `agentloop ci-summary` | Summarize CI context and local AgentLoop evidence |
|
|
140
138
|
| `agentloop release-notes` | Draft local release notes from changelog, git, task, and verification evidence |
|
|
141
|
-
| `agentloop npm-status` | Check npm registry
|
|
139
|
+
| `agentloop npm-status` | Check npm registry status without publishing |
|
|
142
140
|
| `agentloop policy list` | List local safety policy files |
|
|
143
141
|
| `agentloop policy show <policy>` | Print a local safety policy without mutating files |
|
|
144
142
|
| `agentloop policy status` | Compare local policy files with bundled templates |
|
|
@@ -386,7 +384,7 @@ See `docs/ci-summary.md`.
|
|
|
386
384
|
```bash
|
|
387
385
|
agentloop release-notes
|
|
388
386
|
agentloop release-notes --from v0.19.0 --to HEAD
|
|
389
|
-
agentloop release-notes --release-version 0.24.
|
|
387
|
+
agentloop release-notes --release-version 0.24.2
|
|
390
388
|
agentloop release-notes --json
|
|
391
389
|
agentloop release-notes --write
|
|
392
390
|
```
|
|
@@ -452,7 +450,7 @@ Use `agentloop check-gates --strict` as a review-evidence gate in pull request C
|
|
|
452
450
|
|
|
453
451
|
CI-generated verification reports include GitHub Actions provenance when available, so reviewers can trace an artifact back to the workflow run that created it.
|
|
454
452
|
|
|
455
|
-
See `docs/github-actions.md`, `examples/github-actions/`, `examples/gitlab-ci/`, and `examples/buildkite/` for copy-pasteable workflows.
|
|
453
|
+
See `docs/github-actions.md`, `examples/github-actions/`, `examples/gitlab-ci/`, and `examples/buildkite/` for copy-pasteable workflows. Pin `agentloopkit@0.24.2` or a newer vetted release when reproducibility matters.
|
|
456
454
|
|
|
457
455
|
## PR Summaries
|
|
458
456
|
|
|
@@ -529,18 +527,6 @@ See `docs/stack-recipes.md` for Next.js, React/Vite, Remix, SvelteKit, Node API,
|
|
|
529
527
|
|
|
530
528
|
See `ROADMAP.md`.
|
|
531
529
|
|
|
532
|
-
## Publishing Status
|
|
533
|
-
|
|
534
|
-
AgentLoopKit is published on npm as `agentloopkit`, but npm currently serves `0.1.1`. GitHub release `v0.24.0` carries task-linked verification reports, failed-verification summaries, the guarded `--task` path behavior, refreshed README visuals, PowerShell shell completions, and the read-only `npm-status` catch-up check. npm still needs account authentication or trusted-publishing repair before a catch-up release lands.
|
|
535
|
-
|
|
536
|
-
Do not publish stale older versions from current `main`. If `CHANGELOG.md` has real entries under `Unreleased`, the prepublish guard blocks npm publish until release metadata is prepared.
|
|
537
|
-
|
|
538
|
-
The npm version jump is intentional. The skipped npm numbers already exist as public GitHub release candidates while npm publishing was blocked, so the next npm publish should ship the current release line rather than backfilling old source snapshots.
|
|
539
|
-
|
|
540
|
-
The repository includes a GitHub Actions publish workflow for npm trusted publishing after the package is configured on npm. The workflow runs checks before `npm publish` and skips publish when the version already exists.
|
|
541
|
-
|
|
542
|
-
See `docs/launch-checklist.md` before publishing. See `docs/npm-status.md`, `docs/release-checklist-example.md`, and `examples/release-checklist/` for registry checks and compact maintainer handoffs when GitHub is current but npm is still behind.
|
|
543
|
-
|
|
544
530
|
## Contributing
|
|
545
531
|
|
|
546
532
|
See `CONTRIBUTING.md` for local setup and PR expectations. Maintainers can use `docs/contributor-playbook.md` for copyable good-first issue examples.
|
package/dist/cli/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { Command } from "commander";
|
|
|
9
9
|
// src/core/init.ts
|
|
10
10
|
import path6 from "path";
|
|
11
11
|
import { readdir as readdir3 } from "fs/promises";
|
|
12
|
+
import { homedir } from "os";
|
|
12
13
|
|
|
13
14
|
// src/core/constants.ts
|
|
14
15
|
var PACKAGE_NAME = "agentloopkit";
|
|
@@ -196,14 +197,20 @@ async function listFilesRecursive(root, options = {}) {
|
|
|
196
197
|
options.ignore ?? [".git", ".agentloop", "node_modules", "dist", "coverage"]
|
|
197
198
|
);
|
|
198
199
|
const files = [];
|
|
199
|
-
|
|
200
|
+
let inspectedEntries = 0;
|
|
201
|
+
async function walk(current, depth) {
|
|
200
202
|
if (!await pathExists(current)) return;
|
|
201
|
-
|
|
203
|
+
if (options.maxEntries !== void 0 && inspectedEntries >= options.maxEntries) return;
|
|
204
|
+
const entries = await readdir(current, { withFileTypes: true }).catch(() => []);
|
|
202
205
|
for (const entry of entries) {
|
|
206
|
+
if (options.maxEntries !== void 0 && inspectedEntries >= options.maxEntries) break;
|
|
207
|
+
inspectedEntries += 1;
|
|
203
208
|
if (ignore.has(entry.name)) continue;
|
|
204
209
|
const absolute = path2.join(current, entry.name);
|
|
205
210
|
if (entry.isDirectory()) {
|
|
206
|
-
|
|
211
|
+
if (options.maxDepth === void 0 || depth < options.maxDepth) {
|
|
212
|
+
await walk(absolute, depth + 1);
|
|
213
|
+
}
|
|
207
214
|
} else if (entry.isFile()) {
|
|
208
215
|
files.push(absolute);
|
|
209
216
|
}
|
|
@@ -211,7 +218,7 @@ async function listFilesRecursive(root, options = {}) {
|
|
|
211
218
|
}
|
|
212
219
|
const rootStat = await stat(root).catch(() => void 0);
|
|
213
220
|
if (!rootStat?.isDirectory()) return [];
|
|
214
|
-
await walk(root);
|
|
221
|
+
await walk(root, 0);
|
|
215
222
|
return files;
|
|
216
223
|
}
|
|
217
224
|
|
|
@@ -247,6 +254,8 @@ var MONOREPO_FILE_MARKERS = [
|
|
|
247
254
|
"lerna.json",
|
|
248
255
|
"rush.json"
|
|
249
256
|
];
|
|
257
|
+
var FALLBACK_PROJECT_DETECTION_MAX_DEPTH = 2;
|
|
258
|
+
var FALLBACK_PROJECT_DETECTION_MAX_ENTRIES = 500;
|
|
250
259
|
async function readPackageJson(cwd) {
|
|
251
260
|
const filePath = path4.join(cwd, "package.json");
|
|
252
261
|
if (!await pathExists(filePath)) return void 0;
|
|
@@ -267,7 +276,10 @@ async function detectProjectType(cwd) {
|
|
|
267
276
|
if (await pathExists(path4.join(cwd, "pyproject.toml")) || await pathExists(path4.join(cwd, "requirements.txt"))) {
|
|
268
277
|
return "python";
|
|
269
278
|
}
|
|
270
|
-
const files = await listFilesRecursive(cwd
|
|
279
|
+
const files = await listFilesRecursive(cwd, {
|
|
280
|
+
maxDepth: FALLBACK_PROJECT_DETECTION_MAX_DEPTH,
|
|
281
|
+
maxEntries: FALLBACK_PROJECT_DETECTION_MAX_ENTRIES
|
|
282
|
+
});
|
|
271
283
|
const relativeFiles = files.map((file) => path4.relative(cwd, file));
|
|
272
284
|
const hasCode = relativeFiles.some(
|
|
273
285
|
(file) => /\.(ts|tsx|js|jsx|py|go|rs|java|rb|php|cs)$/.test(file)
|
|
@@ -391,6 +403,12 @@ async function initializeAgentLoop(options) {
|
|
|
391
403
|
dryRun: Boolean(options.dryRun)
|
|
392
404
|
};
|
|
393
405
|
const cwd = options.cwd;
|
|
406
|
+
const homeDirectory = options.homeDirectory ?? homedir();
|
|
407
|
+
if (!options.dryRun && !options.force && path6.resolve(cwd) === path6.resolve(homeDirectory)) {
|
|
408
|
+
throw new Error(
|
|
409
|
+
"Refusing to initialize your home directory. Run this inside a project repository, or pass --force if you intentionally want AgentLoopKit files in your home directory."
|
|
410
|
+
);
|
|
411
|
+
}
|
|
394
412
|
const packageManager = await detectPackageManager(cwd);
|
|
395
413
|
const projectType = await detectProjectType(cwd);
|
|
396
414
|
const projectName = await detectProjectName(cwd);
|
|
@@ -473,8 +491,12 @@ var consoleLogger = {
|
|
|
473
491
|
|
|
474
492
|
// src/cli/commands/init.ts
|
|
475
493
|
function initCommand() {
|
|
476
|
-
return new Command("init").description("Initialize AgentLoopKit in the current repository").option("--dry-run", "show planned changes without writing files").option("--json", "print machine-readable output").action(async (options) => {
|
|
477
|
-
const result = await initializeAgentLoop({
|
|
494
|
+
return new Command("init").description("Initialize AgentLoopKit in the current repository").option("--dry-run", "show planned changes without writing files").option("--json", "print machine-readable output").option("--force", "allow initialization when the current directory is your home directory").action(async (options) => {
|
|
495
|
+
const result = await initializeAgentLoop({
|
|
496
|
+
cwd: process.cwd(),
|
|
497
|
+
dryRun: options.dryRun,
|
|
498
|
+
force: options.force
|
|
499
|
+
});
|
|
478
500
|
if (options.json) {
|
|
479
501
|
consoleLogger.info(JSON.stringify(result, null, 2));
|
|
480
502
|
return;
|