@gaia-ai/core 0.5.4 → 0.5.5
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.
|
@@ -66,15 +66,20 @@ export interface GaiaExecutor {
|
|
|
66
66
|
*/
|
|
67
67
|
stopRun(branch: string): Promise<void>;
|
|
68
68
|
/**
|
|
69
|
-
* Tear down
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
69
|
+
* Tear down ONE run's hosted UI surface — for herdr, close only the tab whose
|
|
70
|
+
* label carries the `#<runId>` token (`startRun` labels every tab
|
|
71
|
+
* `<identifier> · <state> #<run.id>`), via `herdr tab close <tab_id>` (killing
|
|
72
|
+
* that PTY). Run-scoped by design (GAIA-183): a sibling run's tab in the same
|
|
73
|
+
* branch workspace — a still-open prior-state run or a concurrent re-claim —
|
|
74
|
+
* and any non-run tab are left untouched. Called as the LAST finalisation step,
|
|
75
|
+
* strictly after the transcript is captured, and again at dispatch to clear a
|
|
76
|
+
* reused workspace's leftover tab for the run being (re-)started. No matching
|
|
77
|
+
* tab → a quiet no-op. Does NOT touch the branch worktree (that is the
|
|
78
|
+
* reap/{@link removeWorktree} lifecycle). Best-effort: a failing tab-close is
|
|
79
|
+
* swallowed and never aborts finalisation or dispatch. A no-op for
|
|
80
|
+
* non-persistent executors.
|
|
76
81
|
*/
|
|
77
|
-
cleanupRun(branch: string): Promise<void>;
|
|
82
|
+
cleanupRun(branch: string, runId: number): Promise<void>;
|
|
78
83
|
/**
|
|
79
84
|
* Tear down the branch's entire worktree (git worktree + hosted workspace),
|
|
80
85
|
* reclaiming its disk. Called by the conductor's ticket-cleanup pass once a
|
|
@@ -237,7 +237,7 @@ export class DrupalGaiaRemote {
|
|
|
237
237
|
.where('conductor_id.machine_id', '=', id)
|
|
238
238
|
.where('state', '=', 'done')
|
|
239
239
|
.where('closed', '=', '0')
|
|
240
|
-
.fields(['worktree_path', 'agent'])
|
|
240
|
+
.fields(['worktree_path', 'agent', 'drupal_internal__id'])
|
|
241
241
|
.page(100)
|
|
242
242
|
.list();
|
|
243
243
|
// No `started_at` read: the run's duration_s is derived from the agent
|
|
@@ -245,6 +245,8 @@ export class DrupalGaiaRemote {
|
|
|
245
245
|
// the timestamp back through JSON:API.
|
|
246
246
|
return rows.map((r) => ({
|
|
247
247
|
runUuid: r.id,
|
|
248
|
+
// The `#<runId>` tab-label token: scopes the run's tab-close (GAIA-183).
|
|
249
|
+
runId: Number(r.attr('drupal_internal__id')),
|
|
248
250
|
worktreePath: r.attr('worktree_path') ?? '',
|
|
249
251
|
agent: r.attr('agent') ?? '',
|
|
250
252
|
}));
|
|
@@ -62,6 +62,8 @@ export interface ConductorStatus {
|
|
|
62
62
|
}
|
|
63
63
|
export interface FinalizableRun {
|
|
64
64
|
runUuid: string;
|
|
65
|
+
/** Numeric run id (the `#<runId>` tab-label token); scopes the run's tab-close at finalise (GAIA-183). */
|
|
66
|
+
runId: number;
|
|
65
67
|
/** Absolute path of the per-run git worktree, or '' when unset. */
|
|
66
68
|
worktreePath: string;
|
|
67
69
|
/** Id of the agent that ran (GAIA-144); routes footprint parsing at finalize. '' / undefined when unset. */
|