@ours.network/fleet 0.17.7 → 0.18.0-nightly.2
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 +8 -20
- package/dist/application/fleet-query-service.js +0 -12
- package/dist/application/role-creation-service.js +1 -3
- package/dist/application/types.d.ts +0 -11
- package/dist/briefing.js +0 -5
- package/dist/build-info.json +5 -5
- package/dist/cli.js +7 -29
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +10 -22
- package/dist/fleet-proxy.d.ts +0 -5
- package/dist/harness/acp-agent.js +6 -11
- package/dist/harness/codex.d.ts +1 -4
- package/dist/harness/codex.js +11 -59
- package/dist/harness/types.d.ts +3 -3
- package/dist/loops/manager.d.ts +1 -30
- package/dist/loops/manager.js +6 -65
- package/dist/loops/state.d.ts +0 -18
- package/dist/loops/state.js +0 -4
- package/dist/owner-channel/attachments.d.ts +25 -2
- package/dist/owner-channel/attachments.js +61 -5
- package/dist/owner-channel/channel.d.ts +18 -2
- package/dist/owner-channel/channel.js +78 -74
- package/dist/owner-channel/ours-client.d.ts +126 -0
- package/dist/owner-channel/ours-client.js +148 -0
- package/dist/runner.js +3 -27
- package/dist/session/acp.d.ts +0 -55
- package/dist/session/acp.js +1 -122
- package/dist/session/types.d.ts +0 -24
- package/dist/supervisor/systemd.js +28 -1
- package/dist/watchdog/briefing.js +0 -7
- package/package.json +2 -1
- package/dist/owner-channel/mcp.d.ts +0 -24
- package/dist/owner-channel/mcp.js +0 -145
- package/dist/session/activity.d.ts +0 -31
- package/dist/session/activity.js +0 -48
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { SessionActivity } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* How long after the agent's last session update it still counts as working.
|
|
4
|
-
*
|
|
5
|
-
* FLEET-002: a wake delivered by ACP steering answers `startedNewTurn` and runs
|
|
6
|
-
* an entire turn that fleet never receives a `session/prompt` response for (ACP
|
|
7
|
-
* has no turn-end session update), so `readiness` stays `idle` throughout. Tool
|
|
8
|
-
* reservations and update recency are the only activity evidence fleet holds.
|
|
9
|
-
* The trade-off is deliberate and one-directional: at worst a role reads busy
|
|
10
|
-
* for one window after it genuinely stopped, instead of reading ready — or
|
|
11
|
-
* being classified stalled — while it is executing tools.
|
|
12
|
-
*/
|
|
13
|
-
export declare const ACTIVITY_WINDOW_MS = 60000;
|
|
14
|
-
export type ActivityState = 'active' | 'quiet' | 'unobservable';
|
|
15
|
-
export interface ObservedActivity {
|
|
16
|
-
state: ActivityState;
|
|
17
|
-
activeToolCalls?: number;
|
|
18
|
-
lastUpdateAt?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Classify agent-side activity. `unobservable` is NOT `quiet`: a backend that
|
|
22
|
-
* cannot see the agent (tmux) has no evidence, and no evidence must never be
|
|
23
|
-
* reported as "doing nothing".
|
|
24
|
-
*/
|
|
25
|
-
export declare function classifyActivity(activity: SessionActivity | undefined, now?: number): ObservedActivity;
|
|
26
|
-
/**
|
|
27
|
-
* One operator-facing line that never lets turn occupancy pose as liveness:
|
|
28
|
-
* the readiness value is labelled as the turn field it is, and the activity
|
|
29
|
-
* verdict is stated separately with the evidence behind it.
|
|
30
|
-
*/
|
|
31
|
-
export declare function describeSessionState(readiness: string | undefined, activity: SessionActivity | undefined, now?: number): string;
|
package/dist/session/activity.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How long after the agent's last session update it still counts as working.
|
|
3
|
-
*
|
|
4
|
-
* FLEET-002: a wake delivered by ACP steering answers `startedNewTurn` and runs
|
|
5
|
-
* an entire turn that fleet never receives a `session/prompt` response for (ACP
|
|
6
|
-
* has no turn-end session update), so `readiness` stays `idle` throughout. Tool
|
|
7
|
-
* reservations and update recency are the only activity evidence fleet holds.
|
|
8
|
-
* The trade-off is deliberate and one-directional: at worst a role reads busy
|
|
9
|
-
* for one window after it genuinely stopped, instead of reading ready — or
|
|
10
|
-
* being classified stalled — while it is executing tools.
|
|
11
|
-
*/
|
|
12
|
-
export const ACTIVITY_WINDOW_MS = 60_000;
|
|
13
|
-
/**
|
|
14
|
-
* Classify agent-side activity. `unobservable` is NOT `quiet`: a backend that
|
|
15
|
-
* cannot see the agent (tmux) has no evidence, and no evidence must never be
|
|
16
|
-
* reported as "doing nothing".
|
|
17
|
-
*/
|
|
18
|
-
export function classifyActivity(activity, now = Date.now()) {
|
|
19
|
-
if (!activity)
|
|
20
|
-
return { state: 'unobservable' };
|
|
21
|
-
const lastUpdate = activity.lastUpdateAt ? Date.parse(activity.lastUpdateAt) : NaN;
|
|
22
|
-
const recent = Number.isFinite(lastUpdate) && now - lastUpdate <= ACTIVITY_WINDOW_MS;
|
|
23
|
-
return {
|
|
24
|
-
state: activity.activeToolCalls > 0 || recent ? 'active' : 'quiet',
|
|
25
|
-
activeToolCalls: activity.activeToolCalls,
|
|
26
|
-
...(activity.lastUpdateAt ? { lastUpdateAt: activity.lastUpdateAt } : {}),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* One operator-facing line that never lets turn occupancy pose as liveness:
|
|
31
|
-
* the readiness value is labelled as the turn field it is, and the activity
|
|
32
|
-
* verdict is stated separately with the evidence behind it.
|
|
33
|
-
*/
|
|
34
|
-
export function describeSessionState(readiness, activity, now = Date.now()) {
|
|
35
|
-
const observed = classifyActivity(activity, now);
|
|
36
|
-
const evidence = [];
|
|
37
|
-
if (observed.activeToolCalls)
|
|
38
|
-
evidence.push(`${observed.activeToolCalls} tool calls in flight`);
|
|
39
|
-
if (observed.lastUpdateAt) {
|
|
40
|
-
const age = Math.max(0, Math.round((now - Date.parse(observed.lastUpdateAt)) / 1000));
|
|
41
|
-
if (Number.isFinite(age))
|
|
42
|
-
evidence.push(`last agent update ${age}s ago`);
|
|
43
|
-
}
|
|
44
|
-
const detail = observed.state === 'unobservable'
|
|
45
|
-
? 'no agent-side evidence on this backend'
|
|
46
|
-
: evidence.join(', ') || 'no updates yet';
|
|
47
|
-
return `turn: ${readiness ?? 'unknown'} (turn occupancy only) | activity: ${observed.state} (${detail})`;
|
|
48
|
-
}
|