@alook/daemon 0.1.13 → 0.1.15
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 +5 -7
- package/dist/cli/index.js +10 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,25 +27,23 @@ is what's reusable — plug in whatever host you like.
|
|
|
27
27
|
|
|
28
28
|
## Daemon lifecycle commands
|
|
29
29
|
|
|
30
|
-
The web Machines sheet generates the full command
|
|
31
|
-
|
|
32
|
-
binary so npm never guesses the wrong executable:
|
|
30
|
+
The web Machines sheet generates the full command. Production commands use the
|
|
31
|
+
built-in Alook endpoints; local development commands include explicit local URLs:
|
|
33
32
|
|
|
34
33
|
```sh
|
|
35
|
-
|
|
36
|
-
--machine-key '<cmt_pair_token>' --server-url '<https_url>' --ws-url '<wss_url>'
|
|
34
|
+
npx --yes @alook/daemon@latest daemon start --machine-key '<cmt_pair_token>'
|
|
37
35
|
```
|
|
38
36
|
|
|
39
37
|
Restart a previously paired machine without rotating its credential:
|
|
40
38
|
|
|
41
39
|
```sh
|
|
42
|
-
|
|
40
|
+
npx --yes @alook/daemon@latest daemon start --id '<machine_id>'
|
|
43
41
|
```
|
|
44
42
|
|
|
45
43
|
Reconnect/rotate only with the command generated for that exact machine:
|
|
46
44
|
|
|
47
45
|
```sh
|
|
48
|
-
|
|
46
|
+
npx --yes @alook/daemon@latest daemon reconnect \
|
|
49
47
|
--id '<machine_id>' --machine-key '<cmt_reconnect_token>'
|
|
50
48
|
```
|
|
51
49
|
|
package/dist/cli/index.js
CHANGED
|
@@ -18638,6 +18638,7 @@ var WS_EVENTS = {
|
|
|
18638
18638
|
BOT_AUDIT_EVENT: "community:bot.audit_event"
|
|
18639
18639
|
};
|
|
18640
18640
|
var COMMUNITY_EVENT_TYPES = new Set(Object.values(WS_EVENTS));
|
|
18641
|
+
var COMMUNITY_BROWSER_EVENT_MAX_BYTES = 65536;
|
|
18641
18642
|
var COMMUNITY_USER_TARGET_MAX_BYTES = 128;
|
|
18642
18643
|
function utf8ByteLength(value) {
|
|
18643
18644
|
return new TextEncoder().encode(value).byteLength;
|
|
@@ -18662,6 +18663,7 @@ function isValidCommunityUserTarget(value) {
|
|
|
18662
18663
|
|
|
18663
18664
|
// ../shared/src/community-message-delivery.ts
|
|
18664
18665
|
var MESSAGE_DELIVERY_MAX_USERS = 1000;
|
|
18666
|
+
var MESSAGE_DELIVERY_MAX_EVENTS_PER_USER = 5;
|
|
18665
18667
|
var target = exports_external.string().refine(isValidCommunityUserTarget);
|
|
18666
18668
|
var targetList = exports_external.array(target).max(MESSAGE_DELIVERY_MAX_USERS);
|
|
18667
18669
|
var memberAddedSchema = exports_external.strictObject({
|
|
@@ -18700,6 +18702,9 @@ var BOT_ACTIVITY_STATUS_PAIRS = [
|
|
|
18700
18702
|
BOT_ACTIVITY_PRESETS.stopping,
|
|
18701
18703
|
...RUNNING_PRESETS
|
|
18702
18704
|
];
|
|
18705
|
+
// ../shared/src/community-ws-bundle.ts
|
|
18706
|
+
var COMMUNITY_BROWSER_EVENT_BATCH_ENVELOPE_BYTES = 1024;
|
|
18707
|
+
var COMMUNITY_BROWSER_EVENT_BATCH_MAX_BYTES = MESSAGE_DELIVERY_MAX_EVENTS_PER_USER * COMMUNITY_BROWSER_EVENT_MAX_BYTES + COMMUNITY_BROWSER_EVENT_BATCH_ENVELOPE_BYTES;
|
|
18703
18708
|
// ../shared/src/db/index.ts
|
|
18704
18709
|
var allSchema = { ...exports_schema, ...exports_community_schema, ...exports_community_machine_schema };
|
|
18705
18710
|
// ../shared/src/db/queries/task.ts
|
|
@@ -27975,6 +27980,8 @@ var RUNNER_TERM_GRACE_MS = 2000;
|
|
|
27975
27980
|
var RUNNER_KILL_GRACE_MS = 2000;
|
|
27976
27981
|
var MACHINE_ID_PATTERN = /^cm_[A-Za-z0-9_-]{8,64}$/;
|
|
27977
27982
|
var LEGACY_DAEMON_ID_PATTERN = /^[a-f0-9]{12}$/;
|
|
27983
|
+
var DEFAULT_SERVER_URL = "https://alook.ai";
|
|
27984
|
+
var DEFAULT_WS_URL = "wss://alook.ai/api/ws/community-daemon";
|
|
27978
27985
|
function resolveDefaultBaseDir() {
|
|
27979
27986
|
const root = process.env.ALOOK_PROJECT_ROOT || path13.join(homedir4(), ".alook");
|
|
27980
27987
|
return path13.join(root, "daemon");
|
|
@@ -28577,12 +28584,8 @@ async function resolveMachineIdentity(serverUrl, credential) {
|
|
|
28577
28584
|
return body.machineId;
|
|
28578
28585
|
}
|
|
28579
28586
|
async function prepareDaemonStart(opts) {
|
|
28580
|
-
const serverUrl = opts.serverUrl || process.env.ALOOK_SERVER_URL;
|
|
28581
|
-
const wsUrl = opts.wsUrl || process.env.ALOOK_SERVER_WS_URL;
|
|
28582
|
-
if (!serverUrl)
|
|
28583
|
-
throw new Error("Server URL required — pass --server-url or set ALOOK_SERVER_URL");
|
|
28584
|
-
if (!wsUrl)
|
|
28585
|
-
throw new Error("WebSocket URL required — pass --ws-url or set ALOOK_SERVER_WS_URL");
|
|
28587
|
+
const serverUrl = opts.serverUrl || process.env.ALOOK_SERVER_URL || DEFAULT_SERVER_URL;
|
|
28588
|
+
const wsUrl = opts.wsUrl || process.env.ALOOK_SERVER_WS_URL || DEFAULT_WS_URL;
|
|
28586
28589
|
if (!opts.machineKey.startsWith("cmt_") && !opts.machineKey.startsWith("cmk_")) {
|
|
28587
28590
|
throw new Error("invalid machine key format — expected `cmt_` or `cmk_`");
|
|
28588
28591
|
}
|
|
@@ -29668,7 +29671,7 @@ function buildProgram(stdin) {
|
|
|
29668
29671
|
});
|
|
29669
29672
|
const daemon = program.command("daemon").description("daemon operations").exitOverride();
|
|
29670
29673
|
daemon.configureOutput({ writeOut: () => {}, writeErr: () => {} });
|
|
29671
|
-
daemon.command("start").description("start the daemon (connects to server, manages agent lifecycles)").option("--machine-key <key>", "machine key for first-time pairing").option("--id <machineId>", "restart a previously paired machine by id").option("--server-url <url>", "server HTTP URL (or ALOOK_SERVER_URL
|
|
29674
|
+
daemon.command("start").description("start the daemon (connects to server, manages agent lifecycles)").option("--machine-key <key>", "machine key for first-time pairing").option("--id <machineId>", "restart a previously paired machine by id").option("--server-url <url>", "server HTTP URL (or ALOOK_SERVER_URL; defaults to production)").option("--ws-url <url>", "server WebSocket URL (or ALOOK_SERVER_WS_URL; defaults to production)").option("--base-dir <path>", "data directory for agent workspaces and pidfile (or ALOOK_DATA_DIR env)").option("--foreground", "run in the current process and tee daemon logs to the terminal").exitOverride().configureOutput({ writeOut: () => {}, writeErr: () => {} }).action(async function() {
|
|
29672
29675
|
const localOpts = this.opts();
|
|
29673
29676
|
const machineKey = localOpts.machineKey;
|
|
29674
29677
|
const id = localOpts.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alook/daemon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Alook agent daemon — host-side runtime backend, process manager, credential proxy, and control plane.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/alookai/alook#readme",
|