@mnaimfaizy/agent-kit 1.0.0-beta.3 → 1.0.0-beta.5

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 CHANGED
@@ -17,6 +17,6 @@ npx @mnaimfaizy/agent-kit upgrade --tag <new-tag> # move to another tag (asks
17
17
  - `upgrade --tag <vY>` reads the current tag from your Agent-kit `uses:` pins (they must agree), replaces each Kit-owned path vY lists (delete, then copy), deletes paths only the old tag listed, rewrites only the `@<tag>` of those pins, prints the `examples/` diff between the two tags for you to apply by hand, and then runs the `doctor --ci` checks. Every refusal is checked before anything is written. It refuses a path with uncommitted changes unless `--force`, refuses symbolic links in or above a Kit-owned path, and copies only regular and executable files from the tag. Ignored files inside a replaced path are deleted with it, and listed first. After a Dependabot pin bump, when the pins already name vY, add `--from <vX>` to also delete paths only vX listed and see the `examples/` diff. It asks before writing; pass `--yes` when there is no terminal. It writes only local files and commits nothing; where `core.fileMode` is off (Windows), it stages each copied file with the tag's mode (`git add --chmod=+x` or `-x`), so the executable bit is neither lost nor kept by mistake.
18
18
  - `init --tag <vX>` copies the Kit-owned paths, writes `.github/workflows/agent-pipeline.yml` and/or `security-audit.yml` from the tag's `examples/` with your answers filled in (`--flows`, `--actors`, `--default-branch`, `--verify`, `--preset`), writes the Threat pack skeleton to `.security/` (or `--threat-pack-dir`) and `.github/dependabot.yml` if there is none, and prints the GitHub-side steps as `gh` commands. It refuses to overwrite an existing Caller or Kit-owned path without `--force`, never overwrites an existing Threat pack file, and leaves Kit-owned paths that already match the tag alone (so `init --flows audit` later adds that flow); use `upgrade` to change tags. `--yes` asks nothing.
19
19
 
20
- The package version matches the Agent-kit Release line: `@mnaimfaizy/agent-kit@1.0.0-beta.3` is published from tag `v1.0.0-beta.3`, with npm provenance.
20
+ The package version matches the Agent-kit Release line: `@mnaimfaizy/agent-kit@1.0.0-beta.5` is published from tag `v1.0.0-beta.5`, with npm provenance.
21
21
 
22
22
  Full documentation: [Getting started](https://github.com/mnaimfaizy/agent-kit/blob/main/docs/getting-started.md) and [Adopt](https://github.com/mnaimfaizy/agent-kit/blob/main/docs/adopt.md#check-an-adoption-with-doctor).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnaimfaizy/agent-kit",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.5",
4
4
  "description": "Adopt, upgrade and check Agent-kit in a Consumer repository. Reads kit files from the pinned git tag.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -291,7 +291,8 @@ export function checkTagRuleset(rulesets) {
291
291
 
292
292
  /**
293
293
  * Workflows that push tags with GITHUB_TOKEN: a `git push` of tags, with no
294
- * SSH deploy key in the same file.
294
+ * SSH deploy key in the same file (a GIT_SSH_COMMAND, an SSH remote, or an
295
+ * actions/checkout `ssh-key:` input with a value).
295
296
  */
296
297
  export function workflowsPushingTagsWithToken(files) {
297
298
  return files
@@ -310,7 +311,11 @@ export function workflowsPushingTagsWithToken(files) {
310
311
  /--tags|--follow-tags|refs\/tags\/|\bTAG\b|\btag\b/i.test(l),
311
312
  );
312
313
  const tagged = /\bgit\b[^\n]*\btag\b/.test(body) && /\bgit\b[^\n]*\bpush\b/.test(body);
313
- const ssh = /GIT_SSH_COMMAND|git@github\.com:|ssh:\/\//.test(body);
314
+ // actions/checkout's `ssh-key:` input sets origin to the SSH URL and
315
+ // core.sshCommand to the key, so a later `git push origin` uses it.
316
+ const checkoutKey =
317
+ /^[ \t]*(?:-[ \t]+)?ssh-key:[ \t]*(?!(?:''|""|~|null|Null|NULL)[ \t]*$)\S/m.test(body);
318
+ const ssh = checkoutKey || /GIT_SSH_COMMAND|git@github\.com:|ssh:\/\//.test(body);
314
319
  return (pushes || tagged) && !ssh;
315
320
  })
316
321
  .map((f) => f.path);