@rho-workspace/rho 0.5.4 → 0.5.6
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/dist/agent-connect.d.ts +8 -0
- package/dist/agent-connect.js +15 -0
- package/dist/browser-access.js +3 -2
- package/dist/capabilities.d.ts +2 -2
- package/dist/capabilities.js +6 -1
- package/dist/cli.js +219 -176
- package/dist/contract.generated.d.ts +472 -4
- package/dist/contract.generated.js +1 -1
- package/dist/contracts/owners.generated.js +455 -6
- package/dist/conversations.d.ts +157 -4
- package/dist/conversations.js +69 -6
- package/dist/discovery.d.ts +1 -0
- package/dist/discovery.js +3 -3
- package/dist/extension-contract.d.ts +99 -0
- package/dist/extension-contract.js +52 -0
- package/dist/extension-directory.d.ts +9 -0
- package/dist/extension-directory.js +11 -0
- package/dist/extension-worker.d.ts +1 -0
- package/dist/extension-worker.js +36 -0
- package/dist/extensions.d.ts +157 -0
- package/dist/extensions.js +349 -0
- package/dist/plugin-cli.d.ts +1 -0
- package/dist/plugin-cli.js +139 -0
- package/dist/plugin-inventory.json +18 -0
- package/dist/plugins.d.ts +3 -3
- package/dist/project-work.d.ts +3 -1
- package/dist/project-work.js +15 -2
- package/dist/protocol.d.ts +8 -0
- package/dist/protocol.js +16 -7
- package/dist/server.d.ts +5 -10
- package/dist/server.js +122 -12
- package/dist/web/.vite/manifest.json +67 -67
- package/dist/web/assets/{canvas-BXhC8RDZ.js → canvas-D8rDdfDz.js} +1 -1
- package/dist/web/assets/choices-D-YfnFP6.js +1 -0
- package/dist/web/assets/{console-Dbdo-5oO.js → console-Trqc0swD.js} +1 -1
- package/dist/web/assets/{dist-B2V0VDO0.js → dist-DZmszrjG.js} +2 -2
- package/dist/web/assets/dist-DpIHRk3B.js +1 -0
- package/dist/web/assets/{dist-D25Vn17i.js → dist-eMx6b8N1.js} +1 -1
- package/dist/web/assets/dist-pF902jHA.js +3 -0
- package/dist/web/assets/explore-in-BCHqjJ7B.js +1 -0
- package/dist/web/assets/graph-lENgfQNH.js +2 -0
- package/dist/web/assets/index-B3_OVy91.css +1 -0
- package/dist/web/assets/{index-BHQIaDsx.js → index-BpL_Kl_s.js} +87 -86
- package/dist/web/assets/{notes-meaning-DdPbtNzJ.js → notes-meaning-DcVGUBBY.js} +1 -1
- package/dist/web/assets/overview-CDnVKlOt.js +6 -0
- package/dist/web/assets/preview-BEC1E9MK.js +1 -0
- package/dist/web/assets/{review-CmWou4Iv.js → review-DYP0aCXb.js} +1 -1
- package/dist/web/assets/{skills-Dy7n3L9d.js → skills-1ec0Z-jx.js} +1 -1
- package/dist/web/assets/{skills-work-Cj0W6b-I.js → skills-work-DNexV4OJ.js} +1 -1
- package/dist/web/assets/{studio-process-QOY_n2_8.js → studio-process-EYQgikxq.js} +2 -2
- package/dist/web/assets/{timeline-events-DmX1BCh3.js → timeline-events-Chj2Gbx7.js} +1 -1
- package/dist/web/assets/{work-turns-Co0C71rJ.js → work-turns-CT9RVcWY.js} +1 -1
- package/dist/web/assets/workspace-COmCbGV3.js +5 -0
- package/dist/web/composition.json +65 -65
- package/dist/web/index.html +3 -3
- package/dist/web/renderer.json +1 -1
- package/dist/web-assets.d.ts +2 -1
- package/dist/web-assets.js +3 -2
- package/dist/work-contract.js +2 -2
- package/docs/FRONTEND.md +26 -18
- package/docs/HEADLESS.md +38 -28
- package/docs/PLUGIN-AUTHORING.md +4 -0
- package/docs/THIRD-PARTY-PLUGINS.md +190 -0
- package/node_modules/@rho-workspace/plugin-agent/README.md +68 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/acp-command.d.ts +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/acp-command.js +9 -1
- package/node_modules/@rho-workspace/plugin-agent/dist/acp-conversation.d.ts +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/acp-conversation.js +10 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/activity-normalize.d.ts +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/activity-normalize.js +2 -2
- package/node_modules/@rho-workspace/plugin-agent/dist/dsh-session.d.ts +6 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/dsh-session.js +174 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/external-session-contract.d.ts +82 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/external-session-contract.js +20 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/external-session.d.ts +84 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/external-session.js +190 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/index.d.ts +373 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/index.js +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/native-sessions.d.ts +70 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/native-sessions.js +538 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/operations.d.ts +33 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/operations.js +3 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/presentation.d.ts +14 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/presentation.js +2 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/ui-external-session.d.ts +15 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/ui-external-session.js +37 -0
- package/node_modules/@rho-workspace/plugin-agent/package.json +6 -1
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
- package/node_modules/hono/dist/cjs/client/fetch-result-please.js +1 -1
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +2 -1
- package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +5 -3
- package/node_modules/hono/dist/cjs/jsx/base.js +49 -30
- package/node_modules/hono/dist/cjs/jsx/components.js +2 -2
- package/node_modules/hono/dist/cjs/jsx/constants.js +2 -0
- package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +13 -17
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +3 -1
- package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +1 -0
- package/node_modules/hono/dist/cjs/middleware/timing/timing.js +4 -3
- package/node_modules/hono/dist/cjs/utils/cookie.js +2 -2
- package/node_modules/hono/dist/cjs/utils/mime.js +1 -1
- package/node_modules/hono/dist/cjs/utils/url.js +1 -1
- package/node_modules/hono/dist/client/fetch-result-please.js +1 -1
- package/node_modules/hono/dist/helper/accepts/accepts.js +2 -1
- package/node_modules/hono/dist/helper/ssg/ssg.js +5 -3
- package/node_modules/hono/dist/jsx/base.js +49 -32
- package/node_modules/hono/dist/jsx/components.js +2 -2
- package/node_modules/hono/dist/jsx/constants.js +2 -1
- package/node_modules/hono/dist/jsx/jsx-runtime.js +15 -19
- package/node_modules/hono/dist/middleware/etag/index.js +3 -1
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -0
- package/node_modules/hono/dist/middleware/timing/timing.js +4 -3
- package/node_modules/hono/dist/utils/cookie.js +2 -2
- package/node_modules/hono/dist/utils/mime.js +1 -1
- package/node_modules/hono/dist/utils/url.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/package.json +5 -3
- package/protocol/index.json +93 -33
- package/protocol/operations/agent.sessions.list.json +146 -0
- package/protocol/operations/agent.sessions.read.json +315 -0
- package/protocol/operations/conversation.configure.json +29 -0
- package/protocol/operations/conversation.decide.json +29 -0
- package/protocol/operations/conversation.list.json +29 -0
- package/protocol/operations/conversation.permission.json +29 -0
- package/protocol/operations/conversation.read.json +29 -0
- package/protocol/operations/conversation.restore.json +29 -0
- package/protocol/operations/conversation.send.json +29 -0
- package/protocol/operations/conversation.settings.check.json +92 -0
- package/protocol/operations/conversation.settings.read.json +92 -0
- package/protocol/operations/conversation.settings.update.json +92 -0
- package/protocol/operations/conversation.start.json +46 -1
- package/protocol/operations/conversation.stop.json +29 -0
- package/protocol/operations/conversation.trash.json +29 -0
- package/protocol/operations/extension.call.json +132 -0
- package/protocol/operations/extension.content.json +78 -0
- package/protocol/operations/extension.describe.json +195 -0
- package/protocol/operations/extension.install.json +198 -0
- package/protocol/operations/extension.list.json +123 -0
- package/protocol/operations/extension.manage.json +55 -0
- package/protocol/operations/extension.read.json +112 -0
- package/protocol/operations/observation.snapshot.json +29 -0
- package/protocol/operations/project.work.read.json +3 -2
- package/protocol/operations/session.grant.json +9 -0
- package/protocol/operations/session.instructions.json +43 -0
- package/scripts/third-party-acceptance.mjs +77 -0
- package/vendor/composition.json +83 -83
- package/vendor/rho-workspace-plugin-agent-0.4.30.tgz +0 -0
- package/web/theme.css +12 -0
- package/dist/web/assets/choices-DU9kHlyQ.js +0 -1
- package/dist/web/assets/dist-BV3hWfn_.js +0 -3
- package/dist/web/assets/dist-CLNF2g-E.js +0 -1
- package/dist/web/assets/explore-in-8Q5ftt-E.js +0 -1
- package/dist/web/assets/graph-hS2kvHTI.js +0 -2
- package/dist/web/assets/index-Cj1_iqyK.css +0 -1
- package/dist/web/assets/overview-BV6ZO5TO.js +0 -6
- package/dist/web/assets/preview-n5lOOdjN.js +0 -1
- package/dist/web/assets/workspace-BKFefRfJ.js +0 -5
- package/vendor/rho-workspace-plugin-agent-0.4.28.tgz +0 -0
|
@@ -4776,6 +4776,35 @@
|
|
|
4776
4776
|
"type": "null"
|
|
4777
4777
|
}
|
|
4778
4778
|
]
|
|
4779
|
+
},
|
|
4780
|
+
"origin": {
|
|
4781
|
+
"anyOf": [
|
|
4782
|
+
{
|
|
4783
|
+
"type": "object",
|
|
4784
|
+
"properties": {
|
|
4785
|
+
"producer": {
|
|
4786
|
+
"type": "string",
|
|
4787
|
+
"minLength": 1
|
|
4788
|
+
},
|
|
4789
|
+
"where": {
|
|
4790
|
+
"type": "string",
|
|
4791
|
+
"minLength": 1
|
|
4792
|
+
},
|
|
4793
|
+
"copyOf": {
|
|
4794
|
+
"type": "string",
|
|
4795
|
+
"minLength": 1
|
|
4796
|
+
}
|
|
4797
|
+
},
|
|
4798
|
+
"required": [
|
|
4799
|
+
"producer",
|
|
4800
|
+
"where"
|
|
4801
|
+
],
|
|
4802
|
+
"additionalProperties": true
|
|
4803
|
+
},
|
|
4804
|
+
{
|
|
4805
|
+
"type": "null"
|
|
4806
|
+
}
|
|
4807
|
+
]
|
|
4779
4808
|
}
|
|
4780
4809
|
},
|
|
4781
4810
|
"required": [
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
"acp",
|
|
69
69
|
"claude-cli",
|
|
70
70
|
"native-transcript",
|
|
71
|
-
"external-acp"
|
|
71
|
+
"external-acp",
|
|
72
|
+
"external-session"
|
|
72
73
|
]
|
|
73
74
|
},
|
|
74
75
|
"sessionId": {
|
|
@@ -573,7 +574,7 @@
|
|
|
573
574
|
"resourceRefs"
|
|
574
575
|
]
|
|
575
576
|
},
|
|
576
|
-
"maxItems":
|
|
577
|
+
"maxItems": 88
|
|
577
578
|
},
|
|
578
579
|
"files": {
|
|
579
580
|
"type": "array",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"agent.activity.capture",
|
|
28
28
|
"agent.activity.outputs",
|
|
29
29
|
"agent.activity.read",
|
|
30
|
+
"agent.sessions.list",
|
|
31
|
+
"agent.sessions.read",
|
|
30
32
|
"annotation.create",
|
|
31
33
|
"annotation.decide",
|
|
32
34
|
"annotation.list",
|
|
@@ -68,6 +70,13 @@
|
|
|
68
70
|
"document.undoOwn",
|
|
69
71
|
"evidence.export",
|
|
70
72
|
"evidence.preview",
|
|
73
|
+
"extension.call",
|
|
74
|
+
"extension.content",
|
|
75
|
+
"extension.describe",
|
|
76
|
+
"extension.install",
|
|
77
|
+
"extension.list",
|
|
78
|
+
"extension.manage",
|
|
79
|
+
"extension.read",
|
|
71
80
|
"feedback.read",
|
|
72
81
|
"feedback.status",
|
|
73
82
|
"feedback.submit",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"method": "session.instructions",
|
|
3
|
+
"inputSchema": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"projectId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[A-Za-z0-9._:@-]{1,128}$"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"projectId"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"outputSchema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"request": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"prompt": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"command": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"request",
|
|
37
|
+
"prompt",
|
|
38
|
+
"command"
|
|
39
|
+
],
|
|
40
|
+
"additionalProperties": true
|
|
41
|
+
},
|
|
42
|
+
"description": "Person at this machine or operator only: read a prompt for the person's own MCP client to connect itself to this existing project. Returns local launcher paths, never credential contents. Reading or copying grants no access, edits no client configuration and starts no runtime."
|
|
43
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// An opt-in, real scientific episode. R packages must already be available;
|
|
3
|
+
// this script never installs dependencies or touches an existing R session.
|
|
4
|
+
import fs from 'node:fs/promises';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import os from 'node:os';
|
|
7
|
+
import assert from 'node:assert/strict';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { RhoService } from '../dist/server.js';
|
|
10
|
+
import { RhoClient } from '../dist/client.js';
|
|
11
|
+
|
|
12
|
+
const repo = fileURLToPath(new URL('../', import.meta.url));
|
|
13
|
+
const source = process.env.RHO_SCLET_PLUGIN ?? path.resolve(repo, '../Rho-plugins/examples/sclet-plugin');
|
|
14
|
+
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'rho-third-party-'));
|
|
15
|
+
await fs.mkdir(path.join(root, 'project'));
|
|
16
|
+
const service = await new RhoService({ root, stateDir: path.join(root, 'state'), rscript: process.env.RHO_RSCRIPT ?? 'Rscript', example: false }).start();
|
|
17
|
+
const client = new RhoClient({ url: service.url, token: service.adminToken });
|
|
18
|
+
const project = await client.call('project.open', { path: 'project' });
|
|
19
|
+
const notes = [];
|
|
20
|
+
let sequence = 0;
|
|
21
|
+
const text = cell => cell.outputs.map(output => output.text ?? '').join('\n') + (cell.error ? '\n' + JSON.stringify(cell.error) : '');
|
|
22
|
+
const json = value => JSON.parse(value.slice(value.indexOf('{'), value.lastIndexOf('}') + 1));
|
|
23
|
+
async function finished(cell) {
|
|
24
|
+
for (let i = 0; i < 600; i++) {
|
|
25
|
+
const current = (await client.call('kernel.read', { projectId: project.id, cellId: cell.cellId })).cells[0];
|
|
26
|
+
if (['done', 'error', 'unknown', 'interrupted'].includes(current.state)) return current;
|
|
27
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
28
|
+
}
|
|
29
|
+
throw new Error('Observation deadline reached; original cell: ' + cell.cellId);
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const plugin = await client.call('extension.install', { source });
|
|
33
|
+
const invoke = (operation, input = {}, changeId = 'acceptance-' + ++sequence) => client.call('extension.call', { projectId: project.id, pluginId: plugin.id, expectedDigest: plugin.digest, operation, input, changeId });
|
|
34
|
+
assert.deepEqual((await invoke('sessions')).value.sessions, []);
|
|
35
|
+
async function run(operation, input = {}) {
|
|
36
|
+
const receipt = await invoke(operation, input); assert.equal(receipt.state, 'completed', receipt.error);
|
|
37
|
+
const cell = await finished(receipt.value.cell); notes.push({ operation, cellId: cell.cellId, state: cell.state });
|
|
38
|
+
assert.equal(cell.state, 'done', text(cell)); return { receipt, cell, text: text(cell) };
|
|
39
|
+
}
|
|
40
|
+
const library = process.env.RHO_SCLET_LIBRARY;
|
|
41
|
+
const seedCode = `${library ? '.libPaths(c(' + JSON.stringify(library) + ', .libPaths()))\n' : ''}if (!requireNamespace("sclet", quietly=TRUE)) stop("Set RHO_SCLET_LIBRARY to an existing sclet library.")\nset.seed(19)\nsce <- scuttle::mockSCE(ncells=60, ngenes=200)`;
|
|
42
|
+
const seed = await client.call('kernel.run', { projectId: project.id, language: 'r', code: seedCode, purpose: 'Disposable third-party plugin trial', changeId: 'seed', waitMs: 0 });
|
|
43
|
+
const seeded = await finished(seed.cell); assert.equal(seeded.state, 'done', text(seeded));
|
|
44
|
+
const packages = await run('check');
|
|
45
|
+
const before = json((await run('ledger', { object: 'sce', includeArtifacts: true })).text);
|
|
46
|
+
await run('registry', { object: 'sce' }); await run('skill', { name: 'sclet-driver' });
|
|
47
|
+
const plan = { task: 'plugin-acceptance', context_fingerprint: before.fingerprint, actions: [
|
|
48
|
+
{ id: 'normalize', action: 'normalize_data' },
|
|
49
|
+
{ id: 'hvg', action: 'find_variable_features', params: { nfeatures: 50 }, depends_on: 'normalize' },
|
|
50
|
+
{ id: 'scale', action: 'scale_data', depends_on: 'hvg' },
|
|
51
|
+
{ id: 'pca', action: 'run_pca', params: { ncomponents: 5 }, depends_on: 'scale' },
|
|
52
|
+
] };
|
|
53
|
+
const validated = json((await run('validate', { object: 'sce', plan })).text); assert.equal(validated.validation.valid, true);
|
|
54
|
+
const executeBody = { validationId: validated.validationId };
|
|
55
|
+
const execution = await invoke('execute', executeBody, 'execute-once'); assert.equal(execution.state, 'completed', execution.error);
|
|
56
|
+
const executed = await finished(execution.value.cell); assert.equal(executed.state, 'done', text(executed));
|
|
57
|
+
assert.equal(json(text(executed)).status, 'completed');
|
|
58
|
+
assert.equal((await invoke('execute', executeBody, 'execute-once')).value.cell.cellId, executed.cellId);
|
|
59
|
+
await run('record', { object: 'sce', recordId: 'smoke-report', result: {
|
|
60
|
+
task: 'plugin-acceptance', answer: 'A synthetic 200-gene, 60-cell input completed normalization, variable feature selection, scaling and PCA. This verifies software integration; no biological conclusion is claimed.',
|
|
61
|
+
findings: [], evidence: [], warnings: ['Synthetic input, not evidence for a biological hypothesis.'], recommendations: [], proposed_actions: [], success_criteria: [], stop_conditions: [], context: { fingerprint: json(text(executed)).fingerprint }, metadata: { provider: 'integration-test' },
|
|
62
|
+
} });
|
|
63
|
+
const report = await run('report', { object: 'sce', recordId: 'smoke-report' }); assert.match(report.text, /all checks passed/);
|
|
64
|
+
const after = json((await run('ledger', { object: 'sce', includeArtifacts: true })).text);
|
|
65
|
+
assert.equal(after.dataset.reductions, 'PCA'); assert.equal(after.features.hvg.n, 50);
|
|
66
|
+
assert.equal(json((await run('validate', { object: 'sce', plan })).text).validation.valid, false);
|
|
67
|
+
await client.call('extension.manage', { pluginId: plugin.id, expectedDigest: plugin.digest, action: 'disable' });
|
|
68
|
+
await assert.rejects(invoke('ledger', { object: 'sce' }), /disabled/);
|
|
69
|
+
await client.call('extension.manage', { pluginId: plugin.id, expectedDigest: plugin.digest, action: 'remove' });
|
|
70
|
+
assert.equal((await invoke('execute', executeBody, 'execute-once')).value.cell.cellId, executed.cellId);
|
|
71
|
+
const sessions = await client.call('kernel.read', { projectId: project.id, limit: 1 });
|
|
72
|
+
assert.ok(sessions.sessions.some(s => s.sessionId === seed.cell.sessionId && s.state !== 'ended'));
|
|
73
|
+
const output = path.resolve(process.env.RHO_THIRD_PARTY_OUTPUT ?? path.join(repo, 'output/third-party-plugins/acceptance.json'));
|
|
74
|
+
await fs.mkdir(path.dirname(output), { recursive: true });
|
|
75
|
+
await fs.writeFile(output, JSON.stringify({ at: new Date().toISOString(), node: process.version, platform: process.platform, source, digest: plugin.digest, packages: packages.text, notes, execution: json(text(executed)), report: report.text, lifecycle: 'disable/remove retained original cell and live R session', passed: true }, null, 2) + '\n');
|
|
76
|
+
console.log(JSON.stringify({ passed: true, output }));
|
|
77
|
+
} finally { await service.close(); await fs.rm(root, { recursive: true, force: true }); }
|
package/vendor/composition.json
CHANGED
|
@@ -11,21 +11,21 @@
|
|
|
11
11
|
"build": {
|
|
12
12
|
"system": "github-actions",
|
|
13
13
|
"workflow": "YuLab-SMU/Rho/.github/workflows/ci.yml@refs/heads/main",
|
|
14
|
-
"run": "https://github.com/YuLab-SMU/Rho/actions/runs/
|
|
14
|
+
"run": "https://github.com/YuLab-SMU/Rho/actions/runs/42361803786",
|
|
15
15
|
"attempt": 1
|
|
16
16
|
},
|
|
17
17
|
"application": {
|
|
18
18
|
"repository": "https://github.com/YuLab-SMU/Rho",
|
|
19
|
-
"commit": "
|
|
20
|
-
"tree": "
|
|
21
|
-
"buildInputsSha256": "
|
|
19
|
+
"commit": "cd559cc0f832cd4f68386caa351ddad942f41e21",
|
|
20
|
+
"tree": "f967ccbdda8e07be1bdad994db4d2340205b517b",
|
|
21
|
+
"buildInputsSha256": "e1a5c034aa93c580f6939643dd7d9681a736635092dd39067170aa2bb556259e",
|
|
22
22
|
"localOverride": null
|
|
23
23
|
},
|
|
24
24
|
"plugins": {
|
|
25
25
|
"repository": "https://github.com/YuLab-SMU/Rho-plugins",
|
|
26
|
-
"commit": "
|
|
27
|
-
"tree": "
|
|
28
|
-
"buildInputsSha256": "
|
|
26
|
+
"commit": "434d9a33d82125e7b3f291fae83e7b33a0fc2a24",
|
|
27
|
+
"tree": "482c71685214c5437016592321221852c94b8327",
|
|
28
|
+
"buildInputsSha256": "8db139ca3c92937b265749637370ec2d79659d74e9e697e1d36867815838a31f",
|
|
29
29
|
"localOverride": null,
|
|
30
30
|
"selected": [
|
|
31
31
|
"documents",
|
|
@@ -121,11 +121,11 @@
|
|
|
121
121
|
{
|
|
122
122
|
"id": "agent",
|
|
123
123
|
"package": "@rho-workspace/plugin-agent",
|
|
124
|
-
"version": "0.4.
|
|
125
|
-
"filename": "rho-workspace-plugin-agent-0.4.
|
|
126
|
-
"bytes":
|
|
127
|
-
"sha256": "
|
|
128
|
-
"integrity": "sha512-
|
|
124
|
+
"version": "0.4.30",
|
|
125
|
+
"filename": "rho-workspace-plugin-agent-0.4.30.tgz",
|
|
126
|
+
"bytes": 140297,
|
|
127
|
+
"sha256": "eb3ece278bd163d727393e29126a52a686eee7e32f9d49e5bb88e195a5b2d9b7",
|
|
128
|
+
"integrity": "sha512-O6c276Js2JXwjPoUfPFBYFM2iXb6emIzyXoMd0qco0BCfDm9JE9kOq69JJFmf3m/TsY3U2RlgEl73xuP5z58XQ=="
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"id": "annotations",
|
|
@@ -167,12 +167,12 @@
|
|
|
167
167
|
},
|
|
168
168
|
"catalog": {
|
|
169
169
|
"path": "dist/plugin-inventory.json",
|
|
170
|
-
"sha256": "
|
|
171
|
-
"bytes":
|
|
170
|
+
"sha256": "c91b2283576672a2f4fb11fd9839e2b6f1adae47758434b560c06c071c5b0090",
|
|
171
|
+
"bytes": 40021,
|
|
172
172
|
"source": {
|
|
173
|
-
"commit": "
|
|
174
|
-
"tree": "
|
|
175
|
-
"buildInputsSha256": "
|
|
173
|
+
"commit": "434d9a33d82125e7b3f291fae83e7b33a0fc2a24",
|
|
174
|
+
"tree": "482c71685214c5437016592321221852c94b8327",
|
|
175
|
+
"buildInputsSha256": "8db139ca3c92937b265749637370ec2d79659d74e9e697e1d36867815838a31f",
|
|
176
176
|
"localOverride": null
|
|
177
177
|
},
|
|
178
178
|
"scope": "Descriptive inventory of the reviewed owners; contributes no runtime entry or authority."
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"web": {
|
|
217
217
|
"format": "rho.web-build/1",
|
|
218
218
|
"uiProtocol": "0.1-draft",
|
|
219
|
-
"rendererBuild": "
|
|
219
|
+
"rendererBuild": "094bee327d7964c2c6ea9fe3db6d35899545d090074c964d0cdb056f556471f1",
|
|
220
220
|
"ownerEntries": [
|
|
221
221
|
{
|
|
222
222
|
"plugin": "documents",
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
"component": "rho.agent-note",
|
|
276
276
|
"version": "0.2.0",
|
|
277
277
|
"source": "web/entries/agent.tsx",
|
|
278
|
-
"packageVersion": "0.4.
|
|
278
|
+
"packageVersion": "0.4.30",
|
|
279
279
|
"entrySha256": "0e18d175dfc25fd8e237ec0341422e0d1311d2d8882e487962e8c7c25794d69e"
|
|
280
280
|
},
|
|
281
281
|
{
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
{
|
|
471
471
|
"path": ".vite/manifest.json",
|
|
472
472
|
"bytes": 23614,
|
|
473
|
-
"sha256": "
|
|
473
|
+
"sha256": "2dc60f63158b05c257607125515a2cdd1c31059f96cf596a31c88bb20dbf6576"
|
|
474
474
|
},
|
|
475
475
|
{
|
|
476
476
|
"path": "assets/answer-board-CBkGbSLD.js",
|
|
@@ -478,59 +478,59 @@
|
|
|
478
478
|
"sha256": "2d1a41d6ce8a1ad1e06c6eb26bf33520b467b1fcb3a158d6c585c6b9140a0bc6"
|
|
479
479
|
},
|
|
480
480
|
{
|
|
481
|
-
"path": "assets/canvas-
|
|
482
|
-
"bytes":
|
|
483
|
-
"sha256": "
|
|
481
|
+
"path": "assets/canvas-D8rDdfDz.js",
|
|
482
|
+
"bytes": 20318,
|
|
483
|
+
"sha256": "cd9dfbef068bacb28e1327cd137b26fff32004288a0827152ec532abc24f7558"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"path": "assets/choices-D-YfnFP6.js",
|
|
487
|
+
"bytes": 11096,
|
|
488
|
+
"sha256": "29d0563c9bf57492a6aee0c373d1da152594435c35708b5d2b6a7c79f18f6a33"
|
|
484
489
|
},
|
|
485
490
|
{
|
|
486
491
|
"path": "assets/choices-DLah50GC.css",
|
|
487
492
|
"bytes": 1659,
|
|
488
493
|
"sha256": "2285c02644e12f379880df802cd34ed6262d73a159aeb9a12e80de44f12db447"
|
|
489
494
|
},
|
|
490
|
-
{
|
|
491
|
-
"path": "assets/choices-DU9kHlyQ.js",
|
|
492
|
-
"bytes": 11095,
|
|
493
|
-
"sha256": "85b5a4a9e61cc761c32c5f09bc8c760681cfc57d829088dc932e0aeff77990c9"
|
|
494
|
-
},
|
|
495
495
|
{
|
|
496
496
|
"path": "assets/console-By4Mvn1y.css",
|
|
497
497
|
"bytes": 3779,
|
|
498
498
|
"sha256": "38fdefe20f181e6a050793f715a13bcbde2e9c167f80f554a775e3578dcd78bc"
|
|
499
499
|
},
|
|
500
500
|
{
|
|
501
|
-
"path": "assets/console-
|
|
501
|
+
"path": "assets/console-Trqc0swD.js",
|
|
502
502
|
"bytes": 21020,
|
|
503
|
-
"sha256": "
|
|
503
|
+
"sha256": "c0e7821902b6e19724d259aec4aa115ed7462402eec0a3f6452df10f3152a10c"
|
|
504
504
|
},
|
|
505
505
|
{
|
|
506
|
-
"path": "assets/dist-
|
|
507
|
-
"bytes":
|
|
508
|
-
"sha256": "
|
|
506
|
+
"path": "assets/dist-DCtcCJPs.js",
|
|
507
|
+
"bytes": 34901,
|
|
508
|
+
"sha256": "9deb65f8b227a08473b422b448735f045aa2251acf498f169640f7d38d96173e"
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
|
-
"path": "assets/dist-
|
|
512
|
-
"bytes":
|
|
513
|
-
"sha256": "
|
|
511
|
+
"path": "assets/dist-DpIHRk3B.js",
|
|
512
|
+
"bytes": 35411,
|
|
513
|
+
"sha256": "22bf26faa31efb7f46296f6fc4f3b831bcf9303056c1b9bf9bb1b0fc0c58cdd3"
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
|
-
"path": "assets/dist-
|
|
517
|
-
"bytes":
|
|
518
|
-
"sha256": "
|
|
516
|
+
"path": "assets/dist-DZmszrjG.js",
|
|
517
|
+
"bytes": 183314,
|
|
518
|
+
"sha256": "0879df241ab3ba4064054d6c5f44a70ee10ad2f32b7d249107c143578dd891de"
|
|
519
519
|
},
|
|
520
520
|
{
|
|
521
|
-
"path": "assets/dist-
|
|
521
|
+
"path": "assets/dist-eMx6b8N1.js",
|
|
522
522
|
"bytes": 44651,
|
|
523
|
-
"sha256": "
|
|
523
|
+
"sha256": "f0e536da7c98837e3b7841fbaf1e6eef294bb1d6fb5a939e923ec6d605ef56cd"
|
|
524
524
|
},
|
|
525
525
|
{
|
|
526
|
-
"path": "assets/dist-
|
|
527
|
-
"bytes":
|
|
528
|
-
"sha256": "
|
|
526
|
+
"path": "assets/dist-pF902jHA.js",
|
|
527
|
+
"bytes": 37492,
|
|
528
|
+
"sha256": "d2af94b048491a451eb7225abd3c581843d8e4370708c7a5f2dd4d984b7fc2f5"
|
|
529
529
|
},
|
|
530
530
|
{
|
|
531
|
-
"path": "assets/explore-in-
|
|
532
|
-
"bytes":
|
|
533
|
-
"sha256": "
|
|
531
|
+
"path": "assets/explore-in-BCHqjJ7B.js",
|
|
532
|
+
"bytes": 782,
|
|
533
|
+
"sha256": "75cea34047fd256982cea015a63bc82a39e3819c6bd8bcabe684893852ec7127"
|
|
534
534
|
},
|
|
535
535
|
{
|
|
536
536
|
"path": "assets/facts-BMO6V3-3.js",
|
|
@@ -548,9 +548,9 @@
|
|
|
548
548
|
"sha256": "e84aa51d7376fc0a6104c0b140821c54bc25a2b55be32be6005e08b85dd7e0df"
|
|
549
549
|
},
|
|
550
550
|
{
|
|
551
|
-
"path": "assets/graph-
|
|
552
|
-
"bytes":
|
|
553
|
-
"sha256": "
|
|
551
|
+
"path": "assets/graph-lENgfQNH.js",
|
|
552
|
+
"bytes": 48768,
|
|
553
|
+
"sha256": "39361c04da7930383cb5b0fd9753b1cbdb28d186c514da92cc13a4524ef3ef97"
|
|
554
554
|
},
|
|
555
555
|
{
|
|
556
556
|
"path": "assets/home-CCbP6kS-.js",
|
|
@@ -558,14 +558,14 @@
|
|
|
558
558
|
"sha256": "6bbbe67af01bd03b2777abcc02e63dda1bad1fa7aaf9296b07cda04ac481e7cb"
|
|
559
559
|
},
|
|
560
560
|
{
|
|
561
|
-
"path": "assets/index-
|
|
562
|
-
"bytes":
|
|
563
|
-
"sha256": "
|
|
561
|
+
"path": "assets/index-B3_OVy91.css",
|
|
562
|
+
"bytes": 114009,
|
|
563
|
+
"sha256": "15692810923cc0bcc8e4eb08df8a9ec0ca8ebaf8a05c754b6589052603869201"
|
|
564
564
|
},
|
|
565
565
|
{
|
|
566
|
-
"path": "assets/index-
|
|
567
|
-
"bytes":
|
|
568
|
-
"sha256": "
|
|
566
|
+
"path": "assets/index-BpL_Kl_s.js",
|
|
567
|
+
"bytes": 1779367,
|
|
568
|
+
"sha256": "0944ee8e42207a963f7be95c817b58648651f8cd2ccae0f475c265a105234038"
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
"path": "assets/KaTeX_AMS-Regular-BQhdFMY1.woff2",
|
|
@@ -878,14 +878,14 @@
|
|
|
878
878
|
"sha256": "717274e2c02c05db67e7f1bf6fec4dfae799f3a2780ea7a95c4fdf0d160dfab8"
|
|
879
879
|
},
|
|
880
880
|
{
|
|
881
|
-
"path": "assets/notes-meaning-
|
|
881
|
+
"path": "assets/notes-meaning-DcVGUBBY.js",
|
|
882
882
|
"bytes": 5850,
|
|
883
|
-
"sha256": "
|
|
883
|
+
"sha256": "4af65e597d04917ac151c30f91f0811139350b3758132686729f8d49f63f849b"
|
|
884
884
|
},
|
|
885
885
|
{
|
|
886
|
-
"path": "assets/overview-
|
|
887
|
-
"bytes":
|
|
888
|
-
"sha256": "
|
|
886
|
+
"path": "assets/overview-CDnVKlOt.js",
|
|
887
|
+
"bytes": 48647,
|
|
888
|
+
"sha256": "a4e4bf4b0bfbbd3a73fbb216dcee730e46e83bb260fab25f836406db93840b14"
|
|
889
889
|
},
|
|
890
890
|
{
|
|
891
891
|
"path": "assets/overview-CmC7mah4.css",
|
|
@@ -893,9 +893,9 @@
|
|
|
893
893
|
"sha256": "f6b19e1fbbb7cc884faff634b6f7b016f806313b946600b11bbf76dc59caf1a9"
|
|
894
894
|
},
|
|
895
895
|
{
|
|
896
|
-
"path": "assets/preview-
|
|
897
|
-
"bytes":
|
|
898
|
-
"sha256": "
|
|
896
|
+
"path": "assets/preview-BEC1E9MK.js",
|
|
897
|
+
"bytes": 4703,
|
|
898
|
+
"sha256": "9888dc22cea50e3757542e144c09fc85bf53fc3abc212955a8af6ae059d155fa"
|
|
899
899
|
},
|
|
900
900
|
{
|
|
901
901
|
"path": "assets/r-CxDmU1I4.js",
|
|
@@ -913,9 +913,9 @@
|
|
|
913
913
|
"sha256": "364a909acd2231cafe737e8f9b19ad58ba16d3b6cbb90b0de78015dd437bd56b"
|
|
914
914
|
},
|
|
915
915
|
{
|
|
916
|
-
"path": "assets/review-
|
|
916
|
+
"path": "assets/review-DYP0aCXb.js",
|
|
917
917
|
"bytes": 4860,
|
|
918
|
-
"sha256": "
|
|
918
|
+
"sha256": "6059e4b493405b191cae348f63ce7ae32ae97e8165710adeee0d26672405576e"
|
|
919
919
|
},
|
|
920
920
|
{
|
|
921
921
|
"path": "assets/rolldown-runtime-XKyaHtl9.js",
|
|
@@ -923,9 +923,9 @@
|
|
|
923
923
|
"sha256": "548d1dbf321e7d2ae804fcc158b588706a7c52f8ca175de1490c6ccb4dbe55b7"
|
|
924
924
|
},
|
|
925
925
|
{
|
|
926
|
-
"path": "assets/skills-
|
|
926
|
+
"path": "assets/skills-1ec0Z-jx.js",
|
|
927
927
|
"bytes": 12538,
|
|
928
|
-
"sha256": "
|
|
928
|
+
"sha256": "aeaf67104b99a56d368f41e6f2ddceb82c179f5309281258a8cecf50c8cc264b"
|
|
929
929
|
},
|
|
930
930
|
{
|
|
931
931
|
"path": "assets/skills-WkE0KCzn.css",
|
|
@@ -933,9 +933,9 @@
|
|
|
933
933
|
"sha256": "162823ce43fd1e1f2bd92a330516c171280b59a0b5460752f0d7aba5f194f3eb"
|
|
934
934
|
},
|
|
935
935
|
{
|
|
936
|
-
"path": "assets/skills-work-
|
|
936
|
+
"path": "assets/skills-work-DNexV4OJ.js",
|
|
937
937
|
"bytes": 2528,
|
|
938
|
-
"sha256": "
|
|
938
|
+
"sha256": "3f30614690b9199ece7838ab8076bb902f6f2fb619ff03dd568806b562ac1fa9"
|
|
939
939
|
},
|
|
940
940
|
{
|
|
941
941
|
"path": "assets/snapshot-CAxBYPvV.js",
|
|
@@ -948,29 +948,29 @@
|
|
|
948
948
|
"sha256": "7acddf1303643a15a8df990808a42e218033edf56b8c03b0fcc8271683b0195f"
|
|
949
949
|
},
|
|
950
950
|
{
|
|
951
|
-
"path": "assets/studio-process-
|
|
951
|
+
"path": "assets/studio-process-EYQgikxq.js",
|
|
952
952
|
"bytes": 22888,
|
|
953
|
-
"sha256": "
|
|
953
|
+
"sha256": "055ece65b0ba5c0b6787daaa834bdd4e09aeb66a0fb062735114a5fa40c0fa3e"
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
|
-
"path": "assets/timeline-events-
|
|
956
|
+
"path": "assets/timeline-events-Chj2Gbx7.js",
|
|
957
957
|
"bytes": 2227,
|
|
958
|
-
"sha256": "
|
|
958
|
+
"sha256": "be716e87f5a47e4e602a0d326e84cfb8e5e701abe10ae484e3f23fdb3587c3ff"
|
|
959
959
|
},
|
|
960
960
|
{
|
|
961
|
-
"path": "assets/work-turns-
|
|
961
|
+
"path": "assets/work-turns-CT9RVcWY.js",
|
|
962
962
|
"bytes": 1460,
|
|
963
|
-
"sha256": "
|
|
963
|
+
"sha256": "2270b5c2510a3b04a642621a345ead825c44bc7896b7231a3fbfb24903f62e3f"
|
|
964
964
|
},
|
|
965
965
|
{
|
|
966
|
-
"path": "assets/workspace-
|
|
967
|
-
"bytes":
|
|
968
|
-
"sha256": "
|
|
966
|
+
"path": "assets/workspace-COmCbGV3.js",
|
|
967
|
+
"bytes": 81815,
|
|
968
|
+
"sha256": "d55693dd507204b35dd28f7e8723e9e15a425d05f8b727c55d73e7866b1f7562"
|
|
969
969
|
},
|
|
970
970
|
{
|
|
971
971
|
"path": "index.html",
|
|
972
972
|
"bytes": 1142,
|
|
973
|
-
"sha256": "
|
|
973
|
+
"sha256": "d304ba22383bd32eba1e0ab88319c127fe05a0d255fc178253a79a0b6ce22425"
|
|
974
974
|
},
|
|
975
975
|
{
|
|
976
976
|
"path": "licenses.md",
|
|
@@ -980,14 +980,14 @@
|
|
|
980
980
|
{
|
|
981
981
|
"path": "renderer.json",
|
|
982
982
|
"bytes": 85,
|
|
983
|
-
"sha256": "
|
|
983
|
+
"sha256": "05327600965d5e945f3f6b239255194b3a90324408889b7dc2508a98cf4c1440"
|
|
984
984
|
}
|
|
985
985
|
],
|
|
986
|
-
"assetsSha256": "
|
|
986
|
+
"assetsSha256": "75bcc4b9c1aee998d3112cc11bae15e86356104151ecea4f81826d5c3d13ec5a",
|
|
987
987
|
"licenses": "licenses.md",
|
|
988
988
|
"node": "v22.23.4"
|
|
989
989
|
},
|
|
990
|
-
"productionLockSha256": "
|
|
990
|
+
"productionLockSha256": "1e23b2450fbcb32ad43c05c45198616e43f473851d1d6429186abd8f65a71fb4",
|
|
991
991
|
"bundledPruning": {
|
|
992
992
|
"declarationsKept": [
|
|
993
993
|
"@agentclientprotocol/sdk",
|
|
Binary file
|
package/web/theme.css
CHANGED
|
@@ -733,6 +733,18 @@ ol.md-list { list-style-type: decimal; }
|
|
|
733
733
|
/* The message box: one rounded surface holding what is written, the model and the send action. */
|
|
734
734
|
.conversation-composer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 6px 14px 10px; background: var(--color-surface); }
|
|
735
735
|
.conversation-composer [role="alert"] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 4px; color: var(--color-failed); font-size: 12px; }
|
|
736
|
+
/* A session opened from another window: where it started, whether it is open there now, and the
|
|
737
|
+
command that continues it in a terminal. */
|
|
738
|
+
.session-notice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 0 4px; color: var(--color-muted); font-size: 12px; line-height: 1.5; }
|
|
739
|
+
.session-notice p { flex: 1 1 260px; margin: 0; }
|
|
740
|
+
.session-notice strong { color: var(--color-amber-text); font-weight: 600; }
|
|
741
|
+
.session-notice .text-button, .session-command { min-height: 0; padding: 0; font-size: 12px; }
|
|
742
|
+
.session-notice p .text-button { color: var(--color-ink); text-decoration: underline; text-underline-offset: 2px; }
|
|
743
|
+
.session-command { display: inline-flex; align-items: center; gap: 5px; color: var(--color-muted); }
|
|
744
|
+
.turn-where { color: var(--color-meta); }
|
|
745
|
+
.outside-results { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; padding: 0; list-style: none; font-size: 12.5px; }
|
|
746
|
+
.outside-results li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
|
|
747
|
+
.outside-results small { color: var(--color-meta); }
|
|
736
748
|
.composer-box { display: flex; flex-direction: column; gap: 4px; padding: 11px 8px 8px 14px; border: 1px solid var(--color-control-border); border-radius: 18px; background: var(--color-surface); box-shadow: 0 6px 20px rgba(20, 30, 25, 0.06); cursor: text; }
|
|
737
749
|
.composer-box:focus-within { border-color: var(--color-hairline-strong); box-shadow: 0 0 0 3px var(--color-accent-soft), 0 6px 20px rgba(20, 30, 25, 0.06); }
|
|
738
750
|
.composer-box textarea { display: block; width: 100%; min-height: 0; max-height: 240px; padding: 0 6px 2px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; line-height: 1.55; resize: none; }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{r}from"./markdown-0ngRuTpW.js";import{N as i}from"./canvas-BXhC8RDZ.js";import{Ct as a,Q as o,St as s,X as c,h as l}from"./index-BHQIaDsx.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./notes-meaning-DdPbtNzJ.js";var g=e(n(),1),_=(e,t)=>e.length>t?e.slice(0,t-1).trimEnd()+`…`:e;function v(e){let{process:t,meanings:n,traces:r}=e,i=new Map(e.files.map(e=>[e.path,e])),s=f(n),c=e.described??new Map,l=new Map,u=new Map,d=new Map,p=[],m=(e,t,n,r,i,a,o)=>{let s=t+`>`+n+`:`+r;e.has(s)||e.set(s,{id:s,from:t,to:n,label:r,basis:i,at:a,turn:o})},h=e=>t.nodes.filter(t=>t.kind===`file`&&t.path===e).flatMap(e=>e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).sort((e,t)=>e.capturedAt-t.capturedAt),g=(e,n)=>t.nodes.find(t=>t.kind===`file`&&t.path===e&&(!n||t.resource?.version===n||t.versions?.some(e=>e.resource.version===n))),v=(t,n,o,u)=>{let d=`m:f:`+t,f=l.get(d);if(!f){let p=i.get(t),m=u?.files.find(e=>e.path===t)?.kept??null,g=h(t).at(-1),_=m??(g?{resource:g.resource,at:g.capturedAt}:null),v=a(t,s,c),y=s.get(t);f={id:d,kind:`file`,title:t.split(`/`).at(-1)??t,path:t,at:o,category:p?.category??e.kindOf(t),exists:!!p,bytes:p?.bytes,modifiedAt:p?.modifiedAt,..._?{resource:_.resource,capturedAt:_.at}:{gap:`No version of this file was kept in the Agent's record.`},events:[{key:d,at:o,node:d,turn:n,action:`write`,label:`Named in the notes`}],meaning:{session:``,conversationId:null,...v?{description:{...v,...v.source===`notes`&&y?{trace:r.get(y.statement)}:{}}}:{}}},l.set(d,f)}return f};n.forEach(n=>{let a=n.statements;if(!a.length)return;let o=`m:`+(n.conversationId??`notes-`+n.line),s=t.turns.find(e=>e.conversationId===n.conversationId),c=a.map(e=>r.get(e)?.written?.at).filter(e=>e!==void 0),f=c.length?Math.min(...c):s?.start??0;p.push({id:o,conversationId:n.conversationId??``,title:n.title,agent:s?.agent??`Notes`,start:f,end:Math.max(f,...c),running:!1});let h=e=>r.get(e)?.written?.at??f,g=e=>({session:n.title,conversationId:n.conversationId,...e?{statement:e,trace:r.get(e)}:{}}),y=a.filter(e=>e.kind===`todo`),b=a.find(e=>e.kind===`question`),C={id:`q:`+o,kind:`question`,title:_(b?.text||n.title,160),text:b?.text||n.title,at:b?h(b):f,turn:o,conversationId:n.conversationId??void 0,agent:s?.agent,events:[],meaning:{...g(b),...y.length?{todos:{done:y.filter(e=>e.done).length,total:y.length}}:{}}};l.set(C.id,C);let w=new Map;a.forEach((e,i)=>{if(e.kind!==`finding`&&e.kind!==`choice`)return;let a={id:`m:s:`+o+`:`+e.line,kind:e.kind,title:_(e.text,220),text:e.text,at:h(e),turn:o,conversationId:n.conversationId??void 0,events:[{key:`m:s:`+o+`:`+e.line,at:h(e),node:`m:s:`+o+`:`+e.line,turn:o,action:`write`,label:`Written in the notes`}],meaning:g(e)};l.set(a.id,a),w.set(i,a),m(u,C.id,a.id,e.kind===`finding`?`found`:`chose`,`declared`,h(e),o);for(let t of e.links)m(u,a.id,v(t,o,h(e),r.get(e)).id,e.kind===`finding`?`rests on`:`gives`,`declared`,h(e),o);for(let t of e.alternatives??[])for(let n of t.links)m(u,a.id,v(n,o,h(e),r.get(e)).id,`instead gives`,`declared`,h(e),o);let s=r.get(e)?.written;s&&t.nodes.some(e=>e.id===`q:`+s.turn)&&m(d,a.id,`q:`+s.turn,`written in`,`observed`,s.at,o)}),a.forEach(e=>{if(e.kind!==`figure`)return;let t=e.of===void 0?void 0:w.get(e.of);for(let n of e.links)m(u,(t??C).id,v(n,o,h(e),r.get(e)).id,t?`shown in`:`shows`,`declared`,h(e),o)});let T=()=>new Set([...u.values()].map(e=>e.to));for(let e of a)if(e.kind===`file`)for(let t of e.links){let n=v(t,o,h(e),r.get(e));!T().has(n.id)&&n.category!==`code`&&n.category!==`data`&&m(u,C.id,n.id,`made`,`declared`,h(e),o)}let E=a.filter(e=>e.kind===`method`||e.kind===`file`);for(let t of E){let n=t.links.filter(t=>(i.get(t)?.category??e.kindOf(t))===`code`),a=t.links.filter(t=>(i.get(t)?.category??e.kindOf(t))===`data`);for(let e of n)for(let n of a)m(u,v(e,o,h(t),r.get(t)).id,v(n,o,h(t),r.get(t)).id,`reads`,`declared`,h(t),o)}n.conversationId&&x(o,C,n.conversationId),S(o,n.conversationId);for(let e of E)for(let t of e.links){let n=v(t,o,h(e),r.get(e));T().has(n.id)||m(u,C.id,n.id,n.category===`data`?`uses data`:`uses`,`declared`,h(e),o)}});let y=new Set(n.map(e=>e.conversationId));for(let e of new Set([...c.values()].map(e=>e.conversationId))){if(y.has(e)||!b(e).length)continue;let n=`m:`+e,r=t.turns.find(t=>t.conversationId===e),i=t.nodes.find(t=>t.kind===`question`&&t.conversationId===e),a=b(e).map(e=>Date.parse(e.observedAt)),o=r?.start??Math.min(...a);p.push({id:n,conversationId:e,title:r?.title??`Conversation`,agent:r?.agent??`Agent`,start:o,end:Math.max(o,...a),running:!1});let s={id:`q:`+n,kind:`question`,title:_(i?.text??r?.title??`Conversation`,160),text:i?.text??r?.title??``,at:o,turn:n,conversationId:e,agent:r?.agent,events:[],meaning:{session:r?.title??`Conversation`,conversationId:e,...i?{message:{id:i.id,at:i.at}}:{}}};l.set(s.id,s),x(n,s,e),S(n,e)}function b(t){return[...c.values()].filter(n=>n.conversationId===t&&[`results`,`figures`].includes(i.get(n.path)?.category??e.kindOf(n.path)??``))}function x(e,t,n){for(let r of b(n)){if(l.has(`m:f:`+r.path))continue;let n=Date.parse(r.observedAt),i=v(r.path,e,n);m(u,t.id,i.id,`made`,`observed`,n,e)}}function S(e,n){let r=e=>!n||e.turn.startsWith(n+`/`),i=new Map(t.nodes.map(e=>[e.id,e])),a=!0;for(;a;){a=!1;for(let n of[...l.values()])if(n.kind===`file`&&n.path&&n.events[0]?.turn===e){for(let o of t.edges.filter(e=>r(e)&&i.get(e.to)?.path===n.path)){let r=i.get(o.from);if(r?.kind===`run`)for(let s of t.edges.filter(e=>e.to===r.id&&(e.label===`runs`||e.label===`named`))){let t=i.get(s.from);if(!t?.path||t.path===n.path)continue;let r=l.size,c=v(t.path,e,s.at);m(u,n.id,c.id,s.label===`runs`?`made by`:`named with`,o.basis,o.at,e),l.size>r&&(a=!0)}}if(n.category===`code`)for(let o of t.edges.filter(e=>r(e)&&e.label===`runs`&&i.get(e.from)?.path===n.path))for(let r of t.edges.filter(e=>e.to===o.to&&e.label===`named`)){let t=i.get(r.from);if(!t?.path||t.path===n.path)continue;let o=l.size;m(u,n.id,v(t.path,e,r.at).id,`reads`,`named`,r.at,e),l.size>o&&(a=!0)}}}}for(let e of l.values()){if(e.kind!==`file`||!e.path)continue;let t=g(e.path,e.resource?.version)??g(e.path);t&&m(d,e.id,t.id,`kept as`,`observed`,e.capturedAt??e.at,e.events[0].turn)}let C=`m:f:`+o,w=e=>e.from!==C&&e.to!==C;return{nodes:[...l.values()].filter(e=>e.id!==C),edges:[...u.values()].filter(w),turns:p,traces:[...d.values()].filter(w)}}function y(e,t,n){return n===`process`||!t||!t.nodes.length?e:n===`meaning`?{...e,nodes:t.nodes,edges:t.edges,turns:t.turns,events:[],live:null,omittedNodes:0}:{...e,nodes:[...t.nodes,...e.nodes],edges:[...t.edges,...t.traces,...e.edges],turns:[...t.turns,...e.turns]}}var b={versions:24},x=new Map;function S(e,t,n,r,o,d=[]){let p=t.project.id,h=(0,g.useMemo)(()=>n.nodes.filter(e=>e.kind===`file`&&e.path===`project-notes.md`).flatMap(e=>(e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).map(t=>({...t,turn:e.events.find(e=>e.action===`capture`&&e.key.endsWith(`:`+t.resource.id))?.turn??e.events[0]?.turn??``}))).sort((e,t)=>e.capturedAt-t.capturedAt).slice(-b.versions),[n]),_=h.map(e=>e.resource.version).join(`,`),[y,S]=(0,g.useState)([]);return(0,g.useEffect)(()=>{let t=!0;return Promise.all(h.map(t=>{let n=p+`:`+t.resource.id+`@`+t.resource.version;return x.has(n)||x.set(n,l(e,p,t.resource,c.maxTitleBytes).then(e=>new TextDecoder().decode(e)).catch(()=>(x.delete(n),``))),x.get(n).then(e=>({text:e,at:t.capturedAt,turn:t.turn,conversationId:t.turn.split(`/`)[0]??``,resource:t.resource}))})).then(e=>{t&&S(e.filter(e=>e.text))}),()=>{t=!1}},[e,p,_]),(0,g.useMemo)(()=>{let e=m(o.length>c.maxTitleBytes?``:o),t=e=>n.nodes.filter(t=>t.kind===`file`&&t.path===e).flatMap(e=>e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).map(e=>({at:e.capturedAt,resource:e.resource})),l=e=>{let t=r.find(t=>t.path===e);return t?.modifiedAt?Date.parse(t.modifiedAt):null},p=new Map;for(let n of e)for(let e of n.statements)p.set(e,u(e,y,t,l));let g=s(d),_=f(e);return{meanings:e,traces:p,layer:v({process:n,meanings:e,traces:p,files:r,kindOf:e=>i(e),described:g}),descriptions:_,versions:{read:y.length,kept:h.length},holds:e=>a(e,_,g)}},[o,y,n,r,d])}var C=t();function w({statement:e,trace:t,conversationId:n,client:i,projectId:a,onPath:o,onSent:s}){let[c,l]=(0,g.useState)(null),u=e=>t?.files.find(t=>t.path===e)?.later,f=e=>e.map(e=>(0,C.jsxs)(`button`,{className:`work-file`,title:e+(u(e)===`kept`?` · a newer version was kept since this was written`:u(e)===`written`?` · written again since this was written`:``),onClick:()=>o(e),children:[(0,C.jsx)(r,{name:/\.(png|jpe?g|svg)$/i.test(e)?`image`:/\.(csv|tsv)$/i.test(e)?`table`:`file`,size:13}),(0,C.jsx)(`span`,{children:e.split(`/`).at(-1)}),u(e)&&(0,C.jsx)(`small`,{children:`changed since`})]},e)),{topic:m,rest:_}=d(p(e.text,e.links)),v=e.alternatives??[];return(0,C.jsx)(`div`,{className:`choice`+(m?``:` untitled`),children:(0,C.jsxs)(`div`,{className:`choice-grid`,children:[m&&(0,C.jsx)(`p`,{className:`choice-topic`,children:m}),(0,C.jsxs)(`div`,{className:`choice-body`,children:[(0,C.jsx)(`p`,{className:`choice-taken`,children:_}),e.links.length>0&&(0,C.jsx)(`div`,{className:`choice-foot`,children:f(e.links)}),v.map((t,r)=>(0,C.jsxs)(`div`,{className:`choice-other`,children:[(0,C.jsxs)(`p`,{children:[(0,C.jsx)(`span`,{className:`choice-other-label`,children:`Other option`}),h(p(t.text,t.links))]}),t.links.length>0&&(0,C.jsx)(`div`,{className:`choice-foot`,children:f(t.links)}),n&&c!==r&&(0,C.jsx)(`button`,{className:`text-button choice-instead`,onClick:()=>l(r),children:`Use this instead…`}),n&&c===r&&(0,C.jsx)(T,{conversationId:n,client:i,projectId:a,taken:e.text,option:t.text,onCancel:()=>l(null),onSent:e=>{l(null),s?.(e)}})]},r))]})]})})}function T({conversationId:e,client:t,projectId:n,taken:r,option:i,onCancel:a,onSent:o}){let[s,c]=(0,g.useState)(`Use this option instead: “${i}” (in place of “${r}”). Redo what depends on it and update the notes.`),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``),p=(0,g.useRef)(null);async function m(){if(s.trim()&&!l){p.current?.text!==s&&(p.current={text:s,changeId:`choice-`+crypto.randomUUID()}),u(!0),f(``);try{await t.call(`conversation.send`,{projectId:n,conversationId:e,changeId:p.current.changeId,text:s}),p.current=null,o(e)}catch(e){f(e instanceof Error?e.message:`The message could not be sent.`)}finally{u(!1)}}}return(0,C.jsxs)(`form`,{className:`choice-send`,onSubmit:e=>{e.preventDefault(),m()},onKeyDown:e=>{e.key===`Escape`&&a()},children:[(0,C.jsx)(`textarea`,{rows:3,value:s,"aria-label":`Message to the Agent`,onChange:e=>c(e.target.value),autoFocus:!0}),d&&(0,C.jsx)(`p`,{className:`inline-error`,role:`alert`,children:d}),(0,C.jsxs)(`div`,{className:`choice-send-actions`,children:[(0,C.jsx)(`button`,{type:`button`,onClick:a,children:`Cancel`}),(0,C.jsx)(`button`,{type:`submit`,className:`primary`,disabled:l||!s.trim(),children:l?`Sending…`:`Send to the Agent`})]})]})}export{S as n,y as r,w as t};
|