@agimon-ai/po-sandbox 0.0.0-alpha.3 → 0.0.0-alpha.30
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/LICENSE +149 -21
- package/README.md +31 -99
- package/dist/apiContracts.cjs +1 -1
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +1 -1
- package/dist/apiContracts.mjs +1 -1
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/{extensionService-FmuCugPK.mjs → extensionService-DWqvfKPx.mjs} +2 -2
- package/dist/extensionService-DWqvfKPx.mjs.map +1 -0
- package/dist/{extensionService-CoqM-IE1.cjs → extensionService-DkUX2tob.cjs} +2 -2
- package/dist/extensionService-DkUX2tob.cjs.map +1 -0
- package/dist/extensions/mcp.cjs +7 -7
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.d.mts +1 -1
- package/dist/extensions/mcp.mjs +7 -7
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/server.cjs +24 -371
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +20 -362
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/llms.txt +3 -3
- package/package.json +12 -17
- package/src/prompts/help-how-to-sandbox/SKILL.md +15 -0
- package/dist/cockpitHarness.cjs +0 -600
- package/dist/cockpitHarness.cjs.map +0 -1
- package/dist/cockpitHarness.d.mts +0 -41
- package/dist/cockpitHarness.d.mts.map +0 -1
- package/dist/cockpitHarness.mjs +0 -594
- package/dist/cockpitHarness.mjs.map +0 -1
- package/dist/extensionService-CoqM-IE1.cjs.map +0 -1
- package/dist/extensionService-FmuCugPK.mjs.map +0 -1
- package/dist/sandboxBridge-77zC5pQR.mjs +0 -13
- package/dist/sandboxBridge-77zC5pQR.mjs.map +0 -1
- package/dist/sandboxBridge-Db6DubLC.cjs +0 -81
- package/dist/sandboxBridge-Db6DubLC.cjs.map +0 -1
- package/src/prompts/po-use-sandbox/SKILL.md +0 -14
package/LICENSE
CHANGED
|
@@ -1,21 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
2
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
3
|
+
|
|
4
|
+
Parameters
|
|
5
|
+
|
|
6
|
+
Licensor: Agimon Pty Ltd
|
|
7
|
+
Licensed Work: Po, the software in the Po source repository and the
|
|
8
|
+
packages released from it, in each version released by
|
|
9
|
+
the Licensor.
|
|
10
|
+
The Licensed Work is (c) 2026 Agimon Pty Ltd.
|
|
11
|
+
Material identified as third-party in the "Third-party
|
|
12
|
+
components" section at the end of this file or in a
|
|
13
|
+
NOTICE file, and any package or directory whose own
|
|
14
|
+
license file grants a different license, is not part of
|
|
15
|
+
the Licensed Work and remains under its own license.
|
|
16
|
+
Additional Use Grant: You may make production use of the Licensed Work if
|
|
17
|
+
your use is Eligible Use. "Eligible Use" is production use that falls
|
|
18
|
+
within at least one of the following:
|
|
19
|
+
|
|
20
|
+
(a) Personal Use. Use by an individual for their own personal purposes,
|
|
21
|
+
and not on behalf of, or for the benefit of, an employer, client, or
|
|
22
|
+
other Organization. Use by an individual in the course of employment
|
|
23
|
+
or engagement by an Organization is use by that Organization.
|
|
24
|
+
|
|
25
|
+
(b) Small Organization Use. Use by or on behalf of an Organization whose
|
|
26
|
+
Annual Revenue is less than USD 1,000,000.
|
|
27
|
+
|
|
28
|
+
(c) Non-profit, Education and Research Use. Use, regardless of Annual
|
|
29
|
+
Revenue, by (i) an Organization registered or recognized as a
|
|
30
|
+
non-profit or charitable organization under the laws of its
|
|
31
|
+
jurisdiction, for its non-profit purposes; (ii) an accredited school,
|
|
32
|
+
college, or university, for teaching, learning, or academic research;
|
|
33
|
+
or (iii) a publicly funded research institution, for its research.
|
|
34
|
+
|
|
35
|
+
(d) Service Provider Use. Use by a consultant, contractor, agency, or other
|
|
36
|
+
service provider, regardless of its own Annual Revenue, solely to
|
|
37
|
+
build, deploy, host, operate, or support the Licensed Work for a client
|
|
38
|
+
whose own use would be Eligible Use under (a), (b), or (c). A service
|
|
39
|
+
provider's use for its own purposes is Eligible Use only if the service
|
|
40
|
+
provider itself qualifies under (b) or (c).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Hosted services. Offering the Licensed Work to third parties as a hosted
|
|
44
|
+
or managed service whose primary value is the Licensed Work is Eligible
|
|
45
|
+
Use only if each such third party's own use would be Eligible Use.
|
|
46
|
+
|
|
47
|
+
Definitions. "Organization" means any company, partnership, sole
|
|
48
|
+
proprietorship, trust, association, government body, or other entity, and
|
|
49
|
+
includes an individual acting in a business or professional capacity.
|
|
50
|
+
"Affiliate" means any entity that directly or indirectly controls, is
|
|
51
|
+
controlled by, or is under common control with an Organization, where
|
|
52
|
+
"control" means ownership of more than 50% of the voting interests of an
|
|
53
|
+
entity or the power to direct its management and policies by contract or
|
|
54
|
+
otherwise. "Annual Revenue" means the total gross revenue of an
|
|
55
|
+
Organization and all of its Affiliates combined, from all sources and
|
|
56
|
+
whether or not related to the Licensed Work, for its most recently
|
|
57
|
+
completed fiscal year, or, if it has not completed a fiscal year, for the
|
|
58
|
+
twelve months before the use (or since its formation, if shorter),
|
|
59
|
+
converted into US dollars at the average exchange rate for that period.
|
|
60
|
+
Proceeds of equity or debt financing are not revenue.
|
|
61
|
+
|
|
62
|
+
Threshold. If an Organization stops qualifying under (b), its existing
|
|
63
|
+
production use remains Eligible Use for 90 days after it stops
|
|
64
|
+
qualifying, after which it must obtain a commercial license or stop
|
|
65
|
+
production use. Use that was Eligible Use when it occurred never requires
|
|
66
|
+
a commercial license after the fact.
|
|
67
|
+
Change Date: Four years from the date a version of the Licensed Work
|
|
68
|
+
is first publicly released by the Licensor.
|
|
69
|
+
Change License: Apache License, Version 2.0
|
|
70
|
+
|
|
71
|
+
For information about alternative licensing arrangements for the Licensed
|
|
72
|
+
Work, please visit: https://agimon.ai/licensing
|
|
73
|
+
|
|
74
|
+
Notice
|
|
75
|
+
|
|
76
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
77
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
78
|
+
under an Open Source License, as stated in this License.
|
|
79
|
+
|
|
80
|
+
-----------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
Business Source License 1.1
|
|
83
|
+
|
|
84
|
+
Terms
|
|
85
|
+
|
|
86
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
87
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
88
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
89
|
+
production use.
|
|
90
|
+
|
|
91
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
92
|
+
available distribution of a specific version of the Licensed Work under this
|
|
93
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
94
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
95
|
+
above terminate.
|
|
96
|
+
|
|
97
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
98
|
+
currently in effect as described in this License, you must purchase a
|
|
99
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
100
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
101
|
+
|
|
102
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
103
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
104
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
105
|
+
for each version of the Licensed Work released by Licensor.
|
|
106
|
+
|
|
107
|
+
You must conspicuously display this License on each original or modified copy
|
|
108
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
109
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
110
|
+
License apply to your use of that work.
|
|
111
|
+
|
|
112
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
113
|
+
terminate your rights under this License for the current and all other
|
|
114
|
+
versions of the Licensed Work.
|
|
115
|
+
|
|
116
|
+
This License does not grant you any right in any trademark or logo of
|
|
117
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
118
|
+
Licensor as expressly required by this License).
|
|
119
|
+
|
|
120
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
121
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
122
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
123
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
124
|
+
TITLE.
|
|
125
|
+
|
|
126
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
127
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
128
|
+
as long as you comply with the Covenants of Licensor below.
|
|
129
|
+
|
|
130
|
+
Covenants of Licensor
|
|
131
|
+
|
|
132
|
+
In consideration of the right to use this License’s text and the “Business
|
|
133
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
134
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
135
|
+
|
|
136
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
137
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
138
|
+
where “compatible” means that software provided under the Change License can
|
|
139
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
140
|
+
later version. Licensor may specify additional Change Licenses without
|
|
141
|
+
limitation.
|
|
142
|
+
|
|
143
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
144
|
+
impose any additional restriction on the right granted in this License, as
|
|
145
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
146
|
+
|
|
147
|
+
3. To specify a Change Date.
|
|
148
|
+
|
|
149
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
# @agimon-ai/po-sandbox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Sandbox layer for Po: reports whether a session runs inside a container and routes brokered providers when a launch grants a credential broker.
|
|
4
4
|
|
|
5
5
|
Part of the [Po distribution](https://www.npmjs.com/package/@agimon-ai/po).
|
|
6
6
|
|
|
7
|
+
## Status
|
|
8
|
+
|
|
9
|
+
Nothing starts a sandbox container today. Per-workspace containers are being designed; until they
|
|
10
|
+
land, this layer only reports sandbox state and honours broker routes that a launch has already
|
|
11
|
+
set. See [The container plan and current wiring](../../../docs/securities.md#the-container-plan-and-current-wiring)
|
|
12
|
+
for what the current server runtime connects.
|
|
13
|
+
|
|
7
14
|
## Requirements
|
|
8
15
|
|
|
9
16
|
- Node.js 24 or newer
|
|
10
|
-
- `@earendil-works/pi-coding-agent`
|
|
11
|
-
- One of `docker`, `podman`, `nerdctl`, or `finch` on the host for the cockpit container
|
|
17
|
+
- `@earendil-works/pi-coding-agent` 1.3.0
|
|
12
18
|
|
|
13
19
|
## Install
|
|
14
20
|
|
|
@@ -16,13 +22,10 @@ Part of the [Po distribution](https://www.npmjs.com/package/@agimon-ai/po).
|
|
|
16
22
|
npm install @agimon-ai/po-sandbox
|
|
17
23
|
```
|
|
18
24
|
|
|
19
|
-
The cockpit container is started by the web cockpit (`po`, which runs `po-web`) and requires this package in the
|
|
20
|
-
selected major mode's layers, as shown below.
|
|
21
|
-
|
|
22
25
|
## Enable the sandbox
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
`po init` writes a `sandbox` layer and adds it to the `copilot` mode. To use it in another mode,
|
|
28
|
+
list the layer on that mode in `.po/modes.yaml`:
|
|
26
29
|
|
|
27
30
|
```yaml
|
|
28
31
|
layers:
|
|
@@ -36,119 +39,48 @@ majorMode:
|
|
|
36
39
|
layers: [team, ask-user, task, sandbox]
|
|
37
40
|
```
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
than running uncontained.
|
|
41
|
-
|
|
42
|
-
## Web cockpit container
|
|
43
|
-
|
|
44
|
-
With this layer in the selected major mode, the web cockpit can hand over to one long-lived Linux
|
|
45
|
-
container that holds the hub and every session it spawns:
|
|
46
|
-
|
|
47
|
-
1. The cockpit resolves this package's `./cockpitHarness` export and delegates the container
|
|
48
|
-
lifecycle.
|
|
49
|
-
2. The layer detects the first available engine in the order `docker`, `podman`, `nerdctl`,
|
|
50
|
-
`finch` (override with `PO_SANDBOX_ENGINE`), and builds a
|
|
51
|
-
cockpit image when that tag is not cached. The digest covers the image definition and bridge
|
|
52
|
-
source. The image installs `@agimon-ai/po-web` from the registry rather than copying the
|
|
53
|
-
host's platform-specific packages.
|
|
54
|
-
3. It starts a detached container with each configured workspace bind-mounted at its host path,
|
|
55
|
-
a named home volume, and the cockpit port published on host loopback, then waits until the
|
|
56
|
-
cockpit inside answers `/api/health`.
|
|
57
|
-
|
|
58
|
-
The browser stays on the host while bash, file edits, extensions, MCP servers, and skills all
|
|
59
|
-
execute inside the container. `PO_SANDBOX=1` marks every sandboxed process; nesting is refused.
|
|
60
|
-
See [The container plan and current wiring](../../../docs/securities.md#the-container-plan-and-current-wiring)
|
|
61
|
-
for what the current server runtime connects.
|
|
62
|
-
|
|
63
|
-
Only an allowlisted environment enters the container: terminal and locale variables, proxy
|
|
64
|
-
settings, and `PO_PRESET`. Everything else a shell accumulates stays on the host.
|
|
65
|
-
|
|
66
|
-
## Engine and runtime selection
|
|
67
|
-
|
|
68
|
-
The harness invokes each supported engine with Docker-compatible arguments. The engine and its
|
|
69
|
-
VM, if any, must already be running on the host.
|
|
70
|
-
|
|
71
|
-
`PO_SANDBOX_RUN_FLAGS` passes extra options straight to the engine, which is how you select a
|
|
72
|
-
different isolation runtime without the layer having to know about it:
|
|
42
|
+
## In-session command
|
|
73
43
|
|
|
74
|
-
```
|
|
75
|
-
|
|
44
|
+
```text
|
|
45
|
+
/po-sandbox
|
|
76
46
|
```
|
|
77
47
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
would silently launch a different container.
|
|
81
|
-
|
|
82
|
-
Alternative isolation runtimes such as Kata or Firecracker are not verified here. Check their
|
|
83
|
-
mount and broker-transport support before relying on them.
|
|
84
|
-
|
|
85
|
-
## Workspace dev containers
|
|
86
|
-
|
|
87
|
-
The cockpit container ignores a workspace `.devcontainer` configuration. That file is
|
|
88
|
-
author-controlled and could mount anything, including the container socket, which would make the
|
|
89
|
-
containment claim false.
|
|
90
|
-
|
|
91
|
-
## Signing in from inside the sandbox
|
|
92
|
-
|
|
93
|
-
Subscription logins are not brokered. The cockpit container publishes only the cockpit port on
|
|
94
|
-
host loopback, so a `/login` callback that a provider sends to `localhost:<port>` does not reach
|
|
95
|
-
the container. Use a provider API key, which the credential broker below carries. Credentials stored inside the container land in the cockpit home
|
|
96
|
-
volume, so they survive later runs.
|
|
97
|
-
|
|
98
|
-
## Provider credential broker
|
|
48
|
+
Reports whether the current session runs inside a sandbox container (`PO_SANDBOX=1`) or directly
|
|
49
|
+
on the host.
|
|
99
50
|
|
|
100
|
-
|
|
51
|
+
## Brokered providers
|
|
101
52
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
53
|
+
When a session's admitted environment names brokered providers (`PO_BROKER_PROVIDERS`) and a
|
|
54
|
+
broker route (`PO_BROKER_SOCKET` or `PO_BROKER_ADDRESS`), the server plugin overrides those
|
|
55
|
+
providers' base URLs so requests go through the broker. The session's credential variables are
|
|
56
|
+
expected to hold the broker's session token, not the real key. With no broker route the layer
|
|
57
|
+
changes nothing.
|
|
106
58
|
|
|
107
|
-
How
|
|
59
|
+
How a container reaches the broker depends on the engine:
|
|
108
60
|
|
|
109
61
|
| Host | Transport | Why |
|
|
110
62
|
| ----------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
111
63
|
| Linux | Unix socket, bind-mounted, owner-only | Container and host share a kernel, so no port is needed |
|
|
112
64
|
| macOS, Windows, any VM engine | Loopback TCP through `host.docker.internal` | A container in a virtual machine cannot connect to a mounted host socket (ENOTSUP) |
|
|
113
65
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
local process could reach that port, and the session token is what stops it being useful.
|
|
117
|
-
|
|
118
|
-
The broker validates the token, swaps in the real key, and streams the provider response back.
|
|
119
|
-
Credentials for providers it cannot carry are withheld from the container rather than passed
|
|
120
|
-
through. Turn the whole mechanism off with `PO_SANDBOX_BROKER=0`.
|
|
121
|
-
|
|
122
|
-
## In-session command
|
|
123
|
-
|
|
124
|
-
```text
|
|
125
|
-
/doom-sandbox
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Reports whether the current session runs inside the sandbox container or directly on the host.
|
|
66
|
+
A socket route goes through a loopback bridge inside the container, because no SDK can dial a
|
|
67
|
+
socket path. A TCP route is addressed directly.
|
|
129
68
|
|
|
130
69
|
## Current limits
|
|
131
70
|
|
|
132
|
-
-
|
|
133
|
-
|
|
71
|
+
- No component in this package launches a container or starts a broker for a session.
|
|
72
|
+
- The broker carries a curated provider list. OAuth subscription logins are not brokered.
|
|
134
73
|
- A host `*_BASE_URL` override is dropped rather than used as the broker's upstream.
|
|
135
|
-
- Compositions that declare local workspace packages cannot load their platform-specific
|
|
136
|
-
dependencies inside the Linux container; use registry-installed layers for sandboxed work.
|
|
137
|
-
- One container holds every cockpit session, so sessions can read each other's mounted
|
|
138
|
-
workspaces.
|
|
139
|
-
- Container network access follows the engine's defaults and is not restricted yet.
|
|
140
|
-
- Mounted repositories are writable. Containers do not protect those files from agent edits,
|
|
141
|
-
and the container engine remains part of the trusted base.
|
|
142
74
|
|
|
143
75
|
## Public API
|
|
144
76
|
|
|
145
77
|
```ts
|
|
146
78
|
import { DefaultSandboxExtensionService } from '@agimon-ai/po-sandbox';
|
|
147
|
-
import { createCockpitHarness, startCockpitContainer } from '@agimon-ai/po-sandbox/cockpitHarness';
|
|
148
79
|
```
|
|
149
80
|
|
|
150
|
-
|
|
151
|
-
`/
|
|
81
|
+
`DefaultSandboxExtensionService` reports sandbox state from the environment it is given.
|
|
82
|
+
`/extensions/server` registers the in-session command, its Help resources, and the brokered
|
|
83
|
+
provider overrides.
|
|
152
84
|
|
|
153
85
|
## Development
|
|
154
86
|
|
|
@@ -167,4 +99,4 @@ Maintained by [Agimon](https://agimon.ai/about).
|
|
|
167
99
|
|
|
168
100
|
## License
|
|
169
101
|
|
|
170
|
-
|
|
102
|
+
Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
|
package/dist/apiContracts.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#region src/schemas/apiContracts.ts
|
|
6
|
-
/** This
|
|
6
|
+
/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
|
|
7
7
|
const apiContracts = (0, require("@agimon-ai/po-core/apiContracts").defineApiContract)({
|
|
8
8
|
version: 1,
|
|
9
9
|
http: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,4CAAeA,CAAAA,CAAAA,kBAAAA,CAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
|
package/dist/apiContracts.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/schemas/apiContracts.d.ts
|
|
2
|
-
/** This
|
|
2
|
+
/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
|
|
3
3
|
export declare const apiContracts: {
|
|
4
4
|
version: 1;
|
|
5
5
|
protocols?: Record<string, string> | undefined;
|
package/dist/apiContracts.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineApiContract } from "@agimon-ai/po-core/apiContracts";
|
|
2
2
|
//#region src/schemas/apiContracts.ts
|
|
3
|
-
/** This
|
|
3
|
+
/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
|
|
4
4
|
const apiContracts = defineApiContract({
|
|
5
5
|
version: 1,
|
|
6
6
|
http: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,eAAe,kBAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { insideSandbox } from "@agimon-ai/po-core/sandboxHarness";
|
|
2
2
|
//#region src/services/extensionService/index.ts
|
|
3
3
|
const SANDBOXED_MESSAGE = "Sandboxed session: the agent, extensions, and tools run inside the container.";
|
|
4
|
-
const HOST_MESSAGE = "Host session:
|
|
4
|
+
const HOST_MESSAGE = "Host session: the agent runs on the host. Per-workspace containers are not available yet.";
|
|
5
5
|
var DefaultSandboxExtensionService = class {
|
|
6
6
|
environment;
|
|
7
7
|
constructor(environment) {
|
|
@@ -17,4 +17,4 @@ var DefaultSandboxExtensionService = class {
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { DefaultSandboxExtensionService as t };
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=extensionService-
|
|
20
|
+
//# sourceMappingURL=extensionService-DWqvfKPx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensionService-DWqvfKPx.mjs","names":[],"sources":["../src/services/extensionService/index.ts"],"sourcesContent":["import { insideSandbox } from '@agimon-ai/po-core/sandboxHarness';\n\nimport type { SandboxExtensionResult, SandboxExtensionService } from '../../types/extension';\n\nconst SANDBOXED_MESSAGE = 'Sandboxed session: the agent, extensions, and tools run inside the container.';\nconst HOST_MESSAGE = 'Host session: the agent runs on the host. Per-workspace containers are not available yet.';\n\nexport class DefaultSandboxExtensionService implements SandboxExtensionService {\n private readonly environment: Readonly<Record<string, string | undefined>>;\n\n constructor(environment: Readonly<Record<string, string | undefined>>) {\n this.environment = environment;\n }\n\n async execute(): Promise<SandboxExtensionResult> {\n return {\n message: insideSandbox(this.environment) ? SANDBOXED_MESSAGE : HOST_MESSAGE,\n level: 'info',\n };\n }\n}\n"],"mappings":";;AAIA,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AAErB,IAAa,iCAAb,MAA+E;CAC7E;CAEA,YAAY,aAA2D;EACrE,KAAK,cAAc;CACrB;CAEA,MAAM,UAA2C;EAC/C,OAAO;GACL,SAAS,cAAc,KAAK,WAAW,IAAI,oBAAoB;GAC/D,OAAO;EACT;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let _agimon_ai_po_core_sandboxHarness = require("@agimon-ai/po-core/sandboxHarness");
|
|
2
2
|
//#region src/services/extensionService/index.ts
|
|
3
3
|
const SANDBOXED_MESSAGE = "Sandboxed session: the agent, extensions, and tools run inside the container.";
|
|
4
|
-
const HOST_MESSAGE = "Host session:
|
|
4
|
+
const HOST_MESSAGE = "Host session: the agent runs on the host. Per-workspace containers are not available yet.";
|
|
5
5
|
var DefaultSandboxExtensionService = class {
|
|
6
6
|
environment;
|
|
7
7
|
constructor(environment) {
|
|
@@ -22,4 +22,4 @@ Object.defineProperty(exports, "DefaultSandboxExtensionService", {
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
//# sourceMappingURL=extensionService-
|
|
25
|
+
//# sourceMappingURL=extensionService-DkUX2tob.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensionService-DkUX2tob.cjs","names":["insideSandbox"],"sources":["../src/services/extensionService/index.ts"],"sourcesContent":["import { insideSandbox } from '@agimon-ai/po-core/sandboxHarness';\n\nimport type { SandboxExtensionResult, SandboxExtensionService } from '../../types/extension';\n\nconst SANDBOXED_MESSAGE = 'Sandboxed session: the agent, extensions, and tools run inside the container.';\nconst HOST_MESSAGE = 'Host session: the agent runs on the host. Per-workspace containers are not available yet.';\n\nexport class DefaultSandboxExtensionService implements SandboxExtensionService {\n private readonly environment: Readonly<Record<string, string | undefined>>;\n\n constructor(environment: Readonly<Record<string, string | undefined>>) {\n this.environment = environment;\n }\n\n async execute(): Promise<SandboxExtensionResult> {\n return {\n message: insideSandbox(this.environment) ? SANDBOXED_MESSAGE : HOST_MESSAGE,\n level: 'info',\n };\n }\n}\n"],"mappings":";;AAIA,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AAErB,IAAa,iCAAb,MAA+E;CAC7E;CAEA,YAAY,aAA2D;EACrE,KAAK,cAAc;CACrB;CAEA,MAAM,UAA2C;EAC/C,OAAO;GACL,UAAA,GAASA,kCAAAA,cAAAA,CAAc,KAAK,WAAW,IAAI,oBAAoB;GAC/D,OAAO;EACT;CACF;AACF"}
|
package/dist/extensions/mcp.cjs
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let _agimon_ai_po_core_mcpFacet = require("@agimon-ai/po-core/mcpFacet");
|
|
6
|
-
let
|
|
7
|
-
//#region src/extensions/workspaces/sessions/(backend)/skill/
|
|
8
|
-
var
|
|
9
|
-
name: "
|
|
10
|
-
description: "Use @agimon-ai/po-sandbox:
|
|
11
|
-
read: () => (0,
|
|
6
|
+
let _agimon_ai_po_core_serverPlugin = require("@agimon-ai/po-core/serverPlugin");
|
|
7
|
+
//#region src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp.ts
|
|
8
|
+
var help_how_to_sandbox_mcp_default = (0, _agimon_ai_po_core_mcpFacet.defineMcpSkill)({
|
|
9
|
+
name: "help-how-to-sandbox",
|
|
10
|
+
description: "Use @agimon-ai/po-sandbox: Sandbox building blocks for Po: container engine detection, the sandbox image, and a host credential broker for per-workspace containers, which are not wired yet",
|
|
11
|
+
read: () => (0, _agimon_ai_po_core_serverPlugin.readPackageResource)(require("url").pathToFileURL(__filename).href, "src/prompts/help-how-to-sandbox/SKILL.md")
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region generated/mcp.ts
|
|
@@ -16,7 +16,7 @@ const at = (value, context) => typeof value === "function" ? value(context) : va
|
|
|
16
16
|
const mcp = (0, _agimon_ai_po_core_mcpFacet.defineMcpPlugin)({
|
|
17
17
|
name: "@agimon-ai/po-sandbox",
|
|
18
18
|
session: (context) => ({ get skills() {
|
|
19
|
-
return [at(
|
|
19
|
+
return [at(help_how_to_sandbox_mcp_default, context)];
|
|
20
20
|
} })
|
|
21
21
|
});
|
|
22
22
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","defineMcpPlugin","
|
|
1
|
+
{"version":3,"file":"mcp.cjs","names":["defineMcpSkill","readPackageResource","defineMcpPlugin","skillHelpHowToSandbox"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineMcpSkill({\n name: 'help-how-to-sandbox',\n description:\n 'Use @agimon-ai/po-sandbox: Sandbox building blocks for Po: container engine detection, the sandbox image, and a host credential broker for per-workspace containers, which are not wired yet',\n read: () => readPackageResource(import.meta.url, 'src/prompts/help-how-to-sandbox/SKILL.md'),\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineMcpPlugin, type PoMcpSessionPlugin } from '@agimon-ai/po-core/mcpFacet';\n\nimport skillHelpHowToSandbox from '../src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const mcp = defineMcpPlugin({\n name: '@agimon-ai/po-sandbox',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillHelpHowToSandbox, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;;;;;AAGA,IAAA,mCAAA,GAAeA,4BAAAA,eAAAA,CAAe;CAC5B,MAAM;CACN,aACE;CACF,aAAA,GAAYC,gCAAAA,oBAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,MAAqC,0CAA0C;AAC7F,CAAC;;;ACFD,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,OAAA,GAAMC,4BAAAA,gBAAAA,CAAgB;CACjC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,SAAuC;EAAE,OAAO,CAAC,GAAGC,iCAAuB,OAAO,CAAC;CAAG,EAC5F;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region generated/mcp.d.ts
|
|
2
|
-
export declare const mcp: import("@agimon-ai/po-core/mcpFacet").
|
|
2
|
+
export declare const mcp: import("@agimon-ai/po-core/mcpFacet").PoMcpPluginDefinition;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { mcp as default };
|
|
5
5
|
//# sourceMappingURL=mcp.d.mts.map
|
package/dist/extensions/mcp.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineMcpPlugin, defineMcpSkill } from "@agimon-ai/po-core/mcpFacet";
|
|
2
|
-
import { readPackageResource } from "@agimon-ai/po-core/
|
|
3
|
-
//#region src/extensions/workspaces/sessions/(backend)/skill/
|
|
4
|
-
var
|
|
5
|
-
name: "
|
|
6
|
-
description: "Use @agimon-ai/po-sandbox:
|
|
7
|
-
read: () => readPackageResource(import.meta.url, "src/prompts/
|
|
2
|
+
import { readPackageResource } from "@agimon-ai/po-core/serverPlugin";
|
|
3
|
+
//#region src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp.ts
|
|
4
|
+
var help_how_to_sandbox_mcp_default = defineMcpSkill({
|
|
5
|
+
name: "help-how-to-sandbox",
|
|
6
|
+
description: "Use @agimon-ai/po-sandbox: Sandbox building blocks for Po: container engine detection, the sandbox image, and a host credential broker for per-workspace containers, which are not wired yet",
|
|
7
|
+
read: () => readPackageResource(import.meta.url, "src/prompts/help-how-to-sandbox/SKILL.md")
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region generated/mcp.ts
|
|
@@ -12,7 +12,7 @@ const at = (value, context) => typeof value === "function" ? value(context) : va
|
|
|
12
12
|
const mcp = defineMcpPlugin({
|
|
13
13
|
name: "@agimon-ai/po-sandbox",
|
|
14
14
|
session: (context) => ({ get skills() {
|
|
15
|
-
return [at(
|
|
15
|
+
return [at(help_how_to_sandbox_mcp_default, context)];
|
|
16
16
|
} })
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.mjs","names":["
|
|
1
|
+
{"version":3,"file":"mcp.mjs","names":["skillHelpHowToSandbox"],"sources":["../../src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp.ts","../../generated/mcp.ts"],"sourcesContent":["import { defineMcpSkill } from '@agimon-ai/po-core/mcpFacet';\nimport { readPackageResource } from '@agimon-ai/po-core/serverPlugin';\n\nexport default defineMcpSkill({\n name: 'help-how-to-sandbox',\n description:\n 'Use @agimon-ai/po-sandbox: Sandbox building blocks for Po: container engine detection, the sandbox image, and a host credential broker for per-workspace containers, which are not wired yet',\n read: () => readPackageResource(import.meta.url, 'src/prompts/help-how-to-sandbox/SKILL.md'),\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineMcpPlugin, type PoMcpSessionPlugin } from '@agimon-ai/po-core/mcpFacet';\n\nimport skillHelpHowToSandbox from '../src/extensions/workspaces/sessions/(backend)/skill/help-how-to-sandbox.mcp';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const mcp = defineMcpPlugin({\n name: '@agimon-ai/po-sandbox',\n session: (context) => ({\n get skills(): PoMcpSessionPlugin['skills'] { return [at(skillHelpHowToSandbox, context)]; },\n }) satisfies PoMcpSessionPlugin,\n});\n\nexport default mcp;\n"],"mappings":";;;AAGA,IAAA,kCAAe,eAAe;CAC5B,MAAM;CACN,aACE;CACF,YAAY,oBAAoB,YAAY,KAAK,0CAA0C;AAC7F,CAAC;;;ACFD,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,MAAM,gBAAgB;CACjC,MAAM;CACN,UAAU,aAAa,EACrB,IAAI,SAAuC;EAAE,OAAO,CAAC,GAAGA,iCAAuB,OAAO,CAAC;CAAG,EAC5F;AACF,CAAC"}
|