wicked-crew 0.8.4 → 0.8.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/api/ask-paths.d.ts +17 -0
- package/dist/api/ask-paths.d.ts.map +1 -1
- package/dist/api/ask-paths.js +13 -0
- package/dist/api/ask-paths.js.map +1 -1
- package/dist/api/ask-relay.d.ts +2 -0
- package/dist/api/ask-relay.d.ts.map +1 -1
- package/dist/api/ask-relay.js +35 -0
- package/dist/api/ask-relay.js.map +1 -1
- package/dist/api/chat-scope.d.ts +4 -4
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +1 -1
- package/dist/api/chat-turns.d.ts +12 -4
- package/dist/api/chat-turns.d.ts.map +1 -1
- package/dist/api/chat-turns.js +9 -4
- package/dist/api/chat-turns.js.map +1 -1
- package/dist/api/delivery-index.d.ts +53 -0
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +117 -0
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/mcp.d.ts +4 -4
- package/dist/api/onboarding-capture.d.ts +58 -0
- package/dist/api/onboarding-capture.d.ts.map +1 -0
- package/dist/api/onboarding-capture.js +125 -0
- package/dist/api/onboarding-capture.js.map +1 -0
- package/dist/api/routes.d.ts +11 -3
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +84 -9
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +20 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +46 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +52 -37
- package/dist/api/server.js.map +1 -1
- package/dist/api/skills.d.ts.map +1 -1
- package/dist/api/skills.js +3 -1
- package/dist/api/skills.js.map +1 -1
- package/dist/api/watch-routes.d.ts +3 -1
- package/dist/api/watch-routes.d.ts.map +1 -1
- package/dist/api/watch-routes.js +3 -0
- package/dist/api/watch-routes.js.map +1 -1
- package/dist/core/adapter.d.ts +10 -36
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +81 -57
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/deliver-exclusions.d.ts +15 -1
- package/dist/core/deliver-exclusions.d.ts.map +1 -1
- package/dist/core/deliver-exclusions.js +25 -3
- package/dist/core/deliver-exclusions.js.map +1 -1
- package/dist/core/deliver-text.d.ts +84 -10
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +279 -10
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver.d.ts +45 -0
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +136 -27
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +3 -0
- package/dist/core/types.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +17 -0
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +69 -3
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/bridge-root.d.ts +7 -0
- package/dist/interactive/bridge-root.d.ts.map +1 -1
- package/dist/interactive/bridge-root.js +11 -0
- package/dist/interactive/bridge-root.js.map +1 -1
- package/dist/projects/routes.d.ts +6 -2
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +6 -0
- package/dist/projects/routes.js.map +1 -1
- package/dist/projects/settings.d.ts +2 -0
- package/dist/projects/settings.d.ts.map +1 -1
- package/dist/projects/settings.js +4 -0
- package/dist/projects/settings.js.map +1 -1
- package/dist/skills/refs.d.ts +6 -0
- package/dist/skills/refs.d.ts.map +1 -1
- package/dist/skills/refs.js +8 -0
- package/dist/skills/refs.js.map +1 -1
- package/dist/skills/runtime.d.ts +17 -2
- package/dist/skills/runtime.d.ts.map +1 -1
- package/dist/skills/runtime.js +30 -1
- package/dist/skills/runtime.js.map +1 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +9 -1
- package/dist/skills/store.js.map +1 -1
- package/dist/standing-orders/parse.d.ts +9 -5
- package/dist/standing-orders/parse.d.ts.map +1 -1
- package/dist/standing-orders/parse.js +85 -37
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/standing-orders/routes.d.ts +21 -21
- package/dist/standing-orders/store.d.ts +9 -9
- package/dist/studio/assets/{index-B-ce66JW.js → index-CUNMURZ4.js} +122 -122
- package/dist/studio/assets/index-DPqNRzrT.css +32 -0
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +141 -3
- package/dist/watch/checks/claim-vs-evidence.js +2 -2
- package/dist/watch/checks/claim-vs-evidence.js.map +1 -1
- package/dist/watch/checks/deliver-audit.js +2 -2
- package/dist/watch/checks/deliver-audit.js.map +1 -1
- package/dist/watch/checks/discovery.d.ts.map +1 -1
- package/dist/watch/checks/discovery.js +5 -3
- package/dist/watch/checks/discovery.js.map +1 -1
- package/dist/watch/checks/index.d.ts.map +1 -1
- package/dist/watch/checks/index.js +5 -0
- package/dist/watch/checks/index.js.map +1 -1
- package/dist/watch/checks/quiet-after-claim.js +2 -2
- package/dist/watch/checks/quiet-after-claim.js.map +1 -1
- package/dist/watch/checks/scope-drift.d.ts.map +1 -1
- package/dist/watch/checks/scope-drift.js +4 -3
- package/dist/watch/checks/scope-drift.js.map +1 -1
- package/dist/watch/checks/team-path.d.ts +38 -0
- package/dist/watch/checks/team-path.d.ts.map +1 -0
- package/dist/watch/checks/team-path.js +220 -0
- package/dist/watch/checks/team-path.js.map +1 -0
- package/dist/watch/checks/ungated.js +2 -2
- package/dist/watch/checks/ungated.js.map +1 -1
- package/dist/watch/checks/warned-rule.js +2 -2
- package/dist/watch/checks/warned-rule.js.map +1 -1
- package/dist/watch/registry.d.ts +18 -2
- package/dist/watch/registry.d.ts.map +1 -1
- package/dist/watch/registry.js +23 -4
- package/dist/watch/registry.js.map +1 -1
- package/dist/watch/types.d.ts +8 -2
- package/dist/watch/types.d.ts.map +1 -1
- package/endpoint-manifest.json +1 -1
- package/package.json +3 -3
- package/watch/entries/help-unanswered.json +16 -0
- package/watch/entries/path-repicked.json +13 -0
- package/watch/entries/reviewer-absent.json +13 -0
- package/dist/studio/assets/index-TvS52qj5.css +0 -32
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Standing orders — the seat's parse of plain words into a rule (behaviour 10).
|
|
3
3
|
*
|
|
4
|
-
* ONE seat, ONE
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* ONE seat, ONE step (DES-ASK-TEAM-CHAT-001 §10 ASK-C4): a one-step team path — a user-composed
|
|
5
|
+
* plan of one `understand` step carrying the prompt, `primary` = the chosen seat, `monitors.asked:0`
|
|
6
|
+
* (nobody reviews a parse) — launched on the run engine, never the warm chat pool. The step's
|
|
7
|
+
* stored output (`work_output(<run>:parse-1)`) is the answer once the run's terminal frame arrives;
|
|
8
|
+
* a run that does not end in time is cancelled. The answer is a proposal the person confirms — crew
|
|
9
|
+
* stores only the confirmed rule — so a seat that answers badly costs a retry, never a wrong order.
|
|
8
10
|
*/
|
|
9
11
|
import type { CoreAdapter } from '../core/adapter.js';
|
|
10
12
|
import type { RosterSeat } from '../core/types.js';
|
|
11
13
|
import { type ParseOutcome } from './routes.js';
|
|
12
14
|
export interface SeatParserDeps {
|
|
13
|
-
adapter: Pick<CoreAdapter, '
|
|
15
|
+
adapter: Pick<CoreAdapter, 'launchRun' | 'cancelRun' | 'workOutput' | 'onEvent' | 'projectsSupported' | 'projectList'>;
|
|
14
16
|
roster: () => RosterSeat[];
|
|
15
17
|
/** How long the seat has to answer (default 120 s). */
|
|
16
18
|
timeoutMs?: number;
|
|
17
19
|
}
|
|
20
|
+
/** The one step of a parse path. */
|
|
21
|
+
export declare const PARSE_STEP_ID = "parse-1";
|
|
18
22
|
export declare function seatParser(deps: SeatParserDeps): (text: string) => Promise<ParseOutcome>;
|
|
19
23
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/standing-orders/parse.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/standing-orders/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,mBAAmB,GAAG,aAAa,CAAC,CAAC;IACvH,MAAM,EAAE,MAAM,UAAU,EAAE,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oCAAoC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC;AASvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAgGxF"}
|
|
@@ -1,63 +1,109 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Standing orders — the seat's parse of plain words into a rule (behaviour 10).
|
|
3
3
|
*
|
|
4
|
-
* ONE seat, ONE
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* ONE seat, ONE step (DES-ASK-TEAM-CHAT-001 §10 ASK-C4): a one-step team path — a user-composed
|
|
5
|
+
* plan of one `understand` step carrying the prompt, `primary` = the chosen seat, `monitors.asked:0`
|
|
6
|
+
* (nobody reviews a parse) — launched on the run engine, never the warm chat pool. The step's
|
|
7
|
+
* stored output (`work_output(<run>:parse-1)`) is the answer once the run's terminal frame arrives;
|
|
8
|
+
* a run that does not end in time is cancelled. The answer is a proposal the person confirms — crew
|
|
9
|
+
* stores only the confirmed rule — so a seat that answers badly costs a retry, never a wrong order.
|
|
8
10
|
*/
|
|
9
11
|
import { randomUUID } from 'node:crypto';
|
|
10
|
-
import { mkdtempSync, rmSync } from 'node:fs';
|
|
11
|
-
import { tmpdir } from 'node:os';
|
|
12
|
-
import { join } from 'node:path';
|
|
13
12
|
import { parsePrompt, ruleFromAnswer } from './routes.js';
|
|
14
|
-
/** The
|
|
13
|
+
/** The one step of a parse path. */
|
|
14
|
+
export const PARSE_STEP_ID = 'parse-1';
|
|
15
|
+
/** The first seat the daemon would seat for an unscoped turn. */
|
|
15
16
|
function chatSeat(roster) {
|
|
16
|
-
|
|
17
|
-
return seat === undefined ? undefined : String(seat.key);
|
|
17
|
+
return roster.find((s) => s.chat_admission?.unscoped?.ok === true);
|
|
18
18
|
}
|
|
19
19
|
export function seatParser(deps) {
|
|
20
20
|
const { adapter } = deps;
|
|
21
21
|
const timeoutMs = deps.timeoutMs ?? 120_000;
|
|
22
22
|
return async (text) => {
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
23
|
+
const entry = chatSeat(deps.roster());
|
|
24
|
+
if (entry === undefined) {
|
|
25
25
|
return { ok: false, code: 409, error: 'no seat can take a turn to read the order — sign a seat in from the System page' };
|
|
26
26
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const seat = String(entry.key);
|
|
28
|
+
// The run id IS the session id the launch names, so the frames are filtered on it from before
|
|
29
|
+
// the launch: a fast run's terminal frame may land before `launchRun` resolves.
|
|
30
|
+
const sessionId = randomUUID();
|
|
31
|
+
let runId;
|
|
29
32
|
let off = () => undefined;
|
|
30
|
-
// Cleared in `finally`: an early return
|
|
33
|
+
// Cleared in `finally`: an early return must not leave it armed.
|
|
31
34
|
let timer;
|
|
35
|
+
let settled = false;
|
|
36
|
+
let timedOut = false;
|
|
32
37
|
try {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
let end = null;
|
|
39
|
+
// The step's own status, the latest the engine captured (read when the run has ended).
|
|
40
|
+
let stepStatus;
|
|
41
|
+
let wake = null;
|
|
42
|
+
off = adapter.onEvent((e) => {
|
|
43
|
+
const ev = e;
|
|
44
|
+
if (ev.session !== sessionId && (runId === undefined || ev.session !== runId))
|
|
45
|
+
return;
|
|
46
|
+
if (ev.type === 'unitOutputCaptured' && typeof ev.stepStatus === 'string')
|
|
47
|
+
stepStatus = ev.stepStatus;
|
|
48
|
+
else if (end === null && (ev.type === 'sessionCompleted' || ev.type === 'sessionFailed' || ev.type === 'runCancelled')) {
|
|
49
|
+
end = { ok: ev.type === 'sessionCompleted' };
|
|
50
|
+
wake?.();
|
|
51
|
+
}
|
|
42
52
|
});
|
|
43
53
|
// Inside the try: a project list that fails is the parse's 502, never an unhandled 500.
|
|
44
54
|
const projects = adapter.projectsSupported()
|
|
45
55
|
? (await adapter.projectList()).map((p) => ({ id: p.id, name: p.name }))
|
|
46
56
|
: [];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
// ONE deadline over the launch and the answer: a launch that hangs is the same 502.
|
|
58
|
+
const deadline = new Promise((resolve) => {
|
|
59
|
+
timer = setTimeout(() => {
|
|
60
|
+
timedOut = true;
|
|
61
|
+
resolve('timeout');
|
|
62
|
+
wake?.();
|
|
63
|
+
}, timeoutMs);
|
|
64
|
+
});
|
|
65
|
+
const launch = adapter.launchRun({
|
|
66
|
+
problem: "Read a standing order: turn the person's words into one rule.",
|
|
67
|
+
sessionId,
|
|
68
|
+
clisJson: JSON.stringify([entry]),
|
|
69
|
+
primary: seat,
|
|
70
|
+
plan: {
|
|
71
|
+
steps: [{ catalog: 'understand', id: PARSE_STEP_ID, budget_secs: Math.max(1, Math.ceil(timeoutMs / 1000)), instructions: parsePrompt(text, projects) }],
|
|
72
|
+
monitors: { asked: 0 },
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
// A launch that resolves after the deadline must not outlive the parse.
|
|
76
|
+
launch.then((id) => {
|
|
77
|
+
if (timedOut)
|
|
78
|
+
void adapter.cancelRun(id).catch(() => undefined);
|
|
79
|
+
}, () => undefined);
|
|
80
|
+
let launched;
|
|
81
|
+
try {
|
|
82
|
+
launched = await Promise.race([launch, deadline]);
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
return { ok: false, code: 502, error: `the ${seat} seat could not open: ${err instanceof Error ? err.message : String(err)}` };
|
|
50
86
|
}
|
|
51
|
-
|
|
52
|
-
const answer = await reply;
|
|
53
|
-
if (answer === null)
|
|
87
|
+
if (launched === 'timeout')
|
|
54
88
|
return { ok: false, code: 502, error: `the ${seat} seat did not answer in ${timeoutMs / 1000} s` };
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
89
|
+
runId = launched;
|
|
90
|
+
const id = launched;
|
|
91
|
+
const ended = await new Promise((resolve) => {
|
|
92
|
+
wake = () => resolve(timedOut ? null : end);
|
|
93
|
+
if (end !== null || timedOut)
|
|
94
|
+
wake();
|
|
95
|
+
});
|
|
96
|
+
if (ended === null)
|
|
97
|
+
return { ok: false, code: 502, error: `the ${seat} seat did not answer in ${timeoutMs / 1000} s` };
|
|
98
|
+
settled = true;
|
|
99
|
+
const answer = await adapter.workOutput(`${id}:${PARSE_STEP_ID}`).catch(() => null);
|
|
100
|
+
// A failed step is a failure, whatever its text holds — never a rule to confirm (codex on #686).
|
|
101
|
+
if (!ended.ok || answer === null || (stepStatus !== undefined && stepStatus !== 'ok')) {
|
|
102
|
+
return { ok: false, code: 502, error: `the ${seat} seat's turn failed`, ...(answer !== null ? { answer } : {}) };
|
|
103
|
+
}
|
|
104
|
+
const rule = ruleFromAnswer(answer);
|
|
59
105
|
if (rule === undefined) {
|
|
60
|
-
return { ok: false, code: 422, error: 'the seat could not turn the words into a rule — try plainer words', answer
|
|
106
|
+
return { ok: false, code: 422, error: 'the seat could not turn the words into a rule — try plainer words', answer };
|
|
61
107
|
}
|
|
62
108
|
return { ok: true, rule, seat };
|
|
63
109
|
}
|
|
@@ -67,8 +113,10 @@ export function seatParser(deps) {
|
|
|
67
113
|
finally {
|
|
68
114
|
clearTimeout(timer);
|
|
69
115
|
off();
|
|
70
|
-
|
|
71
|
-
|
|
116
|
+
// A path that has not ended (the seat went quiet, or the launch hung past the deadline — the
|
|
117
|
+
// run id is the session id it was launched under) must not outlive the parse.
|
|
118
|
+
if (!settled && (runId !== undefined || timedOut))
|
|
119
|
+
await adapter.cancelRun(runId ?? sessionId).catch(() => undefined);
|
|
72
120
|
}
|
|
73
121
|
};
|
|
74
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/standing-orders/parse.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/standing-orders/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAqB,MAAM,aAAa,CAAC;AAS7E,oCAAoC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC,iEAAiE;AACjE,SAAS,QAAQ,CAAC,MAAoB;IACpC,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,EAAE,CAAE,CAA0D,CAAC,cAAc,EAAE,QAAQ,EAAE,EAAE,KAAK,IAAI,CACzG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAoB;IAC7C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACzB,MAAM,SAAS,GAAG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,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3F,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,GAAG,EAAE,CAAC;YACN,6FAA6F;YAC7F,8EAA8E;YAC9E,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,QAAQ,CAAC;gBAAE,MAAM,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACxH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -61,6 +61,12 @@ export declare const CreateStandingOrderSchema: z.ZodObject<{
|
|
|
61
61
|
activeWhen: z.ZodEnum<["away", "always"]>;
|
|
62
62
|
}, "strict", z.ZodTypeAny, {
|
|
63
63
|
action: "hold" | "notify" | "approve";
|
|
64
|
+
scope: {
|
|
65
|
+
kind: "all";
|
|
66
|
+
} | {
|
|
67
|
+
kind: "project";
|
|
68
|
+
projectId: string;
|
|
69
|
+
};
|
|
64
70
|
trigger: {
|
|
65
71
|
kind: "gate";
|
|
66
72
|
phase: string;
|
|
@@ -70,15 +76,15 @@ export declare const CreateStandingOrderSchema: z.ZodObject<{
|
|
|
70
76
|
kind: "finding";
|
|
71
77
|
severity: "*" | "high" | "medium";
|
|
72
78
|
};
|
|
79
|
+
activeWhen: "always" | "away";
|
|
80
|
+
}, {
|
|
81
|
+
action: "hold" | "notify" | "approve";
|
|
73
82
|
scope: {
|
|
74
83
|
kind: "all";
|
|
75
84
|
} | {
|
|
76
85
|
kind: "project";
|
|
77
86
|
projectId: string;
|
|
78
87
|
};
|
|
79
|
-
activeWhen: "always" | "away";
|
|
80
|
-
}, {
|
|
81
|
-
action: "hold" | "notify" | "approve";
|
|
82
88
|
trigger: {
|
|
83
89
|
kind: "gate";
|
|
84
90
|
phase: string;
|
|
@@ -88,18 +94,18 @@ export declare const CreateStandingOrderSchema: z.ZodObject<{
|
|
|
88
94
|
kind: "finding";
|
|
89
95
|
severity: "*" | "high" | "medium";
|
|
90
96
|
};
|
|
91
|
-
scope: {
|
|
92
|
-
kind: "all";
|
|
93
|
-
} | {
|
|
94
|
-
kind: "project";
|
|
95
|
-
projectId: string;
|
|
96
|
-
};
|
|
97
97
|
activeWhen: "always" | "away";
|
|
98
98
|
}>;
|
|
99
99
|
}, "strict", z.ZodTypeAny, {
|
|
100
100
|
text: string;
|
|
101
101
|
rule: {
|
|
102
102
|
action: "hold" | "notify" | "approve";
|
|
103
|
+
scope: {
|
|
104
|
+
kind: "all";
|
|
105
|
+
} | {
|
|
106
|
+
kind: "project";
|
|
107
|
+
projectId: string;
|
|
108
|
+
};
|
|
103
109
|
trigger: {
|
|
104
110
|
kind: "gate";
|
|
105
111
|
phase: string;
|
|
@@ -109,18 +115,18 @@ export declare const CreateStandingOrderSchema: z.ZodObject<{
|
|
|
109
115
|
kind: "finding";
|
|
110
116
|
severity: "*" | "high" | "medium";
|
|
111
117
|
};
|
|
112
|
-
scope: {
|
|
113
|
-
kind: "all";
|
|
114
|
-
} | {
|
|
115
|
-
kind: "project";
|
|
116
|
-
projectId: string;
|
|
117
|
-
};
|
|
118
118
|
activeWhen: "always" | "away";
|
|
119
119
|
};
|
|
120
120
|
}, {
|
|
121
121
|
text: string;
|
|
122
122
|
rule: {
|
|
123
123
|
action: "hold" | "notify" | "approve";
|
|
124
|
+
scope: {
|
|
125
|
+
kind: "all";
|
|
126
|
+
} | {
|
|
127
|
+
kind: "project";
|
|
128
|
+
projectId: string;
|
|
129
|
+
};
|
|
124
130
|
trigger: {
|
|
125
131
|
kind: "gate";
|
|
126
132
|
phase: string;
|
|
@@ -130,12 +136,6 @@ export declare const CreateStandingOrderSchema: z.ZodObject<{
|
|
|
130
136
|
kind: "finding";
|
|
131
137
|
severity: "*" | "high" | "medium";
|
|
132
138
|
};
|
|
133
|
-
scope: {
|
|
134
|
-
kind: "all";
|
|
135
|
-
} | {
|
|
136
|
-
kind: "project";
|
|
137
|
-
projectId: string;
|
|
138
|
-
};
|
|
139
139
|
activeWhen: "always" | "away";
|
|
140
140
|
};
|
|
141
141
|
}>;
|
|
@@ -64,6 +64,12 @@ export declare const StandingOrderRuleSchema: z.ZodObject<{
|
|
|
64
64
|
activeWhen: z.ZodEnum<["away", "always"]>;
|
|
65
65
|
}, "strict", z.ZodTypeAny, {
|
|
66
66
|
action: "hold" | "notify" | "approve";
|
|
67
|
+
scope: {
|
|
68
|
+
kind: "all";
|
|
69
|
+
} | {
|
|
70
|
+
kind: "project";
|
|
71
|
+
projectId: string;
|
|
72
|
+
};
|
|
67
73
|
trigger: {
|
|
68
74
|
kind: "gate";
|
|
69
75
|
phase: string;
|
|
@@ -73,15 +79,15 @@ export declare const StandingOrderRuleSchema: z.ZodObject<{
|
|
|
73
79
|
kind: "finding";
|
|
74
80
|
severity: "*" | "high" | "medium";
|
|
75
81
|
};
|
|
82
|
+
activeWhen: "always" | "away";
|
|
83
|
+
}, {
|
|
84
|
+
action: "hold" | "notify" | "approve";
|
|
76
85
|
scope: {
|
|
77
86
|
kind: "all";
|
|
78
87
|
} | {
|
|
79
88
|
kind: "project";
|
|
80
89
|
projectId: string;
|
|
81
90
|
};
|
|
82
|
-
activeWhen: "always" | "away";
|
|
83
|
-
}, {
|
|
84
|
-
action: "hold" | "notify" | "approve";
|
|
85
91
|
trigger: {
|
|
86
92
|
kind: "gate";
|
|
87
93
|
phase: string;
|
|
@@ -91,12 +97,6 @@ export declare const StandingOrderRuleSchema: z.ZodObject<{
|
|
|
91
97
|
kind: "finding";
|
|
92
98
|
severity: "*" | "high" | "medium";
|
|
93
99
|
};
|
|
94
|
-
scope: {
|
|
95
|
-
kind: "all";
|
|
96
|
-
} | {
|
|
97
|
-
kind: "project";
|
|
98
|
-
projectId: string;
|
|
99
|
-
};
|
|
100
100
|
activeWhen: "always" | "away";
|
|
101
101
|
}>;
|
|
102
102
|
export type StandingOrderRule = z.infer<typeof StandingOrderRuleSchema>;
|