@myagentroam/node 0.11.44 → 0.11.46
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/connector.js +4 -4
- package/dist/database.js +7 -5
- package/dist/marctl-guidance.js +2 -2
- package/dist/migrations/v023.js +25 -0
- package/dist/runner/abstract-runner.js +1 -1
- package/dist/runner/claude/managed-run-controller.js +4 -11
- package/dist/runner/claude/native-transcript.js +1 -1
- package/dist/runner/claude/tool-normalizer.js +16 -11
- package/dist/runner/claude-code-runner.js +1 -1
- package/dist/runner/codex/conversation-parser.js +29 -38
- package/dist/runner/codex/managed-run-controller.js +5 -5
- package/dist/runner/codex/native-transcript.js +5 -3
- package/dist/runner/codex/tool-normalizer.js +13 -17
- package/dist/runner/codex-runner.js +10 -5
- package/dist/runner/execution-presentation.js +8 -51
- package/dist/runner/mar-agent/agent-network-extension.js +80 -24
- package/dist/runner/mar-agent/agent-operation-presentation.js +167 -0
- package/dist/runner/mar-agent/conversation-normalizer.js +118 -107
- package/dist/runner/mar-agent/history-projection.js +1 -1
- package/dist/runner/mar-agent/hosted-conversation-runtime.js +1 -1
- package/dist/runner/mar-agent/managed-run-controller.js +2 -2
- package/dist/runner/mar-agent-runner.js +5 -5
- package/dist/runner/normalization.js +5 -0
- package/dist/runner/opencode/managed-run-controller.js +2 -2
- package/dist/runner/opencode/tool-normalizer.js +10 -10
- package/dist/runner/opencode-runner.js +5 -5
- package/dist/runner-profiles.js +1 -1
- package/dist/runtime-state.js +7 -7
- package/dist/service/agent-network-bindings.js +10 -6
- package/dist/service/agent-network-service.js +2 -1
- package/dist/service/continuous-run-coordinator.js +1 -1
- package/dist/service/external-session-resume-service.js +1 -1
- package/dist/service/goal-continuation-coordinator.js +3 -3
- package/dist/service/native-session-watch-service.js +6 -3
- package/dist/service/planned-restart-handoff.js +24 -5
- package/dist/service/restart-session-restorer.js +2 -2
- package/dist/service/session-recent-activity.js +1 -1
- package/dist/session/native-session-projection-service.js +8 -8
- package/dist/session/runtime/conversation-projection.js +10 -3
- package/dist/session/session-catalog-service.js +2 -2
- package/dist/session/session-command-service.js +1 -0
- package/dist/session/session-context-service.js +1 -1
- package/dist/session/session-lifecycle-service.js +12 -10
- package/dist/session/session-message-service.js +4 -3
- package/dist/workspace/git.js +44 -1
- package/dist/workspace/workspace-change-service.js +39 -1
- package/dist/workspace/workspace-session-service.js +1 -1
- package/dist/workspace/workspace-workbench-service.js +8 -0
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@ import { lstat } from 'node:fs/promises';
|
|
|
2
2
|
import { basename, posix, resolve } from 'node:path';
|
|
3
3
|
import { publicErrorMessage } from '@myagentroam/protocol';
|
|
4
4
|
import { nodeLog } from '../operational.js';
|
|
5
|
-
import { GitCommandError, isWorkspaceChangeVisible, listGitWorktrees, listGitSubmodules, readCurrentChangesSummary, resolveGitRepository, resolveWorkspaceGitRoot } from './git.js';
|
|
5
|
+
import { GitCommandError, fetchGitRepository, isWorkspaceChangeVisible, listGitWorktrees, listGitSubmodules, readCurrentChangesSummary, resolveGitRepository, resolveWorkspaceGitRoot } from './git.js';
|
|
6
6
|
const CACHE_TTL_MS = 5_000;
|
|
7
7
|
const REPOSITORY_READ_CONCURRENCY = 4;
|
|
8
8
|
const WORKTREE_READ_CONCURRENCY = 4;
|
|
@@ -27,6 +27,44 @@ export class WorkspaceChangeService {
|
|
|
27
27
|
this.changesCache.clear();
|
|
28
28
|
this.changesVersions.clear();
|
|
29
29
|
}
|
|
30
|
+
async fetch(workspace, repositoryPath) {
|
|
31
|
+
if (workspace.kind !== 'GIT_WORKSPACE')
|
|
32
|
+
throw new Error('WORKSPACE_NOT_GIT');
|
|
33
|
+
const root = await resolveWorkspaceGitRoot(workspace.path, workspace.includeParentRepository ?? true);
|
|
34
|
+
// A selected History repository is validated before any network operation.
|
|
35
|
+
const selected = repositoryPath === undefined ? undefined : await resolveGitRepository(root, repositoryPath);
|
|
36
|
+
let paths;
|
|
37
|
+
if (selected !== undefined)
|
|
38
|
+
paths = [repositoryPath];
|
|
39
|
+
else {
|
|
40
|
+
this.invalidate(workspace.id);
|
|
41
|
+
const current = (await this.current(workspace));
|
|
42
|
+
// Linked worktrees share the root's refs and must not fetch them twice.
|
|
43
|
+
paths = current.repositories
|
|
44
|
+
.filter((entry) => entry.source !== 'WORKTREE' && entry.status !== 'UNAVAILABLE')
|
|
45
|
+
.map((entry) => entry.repositoryPath);
|
|
46
|
+
}
|
|
47
|
+
const deadline = performance.now() + 10_000;
|
|
48
|
+
try {
|
|
49
|
+
const results = await mapWithConcurrency(paths, REPOSITORY_READ_CONCURRENCY, async (path) => {
|
|
50
|
+
try {
|
|
51
|
+
if (performance.now() >= deadline)
|
|
52
|
+
return false;
|
|
53
|
+
const repository = selected ?? (await resolveGitRepository(root, path));
|
|
54
|
+
return await fetchGitRepository(repository, Math.max(0, Math.floor(deadline - performance.now())));
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return { fetchFailed: results.some((success) => !success) };
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
// Fetch is request/user scoped, never coalesced with another user's credentials.
|
|
64
|
+
// Invalidate even after partial failure: some remotes may already have advanced.
|
|
65
|
+
this.invalidate(workspace.id);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
30
68
|
async current(workspace) {
|
|
31
69
|
if (workspace.kind !== 'GIT_WORKSPACE')
|
|
32
70
|
throw new Error('WORKSPACE_NOT_GIT');
|
|
@@ -58,6 +58,7 @@ export class WorkspaceWorkbenchService {
|
|
|
58
58
|
'workspace.files.upload.complete': (data) => this.completeUpload(record(data)),
|
|
59
59
|
'workspace.files.upload.cancel': (data) => this.cancelUpload(record(data)),
|
|
60
60
|
'workspace.changes.current': (data) => this.currentChanges(record(data)),
|
|
61
|
+
'workspace.git.fetch': (data) => this.gitFetch(record(data)),
|
|
61
62
|
'workspace.change.diff': (data) => this.changeDiff(record(data)),
|
|
62
63
|
'workspace.change.restore': (data) => this.restoreChange(record(data)),
|
|
63
64
|
'workspace.git.refs.list': (data) => this.gitRefs(record(data)),
|
|
@@ -239,6 +240,13 @@ export class WorkspaceWorkbenchService {
|
|
|
239
240
|
async gitRefs(input) {
|
|
240
241
|
return { refs: await listGitHistoryRefs(await this.gitRepository(input)) };
|
|
241
242
|
}
|
|
243
|
+
async gitFetch(input) {
|
|
244
|
+
if (typeof input.workspaceId !== 'string')
|
|
245
|
+
throw new Error('WORKSPACE_NOT_FOUND');
|
|
246
|
+
if (input.repositoryPath !== undefined && typeof input.repositoryPath !== 'string')
|
|
247
|
+
throw new Error('GIT_REPOSITORY_INVALID');
|
|
248
|
+
return this.options.changes.fetch(this.gitWorkspace(input.workspaceId), input.repositoryPath);
|
|
249
|
+
}
|
|
242
250
|
async gitHistory(input) {
|
|
243
251
|
const refs = this.refs(input);
|
|
244
252
|
if (input.cursor !== undefined && typeof input.cursor !== 'string')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.46",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"sharp": "0.35.5",
|
|
39
39
|
"ws": "^8.21.3",
|
|
40
40
|
"zod": "4.4.3",
|
|
41
|
-
"@myagentroam/agent": "0.11.
|
|
42
|
-
"@myagentroam/marctl": "0.11.
|
|
43
|
-
"@myagentroam/protocol": "0.11.
|
|
41
|
+
"@myagentroam/agent": "0.11.46",
|
|
42
|
+
"@myagentroam/marctl": "0.11.7",
|
|
43
|
+
"@myagentroam/protocol": "0.11.46",
|
|
44
44
|
"@myagentroam/code-navigation": "0.11.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|