@nodii/dev 0.4.1 → 0.5.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/dist/setup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { mkdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { dirname, join, resolve } from "node:path";
3
- import { CliError, hubRequest } from "./core.js";
3
+ import { CliError, checkLogin } from "./core.js";
4
4
 
5
5
  export const SKILL_PATH = ".claude/skills/nodii-build-workflow/SKILL.md";
6
6
  const START = "<!-- nodii-dev build workflow:start -->";
@@ -13,7 +13,7 @@ description: Drive every Nodii build lane through nodii-dev from start to verifi
13
13
 
14
14
  # Nodii build workflow
15
15
 
16
- Use \`nodii-dev\` as the control plane. The canonical policy is \`docs/planning/global/rulebook/build-workflow.md\` §§1–8 (operator rulings A-020/A-021). Never edit hub lane state by another route.
16
+ Use \`nodii-dev\` as the control plane. It talks only to Dev, through the platform edge, signed in with \`nodii-dev login\` as the platform tenant's OAuth app. The canonical policy is the build-workflow rulebook in Dev (\`nodii-dev rulebook list\`), §§1–8 (operator rulings A-020/A-021). Never change lane state in Dev by another route.
17
17
 
18
18
  1. Start: \`nodii-dev lane start KEY --title "..." --kind dev_fix|new_build|docs_change|uat_fix|prod_fix --side backend|frontend|both [--issue ISSUE]\`.
19
19
  2. Ask \`nodii-dev next KEY\`; start, complete, or block the reported API step with \`nodii-dev lane step\`.
@@ -27,14 +27,14 @@ Use \`nodii-dev\` as the control plane. The canonical policy is \`docs/planning/
27
27
  - Dev fix, frontend: approved Figma (unless the rulebook exception applies) → components → adopt and local test → deploy without CI → dev check.
28
28
  - Dev fix, both: run both API step tracks; neither side may be skipped.
29
29
  - New build: feature docs alongside Figma concepts → approvals → backend/design-system build → local test → deploy without CI → dev check.
30
- - Docs change: draft against code → operator review → land on main → publish in the hub.
31
- - UAT/prod fixes remain blocked until the hub/rulebook enables per-push green CI and promotion by commit.
30
+ - Docs change: draft against code → operator review → land on main → publish in Dev.
31
+ - UAT/prod fixes remain blocked until the Dev rulebook enables per-push green CI and promotion by commit.
32
32
 
33
33
  ## Gates and landing
34
34
 
35
- Acquire the repo's heavy slot for heavy work. Run, in order: typecheck → lint and format → scoped touched tests on the real stack → review loop until CLEAN. A reviewer error is not CLEAN. On dev only, the approved no-CI hotfix path is DOOR B (\`[skip-ci-gate]\`) or DOOR C (weekly-cadence marker); still deploy and verify. UAT/prod never use that path. Land through a GitHub PR, never by merging a local/shared main. If the hub is down, merging may continue and the skipped lane gate must be recorded when service returns.
35
+ Acquire the repo's heavy slot for heavy work. Run, in order: typecheck → lint and format → scoped touched tests on the real stack → review loop until CLEAN. A reviewer error is not CLEAN. On dev only, the approved no-CI hotfix path is DOOR B (\`[skip-ci-gate]\`) or DOOR C (weekly-cadence marker); still deploy and verify. UAT/prod never use that path. Land through a GitHub PR, never by merging a local/shared main. If Dev is unreachable, merging may continue and the skipped lane gate must be recorded when service returns.
36
36
 
37
- Do not guess authorization locally: send the request and show the hub refusal unchanged. Stop and Built acknowledgement are staff-only. Machine create/update/coordinator changes are staff-only; coordinators assign agents with \`nodii-dev machine assign MACHINE AGENT --home-repo REPO\`. The target machine coordinator or staff may change lane limits and repository grants. Agents or coordinators report capacity with \`nodii-dev machine report MACHINE --host-facts JSON --memory-facts JSON --heavy-slot-total N\`. Agent registration never sets machine, role, home repo, or lane limit.
37
+ Do not guess authorization locally: send the request and show Dev's refusal unchanged. Stop and Built acknowledgement are staff-only. Machine create/update/coordinator changes are staff-only; coordinators assign agents with \`nodii-dev machine assign MACHINE AGENT --home-repo REPO\`. The target machine coordinator or staff may change lane limits and repository grants. Agents or coordinators report capacity with \`nodii-dev machine report MACHINE --host-facts JSON --memory-facts JSON --heavy-slot-total N\`. Agent registration never sets machine, role, home repo, or lane limit.
38
38
  `;
39
39
 
40
40
  export const managedBlock = `${START}
@@ -94,7 +94,7 @@ export async function setupPlan(root = process.cwd()) {
94
94
  return changes;
95
95
  }
96
96
 
97
- export async function setupCommand(flags, { root = process.cwd(), authCheck = () => hubRequest("GET", "/api/v1/whoami") } = {}) {
97
+ export async function setupCommand(flags, { root = process.cwd(), authCheck = checkLogin } = {}) {
98
98
  const changes = await setupPlan(root);
99
99
  let authenticated = true;
100
100
  try { await authCheck(); } catch { authenticated = false; }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.4.1",
4
- "description": "Agent CLI for the Nodii development hub",
3
+ "version": "0.5.0",
4
+ "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "nodii-dev": "bin/nodii-dev"
@@ -16,11 +16,11 @@
16
16
  },
17
17
  "scripts": {
18
18
  "build": "node build.mjs",
19
- "lint": "node --check src/*.js && node --check test/*.test.js",
19
+ "lint": "node --check src/*.js && node --check test/*.test.js && node --check test/helpers/*.js && node --check scripts/*.mjs",
20
20
  "format": "git diff --check",
21
21
  "test": "node --test test/*.test.js",
22
22
  "pack:smoke": "node scripts/pack-smoke.mjs",
23
- "openapi:snapshot": "curl -sf https://planning.dev.nucleus-cloud.in/openapi.json -o test/fixtures/devops-openapi.snapshot.json"
23
+ "openapi:snapshot": "node scripts/openapi-snapshot.mjs"
24
24
  },
25
25
  "license": "UNLICENSED",
26
26
  "publishConfig": {