@nodii/dev 0.4.0 → 0.4.1
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 +2 -2
- package/dist/core.js +1 -1
- package/dist/nodii-dev.js +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Linux only (the launcher is a POSIX shell script).
|
|
|
12
12
|
nodii-dev login # opens the approval page in your browser
|
|
13
13
|
nodii-dev login --no-browser # prints the link and code instead
|
|
14
14
|
nodii-dev login --scope devops.issues.read,devops.issues.write # narrower grant
|
|
15
|
-
nodii-dev agent register --name my-agent
|
|
15
|
+
nodii-dev agent register --name my-agent
|
|
16
16
|
|
|
17
17
|
# Temporary compatibility path:
|
|
18
18
|
printf '%s' "$PLANNING_HUB_HMAC_SECRET" | nodii-dev login --person PERSON_ID --secret-stdin
|
|
@@ -47,7 +47,7 @@ nodii-dev config show
|
|
|
47
47
|
nodii-dev api list [--tag TAG] [--json]
|
|
48
48
|
nodii-dev api OPERATION_ID [--param name=value ...] [--body @file|-|JSON]
|
|
49
49
|
|
|
50
|
-
nodii-dev agent register --name NAME [--
|
|
50
|
+
nodii-dev agent register --name NAME [--session ID] # staff bind the agent to a service on the Dev Agents page
|
|
51
51
|
nodii-dev agent heartbeat
|
|
52
52
|
nodii-dev agents spawn SERVICE [--repo-root DIR]
|
|
53
53
|
nodii-dev agents cowork-tick [--json]
|
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.4.
|
|
7
|
+
export const VERSION = "0.4.1";
|
|
8
8
|
export const DEFAULT_HUB_URL = "https://planning.dev.nucleus-cloud.in";
|
|
9
9
|
export const OPERATOR_AGENT_ID = "00000000-0000-0000-0000-000000000001";
|
|
10
10
|
export const configPath = () =>
|
package/dist/nodii-dev.js
CHANGED
|
@@ -55,7 +55,7 @@ const HELP = `nodii-dev ${VERSION}
|
|
|
55
55
|
Usage: nodii-dev <command> [options] [--json]
|
|
56
56
|
|
|
57
57
|
login | logout | whoami | config show
|
|
58
|
-
agent register --name NAME
|
|
58
|
+
agent register --name NAME | agent heartbeat
|
|
59
59
|
issues list|show|create|update|claim|release
|
|
60
60
|
inbox list|show
|
|
61
61
|
drift file | request file
|
|
@@ -323,7 +323,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
323
323
|
const docs = await hubRequest("GET", `/api/v1/feature-docs${query({ serviceId, status: "approved", limit: 200 })}`);
|
|
324
324
|
if (!docs.data?.length) throw new CliError("NO_APPROVED_WORK", `No approved feature docs for ${serviceId}`, 1);
|
|
325
325
|
const repo = `${f["repo-root"] ?? `${process.env.HOME}/Projects`}/${serviceId}`;
|
|
326
|
-
return emit({ data: { serviceId, repo, approvedFeatureDocs: docs.data.length, next: `cd ${repo} && nodii-dev agent register --name <name
|
|
326
|
+
return emit({ data: { serviceId, repo, approvedFeatureDocs: docs.data.length, next: `cd ${repo} && nodii-dev agent register --name <name>` } }, json);
|
|
327
327
|
}
|
|
328
328
|
if (command === "agents" && action === "cowork-tick") {
|
|
329
329
|
if (f.plist) {
|
|
@@ -342,11 +342,16 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
342
342
|
if (action === "register") {
|
|
343
343
|
const result = await hubRequest("POST", c.authProvider === "oauth" ? "/api/v1/agents/register" : "/api/v1/agents", {
|
|
344
344
|
sessionId: f.session ?? crypto.randomUUID(),
|
|
345
|
-
serviceId: f.service ?? "nodii-planning-hub",
|
|
346
345
|
name: requireFlag(f, "name"),
|
|
347
346
|
...(c.authProvider === "oauth" ? {} : { personId: c.person }),
|
|
348
347
|
});
|
|
349
348
|
await writeConfig({ ...c, agentId: result.data.id });
|
|
349
|
+
// The hub ignores a self-claimed service: staff bind agents to services
|
|
350
|
+
// on the Dev Agents page (devops.agents.bind).
|
|
351
|
+
if (f.service)
|
|
352
|
+
process.stderr.write(
|
|
353
|
+
"--service is ignored: staff bind agents to a service on the Dev Agents page.\n",
|
|
354
|
+
);
|
|
350
355
|
await hubRequest(
|
|
351
356
|
"POST",
|
|
352
357
|
`/api/v1/agents/${encode(result.data.id)}/heartbeat`,
|