@agimon-ai/po-browse 0.0.1-alpha.21 → 0.0.1-alpha.210
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 +110 -149
- package/README.md +8 -56
- package/dist/apiContracts.cjs +40 -0
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +2 -2
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +40 -0
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/browseMethods-CNV509mb.mjs +123 -0
- package/dist/browseMethods-CNV509mb.mjs.map +1 -0
- package/dist/browseMethods-CbEQxgc8.cjs +158 -0
- package/dist/browseMethods-CbEQxgc8.cjs.map +1 -0
- package/dist/contract-DAgQ8L2i.d.mts +311 -0
- package/dist/contract-DAgQ8L2i.d.mts.map +1 -0
- package/dist/contract.cjs +6 -0
- package/dist/contract.d.mts +2 -0
- package/dist/contract.mjs +1 -0
- package/dist/contracts-BmQlous_.mjs +16 -0
- package/dist/contracts-BmQlous_.mjs.map +1 -0
- package/dist/contracts-DI3YEteU.cjs +39 -0
- package/dist/contracts-DI3YEteU.cjs.map +1 -0
- package/dist/edge.cjs +463 -0
- package/dist/edge.cjs.map +1 -0
- package/dist/edge.d.mts +57 -0
- package/dist/edge.d.mts.map +1 -0
- package/dist/edge.mjs +459 -0
- package/dist/edge.mjs.map +1 -0
- package/dist/extensionService-B_JfBRj8.cjs +19 -0
- package/dist/extensionService-B_JfBRj8.cjs.map +1 -0
- package/dist/extensionService-CO3HudHQ.mjs +14 -0
- package/dist/extensionService-CO3HudHQ.mjs.map +1 -0
- package/dist/extensions/native.mjs +1929 -0
- package/dist/extensions/native.mjs.map +1 -0
- package/dist/extensions/server.cjs +3034 -357
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +3032 -355
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +1580 -303
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/po-runtime-identity.json +1 -0
- package/dist/poBrowse-CONqxh4x.cjs +49 -0
- package/dist/poBrowse-CONqxh4x.cjs.map +1 -0
- package/dist/poBrowse-C_3Brjon.mjs +20 -0
- package/dist/poBrowse-C_3Brjon.mjs.map +1 -0
- package/llms.txt +4 -3
- package/locales/vi.json +162 -0
- package/locales/zh-CN.json +162 -0
- package/package.json +131 -17
- package/src/prompts/codemode-how-to-browse/SKILL.md +141 -0
- package/src/prompts/help-how-to-browse-profiles/SKILL.md +50 -0
- package/dist/extensionService-BR9myTVQ.cjs +0 -27
- package/dist/extensionService-BR9myTVQ.cjs.map +0 -1
- package/dist/extensionService-CPKCQdqV.mjs +0 -16
- package/dist/extensionService-CPKCQdqV.mjs.map +0 -1
- package/src/prompts/po-use-browse/SKILL.md +0 -26
package/LICENSE
CHANGED
|
@@ -1,149 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Terms
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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.
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Agimon Pty Ltd
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
# @agimon-ai/po-browse
|
|
2
2
|
|
|
3
|
-
Browser identities for Po sessions, backed by
|
|
3
|
+
Browser identities for Po sessions, backed by the in-process browser runtime.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- Node.js 24 or newer
|
|
10
|
-
- `@earendil-works/pi-coding-agent` 1.0.2
|
|
5
|
+
Requires Node.js 24 or newer and a Po server host.
|
|
11
6
|
|
|
12
7
|
## Install
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
pnpm add @agimon-ai/po-browse
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The package declares poServer metadata for native server discovery. Include it through normal profile and domain composition.
|
|
9
|
+
Add `@agimon-ai/po-browse` to a layer selected by your preset in `.po/presets.yaml`, then run `po sync`.
|
|
19
10
|
|
|
20
11
|
## Use
|
|
21
12
|
|
|
@@ -25,59 +16,20 @@ Run the registered command in the cockpit:
|
|
|
25
16
|
/po-browse
|
|
26
17
|
```
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Package behavior
|
|
31
|
-
|
|
32
|
-
> Before publishing, replace this paragraph with one concrete, copy-pasteable example of the package-specific input, output, configuration, or workflow that is not already demonstrated by the generated command.
|
|
33
|
-
|
|
34
|
-
## Help
|
|
35
|
-
|
|
36
|
-
The published package includes `llms.txt` and `src/prompts/po-use-browse/SKILL.md`. Link additional prompts from `llms.txt` and declare them through named `resource/*.server.ts` routes using `defineResource`. Server lifecycle registration owns their disposal. Publish prompts under `src/prompts`, never export Markdown or copy it into `dist`.
|
|
37
|
-
|
|
38
|
-
## Public API
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import { DefaultBrowseExtensionService } from '@agimon-ai/po-browse';
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The native server entry is also available at:
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
@agimon-ai/po-browse/extensions/server
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The build generates host entrypoints in `generated/` from named `src/extensions` routes. Pure re-export modules in `src/exports` expose selected public capabilities. Keep typed authoring helpers in a dedicated subpath with no host/runtime imports so repository modules can bundle them cheaply.
|
|
51
|
-
|
|
52
|
-
## Structure and lifecycle
|
|
53
|
-
|
|
54
|
-
- `extensions/`: path-routed host contracts. Every scanned file default-exports one typed `define*` declaration.
|
|
55
|
-
- `services/{serviceName}/`: package logic, with `index.ts` and `type.ts`.
|
|
56
|
-
- `models/`: host-neutral state and transitions.
|
|
57
|
-
- `constants/`, `schemas/`, and `types/`: shared metadata, validation, and contracts.
|
|
58
|
-
- Private `_lib/` and `_components/` folders beside routes hold surface-private implementation and are not scanned.
|
|
59
|
-
|
|
60
|
-
Use scoped `root.server.ts` `defineRoot` factories for shared dependencies, Cordis services and lifecycle. Put each tool, command, hook, method, API, resource, and presentation contribution in its own named routed file. Do not use catch-all entries, named exports in routes, or freeform route implementation.
|
|
61
|
-
|
|
62
|
-
Give each event one owner. Server plugins own session hooks and shared runtime services.
|
|
19
|
+
This lists the browsers the session uses. To operate them, use the `browser` namespace through code mode and read the [browser guide](src/prompts/codemode-how-to-browse/SKILL.md).
|
|
63
20
|
|
|
64
|
-
|
|
21
|
+
## Page ownership
|
|
65
22
|
|
|
66
|
-
|
|
23
|
+
Browser pages are owned by `po-${sessionId}`. A dedicated native workflow child can call `browser.closeOwnedPages()` in its finalizer. Cleanup targets only explicitly owned tabs, leaves foreign or untagged pages alone, and does not request browser or profile closure. Extension tabs require a successful close acknowledgement before registry removal; failures retain their entries for retry. All owned pages are attempted with a five-second deadline per page, and failures are surfaced together. The session root repeats the same idempotent cleanup during `onDispose`, including session release, stop, and error teardown. This does not promise cleanup after process crashes or `SIGKILL`.
|
|
67
24
|
|
|
68
25
|
## Development
|
|
69
26
|
|
|
70
27
|
```bash
|
|
71
|
-
pnpm build
|
|
72
|
-
pnpm typecheck
|
|
73
|
-
pnpm test
|
|
74
|
-
pnpm lint
|
|
75
|
-
pnpm exec vibe-lint check .
|
|
76
|
-
npm pack --dry-run
|
|
28
|
+
pnpm exec nx run-many -t lint typecheck build test -p @agimon-ai/po-browse
|
|
77
29
|
```
|
|
78
30
|
|
|
79
31
|
Maintained by [Agimon](https://agimon.ai/about).
|
|
80
32
|
|
|
81
33
|
## License
|
|
82
34
|
|
|
83
|
-
|
|
35
|
+
Functional Source License 1.1, MIT Future License (FSL-1.1-MIT): free for any purpose except a Competing Use; each version converts to MIT two years after release. See [LICENSE](LICENSE).
|
package/dist/apiContracts.cjs
CHANGED
|
@@ -73,6 +73,45 @@ const browseSnapshotMethod = (0, _agimon_ai_po_core_pluginProtocol.definePoPlugi
|
|
|
73
73
|
message: typebox.Type.String()
|
|
74
74
|
})])
|
|
75
75
|
});
|
|
76
|
+
(0, _agimon_ai_po_core_pluginProtocol.definePoPluginMethod)({
|
|
77
|
+
...Address,
|
|
78
|
+
method: "close",
|
|
79
|
+
input: typebox.Type.Object({
|
|
80
|
+
tabIds: typebox.Type.Array(TabId, { maxItems: 100 }),
|
|
81
|
+
identityIds: typebox.Type.Optional(typebox.Type.Array(typebox.Type.String({
|
|
82
|
+
minLength: 1,
|
|
83
|
+
maxLength: 256
|
|
84
|
+
}), { maxItems: 100 }))
|
|
85
|
+
}, { additionalProperties: false }),
|
|
86
|
+
output: typebox.Type.Object({ closed: typebox.Type.Integer({ minimum: 0 }) })
|
|
87
|
+
});
|
|
88
|
+
const ProfileName = typebox.Type.String({
|
|
89
|
+
minLength: 1,
|
|
90
|
+
maxLength: 256
|
|
91
|
+
});
|
|
92
|
+
const Outcome = typebox.Type.Union([typebox.Type.Object({ ok: typebox.Type.Literal(true) }), typebox.Type.Object({
|
|
93
|
+
ok: typebox.Type.Literal(false),
|
|
94
|
+
message: typebox.Type.String()
|
|
95
|
+
})]);
|
|
96
|
+
(0, _agimon_ai_po_core_pluginProtocol.definePoPluginMethod)({
|
|
97
|
+
...Address,
|
|
98
|
+
method: "sleep",
|
|
99
|
+
input: typebox.Type.Object({ profileName: ProfileName }, { additionalProperties: false }),
|
|
100
|
+
output: Outcome
|
|
101
|
+
});
|
|
102
|
+
(0, _agimon_ai_po_core_pluginProtocol.definePoPluginMethod)({
|
|
103
|
+
...Address,
|
|
104
|
+
method: "relaunch",
|
|
105
|
+
input: typebox.Type.Object({
|
|
106
|
+
profileName: ProfileName,
|
|
107
|
+
headless: typebox.Type.Boolean(),
|
|
108
|
+
urls: typebox.Type.Array(typebox.Type.String({
|
|
109
|
+
pattern: "^https?://",
|
|
110
|
+
maxLength: 2048
|
|
111
|
+
}), { maxItems: 20 })
|
|
112
|
+
}, { additionalProperties: false }),
|
|
113
|
+
output: Outcome
|
|
114
|
+
});
|
|
76
115
|
//#endregion
|
|
77
116
|
//#region src/schemas/apiContracts.ts
|
|
78
117
|
const S = typebox.Type.String();
|
|
@@ -94,6 +133,7 @@ const Identity = typebox.Type.Object({
|
|
|
94
133
|
typebox.Type.Literal("crashed")
|
|
95
134
|
]),
|
|
96
135
|
window: typebox.Type.Union([typebox.Type.Literal("headed"), typebox.Type.Literal("headless")]),
|
|
136
|
+
profile: typebox.Type.Optional(typebox.Type.Boolean()),
|
|
97
137
|
lastUsedAt: N,
|
|
98
138
|
tabs: typebox.Type.Array(Tab)
|
|
99
139
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.cjs","names":["Type","definePoPluginMethod","Type","defineApiContract"],"sources":["../src/types/webBrowseActivity.ts","../src/schemas/browseMethods.ts","../src/schemas/apiContracts.ts"],"sourcesContent":["/**\n * Wire types shared by the hub channel, the session methods and the web\n * plugin. JSON only, no node types, so the cockpit bundle can carry them.\n */\n\n/** The frame type the hub publishes and the web plugin claims. */\nexport const browseActivityChannelType = 'browse_activity';\n\nexport type BrowseIdentityState = 'active' | 'idle' | 'asleep' | 'crashed';\n\nexport interface BrowseTabWire {\n /** `<daemon port>.<page id>`: page ids are only unique within one daemon. */\n id: string;\n title: string;\n /** Origin plus path; the daemon strips query and fragment. */\n url: string;\n /** The tab Po is working in. */\n current: boolean;\n /** Epoch ms. */\n lastAccessedAt: number;\n}\n\nexport interface BrowseIdentityWire {\n /** Profile name, or `<daemon port>.<browser id>` for a temporary browser. */\n id: string;\n name: string;\n state: BrowseIdentityState;\n window: 'headed' | 'headless';\n /** Epoch ms. */\n lastUsedAt: number;\n tabs: BrowseTabWire[];\n}\n\nexport interface BrowseActivityPayload {\n identities: BrowseIdentityWire[];\n}\n\n/** Session-scoped plugin service the live tab calls; see src/schemas/browseMethods.ts. */\nexport const browseMethodService = 'browse';\n\nexport interface BrowseFrameInput {\n tabId: string;\n /** Number of the frame the view already shows. */\n since?: number;\n}\n\nexport type BrowseFrameOutput =\n | { state: 'ok'; src: string; seq?: number }\n | { state: 'unchanged'; seq: number }\n | { state: 'closed' }\n | { state: 'timeout' }\n | { state: 'error' };\n\nexport interface BrowseSnapshotInput {\n tabId: string;\n /** Identity id; names the snapshot folder after sanitizing. */\n identity: string;\n /** Page host; names the snapshot file after sanitizing. */\n host: string;\n}\n\nexport type BrowseSnapshotOutput = { ok: true; path: string } | { ok: false; message: string };\n","import { definePoPluginMethod } from '@agimon-ai/po-core/pluginProtocol';\nimport { Type } from 'typebox';\n\nimport { browseMethodService } from '../types/webBrowseActivity';\n\nconst Address = { service: browseMethodService, scope: 'session', direction: 'client-to-server' } as const;\nconst TabId = Type.String({ minLength: 3, maxLength: 256 });\n\nconst FrameSeq = Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });\n\n/**\n * One frame of a tab this session owns, as a data URL. With `since`, a frame\n * that is still current answers `unchanged` instead of the image.\n */\nexport const browseFrameMethod = definePoPluginMethod({\n ...Address,\n method: 'frame',\n input: Type.Object({ tabId: TabId, since: Type.Optional(FrameSeq) }, { additionalProperties: false }),\n output: Type.Union([\n Type.Object({ state: Type.Literal('ok'), src: Type.String(), seq: Type.Optional(FrameSeq) }),\n Type.Object({ state: Type.Literal('unchanged'), seq: FrameSeq }),\n Type.Object({ state: Type.Literal('closed') }),\n Type.Object({ state: Type.Literal('timeout') }),\n Type.Object({ state: Type.Literal('error') }),\n ]),\n});\n\n/** Saves a PNG of a tab under the session's .tmp/po-browse and returns its cwd-relative path. */\nexport const browseSnapshotMethod = definePoPluginMethod({\n ...Address,\n method: 'snapshot',\n input: Type.Object(\n {\n tabId: TabId,\n identity: Type.String({ minLength: 1, maxLength: 256 }),\n host: Type.String({ maxLength: 256 }),\n },\n { additionalProperties: false },\n ),\n output: Type.Union([\n Type.Object({ ok: Type.Literal(true), path: Type.String() }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n ]),\n});\n","import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nimport { browseActivityChannelType } from '../types/webBrowseActivity';\nimport { browseFrameMethod, browseSnapshotMethod } from './browseMethods';\n\nconst S = Type.String();\nconst N = Type.Number();\n\nconst Tab = Type.Object({ id: S, title: S, url: S, current: Type.Boolean(), lastAccessedAt: N });\nconst Identity = Type.Object({\n id: S,\n name: S,\n state: Type.Union([Type.Literal('active'), Type.Literal('idle'), Type.Literal('asleep'), Type.Literal('crashed')]),\n window: Type.Union([Type.Literal('headed'), Type.Literal('headless')]),\n lastUsedAt: N,\n tabs: Type.Array(Tab),\n});\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: [\n ...[browseFrameMethod, browseSnapshotMethod].map((method) => ({\n id: `browse.${method.method}`,\n scope: 'session' as const,\n service: method.service,\n member: method.method,\n kind: 'method' as const,\n direction: 'client-to-server' as const,\n description: `Browser tab ${method.method} through the scoped plugin service.`,\n input: method.input,\n output: method.output,\n })),\n {\n id: 'browse.activity',\n scope: 'session',\n service: 'po.hub',\n member: browseActivityChannelType,\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Browser identities and tabs this session owns.',\n input: Type.Object({ identities: Type.Array(Identity) }),\n },\n ],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;;;;;;;AAMA,MAAa,4BAA4B;;;ACDzC,MAAM,UAAU;CAAE,SAAS;CAAqB,OAAO;CAAW,WAAW;AAAmB;AAChG,MAAM,QAAQA,QAAAA,KAAK,OAAO;CAAE,WAAW;CAAG,WAAW;AAAI,CAAC;AAE1D,MAAM,WAAWA,QAAAA,KAAK,QAAQ;CAAE,SAAS;CAAG,SAAS,OAAO;AAAiB,CAAC;;;;;AAM9E,MAAa,qBAAA,GAAoBC,kCAAAA,qBAAAA,CAAqB;CACpD,GAAG;CACH,QAAQ;CACR,OAAOD,QAAAA,KAAK,OAAO;EAAE,OAAO;EAAO,OAAOA,QAAAA,KAAK,SAAS,QAAQ;CAAE,GAAG,EAAE,sBAAsB,MAAM,CAAC;CACpG,QAAQA,QAAAA,KAAK,MAAM;EACjBA,QAAAA,KAAK,OAAO;GAAE,OAAOA,QAAAA,KAAK,QAAQ,IAAI;GAAG,KAAKA,QAAAA,KAAK,OAAO;GAAG,KAAKA,QAAAA,KAAK,SAAS,QAAQ;EAAE,CAAC;EAC3FA,QAAAA,KAAK,OAAO;GAAE,OAAOA,QAAAA,KAAK,QAAQ,WAAW;GAAG,KAAK;EAAS,CAAC;EAC/DA,QAAAA,KAAK,OAAO,EAAE,OAAOA,QAAAA,KAAK,QAAQ,QAAQ,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AK,MAAM,CAACA,QAAAA,KAAK,QAAQ,QAAQ,GAAGA,QAAAA,KAAK,QAAQ,UAAU,CAAC,CAAC;CACrE,YAAY;CACZ,MAAMA,QAAAA,KAAK,MAAM,GAAG;AACtB,CAAC;AAED,MAAa,gBAAA,GAAeC,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAS,CACP,GAAG,CAAC,mBAAmB,oBAAoB,CAAC,CAAC,KAAK,YAAY;EAC5D,IAAI,UAAU,OAAO;EACrB,OAAO;EACP,SAAS,OAAO;EAChB,QAAQ,OAAO;EACf,MAAM;EACN,WAAW;EACX,aAAa,eAAe,OAAO,OAAO;EAC1C,OAAO,OAAO;EACd,QAAQ,OAAO;CACjB,EAAE,GACF;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAOD,QAAAA,KAAK,OAAO,EAAE,YAAYA,QAAAA,KAAK,MAAM,QAAQ,EAAE,CAAC;CACzD,CACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["Type","definePoPluginMethod","Type","defineApiContract"],"sources":["../src/types/webBrowseActivity.ts","../src/schemas/browseMethods.ts","../src/schemas/apiContracts.ts"],"sourcesContent":["/**\n * Wire types shared by the hub channel, the session methods and the web\n * plugin. JSON only, no node types, so the cockpit bundle can carry them.\n */\n\n/** The frame type the hub publishes and the web plugin claims. */\nexport const browseActivityChannelType = 'browse_activity';\n\nexport type BrowseIdentityState = 'active' | 'idle' | 'asleep' | 'crashed';\n\nexport interface BrowseTabWire {\n /** `<daemon port>.<page id>`: page ids are only unique within one daemon. */\n id: string;\n title: string;\n /** Origin plus path; the daemon strips query and fragment. */\n url: string;\n /** The tab Po is working in. */\n current: boolean;\n /** Epoch ms. */\n lastAccessedAt: number;\n}\n\nexport interface BrowseIdentityWire {\n /** Profile name, or `<daemon port>.<browser id>` for a temporary browser. */\n id: string;\n name: string;\n state: BrowseIdentityState;\n window: 'headed' | 'headless';\n /** False for a temporary browser, which has no profile to sleep, wake or reopen. */\n profile?: boolean;\n /** Epoch ms. */\n lastUsedAt: number;\n tabs: BrowseTabWire[];\n}\n\nexport interface BrowseActivityPayload {\n identities: BrowseIdentityWire[];\n}\n\n/** Session-scoped plugin service the live tab calls; see src/schemas/browseMethods.ts. */\nexport const browseMethodService = 'browse';\n\nexport interface BrowseFrameInput {\n tabId: string;\n /** Number of the frame the view already shows. */\n since?: number;\n}\n\nexport type BrowseFrameOutput =\n | { state: 'ok'; src: string; seq?: number }\n | { state: 'unchanged'; seq: number }\n | { state: 'closed' }\n | { state: 'timeout' }\n | { state: 'error' };\n\nexport interface BrowseSnapshotInput {\n tabId: string;\n /** Identity id; names the snapshot folder after sanitizing. */\n identity: string;\n /** Page host; names the snapshot file after sanitizing. */\n host: string;\n}\n\nexport type BrowseSnapshotOutput = { ok: true; path: string } | { ok: false; message: string };\n","import { definePoPluginMethod } from '@agimon-ai/po-core/pluginProtocol';\nimport { Type } from 'typebox';\n\nimport { browseMethodService } from '../types/webBrowseActivity';\n\nconst Address = { service: browseMethodService, scope: 'session', direction: 'client-to-server' } as const;\nconst TabId = Type.String({ minLength: 3, maxLength: 256 });\n\nconst FrameSeq = Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });\n\n/**\n * One frame of a tab this session owns, as a data URL. With `since`, a frame\n * that is still current answers `unchanged` instead of the image.\n */\nexport const browseFrameMethod = definePoPluginMethod({\n ...Address,\n method: 'frame',\n input: Type.Object({ tabId: TabId, since: Type.Optional(FrameSeq) }, { additionalProperties: false }),\n output: Type.Union([\n Type.Object({ state: Type.Literal('ok'), src: Type.String(), seq: Type.Optional(FrameSeq) }),\n Type.Object({ state: Type.Literal('unchanged'), seq: FrameSeq }),\n Type.Object({ state: Type.Literal('closed') }),\n Type.Object({ state: Type.Literal('timeout') }),\n Type.Object({ state: Type.Literal('error') }),\n ]),\n});\n\n/** Saves a PNG of a tab under the session's .tmp/po-browse and returns its cwd-relative path. */\nexport const browseSnapshotMethod = definePoPluginMethod({\n ...Address,\n method: 'snapshot',\n input: Type.Object(\n {\n tabId: TabId,\n identity: Type.String({ minLength: 1, maxLength: 256 }),\n host: Type.String({ maxLength: 256 }),\n },\n { additionalProperties: false },\n ),\n output: Type.Union([\n Type.Object({ ok: Type.Literal(true), path: Type.String() }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n ]),\n});\n\n/**\n * Closes tabs this session owns. Closing a browser sends all of its tabs, so a browser\n * shared with another session keeps that session's tabs, and its identity id, so the dock\n * stops showing it as asleep until Po uses it again. Answers how many tabs closed.\n */\nexport const browseCloseMethod = definePoPluginMethod({\n ...Address,\n method: 'close',\n input: Type.Object(\n {\n tabIds: Type.Array(TabId, { maxItems: 100 }),\n identityIds: Type.Optional(Type.Array(Type.String({ minLength: 1, maxLength: 256 }), { maxItems: 100 })),\n },\n { additionalProperties: false },\n ),\n output: Type.Object({ closed: Type.Integer({ minimum: 0 }) }),\n});\n\nconst ProfileName = Type.String({ minLength: 1, maxLength: 256 });\nconst Outcome = Type.Union([\n Type.Object({ ok: Type.Literal(true) }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n]);\n\n/** Saves a profile browser's logins and closes it, so the dock shows it asleep with its tabs. */\nexport const browseSleepMethod = definePoPluginMethod({\n ...Address,\n method: 'sleep',\n input: Type.Object({ profileName: ProfileName }, { additionalProperties: false }),\n output: Outcome,\n});\n\n/**\n * Opens a profile browser with or without a window. A live one reopens the tabs it held; an asleep\n * one reopens `urls`, the tabs the dock remembers for it.\n */\nexport const browseRelaunchMethod = definePoPluginMethod({\n ...Address,\n method: 'relaunch',\n input: Type.Object(\n {\n profileName: ProfileName,\n headless: Type.Boolean(),\n urls: Type.Array(Type.String({ pattern: '^https?://', maxLength: 2048 }), { maxItems: 20 }),\n },\n { additionalProperties: false },\n ),\n output: Outcome,\n});\n","import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nimport { browseActivityChannelType } from '../types/webBrowseActivity';\nimport { browseFrameMethod, browseSnapshotMethod } from './browseMethods';\n\nconst S = Type.String();\nconst N = Type.Number();\n\nconst Tab = Type.Object({ id: S, title: S, url: S, current: Type.Boolean(), lastAccessedAt: N });\nconst Identity = Type.Object({\n id: S,\n name: S,\n state: Type.Union([Type.Literal('active'), Type.Literal('idle'), Type.Literal('asleep'), Type.Literal('crashed')]),\n window: Type.Union([Type.Literal('headed'), Type.Literal('headless')]),\n profile: Type.Optional(Type.Boolean()),\n lastUsedAt: N,\n tabs: Type.Array(Tab),\n});\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: [\n ...[browseFrameMethod, browseSnapshotMethod].map((method) => ({\n id: `browse.${method.method}`,\n scope: 'session' as const,\n service: method.service,\n member: method.method,\n kind: 'method' as const,\n direction: 'client-to-server' as const,\n description: `Browser tab ${method.method} through the scoped plugin service.`,\n input: method.input,\n output: method.output,\n })),\n {\n id: 'browse.activity',\n scope: 'session',\n service: 'po.hub',\n member: browseActivityChannelType,\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Browser identities and tabs this session owns.',\n input: Type.Object({ identities: Type.Array(Identity) }),\n },\n ],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;;;;;;;AAMA,MAAa,4BAA4B;;;ACDzC,MAAM,UAAU;CAAE,SAAS;CAAqB,OAAO;CAAW,WAAW;AAAmB;AAChG,MAAM,QAAQA,QAAAA,KAAK,OAAO;CAAE,WAAW;CAAG,WAAW;AAAI,CAAC;AAE1D,MAAM,WAAWA,QAAAA,KAAK,QAAQ;CAAE,SAAS;CAAG,SAAS,OAAO;AAAiB,CAAC;;;;;AAM9E,MAAa,qBAAA,GAAoBC,kCAAAA,qBAAAA,CAAqB;CACpD,GAAG;CACH,QAAQ;CACR,OAAOD,QAAAA,KAAK,OAAO;EAAE,OAAO;EAAO,OAAOA,QAAAA,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
schemas?: Record<string, boolean | object> | undefined;
|
|
6
6
|
http: {
|
|
7
7
|
id: string;
|
|
8
|
-
scope: "
|
|
8
|
+
scope: "host" | "session" | "workspace";
|
|
9
9
|
basePath?: string | undefined;
|
|
10
10
|
path: string;
|
|
11
11
|
method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
|
|
@@ -33,7 +33,7 @@ export declare const apiContracts: {
|
|
|
33
33
|
}[];
|
|
34
34
|
sockets: {
|
|
35
35
|
id: string;
|
|
36
|
-
scope: "
|
|
36
|
+
scope: "host" | "session" | "workspace";
|
|
37
37
|
description: string;
|
|
38
38
|
availability?: string | undefined;
|
|
39
39
|
service: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";qBAoBa"}
|
package/dist/apiContracts.mjs
CHANGED
|
@@ -69,6 +69,45 @@ const browseSnapshotMethod = definePoPluginMethod({
|
|
|
69
69
|
message: Type.String()
|
|
70
70
|
})])
|
|
71
71
|
});
|
|
72
|
+
definePoPluginMethod({
|
|
73
|
+
...Address,
|
|
74
|
+
method: "close",
|
|
75
|
+
input: Type.Object({
|
|
76
|
+
tabIds: Type.Array(TabId, { maxItems: 100 }),
|
|
77
|
+
identityIds: Type.Optional(Type.Array(Type.String({
|
|
78
|
+
minLength: 1,
|
|
79
|
+
maxLength: 256
|
|
80
|
+
}), { maxItems: 100 }))
|
|
81
|
+
}, { additionalProperties: false }),
|
|
82
|
+
output: Type.Object({ closed: Type.Integer({ minimum: 0 }) })
|
|
83
|
+
});
|
|
84
|
+
const ProfileName = Type.String({
|
|
85
|
+
minLength: 1,
|
|
86
|
+
maxLength: 256
|
|
87
|
+
});
|
|
88
|
+
const Outcome = Type.Union([Type.Object({ ok: Type.Literal(true) }), Type.Object({
|
|
89
|
+
ok: Type.Literal(false),
|
|
90
|
+
message: Type.String()
|
|
91
|
+
})]);
|
|
92
|
+
definePoPluginMethod({
|
|
93
|
+
...Address,
|
|
94
|
+
method: "sleep",
|
|
95
|
+
input: Type.Object({ profileName: ProfileName }, { additionalProperties: false }),
|
|
96
|
+
output: Outcome
|
|
97
|
+
});
|
|
98
|
+
definePoPluginMethod({
|
|
99
|
+
...Address,
|
|
100
|
+
method: "relaunch",
|
|
101
|
+
input: Type.Object({
|
|
102
|
+
profileName: ProfileName,
|
|
103
|
+
headless: Type.Boolean(),
|
|
104
|
+
urls: Type.Array(Type.String({
|
|
105
|
+
pattern: "^https?://",
|
|
106
|
+
maxLength: 2048
|
|
107
|
+
}), { maxItems: 20 })
|
|
108
|
+
}, { additionalProperties: false }),
|
|
109
|
+
output: Outcome
|
|
110
|
+
});
|
|
72
111
|
//#endregion
|
|
73
112
|
//#region src/schemas/apiContracts.ts
|
|
74
113
|
const S = Type.String();
|
|
@@ -90,6 +129,7 @@ const Identity = Type.Object({
|
|
|
90
129
|
Type.Literal("crashed")
|
|
91
130
|
]),
|
|
92
131
|
window: Type.Union([Type.Literal("headed"), Type.Literal("headless")]),
|
|
132
|
+
profile: Type.Optional(Type.Boolean()),
|
|
93
133
|
lastUsedAt: N,
|
|
94
134
|
tabs: Type.Array(Tab)
|
|
95
135
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/types/webBrowseActivity.ts","../src/schemas/browseMethods.ts","../src/schemas/apiContracts.ts"],"sourcesContent":["/**\n * Wire types shared by the hub channel, the session methods and the web\n * plugin. JSON only, no node types, so the cockpit bundle can carry them.\n */\n\n/** The frame type the hub publishes and the web plugin claims. */\nexport const browseActivityChannelType = 'browse_activity';\n\nexport type BrowseIdentityState = 'active' | 'idle' | 'asleep' | 'crashed';\n\nexport interface BrowseTabWire {\n /** `<daemon port>.<page id>`: page ids are only unique within one daemon. */\n id: string;\n title: string;\n /** Origin plus path; the daemon strips query and fragment. */\n url: string;\n /** The tab Po is working in. */\n current: boolean;\n /** Epoch ms. */\n lastAccessedAt: number;\n}\n\nexport interface BrowseIdentityWire {\n /** Profile name, or `<daemon port>.<browser id>` for a temporary browser. */\n id: string;\n name: string;\n state: BrowseIdentityState;\n window: 'headed' | 'headless';\n /** Epoch ms. */\n lastUsedAt: number;\n tabs: BrowseTabWire[];\n}\n\nexport interface BrowseActivityPayload {\n identities: BrowseIdentityWire[];\n}\n\n/** Session-scoped plugin service the live tab calls; see src/schemas/browseMethods.ts. */\nexport const browseMethodService = 'browse';\n\nexport interface BrowseFrameInput {\n tabId: string;\n /** Number of the frame the view already shows. */\n since?: number;\n}\n\nexport type BrowseFrameOutput =\n | { state: 'ok'; src: string; seq?: number }\n | { state: 'unchanged'; seq: number }\n | { state: 'closed' }\n | { state: 'timeout' }\n | { state: 'error' };\n\nexport interface BrowseSnapshotInput {\n tabId: string;\n /** Identity id; names the snapshot folder after sanitizing. */\n identity: string;\n /** Page host; names the snapshot file after sanitizing. */\n host: string;\n}\n\nexport type BrowseSnapshotOutput = { ok: true; path: string } | { ok: false; message: string };\n","import { definePoPluginMethod } from '@agimon-ai/po-core/pluginProtocol';\nimport { Type } from 'typebox';\n\nimport { browseMethodService } from '../types/webBrowseActivity';\n\nconst Address = { service: browseMethodService, scope: 'session', direction: 'client-to-server' } as const;\nconst TabId = Type.String({ minLength: 3, maxLength: 256 });\n\nconst FrameSeq = Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });\n\n/**\n * One frame of a tab this session owns, as a data URL. With `since`, a frame\n * that is still current answers `unchanged` instead of the image.\n */\nexport const browseFrameMethod = definePoPluginMethod({\n ...Address,\n method: 'frame',\n input: Type.Object({ tabId: TabId, since: Type.Optional(FrameSeq) }, { additionalProperties: false }),\n output: Type.Union([\n Type.Object({ state: Type.Literal('ok'), src: Type.String(), seq: Type.Optional(FrameSeq) }),\n Type.Object({ state: Type.Literal('unchanged'), seq: FrameSeq }),\n Type.Object({ state: Type.Literal('closed') }),\n Type.Object({ state: Type.Literal('timeout') }),\n Type.Object({ state: Type.Literal('error') }),\n ]),\n});\n\n/** Saves a PNG of a tab under the session's .tmp/po-browse and returns its cwd-relative path. */\nexport const browseSnapshotMethod = definePoPluginMethod({\n ...Address,\n method: 'snapshot',\n input: Type.Object(\n {\n tabId: TabId,\n identity: Type.String({ minLength: 1, maxLength: 256 }),\n host: Type.String({ maxLength: 256 }),\n },\n { additionalProperties: false },\n ),\n output: Type.Union([\n Type.Object({ ok: Type.Literal(true), path: Type.String() }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n ]),\n});\n","import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nimport { browseActivityChannelType } from '../types/webBrowseActivity';\nimport { browseFrameMethod, browseSnapshotMethod } from './browseMethods';\n\nconst S = Type.String();\nconst N = Type.Number();\n\nconst Tab = Type.Object({ id: S, title: S, url: S, current: Type.Boolean(), lastAccessedAt: N });\nconst Identity = Type.Object({\n id: S,\n name: S,\n state: Type.Union([Type.Literal('active'), Type.Literal('idle'), Type.Literal('asleep'), Type.Literal('crashed')]),\n window: Type.Union([Type.Literal('headed'), Type.Literal('headless')]),\n lastUsedAt: N,\n tabs: Type.Array(Tab),\n});\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: [\n ...[browseFrameMethod, browseSnapshotMethod].map((method) => ({\n id: `browse.${method.method}`,\n scope: 'session' as const,\n service: method.service,\n member: method.method,\n kind: 'method' as const,\n direction: 'client-to-server' as const,\n description: `Browser tab ${method.method} through the scoped plugin service.`,\n input: method.input,\n output: method.output,\n })),\n {\n id: 'browse.activity',\n scope: 'session',\n service: 'po.hub',\n member: browseActivityChannelType,\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Browser identities and tabs this session owns.',\n input: Type.Object({ identities: Type.Array(Identity) }),\n },\n ],\n});\nexport default apiContracts;\n"],"m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G,SAAS,KAAK,OAAO;CAAE,CAAC,CACjE,CAAC;AACH,CAAC;;;ACrCD,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AAEtB,MAAM,MAAM,KAAK,OAAO;CAAE,IAAI;CAAG,OAAO;CAAG,KAAK;CAAG,SAAS,KAAK,QAAQ;CAAG,gBAAgB;AAAE,CAAC;AAC/F,MAAM,WAAW,KAAK,OAAO;CAC3B,IAAI;CACJ,MAAM;CACN,OAAO,KAAK,MAAM;EAAC,KAAK,QAAQ,QAAQ;EAAG,KAAK,QAAQ,MAAM;EAAG,KAAK,QAAQ,QAAQ;EAAG,KAAK,QAAQ,SAAS;CAAC,CAAC;CACjH,QAAQ,KAAK,MAAM,CAAC,KAAK,QAAQ,QAAQ,GAAG,KAAK,QAAQ,UAAU,CAAC,CAAC;CACrE,YAAY;CACZ,MAAM,KAAK,MAAM,GAAG;AACtB,CAAC;AAED,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAS,CAAC;CACV,SAAS,CACP,GAAG,CAAC,mBAAmB,oBAAoB,CAAC,CAAC,KAAK,YAAY;EAC5D,IAAI,UAAU,OAAO;EACrB,OAAO;EACP,SAAS,OAAO;EAChB,QAAQ,OAAO;EACf,MAAM;EACN,WAAW;EACX,aAAa,eAAe,OAAO,OAAO;EAC1C,OAAO,OAAO;EACd,QAAQ,OAAO;CACjB,EAAE,GACF;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO,KAAK,OAAO,EAAE,YAAY,KAAK,MAAM,QAAQ,EAAE,CAAC;CACzD,CACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/types/webBrowseActivity.ts","../src/schemas/browseMethods.ts","../src/schemas/apiContracts.ts"],"sourcesContent":["/**\n * Wire types shared by the hub channel, the session methods and the web\n * plugin. JSON only, no node types, so the cockpit bundle can carry them.\n */\n\n/** The frame type the hub publishes and the web plugin claims. */\nexport const browseActivityChannelType = 'browse_activity';\n\nexport type BrowseIdentityState = 'active' | 'idle' | 'asleep' | 'crashed';\n\nexport interface BrowseTabWire {\n /** `<daemon port>.<page id>`: page ids are only unique within one daemon. */\n id: string;\n title: string;\n /** Origin plus path; the daemon strips query and fragment. */\n url: string;\n /** The tab Po is working in. */\n current: boolean;\n /** Epoch ms. */\n lastAccessedAt: number;\n}\n\nexport interface BrowseIdentityWire {\n /** Profile name, or `<daemon port>.<browser id>` for a temporary browser. */\n id: string;\n name: string;\n state: BrowseIdentityState;\n window: 'headed' | 'headless';\n /** False for a temporary browser, which has no profile to sleep, wake or reopen. */\n profile?: boolean;\n /** Epoch ms. */\n lastUsedAt: number;\n tabs: BrowseTabWire[];\n}\n\nexport interface BrowseActivityPayload {\n identities: BrowseIdentityWire[];\n}\n\n/** Session-scoped plugin service the live tab calls; see src/schemas/browseMethods.ts. */\nexport const browseMethodService = 'browse';\n\nexport interface BrowseFrameInput {\n tabId: string;\n /** Number of the frame the view already shows. */\n since?: number;\n}\n\nexport type BrowseFrameOutput =\n | { state: 'ok'; src: string; seq?: number }\n | { state: 'unchanged'; seq: number }\n | { state: 'closed' }\n | { state: 'timeout' }\n | { state: 'error' };\n\nexport interface BrowseSnapshotInput {\n tabId: string;\n /** Identity id; names the snapshot folder after sanitizing. */\n identity: string;\n /** Page host; names the snapshot file after sanitizing. */\n host: string;\n}\n\nexport type BrowseSnapshotOutput = { ok: true; path: string } | { ok: false; message: string };\n","import { definePoPluginMethod } from '@agimon-ai/po-core/pluginProtocol';\nimport { Type } from 'typebox';\n\nimport { browseMethodService } from '../types/webBrowseActivity';\n\nconst Address = { service: browseMethodService, scope: 'session', direction: 'client-to-server' } as const;\nconst TabId = Type.String({ minLength: 3, maxLength: 256 });\n\nconst FrameSeq = Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });\n\n/**\n * One frame of a tab this session owns, as a data URL. With `since`, a frame\n * that is still current answers `unchanged` instead of the image.\n */\nexport const browseFrameMethod = definePoPluginMethod({\n ...Address,\n method: 'frame',\n input: Type.Object({ tabId: TabId, since: Type.Optional(FrameSeq) }, { additionalProperties: false }),\n output: Type.Union([\n Type.Object({ state: Type.Literal('ok'), src: Type.String(), seq: Type.Optional(FrameSeq) }),\n Type.Object({ state: Type.Literal('unchanged'), seq: FrameSeq }),\n Type.Object({ state: Type.Literal('closed') }),\n Type.Object({ state: Type.Literal('timeout') }),\n Type.Object({ state: Type.Literal('error') }),\n ]),\n});\n\n/** Saves a PNG of a tab under the session's .tmp/po-browse and returns its cwd-relative path. */\nexport const browseSnapshotMethod = definePoPluginMethod({\n ...Address,\n method: 'snapshot',\n input: Type.Object(\n {\n tabId: TabId,\n identity: Type.String({ minLength: 1, maxLength: 256 }),\n host: Type.String({ maxLength: 256 }),\n },\n { additionalProperties: false },\n ),\n output: Type.Union([\n Type.Object({ ok: Type.Literal(true), path: Type.String() }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n ]),\n});\n\n/**\n * Closes tabs this session owns. Closing a browser sends all of its tabs, so a browser\n * shared with another session keeps that session's tabs, and its identity id, so the dock\n * stops showing it as asleep until Po uses it again. Answers how many tabs closed.\n */\nexport const browseCloseMethod = definePoPluginMethod({\n ...Address,\n method: 'close',\n input: Type.Object(\n {\n tabIds: Type.Array(TabId, { maxItems: 100 }),\n identityIds: Type.Optional(Type.Array(Type.String({ minLength: 1, maxLength: 256 }), { maxItems: 100 })),\n },\n { additionalProperties: false },\n ),\n output: Type.Object({ closed: Type.Integer({ minimum: 0 }) }),\n});\n\nconst ProfileName = Type.String({ minLength: 1, maxLength: 256 });\nconst Outcome = Type.Union([\n Type.Object({ ok: Type.Literal(true) }),\n Type.Object({ ok: Type.Literal(false), message: Type.String() }),\n]);\n\n/** Saves a profile browser's logins and closes it, so the dock shows it asleep with its tabs. */\nexport const browseSleepMethod = definePoPluginMethod({\n ...Address,\n method: 'sleep',\n input: Type.Object({ profileName: ProfileName }, { additionalProperties: false }),\n output: Outcome,\n});\n\n/**\n * Opens a profile browser with or without a window. A live one reopens the tabs it held; an asleep\n * one reopens `urls`, the tabs the dock remembers for it.\n */\nexport const browseRelaunchMethod = definePoPluginMethod({\n ...Address,\n method: 'relaunch',\n input: Type.Object(\n {\n profileName: ProfileName,\n headless: Type.Boolean(),\n urls: Type.Array(Type.String({ pattern: '^https?://', maxLength: 2048 }), { maxItems: 20 }),\n },\n { additionalProperties: false },\n ),\n output: Outcome,\n});\n","import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nimport { browseActivityChannelType } from '../types/webBrowseActivity';\nimport { browseFrameMethod, browseSnapshotMethod } from './browseMethods';\n\nconst S = Type.String();\nconst N = Type.Number();\n\nconst Tab = Type.Object({ id: S, title: S, url: S, current: Type.Boolean(), lastAccessedAt: N });\nconst Identity = Type.Object({\n id: S,\n name: S,\n state: Type.Union([Type.Literal('active'), Type.Literal('idle'), Type.Literal('asleep'), Type.Literal('crashed')]),\n window: Type.Union([Type.Literal('headed'), Type.Literal('headless')]),\n profile: Type.Optional(Type.Boolean()),\n lastUsedAt: N,\n tabs: Type.Array(Tab),\n});\n\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n dynamic: [],\n sockets: [\n ...[browseFrameMethod, browseSnapshotMethod].map((method) => ({\n id: `browse.${method.method}`,\n scope: 'session' as const,\n service: method.service,\n member: method.method,\n kind: 'method' as const,\n direction: 'client-to-server' as const,\n description: `Browser tab ${method.method} through the scoped plugin service.`,\n input: method.input,\n output: method.output,\n })),\n {\n id: 'browse.activity',\n scope: 'session',\n service: 'po.hub',\n member: browseActivityChannelType,\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Browser identities and tabs this session owns.',\n input: Type.Object({ identities: Type.Array(Identity) }),\n },\n ],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;;;AAMA,MAAa,4BAA4B;;;ACDzC,MAAM,UAA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