@markmo/europacore-session-ui 0.2.0 → 0.4.0
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 +1 -1
- package/dist/ArtifactsPage-BxaqShTv.js +1178 -0
- package/dist/{BoardPage-BAQrGP7G.js → BoardPage-DH7p5o99.js} +274 -265
- package/dist/{CardDetail-CCgP8R61.js → CardDetail-LfDCJQhS.js} +42 -33
- package/dist/{ComparePage-FcLLhKzC.js → ComparePage-CrbCyu4u.js} +33 -33
- package/dist/MemoriesPage-BRA53Hlb.js +679 -0
- package/dist/{OverviewPage-CbfbyGNT.js → OverviewPage-BSBqY83_.js} +50 -49
- package/dist/{RegisterPage-3-hJNQEV.js → RegisterPage-64yGl9E-.js} +76 -76
- package/dist/SessionPage-C4hSlxWQ.js +906 -0
- package/dist/api/agentClient.d.ts +66 -1
- package/dist/api/wire.d.ts +540 -4
- package/dist/features/artifacts/ArtifactDetail.d.ts +15 -0
- package/dist/features/artifacts/ArtifactDialogs.d.ts +29 -0
- package/dist/features/artifacts/ArtifactLedger.d.ts +11 -0
- package/dist/features/artifacts/ArtifactStats.d.ts +9 -0
- package/dist/features/artifacts/ArtifactsPage.d.ts +1 -0
- package/dist/features/artifacts/artifactsCommands.d.ts +3 -0
- package/dist/features/artifacts/artifactsStore.d.ts +27 -0
- package/dist/features/artifacts/artifactsUi.d.ts +33 -0
- package/dist/features/bootstrap.d.ts +1 -0
- package/dist/features/chat/model/artifactAccess.d.ts +50 -0
- package/dist/features/chat/model/artifactCsv.d.ts +11 -0
- package/dist/features/chat/model/artifactExport.d.ts +45 -0
- package/dist/features/chat/model/artifactStats.d.ts +79 -0
- package/dist/features/chat/model/artifacts.d.ts +151 -0
- package/dist/features/chat/model/claims.d.ts +102 -0
- package/dist/features/chat/model/contextSources.d.ts +41 -0
- package/dist/features/chat/model/entries.d.ts +37 -2
- package/dist/features/chat/model/fleet.d.ts +11 -0
- package/dist/features/chat/model/format.d.ts +6 -0
- package/dist/features/chat/model/inspect.d.ts +11 -0
- package/dist/features/chat/model/memory.d.ts +3 -3
- package/dist/features/chat/model/memoryRecords.d.ts +79 -0
- package/dist/features/chat/model/monitors.d.ts +11 -0
- package/dist/features/chat/model/progress.d.ts +73 -0
- package/dist/features/chat/model/routing.d.ts +20 -0
- package/dist/features/chat/model/store.d.ts +5 -0
- package/dist/features/chat/model/tasks.d.ts +1 -1
- package/dist/features/chat/panels/ProgressPanel.d.ts +8 -0
- package/dist/features/chat/session/ComposerHistory.d.ts +1 -1
- package/dist/features/chat/session/SessionController.d.ts +3 -2
- package/dist/features/chat/session/useFileMentions.d.ts +18 -5
- package/dist/features/chat/transcript/ArtifactCard.d.ts +8 -0
- package/dist/features/chat/transcript/Rows.d.ts +12 -1
- package/dist/features/commands/InspectDialog.d.ts +3 -0
- package/dist/features/commands/dialogs.d.ts +1 -1
- package/dist/features/commands/registry.d.ts +1 -1
- package/dist/features/memories/MemoriesPage.d.ts +1 -0
- package/dist/features/memories/memoriesCommands.d.ts +3 -0
- package/dist/features/memories/memoriesController.d.ts +81 -0
- package/dist/features/memory/MemoryDialog.d.ts +1 -1
- package/dist/features/memory/memoryService.d.ts +10 -10
- package/dist/features/workspace/claimsCommands.d.ts +26 -0
- package/dist/features/workspace/collisionsWatcher.d.ts +7 -0
- package/dist/features/workspace/useSessionPageHooks.d.ts +1 -1
- package/dist/{index-NjGO7Jg1.js → index-CMPf-3JZ.js} +4821 -3447
- package/dist/index.d.ts +2 -0
- package/dist/index.js +86 -82
- package/dist/lib/paths.d.ts +12 -0
- package/dist/lib/zip.d.ts +14 -0
- package/dist/{promptHistory-DjSCHmEk.js → promptHistory-BR0NpLCI.js} +14 -14
- package/package.json +1 -1
- package/dist/SessionPage-CA9hAakW.js +0 -865
package/dist/api/wire.d.ts
CHANGED
|
@@ -35,6 +35,19 @@ export interface ServerInfo {
|
|
|
35
35
|
accept: boolean;
|
|
36
36
|
max_bytes: number;
|
|
37
37
|
};
|
|
38
|
+
/** The server keeps artifacts, the pages agents make (`/v1/artifacts` and its viewer). */
|
|
39
|
+
artifacts?: boolean;
|
|
40
|
+
/** It can take an artifact's permanent published copy down (`POST /v1/artifacts/{id}/unpublish`). */
|
|
41
|
+
artifact_unpublish?: boolean;
|
|
42
|
+
/** The server keeps long-term memories (`/v1/memories`, `europacore serve --memory`). */
|
|
43
|
+
memory?: boolean;
|
|
44
|
+
/** Sessions list what they load, source by source (`GET /v1/sessions/{sid}/context/sources`). */
|
|
45
|
+
context_sources?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* It keeps file claims per repository: a session's write to a file another session owns is refused and the
|
|
48
|
+
* owner's agent is asked for it (`/v1/sessions/{sid}/claims`, spec §3.14). Its sessions' agents message each other.
|
|
49
|
+
*/
|
|
50
|
+
peers?: boolean;
|
|
38
51
|
};
|
|
39
52
|
principal: {
|
|
40
53
|
workspace_id: string | null;
|
|
@@ -79,6 +92,8 @@ export interface AgentInfo {
|
|
|
79
92
|
permission_modes?: boolean;
|
|
80
93
|
/** An `exit_plan_mode` approval may carry an edited plan (`Resume.plan`). */
|
|
81
94
|
plan_edits?: boolean;
|
|
95
|
+
/** Its sessions take part in file claims and peer messages (`message_session`, `answer_claim_request`). */
|
|
96
|
+
peers?: boolean;
|
|
82
97
|
};
|
|
83
98
|
/** The permission modes its sessions may use (Claude Code's: default, acceptEdits, plan, …); empty for none. */
|
|
84
99
|
permission_modes?: string[];
|
|
@@ -175,10 +190,13 @@ export interface WorkspaceInfo {
|
|
|
175
190
|
files: ChangedFile[];
|
|
176
191
|
files_truncated: boolean;
|
|
177
192
|
}
|
|
178
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* A command, sub-agent or monitor running in the background of a session (`tasks.updated`,
|
|
195
|
+
* `/v1/sessions/{sid}/tasks`). A monitor is a command or file watch whose output wakes the agent.
|
|
196
|
+
*/
|
|
179
197
|
export interface BackgroundTask {
|
|
180
198
|
task_id: string;
|
|
181
|
-
kind: 'command' | 'subagent';
|
|
199
|
+
kind: 'command' | 'subagent' | 'monitor';
|
|
182
200
|
title: string;
|
|
183
201
|
state: 'running' | 'completed' | 'failed' | 'stopped';
|
|
184
202
|
/** Running time so far, or in all once finished. */
|
|
@@ -190,6 +208,8 @@ export interface BackgroundTask {
|
|
|
190
208
|
/** The start of a sub-agent's result. */
|
|
191
209
|
summary?: string;
|
|
192
210
|
error?: string;
|
|
211
|
+
/** A monitor's batches of output so far. */
|
|
212
|
+
events?: number;
|
|
193
213
|
/** A sub-agent's agent, when the server says (not in the contract yet; the row shows it before the title). */
|
|
194
214
|
agent?: string;
|
|
195
215
|
}
|
|
@@ -286,6 +306,237 @@ export interface FleetReviewEntry {
|
|
|
286
306
|
max_rounds: number;
|
|
287
307
|
attention: 'ready_to_merge' | 'ci_failed' | null;
|
|
288
308
|
}
|
|
309
|
+
export type MemoryScopeName = 'org' | 'user' | 'project';
|
|
310
|
+
export type MemoryRecordKind = 'user' | 'feedback' | 'project' | 'reference';
|
|
311
|
+
export type MemoryRecordStatus = 'active' | 'merged' | 'pruned';
|
|
312
|
+
export type MemoryFlagName = 'stale' | 'duplicate' | 'over_cap' | 'never_recalled' | 'kept';
|
|
313
|
+
export interface MemoryScopeKey {
|
|
314
|
+
scope: MemoryScopeName;
|
|
315
|
+
workspace_id: string | null;
|
|
316
|
+
user_id: string | null;
|
|
317
|
+
project_id: string | null;
|
|
318
|
+
}
|
|
319
|
+
/** Something to know about a memory; a duplicate names its partner. */
|
|
320
|
+
export interface MemoryFlag {
|
|
321
|
+
flag: MemoryFlagName;
|
|
322
|
+
detail: string;
|
|
323
|
+
partner_id?: string | null;
|
|
324
|
+
partner_name?: string | null;
|
|
325
|
+
}
|
|
326
|
+
/** One memory. `tokens` and `flags` come from servers that compute them (absent on older ones). */
|
|
327
|
+
export interface MemoryRecord {
|
|
328
|
+
id: string;
|
|
329
|
+
key: MemoryScopeKey;
|
|
330
|
+
kind: MemoryRecordKind;
|
|
331
|
+
name: string;
|
|
332
|
+
description: string;
|
|
333
|
+
body: string;
|
|
334
|
+
status: MemoryRecordStatus;
|
|
335
|
+
superseded_by: string | null;
|
|
336
|
+
source: string;
|
|
337
|
+
session_id: string | null;
|
|
338
|
+
revision: number;
|
|
339
|
+
created_at: string;
|
|
340
|
+
updated_at: string;
|
|
341
|
+
last_recalled_at: string | null;
|
|
342
|
+
recall_count: number;
|
|
343
|
+
kept_until: string | null;
|
|
344
|
+
metadata: Record<string, unknown>;
|
|
345
|
+
tokens?: {
|
|
346
|
+
index: number;
|
|
347
|
+
body: number;
|
|
348
|
+
};
|
|
349
|
+
flags?: MemoryFlag[];
|
|
350
|
+
/** `GET /v1/memories/{id}` only: the memory in Claude Code's auto-memory format. */
|
|
351
|
+
markdown?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface MemoryPatch {
|
|
354
|
+
kind?: MemoryRecordKind;
|
|
355
|
+
description?: string;
|
|
356
|
+
body?: string;
|
|
357
|
+
/** The revision the change was made against: 409 `memory_changed` when it has moved on. */
|
|
358
|
+
revision?: number;
|
|
359
|
+
}
|
|
360
|
+
export interface MemoryRevision {
|
|
361
|
+
id: string;
|
|
362
|
+
memory_id: string;
|
|
363
|
+
revision: number;
|
|
364
|
+
op: string;
|
|
365
|
+
before: Record<string, unknown> | null;
|
|
366
|
+
after: Record<string, unknown> | null;
|
|
367
|
+
actor: string;
|
|
368
|
+
dream_id: string | null;
|
|
369
|
+
session_id: string | null;
|
|
370
|
+
created_at: string;
|
|
371
|
+
}
|
|
372
|
+
export interface MemoryScopeStatus {
|
|
373
|
+
scope: MemoryScopeName;
|
|
374
|
+
label: string;
|
|
375
|
+
project_id?: string | null;
|
|
376
|
+
active_by_kind: Record<string, number>;
|
|
377
|
+
index_lines: number;
|
|
378
|
+
index_chars: number;
|
|
379
|
+
index_tokens?: number;
|
|
380
|
+
retired?: number;
|
|
381
|
+
flags?: Partial<Record<MemoryFlagName, number>>;
|
|
382
|
+
last_dream: string | null;
|
|
383
|
+
sessions_since_dream: number;
|
|
384
|
+
changes_since_dream: number;
|
|
385
|
+
}
|
|
386
|
+
export interface MemoryStatusReport {
|
|
387
|
+
scopes: MemoryScopeStatus[];
|
|
388
|
+
/** The caller's own projects with memories. */
|
|
389
|
+
projects?: string[];
|
|
390
|
+
}
|
|
391
|
+
export type ContextSourceKind = 'system_prompt' | 'tools' | 'instructions' | 'environment' | 'memory_index' | 'memory_preload' | 'skill' | 'plan' | 'hook' | 'other' | 'conversation';
|
|
392
|
+
/** One thing a session's model reads, in load order. */
|
|
393
|
+
export interface ContextSource {
|
|
394
|
+
n: number;
|
|
395
|
+
id: string;
|
|
396
|
+
kind: ContextSourceKind;
|
|
397
|
+
label: string;
|
|
398
|
+
origin?: string | null;
|
|
399
|
+
path?: string | null;
|
|
400
|
+
scope?: string | null;
|
|
401
|
+
retention?: string | null;
|
|
402
|
+
/** sent: the model has it; pending: it reaches the next call; preview: a memory index not pinned yet. */
|
|
403
|
+
status: 'sent' | 'pending' | 'preview';
|
|
404
|
+
tokens: number;
|
|
405
|
+
chars: number;
|
|
406
|
+
items: number;
|
|
407
|
+
text?: string | null;
|
|
408
|
+
}
|
|
409
|
+
export interface ContextSources {
|
|
410
|
+
session_id: string | null;
|
|
411
|
+
model: string | null;
|
|
412
|
+
context_window: number | null;
|
|
413
|
+
estimated_tokens: number;
|
|
414
|
+
sources: ContextSource[];
|
|
415
|
+
memory?: {
|
|
416
|
+
scopes: {
|
|
417
|
+
scope: MemoryScopeName;
|
|
418
|
+
label: string;
|
|
419
|
+
workspace_id: string | null;
|
|
420
|
+
user_id: string | null;
|
|
421
|
+
project_id: string | null;
|
|
422
|
+
}[];
|
|
423
|
+
writable: boolean;
|
|
424
|
+
preload_k: number;
|
|
425
|
+
index_max_lines: number;
|
|
426
|
+
index_max_chars: number;
|
|
427
|
+
} | null;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Who can open an artifact: its owner (`private`, with links that expire), everyone signed in to its workspace
|
|
431
|
+
* (`workspace`, likewise), or anyone with its link (`public`).
|
|
432
|
+
*/
|
|
433
|
+
export type ArtifactAccess = 'private' | 'workspace' | 'public';
|
|
434
|
+
/** Where a version was put for anyone with the link; a temporary page has a claim link and an expiry. */
|
|
435
|
+
export interface ArtifactPublication {
|
|
436
|
+
target: string;
|
|
437
|
+
url: string;
|
|
438
|
+
claim_url: string | null;
|
|
439
|
+
expires_at: string | null;
|
|
440
|
+
created_at?: string | null;
|
|
441
|
+
/** The session that published it, from servers that keep it. */
|
|
442
|
+
session_id?: string | null;
|
|
443
|
+
/** When it was taken down; a copy taken down is no longer up. */
|
|
444
|
+
removed_at?: string | null;
|
|
445
|
+
}
|
|
446
|
+
/** What the runs that wrote a version spent: each run's tokens since its previous write, other work included. */
|
|
447
|
+
export interface ArtifactUsage {
|
|
448
|
+
input_tokens: number;
|
|
449
|
+
output_tokens: number;
|
|
450
|
+
cache_read_tokens: number;
|
|
451
|
+
cache_write_tokens: number;
|
|
452
|
+
total_tokens: number;
|
|
453
|
+
cost_usd?: number | null;
|
|
454
|
+
}
|
|
455
|
+
export interface ArtifactVersionInfo {
|
|
456
|
+
version: number;
|
|
457
|
+
created_at: string;
|
|
458
|
+
/** The version's file paths, the entry among them. */
|
|
459
|
+
files: string[];
|
|
460
|
+
published: ArtifactPublication | null;
|
|
461
|
+
/** The session whose run wrote this version, from servers that keep it; null when unknown. */
|
|
462
|
+
session_id?: string | null;
|
|
463
|
+
/** From servers that measure them (absent on older ones). */
|
|
464
|
+
bytes?: number;
|
|
465
|
+
usage?: ArtifactUsage | null;
|
|
466
|
+
/** The git repository the writing session's workspace was in (`owner/repo`); null outside one. */
|
|
467
|
+
project?: string | null;
|
|
468
|
+
}
|
|
469
|
+
/** Opens of an artifact's page. `people` are others who opened it signed in; `link` the opens of its public link. */
|
|
470
|
+
export interface ArtifactViews {
|
|
471
|
+
total: number;
|
|
472
|
+
last_30_days: {
|
|
473
|
+
opens: number;
|
|
474
|
+
link: number;
|
|
475
|
+
own: number;
|
|
476
|
+
people: number;
|
|
477
|
+
};
|
|
478
|
+
/** The latest open by anyone else, or through the public link. */
|
|
479
|
+
last_viewed_at: string | null;
|
|
480
|
+
}
|
|
481
|
+
/** An artifact as `/v1/artifacts` shows it. `url` is the viewer's: absolute, or server-relative. */
|
|
482
|
+
export interface ArtifactInfo {
|
|
483
|
+
id: string;
|
|
484
|
+
title: string;
|
|
485
|
+
description: string;
|
|
486
|
+
icon: string | null;
|
|
487
|
+
format: 'html' | 'markdown' | string;
|
|
488
|
+
entry: string;
|
|
489
|
+
version: number;
|
|
490
|
+
versions: ArtifactVersionInfo[];
|
|
491
|
+
/** The session that made it; null for one no session made. */
|
|
492
|
+
session_id: string | null;
|
|
493
|
+
url: string;
|
|
494
|
+
published_url: string | null;
|
|
495
|
+
created_at: string;
|
|
496
|
+
updated_at: string;
|
|
497
|
+
/** The latest version's bytes, from servers that measure them. */
|
|
498
|
+
size?: number | null;
|
|
499
|
+
/** Summed over the versions that carry usage; `versions` says how many did. */
|
|
500
|
+
usage?: (ArtifactUsage & {
|
|
501
|
+
versions: number;
|
|
502
|
+
}) | null;
|
|
503
|
+
/** Its versions' repositories, in the order first written; from servers that record them. */
|
|
504
|
+
projects?: string[];
|
|
505
|
+
/** Who can open it; absent from servers that keep no access (there, anyone with the link can). */
|
|
506
|
+
access?: ArtifactAccess;
|
|
507
|
+
/** When it was first shared beyond its owner; null while private, and for one public from before access. */
|
|
508
|
+
shared_at?: string | null;
|
|
509
|
+
/** The owner's user id. */
|
|
510
|
+
owner?: string | null;
|
|
511
|
+
/** The caller owns it: false for one shared with the caller. */
|
|
512
|
+
mine?: boolean;
|
|
513
|
+
/** When `url` stops opening: a signed link's expiry; null for the public link. */
|
|
514
|
+
url_expires_at?: string | null;
|
|
515
|
+
/** How often its page was opened; the owner's only, from servers that count. */
|
|
516
|
+
views?: ArtifactViews | null;
|
|
517
|
+
}
|
|
518
|
+
/** `GET /v1/artifacts`: the list, and the repository of the session named by `session=`. */
|
|
519
|
+
export interface ArtifactList {
|
|
520
|
+
artifacts: ArtifactInfo[];
|
|
521
|
+
project?: string | null;
|
|
522
|
+
/** Others' artifacts shared with the caller, when asked for (`shared=true`). */
|
|
523
|
+
shared?: ArtifactInfo[];
|
|
524
|
+
}
|
|
525
|
+
/** A page a session wrote (`artifact_write`), as the server keeps it in `metadata.artifacts`, the newest write last. */
|
|
526
|
+
export interface SessionArtifact {
|
|
527
|
+
id: string;
|
|
528
|
+
title: string;
|
|
529
|
+
version: number;
|
|
530
|
+
format: string;
|
|
531
|
+
/** The viewer's url; it carries a token, so it is never shown. */
|
|
532
|
+
url: string | null;
|
|
533
|
+
published_url?: string | null;
|
|
534
|
+
claim_url?: string | null;
|
|
535
|
+
expires_at?: string | null;
|
|
536
|
+
target?: string | null;
|
|
537
|
+
since?: string | null;
|
|
538
|
+
access?: ArtifactAccess;
|
|
539
|
+
}
|
|
289
540
|
/** A pull request a session opened (or registered), and where its CI and review have got to (`metadata.pull_requests`). */
|
|
290
541
|
export interface SessionPullRequest {
|
|
291
542
|
number: number;
|
|
@@ -309,6 +560,144 @@ export interface SessionPullRequest {
|
|
|
309
560
|
since?: string;
|
|
310
561
|
head_sha?: string;
|
|
311
562
|
}
|
|
563
|
+
/** A session as another session sees it, in a repository's claims: never its transcript. */
|
|
564
|
+
export interface Ref {
|
|
565
|
+
session_id: string;
|
|
566
|
+
title: string;
|
|
567
|
+
user: string;
|
|
568
|
+
/** One of the caller's own sessions (a teammate's is not). */
|
|
569
|
+
mine: boolean;
|
|
570
|
+
/** A session handed off to the cloud, mirrored here. */
|
|
571
|
+
cloud?: boolean;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* A claim on a path of a repository (`'dir/'` covers what is under it). A `change` claim is the first writer's
|
|
575
|
+
* while the path has uncommitted changes in that checkout; a `declared` one was claimed or given and holds anywhere
|
|
576
|
+
* in the repository; a `shared` one has two holders and a boundary between them.
|
|
577
|
+
*/
|
|
578
|
+
export interface Claim {
|
|
579
|
+
path: string;
|
|
580
|
+
kind: 'change' | 'declared' | 'shared';
|
|
581
|
+
holders: Ref[];
|
|
582
|
+
checkout: string;
|
|
583
|
+
/** What each holder keeps to, for a shared claim (a `keep` records one too); advisory inside the file. */
|
|
584
|
+
boundary?: string | null;
|
|
585
|
+
reason: string;
|
|
586
|
+
since: string;
|
|
587
|
+
/** Sessions the path passes to, first come first served, once its holder is done with it. */
|
|
588
|
+
queue: Ref[];
|
|
589
|
+
}
|
|
590
|
+
/** What the owner does with one path a contender asks for. */
|
|
591
|
+
export type Disposition = 'give' | 'keep' | 'share' | 'after' | 'will_do';
|
|
592
|
+
export type ClaimOutcome = 'handed_over' | 'declined' | 'split' | 'share' | 'after' | 'will_do' | 'released' | 'committed' | 'withdrawn' | 'deleted' | 'user' | 'cycle' | 'expired';
|
|
593
|
+
/**
|
|
594
|
+
* A contender's request for paths another session owns: the owner answers per path (round 1), the contender may
|
|
595
|
+
* counter once (round 2), and the owner's reply is final (round 3).
|
|
596
|
+
*/
|
|
597
|
+
export interface ClaimRequest {
|
|
598
|
+
id: string;
|
|
599
|
+
paths: string[];
|
|
600
|
+
contender: Ref;
|
|
601
|
+
owner: Ref;
|
|
602
|
+
/** The kind of claim the owner held when the request opened. */
|
|
603
|
+
owner_kind: Claim['kind'];
|
|
604
|
+
/** The contender's task, or the reason it gave. */
|
|
605
|
+
reason: string;
|
|
606
|
+
/** The refused edit, as a short diff; empty when no write was refused. */
|
|
607
|
+
change: string;
|
|
608
|
+
/** How often the owner has written each path. */
|
|
609
|
+
owner_writes: Record<string, number>;
|
|
610
|
+
round: 1 | 2 | 3;
|
|
611
|
+
status: 'open' | 'answered' | 'countered' | 'doing' | 'ended';
|
|
612
|
+
answer?: Record<string, Disposition> | null;
|
|
613
|
+
counter?: Record<string, Disposition> | null;
|
|
614
|
+
boundary?: string | null;
|
|
615
|
+
note?: string | null;
|
|
616
|
+
/** Paths the owner has made the contender's change to (a `will_do`). */
|
|
617
|
+
done?: string[] | null;
|
|
618
|
+
outcome?: ClaimOutcome | null;
|
|
619
|
+
since: string;
|
|
620
|
+
}
|
|
621
|
+
/** What a peer message is about: free text (`message_session`), a request and its rounds, or a path come free. */
|
|
622
|
+
export type PeerAbout = 'message' | 'request' | 'answer' | 'counter' | 'done' | 'free' | 'cycle';
|
|
623
|
+
/** A message to a session's agent from another session's (`from`), or from the claims themselves (null). */
|
|
624
|
+
export interface PeerMessage {
|
|
625
|
+
id: string;
|
|
626
|
+
from: Ref | null;
|
|
627
|
+
to: Ref;
|
|
628
|
+
about: PeerAbout;
|
|
629
|
+
request_id?: string | null;
|
|
630
|
+
text: string;
|
|
631
|
+
at: string;
|
|
632
|
+
}
|
|
633
|
+
/** How a peer message reached its session: drained into a live run, woke it with a notice run, or waits. */
|
|
634
|
+
export type PeerDelivery = 'live' | 'woke' | 'waiting';
|
|
635
|
+
/** `peer.message`, on the recipient's stream. */
|
|
636
|
+
export type PeerMessageEvent = PeerMessage & {
|
|
637
|
+
delivery?: PeerDelivery;
|
|
638
|
+
};
|
|
639
|
+
/** Another session working in the same repository, with what it holds. */
|
|
640
|
+
export interface PeerSession {
|
|
641
|
+
session_id: string;
|
|
642
|
+
title: string;
|
|
643
|
+
user: string;
|
|
644
|
+
/** The user owns that session too (not a teammate's). */
|
|
645
|
+
mine?: boolean;
|
|
646
|
+
/** A session handed off to the cloud, mirrored here. */
|
|
647
|
+
cloud?: boolean;
|
|
648
|
+
checkout: string;
|
|
649
|
+
running: boolean;
|
|
650
|
+
claims: Claim[];
|
|
651
|
+
}
|
|
652
|
+
/** `GET /v1/sessions/{sid}/claims`: the session's claims, the other sessions here, and requests to or from it. */
|
|
653
|
+
export interface ClaimsView {
|
|
654
|
+
repo: string;
|
|
655
|
+
checkout: string;
|
|
656
|
+
claims: Claim[];
|
|
657
|
+
others: PeerSession[];
|
|
658
|
+
requests: ClaimRequest[];
|
|
659
|
+
/** Messages waiting for the session's next run. */
|
|
660
|
+
pending: PeerMessage[];
|
|
661
|
+
/** 'contested': a request it made could not be settled between the agents, so it needs its user. */
|
|
662
|
+
attention: string | null;
|
|
663
|
+
/** Why it needs its user, in the server's words. */
|
|
664
|
+
attention_reason?: string | null;
|
|
665
|
+
}
|
|
666
|
+
/** `metadata.claims`, which the server owns and writes before it tells the model. */
|
|
667
|
+
export interface MetadataClaims {
|
|
668
|
+
v: 1;
|
|
669
|
+
repo: string;
|
|
670
|
+
checkout: string;
|
|
671
|
+
/** The paths it has changed and so owns until they are committed. */
|
|
672
|
+
changed: unknown[];
|
|
673
|
+
/** The paths it claimed, or was given. */
|
|
674
|
+
declared: unknown[];
|
|
675
|
+
/** Its requests, live or settled in the last hour; their `owner` and `contender` are session ids here. */
|
|
676
|
+
requests: unknown[];
|
|
677
|
+
pending: PeerMessage[];
|
|
678
|
+
attention: string | null;
|
|
679
|
+
attention_reason?: string | null;
|
|
680
|
+
}
|
|
681
|
+
/** `display.kind == 'peer_message'`: what `message_session` sent, and how it was delivered. */
|
|
682
|
+
export interface PeerMessageDisplay {
|
|
683
|
+
kind: 'peer_message';
|
|
684
|
+
to: Ref | string;
|
|
685
|
+
text: string;
|
|
686
|
+
delivery?: PeerDelivery | null;
|
|
687
|
+
}
|
|
688
|
+
/** `display.kind == 'claim_answer'`: what `answer_claim_request` answered, in which round. */
|
|
689
|
+
export interface ClaimAnswerDisplay {
|
|
690
|
+
kind: 'claim_answer';
|
|
691
|
+
request_id: string;
|
|
692
|
+
round: number;
|
|
693
|
+
answer?: Record<string, Disposition> | null;
|
|
694
|
+
/** It accepted the answer (the asker) or the counter (the owner). */
|
|
695
|
+
accept?: boolean;
|
|
696
|
+
/** Paths whose promised change it reported made. */
|
|
697
|
+
done?: string[];
|
|
698
|
+
boundary?: string | null;
|
|
699
|
+
note?: string | null;
|
|
700
|
+
}
|
|
312
701
|
/** A fleet run as `GET /v1/fleet/runs` lists it. */
|
|
313
702
|
export interface FleetRunSummary {
|
|
314
703
|
run_id: string;
|
|
@@ -436,13 +825,50 @@ export type TranscriptItem = {
|
|
|
436
825
|
id: string;
|
|
437
826
|
summary?: string;
|
|
438
827
|
}
|
|
439
|
-
/**
|
|
828
|
+
/**
|
|
829
|
+
* Put in the history by the harness, not the user: what woke the agent (`task_notice`), a hook's or a recovery's,
|
|
830
|
+
* or a monitor's output (`monitor`, with its fields).
|
|
831
|
+
*/
|
|
440
832
|
| {
|
|
441
833
|
kind: 'notice';
|
|
442
834
|
id: string;
|
|
443
835
|
origin?: string;
|
|
444
836
|
text: string;
|
|
837
|
+
monitor?: MonitorOutput;
|
|
838
|
+
}
|
|
839
|
+
/** A message from another session's agent, as the agent read it (a peer, not the user). */
|
|
840
|
+
| {
|
|
841
|
+
kind: 'peer';
|
|
842
|
+
id: string;
|
|
843
|
+
from?: Ref | null;
|
|
844
|
+
about?: PeerAbout;
|
|
845
|
+
request_id?: string | null;
|
|
846
|
+
text: string;
|
|
847
|
+
at?: string;
|
|
445
848
|
};
|
|
849
|
+
/** How a monitor ended: its command exited, it reached its timeout, it printed too much, or it was stopped. */
|
|
850
|
+
export interface MonitorEnd {
|
|
851
|
+
reason: 'exited' | 'timeout' | 'rate' | 'user' | 'stopped';
|
|
852
|
+
exit_code?: number | null;
|
|
853
|
+
seconds?: number | null;
|
|
854
|
+
/** Its batches of output in all. */
|
|
855
|
+
events?: number;
|
|
856
|
+
/** The last line of a failed command's stderr. */
|
|
857
|
+
stderr?: string;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* What the agent was given of a monitor's output (`monitor_output`, and a `monitor` notice in `/messages`): its new
|
|
861
|
+
* lines (a command's stdout, or `added|modified|deleted <path>` for a file watch), and how it ended.
|
|
862
|
+
*/
|
|
863
|
+
export interface MonitorOutput {
|
|
864
|
+
monitor_id: string;
|
|
865
|
+
description: string;
|
|
866
|
+
kind: 'command' | 'files';
|
|
867
|
+
lines: string[];
|
|
868
|
+
/** Lines that arrived but were not passed on. */
|
|
869
|
+
dropped: number;
|
|
870
|
+
end: MonitorEnd | null;
|
|
871
|
+
}
|
|
446
872
|
/** `notice`: a run the server started itself, because a background task finished while the session was idle. */
|
|
447
873
|
export type RunKind = 'turn' | 'resume' | 'notice';
|
|
448
874
|
export type RunStatus = 'queued' | 'running' | 'completed' | 'paused' | 'failed' | 'cancelled';
|
|
@@ -590,6 +1016,8 @@ export interface McpServer {
|
|
|
590
1016
|
}
|
|
591
1017
|
export interface HarnessResult {
|
|
592
1018
|
output: Record<string, unknown> | null;
|
|
1019
|
+
/** What to change when the run stopped short (europacore's `agents.stop_hints`); null when it ended normally. */
|
|
1020
|
+
hint?: string | null;
|
|
593
1021
|
text?: string | null;
|
|
594
1022
|
error: string | null;
|
|
595
1023
|
error_code: string | null;
|
|
@@ -648,17 +1076,73 @@ export interface AnswersDisplay {
|
|
|
648
1076
|
answer: string;
|
|
649
1077
|
}[];
|
|
650
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* `display.kind == "artifact"`: a page `artifact_write` made or `artifact_publish` put up (spec §5.2). `url` is the
|
|
1081
|
+
* viewer's, null when the server has none; a publish adds where it went.
|
|
1082
|
+
*/
|
|
1083
|
+
export interface ArtifactDisplay {
|
|
1084
|
+
kind: 'artifact';
|
|
1085
|
+
id: string;
|
|
1086
|
+
title: string;
|
|
1087
|
+
version: number;
|
|
1088
|
+
format: string;
|
|
1089
|
+
url: string | null;
|
|
1090
|
+
published_url?: string | null;
|
|
1091
|
+
claim_url?: string | null;
|
|
1092
|
+
expires_at?: string | null;
|
|
1093
|
+
target?: string | null;
|
|
1094
|
+
/** Who can open it, from servers that keep access. */
|
|
1095
|
+
access?: ArtifactAccess;
|
|
1096
|
+
/** `artifact_unpublish`: the published copy's address, now taken down. */
|
|
1097
|
+
removed_url?: string | null;
|
|
1098
|
+
}
|
|
1099
|
+
/** `display.kind == "artifact_deleted"`: the agent's `artifact_delete` removed a page, and the sessions that wrote it. */
|
|
1100
|
+
export interface ArtifactDeletedDisplay {
|
|
1101
|
+
kind: 'artifact_deleted';
|
|
1102
|
+
id: string;
|
|
1103
|
+
title: string;
|
|
1104
|
+
sessions?: string[];
|
|
1105
|
+
}
|
|
651
1106
|
export type ToolDisplay = {
|
|
652
1107
|
kind: 'plan';
|
|
653
1108
|
plan: PlanItem[];
|
|
654
1109
|
summary?: string;
|
|
655
|
-
} | DiffDisplay | ExecDisplay | AnswersDisplay | {
|
|
1110
|
+
} | DiffDisplay | ExecDisplay | AnswersDisplay | ArtifactDisplay | ArtifactDeletedDisplay | PeerMessageDisplay | ClaimAnswerDisplay | {
|
|
656
1111
|
kind: string;
|
|
657
1112
|
[key: string]: unknown;
|
|
658
1113
|
};
|
|
1114
|
+
export declare function isPeerMessageDisplay(display: ToolDisplay | null | undefined): display is PeerMessageDisplay;
|
|
1115
|
+
export declare function isClaimAnswerDisplay(display: ToolDisplay | null | undefined): display is ClaimAnswerDisplay;
|
|
1116
|
+
export declare function isArtifactDisplay(display: ToolDisplay | null | undefined): display is ArtifactDisplay;
|
|
1117
|
+
export declare function isArtifactDeletedDisplay(display: ToolDisplay | null | undefined): display is ArtifactDeletedDisplay;
|
|
659
1118
|
export declare function isDiffDisplay(display: ToolDisplay | null | undefined): display is DiffDisplay;
|
|
660
1119
|
export declare function isExecDisplay(display: ToolDisplay | null | undefined): display is ExecDisplay;
|
|
661
1120
|
export declare function isAnswersDisplay(display: ToolDisplay | null | undefined): display is AnswersDisplay;
|
|
1121
|
+
/** How the model router decided a turn's tier (`model_route`; europacore's docs/model-routing.md). */
|
|
1122
|
+
export type RouteBasis = 'choice' | 'probability' | 'baseline' | 'floor' | 'escalation' | 'budget' | 'held' | 'shadow' | 'pinned';
|
|
1123
|
+
/** `model_route`: the tier and model a turn runs on, and why; sent per turn and when the tier changes within it. */
|
|
1124
|
+
export interface ModelRouteData {
|
|
1125
|
+
/** `fast`, `standard` or `capable`; null when the session's model is not routed (`pinned`). */
|
|
1126
|
+
tier: string | null;
|
|
1127
|
+
/** The model serving the turn (in shadow mode, the one still serving it). */
|
|
1128
|
+
model: string | null;
|
|
1129
|
+
basis: RouteBasis;
|
|
1130
|
+
reason: string;
|
|
1131
|
+
/** The classifier's answer: its tier, confidence and each option's probability. */
|
|
1132
|
+
judged?: string | null;
|
|
1133
|
+
confidence?: number | null;
|
|
1134
|
+
probabilities?: Record<string, number>;
|
|
1135
|
+
classifier?: string | null;
|
|
1136
|
+
latency_ms?: number | null;
|
|
1137
|
+
spent_usd?: number | null;
|
|
1138
|
+
budget_usd?: number | null;
|
|
1139
|
+
/** The model the turn was on before; the cache gate weighed staying on it. */
|
|
1140
|
+
incumbent?: string | null;
|
|
1141
|
+
cache_warm?: boolean | null;
|
|
1142
|
+
/** What staying and switching would cost over the gate's horizon, when it weighed a switch. */
|
|
1143
|
+
stay_usd?: number | null;
|
|
1144
|
+
switch_usd?: number | null;
|
|
1145
|
+
}
|
|
662
1146
|
export interface TokenUsageData {
|
|
663
1147
|
last_call_tokens?: number;
|
|
664
1148
|
total_tokens?: number;
|
|
@@ -777,3 +1261,55 @@ export interface HandoffFinding {
|
|
|
777
1261
|
line: number | null;
|
|
778
1262
|
reason: string;
|
|
779
1263
|
}
|
|
1264
|
+
/** One run of a session, from its journal (`GET /v1/sessions/{sid}/runs`). */
|
|
1265
|
+
export interface RunSummary {
|
|
1266
|
+
run_id: string;
|
|
1267
|
+
status: 'running' | 'completed' | 'failed' | 'paused' | 'cancelled' | 'abandoned' | string;
|
|
1268
|
+
started_at?: string | null;
|
|
1269
|
+
ended_at?: string | null;
|
|
1270
|
+
input?: string | null;
|
|
1271
|
+
steps: number;
|
|
1272
|
+
total_tokens: number;
|
|
1273
|
+
cache_read_tokens: number;
|
|
1274
|
+
cache_write_tokens: number;
|
|
1275
|
+
cost_usd?: number | null;
|
|
1276
|
+
wall_seconds?: number | null;
|
|
1277
|
+
stop_reason?: string | null;
|
|
1278
|
+
error_code?: string | null;
|
|
1279
|
+
error?: string | null;
|
|
1280
|
+
hint?: string | null;
|
|
1281
|
+
}
|
|
1282
|
+
/** One tool call of a step, with its arguments and result. */
|
|
1283
|
+
export interface ToolCallView {
|
|
1284
|
+
call_id: string;
|
|
1285
|
+
name: string;
|
|
1286
|
+
arguments?: unknown;
|
|
1287
|
+
status?: string | null;
|
|
1288
|
+
result?: string | null;
|
|
1289
|
+
}
|
|
1290
|
+
/** One step of a run: its model call, tool calls and other events. */
|
|
1291
|
+
export interface StepView {
|
|
1292
|
+
step: number;
|
|
1293
|
+
model?: string | null;
|
|
1294
|
+
input_tokens: number;
|
|
1295
|
+
output_tokens: number;
|
|
1296
|
+
reasoning_tokens: number;
|
|
1297
|
+
cache_read_tokens: number;
|
|
1298
|
+
cache_write_tokens: number;
|
|
1299
|
+
cost_usd?: number | null;
|
|
1300
|
+
text?: string | null;
|
|
1301
|
+
tools: ToolCallView[];
|
|
1302
|
+
events: {
|
|
1303
|
+
type: string;
|
|
1304
|
+
name?: string | null;
|
|
1305
|
+
data?: Record<string, unknown>;
|
|
1306
|
+
}[];
|
|
1307
|
+
}
|
|
1308
|
+
/** A run step by step (`GET /v1/sessions/{sid}/runs/{rid}/steps`). */
|
|
1309
|
+
export interface RunInspection {
|
|
1310
|
+
summary: RunSummary;
|
|
1311
|
+
session_id?: string | null;
|
|
1312
|
+
steps: StepView[];
|
|
1313
|
+
pause?: Record<string, unknown> | null;
|
|
1314
|
+
output?: unknown;
|
|
1315
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ArtifactInfo } from '../../api/wire';
|
|
2
|
+
import { type SessionLink } from '../chat/model/artifacts';
|
|
3
|
+
export type DetailAction = 'access' | 'delete' | 'unpublish';
|
|
4
|
+
export declare function ArtifactDetail({ artifact: a, link, canUnpublish, mentionIn, onAction, sessionTitle, }: {
|
|
5
|
+
artifact: ArtifactInfo;
|
|
6
|
+
link: (id: string | null) => SessionLink;
|
|
7
|
+
canUnpublish: boolean;
|
|
8
|
+
/** The session `@artifact:<id>` goes into, when the page was opened from one. */
|
|
9
|
+
mentionIn: {
|
|
10
|
+
title: string;
|
|
11
|
+
mention: (text: string) => void;
|
|
12
|
+
} | null;
|
|
13
|
+
onAction: (action: DetailAction) => void;
|
|
14
|
+
sessionTitle: (id: string | null) => string | null;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ArtifactInfo } from '../../api/wire';
|
|
2
|
+
import { type ExportScope } from '../chat/model/artifactExport';
|
|
3
|
+
import { type SessionLink } from '../chat/model/artifacts';
|
|
4
|
+
export declare function DeleteArtifactsDialog({ items, link, canUnpublish, onClose, onDone, onMakePrivate, onExport, }: {
|
|
5
|
+
items: ArtifactInfo[];
|
|
6
|
+
link: (id: string | null) => SessionLink;
|
|
7
|
+
canUnpublish: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onDone: () => void;
|
|
10
|
+
/** Make them private instead (`p`). */
|
|
11
|
+
onMakePrivate: () => void;
|
|
12
|
+
/** Save a copy first (`s`; a download here, europacorecli's workspace archive). */
|
|
13
|
+
onExport: () => Promise<void>;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function AccessDialog({ items, onClose }: {
|
|
16
|
+
items: ArtifactInfo[];
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/** Take a permanent published copy down (`U`), after saying what that does. */
|
|
20
|
+
export declare function UnpublishDialog({ artifact, onClose }: {
|
|
21
|
+
artifact: ArtifactInfo;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
/** The export menu (`X`): CSV of the rows, a ZIP of the files, the page to print, and the source as written. */
|
|
25
|
+
export declare function ExportMenu({ scope, sessionTitle, label, }: {
|
|
26
|
+
scope: ExportScope;
|
|
27
|
+
sessionTitle: (id: string | null) => string | null;
|
|
28
|
+
label?: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ArtifactInfo } from '../../api/wire';
|
|
2
|
+
import { type SortColumn } from '../chat/model/artifacts';
|
|
3
|
+
export declare function ArtifactLedger({ rows, sessionTitle, initialSort, initialDescending, onOpen, onDelete, onAccess, }: {
|
|
4
|
+
rows: ArtifactInfo[];
|
|
5
|
+
sessionTitle: (id: string | null) => string | null;
|
|
6
|
+
initialSort?: SortColumn;
|
|
7
|
+
initialDescending?: boolean;
|
|
8
|
+
onOpen: (a: ArtifactInfo) => void;
|
|
9
|
+
onDelete: (items: ArtifactInfo[]) => void;
|
|
10
|
+
onAccess: (items: ArtifactInfo[]) => void;
|
|
11
|
+
}): import("react").JSX.Element;
|