@anhlp/alp-paseo 0.0.1-beta.6 → 0.0.1-beta.8
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 +4 -4
- package/client/compact.ts +41 -0
- package/index.client.tsx +4 -1
- package/package.json +7 -7
- package/server/dist/THIRD-PARTY-NOTICES.txt +1 -1
- package/server/dist/alpd.js +10508 -4233
- package/server/dist/compact.js +20427 -0
- package/server/dist/index.js +10772 -4772
- package/server/dist/library.js +7949 -2607
- package/server/dist/main.js +8846 -3328
- package/server/dist/mapping.js +7749 -2576
- package/server/dist/pairing-guard.js +21 -0
- package/server/dist/panel/compact.js +20427 -0
- package/server/dist/panel/library.js +7949 -2607
- package/server/dist/panel/mapping.js +7749 -2576
- package/server/dist/panel/tasks.js +7239 -2025
- package/server/dist/panel/usage.js +7395 -2185
- package/server/dist/paseo/agents.js +7636 -2526
- package/server/dist/paseo/create-receipts.js +16 -9
- package/server/dist/paseo/files.js +2 -2
- package/server/dist/paseo/git.js +22 -9
- package/server/dist/paseo/index.js +8545 -3053
- package/server/dist/paseo/plugins.js +8077 -2727
- package/server/dist/paseo/providers.js +374 -238
- package/server/dist/paseo/terminals.js +7406 -2128
- package/server/dist/paseo/uploads.js +7230 -2027
- package/server/dist/paseo/workspaces.js +38 -15
- package/server/dist/provider-core.js +34 -10
- package/server/dist/provider.js +10194 -4265
- package/server/dist/remote/index.js +7480 -2227
- package/server/dist/remote/link.js +2 -2
- package/server/dist/remote/panels.js +7344 -2116
- package/server/dist/remote/provider.js +34 -10
- package/server/dist/tasks.js +7239 -2025
- package/server/dist/usage.js +7395 -2185
- package/server/dist/web.js +2 -5
- package/shared/compact.ts +41 -0
package/README.md
CHANGED
|
@@ -64,13 +64,13 @@ This follows [Paseo's native archive contract](https://github.com/getpaseo/paseo
|
|
|
64
64
|
|
|
65
65
|
## Install
|
|
66
66
|
|
|
67
|
-
This is the beta `0.0.1-beta.
|
|
67
|
+
This is the beta `0.0.1-beta.8` (npm's `beta` and `latest` tags; check with
|
|
68
68
|
`npm view @anhlp/alp-paseo dist-tags`); name it when you install (`@beta`, or
|
|
69
|
-
exactly `@0.0.1-beta.
|
|
69
|
+
exactly `@0.0.1-beta.8`). See the
|
|
70
70
|
[release notes](https://github.com/phucanh08/alp/blob/main/docs/alp/beta-release-notes.md) and
|
|
71
71
|
[install, upgrade and removal steps](https://github.com/phucanh08/alp/blob/main/docs/alp/beta-install.md).
|
|
72
72
|
|
|
73
|
-
Requires Paseo `>=0.11.1 <1.0.0` (
|
|
73
|
+
Requires Paseo `>=0.11.1 <1.0.0` (from `0.0.1-beta.4`; `0.0.1-beta.3` declared `<0.13.0`), Node.js 22 (22.12 or later) or 24 on Linux or macOS
|
|
74
74
|
(Windows and Node.js 26 are experimental), and an authenticated native Codex or Claude Code
|
|
75
75
|
executable on PATH.
|
|
76
76
|
|
|
@@ -168,7 +168,7 @@ for existing projects, model selection, permissions, and runtime limitations.
|
|
|
168
168
|
|
|
169
169
|
## Remote mode (deferred, not in the beta)
|
|
170
170
|
|
|
171
|
-
Remote mode is **not part of the beta (`0.0.1-beta.
|
|
171
|
+
Remote mode is **not part of the beta (`0.0.1-beta.8`)**: it needs `@anhlp/alp-gateway`, which is not
|
|
172
172
|
published. The text below describes the code in this repository for development only.
|
|
173
173
|
|
|
174
174
|
To use ALP running on another machine, start the daemon process that loads this plugin with
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PluginAgentCommandContext, PluginClientContext } from '@getpaseo/plugin/client';
|
|
2
|
+
import { agentCompact } from '../shared/compact';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Compact context for an ALP agent (t-de1a): main writes a checkpoint, then its context is compacted
|
|
6
|
+
* natively or replaced by a fresh conversation seeded with it, now or at the end of its turn. The
|
|
7
|
+
* runtime's own notice in the timeline says when it starts and ends; a refusal is thrown to the host.
|
|
8
|
+
*/
|
|
9
|
+
export async function compactAgent({ agent, paseo, rpc }: Pick<PluginAgentCommandContext, 'agent' | 'paseo' | 'rpc'>) {
|
|
10
|
+
if (agent.provider !== 'alp') throw new Error('Compact context is for ALP agents only');
|
|
11
|
+
// The provider knows a session by the id in its persistence handle, which is not the agent's id.
|
|
12
|
+
let persisted: string | undefined;
|
|
13
|
+
try {
|
|
14
|
+
const handle = paseo.agents.ref(agent.id);
|
|
15
|
+
if (!handle.current()) await handle.refresh();
|
|
16
|
+
persisted = handle.current()?.persistence?.sessionId ?? undefined;
|
|
17
|
+
} catch { /* the agent id alone */ }
|
|
18
|
+
const sessions = [...new Set([persisted, agent.id].filter((id): id is string => Boolean(id)))];
|
|
19
|
+
return rpc(agentCompact, { sessions });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** The command-center item and the "/alp-compact" slash command of an ALP agent. */
|
|
23
|
+
export function addCompactCommands(client: PluginClientContext) {
|
|
24
|
+
const removeItem = client.addCommandCenterItem({
|
|
25
|
+
id: 'alp-compact-agent',
|
|
26
|
+
title: 'Compact ALP agent context',
|
|
27
|
+
icon: 'Shrink',
|
|
28
|
+
keywords: ['compact', 'context', 'checkpoint', 'alp'],
|
|
29
|
+
context: 'agent',
|
|
30
|
+
async onSelect(context) { await compactAgent(context); },
|
|
31
|
+
});
|
|
32
|
+
// Not "/compact": Claude Code has its own, which skips ALP's checkpoint.
|
|
33
|
+
const removeSlash = client.addSlashCommand({
|
|
34
|
+
name: 'alp-compact',
|
|
35
|
+
description: 'Compact this ALP agent\'s context after a checkpoint',
|
|
36
|
+
argumentHint: '',
|
|
37
|
+
context: 'agent',
|
|
38
|
+
async onSubmit(context) { await compactAgent(context); },
|
|
39
|
+
});
|
|
40
|
+
return () => { removeItem(); removeSlash(); };
|
|
41
|
+
}
|
package/index.client.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { TasksPanel, TasksScreen } from './client/tasks-panel';
|
|
|
3
3
|
import { TASKS_SCREEN, addTaskPills, tasksScreen } from './client/task-pills';
|
|
4
4
|
import { LibrarySettings, ProjectLibraryPanel, TeamsSettings, AgentsSettings, SkillsSettings, HooksSettings, McpSettings } from './client/library';
|
|
5
5
|
import { UsageScreen } from './client/usage';
|
|
6
|
+
import { addCompactCommands } from './client/compact';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* ALP's client contributions: the Tasks panel of a workspace's project, the Tasks screen
|
|
@@ -38,6 +39,8 @@ export default function contribute(client: PluginClientContext) {
|
|
|
38
39
|
context: 'agent',
|
|
39
40
|
onSubmit({ workspace, args, openScreen }) { openScreen(tasksScreen(workspace.id, workspace.directory || workspace.projectRootPath, args.trim() || undefined)); },
|
|
40
41
|
});
|
|
42
|
+
// Compact context (t-de1a): a command-center item and "/alp-compact" for an ALP agent.
|
|
43
|
+
const removeCompact = addCompactCommands(client);
|
|
41
44
|
const removeSettings = client.addSettingsScreen({ id: 'alp-settings', title: 'ALP', icon: 'Bot', Component: LibrarySettings });
|
|
42
45
|
const removeHostSettings = [
|
|
43
46
|
{ id: 'alp-templates', title: 'Templates', icon: 'Users', Component: TeamsSettings },
|
|
@@ -49,5 +52,5 @@ export default function contribute(client: PluginClientContext) {
|
|
|
49
52
|
const removeUsage = client.addSettingsScreen({ id: 'alp-usage', title: 'Usage', icon: 'ChartNoAxesCombined', Component: UsageScreen });
|
|
50
53
|
const removeUsagePanel = client.addWorkspacePanel({ id: 'alp-usage', title: 'Usage', icon: 'ChartNoAxesCombined', context: 'workspace', Component: UsageScreen });
|
|
51
54
|
const removeProject = client.addWorkspacePanel({ id: 'alp-project', title: 'ALP project', icon: 'Bot', context: 'workspace', Component: ProjectLibraryPanel });
|
|
52
|
-
return () => { removePanel(); removeScreen(); removePills(); removeCommand(); removeScreenCommand(); removeSlash(); removeSettings(); removeHostSettings.forEach(remove => remove()); removeProject(); removeUsage(); removeUsagePanel(); };
|
|
55
|
+
return () => { removePanel(); removeScreen(); removePills(); removeCommand(); removeScreenCommand(); removeSlash(); removeCompact(); removeSettings(); removeHostSettings.forEach(remove => remove()); removeProject(); removeUsage(); removeUsagePanel(); };
|
|
53
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anhlp/alp-paseo",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"paseo-plugin.json",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"@anthropic-ai/claude-agent-sdk": "0.3.292",
|
|
17
17
|
"@anthropic-ai/sdk": "0.131.0",
|
|
18
18
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
19
|
-
"zod": "4.
|
|
20
|
-
"@anhlp/alp-protocol": "0.0.1-beta.
|
|
21
|
-
"@anhlp/alp-core": "0.0.1-beta.
|
|
22
|
-
"@anhlp/alp-runtime": "0.0.1-beta.
|
|
23
|
-
"@anhlp/alp-daemon": "0.0.1-beta.
|
|
24
|
-
"@anhlp/alp-client": "0.0.1-beta.
|
|
19
|
+
"zod": "4.6.7",
|
|
20
|
+
"@anhlp/alp-protocol": "0.0.1-beta.8",
|
|
21
|
+
"@anhlp/alp-core": "0.0.1-beta.8",
|
|
22
|
+
"@anhlp/alp-runtime": "0.0.1-beta.8",
|
|
23
|
+
"@anhlp/alp-daemon": "0.0.1-beta.8",
|
|
24
|
+
"@anhlp/alp-client": "0.0.1-beta.8",
|
|
25
25
|
"ws": "^8.22.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -922,7 +922,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
922
922
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
923
923
|
|
|
924
924
|
================================================================================
|
|
925
|
-
zod@4.
|
|
925
|
+
zod@4.6.7 (MIT)
|
|
926
926
|
================================================================================
|
|
927
927
|
|
|
928
928
|
MIT License
|