@dv.nghiem/flowdeck 0.5.4 → 0.5.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/agents/orchestrator.d.ts.map +1 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts +19 -4
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2023 -1697
- package/dist/services/agent-contract-registry.d.ts.map +1 -1
- package/dist/services/context-ingress.d.ts +3 -0
- package/dist/services/context-ingress.d.ts.map +1 -1
- package/dist/services/harness-controller.d.ts +4 -0
- package/dist/services/harness-controller.d.ts.map +1 -1
- package/dist/services/harness-types.d.ts +3 -0
- package/dist/services/harness-types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA8X/C,wBAAgB,uBAAuB,CACrC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC5B,aAAa,CAAC,EAAE,MAAM,GACrB,MAAM,CA6BR;AAED,wBAAgB,uBAAuB,CACrC,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACjE,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC5B,aAAa,CAAC,EAAE,MAAM,GACrB,eAAe,CAuBjB"}
|
|
@@ -2,14 +2,24 @@
|
|
|
2
2
|
* Orchestrator Guard Hook
|
|
3
3
|
*
|
|
4
4
|
* Enforces the "orchestrator as coordinator, not executor" rule for the primary session.
|
|
5
|
-
* The guard consults the orchestrator capability contract in agent-contract-registry
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* The guard consults the orchestrator capability contract in agent-contract-registry.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: The guard never throws. When a tool is blocked it returns a structured
|
|
8
|
+
* GuardCheckResult. Callers surface the message as tool output. This keeps the
|
|
9
|
+
* orchestrator turn alive and gives it a path forward (delegate or ask the human).
|
|
8
10
|
*
|
|
9
11
|
* To disable: set FLOWDECK_ORCHESTRATOR_GUARD=off in the environment.
|
|
10
12
|
* Default is ON.
|
|
11
13
|
*/
|
|
12
14
|
import type { HarnessPolicy } from "../services/harness-policy";
|
|
15
|
+
export interface GuardResult {
|
|
16
|
+
allowed: true;
|
|
17
|
+
}
|
|
18
|
+
export interface GuardBlock {
|
|
19
|
+
allowed: false;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export type GuardCheckResult = GuardResult | GuardBlock;
|
|
13
23
|
export declare class OrchestratorGuard {
|
|
14
24
|
private primarySessionId;
|
|
15
25
|
private policy?;
|
|
@@ -21,7 +31,12 @@ export declare class OrchestratorGuard {
|
|
|
21
31
|
sessionID?: string;
|
|
22
32
|
sessionId?: string;
|
|
23
33
|
}): void;
|
|
24
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Check whether the tool is allowed for the primary session.
|
|
36
|
+
* Returns { allowed: true } when allowed, or { allowed: false, message }
|
|
37
|
+
* when blocked. Never throws.
|
|
38
|
+
*/
|
|
39
|
+
check(sessionId: string, toolName: string): GuardCheckResult;
|
|
25
40
|
/** Returns true if the tool is not in the orchestrator contract allowlist. */
|
|
26
41
|
_isBlockedForTest(name: string): boolean;
|
|
27
42
|
/** Returns true if the tool is in the orchestrator contract allowlist. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator-guard-hook.d.ts","sourceRoot":"","sources":["../../src/hooks/orchestrator-guard-hook.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"orchestrator-guard-hook.d.ts","sourceRoot":"","sources":["../../src/hooks/orchestrator-guard-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAQ/D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,IAAI,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAA;AAiCvD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,gBAAgB,CAAsB;IAC9C,OAAO,CAAC,MAAM,CAAC,CAAe;IAE9B,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAItC,OAAO,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAkBtH;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB;IAiB5D,8EAA8E;IAC9E,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAOxC,0EAA0E;IAC1E,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIxC,2BAA2B;IAC3B,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAGrD"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAiHjD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAiHjD,QAAA,MAAM,MAAM,EAAE,MAuTb,CAAA;AAED,eAAe,MAAM,CAAA"}
|