wicked-crew 0.9.8 → 0.9.10

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.
@@ -0,0 +1,19 @@
1
+ /** The opt-in CLI keys; an instance (`opencode#2`) is its CLI's. */
2
+ export declare const OPT_IN_SEAT_KEYS: readonly string[];
3
+ /** The one-line note a launch surface shows beside an opt-in seat. */
4
+ export declare const OPT_IN_NOTE = "opt-in: known to stall";
5
+ export declare function isOptInSeat(key: unknown): boolean;
6
+ /** The DEFAULT launch roster: every seat but the opt-in ones — unless an opt-in seat is the only
7
+ * one the engine could convene (every other seat signed out, out of quota, not installed): then
8
+ * the roster is kept as served, so a default launch is never left with no seat at all. */
9
+ export declare function defaultLaunchRoster<T extends {
10
+ key?: unknown;
11
+ }>(roster: readonly T[]): T[];
12
+ /** The roster as `GET /roster` serves it: opt-in seats marked `optIn: true` with their note. */
13
+ export declare function markOptIn<T extends {
14
+ key?: unknown;
15
+ }>(roster: readonly T[]): Array<T & {
16
+ optIn?: true;
17
+ optInNote?: string;
18
+ }>;
19
+ //# sourceMappingURL=opt-in-seats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opt-in-seats.d.ts","sourceRoot":"","sources":["../../src/core/opt-in-seats.ts"],"names":[],"mappings":"AAOA,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAiB,CAAC;AAEhE,sEAAsE;AACtE,eAAO,MAAM,WAAW,2BAA2B,CAAC;AAEpD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAIjD;AAED;;2FAE2F;AAC3F,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAG1F;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAE5H"}
@@ -0,0 +1,28 @@
1
+ // (operator ruling 2026-10-11) OPT-IN seats. opencode keeps wedging (30-minute silent ACP units,
2
+ // hangs in both modes), so it is never in a DEFAULT seat pool — the roster a launch gets when it
3
+ // names none, and (engine side, wicked-core OPT_IN_SEATS) the judge and council pools beyond a run's
4
+ // own roster. It stays available whenever the operator picks it (the launch wizard, `clisJson`, a
5
+ // clis.toml).
6
+ import { eligibleSeatKeys } from './engine-roster.js';
7
+ /** The opt-in CLI keys; an instance (`opencode#2`) is its CLI's. */
8
+ export const OPT_IN_SEAT_KEYS = ['opencode'];
9
+ /** The one-line note a launch surface shows beside an opt-in seat. */
10
+ export const OPT_IN_NOTE = 'opt-in: known to stall';
11
+ export function isOptInSeat(key) {
12
+ if (typeof key !== 'string')
13
+ return false;
14
+ const cli = key.split('#')[0] ?? key;
15
+ return OPT_IN_SEAT_KEYS.includes(cli);
16
+ }
17
+ /** The DEFAULT launch roster: every seat but the opt-in ones — unless an opt-in seat is the only
18
+ * one the engine could convene (every other seat signed out, out of quota, not installed): then
19
+ * the roster is kept as served, so a default launch is never left with no seat at all. */
20
+ export function defaultLaunchRoster(roster) {
21
+ const without = roster.filter((s) => !isOptInSeat(s.key));
22
+ return eligibleSeatKeys(without).length > 0 ? without : [...roster];
23
+ }
24
+ /** The roster as `GET /roster` serves it: opt-in seats marked `optIn: true` with their note. */
25
+ export function markOptIn(roster) {
26
+ return roster.map((s) => (isOptInSeat(s.key) ? { ...s, optIn: true, optInNote: OPT_IN_NOTE } : s));
27
+ }
28
+ //# sourceMappingURL=opt-in-seats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opt-in-seats.js","sourceRoot":"","sources":["../../src/core/opt-in-se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