agent-portal-2 0.1.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.
Files changed (120) hide show
  1. package/.continue/agents/new-config.yaml +22 -0
  2. package/AGENT_STEERING.md +36 -0
  3. package/ARCHITECTURE.md +13 -0
  4. package/CHANGELOG.md +97 -0
  5. package/CLI.md +38 -0
  6. package/CONTRIBUTING.md +55 -0
  7. package/INSTALLATION.md +58 -0
  8. package/LICENSE +60 -0
  9. package/PLUGIN_SYSTEM.md +33 -0
  10. package/PYTHON_SDK.md +22 -0
  11. package/QUICKSTART.md +19 -0
  12. package/README.md +385 -0
  13. package/RELEASE_NOTES_v0.1.0.md +281 -0
  14. package/ROADMAP.md +3 -0
  15. package/RUNTIME.md +44 -0
  16. package/SAFETY_MODEL.md +24 -0
  17. package/TESTING.md +35 -0
  18. package/TROUBLESHOOTING.md +30 -0
  19. package/UPGRADE_GUIDE.md +288 -0
  20. package/VS_CODE_EXTENSION.md +47 -0
  21. package/agent-portal.config.json +20 -0
  22. package/apps/desktop/agent-portal-desktop.zip +0 -0
  23. package/apps/desktop/fixtures/local-workflow.html +151 -0
  24. package/apps/desktop/package.json +18 -0
  25. package/apps/desktop/src/main.ts +117 -0
  26. package/apps/desktop/tsconfig.json +8 -0
  27. package/apps/vscode-extension/LICENSE +60 -0
  28. package/apps/vscode-extension/README.md +20 -0
  29. package/apps/vscode-extension/media/agent-portal-logo.png +0 -0
  30. package/apps/vscode-extension/package.json +149 -0
  31. package/apps/vscode-extension/src/extension.ts +614 -0
  32. package/apps/vscode-extension/tsconfig.json +12 -0
  33. package/assets/branding/agent-portal-logo.png +0 -0
  34. package/connectors/chatgpt-tools/README.md +9 -0
  35. package/connectors/claude-mcp-server/README.md +9 -0
  36. package/connectors/gemini-connector/README.md +9 -0
  37. package/connectors/rest-websocket-api/README.md +9 -0
  38. package/docs/MCP_SERVER.md +68 -0
  39. package/docs/architecture.md +214 -0
  40. package/docs/roadmap.md +125 -0
  41. package/package.json +21 -0
  42. package/packages/agent-portal-mcp/README.md +12 -0
  43. package/packages/agent-portal-mcp/agent_portal_mcp/__init__.py +3 -0
  44. package/packages/agent-portal-mcp/agent_portal_mcp/bridge/__init__.py +1 -0
  45. package/packages/agent-portal-mcp/agent_portal_mcp/bridge/runtime_client.py +180 -0
  46. package/packages/agent-portal-mcp/agent_portal_mcp/cli.py +32 -0
  47. package/packages/agent-portal-mcp/agent_portal_mcp/doctor.py +71 -0
  48. package/packages/agent-portal-mcp/agent_portal_mcp/schemas/__init__.py +1 -0
  49. package/packages/agent-portal-mcp/agent_portal_mcp/schemas/actions.py +17 -0
  50. package/packages/agent-portal-mcp/agent_portal_mcp/schemas/results.py +24 -0
  51. package/packages/agent-portal-mcp/agent_portal_mcp/schemas/risk.py +20 -0
  52. package/packages/agent-portal-mcp/agent_portal_mcp/security/__init__.py +1 -0
  53. package/packages/agent-portal-mcp/agent_portal_mcp/security/policy.py +27 -0
  54. package/packages/agent-portal-mcp/agent_portal_mcp/server.py +148 -0
  55. package/packages/agent-portal-mcp/agent_portal_mcp/tool_registry.py +58 -0
  56. package/packages/agent-portal-mcp/agent_portal_mcp/tools/__init__.py +1 -0
  57. package/packages/agent-portal-mcp/agent_portal_mcp/tools/browser.py +89 -0
  58. package/packages/agent-portal-mcp/agent_portal_mcp/tools/common.py +98 -0
  59. package/packages/agent-portal-mcp/agent_portal_mcp/tools/inspection.py +93 -0
  60. package/packages/agent-portal-mcp/agent_portal_mcp/tools/navigation.py +93 -0
  61. package/packages/agent-portal-mcp/agent_portal_mcp/tools/reports.py +34 -0
  62. package/packages/agent-portal-mcp/agent_portal_mcp/tools/steering.py +93 -0
  63. package/packages/agent-portal-mcp/pyproject.toml +20 -0
  64. package/packages/agent-portal-mcp/tests/test_doctor.py +20 -0
  65. package/packages/agent-portal-mcp/tests/test_mcp_server.py +161 -0
  66. package/packages/core/package.json +15 -0
  67. package/packages/core/src/index.ts +1842 -0
  68. package/packages/core/tsconfig.json +8 -0
  69. package/packages/mcp-server/package.json +15 -0
  70. package/packages/mcp-server/src/index.ts +73 -0
  71. package/packages/mcp-server/tsconfig.json +8 -0
  72. package/packages/sdk/package.json +15 -0
  73. package/packages/sdk/src/index.ts +544 -0
  74. package/packages/sdk/tsconfig.json +8 -0
  75. package/plugins/README.md +16 -0
  76. package/plugins/agent-portal-browser/plugin.json +19 -0
  77. package/plugins/agent-portal-python/plugin.json +16 -0
  78. package/plugins/agent-portal-skills/plugin.json +19 -0
  79. package/plugins/agent-portal-vscode/plugin.json +27 -0
  80. package/plugins/example-runtime-plugin/README.md +3 -0
  81. package/plugins/example-runtime-plugin/plugin.json +20 -0
  82. package/plugins/plugin.schema.json +53 -0
  83. package/python/README.md +18 -0
  84. package/python/agent_portal/__init__.py +5 -0
  85. package/python/agent_portal/__main__.py +5 -0
  86. package/python/agent_portal/browser.py +393 -0
  87. package/python/agent_portal/cli.py +164 -0
  88. package/python/agent_portal/config.py +31 -0
  89. package/python/agent_portal/doctor.py +165 -0
  90. package/python/agent_portal/exceptions.py +39 -0
  91. package/python/agent_portal/logging_utils.py +33 -0
  92. package/python/agent_portal/metrics.py +309 -0
  93. package/python/agent_portal/models.py +160 -0
  94. package/python/agent_portal/plugin_system.py +42 -0
  95. package/python/agent_portal/rate_limit.py +253 -0
  96. package/python/agent_portal/runtime.py +739 -0
  97. package/python/agent_portal/server.py +351 -0
  98. package/python/agent_portal/validation.py +299 -0
  99. package/python/pyproject.toml +29 -0
  100. package/python/tests/test_config.py +24 -0
  101. package/python/tests/test_doctor.py +19 -0
  102. package/python/tests/test_metrics.py +180 -0
  103. package/python/tests/test_rate_limit.py +237 -0
  104. package/python/tests/test_runtime.py +122 -0
  105. package/python/tests/test_server.py +53 -0
  106. package/python/tests/test_validation.py +170 -0
  107. package/releases/desktop/agent-portal-desktop/README.md +378 -0
  108. package/releases/desktop/agent-portal-desktop/RELEASE_NOTES.md +14 -0
  109. package/releases/desktop/agent-portal-desktop/assets/branding/agent-portal-logo.png +0 -0
  110. package/releases/desktop/agent-portal-desktop/fixtures/local-workflow.html +151 -0
  111. package/releases/desktop/agent-portal-desktop/launch-agent-portal.bat +4 -0
  112. package/releases/desktop/agent-portal-desktop.zip +0 -0
  113. package/releases/python/agent_portal-0.0.2-py3-none-any.whl +0 -0
  114. package/releases/python/agent_portal-0.0.2.tar.gz +0 -0
  115. package/scripts/package_desktop.mjs +117 -0
  116. package/scripts/release_python.py +46 -0
  117. package/tests/plugin-manifest.test.mjs +26 -0
  118. package/tests/runtime.test.mjs +41 -0
  119. package/tests/vscode-extension.test.mjs +22 -0
  120. package/tsconfig.base.json +16 -0
