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,24 @@
1
+ # Safety Model
2
+
3
+ Agent Portal uses a policy engine to classify actions into:
4
+
5
+ - `safe`
6
+ - `low`
7
+ - `medium`
8
+ - `high`
9
+ - `blocked`
10
+
11
+ ## Protected Actions
12
+
13
+ - typing into password fields
14
+ - billing and payment actions
15
+ - cross-domain navigation when domain lock is enabled
16
+ - leaving the locked tab when tab lock is enabled
17
+
18
+ ## Runtime Protections
19
+
20
+ - duplicate browser launch prevention
21
+ - graceful browser shutdown
22
+ - browser disconnect detection
23
+ - blocked and pending action queue states
24
+ - user-facing runtime errors
package/TESTING.md ADDED
@@ -0,0 +1,35 @@
1
+ # Testing
2
+
3
+ Run the full test sweep with:
4
+
5
+ ```bash
6
+ npm test
7
+ ```
8
+
9
+ That command currently runs:
10
+
11
+ - Python unit tests in `python/tests`
12
+ - TypeScript builds across the workspace
13
+ - Node tests in `tests/*.test.mjs`
14
+
15
+ ## Focus Areas
16
+
17
+ Current automated coverage includes:
18
+
19
+ - runtime action queue behavior
20
+ - blocked action policy
21
+ - report generation
22
+ - runtime HTTP status endpoint
23
+ - plugin manifest validation
24
+ - TypeScript workspace build verification
25
+ - VS Code extension build verification through workspace build
26
+
27
+ ## Recommended Manual Verification
28
+
29
+ ```bash
30
+ agent-portal doctor
31
+ agent-portal start
32
+ agent-portal open http://localhost:3000
33
+ agent-portal screenshot --label smoke-test
34
+ agent-portal report
35
+ ```
@@ -0,0 +1,30 @@
1
+ # Troubleshooting
2
+
3
+ ## Playwright Browser Missing
4
+
5
+ Run:
6
+
7
+ ```bash
8
+ npx playwright install chromium
9
+ python -m playwright install chromium
10
+ ```
11
+
12
+ ## Runtime Does Not Start
13
+
14
+ - verify `npm install` completed
15
+ - run `agent-portal doctor`
16
+ - run `npm run check`
17
+ - inspect the runtime report directory from `agent-portal.config.json`
18
+
19
+ ## No VS Code Sidebar Data
20
+
21
+ - open the Agent Portal repo as the current workspace
22
+ - make sure `agent-portal start` is running
23
+ - confirm `agentPortal.runtimeUrl` matches the local runtime
24
+ - use `Agent Portal: Connect To Running Runtime`
25
+
26
+ ## Action Was Blocked
27
+
28
+ - inspect the queue in the session report
29
+ - review domain lock, tab lock, and approval thresholds
30
+ - edit or redirect the action before retrying
@@ -0,0 +1,288 @@
1
+ # Upgrade Guide: v0.0.2 to v0.1.0
2
+
3
+ This guide helps you upgrade from Agent Portal v0.0.2 to v0.1.0.
4
+
5
+ ## What's New in v0.1.0
6
+
7
+ ### Security Enhancements
8
+
9
+ **Input Validation**
10
+ The runtime now validates all inputs by default to prevent security issues:
11
+
12
+ ```python
13
+ from agent_portal.validation import validate_url, validate_selector, validate_script
14
+
15
+ # URLs are automatically validated
16
+ result = validate_url("https://example.com")
17
+ if not result.is_valid:
18
+ print(f"Validation failed: {result.errors}")
19
+
20
+ # Selectors are checked for XSS patterns
21
+ result = validate_selector("#submit-button")
22
+ if not result.is_valid:
23
+ print(f"Unsafe selector: {result.errors}")
24
+
25
+ # Scripts are validated for dangerous operations
26
+ result = validate_script("document.querySelector('div')")
27
+ if not result.is_valid:
28
+ print(f"Unsafe script: {result.errors}")
29
+ ```
30
+
31
+ **Rate Limiting**
32
+ The server now includes rate limiting to prevent abuse:
33
+
34
+ ```python
35
+ from agent_portal import RateLimiter, RateLimitConfig
36
+
37
+ # Configure rate limits
38
+ config = RateLimitConfig(
39
+ requests_per_minute=60,
40
+ requests_per_hour=1000,
41
+ burst_limit=10,
42
+ burst_window_seconds=1.0
43
+ )
44
+
45
+ limiter = RateLimiter(config)
46
+
47
+ # Check if a request is allowed
48
+ allowed, error = limiter.check_rate_limit("client-123")
49
+ if not allowed:
50
+ print(f"Rate limited: {error}")
51
+ ```
52
+
53
+ **Action Throttling**
54
+ Specific actions have stricter limits:
55
+
56
+ ```python
57
+ from agent_portal import ActionThrottler
58
+
59
+ throttler = ActionThrottler()
60
+
61
+ # Execute actions are limited to 5 per minute
62
+ allowed, error = throttler.check_action_allowed("execute", "client-123")
63
+ if not allowed:
64
+ print(f"Action throttled: {error}")
65
+ ```
66
+
67
+ ### Observability
68
+
69
+ **Metrics Collection**
70
+ Track runtime operations with built-in metrics:
71
+
72
+ ```python
73
+ from agent_portal import MetricsCollector, get_metrics
74
+
75
+ # Get the global metrics collector
76
+ metrics = get_metrics()
77
+
78
+ # Track actions
79
+ metrics.increment("actions.completed", tags={"action": "click"})
80
+ metrics.increment("actions.failed", tags={"action": "navigate"})
81
+
82
+ # Track browser operations
83
+ metrics.set_gauge("runtime.browser_connected", 1.0)
84
+ metrics.increment("browser.screenshots")
85
+
86
+ # Time operations
87
+ with metrics.start_timer("operation.duration", tags={"type": "navigate"}):
88
+ # Your operation here
89
+ pass
90
+
91
+ # View statistics
92
+ print(metrics.get_timer_stats("operation.duration"))
93
+ print(metrics.get_histogram("action.sizes"))
94
+ ```
95
+
96
+ **Export Metrics**
97
+ Export metrics to JSON files for analysis:
98
+
99
+ ```python
100
+ from pathlib import Path
101
+
102
+ metrics.export_to_file(Path("metrics.json"))
103
+ ```
104
+
105
+ ## Migration Steps
106
+
107
+ ### 1. Update Dependencies
108
+
109
+ ```bash
110
+ pip install --upgrade agent-portal
111
+ ```
112
+
113
+ ### 2. Review Rate Limits
114
+
115
+ The default rate limits are:
116
+ - 60 requests per minute
117
+ - 1000 requests per hour
118
+ - 10 burst requests per second
119
+
120
+ Customize these in your server configuration if needed:
121
+
122
+ ```python
123
+ from agent_portal.server import build_server
124
+ from agent_portal import RateLimiter, RateLimitConfig
125
+
126
+ # Custom rate limits
127
+ rate_config = RateLimitConfig(
128
+ requests_per_minute=120,
129
+ requests_per_hour=5000,
130
+ burst_limit=20
131
+ )
132
+
133
+ # Note: You'll need to integrate this with your server setup
134
+ # See the documentation for full integration details
135
+ ```
136
+
137
+ ### 3. Validate Your Code
138
+
139
+ The new validation may reject previously accepted inputs. Test your workflows:
140
+
141
+ ```python
142
+ # Test your URLs
143
+ from agent_portal.validation import validate_url
144
+
145
+ test_urls = [
146
+ "https://your-app.com",
147
+ "http://localhost:3000",
148
+ ]
149
+
150
+ for url in test_urls:
151
+ result = validate_url(url)
152
+ if not result.is_valid:
153
+ print(f"URL validation failed for {url}: {result.errors}")
154
+ ```
155
+
156
+ ### 4. Monitor Metrics
157
+
158
+ Enable metrics monitoring in your workflows:
159
+
160
+ ```python
161
+ from agent_portal import get_metrics
162
+
163
+ metrics = get_metrics()
164
+
165
+ # Check key metrics
166
+ print(f"Total actions: {metrics.get_counter('actions.total')}")
167
+ print(f"Completed: {metrics.get_counter('actions.completed')}")
168
+ print(f"Failed: {metrics.get_counter('actions.failed')}")
169
+ print(f"Browser connected: {metrics.get_gauge('runtime.browser_connected')}")
170
+ ```
171
+
172
+ ## Breaking Changes
173
+
174
+ **None** - This release maintains full backward compatibility.
175
+
176
+ All existing workflows should continue to work without modification.
177
+
178
+ ## New Configuration Options
179
+
180
+ ### Rate Limiting Configuration
181
+
182
+ Add to your `agent-portal.config.json`:
183
+
184
+ ```json
185
+ {
186
+ "rateLimiting": {
187
+ "enabled": true,
188
+ "requestsPerMinute": 60,
189
+ "requestsPerHour": 1000,
190
+ "burstLimit": 10,
191
+ "burstWindowSeconds": 1.0
192
+ }
193
+ }
194
+ ```
195
+
196
+ ### Metrics Configuration
197
+
198
+ ```json
199
+ {
200
+ "metrics": {
201
+ "enabled": true,
202
+ "maxSamples": 10000,
203
+ "exportPath": "workspaces/runtime/metrics"
204
+ }
205
+ }
206
+ ```
207
+
208
+ ## Security Considerations
209
+
210
+ ### URL Validation
211
+ The runtime now blocks:
212
+ - JavaScript URLs (`javascript:`)
213
+ - Data URLs (`data:`)
214
+ - File URLs (`file:`)
215
+ - VBScript URLs (`vbscript:`)
216
+
217
+ ### Selector Validation
218
+ Selectors containing the following patterns are rejected:
219
+ - `<script`
220
+ - `javascript:`
221
+ - `onerror=`, `onload=`, `onclick=`
222
+ - `fromCharCode`
223
+ - `eval(`
224
+
225
+ ### Script Validation
226
+ Scripts with these operations are flagged:
227
+ - `document.cookie`
228
+ - `localStorage`, `sessionStorage`
229
+ - `window.location`
230
+ - `eval()`, `Function()`
231
+ - `document.write`
232
+ - `XMLHttpRequest`, `fetch()`
233
+
234
+ ## Testing Your Upgrade
235
+
236
+ Run the test suite to ensure everything works:
237
+
238
+ ```bash
239
+ # Run all tests
240
+ npm test
241
+
242
+ # Run Python tests only
243
+ python -m unittest discover -s python/tests -v
244
+
245
+ # Run specific test modules
246
+ python -m unittest tests.test_validation -v
247
+ python -m unittest tests.test_rate_limit -v
248
+ python -m unittest tests.test_metrics -v
249
+ ```
250
+
251
+ ## Troubleshooting
252
+
253
+ ### Rate Limit Errors
254
+
255
+ If you see rate limit errors:
256
+ 1. Increase limits in configuration
257
+ 2. Implement exponential backoff in your client
258
+ 3. Use batch operations when possible
259
+
260
+ ### Validation Errors
261
+
262
+ If validation fails:
263
+ 1. Review the error messages
264
+ 2. Update your inputs to meet validation requirements
265
+ 3. Use `sanitize_text()` to clean inputs if needed
266
+
267
+ ### Metrics Not Working
268
+
269
+ If metrics aren't being collected:
270
+ 1. Check that the metrics module is imported
271
+ 2. Ensure you're using the global collector via `get_metrics()`
272
+ 3. Verify no exceptions are being swallowed
273
+
274
+ ## Getting Help
275
+
276
+ - 📖 **Documentation**: See the full [README.md](README.md)
277
+ - 🐛 **Issues**: Report bugs at [GitHub Issues](https://github.com/magnexis/agent-portal/issues)
278
+ - 💬 **Discussions**: Ask questions in [GitHub Discussions](https://github.com/magnexis/agent-portal/discussions)
279
+
280
+ ## What's Next
281
+
282
+ Future releases will include:
283
+ - Advanced vision core for page understanding
284
+ - Multi-agent coordination
285
+ - Desktop application control
286
+ - Enhanced reporting capabilities
287
+
288
+ Stay tuned for more updates!
@@ -0,0 +1,47 @@
1
+ # VS Code Extension
2
+
3
+ The VS Code extension lives in `apps/vscode-extension`.
4
+
5
+ Official extension link:
6
+
7
+ - [Agent Portal on the Visual Studio Marketplace](https://marketplace.visualstudio.com/manage/publishers/magnificent-language/extensions/agent-portal/hub)
8
+
9
+ ## Features
10
+
11
+ - sidebar control center
12
+ - runtime start and stop commands
13
+ - restart runtime command
14
+ - connect directly to the Python runtime HTTP server
15
+ - pending action queue preview
16
+ - approve and reject controls
17
+ - local development server detection for:
18
+ - `localhost:3000`
19
+ - `localhost:5173`
20
+ - `localhost:8080`
21
+ - `localhost:8000`
22
+ - `localhost:5000`
23
+
24
+ ## Primary Commands
25
+
26
+ - `Agent Portal: Start Runtime`
27
+ - `Agent Portal: Stop Runtime`
28
+ - `Agent Portal: Restart Runtime`
29
+ - `Agent Portal: Open Current Project`
30
+ - `Agent Portal: Run Agent`
31
+ - `Agent Portal: Pause Agent`
32
+ - `Agent Portal: Resume Agent`
33
+ - `Agent Portal: Stop Agent`
34
+ - `Agent Portal: Approve Next Action`
35
+ - `Agent Portal: Reject Next Action`
36
+ - `Agent Portal: Generate Report`
37
+ - `Agent Portal: Open Documentation`
38
+
39
+ ## Runtime Relationship
40
+
41
+ The extension is the developer-facing control panel.
42
+ The Python `agent_portal` package owns the local runtime, Playwright session, and API surfaces.
43
+
44
+ ## Settings
45
+
46
+ - `agentPortal.runtimeUrl`
47
+ - `agentPortal.preferredLocalDevPort`
@@ -0,0 +1,20 @@
1
+ {
2
+ "runtime_host": "127.0.0.1",
3
+ "runtime_port": 8765,
4
+ "screenshot_directory": "workspaces/runtime/screenshots",
5
+ "report_directory": "workspaces/runtime/reports",
6
+ "default_browser": "chromium",
7
+ "action_mode": "assisted",
8
+ "approval_policy": "medium",
9
+ "allowed_domains": [],
10
+ "blocked_domains": [],
11
+ "enabled_plugins": [
12
+ "agent-portal-vscode",
13
+ "agent-portal-browser"
14
+ ],
15
+ "log_level": "INFO",
16
+ "retention_days": 14,
17
+ "sensitive_screenshots_enabled": false,
18
+ "safe_mode": true,
19
+ "api_token": null
20
+ }
@@ -0,0 +1,151 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Agent Portal Local Workflow</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: dark;
10
+ --bg: #05070c;
11
+ --panel: #0f1623;
12
+ --line: rgba(255, 255, 255, 0.1);
13
+ --text: #eef3ff;
14
+ --muted: #9cb2d1;
15
+ --blue: #3cc8ff;
16
+ --orange: #ff9a1f;
17
+ }
18
+
19
+ * {
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ body {
24
+ margin: 0;
25
+ min-height: 100vh;
26
+ display: grid;
27
+ place-items: center;
28
+ background:
29
+ radial-gradient(circle at top left, rgba(60, 200, 255, 0.2), transparent 28%),
30
+ radial-gradient(circle at top right, rgba(255, 154, 31, 0.2), transparent 30%),
31
+ linear-gradient(180deg, #070b12, var(--bg));
32
+ color: var(--text);
33
+ font-family: "Segoe UI", system-ui, sans-serif;
34
+ }
35
+
36
+ .panel {
37
+ width: min(92vw, 720px);
38
+ padding: 40px;
39
+ border: 1px solid var(--line);
40
+ border-radius: 28px;
41
+ background: linear-gradient(180deg, rgba(15, 22, 35, 0.96), rgba(7, 11, 18, 0.98));
42
+ box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
43
+ }
44
+
45
+ .eyebrow {
46
+ font-size: 12px;
47
+ letter-spacing: 0.24em;
48
+ text-transform: uppercase;
49
+ color: var(--blue);
50
+ }
51
+
52
+ h1 {
53
+ margin: 12px 0 8px;
54
+ font-size: clamp(2rem, 5vw, 3.4rem);
55
+ }
56
+
57
+ p {
58
+ margin: 0 0 24px;
59
+ color: var(--muted);
60
+ line-height: 1.6;
61
+ }
62
+
63
+ form {
64
+ display: grid;
65
+ gap: 14px;
66
+ }
67
+
68
+ label {
69
+ font-size: 0.95rem;
70
+ }
71
+
72
+ input {
73
+ width: 100%;
74
+ padding: 14px 16px;
75
+ border: 1px solid rgba(60, 200, 255, 0.32);
76
+ border-radius: 14px;
77
+ background: rgba(7, 11, 18, 0.85);
78
+ color: var(--text);
79
+ font: inherit;
80
+ }
81
+
82
+ button {
83
+ padding: 14px 18px;
84
+ border: 0;
85
+ border-radius: 14px;
86
+ background: linear-gradient(90deg, var(--blue), var(--orange));
87
+ color: #061019;
88
+ font: inherit;
89
+ font-weight: 700;
90
+ cursor: pointer;
91
+ }
92
+
93
+ .result {
94
+ margin-top: 20px;
95
+ padding: 16px;
96
+ border-radius: 16px;
97
+ border: 1px solid rgba(255, 154, 31, 0.24);
98
+ background: rgba(255, 154, 31, 0.08);
99
+ }
100
+
101
+ .spacer {
102
+ height: 70vh;
103
+ }
104
+
105
+ .evidence {
106
+ margin-top: 24px;
107
+ padding: 20px;
108
+ border-radius: 18px;
109
+ border: 1px solid rgba(60, 200, 255, 0.24);
110
+ background: rgba(60, 200, 255, 0.08);
111
+ }
112
+ </style>
113
+ </head>
114
+ <body>
115
+ <main class="panel">
116
+ <div class="eyebrow">Local Proving Ground</div>
117
+ <h1>See, Act, Record</h1>
118
+ <p>
119
+ This local page exists to prove the Agent Portal browser loop against a
120
+ controlled app inside the repository.
121
+ </p>
122
+ <form id="workflow-form">
123
+ <label for="name">Agent Name</label>
124
+ <input id="name" name="name" type="text" placeholder="Portal Runner" />
125
+ <button id="generate-report" type="submit">Generate Result</button>
126
+ </form>
127
+ <div id="result" class="result" aria-live="polite">
128
+ Waiting for the agent to complete the workflow.
129
+ </div>
130
+ <div class="spacer" aria-hidden="true"></div>
131
+ <section id="evidence-panel" class="evidence">
132
+ <strong>Evidence Panel</strong>
133
+ <p>
134
+ If the agent reached this section, scrolling worked as part of the
135
+ browser automation flow.
136
+ </p>
137
+ </section>
138
+ </main>
139
+ <script>
140
+ const form = document.getElementById("workflow-form");
141
+ const result = document.getElementById("result");
142
+ const input = document.getElementById("name");
143
+
144
+ form.addEventListener("submit", (event) => {
145
+ event.preventDefault();
146
+ const value = input.value.trim() || "Unknown Agent";
147
+ result.textContent = `Workflow completed for ${value}. Screenshot and report are ready.`;
148
+ });
149
+ </script>
150
+ </body>
151
+ </html>
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@agent-portal/desktop",
3
+ "version": "0.0.2",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsc -p tsconfig.json",
8
+ "dev": "npm run build --workspace @agent-portal/core && tsc -p tsconfig.json && node dist/main.js",
9
+ "typecheck": "tsc -p tsconfig.json --noEmit",
10
+ "package": "npm run build && node ../../scripts/package_desktop.mjs"
11
+ },
12
+ "dependencies": {
13
+ "@agent-portal/core": "0.0.2"
14
+ },
15
+ "devDependencies": {
16
+ "ts-node": "^10.9.2"
17
+ }
18
+ }