@wenrwa/marketplace-cli 0.6.6 → 0.7.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/README.md +85 -85
- package/dist/__tests__/auth-login-core.test.js +2 -2
- package/dist/__tests__/auth.test.js +4 -4
- package/dist/__tests__/bridge-autostart.test.js +9 -9
- package/dist/__tests__/bridge-checkout-dirty-real-git.test.d.ts +1 -0
- package/dist/__tests__/bridge-checkout-dirty-real-git.test.js +145 -0
- package/dist/__tests__/bridge-checkout-inventory-reporter.test.js +6 -2
- package/dist/__tests__/bridge-checkout-inventory.test.js +128 -14
- package/dist/__tests__/bridge-checkout-park-and-remove.test.js +57 -8
- package/dist/__tests__/bridge-claude-trust.test.d.ts +1 -0
- package/dist/__tests__/bridge-claude-trust.test.js +137 -0
- package/dist/__tests__/bridge-command-browser-options.test.js +1 -1
- package/dist/__tests__/bridge-command-install-env.test.js +1 -1
- package/dist/__tests__/bridge-device-registration.test.js +1 -1
- package/dist/__tests__/bridge-folder-registry.test.js +1 -1
- package/dist/__tests__/bridge-local-add-core.test.js +1 -1
- package/dist/__tests__/bridge-match-pointer.test.d.ts +1 -0
- package/dist/__tests__/bridge-match-pointer.test.js +136 -0
- package/dist/__tests__/bridge-pairing-api.test.js +1 -1
- package/dist/__tests__/bridge-pairing-core.test.js +1 -1
- package/dist/__tests__/bridge-park-remove-frame.test.js +61 -0
- package/dist/__tests__/bridge-relay-client-checkout-inventory.test.js +1 -1
- package/dist/__tests__/bridge-relay-mode.test.js +1 -1
- package/dist/__tests__/bridge-server.test.js +1 -1
- package/dist/__tests__/config.test.js +1 -1
- package/dist/__tests__/devices.test.js +1 -1
- package/dist/__tests__/local.test.js +1 -1
- package/dist/__tests__/openBrowser.test.js +1 -1
- package/dist/__tests__/websocket.test.js +3 -3
- package/dist/auth/identity.d.ts +1 -1
- package/dist/auth/login.d.ts +2 -2
- package/dist/bridge/apiClient.js +2 -2
- package/dist/bridge/autostart.d.ts +1 -1
- package/dist/bridge/autostart.js +1 -1
- package/dist/bridge/checkoutInventory.d.ts +48 -17
- package/dist/bridge/checkoutInventory.js +190 -44
- package/dist/bridge/checkoutParkAndRemove.d.ts +22 -1
- package/dist/bridge/checkoutParkAndRemove.js +37 -7
- package/dist/bridge/claudeTrust.d.ts +37 -0
- package/dist/bridge/claudeTrust.js +85 -0
- package/dist/bridge/config.d.ts +1 -1
- package/dist/bridge/contextWriter.d.ts +2 -0
- package/dist/bridge/contextWriter.js +3 -2
- package/dist/bridge/deviceRegistration.d.ts +1 -1
- package/dist/bridge/envSanitize.d.ts +1 -1
- package/dist/bridge/envSanitize.js +1 -1
- package/dist/bridge/folderRegistry.js +1 -1
- package/dist/bridge/localAdd.js +1 -1
- package/dist/bridge/localContextWriter.d.ts +2 -0
- package/dist/bridge/localContextWriter.js +3 -2
- package/dist/bridge/memoryBrief.d.ts +16 -4
- package/dist/bridge/memoryBrief.js +17 -9
- package/dist/bridge/pairing.d.ts +1 -1
- package/dist/bridge/relayClient.js +11 -1
- package/dist/bridge/server.d.ts +1 -1
- package/dist/bridge/workGraphPointer.d.ts +19 -0
- package/dist/bridge/workGraphPointer.js +26 -1
- package/dist/commands/apps.js +1 -1
- package/dist/commands/auth.d.ts +1 -1
- package/dist/commands/auth.js +6 -6
- package/dist/commands/bridge.js +40 -13
- package/dist/commands/credits.js +1 -1
- package/dist/commands/devices.d.ts +1 -1
- package/dist/commands/devices.js +4 -4
- package/dist/commands/local.d.ts +1 -1
- package/dist/commands/local.js +5 -5
- package/dist/commands/pair.d.ts +1 -1
- package/dist/commands/pair.js +4 -4
- package/dist/index.js +2 -2
- package/dist/utils/config.js +2 -2
- package/dist/utils/openBrowser.d.ts +1 -1
- package/dist/utils/openBrowser.js +1 -1
- package/dist/utils/websocket.js +1 -1
- package/package.json +3 -2
package/dist/commands/bridge.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.buildCompanionForwarder = buildCompanionForwarder;
|
|
|
45
45
|
exports.installBridgeCrashHandlers = installBridgeCrashHandlers;
|
|
46
46
|
exports.resolveBridgeInstallEnv = resolveBridgeInstallEnv;
|
|
47
47
|
/**
|
|
48
|
-
* bct-05 — `
|
|
48
|
+
* bct-05 — `hiveop bridge`: the local Terminal Bridge.
|
|
49
49
|
*
|
|
50
50
|
* Hosts PTYs on the user's machine and serves them to the arena Terminal
|
|
51
51
|
* Pane over a loopback-only WebSocket. The user runs Claude Code themselves
|
|
@@ -107,6 +107,7 @@ const repoSizeEstimate_1 = require("../bridge/repoSizeEstimate");
|
|
|
107
107
|
// for it — see storageQuotaPreflight.ts's module doc for the design.
|
|
108
108
|
const storageQuotaFetch_1 = require("../bridge/storageQuotaFetch");
|
|
109
109
|
const claudeSessionHistory_1 = require("../bridge/claudeSessionHistory");
|
|
110
|
+
const claudeTrust_1 = require("../bridge/claudeTrust");
|
|
110
111
|
// bws-08 (docs/prd/browser-with-sound-in-the-container.md D10) — the
|
|
111
112
|
// companion port forwarder: the tenant boundary between this box's dev
|
|
112
113
|
// servers and the organization-wide Fly private network. See
|
|
@@ -303,7 +304,7 @@ storedConnectToken) {
|
|
|
303
304
|
if (!crewToken) {
|
|
304
305
|
return {
|
|
305
306
|
mode: 'relay-error',
|
|
306
|
-
message: 'Crew relay mode needs a paired machine: run `
|
|
307
|
+
message: 'Crew relay mode needs a paired machine: run `hiveop pair` first, or pass --crew-relay-token <t>.',
|
|
307
308
|
};
|
|
308
309
|
}
|
|
309
310
|
return { mode: 'dual', relayUrl: crewUrl, relayToken: crewToken };
|
|
@@ -688,6 +689,20 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
688
689
|
// and quota refusals must never collapse onto the same one.
|
|
689
690
|
throw new diskPreflight_1.ClonePreflightRefusalError(result.message, result.code);
|
|
690
691
|
}
|
|
692
|
+
// Playtest 2026-10-01 — Claude Code opens a fresh checkout on its
|
|
693
|
+
// folder-trust dialog (default "No, exit") even in bypass mode. The
|
|
694
|
+
// bridge cloned this folder into OUR container: record it trusted
|
|
695
|
+
// in the container's Claude config before claude launches in it.
|
|
696
|
+
// Only when CLAUDE_CONFIG_DIR is set (the image sets it); never
|
|
697
|
+
// fatal — the worst case is the dialog, which arena now waits out.
|
|
698
|
+
if (result.path && process.env.CLAUDE_CONFIG_DIR) {
|
|
699
|
+
try {
|
|
700
|
+
(0, claudeTrust_1.trustClaudeProjectDir)(result.path, { configDir: process.env.CLAUDE_CONFIG_DIR, reposBaseDir });
|
|
701
|
+
}
|
|
702
|
+
catch (err) {
|
|
703
|
+
console.error(`[bridge] could not pre-trust ${result.path} for Claude (non-fatal):`, err);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
691
706
|
return result.path ?? null;
|
|
692
707
|
},
|
|
693
708
|
// msf-34 — the SAME closure, reached without a PTY. The platform's
|
|
@@ -736,13 +751,16 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
736
751
|
*/
|
|
737
752
|
refreshContextPointers: async ({ workspaceId }) => {
|
|
738
753
|
const memoryAvailable = Boolean(process.env.WENRWA_CONNECT_TOKEN);
|
|
739
|
-
|
|
754
|
+
// 2026-10-02 — the same reply says whether this is a MATCH workspace.
|
|
755
|
+
const briefInfo = memoryAvailable ? await (0, memoryBrief_1.fetchWorkspaceBrief)(workspaceId) : null;
|
|
756
|
+
const memoryBrief = briefInfo?.brief ?? null;
|
|
740
757
|
const result = (0, contextWriter_1.writeContext)({
|
|
741
758
|
workspaceId,
|
|
742
759
|
pointersOnly: true,
|
|
743
760
|
workGraphAvailable: Boolean(process.env.WENRWA_CONNECT_TOKEN),
|
|
744
761
|
memoryAvailable,
|
|
745
762
|
memoryBrief,
|
|
763
|
+
match: briefInfo?.match === true,
|
|
746
764
|
}, {
|
|
747
765
|
reposBaseDir,
|
|
748
766
|
exists: (p) => fs.existsSync(p),
|
|
@@ -757,11 +775,13 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
757
775
|
writeContext: async ({ workspaceId, content }) => {
|
|
758
776
|
// wmr-03 — the workspace's memory brief, fetched at manifest time so
|
|
759
777
|
// the agent has it in context from its next turn. Never blocks the
|
|
760
|
-
// write:
|
|
778
|
+
// write: fetchWorkspaceBrief resolves null on any failure (PRD D2), and
|
|
761
779
|
// carries its own bounded timeout so a hanging backend cannot stall a
|
|
762
780
|
// terminal opening.
|
|
763
781
|
const memoryAvailable = Boolean(process.env.WENRWA_CONNECT_TOKEN);
|
|
764
|
-
|
|
782
|
+
// 2026-10-02 — the same reply says whether this is a MATCH workspace.
|
|
783
|
+
const briefInfo = memoryAvailable ? await (0, memoryBrief_1.fetchWorkspaceBrief)(workspaceId) : null;
|
|
784
|
+
const memoryBrief = briefInfo?.brief ?? null;
|
|
765
785
|
const result = (0, contextWriter_1.writeContext)({
|
|
766
786
|
workspaceId,
|
|
767
787
|
content,
|
|
@@ -775,6 +795,7 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
775
795
|
// MCP tools named by the memory pointer are registered here.
|
|
776
796
|
memoryAvailable,
|
|
777
797
|
memoryBrief,
|
|
798
|
+
match: briefInfo?.match === true,
|
|
778
799
|
}, {
|
|
779
800
|
reposBaseDir,
|
|
780
801
|
exists: (p) => fs.existsSync(p),
|
|
@@ -910,7 +931,7 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
910
931
|
}
|
|
911
932
|
config = (0, config_1.loadBridgeConfig)();
|
|
912
933
|
if (!config) {
|
|
913
|
-
console.error(chalk_1.default.red('Pairing did not leave a usable config — try `
|
|
934
|
+
console.error(chalk_1.default.red('Pairing did not leave a usable config — try `hiveop pair` again.'));
|
|
914
935
|
process.exit(1);
|
|
915
936
|
return;
|
|
916
937
|
}
|
|
@@ -1013,7 +1034,7 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
1013
1034
|
reportChanges: true,
|
|
1014
1035
|
// Workspace-scoped shells: the pane sends the workspace's GitHub URL;
|
|
1015
1036
|
// we land the PTY in a local checkout (user's own git credentials).
|
|
1016
|
-
// lws-03: read fresh on every /discovery request so `
|
|
1037
|
+
// lws-03: read fresh on every /discovery request so `hiveop local
|
|
1017
1038
|
// add/remove` (a separate process invocation) shows up live, no daemon
|
|
1018
1039
|
// restart needed.
|
|
1019
1040
|
// lws-04: `treeVersion` is the change signal the arena tree client
|
|
@@ -1085,13 +1106,16 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
1085
1106
|
if (!entry)
|
|
1086
1107
|
return;
|
|
1087
1108
|
const memoryAvailable = mcp.action !== 'claude-not-found';
|
|
1088
|
-
|
|
1109
|
+
// 2026-10-02 — the same reply says whether this is a MATCH workspace.
|
|
1110
|
+
const briefInfo = memoryAvailable ? await (0, memoryBrief_1.fetchWorkspaceBrief)(workspaceId) : null;
|
|
1111
|
+
const memoryBrief = briefInfo?.brief ?? null;
|
|
1089
1112
|
(0, localContextWriter_1.writeLocalContext)({
|
|
1090
1113
|
projectRoot: entry.path,
|
|
1091
1114
|
pointersOnly: true,
|
|
1092
1115
|
workGraphAvailable: mcp.action !== 'claude-not-found',
|
|
1093
1116
|
memoryAvailable,
|
|
1094
1117
|
memoryBrief,
|
|
1118
|
+
match: briefInfo?.match === true,
|
|
1095
1119
|
}, realLocalContextWriterDeps());
|
|
1096
1120
|
},
|
|
1097
1121
|
writeLocalContext: async ({ workspaceId, content }) => {
|
|
@@ -1102,7 +1126,9 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
1102
1126
|
// THIS bridge run actually registered the MCP server. Fetch failures
|
|
1103
1127
|
// resolve null and leave the standing instruction in place (PRD D2).
|
|
1104
1128
|
const memoryAvailable = mcp.action !== 'claude-not-found';
|
|
1105
|
-
|
|
1129
|
+
// 2026-10-02 — the same reply says whether this is a MATCH workspace.
|
|
1130
|
+
const briefInfo = memoryAvailable ? await (0, memoryBrief_1.fetchWorkspaceBrief)(workspaceId) : null;
|
|
1131
|
+
const memoryBrief = briefInfo?.brief ?? null;
|
|
1106
1132
|
return (0, localContextWriter_1.writeLocalContext)({
|
|
1107
1133
|
projectRoot: entry.path,
|
|
1108
1134
|
content,
|
|
@@ -1116,6 +1142,7 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
1116
1142
|
workGraphAvailable: mcp.action !== 'claude-not-found',
|
|
1117
1143
|
memoryAvailable,
|
|
1118
1144
|
memoryBrief,
|
|
1145
|
+
match: briefInfo?.match === true,
|
|
1119
1146
|
}, realLocalContextWriterDeps());
|
|
1120
1147
|
},
|
|
1121
1148
|
// lws-06 — best-effort `claude` binary check before spawning an
|
|
@@ -1188,7 +1215,7 @@ exports.bridgeCommand = new commander_1.Command('bridge')
|
|
|
1188
1215
|
console.log(chalk_1.default.cyan(`Terminal Bridge listening on ${handle.address}:${handle.port} (origin: ${opts.origin})`));
|
|
1189
1216
|
console.log(chalk_1.default.dim('Open your arena workspace and add a Terminal pane — it will connect automatically.'));
|
|
1190
1217
|
console.log(chalk_1.default.dim('Ctrl+C stops the bridge (terminal sessions end with it).'));
|
|
1191
|
-
console.log(chalk_1.default.dim('Tip: `
|
|
1218
|
+
console.log(chalk_1.default.dim('Tip: `hiveop bridge install` makes this start automatically at login.'));
|
|
1192
1219
|
// fcct-27 — additionally dial out, so the server-side conductor can drive
|
|
1193
1220
|
// crew members on this machine.
|
|
1194
1221
|
//
|
|
@@ -1293,14 +1320,14 @@ exports.bridgeCommand
|
|
|
1293
1320
|
const result = await (0, autostart_1.installAutostart)(realAutostartDeps());
|
|
1294
1321
|
if (result.action === 'installed') {
|
|
1295
1322
|
console.log(chalk_1.default.green(`✓ Bridge installed as a login service (${result.plistPath})`));
|
|
1296
|
-
console.log(chalk_1.default.dim('It is running now and will start at every login. `
|
|
1323
|
+
console.log(chalk_1.default.dim('It is running now and will start at every login. `hiveop bridge uninstall` removes it.'));
|
|
1297
1324
|
}
|
|
1298
1325
|
else if (result.action === 'no-token') {
|
|
1299
|
-
console.error(chalk_1.default.red('No Connect Token stored yet. Run once first:
|
|
1326
|
+
console.error(chalk_1.default.red('No Connect Token stored yet. Run once first: hiveop bridge --token <wm_ct_…>'));
|
|
1300
1327
|
process.exit(1);
|
|
1301
1328
|
}
|
|
1302
1329
|
else {
|
|
1303
|
-
console.error(chalk_1.default.yellow('Autostart is currently macOS-only — run `
|
|
1330
|
+
console.error(chalk_1.default.yellow('Autostart is currently macOS-only — run `hiveop bridge` manually on this platform.'));
|
|
1304
1331
|
process.exit(1);
|
|
1305
1332
|
}
|
|
1306
1333
|
});
|
package/dist/commands/credits.js
CHANGED
|
@@ -79,7 +79,7 @@ exports.creditsCommand
|
|
|
79
79
|
console.log(` Sponsored: ${data.sponsoredTx ? chalk_1.default.green('Yes') : 'No'}`);
|
|
80
80
|
console.log('');
|
|
81
81
|
console.log(chalk_1.default.dim('Sign the transaction with your wallet and submit:'));
|
|
82
|
-
console.log(chalk_1.default.dim(`
|
|
82
|
+
console.log(chalk_1.default.dim(` hiveop credits confirm ${data.depositId} <tx-signature>`));
|
|
83
83
|
console.log('');
|
|
84
84
|
console.log(chalk_1.default.dim('Unsigned TX (base64):'));
|
|
85
85
|
console.log(chalk_1.default.dim(data.sponsoredTx || data.unsignedTx));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* lws-03 — `
|
|
2
|
+
* lws-03 — `hiveop devices`. Lists/revokes this account's paired
|
|
3
3
|
* machines (bridge devices). Revoking a device stops its Connect Token from
|
|
4
4
|
* authenticating (see backend ConnectTokenService.verify) — "revoke kills
|
|
5
5
|
* serving" (ADR-0035 D2). Full settings-UI management is lws-05's concern;
|
package/dist/commands/devices.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.devicesCommand = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* lws-03 — `
|
|
8
|
+
* lws-03 — `hiveop devices`. Lists/revokes this account's paired
|
|
9
9
|
* machines (bridge devices). Revoking a device stops its Connect Token from
|
|
10
10
|
* authenticating (see backend ConnectTokenService.verify) — "revoke kills
|
|
11
11
|
* serving" (ADR-0035 D2). Full settings-UI management is lws-05's concern;
|
|
@@ -22,13 +22,13 @@ exports.devicesCommand = new commander_1.Command('devices')
|
|
|
22
22
|
.action(async () => {
|
|
23
23
|
const config = (0, config_1.loadBridgeConfig)();
|
|
24
24
|
if (!config) {
|
|
25
|
-
console.error(chalk_1.default.red('No Connect Token. Run:
|
|
25
|
+
console.error(chalk_1.default.red('No Connect Token. Run: hiveop bridge --token <wm_ct_…> first.'));
|
|
26
26
|
process.exit(1);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const { devices } = await (0, apiClient_1.listDevices)({ apiUrl: (0, bridge_1.bridgeApiUrl)(), connectToken: config.connectToken });
|
|
30
30
|
if (devices.length === 0) {
|
|
31
|
-
console.log('No devices connected yet. Run `
|
|
31
|
+
console.log('No devices connected yet. Run `hiveop bridge` on a machine to connect it.');
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
console.log((0, format_1.makeTable)(['ID', 'Name', 'Status'], devices.map((d) => [
|
|
@@ -44,7 +44,7 @@ exports.devicesCommand
|
|
|
44
44
|
.action(async (deviceId) => {
|
|
45
45
|
const config = (0, config_1.loadBridgeConfig)();
|
|
46
46
|
if (!config) {
|
|
47
|
-
console.error(chalk_1.default.red('No Connect Token. Run:
|
|
47
|
+
console.error(chalk_1.default.red('No Connect Token. Run: hiveop bridge --token <wm_ct_…> first.'));
|
|
48
48
|
process.exit(1);
|
|
49
49
|
return;
|
|
50
50
|
}
|
package/dist/commands/local.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* lws-03 — `
|
|
2
|
+
* lws-03 — `hiveop local add/list/remove`. The primary "folder attach"
|
|
3
3
|
* mechanism (PRD D3a): registers the cwd (or a given path) as a local
|
|
4
4
|
* workspace, idempotent by absolute path. The open arena create-modal
|
|
5
5
|
* live-detects additions via the bridge's /discovery poll (server.ts
|
package/dist/commands/local.js
CHANGED
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.localCommand = void 0;
|
|
40
40
|
/**
|
|
41
|
-
* lws-03 — `
|
|
41
|
+
* lws-03 — `hiveop local add/list/remove`. The primary "folder attach"
|
|
42
42
|
* mechanism (PRD D3a): registers the cwd (or a given path) as a local
|
|
43
43
|
* workspace, idempotent by absolute path. The open arena create-modal
|
|
44
44
|
* live-detects additions via the bridge's /discovery poll (server.ts
|
|
@@ -60,12 +60,12 @@ exports.localCommand
|
|
|
60
60
|
.action(async (pathArg) => {
|
|
61
61
|
const config = (0, config_1.loadBridgeConfig)();
|
|
62
62
|
if (!config) {
|
|
63
|
-
console.error(chalk_1.default.red('No Connect Token. Run:
|
|
63
|
+
console.error(chalk_1.default.red('No Connect Token. Run: hiveop bridge --token <wm_ct_…> first (mint one in arena settings).'));
|
|
64
64
|
process.exit(1);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
if (!config.deviceId) {
|
|
68
|
-
console.error(chalk_1.default.red('This machine is not connected yet. Run `
|
|
68
|
+
console.error(chalk_1.default.red('This machine is not connected yet. Run `hiveop bridge` once (it connects automatically), then retry.'));
|
|
69
69
|
process.exit(1);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
@@ -92,7 +92,7 @@ exports.localCommand
|
|
|
92
92
|
catch (err) {
|
|
93
93
|
if (err instanceof apiClient_1.BridgeApiError && err.status === 401) {
|
|
94
94
|
console.error(chalk_1.default.red(`This machine's connection was revoked: ${err.message} ` +
|
|
95
|
-
'Reconnect: mint a new Connect Token in arena settings, then `
|
|
95
|
+
'Reconnect: mint a new Connect Token in arena settings, then `hiveop bridge --token <wm_ct_…>`.'));
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
console.error(chalk_1.default.red(err?.message || String(err)));
|
|
@@ -107,7 +107,7 @@ exports.localCommand
|
|
|
107
107
|
const registry = (0, folderRegistry_1.loadFolderRegistry)();
|
|
108
108
|
const rows = Object.entries(registry.entries);
|
|
109
109
|
if (rows.length === 0) {
|
|
110
|
-
console.log('No local workspaces registered. Run `
|
|
110
|
+
console.log('No local workspaces registered. Run `hiveop local add .` from a project folder.');
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
console.log((0, format_1.makeTable)(['Workspace ID', 'Name', 'Path'], rows.map(([p, entry]) => [entry.workspaceId, entry.name, p])));
|
package/dist/commands/pair.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* lws-14 — `
|
|
2
|
+
* lws-14 — `hiveop pair`: device-code pairing (GitHub-CLI / Apple-TV
|
|
3
3
|
* pattern). Requests a code, prints it large with the settings URL, then
|
|
4
4
|
* polls until a human approves it in the browser — no secret is ever typed
|
|
5
5
|
* or pasted here. Ctrl-C safe: SIGINT flips a cancellation flag the poll
|
package/dist/commands/pair.js
CHANGED
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.pairCommand = void 0;
|
|
40
40
|
exports.runPair = runPair;
|
|
41
41
|
/**
|
|
42
|
-
* lws-14 — `
|
|
42
|
+
* lws-14 — `hiveop pair`: device-code pairing (GitHub-CLI / Apple-TV
|
|
43
43
|
* pattern). Requests a code, prints it large with the settings URL, then
|
|
44
44
|
* polls until a human approves it in the browser — no secret is ever typed
|
|
45
45
|
* or pasted here. Ctrl-C safe: SIGINT flips a cancellation flag the poll
|
|
@@ -90,15 +90,15 @@ function report(outcome) {
|
|
|
90
90
|
switch (outcome.result.outcome) {
|
|
91
91
|
case 'paired':
|
|
92
92
|
console.log(chalk_1.default.green('✓ Paired! Connect Token stored (~/.wen-market/bridge-config.json, 0600).'));
|
|
93
|
-
console.log(chalk_1.default.dim('Run `
|
|
93
|
+
console.log(chalk_1.default.dim('Run `hiveop bridge` to start serving.'));
|
|
94
94
|
return 'paired';
|
|
95
95
|
case 'expired':
|
|
96
96
|
console.error(chalk_1.default.red(`Code ${outcome.code} expired before it was approved.`));
|
|
97
|
-
console.log(chalk_1.default.dim('Run `
|
|
97
|
+
console.log(chalk_1.default.dim('Run `hiveop pair` again for a fresh code.'));
|
|
98
98
|
return 'failed';
|
|
99
99
|
case 'timeout':
|
|
100
100
|
console.error(chalk_1.default.red('Timed out waiting for approval.'));
|
|
101
|
-
console.log(chalk_1.default.dim('Run `
|
|
101
|
+
console.log(chalk_1.default.dim('Run `hiveop pair` again for a fresh code.'));
|
|
102
102
|
return 'failed';
|
|
103
103
|
case 'cancelled':
|
|
104
104
|
default:
|
package/dist/index.js
CHANGED
|
@@ -22,8 +22,8 @@ const pair_1 = require("./commands/pair");
|
|
|
22
22
|
const { version } = require('../package.json');
|
|
23
23
|
const program = new commander_1.Command();
|
|
24
24
|
program
|
|
25
|
-
.name('
|
|
26
|
-
.description('
|
|
25
|
+
.name('hiveop')
|
|
26
|
+
.description('HiveOp CLI')
|
|
27
27
|
.version(version);
|
|
28
28
|
program.addCommand(auth_1.authCommand);
|
|
29
29
|
program.addCommand(workspace_1.workspaceCommand);
|
package/dist/utils/config.js
CHANGED
|
@@ -72,7 +72,7 @@ function clearConfig() {
|
|
|
72
72
|
function requireConfig() {
|
|
73
73
|
const config = loadConfig();
|
|
74
74
|
if (!config) {
|
|
75
|
-
console.error('Not logged in. Run:
|
|
75
|
+
console.error('Not logged in. Run: hiveop auth login');
|
|
76
76
|
process.exit(1);
|
|
77
77
|
return config;
|
|
78
78
|
}
|
|
@@ -84,7 +84,7 @@ function requireConfig() {
|
|
|
84
84
|
// no longer authenticates anything.
|
|
85
85
|
if (!(0, apiKeyFormat_1.isRealApiKey)(config.apiKey)) {
|
|
86
86
|
console.error('Your saved credential looks like a wallet address, not an API key.');
|
|
87
|
-
console.error('Run:
|
|
87
|
+
console.error('Run: hiveop auth login');
|
|
88
88
|
process.exit(1);
|
|
89
89
|
return config;
|
|
90
90
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* wha-08 — best-effort "open the approval URL in a browser" for
|
|
3
|
-
* `
|
|
3
|
+
* `hiveop auth login`. The code + URL are always printed regardless of
|
|
4
4
|
* whether this works (over SSH there is no browser at all), so any failure
|
|
5
5
|
* here is swallowed — never surfaced as an error.
|
|
6
6
|
*/
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.openBrowser = openBrowser;
|
|
4
4
|
/**
|
|
5
5
|
* wha-08 — best-effort "open the approval URL in a browser" for
|
|
6
|
-
* `
|
|
6
|
+
* `hiveop auth login`. The code + URL are always printed regardless of
|
|
7
7
|
* whether this works (over SSH there is no browser at all), so any failure
|
|
8
8
|
* here is swallowed — never surfaced as an error.
|
|
9
9
|
*/
|
package/dist/utils/websocket.js
CHANGED
|
@@ -18,7 +18,7 @@ const format_1 = require("./format");
|
|
|
18
18
|
// socket-auth middleware (backend/src/middleware/socket-auth.middleware.ts)
|
|
19
19
|
// refuses bad/revoked credentials with a `connect_error` carrying
|
|
20
20
|
// `err.data.code` of CREDENTIAL_INVALID or SESSION_REVOKED.
|
|
21
|
-
const AUTH_LOGIN_HINT = 'Run `
|
|
21
|
+
const AUTH_LOGIN_HINT = 'Run `hiveop auth login` to sign in again.';
|
|
22
22
|
function connectRefusalMessage(err) {
|
|
23
23
|
const code = err?.data?.code;
|
|
24
24
|
if (code === 'CREDENTIAL_INVALID') {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenrwa/marketplace-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "CLI tool for the Wenrwa Agent Marketplace
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "CLI tool for the Wenrwa Agent Marketplace \u2014 monitor bounties, agents, workspaces, and treasury from your terminal",
|
|
5
5
|
"author": "Wenrwa <dev@wenrwa.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://marketplace.wenrwa.com",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"node": ">=18.0.0"
|
|
17
17
|
},
|
|
18
18
|
"bin": {
|
|
19
|
+
"hiveop": "dist/index.js",
|
|
19
20
|
"wen-market": "dist/index.js"
|
|
20
21
|
},
|
|
21
22
|
"files": [
|