@crewx/sdk 0.8.0 → 0.8.1-rc.1

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,39 @@
1
+ export type WindowsSpawnResolution = 'direct' | 'node-entrypoint' | 'exe-entrypoint' | 'shell-fallback';
2
+ export type WindowsSpawnCandidateResolution = Exclude<WindowsSpawnResolution, 'shell-fallback'>;
3
+ export type WindowsSpawnProgramCandidate = {
4
+ command: string;
5
+ leadingArgv: string[];
6
+ resolution: WindowsSpawnCandidateResolution | 'unresolved-wrapper';
7
+ windowsHide?: boolean;
8
+ };
9
+ export type WindowsSpawnProgram = {
10
+ command: string;
11
+ leadingArgv: string[];
12
+ resolution: WindowsSpawnResolution;
13
+ shell?: boolean;
14
+ windowsHide?: boolean;
15
+ };
16
+ export type WindowsSpawnInvocation = {
17
+ command: string;
18
+ argv: string[];
19
+ resolution: WindowsSpawnResolution;
20
+ shell?: boolean;
21
+ windowsHide?: boolean;
22
+ };
23
+ export type ResolveWindowsSpawnProgramParams = {
24
+ command: string;
25
+ platform?: NodeJS.Platform;
26
+ env?: NodeJS.ProcessEnv;
27
+ execPath?: string;
28
+ packageName?: string;
29
+ allowShellFallback?: boolean;
30
+ };
31
+ export type ResolveWindowsSpawnProgramCandidateParams = Omit<ResolveWindowsSpawnProgramParams, 'allowShellFallback'>;
32
+ export declare function resolveWindowsExecutablePath(command: string, env: NodeJS.ProcessEnv): string;
33
+ export declare function resolveWindowsSpawnProgramCandidate(params: ResolveWindowsSpawnProgramCandidateParams): WindowsSpawnProgramCandidate;
34
+ export declare function applyWindowsSpawnProgramPolicy(params: {
35
+ candidate: WindowsSpawnProgramCandidate;
36
+ allowShellFallback?: boolean;
37
+ }): WindowsSpawnProgram;
38
+ export declare function resolveWindowsSpawnProgram(params: ResolveWindowsSpawnProgramParams): WindowsSpawnProgram;
39
+ export declare function materializeWindowsSpawnProgram(program: WindowsSpawnProgram, argv: string[]): WindowsSpawnInvocation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-rc.1",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"
@@ -1,59 +1,59 @@
1
- {
2
- "$id": "https://crewx.dev/schemas/hooks",
3
- "type": "array",
4
- "items": {
5
- "type": "object",
6
- "required": ["name"],
7
- "properties": {
8
- "name": { "type": "string" },
9
- "provider": {
10
- "oneOf": [
11
- { "enum": ["claude", "codex", "gemini", "copilot", "opencode"] },
12
- { "type": "array", "items": { "enum": ["claude", "codex", "gemini", "copilot", "opencode"] } }
13
- ]
14
- },
15
- "team": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
16
- "role": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
17
- "tag": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
18
- "agents": { "type": "array", "items": { "type": "string" } },
19
- "event": { "enum": ["PreToolUse"] },
20
- "config": { "type": "object" },
21
- "deny": {
22
- "type": "object",
23
- "required": ["reason"],
24
- "properties": {
25
- "when": { "type": "array", "items": { "type": "string" } },
26
- "pattern": { "type": "string" },
27
- "regex": { "type": "string" },
28
- "pathPattern": { "type": "string" },
29
- "pathSizeMin": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
30
- "pathSizeMax": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
31
- "reason": { "type": "string" }
32
- },
33
- "additionalProperties": false
34
- },
35
- "guide": {
36
- "type": "object",
37
- "required": ["say"],
38
- "properties": {
39
- "when": { "type": "array", "items": { "type": "string" } },
40
- "pattern": { "type": "string" },
41
- "regex": { "type": "string" },
42
- "pathPattern": { "type": "string" },
43
- "pathSizeMin": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
44
- "pathSizeMax": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
45
- "whenInputRegex": { "type": "string" },
46
- "say": { "type": "string" },
47
- "once": { "type": "boolean" }
48
- },
49
- "additionalProperties": false
50
- },
51
- "plugin": { "type": "string" }
52
- },
53
- "oneOf": [
54
- { "required": ["deny"] },
55
- { "required": ["guide"] },
56
- { "required": ["plugin"] }
57
- ]
58
- }
59
- }
1
+ {
2
+ "$id": "https://crewx.dev/schemas/hooks",
3
+ "type": "array",
4
+ "items": {
5
+ "type": "object",
6
+ "required": ["name"],
7
+ "properties": {
8
+ "name": { "type": "string" },
9
+ "provider": {
10
+ "oneOf": [
11
+ { "enum": ["claude", "codex", "gemini", "copilot", "opencode"] },
12
+ { "type": "array", "items": { "enum": ["claude", "codex", "gemini", "copilot", "opencode"] } }
13
+ ]
14
+ },
15
+ "team": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
16
+ "role": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
17
+ "tag": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
18
+ "agents": { "type": "array", "items": { "type": "string" } },
19
+ "event": { "enum": ["PreToolUse"] },
20
+ "config": { "type": "object" },
21
+ "deny": {
22
+ "type": "object",
23
+ "required": ["reason"],
24
+ "properties": {
25
+ "when": { "type": "array", "items": { "type": "string" } },
26
+ "pattern": { "type": "string" },
27
+ "regex": { "type": "string" },
28
+ "pathPattern": { "type": "string" },
29
+ "pathSizeMin": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
30
+ "pathSizeMax": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
31
+ "reason": { "type": "string" }
32
+ },
33
+ "additionalProperties": false
34
+ },
35
+ "guide": {
36
+ "type": "object",
37
+ "required": ["say"],
38
+ "properties": {
39
+ "when": { "type": "array", "items": { "type": "string" } },
40
+ "pattern": { "type": "string" },
41
+ "regex": { "type": "string" },
42
+ "pathPattern": { "type": "string" },
43
+ "pathSizeMin": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
44
+ "pathSizeMax": { "oneOf": [{ "type": "number" }, { "type": "string" }] },
45
+ "whenInputRegex": { "type": "string" },
46
+ "say": { "type": "string" },
47
+ "once": { "type": "boolean" }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "plugin": { "type": "string" }
52
+ },
53
+ "oneOf": [
54
+ { "required": ["deny"] },
55
+ { "required": ["guide"] },
56
+ { "required": ["plugin"] }
57
+ ]
58
+ }
59
+ }