@ctlflow/fleet 0.1.4 → 0.1.6
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/dist/bin/fleet.mjs +17 -7
- package/docs/configuration.md +9 -2
- package/package.json +3 -3
package/dist/bin/fleet.mjs
CHANGED
|
@@ -3792,7 +3792,7 @@ var roomId = (input) => typeof input === "string" && input.length <= 255 && /^!\
|
|
|
3792
3792
|
var secret = (input) => typeof input === "string" && /^[A-Za-z0-9_-]{43}$/u.test(input) ? success(input) : failure("invalid", "Expected a private 32-byte claim");
|
|
3793
3793
|
var empty = object({});
|
|
3794
3794
|
var status = choice("active", "suspended", "revoked");
|
|
3795
|
-
var wakeMode = choice("
|
|
3795
|
+
var wakeMode = choice("selected", "humans", "everyone");
|
|
3796
3796
|
function plainText(maximumBytes) {
|
|
3797
3797
|
return (input) => typeof input === "string" && new TextEncoder().encode(input).length <= maximumBytes && !/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u.test(input) ? success(input) : failure("invalid", "Expected plain text up to " + maximumBytes + " UTF-8 bytes");
|
|
3798
3798
|
}
|
|
@@ -3923,14 +3923,15 @@ var fleetStatistics = object({
|
|
|
3923
3923
|
});
|
|
3924
3924
|
|
|
3925
3925
|
// ../crossfire/packages/contracts/src/coordination-policy.ts
|
|
3926
|
+
var matrixWakeSelection = object({ matrixUserId, includeAgents: boolean });
|
|
3926
3927
|
var coordinationPolicy = refine(
|
|
3927
3928
|
object({
|
|
3928
3929
|
wakeMode,
|
|
3929
|
-
|
|
3930
|
+
senders: list(matrixWakeSelection, 2e3),
|
|
3930
3931
|
permissions: list(choice("room.agent.invite"), 1)
|
|
3931
3932
|
}),
|
|
3932
|
-
(policy2) => (policy2.wakeMode
|
|
3933
|
-
"
|
|
3933
|
+
(policy2) => (policy2.wakeMode !== "everyone" || policy2.senders.length === 0) && new Set(policy2.senders.map((sender) => sender.matrixUserId)).size === policy2.senders.length,
|
|
3934
|
+
"Select unique identities; everyone requires no individual selections"
|
|
3934
3935
|
);
|
|
3935
3936
|
|
|
3936
3937
|
// ../crossfire/packages/contracts/src/schema/request.ts
|
|
@@ -3944,7 +3945,12 @@ var enrollmentDecision = object({ expectedRevision: revision, decision: choice("
|
|
|
3944
3945
|
var exchange = object({ claimSecret: secret });
|
|
3945
3946
|
var session = object({ nativeAccessToken: text(8192) });
|
|
3946
3947
|
var agentChange = object({ expectedRevision: revision, status: optional(status), displayName: optional(nullable(text(200))) });
|
|
3947
|
-
var
|
|
3948
|
+
var wakeSelection = object({ principalId: identifier, includeAgents: boolean });
|
|
3949
|
+
var wakePolicy = refine(
|
|
3950
|
+
object({ expectedRevision: revision, mode: wakeMode, senders: list(wakeSelection, 2e3) }),
|
|
3951
|
+
(policy2) => new Set(policy2.senders.map((sender) => sender.principalId)).size === policy2.senders.length && (policy2.mode !== "everyone" || policy2.senders.length === 0),
|
|
3952
|
+
"Select unique identities; everyone requires no individual selections"
|
|
3953
|
+
);
|
|
3948
3954
|
var memberChange = object({ expectedRevision: revision, status: optional(status), displayName: optional(text(HUMAN_SIGNUP.labelMax)) });
|
|
3949
3955
|
var memberRole = object({ expectedRevision: revision, roleCode: choice("member", "administrator") });
|
|
3950
3956
|
var memberInvitation = object({ roleCode: choice("member", "administrator"), expiresSeconds: integer(60, 604800) });
|
|
@@ -5606,13 +5612,17 @@ var coordination = object({ adapter: choice("crossfire"), server: text(2048), ow
|
|
|
5606
5612
|
var roster2 = object({ fleet: name, coordination, instances: list(instance3, 100) });
|
|
5607
5613
|
var coordinationOptions = object({
|
|
5608
5614
|
wake_mode: wakeMode,
|
|
5609
|
-
|
|
5615
|
+
wake_senders: list(object({ matrix_user_id: matrixUserId, include_agents: boolean }), 2e3),
|
|
5610
5616
|
permissions: list(choice("room.agent.invite"), 1)
|
|
5611
5617
|
});
|
|
5612
5618
|
var definition = object({ name: text(100), runtime: choice("codex"), coordination_options: optional((input) => {
|
|
5613
5619
|
const parsed = coordinationOptions(input);
|
|
5614
5620
|
if (!parsed.ok) return parsed;
|
|
5615
|
-
const valid = coordinationPolicy({
|
|
5621
|
+
const valid = coordinationPolicy({
|
|
5622
|
+
wakeMode: parsed.value.wake_mode,
|
|
5623
|
+
senders: parsed.value.wake_senders.map((sender) => ({ matrixUserId: sender.matrix_user_id, includeAgents: sender.include_agents })),
|
|
5624
|
+
permissions: parsed.value.permissions
|
|
5625
|
+
});
|
|
5616
5626
|
return valid.ok ? parsed : valid;
|
|
5617
5627
|
}), runtime_options: (input) => input && typeof input === "object" && !Array.isArray(input) ? success(input) : failure("invalid", "Expected runtime options") });
|
|
5618
5628
|
function parseToml(source, parser) {
|
package/docs/configuration.md
CHANGED
|
@@ -114,8 +114,12 @@ sandbox_mode = "danger-full-access"
|
|
|
114
114
|
approval_policy = "on-request"
|
|
115
115
|
|
|
116
116
|
[coordination_options]
|
|
117
|
-
wake_mode = "
|
|
117
|
+
wake_mode = "selected"
|
|
118
118
|
permissions = ["room.agent.invite"]
|
|
119
|
+
|
|
120
|
+
[[coordination_options.wake_senders]]
|
|
121
|
+
matrix_user_id = "@owner:YOUR_SERVER"
|
|
122
|
+
include_agents = true
|
|
119
123
|
```
|
|
120
124
|
|
|
121
125
|
The roster's optional workspace, or private workarea by default, supplies native
|
|
@@ -126,7 +130,10 @@ options; fleetd does not interpret Codex-specific settings.
|
|
|
126
130
|
The role's separate `coordination_options` declares Crossfire wake authority and
|
|
127
131
|
invitation defaults for every instance. Owner approval applies the exact policy
|
|
128
132
|
to current ordinary grants and future admissions without another setup step.
|
|
129
|
-
Omitting the whole block requests
|
|
133
|
+
Omitting the whole block requests an explicit person-only selection for the
|
|
134
|
+
actual configured owner and no invitation delegation. Each selected person can
|
|
135
|
+
include their currently owned agents. Multiple entries combine; individual
|
|
136
|
+
agents require `include_agents = false`. Use `wake_senders = []` for no entries.
|
|
130
137
|
Changed policies require owner review on stop/start; unchanged restarts preserve
|
|
131
138
|
manual room-specific edits. Configuration grants no room membership or native power.
|
|
132
139
|
- [Fields, selected identities, approval and removal rules](https://github.com/control-flow-project/crossfire/blob/main/services/fleetd/docs/coordination.md)
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctlflow/fleet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": { "access": "public" },
|
|
6
6
|
"type": "module",
|
|
7
|
-
"devDependencies": { "@ctlflow/crossfire-test-support": "0.1.
|
|
7
|
+
"devDependencies": { "@ctlflow/crossfire-test-support": "0.1.6" },
|
|
8
8
|
"bin": { "fleet": "./dist/bin/fleet.mjs" },
|
|
9
9
|
"files": ["dist/bin", "docs", "README.md"],
|
|
10
10
|
"exports": { "./executable": "./dist/bin/fleet.mjs", "./package.json": "./package.json" },
|
|
11
|
-
"dependencies": { "@ctlflow/fleetd": "0.1.
|
|
11
|
+
"dependencies": { "@ctlflow/fleetd": "0.1.6" },
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=26.0.0",
|
|
14
14
|
"npm": ">=11.17.0"
|