@appsforgood/next-supabase-kit 0.2.1 → 0.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ - Make GitHub Actions opt-in for fresh installs while preserving local verification gates and existing downstream workflows.
6
+
3
7
  ## 0.2.1
4
8
 
5
9
  - Rewrite the public README with verified setup commands and task-oriented examples for audits, council sessions, UI review, upgrades, and optional runtime orchestration.
package/DOGFOOD.md CHANGED
@@ -185,3 +185,17 @@ Scope: README/docs discoverability + three new Antigravity adapters
185
185
  | Roster | `testing` and `code-review` workflows; planning triggers for spec keywords |
186
186
  | Historical scope | `/build`, `/webperf`, `/code-simplify`, and `/build auto` were deferred in this 0.1.7 review; the later runtime ships bounded roster workflows rather than cloning those command semantics |
187
187
  | Verification | `npm test`, `agent-kit adapter validate antigravity` after build |
188
+
189
+ ## 2026-07-11 - README Examples Release 0.2.1
190
+
191
+ Date: 2026-07-11
192
+ Scope: publish the verified README rewrite through npm Trusted Publishing and confirm the public artifacts.
193
+
194
+ | Evidence | Result |
195
+ | --- | --- |
196
+ | Local release gate | `npm run release:check` passed with 200 tests, coverage gates, package/adapters/examples/install/Studio/setup/audit checks, zero dependency vulnerabilities, SBOM validation, and package dry runs. |
197
+ | Root package | `@appsforgood/next-supabase-kit@0.2.1` is public and the `latest` dist-tag resolves to `0.2.1`. |
198
+ | Published README | npm returns the rewritten quick start, audit, council-session, frontend-review, update, and optional-runtime examples for `0.2.1`. |
199
+ | Runtime package | `@appsforgood/agent-kit-runtime` remains at `0.1.3`; the release workflow correctly skipped its unchanged package. |
200
+ | GitHub release | [`v0.2.1`](https://github.com/lukey662/agentsandskills/releases/tag/v0.2.1) was created only after public-registry verification. |
201
+ | Supply chain | Trusted Publishing used GitHub Actions OIDC and generated the root-package SBOM attestation before publication. |
package/README.md CHANGED
@@ -106,6 +106,14 @@ npx agent-kit context init
106
106
  npx agent-kit context ask
107
107
  ```
108
108
 
109
+ GitHub Actions is off by default. Opt in to the advisory audit workflow only when the repository has working Actions entitlement:
110
+
111
+ ```bash
112
+ npx agent-kit init --github-actions
113
+ ```
114
+
115
+ The workflow runs manually by default. Set the repository variable `AGENT_KIT_ACTIONS_ENABLED=true` to enable its push and pull-request jobs. Do not make the check required until the repository can reliably start Actions jobs.
116
+
109
117
  ### Resume project onboarding
110
118
 
111
119
  ```bash
@@ -156,7 +164,7 @@ npx agent-kit audit --schema-version 2 --format json
156
164
  npx agent-kit audit --schema-version 2 --format sarif > agent-kit.sarif
157
165
  ```
158
166
 
159
- ### Fail CI below the required evidence level
167
+ ### Fail a local or explicitly enabled CI gate below the required evidence level
160
168
 
161
169
  ```bash
162
170
  npx agent-kit audit --min-readiness baseline-setup
@@ -181,22 +189,21 @@ on:
181
189
 
182
190
  jobs:
183
191
  audit:
192
+ if: ${{ github.event_name == 'workflow_dispatch' || vars.AGENT_KIT_ACTIONS_ENABLED == 'true' }}
184
193
  runs-on: ubuntu-latest
185
194
  permissions:
186
195
  contents: read
187
196
  steps:
188
- - uses: actions/checkout@v6
197
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
189
198
  with:
190
199
  persist-credentials: false
191
- - uses: actions/setup-node@v6
200
+ - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
192
201
  with:
193
202
  node-version: 24
194
- cache: npm
195
- - run: npm ci
196
- - run: npx agent-kit audit --min-readiness baseline-setup
203
+ - run: npx --yes @appsforgood/next-supabase-kit@0.3.0 audit --min-readiness baseline-setup
197
204
  ```
198
205
 
199
- The installed template at `.github/workflows/agent-kit-audit.yml` is the maintained starting point.
206
+ Run `agent-kit init --github-actions` to install the maintained `.github/workflows/agent-kit-audit.yml` template. Fresh installs do not create an active hosted workflow. Account billing, spending-limit, or Actions-startup failures are external infrastructure failures; they do not replace required local test and audit evidence and do not block commit/push or normal phase progression. A project may separately make hosted checks required only after verifying Actions entitlement and branch protection.
200
207
 
201
208
  ## Common Delivery Workflows
202
209
 
@@ -17,13 +17,15 @@ Protect `main` with:
17
17
  - Do not allow deletions.
18
18
  - Restrict bypasses to maintainers only.
19
19
 
20
- Required status checks:
20
+ Optional status checks, only after GitHub Actions entitlement is confirmed and the project deliberately chooses hosted CI as required:
21
21
 
22
22
  - `Verify package`
23
23
  - `Review dependency changes`
24
24
  - `Analyze JavaScript and TypeScript`
25
25
  - `Scorecard`
26
26
 
27
+ With the default `githubActions.mode: "off"`, configure no required hosted status checks. GitHub billing, spending-limit, or pre-execution failures cannot be recovered inside workflow YAML and must not block commit/push or ordinary phase progression. Preserve equivalent local test, audit, dependency, and security evidence in the council session.
28
+
27
29
  ## Release Environment
28
30
 
29
31
  Create environment `npm-publish` with:
package/SUPPLY_CHAIN.md CHANGED
@@ -37,8 +37,9 @@ The release workflow and `npm run publish:verify` both use `scripts/post-publish
37
37
 
38
38
  ## Repository Automation
39
39
 
40
- - CI verifies package behavior on push and pull request.
41
- - Dependency Review blocks pull requests that introduce moderate or worse known vulnerabilities.
40
+ - Local `npm run release:check` is the default package verification and supply-chain gate.
41
+ - Hosted CI may mirror package verification on push and pull request when Actions entitlement is deliberately enabled.
42
+ - Dependency Review can block pull requests that introduce moderate or worse known vulnerabilities when hosted Actions is available; otherwise review `npm audit` and lockfile changes locally.
42
43
  - Dependabot proposes npm and GitHub Actions updates; workflow actions remain pinned to immutable commit SHAs with reviewed version comments.
43
44
  - CodeQL scans JavaScript/TypeScript code.
44
45
  - OpenSSF Scorecard publishes repository security posture as code-scanning evidence.
package/dist/index.js CHANGED
@@ -182,11 +182,14 @@ import { join as join14, normalize } from "path";
182
182
 
183
183
  // src/config/defaults.ts
184
184
  var PACKAGE_NAME = "@appsforgood/next-supabase-kit";
185
- var PACKAGE_VERSION = "0.2.1";
185
+ var PACKAGE_VERSION = "0.3.0";
186
186
  var DEFAULT_CONFIG = {
187
187
  stack: "next-supabase",
188
188
  projectType: "saas",
189
189
  docsMode: "advisory",
190
+ githubActions: {
191
+ mode: "off"
192
+ },
190
193
  agentCouncil: {
191
194
  required: true,
192
195
  rosterPath: ".agent-kit/agent-roster.json",
@@ -1726,7 +1729,7 @@ function ideSurfaceToActivateTarget(ideSurface) {
1726
1729
  // src/install/managed-assets.ts
1727
1730
  import { readFileSync as readFileSync8 } from "fs";
1728
1731
  import { join as join10 } from "path";
1729
- function listManagedAssets(packageRoot, stack) {
1732
+ function listManagedAssets(packageRoot, stack, options = {}) {
1730
1733
  const assets = [];
1731
1734
  const templateRoot = join10(packageRoot, "templates", stack);
1732
1735
  for (const target of ROOT_DOCS) {
@@ -1741,8 +1744,10 @@ function listManagedAssets(packageRoot, stack) {
1741
1744
  { target: DEFAULT_ORCHESTRATOR_TARGET, sourcePath: join10(packageRoot, DEFAULT_ORCHESTRATOR_SOURCE), category: "orchestrator" },
1742
1745
  { target: DEFAULT_RUNTIME_IGNORE_TARGET, sourcePath: join10(packageRoot, DEFAULT_RUNTIME_IGNORE_SOURCE), category: "orchestrator" }
1743
1746
  );
1744
- for (const template of CI_TEMPLATE_FILES) {
1745
- assets.push({ target: template.target, sourcePath: join10(packageRoot, template.source), category: "ci" });
1747
+ if (options.includeCi) {
1748
+ for (const template of CI_TEMPLATE_FILES) {
1749
+ assets.push({ target: template.target, sourcePath: join10(packageRoot, template.source), category: "ci" });
1750
+ }
1746
1751
  }
1747
1752
  for (const folder of LIBRARY_FOLDERS) {
1748
1753
  for (const relativePath of listFilesRecursive(join10(packageRoot, folder))) {
@@ -1768,7 +1773,9 @@ function initProject(options) {
1768
1773
  const stack = options.stack ?? DEFAULT_CONFIG.stack;
1769
1774
  const packageRoot = findPackageRoot();
1770
1775
  const templateRoot = join11(packageRoot, "templates", stack);
1771
- const managedAssets = listManagedAssets(packageRoot, stack);
1776
+ const existingGithubActionsMode = readGithubActionsMode(cwd);
1777
+ const githubActionsMode = options.githubActions || existingGithubActionsMode === "advisory" ? "advisory" : "off";
1778
+ const managedAssets = listManagedAssets(packageRoot, stack, { includeCi: githubActionsMode !== "off" });
1772
1779
  if (!existsSync10(templateRoot)) {
1773
1780
  throw new Error(`Unsupported stack profile: ${stack}`);
1774
1781
  }
@@ -1863,20 +1870,26 @@ function initProject(options) {
1863
1870
  };
1864
1871
  writeText(join11(cwd, ".agent-kit", "manifest.json"), `${JSON.stringify(manifest, null, 2)}
1865
1872
  `);
1866
- writeText(join11(cwd, ".agent-kit", "config.json"), `${JSON.stringify(DEFAULT_CONFIG, null, 2)}
1873
+ const config = {
1874
+ ...DEFAULT_CONFIG,
1875
+ githubActions: { mode: githubActionsMode }
1876
+ };
1877
+ writeText(join11(cwd, ".agent-kit", "config.json"), `${JSON.stringify(config, null, 2)}
1867
1878
  `);
1868
1879
  const overridesPath = join11(cwd, ".agent-kit", "overrides.json");
1869
1880
  if (!existsSync10(overridesPath)) writeText(overridesPath, `${JSON.stringify({ templates: {} }, null, 2)}
1870
1881
  `);
1871
- for (const template of CI_TEMPLATE_FILES) {
1872
- const ciCopy = copyTextWithConflict(join11(packageRoot, template.source), cwd, template.target, {
1873
- force: Boolean(options.force),
1874
- conflictRoot: join11(cwd, ".agent-kit", "conflicts")
1875
- });
1876
- if (ciCopy.action === "created") result.copied.push(ciCopy.target);
1877
- if (ciCopy.action === "unchanged") result.unchanged.push(ciCopy.target);
1878
- if (ciCopy.action === "overwritten") result.overwritten.push(ciCopy.target);
1879
- if (ciCopy.action === "conflict") result.conflicts.push(`${ciCopy.target} -> ${ciCopy.conflictPath}`);
1882
+ if (githubActionsMode !== "off") {
1883
+ for (const template of CI_TEMPLATE_FILES) {
1884
+ const ciCopy = copyTextWithConflict(join11(packageRoot, template.source), cwd, template.target, {
1885
+ force: Boolean(options.force),
1886
+ conflictRoot: join11(cwd, ".agent-kit", "conflicts")
1887
+ });
1888
+ if (ciCopy.action === "created") result.copied.push(ciCopy.target);
1889
+ if (ciCopy.action === "unchanged") result.unchanged.push(ciCopy.target);
1890
+ if (ciCopy.action === "overwritten") result.overwritten.push(ciCopy.target);
1891
+ if (ciCopy.action === "conflict") result.conflicts.push(`${ciCopy.target} -> ${ciCopy.conflictPath}`);
1892
+ }
1880
1893
  }
1881
1894
  const context2 = initProjectContext(cwd);
1882
1895
  result.contextPath = context2.contextPath;
@@ -1899,6 +1912,23 @@ function readManifest(cwd) {
1899
1912
  if (!existsSync10(manifestPath)) return null;
1900
1913
  return JSON.parse(readFileSync9(manifestPath, "utf8"));
1901
1914
  }
1915
+ function readGithubActionsMode(cwd) {
1916
+ const configPath = join11(cwd, ".agent-kit", "config.json");
1917
+ if (!existsSync10(configPath)) {
1918
+ const manifest = readManifest(cwd);
1919
+ return manifest?.assetHashes?.[".github/workflows/agent-kit-audit.yml"] ? "advisory" : "off";
1920
+ }
1921
+ try {
1922
+ const config = JSON.parse(readFileSync9(configPath, "utf8"));
1923
+ const mode = config.githubActions?.mode;
1924
+ if (mode === "off" || mode === "advisory") return mode;
1925
+ const manifest = readManifest(cwd);
1926
+ return manifest?.assetHashes?.[".github/workflows/agent-kit-audit.yml"] ? "advisory" : "off";
1927
+ } catch {
1928
+ const manifest = readManifest(cwd);
1929
+ return manifest?.assetHashes?.[".github/workflows/agent-kit-audit.yml"] ? "advisory" : "off";
1930
+ }
1931
+ }
1902
1932
 
1903
1933
  // src/install/audit-rules/project-reality.ts
1904
1934
  import { execFileSync } from "child_process";
@@ -4237,10 +4267,11 @@ function diffStatus(plan) {
4237
4267
  if (plan.action === "unchanged") return "unchanged";
4238
4268
  return "changed";
4239
4269
  }
4240
- function diffProject(cwd, stack = "next-supabase") {
4270
+ function diffProject(cwd, stack = "next-supabase", options = {}) {
4241
4271
  const packageRoot = findPackageRoot();
4242
4272
  const manifest = readManifest(cwd);
4243
- const assets = listManagedAssets(packageRoot, stack);
4273
+ const includeCi = options.githubActions ?? readGithubActionsMode(cwd) !== "off";
4274
+ const assets = listManagedAssets(packageRoot, stack, { includeCi });
4244
4275
  const plans = assets.map((asset) => ({
4245
4276
  asset,
4246
4277
  plan: planFileUpdate({
@@ -4325,7 +4356,7 @@ function updateProject(options) {
4325
4356
  const stack = manifest.stack ?? "next-supabase";
4326
4357
  const templateRoot = join17(packageRoot, "templates", stack);
4327
4358
  if (!existsSync17(templateRoot)) throw new Error(`Unsupported stack profile in manifest: ${stack}`);
4328
- const assets = listManagedAssets(packageRoot, stack);
4359
+ const assets = listManagedAssets(packageRoot, stack, { includeCi: readGithubActionsMode(cwd) !== "off" });
4329
4360
  const plans = assets.map(
4330
4361
  (asset) => planFileUpdate({
4331
4362
  target: asset.target,
@@ -7891,10 +7922,10 @@ async function runSetupServer(options) {
7891
7922
  process.once("SIGTERM", shutdown);
7892
7923
  });
7893
7924
  }
7894
- program.command("init").description("Install agent-kit docs and library files into a project.").option("--stack <stack>", "Stack profile to install.", "next-supabase").option("--force", "Overwrite existing docs instead of writing conflicts.").option("--activate <targets...>", "Promote IDE/runtime adapters: cursor, claude, codex, copilot, antigravity, or all.").option("--guided", "Also create local project context files (interactive on a terminal, scan-based otherwise).").option("--dry-run", "Preview what init would create or conflict on without writing files.").option("--json", "Print machine-readable JSON output.").option("--setup", "Start the setup wizard after install.").option("--no-setup", "Skip the post-install setup wizard prompt.").option("--open", "Open the setup wizard in your default browser.").action(async (options) => {
7925
+ program.command("init").description("Install agent-kit docs and library files into a project.").option("--stack <stack>", "Stack profile to install.", "next-supabase").option("--force", "Overwrite existing docs instead of writing conflicts.").option("--activate <targets...>", "Promote IDE/runtime adapters: cursor, claude, codex, copilot, antigravity, or all.").option("--github-actions", "Install the optional advisory GitHub Actions audit workflow (off by default).").option("--guided", "Also create local project context files (interactive on a terminal, scan-based otherwise).").option("--dry-run", "Preview what init would create or conflict on without writing files.").option("--json", "Print machine-readable JSON output.").option("--setup", "Start the setup wizard after install.").option("--no-setup", "Skip the post-install setup wizard prompt.").option("--open", "Open the setup wizard in your default browser.").action(async (options) => {
7895
7926
  const cwd = process.cwd();
7896
7927
  if (options.dryRun) {
7897
- const preview = diffProject(cwd, options.stack);
7928
+ const preview = diffProject(cwd, options.stack, options.githubActions ? { githubActions: true } : {});
7898
7929
  if (options.json) {
7899
7930
  printJson({ dryRun: true, preview: preview.preview, missing: preview.missing, changed: preview.changed, unchanged: preview.unchanged });
7900
7931
  return;
@@ -7911,6 +7942,7 @@ program.command("init").description("Install agent-kit docs and library files in
7911
7942
  cwd,
7912
7943
  stack: options.stack,
7913
7944
  force: Boolean(options.force),
7945
+ githubActions: Boolean(options.githubActions),
7914
7946
  ...options.activate ? { activate: options.activate } : {}
7915
7947
  });
7916
7948
  const context2 = options.guided ? initProjectContext(cwd) : null;