@aeolus-fleet/common 0.17.3 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/fleet/index.d.ts +17 -8
- package/dist/fleet/index.js +12 -5
- package/dist/fleet/index.js.map +1 -1
- package/dist/fleet/mcp-url.d.ts +7 -0
- package/dist/fleet/mcp-url.js +10 -0
- package/dist/fleet/mcp-url.js.map +1 -0
- package/dist/schemas/console.d.ts +2 -1
- package/dist/schemas/crew-request.d.ts +152 -0
- package/dist/schemas/crew-request.js +102 -0
- package/dist/schemas/crew-request.js.map +1 -0
- package/dist/schemas/fleet.d.ts +59 -4
- package/dist/schemas/fleet.js +9 -11
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/follow.d.ts +5 -0
- package/dist/schemas/history.d.ts +37 -3
- package/dist/schemas/history.js +6 -0
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/report.d.ts +77 -1
- package/dist/schemas/report.js +49 -2
- package/dist/schemas/report.js.map +1 -1
- package/dist/trierarch/configuration.js +1 -1
- package/dist/trierarch/configuration.js.map +1 -1
- package/dist/trierarch/crew-settings.d.ts +36 -0
- package/dist/trierarch/crew-settings.js +36 -0
- package/dist/trierarch/crew-settings.js.map +1 -0
- package/dist/trierarch/index.d.ts +2 -1
- package/dist/trierarch/index.js +2 -1
- package/dist/trierarch/index.js.map +1 -1
- package/dist/trierarch/report-details.d.ts +32 -0
- package/dist/trierarch/report-details.js +30 -0
- package/dist/trierarch/report-details.js.map +1 -0
- package/package.json +4 -2
- package/dist/trierarch/protocol.d.ts +0 -130
- package/dist/trierarch/protocol.js +0 -109
- package/dist/trierarch/protocol.js.map +0 -1
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 [yyyy] [name of copyright owner]
|
|
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/dist/fleet/index.d.ts
CHANGED
|
@@ -2,28 +2,31 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* The fleet's shared vocabulary (docs/blueprint.md, "Ubiquitous language"):
|
|
4
4
|
* scopes, ship kinds, ship statuses, lease locations, selector kinds, delivery
|
|
5
|
-
* states and event types.
|
|
5
|
+
* states and event types. Core and console use the same words.
|
|
6
6
|
*/
|
|
7
7
|
/** A permission of a ship, stored on the server with the ship and checked before every call. */
|
|
8
|
-
export declare const SCOPES: readonly ["messages:send", "messages:receive", "fleet:read", "fleet:manage", "
|
|
8
|
+
export declare const SCOPES: readonly ["messages:send", "messages:receive", "fleet:read", "fleet:manage", "crew:assign", "crew:run"];
|
|
9
9
|
export declare const scopeSchema: z.ZodEnum<{
|
|
10
10
|
"messages:send": "messages:send";
|
|
11
11
|
"messages:receive": "messages:receive";
|
|
12
12
|
"fleet:read": "fleet:read";
|
|
13
13
|
"fleet:manage": "fleet:manage";
|
|
14
|
-
"
|
|
14
|
+
"crew:assign": "crew:assign";
|
|
15
|
+
"crew:run": "crew:run";
|
|
15
16
|
}>;
|
|
16
17
|
export type Scope = z.infer<typeof scopeSchema>;
|
|
17
18
|
/**
|
|
18
19
|
* The scopes commissioning may add to an agent ship, beside sending and
|
|
19
|
-
* receiving, which every agent ship has (ADR 0002). `
|
|
20
|
-
*
|
|
20
|
+
* receiving, which every agent ship has (ADR 0002). `crew:assign` writes crew
|
|
21
|
+
* request assignments; `crew:run` crews the ships whose requests are assigned
|
|
22
|
+
* to its ship (decision 0029).
|
|
21
23
|
*/
|
|
22
|
-
export declare const FLEET_SCOPES: readonly ["fleet:read", "fleet:manage", "
|
|
24
|
+
export declare const FLEET_SCOPES: readonly ["fleet:read", "fleet:manage", "crew:assign", "crew:run"];
|
|
23
25
|
export declare const fleetScopeSchema: z.ZodEnum<{
|
|
24
26
|
"fleet:read": "fleet:read";
|
|
25
27
|
"fleet:manage": "fleet:manage";
|
|
26
|
-
"
|
|
28
|
+
"crew:assign": "crew:assign";
|
|
29
|
+
"crew:run": "crew:run";
|
|
27
30
|
}>;
|
|
28
31
|
export type FleetScope = z.infer<typeof fleetScopeSchema>;
|
|
29
32
|
/** `argo` is the one ship of kind `operator` in a fleet; every other ship is an `agent`. */
|
|
@@ -77,7 +80,7 @@ export declare const deliveryStateSchema: z.ZodEnum<{
|
|
|
77
80
|
}>;
|
|
78
81
|
export type DeliveryState = z.infer<typeof deliveryStateSchema>;
|
|
79
82
|
/** The event types written so far. Each later slice adds the ones it writes. */
|
|
80
|
-
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged", "ViewerSessionStarted"];
|
|
83
|
+
export declare const EVENT_TYPES: readonly ["FleetInitialised", "ShipCommissioned", "ShipClaimed", "LeaseRevoked", "CredentialRevoked", "StartingPromptIssued", "OperatorPasswordReset", "MessageAccepted", "DeliveryClaimed", "DeliveryAcknowledged", "DeliveryUndeliverable", "DeliveryReturned", "ShipRetired", "DeliveryAbandoned", "DeliveryDismissed", "ShipRenamed", "ShipReported", "SignInTicketIssued", "FleetLimitsChanged", "ViewerSessionStarted", "CrewRequested", "CrewRequestRemoved", "CrewAssigned", "CrewStatusChanged", "CrewRequestExplained"];
|
|
81
84
|
export declare const eventTypeSchema: z.ZodEnum<{
|
|
82
85
|
FleetInitialised: "FleetInitialised";
|
|
83
86
|
ShipCommissioned: "ShipCommissioned";
|
|
@@ -99,5 +102,11 @@ export declare const eventTypeSchema: z.ZodEnum<{
|
|
|
99
102
|
SignInTicketIssued: "SignInTicketIssued";
|
|
100
103
|
FleetLimitsChanged: "FleetLimitsChanged";
|
|
101
104
|
ViewerSessionStarted: "ViewerSessionStarted";
|
|
105
|
+
CrewRequested: "CrewRequested";
|
|
106
|
+
CrewRequestRemoved: "CrewRequestRemoved";
|
|
107
|
+
CrewAssigned: "CrewAssigned";
|
|
108
|
+
CrewStatusChanged: "CrewStatusChanged";
|
|
109
|
+
CrewRequestExplained: "CrewRequestExplained";
|
|
102
110
|
}>;
|
|
103
111
|
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
112
|
+
export * from './mcp-url.js';
|
package/dist/fleet/index.js
CHANGED
|
@@ -2,17 +2,18 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* The fleet's shared vocabulary (docs/blueprint.md, "Ubiquitous language"):
|
|
4
4
|
* scopes, ship kinds, ship statuses, lease locations, selector kinds, delivery
|
|
5
|
-
* states and event types.
|
|
5
|
+
* states and event types. Core and console use the same words.
|
|
6
6
|
*/
|
|
7
7
|
/** A permission of a ship, stored on the server with the ship and checked before every call. */
|
|
8
|
-
export const SCOPES = ['messages:send', 'messages:receive', 'fleet:read', 'fleet:manage', '
|
|
8
|
+
export const SCOPES = ['messages:send', 'messages:receive', 'fleet:read', 'fleet:manage', 'crew:assign', 'crew:run'];
|
|
9
9
|
export const scopeSchema = z.enum(SCOPES);
|
|
10
10
|
/**
|
|
11
11
|
* The scopes commissioning may add to an agent ship, beside sending and
|
|
12
|
-
* receiving, which every agent ship has (ADR 0002). `
|
|
13
|
-
*
|
|
12
|
+
* receiving, which every agent ship has (ADR 0002). `crew:assign` writes crew
|
|
13
|
+
* request assignments; `crew:run` crews the ships whose requests are assigned
|
|
14
|
+
* to its ship (decision 0029).
|
|
14
15
|
*/
|
|
15
|
-
export const FLEET_SCOPES = ['fleet:read', 'fleet:manage', '
|
|
16
|
+
export const FLEET_SCOPES = ['fleet:read', 'fleet:manage', 'crew:assign', 'crew:run'];
|
|
16
17
|
export const fleetScopeSchema = z.enum(FLEET_SCOPES);
|
|
17
18
|
/** `argo` is the one ship of kind `operator` in a fleet; every other ship is an `agent`. */
|
|
18
19
|
export const SHIP_KINDS = ['operator', 'agent', 'viewer'];
|
|
@@ -58,6 +59,12 @@ export const EVENT_TYPES = [
|
|
|
58
59
|
'SignInTicketIssued',
|
|
59
60
|
'FleetLimitsChanged',
|
|
60
61
|
'ViewerSessionStarted',
|
|
62
|
+
'CrewRequested',
|
|
63
|
+
'CrewRequestRemoved',
|
|
64
|
+
'CrewAssigned',
|
|
65
|
+
'CrewStatusChanged',
|
|
66
|
+
'CrewRequestExplained',
|
|
61
67
|
];
|
|
62
68
|
export const eventTypeSchema = z.enum(EVENT_TYPES);
|
|
69
|
+
export * from './mcp-url.js';
|
|
63
70
|
//# sourceMappingURL=index.js.map
|
package/dist/fleet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fleet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,CAAU,CAAC;AAC9H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ChF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,uBAAuB;IACvB,kBAAkB;IAClB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,oBAAoB;IACpB,oBAAoB;IACpB,sBAAsB;IACtB,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,mBAAmB;IACnB,sBAAsB;CACd,CAAC;AACX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAGnD,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Where the server serves the ship contract as MCP tools. */
|
|
2
|
+
export declare const MCP_PATH = "/mcp";
|
|
3
|
+
/**
|
|
4
|
+
* The fleet's MCP URL, which every starting prompt carries: `/mcp` under the
|
|
5
|
+
* public URL, keeping its path, whether or not it ends in a slash.
|
|
6
|
+
*/
|
|
7
|
+
export declare function mcpUrlOf(publicUrl: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Where the server serves the ship contract as MCP tools. */
|
|
2
|
+
export const MCP_PATH = '/mcp';
|
|
3
|
+
/**
|
|
4
|
+
* The fleet's MCP URL, which every starting prompt carries: `/mcp` under the
|
|
5
|
+
* public URL, keeping its path, whether or not it ends in a slash.
|
|
6
|
+
*/
|
|
7
|
+
export function mcpUrlOf(publicUrl) {
|
|
8
|
+
return `${publicUrl.replace(/\/+$/, '')}${MCP_PATH}`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=mcp-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-url.js","sourceRoot":"","sources":["../../src/fleet/mcp-url.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAiB;IACxC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -58,7 +58,8 @@ export declare const consoleSessionOutputSchema: z.ZodObject<{
|
|
|
58
58
|
"messages:receive": "messages:receive";
|
|
59
59
|
"fleet:read": "fleet:read";
|
|
60
60
|
"fleet:manage": "fleet:manage";
|
|
61
|
-
"
|
|
61
|
+
"crew:assign": "crew:assign";
|
|
62
|
+
"crew:run": "crew:run";
|
|
62
63
|
}>>;
|
|
63
64
|
}, z.core.$strip>;
|
|
64
65
|
export type ConsoleSessionOutput = z.infer<typeof consoleSessionOutputSchema>;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Inputs and outputs of the crew request procedures (decision 0029): a
|
|
4
|
+
* standing request that a ship be kept crewed, with settings the server
|
|
5
|
+
* stores without meaning. A requester with fleet:manage sets and removes it.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The most a crew request's settings may hold: 16 KB as the UTF-8 bytes of
|
|
9
|
+
* their serialized JSON (decision 0029).
|
|
10
|
+
*/
|
|
11
|
+
export declare const CREW_REQUEST_SETTINGS_MAX_BYTES: number;
|
|
12
|
+
/** The size of a crew request's settings: the UTF-8 bytes of their serialized JSON. */
|
|
13
|
+
export declare function crewRequestSettingsBytes(settings: CrewRequestSettings): number;
|
|
14
|
+
/**
|
|
15
|
+
* A crew request's settings: one JSON object (harness, workspace, options, an
|
|
16
|
+
* optional first prompt, an optional squadron). Their shape is the trierarch
|
|
17
|
+
* plugin's to check, not the server's.
|
|
18
|
+
*/
|
|
19
|
+
export declare const crewRequestSettingsSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
20
|
+
export type CrewRequestSettings = z.infer<typeof crewRequestSettingsSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* How the assigned trierarch says its crew of the ship stands (decision 0029):
|
|
23
|
+
* crewing, running, restarting, crashed, or releasing once the request is
|
|
24
|
+
* removed.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CREW_STATUSES: readonly ["crewing", "running", "restarting", "crashed", "releasing"];
|
|
27
|
+
export declare const crewStatusSchema: z.ZodEnum<{
|
|
28
|
+
crewing: "crewing";
|
|
29
|
+
running: "running";
|
|
30
|
+
restarting: "restarting";
|
|
31
|
+
crashed: "crashed";
|
|
32
|
+
releasing: "releasing";
|
|
33
|
+
}>;
|
|
34
|
+
export type CrewStatus = z.infer<typeof crewStatusSchema>;
|
|
35
|
+
/** The longest reason the assigner may write on a crew request: one line, as a report's note. */
|
|
36
|
+
export declare const CREW_REQUEST_REASON_MAX_LENGTH = 200;
|
|
37
|
+
/** Input of `fleet.crewRequest`: the ship to keep crewed and its settings, replacing any it holds. */
|
|
38
|
+
export declare const crewRequestInputSchema: z.ZodObject<{
|
|
39
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
40
|
+
settings: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type CrewRequestInput = z.infer<typeof crewRequestInputSchema>;
|
|
43
|
+
/** Output of `fleet.crewRequest`: the version of the settings now held, one more on every request. */
|
|
44
|
+
export declare const crewRequestOutputSchema: z.ZodObject<{
|
|
45
|
+
settingsVersion: z.ZodInt;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
/** Input of `fleet.removeCrewRequest`: the ship whose crew request goes. */
|
|
48
|
+
export declare const removeCrewRequestInputSchema: z.ZodObject<{
|
|
49
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
/** Output of `fleet.removeCrewRequest`: nothing; the OK is the answer. */
|
|
52
|
+
export declare const removeCrewRequestOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
53
|
+
/**
|
|
54
|
+
* A ship's crew request as the fleet list shows it (ISO 8601 in UTC): its
|
|
55
|
+
* settings version, when it was requested, its assignment and its status,
|
|
56
|
+
* never its settings.
|
|
57
|
+
*/
|
|
58
|
+
export declare const listedCrewRequestSchema: z.ZodObject<{
|
|
59
|
+
settingsVersion: z.ZodInt;
|
|
60
|
+
requestedAt: z.ZodISODateTime;
|
|
61
|
+
assignedTo: z.ZodNullable<z.ZodObject<{
|
|
62
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
66
|
+
crewing: "crewing";
|
|
67
|
+
running: "running";
|
|
68
|
+
restarting: "restarting";
|
|
69
|
+
crashed: "crashed";
|
|
70
|
+
releasing: "releasing";
|
|
71
|
+
}>>;
|
|
72
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
73
|
+
crewedBy: z.ZodNullable<z.ZodObject<{
|
|
74
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
/** A ship's crew request whole, for its page: as the fleet list shows it, with its settings. */
|
|
79
|
+
export declare const crewRequestSchema: z.ZodObject<{
|
|
80
|
+
settingsVersion: z.ZodInt;
|
|
81
|
+
requestedAt: z.ZodISODateTime;
|
|
82
|
+
assignedTo: z.ZodNullable<z.ZodObject<{
|
|
83
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
87
|
+
crewing: "crewing";
|
|
88
|
+
running: "running";
|
|
89
|
+
restarting: "restarting";
|
|
90
|
+
crashed: "crashed";
|
|
91
|
+
releasing: "releasing";
|
|
92
|
+
}>>;
|
|
93
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
94
|
+
crewedBy: z.ZodNullable<z.ZodObject<{
|
|
95
|
+
id: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
settings: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
/** Input of `fleet.assignCrew` (crew:assign): the ship whose request to assign, and the trierarch ship that crews it. */
|
|
101
|
+
export declare const assignCrewInputSchema: z.ZodObject<{
|
|
102
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
103
|
+
trierarchShipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
/** Output of `fleet.assignCrew`: nothing; the OK is the answer. */
|
|
106
|
+
export declare const assignCrewOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
107
|
+
/** Input of `fleet.reportCrewStatus` (crew:run): the ship and how its crew stands. */
|
|
108
|
+
export declare const reportCrewStatusInputSchema: z.ZodObject<{
|
|
109
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
110
|
+
status: z.ZodEnum<{
|
|
111
|
+
crewing: "crewing";
|
|
112
|
+
running: "running";
|
|
113
|
+
restarting: "restarting";
|
|
114
|
+
crashed: "crashed";
|
|
115
|
+
releasing: "releasing";
|
|
116
|
+
}>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
/** Output of `fleet.reportCrewStatus`: nothing; the OK is the answer. */
|
|
119
|
+
export declare const reportCrewStatusOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
120
|
+
/** Input of `fleet.confirmCrewRelease` (crew:run): the ship of the releasing request. */
|
|
121
|
+
export declare const confirmCrewReleaseInputSchema: z.ZodObject<{
|
|
122
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/** Output of `fleet.confirmCrewRelease`: nothing; the OK is the answer. */
|
|
125
|
+
export declare const confirmCrewReleaseOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
126
|
+
/**
|
|
127
|
+
* Output of `fleet.assignedCrewRequests` (crew:run): the crew requests
|
|
128
|
+
* assigned to the caller's ship, oldest ship first (ISO 8601 in UTC).
|
|
129
|
+
*/
|
|
130
|
+
export declare const assignedCrewRequestsOutputSchema: z.ZodArray<z.ZodObject<{
|
|
131
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
132
|
+
settings: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
133
|
+
settingsVersion: z.ZodInt;
|
|
134
|
+
requestedAt: z.ZodISODateTime;
|
|
135
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
136
|
+
crewing: "crewing";
|
|
137
|
+
running: "running";
|
|
138
|
+
restarting: "restarting";
|
|
139
|
+
crashed: "crashed";
|
|
140
|
+
releasing: "releasing";
|
|
141
|
+
}>>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
/**
|
|
144
|
+
* Input of `fleet.explainCrewRequest` (crew:assign): why no trierarch can
|
|
145
|
+
* take the ship's unassigned request, trimmed, one line; null clears it.
|
|
146
|
+
*/
|
|
147
|
+
export declare const explainCrewRequestInputSchema: z.ZodObject<{
|
|
148
|
+
shipId: z.ZodType<`shp_${string}`, unknown, z.core.$ZodTypeInternals<`shp_${string}`, unknown>>;
|
|
149
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
/** Output of `fleet.explainCrewRequest`: nothing; the OK is the answer. */
|
|
152
|
+
export declare const explainCrewRequestOutputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { idSchema } from '../ids/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Inputs and outputs of the crew request procedures (decision 0029): a
|
|
5
|
+
* standing request that a ship be kept crewed, with settings the server
|
|
6
|
+
* stores without meaning. A requester with fleet:manage sets and removes it.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The most a crew request's settings may hold: 16 KB as the UTF-8 bytes of
|
|
10
|
+
* their serialized JSON (decision 0029).
|
|
11
|
+
*/
|
|
12
|
+
export const CREW_REQUEST_SETTINGS_MAX_BYTES = 16 * 1024;
|
|
13
|
+
const utf8 = new TextEncoder();
|
|
14
|
+
/** The size of a crew request's settings: the UTF-8 bytes of their serialized JSON. */
|
|
15
|
+
export function crewRequestSettingsBytes(settings) {
|
|
16
|
+
return utf8.encode(JSON.stringify(settings)).byteLength;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A crew request's settings: one JSON object (harness, workspace, options, an
|
|
20
|
+
* optional first prompt, an optional squadron). Their shape is the trierarch
|
|
21
|
+
* plugin's to check, not the server's.
|
|
22
|
+
*/
|
|
23
|
+
export const crewRequestSettingsSchema = z.record(z.string(), z.json());
|
|
24
|
+
/**
|
|
25
|
+
* How the assigned trierarch says its crew of the ship stands (decision 0029):
|
|
26
|
+
* crewing, running, restarting, crashed, or releasing once the request is
|
|
27
|
+
* removed.
|
|
28
|
+
*/
|
|
29
|
+
export const CREW_STATUSES = ['crewing', 'running', 'restarting', 'crashed', 'releasing'];
|
|
30
|
+
export const crewStatusSchema = z.enum(CREW_STATUSES);
|
|
31
|
+
/** The longest reason the assigner may write on a crew request: one line, as a report's note. */
|
|
32
|
+
export const CREW_REQUEST_REASON_MAX_LENGTH = 200;
|
|
33
|
+
const REASON_MESSAGE = `A reason is one line of at most ${String(CREW_REQUEST_REASON_MAX_LENGTH)} characters`;
|
|
34
|
+
/** Input of `fleet.crewRequest`: the ship to keep crewed and its settings, replacing any it holds. */
|
|
35
|
+
export const crewRequestInputSchema = z.object({
|
|
36
|
+
shipId: idSchema('ship'),
|
|
37
|
+
settings: crewRequestSettingsSchema,
|
|
38
|
+
});
|
|
39
|
+
/** Output of `fleet.crewRequest`: the version of the settings now held, one more on every request. */
|
|
40
|
+
export const crewRequestOutputSchema = z.object({ settingsVersion: z.int().min(1) });
|
|
41
|
+
/** Input of `fleet.removeCrewRequest`: the ship whose crew request goes. */
|
|
42
|
+
export const removeCrewRequestInputSchema = z.object({ shipId: idSchema('ship') });
|
|
43
|
+
/** Output of `fleet.removeCrewRequest`: nothing; the OK is the answer. */
|
|
44
|
+
export const removeCrewRequestOutputSchema = z.strictObject({});
|
|
45
|
+
/**
|
|
46
|
+
* A ship's crew request as the fleet list shows it (ISO 8601 in UTC): its
|
|
47
|
+
* settings version, when it was requested, its assignment and its status,
|
|
48
|
+
* never its settings.
|
|
49
|
+
*/
|
|
50
|
+
export const listedCrewRequestSchema = z.object({
|
|
51
|
+
settingsVersion: z.int().min(1),
|
|
52
|
+
requestedAt: z.iso.datetime(),
|
|
53
|
+
/** The trierarch ship it is assigned to; null while unassigned, the operator's to-do. */
|
|
54
|
+
assignedTo: z.object({ id: idSchema('ship'), name: z.string() }).nullable(),
|
|
55
|
+
/** How its trierarch says the crew stands; null until it says. */
|
|
56
|
+
status: crewStatusSchema.nullable(),
|
|
57
|
+
/** Why no trierarch can take it, written by the assigner while unassigned; null when none. */
|
|
58
|
+
reason: z.string().nullable(),
|
|
59
|
+
/** The ship that got the starting prompt the ship's crew claimed with: argo for a hand crew, or its trierarch; null while not crewed. */
|
|
60
|
+
crewedBy: z.object({ id: idSchema('ship'), name: z.string() }).nullable(),
|
|
61
|
+
});
|
|
62
|
+
/** A ship's crew request whole, for its page: as the fleet list shows it, with its settings. */
|
|
63
|
+
export const crewRequestSchema = listedCrewRequestSchema.extend({ settings: crewRequestSettingsSchema });
|
|
64
|
+
/** Input of `fleet.assignCrew` (crew:assign): the ship whose request to assign, and the trierarch ship that crews it. */
|
|
65
|
+
export const assignCrewInputSchema = z.object({ shipId: idSchema('ship'), trierarchShipId: idSchema('ship') });
|
|
66
|
+
/** Output of `fleet.assignCrew`: nothing; the OK is the answer. */
|
|
67
|
+
export const assignCrewOutputSchema = z.strictObject({});
|
|
68
|
+
/** Input of `fleet.reportCrewStatus` (crew:run): the ship and how its crew stands. */
|
|
69
|
+
export const reportCrewStatusInputSchema = z.object({ shipId: idSchema('ship'), status: crewStatusSchema });
|
|
70
|
+
/** Output of `fleet.reportCrewStatus`: nothing; the OK is the answer. */
|
|
71
|
+
export const reportCrewStatusOutputSchema = z.strictObject({});
|
|
72
|
+
/** Input of `fleet.confirmCrewRelease` (crew:run): the ship of the releasing request. */
|
|
73
|
+
export const confirmCrewReleaseInputSchema = z.object({ shipId: idSchema('ship') });
|
|
74
|
+
/** Output of `fleet.confirmCrewRelease`: nothing; the OK is the answer. */
|
|
75
|
+
export const confirmCrewReleaseOutputSchema = z.strictObject({});
|
|
76
|
+
/**
|
|
77
|
+
* Output of `fleet.assignedCrewRequests` (crew:run): the crew requests
|
|
78
|
+
* assigned to the caller's ship, oldest ship first (ISO 8601 in UTC).
|
|
79
|
+
*/
|
|
80
|
+
export const assignedCrewRequestsOutputSchema = z.array(z.object({
|
|
81
|
+
shipId: idSchema('ship'),
|
|
82
|
+
settings: crewRequestSettingsSchema,
|
|
83
|
+
settingsVersion: z.int().min(1),
|
|
84
|
+
requestedAt: z.iso.datetime(),
|
|
85
|
+
status: crewStatusSchema.nullable(),
|
|
86
|
+
}));
|
|
87
|
+
/**
|
|
88
|
+
* Input of `fleet.explainCrewRequest` (crew:assign): why no trierarch can
|
|
89
|
+
* take the ship's unassigned request, trimmed, one line; null clears it.
|
|
90
|
+
*/
|
|
91
|
+
export const explainCrewRequestInputSchema = z.object({
|
|
92
|
+
shipId: idSchema('ship'),
|
|
93
|
+
reason: z
|
|
94
|
+
.string()
|
|
95
|
+
.trim()
|
|
96
|
+
.max(CREW_REQUEST_REASON_MAX_LENGTH, REASON_MESSAGE)
|
|
97
|
+
.refine((reason) => !/[\r\n]/.test(reason), REASON_MESSAGE)
|
|
98
|
+
.nullable(),
|
|
99
|
+
});
|
|
100
|
+
/** Output of `fleet.explainCrewRequest`: nothing; the OK is the answer. */
|
|
101
|
+
export const explainCrewRequestOutputSchema = z.strictObject({});
|
|
102
|
+
//# sourceMappingURL=crew-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crew-request.js","sourceRoot":"","sources":["../../src/schemas/crew-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzD,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAE/B,uFAAuF;AACvF,MAAM,UAAU,wBAAwB,CAAC,QAA6B;IACpE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAIxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC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