overlord-cli 0.2607240957.0 → 0.2607241806.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.
@@ -336,7 +336,7 @@ ovld protocol discover-project --project-id "My Project"
336
336
  ovld protocol discover-project --working-directory /path/to/repo
337
337
  ```
338
338
 
339
- Use `--project-id` when the project ID or name is already known (names are unique per organization, matched case-insensitively). Use `--working-directory` to override cwd path matching. If the runtime has an `OVERLORD_DEVICE_FINGERPRINT`, pass `--device-fingerprint "$OVERLORD_DEVICE_FINGERPRINT"` so resource-directory matching prefers the current device.
339
+ Use `--project-id` when the project ID or name is already known (names are unique per organization, matched case-insensitively). Use `--working-directory` to override cwd path matching. If the runtime has an `OVERLORD_DEVICE_FINGERPRINT`, pass `--device-fingerprint "$OVERLORD_DEVICE_FINGERPRINT"` so resource-directory matching prefers the current device. Set `OVERLORD_DEVICE_LABEL` to override this machine's execution-target display name (defaults to the hostname); it changes only the label, not the fingerprint.
340
340
 
341
341
  ### Creating Projects
342
342
 
@@ -222,7 +222,7 @@ ovld protocol discover-project --project-id "My Project"
222
222
  ovld protocol discover-project --working-directory /path/to/repo
223
223
  ```
224
224
 
225
- Use `--project-id` when the project ID or name is already known (names are unique per organization, matched case-insensitively). Use `--working-directory` to override cwd path matching. If the runtime has an `OVERLORD_DEVICE_FINGERPRINT`, pass `--device-fingerprint "$OVERLORD_DEVICE_FINGERPRINT"` so resource-directory matching prefers the current device.
225
+ Use `--project-id` when the project ID or name is already known (names are unique per organization, matched case-insensitively). Use `--working-directory` to override cwd path matching. If the runtime has an `OVERLORD_DEVICE_FINGERPRINT`, pass `--device-fingerprint "$OVERLORD_DEVICE_FINGERPRINT"` so resource-directory matching prefers the current device. Set `OVERLORD_DEVICE_LABEL` to override this machine's execution-target display name (defaults to the hostname); it changes only the label, not the fingerprint.
226
226
 
227
227
  ## Creating Projects
228
228
 
package/dist/index.js CHANGED
@@ -2947,10 +2947,15 @@ var init_device_identity = __esm({
2947
2947
  // src/device-identity.ts
2948
2948
  import { hostname as hostname2, platform } from "node:os";
2949
2949
  function clientDeviceIdentity() {
2950
- return deviceIdentityFromParts({
2950
+ const identity = deviceIdentityFromParts({
2951
2951
  deviceLabel: hostname2(),
2952
2952
  devicePlatform: platform()
2953
2953
  });
2954
+ const labelOverride = process.env.OVERLORD_DEVICE_LABEL?.trim();
2955
+ if (labelOverride) {
2956
+ identity.deviceLabel = labelOverride;
2957
+ }
2958
+ return identity;
2954
2959
  }
2955
2960
  var init_device_identity2 = __esm({
2956
2961
  "src/device-identity.ts"() {
@@ -17168,6 +17173,43 @@ async function runManagementCommand({
17168
17173
  else console.log(`Linked ${sourceUrl} to project ${projectId}`);
17169
17174
  return;
17170
17175
  }
17176
+ case "add-et": {
17177
+ const name = flagValue(parsed.flags, "--name") ?? parsed.positional.join(" ");
17178
+ const protocolFlags = {};
17179
+ if (name) protocolFlags["--name"] = name;
17180
+ const workspaceId = flagValue(parsed.flags, "--workspace-id");
17181
+ if (workspaceId) protocolFlags["--workspace-id"] = workspaceId;
17182
+ const result = await runtime.backend.post({
17183
+ path: "/api/protocol/register-target",
17184
+ body: { args: rest, positional: parsed.positional, flags: protocolFlags, fileInputs: {} }
17185
+ });
17186
+ const record = asRecord2(result);
17187
+ if (record.status === "workspace_selection_required") {
17188
+ if (json) {
17189
+ printJson({ result });
17190
+ } else {
17191
+ const workspaces = Array.isArray(record.workspaces) ? record.workspaces : [];
17192
+ console.log(
17193
+ "You belong to more than one workspace. Re-run with --workspace-id set to one of:"
17194
+ );
17195
+ for (const entry of workspaces) {
17196
+ const ws = asRecord2(entry);
17197
+ console.log(` - ${ws.name ?? ws.id} (${ws.slug ?? ws.id})`);
17198
+ }
17199
+ }
17200
+ return;
17201
+ }
17202
+ if (json) {
17203
+ printJson({ result });
17204
+ } else {
17205
+ const target = asRecord2(record.executionTarget);
17206
+ const ws = asRecord2(record.workspace);
17207
+ console.log(
17208
+ `Registered execution target ${target.label ?? name ?? ""} (${target.executionTargetId ?? "unknown"}) in workspace ${ws.name ?? ws.id ?? ""}`
17209
+ );
17210
+ }
17211
+ return;
17212
+ }
17171
17213
  case "create":
17172
17214
  case "prompt": {
17173
17215
  const objectivesJson = flagValue(parsed.flags, "--objectives-json");
@@ -17791,6 +17833,7 @@ var COMMAND_FLAGS = {
17791
17833
  ],
17792
17834
  "add-cwd": ["--directory", "--key", "--project-id", "--primary", "--access"],
17793
17835
  "add-url": ["--url", "--project-id", "--key", "--primary", "--access"],
17836
+ "add-et": ["--name", "--workspace-id"],
17794
17837
  create: ["--objectives-json", "--objective", "--prompt", "--project-id", "--title", "--resource"],
17795
17838
  prompt: [
17796
17839
  "--objectives-json",
@@ -17923,6 +17966,10 @@ Projects:
17923
17966
  (prompts to pick a project when --project-id is omitted)
17924
17967
  ${primaryCommand} add-url --url <git-url> --project-id <id> [--key <resourceKey>] [--primary true|false] [--access read|read_write]
17925
17968
 
17969
+ Execution targets:
17970
+ ${primaryCommand} add-et --name "<name>" [--workspace-id <id-or-name>] [--json]
17971
+ (announce this machine as an execution target)
17972
+
17926
17973
  Missions:
17927
17974
  ${primaryCommand} create "<objective>" [--objectives-json '[...]'] [--json]
17928
17975
  ${primaryCommand} prompt "<objective>" [--json]
@@ -17993,6 +18040,7 @@ var KNOWN_COMMANDS = /* @__PURE__ */ new Set([
17993
18040
  "org-setup",
17994
18041
  "add-cwd",
17995
18042
  "add-url",
18043
+ "add-et",
17996
18044
  "create",
17997
18045
  "prompt",
17998
18046
  "attach",