@dv.nghiem/flowdeck 0.5.4 → 0.5.5
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 +14 -3
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2454 -2078
- 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;AA8W/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"}
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Enforces the "orchestrator as coordinator, not executor" rule for the primary session.
|
|
5
5
|
* The guard consults the orchestrator capability contract in agent-contract-registry
|
|
6
|
-
* and the harness policy.
|
|
7
|
-
*
|
|
6
|
+
* and the harness policy.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: The guard never throws. When a tool is blocked it returns a block
|
|
9
|
+
* message string that the caller should surface as tool output. This keeps the
|
|
10
|
+
* orchestrator turn alive and gives it a path forward (delegate or ask the human).
|
|
8
11
|
*
|
|
9
12
|
* To disable: set FLOWDECK_ORCHESTRATOR_GUARD=off in the environment.
|
|
10
13
|
* Default is ON.
|
|
@@ -13,6 +16,7 @@ import type { HarnessPolicy } from "../services/harness-policy";
|
|
|
13
16
|
export declare class OrchestratorGuard {
|
|
14
17
|
private primarySessionId;
|
|
15
18
|
private policy?;
|
|
19
|
+
private blockedHistory;
|
|
16
20
|
setPolicy(policy: HarnessPolicy): void;
|
|
17
21
|
onEvent(event: {
|
|
18
22
|
type?: string;
|
|
@@ -21,12 +25,19 @@ export declare class OrchestratorGuard {
|
|
|
21
25
|
sessionID?: string;
|
|
22
26
|
sessionId?: string;
|
|
23
27
|
}): void;
|
|
24
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Check whether the tool is allowed for the primary session.
|
|
30
|
+
* Returns undefined when allowed, or a block message string when blocked.
|
|
31
|
+
* Never throws.
|
|
32
|
+
*/
|
|
33
|
+
check(sessionId: string, toolName: string): string | undefined;
|
|
25
34
|
/** Returns true if the tool is not in the orchestrator contract allowlist. */
|
|
26
35
|
_isBlockedForTest(name: string): boolean;
|
|
27
36
|
/** Returns true if the tool is in the orchestrator contract allowlist. */
|
|
28
37
|
_isAllowedForTest(name: string): boolean;
|
|
29
38
|
/** Exposed for testing. */
|
|
30
39
|
_setPrimarySessionIdForTest(id: string | null): void;
|
|
40
|
+
/** Exposed for testing. */
|
|
41
|
+
_getRepeatCountForTest(sessionId: string, toolName: string): number;
|
|
31
42
|
}
|
|
32
43
|
//# sourceMappingURL=orchestrator-guard-hook.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAqF/D,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,gBAAgB,CAAsB;IAC9C,OAAO,CAAC,MAAM,CAAC,CAAe;IAC9B,OAAO,CAAC,cAAc,CAA8C;IAEpE,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;IAmBtH;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAyB9D,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;IAIpD,2BAA2B;IAC3B,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAGpE"}
|
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"}
|