@@ -0,0 +1,117 @@
1
+ import path from "node:path";
2
+ import {
3
+ AgentPortalRuntime,
4
+ BrowserSession,
5
+ GoalPlanner,
6
+ PortalGraph,
7
+ VisionCore,
8
+ createDefaultWorkspace,
9
+ resolveWorkspaceFileUrl
10
+ } from "@agent-portal/core";
11
+
12
+ async function main(): Promise<void> {
13
+ const repoRoot = path.resolve(process.cwd(), "../..");
14
+ const workspace = createDefaultWorkspace("demo-project");
15
+ const vision = new VisionCore();
16
+ const planner = new GoalPlanner();
17
+ const graph = new PortalGraph();
18
+ const runtime = new AgentPortalRuntime({
19
+ workspace,
20
+ workspaceBasePath: repoRoot,
21
+ agents: [
22
+ { id: "frontend", role: "frontend", status: "idle" },
23
+ { id: "qa", role: "qa", status: "idle" }
24
+ ]
25
+ });
26
+
27
+ runtime.record({
28
+ type: "session.started",
29
+ at: new Date().toISOString(),
30
+ detail: `Workspace ${workspace.name} initialized`
31
+ });
32
+ runtime.startAgent("frontend");
33
+ runtime.startAgent("qa");
34
+
35
+ const browser = new BrowserSession(runtime, {
36
+ headless: true,
37
+ basePath: repoRoot
38
+ });
39
+
40
+ try {
41
+ await browser.launch();
42
+ const localWorkflowUrl = resolveWorkspaceFileUrl(
43
+ repoRoot,
44
+ "apps/desktop/fixtures/local-workflow.html"
45
+ );
46
+
47
+ await browser.open(localWorkflowUrl);
48
+ await browser.waitForSelector("#name");
49
+ await browser.hover("#name");
50
+ await browser.type("#name", "Portal Runner");
51
+ await browser.click("#generate-report");
52
+ await browser.scroll({ selector: "#evidence-panel" });
53
+ const result = await browser.readText("#result");
54
+ const capture = await browser.capture({
55
+ label: "local-workflow",
56
+ includeAccessibilityTree: true
57
+ });
58
+ const understanding = vision.analyze({
59
+ snapshot: capture.snapshot,
60
+ goal: "Test the signup flow"
61
+ });
62
+ const goalPlan = planner.createPlan(
63
+ {
64
+ id: "goal-signup-test",
65
+ title: "Test the signup flow"
66
+ },
67
+ understanding
68
+ );
69
+ runtime.addGraphNode(graph.fromSnapshot(capture.snapshot, understanding));
70
+ const projectAwareness = await runtime.detectProjectAwareness(repoRoot);
71
+ await runtime.writeMemoryRecord({
72
+ id: `page-understanding-${Date.now()}`,
73
+ kind: "page-understanding",
74
+ createdAt: new Date().toISOString(),
75
+ summary: understanding.summary,
76
+ payload: {
77
+ understanding,
78
+ goalPlan,
79
+ projectAwareness
80
+ }
81
+ });
82
+ runtime.completeAgent("frontend");
83
+ runtime.completeAgent("qa");
84
+ const reportPath = await runtime.writeSessionReport();
85
+ const overview = runtime.getOverview();
86
+
87
+ console.log("Agent Portal browser vertical slice");
88
+ console.log(
89
+ JSON.stringify(
90
+ {
91
+ title: capture.title,
92
+ url: capture.url,
93
+ resultText: result.text,
94
+ pageCategory: understanding.pageCategory,
95
+ understandingSummary: understanding.summary,
96
+ goalSteps: goalPlan.steps.map((step) => step.title),
97
+ projectAwareness: projectAwareness.summary,
98
+ screenshotPath: capture.screenshotPath,
99
+ detectedElements: capture.snapshot.detectedElements.length,
100
+ reportPath,
101
+ events: overview.sessionEvents.length,
102
+ memoryRecords: overview.memoryRecords.length,
103
+ graphNodes: overview.graph.length
104
+ },
105
+ null,
106
+ 2
107
+ )
108
+ );
109
+ } finally {
110
+ await browser.close();
111
+ }
112
+ }
113
+
114
+ main().catch((error: unknown) => {
115
+ console.error("Failed to start Agent Portal", error);
116
+ process.exitCode = 1;
117
+ });
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src"]
8
+ }
@@ -0,0 +1,60 @@
1
+ Copyright (c) 2026 Magnexis
2
+
3
+ All Rights Reserved.
4
+
5
+ Agent Portal and all associated source code, binaries, documentation, assets,
6
+ designs, interfaces, branding, logos, and related materials are the exclusive
7
+ property of Magnexis.
8
+
9
+ No person or entity is granted permission to copy, modify, merge, publish,
10
+ distribute, sublicense, sell, lease, rent, host, reverse engineer, create
11
+ derivative works from, or otherwise exploit any portion of the Software
12
+ without the express prior written permission of Magnexis.
13
+
14
+ Permitted Use
15
+
16
+ Subject to compliance with this license, Magnexis grants the end user a
17
+ limited, non-exclusive, non-transferable, revocable license to install and
18
+ use the Software solely for its intended purposes.
19
+
20
+ Restrictions
21
+
22
+ You may not:
23
+
24
+ Modify the Software.
25
+ Create derivative works based on the Software.
26
+ Redistribute the Software.
27
+ Resell the Software.
28
+ Repackage the Software.
29
+ Host the Software as a service.
30
+ Remove copyright notices.
31
+ Reverse engineer, decompile, or disassemble the Software except where
32
+ prohibited by applicable law.
33
+ Use Magnexis trademarks, logos, branding, or product names without
34
+ written authorization.
35
+
36
+ Ownership
37
+
38
+ All right, title, and interest in and to the Software remain exclusively with
39
+ Magnexis. No ownership rights are transferred under this license.
40
+
41
+ Termination
42
+
43
+ This license automatically terminates if any provision is violated. Upon
44
+ termination, all copies of the Software must be permanently removed and
45
+ destroyed.
46
+
47
+ Disclaimer of Warranty
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50
+ IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS
51
+ FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
52
+
53
+ Limitation of Liability
54
+
55
+ IN NO EVENT SHALL MAGNEXIS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
56
+ LIABILITY ARISING FROM THE USE OF OR INABILITY TO USE THE SOFTWARE.
57
+
58
+ Contact
59
+
60
+ Licensing inquiries and permission requests should be directed to Magnexis.
@@ -0,0 +1,20 @@
1
+ # Agent Portal VS Code Extension
2
+
3
+ ![Agent Portal Logo](https://github.com/magnexis/agent-portal/raw/main/apps/vscode-extension/media/agent-portal-logo.png)
4
+
5
+ This extension is the VS Code entry point for Agent Portal.
6
+
7
+ Official extension link:
8
+
9
+ - [Agent Portal on the Visual Studio Marketplace](https://marketplace.visualstudio.com/manage/publishers/magnificent-language/extensions/agent-portal/hub)
10
+
11
+ ## Included Branding
12
+
13
+ - main extension icon uses the Agent Portal logo
14
+ - local extension README uses the same primary logo
15
+
16
+ ## Planned Commands
17
+
18
+ - `Agent Portal: Start Session`
19
+ - `Agent Portal: Open Browser`
20
+ - `Agent Portal: Launch Agent`
@@ -0,0 +1,149 @@
1
+ {
2
+ "name": "agent-portal",
3
+ "displayName": "Agent Portal",
4
+ "description": "Control and steer AI agents through local browser/UI workflows.",
5
+ "version": "0.0.3",
6
+ "publisher": "magnificent-language",
7
+ "private": true,
8
+ "files": [
9
+ "dist/extension.js",
10
+ "dist/extension.d.ts",
11
+ "media/agent-portal-logo.png",
12
+ "LICENSE",
13
+ "README.md",
14
+ "package.json"
15
+ ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/magnexis/agent-portal.git"
19
+ },
20
+ "homepage": "https://github.com/magnexis/agent-portal",
21
+ "bugs": {
22
+ "url": "https://github.com/magnexis/agent-portal/issues"
23
+ },
24
+ "license": "MIT",
25
+ "icon": "media/agent-portal-logo.png",
26
+ "engines": {
27
+ "vscode": "^1.90.0"
28
+ },
29
+ "categories": [
30
+ "Other"
31
+ ],
32
+ "activationEvents": [
33
+ "onView:agentPortal.sidebar",
34
+ "onCommand:agentPortal.startRuntime",
35
+ "onCommand:agentPortal.stopRuntime",
36
+ "onCommand:agentPortal.restartRuntime",
37
+ "onCommand:agentPortal.openCurrentProject",
38
+ "onCommand:agentPortal.runAgent",
39
+ "onCommand:agentPortal.pauseAgent",
40
+ "onCommand:agentPortal.resumeAgent",
41
+ "onCommand:agentPortal.stopAgent",
42
+ "onCommand:agentPortal.approveNextAction",
43
+ "onCommand:agentPortal.rejectNextAction",
44
+ "onCommand:agentPortal.generateReport",
45
+ "onCommand:agentPortal.openDocumentation",
46
+ "onCommand:agentPortal.connectRuntime"
47
+ ],
48
+ "main": "./dist/extension.js",
49
+ "contributes": {
50
+ "viewsContainers": {
51
+ "activitybar": [
52
+ {
53
+ "id": "agentPortal",
54
+ "title": "Agent Portal",
55
+ "icon": "media/agent-portal-logo.png"
56
+ }
57
+ ]
58
+ },
59
+ "views": {
60
+ "agentPortal": [
61
+ {
62
+ "id": "agentPortal.sidebar",
63
+ "name": "Control Center",
64
+ "type": "webview"
65
+ }
66
+ ]
67
+ },
68
+ "commands": [
69
+ {
70
+ "command": "agentPortal.startRuntime",
71
+ "title": "Agent Portal: Start Runtime"
72
+ },
73
+ {
74
+ "command": "agentPortal.stopRuntime",
75
+ "title": "Agent Portal: Stop Runtime"
76
+ },
77
+ {
78
+ "command": "agentPortal.restartRuntime",
79
+ "title": "Agent Portal: Restart Runtime"
80
+ },
81
+ {
82
+ "command": "agentPortal.openCurrentProject",
83
+ "title": "Agent Portal: Open Current Project"
84
+ },
85
+ {
86
+ "command": "agentPortal.runAgent",
87
+ "title": "Agent Portal: Run Agent"
88
+ },
89
+ {
90
+ "command": "agentPortal.pauseAgent",
91
+ "title": "Agent Portal: Pause Agent"
92
+ },
93
+ {
94
+ "command": "agentPortal.resumeAgent",
95
+ "title": "Agent Portal: Resume Agent"
96
+ },
97
+ {
98
+ "command": "agentPortal.stopAgent",
99
+ "title": "Agent Portal: Stop Agent"
100
+ },
101
+ {
102
+ "command": "agentPortal.approveNextAction",
103
+ "title": "Agent Portal: Approve Next Action"
104
+ },
105
+ {
106
+ "command": "agentPortal.rejectNextAction",
107
+ "title": "Agent Portal: Reject Next Action"
108
+ },
109
+ {
110
+ "command": "agentPortal.generateReport",
111
+ "title": "Agent Portal: Generate Report"
112
+ },
113
+ {
114
+ "command": "agentPortal.openDocumentation",
115
+ "title": "Agent Portal: Open Documentation"
116
+ },
117
+ {
118
+ "command": "agentPortal.connectRuntime",
119
+ "title": "Agent Portal: Connect To Running Runtime"
120
+ }
121
+ ],
122
+ "configuration": {
123
+ "title": "Agent Portal",
124
+ "properties": {
125
+ "agentPortal.runtimeUrl": {
126
+ "type": "string",
127
+ "default": "http://127.0.0.1:8765",
128
+ "description": "Base URL for the local Agent Portal runtime."
129
+ },
130
+ "agentPortal.preferredLocalDevPort": {
131
+ "type": "number",
132
+ "default": 3000,
133
+ "description": "Preferred local development server port when multiple local apps are detected."
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "scripts": {
139
+ "build": "tsc -p tsconfig.json",
140
+ "typecheck": "tsc -p tsconfig.json --noEmit",
141
+ "prepackage": "npm run build"
142
+ },
143
+ "vsce": {
144
+ "dependencies": false
145
+ },
146
+ "devDependencies": {
147
+ "@types/vscode": "^1.90.0"
148
+ }
149
+ }