crewly 1.20.421 → 1.20.423
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/config/skills/agent/core/trace-read/SKILL.md +31 -3
- package/config/skills/agent/core/trace-read/execute.sh +48 -15
- package/dist/backend/backend/src/constants.d.ts +4 -0
- package/dist/backend/backend/src/constants.d.ts.map +1 -1
- package/dist/backend/backend/src/constants.js +4 -0
- package/dist/backend/backend/src/constants.js.map +1 -1
- package/dist/backend/backend/src/controllers/trace/trace.controller.d.ts +2 -1
- package/dist/backend/backend/src/controllers/trace/trace.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/trace/trace.controller.js +13 -1
- package/dist/backend/backend/src/controllers/trace/trace.controller.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +3 -2
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/services/cloud/cloud-sync.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/cloud/cloud-sync.service.js +13 -0
- package/dist/backend/backend/src/services/cloud/cloud-sync.service.js.map +1 -1
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-retro.d.ts +37 -4
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-retro.d.ts.map +1 -1
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-retro.js +83 -4
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot-retro.js.map +1 -1
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.d.ts +11 -0
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.js +36 -6
- package/dist/backend/backend/src/services/project-tickets/ticket-autopilot.service.js.map +1 -1
- package/dist/backend/backend/src/services/trace/trace-metrics.d.ts +9 -0
- package/dist/backend/backend/src/services/trace/trace-metrics.d.ts.map +1 -1
- package/dist/backend/backend/src/services/trace/trace-metrics.js +6 -2
- package/dist/backend/backend/src/services/trace/trace-metrics.js.map +1 -1
- package/dist/backend/backend/src/services/trace/trace-store.d.ts +3 -1
- package/dist/backend/backend/src/services/trace/trace-store.d.ts.map +1 -1
- package/dist/backend/backend/src/services/trace/trace-store.js +5 -3
- package/dist/backend/backend/src/services/trace/trace-store.js.map +1 -1
- package/dist/backend/backend/src/utils/local-api-url.utils.d.ts +32 -6
- package/dist/backend/backend/src/utils/local-api-url.utils.d.ts.map +1 -1
- package/dist/backend/backend/src/utils/local-api-url.utils.js +54 -9
- package/dist/backend/backend/src/utils/local-api-url.utils.js.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/dist/cli/backend/src/constants.d.ts +4 -0
- package/dist/cli/backend/src/constants.d.ts.map +1 -1
- package/dist/cli/backend/src/constants.js +4 -0
- package/dist/cli/backend/src/constants.js.map +1 -1
- package/dist/cli/backend/src/services/cloud/cloud-sync.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/cloud/cloud-sync.service.js +13 -0
- package/dist/cli/backend/src/services/cloud/cloud-sync.service.js.map +1 -1
- package/dist/cli/backend/src/services/trace/trace-store.d.ts +3 -1
- package/dist/cli/backend/src/services/trace/trace-store.d.ts.map +1 -1
- package/dist/cli/backend/src/services/trace/trace-store.js +5 -3
- package/dist/cli/backend/src/services/trace/trace-store.js.map +1 -1
- package/dist/cli/backend/src/utils/local-api-url.utils.d.ts +32 -6
- package/dist/cli/backend/src/utils/local-api-url.utils.d.ts.map +1 -1
- package/dist/cli/backend/src/utils/local-api-url.utils.js +54 -9
- package/dist/cli/backend/src/utils/local-api-url.utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,15 +18,28 @@
|
|
|
18
18
|
* consulted: a backend launched from inside an agent shell inherits that
|
|
19
19
|
* agent's URL, which points at a different instance.
|
|
20
20
|
*
|
|
21
|
+
* The host is an IP literal, never `localhost`. Node resolves every hostname
|
|
22
|
+
* (`localhost` included) with `getaddrinfo` on the libuv threadpool; during
|
|
23
|
+
* the 2026-10-26 Wi-Fi drop the pool was full of hanging Cloud lookups, so
|
|
24
|
+
* the reconciler's own `…/members/start` and the dispatcher's
|
|
25
|
+
* `/api/terminal/:name/write` calls to this very process timed out for
|
|
26
|
+
* twenty minutes ("fetch failed" after 10 s, axios 45 s). An IP literal
|
|
27
|
+
* skips the lookup, so a self-call never waits on DNS.
|
|
28
|
+
*
|
|
21
29
|
* @module utils/local-api-url
|
|
22
30
|
*/
|
|
31
|
+
import { isIP } from 'net';
|
|
23
32
|
import { WEB_CONSTANTS } from '../constants.js';
|
|
24
|
-
/**
|
|
25
|
-
const
|
|
33
|
+
/** Loopback IPv4 literal: reaches a server bound to `0.0.0.0`, `::` (dual-stack) or `localhost` */
|
|
34
|
+
const LOOPBACK_HOST = '127.0.0.1';
|
|
35
|
+
/** Bind addresses that mean "every interface" — loopback reaches them */
|
|
36
|
+
const WILDCARD_BIND_HOSTS = new Set(['0.0.0.0', '::']);
|
|
26
37
|
/** Largest valid TCP port. */
|
|
27
38
|
const MAX_TCP_PORT = 65535;
|
|
28
39
|
/** Port recorded by the running server, or null before it is known. */
|
|
29
40
|
let runningPort = null;
|
|
41
|
+
/** The host self-calls use, derived from the bind host at construction */
|
|
42
|
+
let runningHost = null;
|
|
30
43
|
/**
|
|
31
44
|
* Parse a port value, rejecting anything that is not an integer in 1..65535.
|
|
32
45
|
*
|
|
@@ -38,18 +51,49 @@ export function parsePort(value) {
|
|
|
38
51
|
return Number.isInteger(n) && n >= 1 && n <= MAX_TCP_PORT ? n : null;
|
|
39
52
|
}
|
|
40
53
|
/**
|
|
41
|
-
* Record the port this server listens on
|
|
42
|
-
* resolved `webPort` (from `-p` / `WEB_PORT` / default).
|
|
54
|
+
* Record the port (and bind host) this server listens on, at construction.
|
|
43
55
|
*
|
|
44
|
-
* @param port - The listen port
|
|
45
|
-
* @
|
|
56
|
+
* @param port - The resolved listen port
|
|
57
|
+
* @param bindHost - The address the server binds to; a specific IP literal
|
|
58
|
+
* becomes the self-call host, anything else (wildcard, hostname, absent)
|
|
59
|
+
* means loopback
|
|
60
|
+
* @throws Error when the port is not a valid TCP port
|
|
46
61
|
*/
|
|
47
|
-
export function setLocalApiPort(port) {
|
|
62
|
+
export function setLocalApiPort(port, bindHost) {
|
|
48
63
|
const parsed = parsePort(port);
|
|
49
64
|
if (parsed === null) {
|
|
50
65
|
throw new Error(`Invalid Crewly API port: ${String(port)}`);
|
|
51
66
|
}
|
|
52
67
|
runningPort = parsed;
|
|
68
|
+
runningHost = selfCallHost(bindHost);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The host self-calls and agents use for a server bound to `bindHost`: an IP
|
|
72
|
+
* literal always (no DNS lookup, see the module note), so a specific bind
|
|
73
|
+
* address is used as is (IPv6 bracketed) and a wildcard or hostname bind
|
|
74
|
+
* (`0.0.0.0`, `::`, `localhost`) is reached over `127.0.0.1`.
|
|
75
|
+
*
|
|
76
|
+
* @param bindHost - The server's bind address, if any
|
|
77
|
+
* @returns Host part of the base URL
|
|
78
|
+
*/
|
|
79
|
+
export function selfCallHost(bindHost) {
|
|
80
|
+
const host = (bindHost ?? '').trim();
|
|
81
|
+
if (host === '' || WILDCARD_BIND_HOSTS.has(host))
|
|
82
|
+
return LOOPBACK_HOST;
|
|
83
|
+
const family = isIP(host);
|
|
84
|
+
if (family === 4)
|
|
85
|
+
return host;
|
|
86
|
+
if (family === 6)
|
|
87
|
+
return `[${host}]`;
|
|
88
|
+
return LOOPBACK_HOST;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Host part of this instance's API URL.
|
|
92
|
+
*
|
|
93
|
+
* @returns An IP literal (IPv6 bracketed)
|
|
94
|
+
*/
|
|
95
|
+
export function getLocalApiHost() {
|
|
96
|
+
return runningHost ?? LOOPBACK_HOST;
|
|
53
97
|
}
|
|
54
98
|
/**
|
|
55
99
|
* The port this Crewly instance's API is served on.
|
|
@@ -62,19 +106,20 @@ export function getLocalApiPort() {
|
|
|
62
106
|
return parsePort(process.env.WEB_PORT) ?? WEB_CONSTANTS.PORTS.BACKEND;
|
|
63
107
|
}
|
|
64
108
|
/**
|
|
65
|
-
* Base URL of this instance's API, e.g. `http://
|
|
109
|
+
* Base URL of this instance's API, e.g. `http://127.0.0.1:8797` — the value
|
|
66
110
|
* agents receive as `CREWLY_API_URL`. Paths are appended by the caller
|
|
67
111
|
* (`${getLocalApiBaseUrl()}/api/teams`).
|
|
68
112
|
*
|
|
69
113
|
* @returns The base URL without a trailing slash
|
|
70
114
|
*/
|
|
71
115
|
export function getLocalApiBaseUrl() {
|
|
72
|
-
return `http://${
|
|
116
|
+
return `http://${getLocalApiHost()}:${getLocalApiPort()}`;
|
|
73
117
|
}
|
|
74
118
|
/**
|
|
75
119
|
* Forget the recorded port (tests only).
|
|
76
120
|
*/
|
|
77
121
|
export function resetLocalApiPortForTesting() {
|
|
78
122
|
runningPort = null;
|
|
123
|
+
runningHost = null;
|
|
79
124
|
}
|
|
80
125
|
//# sourceMappingURL=local-api-url.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-api-url.utils.js","sourceRoot":"","sources":["../../../../../backend/src/utils/local-api-url.utils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"local-api-url.utils.js","sourceRoot":"","sources":["../../../../../backend/src/utils/local-api-url.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,mGAAmG;AACnG,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,yEAAyE;AACzE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;AAEvD,8BAA8B;AAC9B,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B,uEAAuE;AAC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B,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,IAAI,GAAG,CAAC;IACrC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,WAAW,IAAI,aAAa,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAC7C,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC;AACxE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,eAAe,EAAE,IAAI,eAAe,EAAE,EAAE,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,WAAW,GAAG,IAAI,CAAC;IACnB,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crewly",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.423",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Multi-agent orchestration platform for AI coding teams — coordinates Claude Code, Gemini CLI, and Codex agents with a real-time web dashboard",
|
|
6
6
|
"workspaces": [
|