crewly 1.20.175 → 1.20.177
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/orchestrator/update-team-member/SKILL.md +1 -1
- package/dist/backend/backend/src/constants.d.ts +65 -3
- package/dist/backend/backend/src/constants.d.ts.map +1 -1
- package/dist/backend/backend/src/constants.js +79 -3
- package/dist/backend/backend/src/constants.js.map +1 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.js +2 -1
- package/dist/backend/backend/src/controllers/monitoring/terminal.controller.js.map +1 -1
- package/dist/backend/backend/src/controllers/system/runtime-fallback.controller.d.ts +30 -0
- package/dist/backend/backend/src/controllers/system/runtime-fallback.controller.d.ts.map +1 -0
- package/dist/backend/backend/src/controllers/system/runtime-fallback.controller.js +100 -0
- package/dist/backend/backend/src/controllers/system/runtime-fallback.controller.js.map +1 -0
- package/dist/backend/backend/src/controllers/team/team.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/team/team.controller.js +33 -4
- package/dist/backend/backend/src/controllers/team/team.controller.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +25 -0
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/routes/modules/system.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/routes/modules/system.routes.js +3 -0
- package/dist/backend/backend/src/routes/modules/system.routes.js.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-heartbeat-monitor.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-heartbeat-monitor.service.js +6 -0
- package/dist/backend/backend/src/services/agent/agent-heartbeat-monitor.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts +10 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.js +103 -7
- package/dist/backend/backend/src/services/agent/agent-registration.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/antigravity-runtime.service.d.ts +1 -1
- package/dist/backend/backend/src/services/agent/antigravity-runtime.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/antigravity-runtime.service.js +3 -2
- package/dist/backend/backend/src/services/agent/antigravity-runtime.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.d.ts +7 -0
- package/dist/backend/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.js +16 -0
- package/dist/backend/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/idle-detection.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/idle-detection.service.js +2 -1
- package/dist/backend/backend/src/services/agent/idle-detection.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/oauth-relogin-monitor.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/oauth-relogin-monitor.service.js +7 -0
- package/dist/backend/backend/src/services/agent/oauth-relogin-monitor.service.js.map +1 -1
- package/dist/backend/backend/src/services/agent/tmux.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/tmux.service.js +2 -1
- package/dist/backend/backend/src/services/agent/tmux.service.js.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.dispatcher.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.dispatcher.service.js +15 -1
- package/dist/backend/backend/src/services/chat-v2/chat-v2.dispatcher.service.js.map +1 -1
- package/dist/backend/backend/src/services/harness/harness-status.service.d.ts +17 -0
- package/dist/backend/backend/src/services/harness/harness-status.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/harness/harness-status.service.js +25 -1
- package/dist/backend/backend/src/services/harness/harness-status.service.js.map +1 -1
- package/dist/backend/backend/src/services/messaging/queue-processor.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/messaging/queue-processor.service.js +2 -1
- package/dist/backend/backend/src/services/messaging/queue-processor.service.js.map +1 -1
- package/dist/backend/backend/src/services/monitoring/activity-monitor.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/monitoring/activity-monitor.service.js +3 -2
- package/dist/backend/backend/src/services/monitoring/activity-monitor.service.js.map +1 -1
- package/dist/backend/backend/src/services/orchestrator/orchestrator-status.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/orchestrator/orchestrator-status.service.js +3 -2
- package/dist/backend/backend/src/services/orchestrator/orchestrator-status.service.js.map +1 -1
- package/dist/backend/backend/src/services/runtime-fallback/effective-runtime.d.ts +100 -0
- package/dist/backend/backend/src/services/runtime-fallback/effective-runtime.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/effective-runtime.js +115 -0
- package/dist/backend/backend/src/services/runtime-fallback/effective-runtime.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/reset-time.d.ts +66 -0
- package/dist/backend/backend/src/services/runtime-fallback/reset-time.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/reset-time.js +211 -0
- package/dist/backend/backend/src/services/runtime-fallback/reset-time.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-availability.d.ts +39 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-availability.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-availability.js +56 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-availability.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.service.d.ts +377 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.service.js +867 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.service.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.store.d.ts +53 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.store.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.store.js +107 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.store.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.types.d.ts +126 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.types.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.types.js +152 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.types.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.wiring.d.ts +82 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.wiring.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.wiring.js +219 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-fallback.wiring.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-smoke-test.service.d.ts +203 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-smoke-test.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-smoke-test.service.js +419 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-smoke-test.service.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-usage-probe.d.ts +54 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-usage-probe.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-usage-probe.js +80 -0
- package/dist/backend/backend/src/services/runtime-fallback/runtime-usage-probe.js.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/usage-limit-rules.d.ts +99 -0
- package/dist/backend/backend/src/services/runtime-fallback/usage-limit-rules.d.ts.map +1 -0
- package/dist/backend/backend/src/services/runtime-fallback/usage-limit-rules.js +240 -0
- package/dist/backend/backend/src/services/runtime-fallback/usage-limit-rules.js.map +1 -0
- package/dist/backend/backend/src/services/slack/slack-team-channel.service.d.ts +35 -0
- package/dist/backend/backend/src/services/slack/slack-team-channel.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/slack/slack-team-channel.service.js +108 -3
- package/dist/backend/backend/src/services/slack/slack-team-channel.service.js.map +1 -1
- package/dist/backend/backend/src/services/workflow/message-scheduler.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/workflow/message-scheduler.service.js +3 -2
- package/dist/backend/backend/src/services/workflow/message-scheduler.service.js.map +1 -1
- package/dist/backend/backend/src/services/workflow/scheduler.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/workflow/scheduler.service.js +3 -2
- package/dist/backend/backend/src/services/workflow/scheduler.service.js.map +1 -1
- package/dist/backend/backend/src/types/index.d.ts +14 -0
- package/dist/backend/backend/src/types/index.d.ts.map +1 -1
- package/dist/backend/backend/src/types/index.js.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/dist/cli/backend/src/constants.d.ts +65 -3
- package/dist/cli/backend/src/constants.d.ts.map +1 -1
- package/dist/cli/backend/src/constants.js +79 -3
- package/dist/cli/backend/src/constants.js.map +1 -1
- package/dist/cli/backend/src/services/agent/agent-registration.service.d.ts +10 -1
- package/dist/cli/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/agent-registration.service.js +103 -7
- package/dist/cli/backend/src/services/agent/agent-registration.service.js.map +1 -1
- package/dist/cli/backend/src/services/agent/antigravity-runtime.service.d.ts +1 -1
- package/dist/cli/backend/src/services/agent/antigravity-runtime.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/antigravity-runtime.service.js +3 -2
- package/dist/cli/backend/src/services/agent/antigravity-runtime.service.js.map +1 -1
- package/dist/cli/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.d.ts +7 -0
- package/dist/cli/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.js +16 -0
- package/dist/cli/backend/src/services/agent/crewly-agent/crewly-agent-external-runtime.service.js.map +1 -1
- package/dist/cli/backend/src/services/agent/oauth-relogin-monitor.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/agent/oauth-relogin-monitor.service.js +7 -0
- package/dist/cli/backend/src/services/agent/oauth-relogin-monitor.service.js.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.dispatcher.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.dispatcher.service.js +15 -1
- package/dist/cli/backend/src/services/chat-v2/chat-v2.dispatcher.service.js.map +1 -1
- package/dist/cli/backend/src/services/harness/harness-status.service.d.ts +17 -0
- package/dist/cli/backend/src/services/harness/harness-status.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/harness/harness-status.service.js +25 -1
- package/dist/cli/backend/src/services/harness/harness-status.service.js.map +1 -1
- package/dist/cli/backend/src/services/messaging/queue-processor.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/messaging/queue-processor.service.js +2 -1
- package/dist/cli/backend/src/services/messaging/queue-processor.service.js.map +1 -1
- package/dist/cli/backend/src/services/monitoring/activity-monitor.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/monitoring/activity-monitor.service.js +3 -2
- package/dist/cli/backend/src/services/monitoring/activity-monitor.service.js.map +1 -1
- package/dist/cli/backend/src/services/orchestrator/orchestrator-status.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/orchestrator/orchestrator-status.service.js +3 -2
- package/dist/cli/backend/src/services/orchestrator/orchestrator-status.service.js.map +1 -1
- package/dist/cli/backend/src/services/runtime-fallback/effective-runtime.d.ts +100 -0
- package/dist/cli/backend/src/services/runtime-fallback/effective-runtime.d.ts.map +1 -0
- package/dist/cli/backend/src/services/runtime-fallback/effective-runtime.js +115 -0
- package/dist/cli/backend/src/services/runtime-fallback/effective-runtime.js.map +1 -0
- package/dist/cli/backend/src/services/slack/slack-team-channel.service.d.ts +35 -0
- package/dist/cli/backend/src/services/slack/slack-team-channel.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/slack/slack-team-channel.service.js +108 -3
- package/dist/cli/backend/src/services/slack/slack-team-channel.service.js.map +1 -1
- package/dist/cli/backend/src/types/index.d.ts +14 -0
- package/dist/cli/backend/src/types/index.d.ts.map +1 -1
- package/dist/cli/backend/src/types/index.js.map +1 -1
- package/dist/cli/cli/src/utils/runtime-auth.d.ts +1 -1
- package/dist/cli/cli/src/utils/runtime-auth.js +1 -1
- package/frontend/dist/assets/{index-0726afab.js → index-69af46c3.js} +275 -275
- package/frontend/dist/assets/{index-0c5449b5.css → index-cdc52122.css} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { CREWLY_CONSTANTS, WEB_CONSTANTS } from '../../../../config/index.js';
|
|
|
12
12
|
import { getSessionBackendSync } from '../session/index.js';
|
|
13
13
|
import { isInProcessRuntimeActive } from '../agent/crewly-agent/in-process-runtime-registry.js';
|
|
14
14
|
import { RUNTIME_TYPES } from '../../constants.js';
|
|
15
|
+
import { effectiveRuntimeType } from '../runtime-fallback/effective-runtime.js';
|
|
15
16
|
/** Dashboard URL for user-facing messages */
|
|
16
17
|
const DASHBOARD_URL = `http://localhost:${WEB_CONSTANTS.PORTS.FRONTEND}`;
|
|
17
18
|
/**
|
|
@@ -78,7 +79,7 @@ export async function getOrchestratorStatus() {
|
|
|
78
79
|
// registry confirms a ready runtime is registered. The PTY path is
|
|
79
80
|
// untouched for `claude-code` / other runtimes.
|
|
80
81
|
if (!sessionExists
|
|
81
|
-
&& orchestratorStatus?.runtimeType === RUNTIME_TYPES.CREWLY_AGENT
|
|
82
|
+
&& effectiveRuntimeType(sessionName, orchestratorStatus?.runtimeType ?? '') === RUNTIME_TYPES.CREWLY_AGENT
|
|
82
83
|
&& sessionName
|
|
83
84
|
&& isInProcessRuntimeActive(sessionName)) {
|
|
84
85
|
sessionExists = true;
|
|
@@ -199,7 +200,7 @@ async function resolveRuntimeTypeForSession(sessionName) {
|
|
|
199
200
|
const storageService = StorageService.getInstance();
|
|
200
201
|
const found = await storageService.findMemberBySessionName(sessionName);
|
|
201
202
|
if (found?.member?.runtimeType) {
|
|
202
|
-
return found.member.runtimeType;
|
|
203
|
+
return effectiveRuntimeType(sessionName, found.member.runtimeType);
|
|
203
204
|
}
|
|
204
205
|
const orchestrator = await storageService.getOrchestratorStatus();
|
|
205
206
|
const orchestratorSession = orchestrator?.sessionName || CREWLY_CONSTANTS.SESSIONS.ORCHESTRATOR_NAME;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-status.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/orchestrator/orchestrator-status.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator-status.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/orchestrator/orchestrator-status.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAA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AmB,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;gBACtD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,uEAAuE;QACvE,uEAAuE;QACvE,cAAc;QACd,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,4BAA4B,CAAC,WAAW,CAAC,CAAC;QACpE,OAAO,WAAW,KAAK,aAAa,CAAC,YAAY,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAAC,UAAU,GAAG,IAAI;IAC7D,MAAM,WAAW,GAAG,wCAAwC,CAAC;IAC7D,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,GAAG,WAAW,iDAAiD,aAAa,EAAE,CAAC;IACxF,CAAC;IACD,OAAO,GAAG,WAAW,6CAA6C,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime an agent really runs on, for code that only knows the
|
|
3
|
+
* member's configured runtime.
|
|
4
|
+
*
|
|
5
|
+
* While an agent runs on a fallback runtime (its runtime ran out of usage)
|
|
6
|
+
* the member record still names its configured runtime. Every place that
|
|
7
|
+
* decides HOW to talk to a session (PTY heuristics, Ctrl+C, delivery,
|
|
8
|
+
* activity detection) asks {@link effectiveRuntimeType} instead.
|
|
9
|
+
*
|
|
10
|
+
* This module holds only the hooks the RuntimeFallbackService registers, so
|
|
11
|
+
* importing it is cheap and cycle-free; with no service registered every
|
|
12
|
+
* function is a no-op that returns the configured value.
|
|
13
|
+
*
|
|
14
|
+
* @module services/runtime-fallback/effective-runtime
|
|
15
|
+
*/
|
|
16
|
+
/** Where a usage-limit report came from. */
|
|
17
|
+
export type RuntimeOutputSource = 'output' | 'screen' | 'error';
|
|
18
|
+
/** What {@link resolveLaunchRuntime} decided. */
|
|
19
|
+
export interface LaunchRuntimeDecision {
|
|
20
|
+
/** Runtime to launch */
|
|
21
|
+
runtime: string;
|
|
22
|
+
/** True when it is not the configured runtime (a fallback) */
|
|
23
|
+
overridden: boolean;
|
|
24
|
+
/** Model to run when the fallback is the Crewly Agent (provider/model) */
|
|
25
|
+
crewlyAgentModel?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Input of a launch decision. */
|
|
28
|
+
export interface LaunchRuntimeInput {
|
|
29
|
+
sessionName: string;
|
|
30
|
+
/** The member's (or orchestrator's) configured runtime */
|
|
31
|
+
configured: string;
|
|
32
|
+
memberId?: string;
|
|
33
|
+
teamId?: string;
|
|
34
|
+
isOrchestrator: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** Hooks the RuntimeFallbackService provides. */
|
|
37
|
+
export interface RuntimeFallbackHooks {
|
|
38
|
+
/** Runtime a session runs on instead of its configured one, or null */
|
|
39
|
+
overrideFor(sessionName: string): string | null;
|
|
40
|
+
/** Runtime to launch a session on (may start a fallback for an exhausted runtime) */
|
|
41
|
+
resolveLaunch(input: LaunchRuntimeInput): Promise<LaunchRuntimeDecision>;
|
|
42
|
+
/** Before a message is written into a session: deliver now, or queue it (a switch is running / needed) */
|
|
43
|
+
beforeDelivery(sessionName: string, runtime: string): 'deliver' | 'queue';
|
|
44
|
+
/** Runtime output / error text of a session, checked for a usage limit */
|
|
45
|
+
reportOutput(sessionName: string, runtime: string, text: string, source: RuntimeOutputSource): boolean;
|
|
46
|
+
/** One-time note for the session's next kickoff (after a switch), consumed */
|
|
47
|
+
takeKickoffNote(sessionName: string): string | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Register (or clear) the hooks.
|
|
51
|
+
*
|
|
52
|
+
* @param next - Hooks, or null
|
|
53
|
+
*/
|
|
54
|
+
export declare function setRuntimeFallbackHooks(next: RuntimeFallbackHooks | null): void;
|
|
55
|
+
/**
|
|
56
|
+
* The runtime a session actually runs on.
|
|
57
|
+
*
|
|
58
|
+
* @param sessionName - Session name (undefined → configured)
|
|
59
|
+
* @param configured - Its configured runtime
|
|
60
|
+
* @returns The fallback runtime while one is active, else `configured`
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const runtime = effectiveRuntimeType(member.sessionName, member.runtimeType as RuntimeType);
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function effectiveRuntimeType<T extends string>(sessionName: string | undefined | null, configured: T): T;
|
|
68
|
+
/**
|
|
69
|
+
* Decide the runtime to launch a session on.
|
|
70
|
+
*
|
|
71
|
+
* @param input - Session and its configured runtime
|
|
72
|
+
* @returns The decision (configured runtime when no hooks are registered)
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveLaunchRuntime(input: LaunchRuntimeInput): Promise<LaunchRuntimeDecision>;
|
|
75
|
+
/**
|
|
76
|
+
* Gate before a delivery.
|
|
77
|
+
*
|
|
78
|
+
* @param sessionName - Target session
|
|
79
|
+
* @param runtime - Runtime the caller resolved
|
|
80
|
+
* @returns `queue` when the message must wait for a runtime switch
|
|
81
|
+
*/
|
|
82
|
+
export declare function runtimeFallbackBeforeDelivery(sessionName: string, runtime: string): 'deliver' | 'queue';
|
|
83
|
+
/**
|
|
84
|
+
* Report runtime output (live chunk, screen, or an error) for usage-limit detection.
|
|
85
|
+
*
|
|
86
|
+
* @param sessionName - Session
|
|
87
|
+
* @param runtime - Runtime it runs on
|
|
88
|
+
* @param text - Output / error text (never logged)
|
|
89
|
+
* @param source - Where it came from
|
|
90
|
+
* @returns True when a usage limit was recognised
|
|
91
|
+
*/
|
|
92
|
+
export declare function reportRuntimeOutput(sessionName: string, runtime: string, text: string, source: RuntimeOutputSource): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Take the note a session's next kickoff should carry after a switch.
|
|
95
|
+
*
|
|
96
|
+
* @param sessionName - Session
|
|
97
|
+
* @returns The note, once, or null
|
|
98
|
+
*/
|
|
99
|
+
export declare function takeRuntimeSwitchKickoffNote(sessionName: string): string | null;
|
|
100
|
+
//# sourceMappingURL=effective-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-runtime.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/runtime-fallback/effective-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE,iDAAiD;AACjD,MAAM,WAAW,qBAAqB;IACrC,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,UAAU,EAAE,OAAO,CAAC;IACpB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;CACxB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACpC,uEAAuE;IACvE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,qFAAqF;IACrF,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACzE,0GAA0G;IAC1G,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1E,0EAA0E;IAC1E,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC;IACvG,8EAA8E;IAC9E,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACpD;AAID;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAE/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAO/G;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAOpG;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAOvG;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAO5H;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO/E"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime an agent really runs on, for code that only knows the
|
|
3
|
+
* member's configured runtime.
|
|
4
|
+
*
|
|
5
|
+
* While an agent runs on a fallback runtime (its runtime ran out of usage)
|
|
6
|
+
* the member record still names its configured runtime. Every place that
|
|
7
|
+
* decides HOW to talk to a session (PTY heuristics, Ctrl+C, delivery,
|
|
8
|
+
* activity detection) asks {@link effectiveRuntimeType} instead.
|
|
9
|
+
*
|
|
10
|
+
* This module holds only the hooks the RuntimeFallbackService registers, so
|
|
11
|
+
* importing it is cheap and cycle-free; with no service registered every
|
|
12
|
+
* function is a no-op that returns the configured value.
|
|
13
|
+
*
|
|
14
|
+
* @module services/runtime-fallback/effective-runtime
|
|
15
|
+
*/
|
|
16
|
+
let hooks = null;
|
|
17
|
+
/**
|
|
18
|
+
* Register (or clear) the hooks.
|
|
19
|
+
*
|
|
20
|
+
* @param next - Hooks, or null
|
|
21
|
+
*/
|
|
22
|
+
export function setRuntimeFallbackHooks(next) {
|
|
23
|
+
hooks = next;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The runtime a session actually runs on.
|
|
27
|
+
*
|
|
28
|
+
* @param sessionName - Session name (undefined → configured)
|
|
29
|
+
* @param configured - Its configured runtime
|
|
30
|
+
* @returns The fallback runtime while one is active, else `configured`
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const runtime = effectiveRuntimeType(member.sessionName, member.runtimeType as RuntimeType);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function effectiveRuntimeType(sessionName, configured) {
|
|
38
|
+
if (!hooks || !sessionName)
|
|
39
|
+
return configured;
|
|
40
|
+
try {
|
|
41
|
+
return hooks.overrideFor(sessionName) ?? configured;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return configured;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Decide the runtime to launch a session on.
|
|
49
|
+
*
|
|
50
|
+
* @param input - Session and its configured runtime
|
|
51
|
+
* @returns The decision (configured runtime when no hooks are registered)
|
|
52
|
+
*/
|
|
53
|
+
export async function resolveLaunchRuntime(input) {
|
|
54
|
+
if (!hooks)
|
|
55
|
+
return { runtime: input.configured, overridden: false };
|
|
56
|
+
try {
|
|
57
|
+
return await hooks.resolveLaunch(input);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return { runtime: input.configured, overridden: false };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gate before a delivery.
|
|
65
|
+
*
|
|
66
|
+
* @param sessionName - Target session
|
|
67
|
+
* @param runtime - Runtime the caller resolved
|
|
68
|
+
* @returns `queue` when the message must wait for a runtime switch
|
|
69
|
+
*/
|
|
70
|
+
export function runtimeFallbackBeforeDelivery(sessionName, runtime) {
|
|
71
|
+
if (!hooks)
|
|
72
|
+
return 'deliver';
|
|
73
|
+
try {
|
|
74
|
+
return hooks.beforeDelivery(sessionName, runtime);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return 'deliver';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Report runtime output (live chunk, screen, or an error) for usage-limit detection.
|
|
82
|
+
*
|
|
83
|
+
* @param sessionName - Session
|
|
84
|
+
* @param runtime - Runtime it runs on
|
|
85
|
+
* @param text - Output / error text (never logged)
|
|
86
|
+
* @param source - Where it came from
|
|
87
|
+
* @returns True when a usage limit was recognised
|
|
88
|
+
*/
|
|
89
|
+
export function reportRuntimeOutput(sessionName, runtime, text, source) {
|
|
90
|
+
if (!hooks || !text)
|
|
91
|
+
return false;
|
|
92
|
+
try {
|
|
93
|
+
return hooks.reportOutput(sessionName, runtime, text, source);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Take the note a session's next kickoff should carry after a switch.
|
|
101
|
+
*
|
|
102
|
+
* @param sessionName - Session
|
|
103
|
+
* @returns The note, once, or null
|
|
104
|
+
*/
|
|
105
|
+
export function takeRuntimeSwitchKickoffNote(sessionName) {
|
|
106
|
+
if (!hooks)
|
|
107
|
+
return null;
|
|
108
|
+
try {
|
|
109
|
+
return hooks.takeKickoffNote(sessionName);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=effective-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-runtime.js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AAU,mBAAmB,CAAC,WAAmB,EAAE,OAAe,EAAE,IAAY,EAAE,MAA2B;IAClH,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,CAAC;QACJ,OAAO,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,WAAmB;IAC/D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,CAAC;QACJ,OAAO,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC"}
|
|
@@ -52,6 +52,8 @@ export interface TeamChannelSlackApi {
|
|
|
52
52
|
}>;
|
|
53
53
|
/** Member user ids of a channel, bots included — picks between same-named agents. */
|
|
54
54
|
listChannelMembers?(channelId: string): Promise<string[]>;
|
|
55
|
+
/** The connected (master) bot's own user id, cached after the first `auth.test`. Optional. */
|
|
56
|
+
getBotUserId?(): Promise<string | null>;
|
|
55
57
|
uploadFile(options: {
|
|
56
58
|
channelId: string;
|
|
57
59
|
filePath: string;
|
|
@@ -173,6 +175,14 @@ export declare function slackChannelNameFor(teamName: string, prefix?: string):
|
|
|
173
175
|
* @returns True for `adhoc:<channel>` mappings
|
|
174
176
|
*/
|
|
175
177
|
export declare function isAdhocMapping(mapping: Pick<SlackTeamChannelMapping, 'teamId'>): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether a team is a runtime smoke test's temporary team
|
|
180
|
+
* (specs/2026-10-01-runtime-fallback.md).
|
|
181
|
+
*
|
|
182
|
+
* @param team - The team
|
|
183
|
+
* @returns True for `zz-runtime-smoke-<runtime>`
|
|
184
|
+
*/
|
|
185
|
+
export declare function isRuntimeSmokeTeam(team: Pick<Team, 'name'>): boolean;
|
|
176
186
|
/**
|
|
177
187
|
* The agents that take part in a team channel: every member except the
|
|
178
188
|
* orchestrator role (the orc is not a huddle participant — the point of
|
|
@@ -539,6 +549,10 @@ export declare class SlackTeamChannelService {
|
|
|
539
549
|
* the thread id and the `reply-channel` hint.
|
|
540
550
|
* 4. Answer unknown `@names` in-thread with suggestions.
|
|
541
551
|
*
|
|
552
|
+
* A person's message that @'s only people (Slack users that are not Crewly
|
|
553
|
+
* agents) is recorded as context and dispatched to nobody: no 👀, no
|
|
554
|
+
* placeholder, no ticket, no unanswered-message watch, no suggestion hint.
|
|
555
|
+
*
|
|
542
556
|
* @param message - The inbound Slack message
|
|
543
557
|
* @returns The routing result, or null when the channel is not mapped
|
|
544
558
|
*/
|
|
@@ -744,6 +758,27 @@ export declare class SlackTeamChannelService {
|
|
|
744
758
|
* @returns Member user ids, or null
|
|
745
759
|
*/
|
|
746
760
|
private membersOf;
|
|
761
|
+
/**
|
|
762
|
+
* The people (not Crewly agents) a message @'s.
|
|
763
|
+
*
|
|
764
|
+
* A native `<@U…>` mention is not a person when the id is a local agent's
|
|
765
|
+
* own bot (any team), the orchestrator's bot, the connected master bot, or
|
|
766
|
+
* a bot the directory lists (agents on other machines, other accounts'
|
|
767
|
+
* agents, other bots in the channel). The directory is the same cached
|
|
768
|
+
* list the roster line reads, so no extra Slack call is made per message.
|
|
769
|
+
* Every other id is a person — someone the agents were not asked to answer
|
|
770
|
+
* for.
|
|
771
|
+
*
|
|
772
|
+
* A plain `@Name` that matched no agent but is a person who has spoken in
|
|
773
|
+
* a mapped channel is a person too, and is taken out of
|
|
774
|
+
* `resolved.unknown` so nobody is offered a "did you mean" for it.
|
|
775
|
+
*
|
|
776
|
+
* @param message - The inbound message
|
|
777
|
+
* @param resolved - Agent mentions already resolved (its `unknown` is pruned)
|
|
778
|
+
* @param teams - Every local team
|
|
779
|
+
* @returns People's user ids and plain names
|
|
780
|
+
*/
|
|
781
|
+
private peopleMentions;
|
|
747
782
|
/**
|
|
748
783
|
* Remember a person's names so an agent writing `@Their Name` reaches them.
|
|
749
784
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack-team-channel.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/slack/slack-team-channel.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAAsC,KAAK,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAMnH,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EAEpB,oBAAoB,EACpB,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EAEtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAU/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAM3F,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,WAAW,IAAI,OAAO,CAAC;IACvB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvD,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpE,W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C,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IA0D/F;;;;;OAKG;IACG,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBpE,iEAAiE;YACnD,SAAS;YAmBT,WAAW;YA0BX,sBAAsB;IA6BpC,yEAAyE;IACzE,OAAO,CAAC,UAAU;CAanB;AAmBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,GAAG,IAAI,CAExF;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,uBAAuB,GAAG,IAAI,CAE3E"}
|
|
1
|
+
{"version":3,"file":"slack-team-channel.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/slack/slack-team-channel.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAAsC,KAAK,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAMnH,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EAEpB,oBAAoB,EACpB,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EAEtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAU/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAM3F,mDAAmD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B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CACP;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,GAC7F;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAChC;IAmDD,OAAO,CAAC,uBAAuB;IAoB/B;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IA0D/F;;;;;OAKG;IACG,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBpE,iEAAiE;YACnD,SAAS;YAmBT,WAAW;YA0BX,sBAAsB;IA6BpC,yEAAyE;IACzE,OAAO,CAAC,UAAU;CAanB;AAmBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,GAAG,IAAI,CAExF;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,uBAAuB,GAAG,IAAI,CAE3E"}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*/
|
|
27
27
|
import { getTicketIntakeService } from '../v3/ticket-intake.service.js';
|
|
28
28
|
import { intakeWithin, slackIntakeMessage, ticketOfOutcome, markAndLinkTicket } from '../v3/ticket-channel-hooks.js';
|
|
29
|
-
import { CREWLY_CONSTANTS } from '../../constants.js';
|
|
29
|
+
import { CREWLY_CONSTANTS, RUNTIME_FALLBACK_CONSTANTS } from '../../constants.js';
|
|
30
30
|
import { isInterim } from './slack-typing-placeholder.service.js';
|
|
31
31
|
import { isOwnerAuthored, deliveredSessions } from './slack-auto-working.service.js';
|
|
32
32
|
import { resolveMemberSessionName } from '../../utils/member-session-name.utils.js';
|
|
@@ -41,7 +41,7 @@ import { LoggerService } from '../core/logger.service.js';
|
|
|
41
41
|
import { getSlackDirectoryService } from './slack-directory.service.js';
|
|
42
42
|
import { SLACK_TEAM_CHANNEL_CONSTANTS, OWNER_EVIDENCE_METADATA, SLACK_THREAD_KEY_CONSTANTS } from '../../constants.js';
|
|
43
43
|
import { parseSlackThreadKey } from './slack-thread-key.js';
|
|
44
|
-
import { resolveSlackMentions } from './slack-mention-resolver.js';
|
|
44
|
+
import { resolveSlackMentions, extractNativeMentionIds } from './slack-mention-resolver.js';
|
|
45
45
|
import { toSlackMrkdwn } from './slack-mrkdwn.js';
|
|
46
46
|
import { renderSlackThreadContext } from './slack-thread-context.service.js';
|
|
47
47
|
const EMPTY_STORE = {
|
|
@@ -82,6 +82,16 @@ export function slackChannelNameFor(teamName, prefix = '') {
|
|
|
82
82
|
export function isAdhocMapping(mapping) {
|
|
83
83
|
return mapping.teamId.startsWith(SLACK_TEAM_CHANNEL_CONSTANTS.ADHOC_TEAM_PREFIX);
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Whether a team is a runtime smoke test's temporary team
|
|
87
|
+
* (specs/2026-10-01-runtime-fallback.md).
|
|
88
|
+
*
|
|
89
|
+
* @param team - The team
|
|
90
|
+
* @returns True for `zz-runtime-smoke-<runtime>`
|
|
91
|
+
*/
|
|
92
|
+
export function isRuntimeSmokeTeam(team) {
|
|
93
|
+
return typeof team.name === 'string' && team.name.startsWith(RUNTIME_FALLBACK_CONSTANTS.SMOKE.TEAM_PREFIX);
|
|
94
|
+
}
|
|
85
95
|
/**
|
|
86
96
|
* The agents that take part in a team channel: every member except the
|
|
87
97
|
* orchestrator role (the orc is not a huddle participant — the point of
|
|
@@ -181,6 +191,10 @@ export function orchestratorSyncEntry(deviceName, instanceId) {
|
|
|
181
191
|
};
|
|
182
192
|
}
|
|
183
193
|
export function teamChannelMembers(team) {
|
|
194
|
+
// A runtime smoke test's temporary team lives for minutes: no Slack
|
|
195
|
+
// channel, no owner invite, no agent app for it.
|
|
196
|
+
if (isRuntimeSmokeTeam(team))
|
|
197
|
+
return [];
|
|
184
198
|
return (team.members ?? [])
|
|
185
199
|
.filter((m) => m.role !== 'orchestrator' && !!m.id)
|
|
186
200
|
.map((m) => (m.sessionName ? m : { ...m, sessionName: resolveMemberSessionName(team.name, m) }));
|
|
@@ -915,7 +929,7 @@ export class SlackTeamChannelService {
|
|
|
915
929
|
// team-saved event; turning each of those into a Slack channel would
|
|
916
930
|
// carpet the workspace with channels for teams that pre-date this
|
|
917
931
|
// feature. Existing teams get a channel from Settings → Team Channels.
|
|
918
|
-
if (!event.created)
|
|
932
|
+
if (!event.created || isRuntimeSmokeTeam(team))
|
|
919
933
|
return;
|
|
920
934
|
const settings = await this.getSettings();
|
|
921
935
|
if (!settings.autoCreate || !this.deps.slack.isConnected())
|
|
@@ -944,6 +958,10 @@ export class SlackTeamChannelService {
|
|
|
944
958
|
* the thread id and the `reply-channel` hint.
|
|
945
959
|
* 4. Answer unknown `@names` in-thread with suggestions.
|
|
946
960
|
*
|
|
961
|
+
* A person's message that @'s only people (Slack users that are not Crewly
|
|
962
|
+
* agents) is recorded as context and dispatched to nobody: no 👀, no
|
|
963
|
+
* placeholder, no ticket, no unanswered-message watch, no suggestion hint.
|
|
964
|
+
*
|
|
947
965
|
* @param message - The inbound Slack message
|
|
948
966
|
* @returns The routing result, or null when the channel is not mapped
|
|
949
967
|
*/
|
|
@@ -1024,6 +1042,17 @@ export class SlackTeamChannelService {
|
|
|
1024
1042
|
const isLocal = (sess) => this.deps.isLocalAgent?.(sess) ?? members.some((m) => m.sessionName === sess);
|
|
1025
1043
|
const mentionedElsewhere = (message.mentionedAgentSessions ?? []).filter((sess) => !isLocal(sess));
|
|
1026
1044
|
const addressedElsewhereOnly = !handoffTo && resolved.mentions.length === 0 && mentionedElsewhere.length > 0;
|
|
1045
|
+
// @-mentions of people: the owner asking a
|
|
1046
|
+
// colleague is not a question for the agents (2026-10-01,
|
|
1047
|
+
// #course-standardization-team: "@Info 这些课堂视频是…?" in a thread
|
|
1048
|
+
// Jordan had been in — Jordan, as last speaker, answered it).
|
|
1049
|
+
const peopleMentions = message.authorAgentSession || handoffTo
|
|
1050
|
+
? { userIds: [], names: [] }
|
|
1051
|
+
: await this.peopleMentions(message, resolved, teams);
|
|
1052
|
+
const addressedPeopleOnly = !addressedElsewhereOnly &&
|
|
1053
|
+
resolved.mentions.length === 0 &&
|
|
1054
|
+
(message.mentionedAgentSessions ?? []).length === 0 &&
|
|
1055
|
+
peopleMentions.userIds.length + peopleMentions.names.length > 0;
|
|
1027
1056
|
// Thread correlation.
|
|
1028
1057
|
const slackThreadTs = message.threadTs || message.ts;
|
|
1029
1058
|
let threadId;
|
|
@@ -1061,6 +1090,14 @@ export class SlackTeamChannelService {
|
|
|
1061
1090
|
slackTs: message.ts,
|
|
1062
1091
|
slackUserId: message.userId,
|
|
1063
1092
|
...(message.teamId ? { slackTeamId: message.teamId } : {}),
|
|
1093
|
+
...(peopleMentions.userIds.length + peopleMentions.names.length > 0
|
|
1094
|
+
? {
|
|
1095
|
+
[SLACK_TEAM_CHANNEL_CONSTANTS.PEOPLE_MENTIONS_METADATA_KEY]: [
|
|
1096
|
+
...peopleMentions.userIds,
|
|
1097
|
+
...peopleMentions.names,
|
|
1098
|
+
],
|
|
1099
|
+
}
|
|
1100
|
+
: {}),
|
|
1064
1101
|
// Marks the row as agent-authored: the commitment-approval gate must
|
|
1065
1102
|
// never read a colleague agent's post as owner approval (#730).
|
|
1066
1103
|
...(remoteAgent ? { [OWNER_EVIDENCE_METADATA.REMOTE_AGENT_SESSION]: remoteAgent } : {}),
|
|
@@ -1124,6 +1161,18 @@ export class SlackTeamChannelService {
|
|
|
1124
1161
|
});
|
|
1125
1162
|
return { mapping, message: persisted, mentions: [], dispatch: null };
|
|
1126
1163
|
}
|
|
1164
|
+
if (addressedPeopleOnly) {
|
|
1165
|
+
// Context for the agents' next turn in this thread, nothing more. No
|
|
1166
|
+
// suggestion hint either: the names were people, not typos.
|
|
1167
|
+
this.logger.info('Slack team message addressed to people, not agents — recorded, not dispatched', {
|
|
1168
|
+
teamId: mapping.teamId,
|
|
1169
|
+
slackChannel: `#${mapping.slackChannelName}`,
|
|
1170
|
+
mentionedUsers: peopleMentions.userIds,
|
|
1171
|
+
mentionedNames: peopleMentions.names,
|
|
1172
|
+
threaded: !!threadId,
|
|
1173
|
+
});
|
|
1174
|
+
return { mapping, message: persisted, mentions: [], dispatch: null };
|
|
1175
|
+
}
|
|
1127
1176
|
const planned = dispatcherForPlan?.planHuddleTargets
|
|
1128
1177
|
? await dispatcherForPlan.planHuddleTargets(channel, persisted, dispatchOptions).catch(() => null)
|
|
1129
1178
|
: null;
|
|
@@ -2011,6 +2060,62 @@ export class SlackTeamChannelService {
|
|
|
2011
2060
|
return null;
|
|
2012
2061
|
}
|
|
2013
2062
|
}
|
|
2063
|
+
/**
|
|
2064
|
+
* The people (not Crewly agents) a message @'s.
|
|
2065
|
+
*
|
|
2066
|
+
* A native `<@U…>` mention is not a person when the id is a local agent's
|
|
2067
|
+
* own bot (any team), the orchestrator's bot, the connected master bot, or
|
|
2068
|
+
* a bot the directory lists (agents on other machines, other accounts'
|
|
2069
|
+
* agents, other bots in the channel). The directory is the same cached
|
|
2070
|
+
* list the roster line reads, so no extra Slack call is made per message.
|
|
2071
|
+
* Every other id is a person — someone the agents were not asked to answer
|
|
2072
|
+
* for.
|
|
2073
|
+
*
|
|
2074
|
+
* A plain `@Name` that matched no agent but is a person who has spoken in
|
|
2075
|
+
* a mapped channel is a person too, and is taken out of
|
|
2076
|
+
* `resolved.unknown` so nobody is offered a "did you mean" for it.
|
|
2077
|
+
*
|
|
2078
|
+
* @param message - The inbound message
|
|
2079
|
+
* @param resolved - Agent mentions already resolved (its `unknown` is pruned)
|
|
2080
|
+
* @param teams - Every local team
|
|
2081
|
+
* @returns People's user ids and plain names
|
|
2082
|
+
*/
|
|
2083
|
+
async peopleMentions(message, resolved, teams) {
|
|
2084
|
+
const names = [];
|
|
2085
|
+
resolved.unknown = resolved.unknown.filter((u) => {
|
|
2086
|
+
if (!this.humanNames.has(u.token.toLowerCase()))
|
|
2087
|
+
return true;
|
|
2088
|
+
names.push(u.token);
|
|
2089
|
+
return false;
|
|
2090
|
+
});
|
|
2091
|
+
let pending = extractNativeMentionIds(message.text ?? '');
|
|
2092
|
+
if (pending.length === 0)
|
|
2093
|
+
return { userIds: [], names };
|
|
2094
|
+
const agentIds = new Set();
|
|
2095
|
+
if (this.deps.identities) {
|
|
2096
|
+
for (const m of teams.flatMap((t) => teamChannelMembers(t))) {
|
|
2097
|
+
const id = this.deps.identities.get(m.sessionName)?.botUserId;
|
|
2098
|
+
if (id)
|
|
2099
|
+
agentIds.add(id);
|
|
2100
|
+
}
|
|
2101
|
+
const orc = this.deps.identities.getInstalled(CREWLY_CONSTANTS.SESSIONS.ORCHESTRATOR_NAME)?.botUserId;
|
|
2102
|
+
if (orc)
|
|
2103
|
+
agentIds.add(orc);
|
|
2104
|
+
}
|
|
2105
|
+
const masterBot = await this.deps.slack.getBotUserId?.().catch(() => null);
|
|
2106
|
+
if (masterBot)
|
|
2107
|
+
agentIds.add(masterBot);
|
|
2108
|
+
pending = pending.filter((id) => !agentIds.has(id));
|
|
2109
|
+
if (pending.length > 0) {
|
|
2110
|
+
const directory = await getSlackDirectoryService()?.list(message.channelId).catch(() => null);
|
|
2111
|
+
// Any bot it knows — our agents on other machines, another account's
|
|
2112
|
+
// agents, other vendors' bots — is not a person; we only stay quiet
|
|
2113
|
+
// for people.
|
|
2114
|
+
const directoryBots = new Set((directory ?? []).filter((e) => e.kind !== 'human' && e.botUserId).map((e) => e.botUserId));
|
|
2115
|
+
pending = pending.filter((id) => !directoryBots.has(id));
|
|
2116
|
+
}
|
|
2117
|
+
return { userIds: pending, names };
|
|
2118
|
+
}
|
|
2014
2119
|
/**
|
|
2015
2120
|
* Remember a person's names so an agent writing `@Their Name` reaches them.
|
|
2016
2121
|
*
|