@origintrail-official/dkg-adapter-prime-agent 10.0.13
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 +201 -0
- package/README.md +147 -0
- package/dist/PrimeAgentAdapterPlugin.d.ts +19 -0
- package/dist/PrimeAgentAdapterPlugin.d.ts.map +1 -0
- package/dist/PrimeAgentAdapterPlugin.js +35 -0
- package/dist/PrimeAgentAdapterPlugin.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/prime-agent-routes.d.ts +9 -0
- package/dist/prime-agent-routes.d.ts.map +1 -0
- package/dist/prime-agent-routes.js +25 -0
- package/dist/prime-agent-routes.js.map +1 -0
- package/dist/session-registry.d.ts +56 -0
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/session-registry.js +206 -0
- package/dist/session-registry.js.map +1 -0
- package/dist/setup.d.ts +89 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +556 -0
- package/dist/setup.js.map +1 -0
- package/dist/types.d.ts +277 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +14 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +9 -0
- package/dist/version.js.map +1 -0
- package/extension/dist/extension.js +1032 -0
- package/extension/dist/extension.js.map +1 -0
- package/extension/src/extension.ts +1190 -0
- package/extension/tsconfig.json +13 -0
- package/package.json +47 -0
- package/setup-entry.mjs +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2018 OriginTrail
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# `@origintrail-official/dkg-adapter-prime-agent`
|
|
2
|
+
|
|
3
|
+
Collocates a **Prime Intellect Prime Agent** with a DKG V10 node, the way
|
|
4
|
+
`adapter-hermes` collocates a Hermes agent.
|
|
5
|
+
|
|
6
|
+
**Status: Stage 1 — transport.** The bridge, discovery, setup lifecycle and
|
|
7
|
+
daemon plumbing are implemented and tested. Memory election hooks, the Python
|
|
8
|
+
kernel skill and the Node UI panel are staged (see
|
|
9
|
+
`agent-docs/adapters/prime-agent/IMPLEMENTATION-PLAN.md`).
|
|
10
|
+
|
|
11
|
+
Design: [`agent-docs/adapters/prime-agent/DESIGN.md`](../../agent-docs/adapters/prime-agent/DESIGN.md) ·
|
|
12
|
+
Transport decision: [`.ai/adr/0007`](../../.ai/adr/0007-prime-agent-adapter-transport.md) ·
|
|
13
|
+
Risks: [`RISKS.md`](../../agent-docs/adapters/prime-agent/RISKS.md)
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
|
|
17
|
+
Prime Agent has **no HTTP server** and its daemon socket protocol disclaims
|
|
18
|
+
itself as *"not the final remote gateway protocol"*. What it does have is
|
|
19
|
+
extensions: TypeScript modules `jiti`-imported **into the process that owns a
|
|
20
|
+
running session**.
|
|
21
|
+
|
|
22
|
+
So the adapter ships an extension that hosts a small loopback HTTP bridge
|
|
23
|
+
speaking the contract the DKG daemon already speaks for Hermes:
|
|
24
|
+
|
|
25
|
+
| Route | Purpose |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `GET /health` | `{ ok: true, sessionId, pid }` — `ok === true` is required by the daemon's probe |
|
|
28
|
+
| `POST /send` | injects via `pi.sendUserMessage`, returns `{ text, correlationId, sessionId }` |
|
|
29
|
+
| `POST /stream` | SSE, `data: <json>\n\n` frames of `delta` then `final` |
|
|
30
|
+
|
|
31
|
+
**`final` is terminal, and it is a contract.** The turn ends on that frame, not
|
|
32
|
+
on socket EOF — the bridge may keep its connection open afterwards, and it does.
|
|
33
|
+
Both the daemon proxy and the Node UI reader close on the frame; a client that
|
|
34
|
+
waits for EOF will spin forever over an answer it has already rendered. The
|
|
35
|
+
daemon also declares `Content-Type: text/event-stream; charset=utf-8` before the
|
|
36
|
+
first byte, without which the browser misclassifies the body and fails with
|
|
37
|
+
"The string did not match the expected pattern".
|
|
38
|
+
|
|
39
|
+
All three require `x-dkg-bridge-token` and bind `127.0.0.1` only.
|
|
40
|
+
|
|
41
|
+
Because the extension lives inside the session, a message from the Node UI lands
|
|
42
|
+
in **the session the user is actually using** — that is the whole point, and it
|
|
43
|
+
is what a spawned `--mode rpc` subprocess cannot do.
|
|
44
|
+
|
|
45
|
+
## Per-session bridges
|
|
46
|
+
|
|
47
|
+
Extensions load **per session**, and one worker hosts many concurrent sessions,
|
|
48
|
+
so there is no single well-known endpoint. Each session publishes a descriptor:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
~/.prime/agent/.dkg-adapter-prime-agent/sessions/<sessionId>.json
|
|
52
|
+
{ "sessionId": "...", "bridgeUrl": "http://127.0.0.1:54123", "pid": 4242,
|
|
53
|
+
"startedAt": "...", "lastActiveAt": "..." }
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
written on `session_start` and removed on `session_shutdown`. Dead-pid
|
|
57
|
+
descriptors are pruned twice: on every read by the daemon, and by each bridge
|
|
58
|
+
at its own `session_start` — so a crashed worker converges without waiting for
|
|
59
|
+
a daemon read.
|
|
60
|
+
|
|
61
|
+
**Several live sessions is a normal, honest state**, not a cleanup failure:
|
|
62
|
+
sessions belong to Prime Agent's daemon and are resumed across terminal
|
|
63
|
+
restarts, so a restart legitimately leaves the resumed session alive next to a
|
|
64
|
+
fresh one. Routing is therefore an **election**, not a uniqueness assumption:
|
|
65
|
+
|
|
66
|
+
- `lastActiveAt` is re-stamped **per turn** (`agent_start` fires for
|
|
67
|
+
locally-typed and bridge-injected turns alike);
|
|
68
|
+
- an unaddressed message routes to the **most recently active** session —
|
|
69
|
+
`lastActiveAt` falling back to `startedAt`, tiebroken by `startedAt` then
|
|
70
|
+
`sessionId` — so the operator's next turn settles which session wins;
|
|
71
|
+
- an explicit `sessionId` always overrides the election, and a miss is an
|
|
72
|
+
error, never a fallback.
|
|
73
|
+
|
|
74
|
+
Two details that are not incidental:
|
|
75
|
+
|
|
76
|
+
- **Ephemeral ports (`listen(0)`) are mandatory.** On `/reload`, `/new`,
|
|
77
|
+
`/fork` and `/resume` the process survives and the extension is re-imported
|
|
78
|
+
with `moduleCache: false`, so the successor has no reference to the old
|
|
79
|
+
server. Nothing in the host closes extension-owned sockets, so a fixed port
|
|
80
|
+
would be held by an orphan until process exit.
|
|
81
|
+
- **`/health` echoes its `sessionId`**, so the daemon can detect a descriptor
|
|
82
|
+
pointing at a port the OS has since recycled to another process.
|
|
83
|
+
|
|
84
|
+
## Files it owns
|
|
85
|
+
|
|
86
|
+
| Path | Owner | Note |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `~/.prime/agent/settings.json` | **Prime Agent** | we add exactly one entry to `extensions` |
|
|
89
|
+
| `~/.prime/agent/settings.json.bak.<unix-ms>` | adapter | verbatim pre-change backup |
|
|
90
|
+
| `~/.prime/agent/.dkg-adapter-prime-agent/setup-state.json` | adapter | state + `priorSettings` snapshot |
|
|
91
|
+
| `~/.prime/agent/.dkg-adapter-prime-agent/dkg.json` | adapter | daemon URL, policy, and bridge token; mode `0600` |
|
|
92
|
+
| `~/.prime/agent/.dkg-adapter-prime-agent/sessions/` | adapter | per-session bridge discovery |
|
|
93
|
+
|
|
94
|
+
### Reversibility
|
|
95
|
+
|
|
96
|
+
The write order is the contract, copied from `adapter-hermes` because it is the
|
|
97
|
+
part that has to survive a SIGINT:
|
|
98
|
+
|
|
99
|
+
1. `setup-state.json` with `priorSettings` — **before** any destructive write
|
|
100
|
+
2. `settings.json.bak.<unix-ms>` — verbatim original bytes
|
|
101
|
+
3. `settings.json` rewritten with our extension path
|
|
102
|
+
|
|
103
|
+
`priorSettings` is **first-wins**: a re-run never overwrites the original truth.
|
|
104
|
+
Restore is **surgical** — it removes exactly our entry, because unlike Hermes'
|
|
105
|
+
scalar `memory.provider` this is an array the user may legitimately have edited;
|
|
106
|
+
wholesale replacement would silently revert their work. Backup-rename is the
|
|
107
|
+
fallback, and either path verifies the entry is really gone before reporting
|
|
108
|
+
success.
|
|
109
|
+
|
|
110
|
+
## Guards
|
|
111
|
+
|
|
112
|
+
`allow_direct_publish` and `allow_context_graph_admin_tools` default to
|
|
113
|
+
**false**, and `import_roots` defaults to empty. This is deliberately at least
|
|
114
|
+
as strict as Hermes: Prime Agent executes model-authored Python in a persistent
|
|
115
|
+
kernel with the user's own permissions and is explicitly **not a sandbox**, so a
|
|
116
|
+
publish path must be opened by an operator, never inferred.
|
|
117
|
+
|
|
118
|
+
The bridge verifies `x-dkg-bridge-token` with a **timing-safe** comparison, and
|
|
119
|
+
returns `503` (not `401`) when no token has been provisioned at all — an
|
|
120
|
+
unauthenticated bridge would let anything on loopback drive the agent.
|
|
121
|
+
Setup sources that token from `DKG_API_TOKEN`, `DKG_AUTH_TOKEN`, or the selected
|
|
122
|
+
DKG home's `auth.token`, then writes the private adapter config consumed by the
|
|
123
|
+
extension.
|
|
124
|
+
|
|
125
|
+
## Known limits (Stage 1)
|
|
126
|
+
|
|
127
|
+
- Memory election hooks (`before_agent_start`, `turn_end`) are **not yet wired**
|
|
128
|
+
and the integration does not advertise primary-memory capability yet.
|
|
129
|
+
- No Python kernel skill yet (Stage 3), so there is no model-facing `dkg` API.
|
|
130
|
+
- The Node UI panel is live (Stage 5) but has **no session picker**: the node
|
|
131
|
+
routes to the most recently active live session unless a `sessionId` is
|
|
132
|
+
supplied.
|
|
133
|
+
- One turn at a time per session: a concurrent `/send` gets `429`.
|
|
134
|
+
- A UI message is sent as `deliverAs: "followUp"`. If a local Prime Agent turn
|
|
135
|
+
is already observed, the bridge returns `429`; the follow-up choice covers the
|
|
136
|
+
remaining race without interrupting local work.
|
|
137
|
+
|
|
138
|
+
## Tests
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
pnpm --filter @origintrail-official/dkg-adapter-prime-agent test
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`test/bridge-contract.test.ts` drives the bridge with a stub `pi` and **no Prime
|
|
145
|
+
Agent running**, so it asserts our half of the wire independently of upstream —
|
|
146
|
+
including the 401/503 auth split, the `ok === true` health shape, SSE frame
|
|
147
|
+
format, and the 429 concurrency guard.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daemon plugin registration.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors HermesAdapterPlugin deliberately: the adapter package registers a
|
|
5
|
+
* package-local status route and a shutdown hook, and nothing else. The chat
|
|
6
|
+
* channel routes (`/api/prime-agent-channel/*`) are DAEMON-owned — the adapter
|
|
7
|
+
* does not serve them, exactly as adapter-hermes does not serve
|
|
8
|
+
* `/api/hermes-channel/*`. Keeping that boundary means the adapter never has to
|
|
9
|
+
* know about node config, auth tokens, or the chat memory manager.
|
|
10
|
+
*/
|
|
11
|
+
import type { DaemonPluginApi, PrimeAgentAdapterConfig } from './types.js';
|
|
12
|
+
export declare class PrimeAgentAdapterPlugin {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(config?: PrimeAgentAdapterConfig);
|
|
15
|
+
get config(): PrimeAgentAdapterConfig;
|
|
16
|
+
/** Idempotent: the daemon may load the entry more than once per process. */
|
|
17
|
+
register(api: DaemonPluginApi): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=PrimeAgentAdapterPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimeAgentAdapterPlugin.d.ts","sourceRoot":"","sources":["../src/PrimeAgentAdapterPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE3E,qBAAa,uBAAuB;;gBAItB,MAAM,GAAE,uBAA4B;IAIhD,IAAI,MAAM,IAAI,uBAAuB,CAEpC;IAED,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;CAmBrC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daemon plugin registration.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors HermesAdapterPlugin deliberately: the adapter package registers a
|
|
5
|
+
* package-local status route and a shutdown hook, and nothing else. The chat
|
|
6
|
+
* channel routes (`/api/prime-agent-channel/*`) are DAEMON-owned — the adapter
|
|
7
|
+
* does not serve them, exactly as adapter-hermes does not serve
|
|
8
|
+
* `/api/hermes-channel/*`. Keeping that boundary means the adapter never has to
|
|
9
|
+
* know about node config, auth tokens, or the chat memory manager.
|
|
10
|
+
*/
|
|
11
|
+
import { registerPrimeAgentRoutes } from './prime-agent-routes.js';
|
|
12
|
+
export class PrimeAgentAdapterPlugin {
|
|
13
|
+
#config;
|
|
14
|
+
#registered = false;
|
|
15
|
+
constructor(config = {}) {
|
|
16
|
+
this.#config = config;
|
|
17
|
+
}
|
|
18
|
+
get config() {
|
|
19
|
+
return this.#config;
|
|
20
|
+
}
|
|
21
|
+
/** Idempotent: the daemon may load the entry more than once per process. */
|
|
22
|
+
register(api) {
|
|
23
|
+
if (this.#registered) {
|
|
24
|
+
api.logger?.debug?.('[dkg-adapter-prime-agent] already registered; skipping');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.#registered = true;
|
|
28
|
+
registerPrimeAgentRoutes(api);
|
|
29
|
+
api.registerHook('session_end', () => {
|
|
30
|
+
api.logger?.debug?.('[dkg-adapter-prime-agent] session_end');
|
|
31
|
+
}, { name: 'prime-agent-adapter-stop' });
|
|
32
|
+
api.logger?.info?.('[dkg-adapter-prime-agent] registered');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=PrimeAgentAdapterPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimeAgentAdapterPlugin.js","sourceRoot":"","sources":["../src/PrimeAgentAdapterPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,OAAO,uBAAuB;IACzB,OAAO,CAA0B;IAC1C,WAAW,GAAG,KAAK,CAAC;IAEpB,YAAY,SAAkC,EAAE;QAC9C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,4EAA4E;IAC5E,QAAQ,CAAC,GAAoB;QAC3B,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,wDAAwD,CAAC,CAAC;YAC9E,OAAO;QACT,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAE9B,GAAG,CAAC,YAAY,CACd,aAAa,EACb,GAAG,EAAE;YACH,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,uCAAuC,CAAC,CAAC;QAC/D,CAAC,EACD,EAAE,IAAI,EAAE,0BAA0B,EAAE,CACrC,CAAC;QAEF,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,sCAAsC,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public surface of the Prime Agent adapter.
|
|
3
|
+
*
|
|
4
|
+
* Value exports are the daemon plugin plus every setup verb the CLI and the
|
|
5
|
+
* Node UI call. Type exports are the contract surface daemon-side code needs.
|
|
6
|
+
*/
|
|
7
|
+
export { PrimeAgentAdapterPlugin } from './PrimeAgentAdapterPlugin.js';
|
|
8
|
+
export { registerPrimeAgentRoutes } from './prime-agent-routes.js';
|
|
9
|
+
export { PRIME_AGENT_ADAPTER_VERSION } from './version.js';
|
|
10
|
+
export { ADAPTER_CONFIG_FILENAME, ADAPTER_STATE_DIRNAME, DEFAULT_CONTEXT_GRAPH, DEFAULT_DAEMON_URL, DEFAULT_MEMORY_ASSERTION, DEFAULT_PUBLISH_GUARD, MANAGED_BY, SETUP_STATE_FILENAME, defaultExtensionPath, disconnect, disconnectPrimeAgentProfile, doctor, loadDkgAuthToken, planPrimeAgentSetup, readSettings, readSetupState, reconnect, resolveAgentDir, resolvePrimeAgentProfile, restorePrimeAgentProfile, runDisconnect, runDoctor, runPrimeAgentSetup, runReconnect, runSetup, runStatus, runUninstall, runVerify, setup, setupPrimeAgentProfile, status, uninstall, verify, verifyPrimeAgentProfile, } from './setup.js';
|
|
11
|
+
export { isLoopbackBridgeUrl, isProcessAlive, isSafeSessionId, readLiveSessions, removeSessionDescriptor, selectSession, sessionDescriptorPath, writeSessionDescriptor, } from './session-registry.js';
|
|
12
|
+
export type { PrimeAgentSetupOptions } from './setup.js';
|
|
13
|
+
export type { DaemonPluginApi, PrimeAgentAdapterConfig, PrimeAgentChannelHealthResponse, PrimeAgentChannelMessage, PrimeAgentChannelSendPayload, PrimeAgentChannelSendResponse, PrimeAgentChannelStreamEvent, PrimeAgentLocalAgentIntegrationPayload, PrimeAgentMemoryMode, PrimeAgentPriorSettings, PrimeAgentProfileMetadata, PrimeAgentPublishGuardPolicy, PrimeAgentRestoreRequest, PrimeAgentRestoreResult, PrimeAgentRuntimeStatus, PrimeAgentSessionDescriptor, PrimeAgentSetupPlan, PrimeAgentSetupPlanAction, PrimeAgentSetupRequest, PrimeAgentSetupResult, PrimeAgentSetupState, PrimeAgentVerifyResult, } from './types.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,2BAA2B,EAC3B,MAAM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,EACL,sBAAsB,EACtB,MAAM,EACN,SAAS,EACT,MAAM,EACN,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,sCAAsC,EACtC,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public surface of the Prime Agent adapter.
|
|
3
|
+
*
|
|
4
|
+
* Value exports are the daemon plugin plus every setup verb the CLI and the
|
|
5
|
+
* Node UI call. Type exports are the contract surface daemon-side code needs.
|
|
6
|
+
*/
|
|
7
|
+
export { PrimeAgentAdapterPlugin } from './PrimeAgentAdapterPlugin.js';
|
|
8
|
+
export { registerPrimeAgentRoutes } from './prime-agent-routes.js';
|
|
9
|
+
export { PRIME_AGENT_ADAPTER_VERSION } from './version.js';
|
|
10
|
+
export { ADAPTER_CONFIG_FILENAME, ADAPTER_STATE_DIRNAME, DEFAULT_CONTEXT_GRAPH, DEFAULT_DAEMON_URL, DEFAULT_MEMORY_ASSERTION, DEFAULT_PUBLISH_GUARD, MANAGED_BY, SETUP_STATE_FILENAME, defaultExtensionPath, disconnect, disconnectPrimeAgentProfile, doctor, loadDkgAuthToken, planPrimeAgentSetup, readSettings, readSetupState, reconnect, resolveAgentDir, resolvePrimeAgentProfile, restorePrimeAgentProfile, runDisconnect, runDoctor, runPrimeAgentSetup, runReconnect, runSetup, runStatus, runUninstall, runVerify, setup, setupPrimeAgentProfile, status, uninstall, verify, verifyPrimeAgentProfile, } from './setup.js';
|
|
11
|
+
export { isLoopbackBridgeUrl, isProcessAlive, isSafeSessionId, readLiveSessions, removeSessionDescriptor, selectSession, sessionDescriptorPath, writeSessionDescriptor, } from './session-registry.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,2BAA2B,EAC3B,MAAM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,EACL,sBAAsB,EACtB,MAAM,EACN,SAAS,EACT,MAAM,EACN,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package-local routes. Exactly one, matching adapter-hermes' 18-line
|
|
3
|
+
* `hermes-routes.ts`: a status probe so an operator can confirm the adapter
|
|
4
|
+
* loaded inside the daemon. Everything user-facing lives on daemon-owned
|
|
5
|
+
* routes.
|
|
6
|
+
*/
|
|
7
|
+
import type { DaemonPluginApi } from './types.js';
|
|
8
|
+
export declare function registerPrimeAgentRoutes(api: DaemonPluginApi): void;
|
|
9
|
+
//# sourceMappingURL=prime-agent-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prime-agent-routes.d.ts","sourceRoot":"","sources":["../src/prime-agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CAgBnE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package-local routes. Exactly one, matching adapter-hermes' 18-line
|
|
3
|
+
* `hermes-routes.ts`: a status probe so an operator can confirm the adapter
|
|
4
|
+
* loaded inside the daemon. Everything user-facing lives on daemon-owned
|
|
5
|
+
* routes.
|
|
6
|
+
*/
|
|
7
|
+
import { PRIME_AGENT_ADAPTER_VERSION } from './version.js';
|
|
8
|
+
export function registerPrimeAgentRoutes(api) {
|
|
9
|
+
api.registerHttpRoute({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
path: '/api/prime-agent/status',
|
|
12
|
+
handler: (_req, res) => {
|
|
13
|
+
const response = res;
|
|
14
|
+
const body = JSON.stringify({
|
|
15
|
+
adapter: 'prime-agent',
|
|
16
|
+
framework: 'prime-intellect-prime-agent',
|
|
17
|
+
status: 'connected',
|
|
18
|
+
version: PRIME_AGENT_ADAPTER_VERSION,
|
|
19
|
+
});
|
|
20
|
+
response.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
|
21
|
+
response.end(body);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=prime-agent-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prime-agent-routes.js","sourceRoot":"","sources":["../src/prime-agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,UAAU,wBAAwB,CAAC,GAAoB;IAC3D,GAAG,CAAC,iBAAiB,CAAC;QACpB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,CAAC,IAAa,EAAE,GAAY,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,GAA8F,CAAC;YAChH,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;gBAC1B,OAAO,EAAE,aAAa;gBACtB,SAAS,EAAE,6BAA6B;gBACxC,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,2BAA2B;aACrC,CAAC,CAAC;YACH,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,iCAAiC,EAAE,CAAC,CAAC;YAC/E,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge discovery.
|
|
3
|
+
*
|
|
4
|
+
* Prime Agent loads extensions per session, into the worker process that owns
|
|
5
|
+
* that session, so each live session binds its own loopback port. There is no
|
|
6
|
+
* single well-known endpoint to point the daemon at. The extension therefore
|
|
7
|
+
* publishes a descriptor file per session and removes it on shutdown; the
|
|
8
|
+
* daemon reads the directory and picks a live bridge.
|
|
9
|
+
*
|
|
10
|
+
* The staleness problem is real: a crashed worker never removes its file, and
|
|
11
|
+
* an OS may later hand the same port to an unrelated process. Two defences:
|
|
12
|
+
* 1. `pid` is recorded and checked with signal 0 before a descriptor is used;
|
|
13
|
+
* 2. `/health` echoes its `sessionId`, so the daemon can detect a descriptor
|
|
14
|
+
* that points at the wrong process even when the pid happens to be alive.
|
|
15
|
+
*/
|
|
16
|
+
import type { PrimeAgentSessionDescriptor } from './types.js';
|
|
17
|
+
export declare function isSafeSessionId(sessionId: string): boolean;
|
|
18
|
+
export declare function sessionDescriptorPath(sessionsDir: string, sessionId: string): string;
|
|
19
|
+
/** Called by the extension when its bridge is listening. */
|
|
20
|
+
export declare function writeSessionDescriptor(sessionsDir: string, descriptor: PrimeAgentSessionDescriptor): string;
|
|
21
|
+
/** Called by the extension on session shutdown. Never throws. */
|
|
22
|
+
export declare function removeSessionDescriptor(sessionsDir: string, sessionId: string): void;
|
|
23
|
+
export declare function isProcessAlive(pid: number): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Loopback-only, mirroring the daemon's own rule for Hermes bridge targets. A
|
|
26
|
+
* descriptor is data written by another process; treat it as untrusted input.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isLoopbackBridgeUrl(value: string | undefined): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Every descriptor currently on disk whose owning process is still alive.
|
|
31
|
+
* Stale files are pruned as a side effect so the directory cannot grow
|
|
32
|
+
* unbounded across crashes.
|
|
33
|
+
*
|
|
34
|
+
* Ordered most recently ACTIVE first, not most recently started: Prime Agent's
|
|
35
|
+
* daemon resumes sessions across terminal restarts, so a resumed session's
|
|
36
|
+
* descriptor can be newer than the fresh one the operator is actually using.
|
|
37
|
+
* Routing follows the session whose `lastActiveAt` moved last — that stamp is
|
|
38
|
+
* written per turn, so the operator's next turn settles the election.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readLiveSessions(sessionsDir: string, opts?: {
|
|
41
|
+
prune?: boolean;
|
|
42
|
+
}): PrimeAgentSessionDescriptor[];
|
|
43
|
+
/**
|
|
44
|
+
* Resolve which session a request should go to.
|
|
45
|
+
* - explicit id wins, and a miss is an error rather than a silent fallback;
|
|
46
|
+
* - exactly one live session is unambiguous;
|
|
47
|
+
* - several live sessions with no id selected is ambiguous by construction, so
|
|
48
|
+
* return the most recently active one but report it, letting the caller
|
|
49
|
+
* surface a choice.
|
|
50
|
+
*/
|
|
51
|
+
export declare function selectSession(sessions: PrimeAgentSessionDescriptor[], requestedSessionId?: string): {
|
|
52
|
+
session?: PrimeAgentSessionDescriptor;
|
|
53
|
+
ambiguous: boolean;
|
|
54
|
+
error?: string;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=session-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-registry.d.ts","sourceRoot":"","sources":["../src/session-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAU9D,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKpF;AAED,4DAA4D;AAC5D,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,2BAA2B,GACtC,MAAM,CAmBR;AAED,iEAAiE;AACjE,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAMpF;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUnD;AAkCD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CActE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7B,2BAA2B,EAAE,CA2C/B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,2BAA2B,EAAE,EACvC,kBAAkB,CAAC,EAAE,MAAM,GAC1B;IAAE,OAAO,CAAC,EAAE,2BAA2B,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAY/E"}
|