@crewx/sdk 0.9.0-rc.161 → 0.9.0-rc.162
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/agent-interceptor/chain.d.ts +25 -0
- package/dist/agent-interceptor/index.d.ts +6 -0
- package/dist/agent-interceptor/model-runner.d.ts +19 -0
- package/dist/agent-interceptor/program-runner.d.ts +13 -0
- package/dist/agent-interceptor/protocol.d.ts +68 -0
- package/dist/agent-interceptor/run-stop.d.ts +3 -0
- package/dist/agent-interceptor/schema.d.ts +267 -0
- package/dist/agent-interceptor/types.d.ts +88 -0
- package/dist/esm/index.js +305 -297
- package/dist/esm/plugins/index.js +86 -81
- package/dist/esm/publish/index.js +1 -1
- package/dist/esm/repository/index.js +98 -93
- package/dist/esm/skills/index.js +1 -1
- package/dist/events/types.d.ts +12 -0
- package/dist/facade/Crewx.d.ts +9 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +307 -299
- package/dist/plugins/index.js +83 -78
- package/dist/provider/bridge.d.ts +5 -1
- package/dist/provider/cli/adapter.types.d.ts +9 -0
- package/dist/provider-account/accounts.d.ts +15 -0
- package/dist/provider-account/index.d.ts +5 -0
- package/dist/provider-account/registry.d.ts +30 -0
- package/dist/provider-account/types.d.ts +40 -0
- package/dist/publish/index.js +1 -1
- package/dist/repository/index.js +99 -94
- package/dist/repository/task.repository.d.ts +7 -0
- package/dist/repository/thread.repository.d.ts +1 -0
- package/dist/skills/index.js +1 -1
- package/dist/types/index.d.ts +33 -0
- package/dist/types/task-log.types.d.ts +3 -1
- package/dist/utils/id.d.ts +1 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -178,6 +178,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
178
178
|
role: z.ZodOptional<z.ZodString>;
|
|
179
179
|
team: z.ZodOptional<z.ZodString>;
|
|
180
180
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
181
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
181
182
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
182
183
|
description: z.ZodOptional<z.ZodString>;
|
|
183
184
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -351,12 +352,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
351
352
|
}, {
|
|
352
353
|
include?: string[] | undefined;
|
|
353
354
|
}>>;
|
|
355
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
354
356
|
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
355
357
|
id: z.ZodString;
|
|
356
358
|
name: z.ZodOptional<z.ZodString>;
|
|
357
359
|
role: z.ZodOptional<z.ZodString>;
|
|
358
360
|
team: z.ZodOptional<z.ZodString>;
|
|
359
361
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
362
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
360
363
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
361
364
|
description: z.ZodOptional<z.ZodString>;
|
|
362
365
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -530,12 +533,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
530
533
|
}, {
|
|
531
534
|
include?: string[] | undefined;
|
|
532
535
|
}>>;
|
|
536
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
533
537
|
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
534
538
|
id: z.ZodString;
|
|
535
539
|
name: z.ZodOptional<z.ZodString>;
|
|
536
540
|
role: z.ZodOptional<z.ZodString>;
|
|
537
541
|
team: z.ZodOptional<z.ZodString>;
|
|
538
542
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
543
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
539
544
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
540
545
|
description: z.ZodOptional<z.ZodString>;
|
|
541
546
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -709,6 +714,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
709
714
|
}, {
|
|
710
715
|
include?: string[] | undefined;
|
|
711
716
|
}>>;
|
|
717
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
712
718
|
}, z.ZodUnknown, "strip">>;
|
|
713
719
|
export type AgentConfig = z.infer<typeof AgentConfigSchema>;
|
|
714
720
|
export interface YamlHookEntry {
|
|
@@ -865,6 +871,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
865
871
|
role: z.ZodOptional<z.ZodString>;
|
|
866
872
|
team: z.ZodOptional<z.ZodString>;
|
|
867
873
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
874
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
868
875
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
869
876
|
description: z.ZodOptional<z.ZodString>;
|
|
870
877
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1038,12 +1045,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1038
1045
|
}, {
|
|
1039
1046
|
include?: string[] | undefined;
|
|
1040
1047
|
}>>;
|
|
1048
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
1041
1049
|
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
1042
1050
|
id: z.ZodString;
|
|
1043
1051
|
name: z.ZodOptional<z.ZodString>;
|
|
1044
1052
|
role: z.ZodOptional<z.ZodString>;
|
|
1045
1053
|
team: z.ZodOptional<z.ZodString>;
|
|
1046
1054
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1055
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
1047
1056
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
1048
1057
|
description: z.ZodOptional<z.ZodString>;
|
|
1049
1058
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1217,12 +1226,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1217
1226
|
}, {
|
|
1218
1227
|
include?: string[] | undefined;
|
|
1219
1228
|
}>>;
|
|
1229
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
1220
1230
|
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
1221
1231
|
id: z.ZodString;
|
|
1222
1232
|
name: z.ZodOptional<z.ZodString>;
|
|
1223
1233
|
role: z.ZodOptional<z.ZodString>;
|
|
1224
1234
|
team: z.ZodOptional<z.ZodString>;
|
|
1225
1235
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1236
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
1226
1237
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
1227
1238
|
description: z.ZodOptional<z.ZodString>;
|
|
1228
1239
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1396,6 +1407,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1396
1407
|
}, {
|
|
1397
1408
|
include?: string[] | undefined;
|
|
1398
1409
|
}>>;
|
|
1410
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
1399
1411
|
}, z.ZodUnknown, "strip">>, "many">>;
|
|
1400
1412
|
hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
1401
1413
|
settings: z.ZodOptional<z.ZodObject<{
|
|
@@ -1511,6 +1523,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1511
1523
|
role: z.ZodOptional<z.ZodString>;
|
|
1512
1524
|
team: z.ZodOptional<z.ZodString>;
|
|
1513
1525
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1526
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
1514
1527
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
1515
1528
|
description: z.ZodOptional<z.ZodString>;
|
|
1516
1529
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1684,12 +1697,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1684
1697
|
}, {
|
|
1685
1698
|
include?: string[] | undefined;
|
|
1686
1699
|
}>>;
|
|
1700
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
1687
1701
|
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
1688
1702
|
id: z.ZodString;
|
|
1689
1703
|
name: z.ZodOptional<z.ZodString>;
|
|
1690
1704
|
role: z.ZodOptional<z.ZodString>;
|
|
1691
1705
|
team: z.ZodOptional<z.ZodString>;
|
|
1692
1706
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1707
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
1693
1708
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
1694
1709
|
description: z.ZodOptional<z.ZodString>;
|
|
1695
1710
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1863,12 +1878,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
1863
1878
|
}, {
|
|
1864
1879
|
include?: string[] | undefined;
|
|
1865
1880
|
}>>;
|
|
1881
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
1866
1882
|
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
1867
1883
|
id: z.ZodString;
|
|
1868
1884
|
name: z.ZodOptional<z.ZodString>;
|
|
1869
1885
|
role: z.ZodOptional<z.ZodString>;
|
|
1870
1886
|
team: z.ZodOptional<z.ZodString>;
|
|
1871
1887
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1888
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
1872
1889
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
1873
1890
|
description: z.ZodOptional<z.ZodString>;
|
|
1874
1891
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2042,6 +2059,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
2042
2059
|
}, {
|
|
2043
2060
|
include?: string[] | undefined;
|
|
2044
2061
|
}>>;
|
|
2062
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
2045
2063
|
}, z.ZodUnknown, "strip">>, "many">>;
|
|
2046
2064
|
hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
2047
2065
|
settings: z.ZodOptional<z.ZodObject<{
|
|
@@ -2157,6 +2175,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
2157
2175
|
role: z.ZodOptional<z.ZodString>;
|
|
2158
2176
|
team: z.ZodOptional<z.ZodString>;
|
|
2159
2177
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2178
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
2160
2179
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
2161
2180
|
description: z.ZodOptional<z.ZodString>;
|
|
2162
2181
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2330,12 +2349,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
2330
2349
|
}, {
|
|
2331
2350
|
include?: string[] | undefined;
|
|
2332
2351
|
}>>;
|
|
2352
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
2333
2353
|
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
2334
2354
|
id: z.ZodString;
|
|
2335
2355
|
name: z.ZodOptional<z.ZodString>;
|
|
2336
2356
|
role: z.ZodOptional<z.ZodString>;
|
|
2337
2357
|
team: z.ZodOptional<z.ZodString>;
|
|
2338
2358
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2359
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
2339
2360
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
2340
2361
|
description: z.ZodOptional<z.ZodString>;
|
|
2341
2362
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2509,12 +2530,14 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
2509
2530
|
}, {
|
|
2510
2531
|
include?: string[] | undefined;
|
|
2511
2532
|
}>>;
|
|
2533
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
2512
2534
|
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
2513
2535
|
id: z.ZodString;
|
|
2514
2536
|
name: z.ZodOptional<z.ZodString>;
|
|
2515
2537
|
role: z.ZodOptional<z.ZodString>;
|
|
2516
2538
|
team: z.ZodOptional<z.ZodString>;
|
|
2517
2539
|
provider: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2540
|
+
provider_account: z.ZodOptional<z.ZodString>;
|
|
2518
2541
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
2519
2542
|
description: z.ZodOptional<z.ZodString>;
|
|
2520
2543
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2688,6 +2711,7 @@ export declare const CrewxProjectConfigSchema: z.ZodObject<{
|
|
|
2688
2711
|
}, {
|
|
2689
2712
|
include?: string[] | undefined;
|
|
2690
2713
|
}>>;
|
|
2714
|
+
interceptors: z.ZodOptional<z.ZodUnknown>;
|
|
2691
2715
|
}, z.ZodUnknown, "strip">>, "many">>;
|
|
2692
2716
|
hooks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
2693
2717
|
settings: z.ZodOptional<z.ZodObject<{
|
|
@@ -2826,6 +2850,13 @@ export interface CrewxOptions {
|
|
|
2826
2850
|
includeBuiltIns?: boolean;
|
|
2827
2851
|
additionalArgsProvider?: import('../provider/bridge').AdditionalArgsProvider;
|
|
2828
2852
|
globalSettings?: import('../config/global-settings').GlobalSettingsStore;
|
|
2853
|
+
onRateLimitObserved?: (observation: ProviderRateLimitObservation) => void;
|
|
2854
|
+
}
|
|
2855
|
+
export interface ProviderRateLimitObservation {
|
|
2856
|
+
provider: string;
|
|
2857
|
+
accountId: string;
|
|
2858
|
+
windows: import('../provider/cli/adapter.types').ProviderRateLimitWindows;
|
|
2859
|
+
observedAt: Date;
|
|
2829
2860
|
}
|
|
2830
2861
|
export type ContextMode = 'full' | 'instruction-only';
|
|
2831
2862
|
export type CanResumeSessionReason = 'RESUME_SESSION_REQUIRED' | 'AGENT_NOT_FOUND' | 'PROVIDER_UNSUPPORTED';
|
|
@@ -2876,6 +2907,7 @@ export interface QueryOptions {
|
|
|
2876
2907
|
cwd?: string;
|
|
2877
2908
|
resumeSessionId?: string;
|
|
2878
2909
|
resumeSessionProvider?: string;
|
|
2910
|
+
providerAccountId?: string;
|
|
2879
2911
|
trace?: TraceContext;
|
|
2880
2912
|
callerIdentity?: CollaborationWorkspaceContext;
|
|
2881
2913
|
}
|
|
@@ -2929,6 +2961,7 @@ export interface ExecuteOptions {
|
|
|
2929
2961
|
cwd?: string;
|
|
2930
2962
|
resumeSessionId?: string;
|
|
2931
2963
|
resumeSessionProvider?: string;
|
|
2964
|
+
providerAccountId?: string;
|
|
2932
2965
|
trace?: TraceContext;
|
|
2933
2966
|
callerIdentity?: CollaborationWorkspaceContext;
|
|
2934
2967
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DelegationResult } from '../task-log/delegation-trailer.js';
|
|
2
|
-
|
|
2
|
+
import type { InterceptorStepLog } from '../agent-interceptor/types.js';
|
|
3
|
+
export type TaskLogEntryType = 'text' | 'thinking' | 'tool_use' | 'tool_result' | 'error' | 'info' | 'running_instruction' | 'agent_call' | 'interceptor';
|
|
3
4
|
export interface TaskLogEntry {
|
|
4
5
|
timestamp: string;
|
|
5
6
|
type: TaskLogEntryType;
|
|
@@ -14,4 +15,5 @@ export interface TaskLogEntry {
|
|
|
14
15
|
targetAgent?: string;
|
|
15
16
|
targetTaskId?: string;
|
|
16
17
|
errorMessage?: string;
|
|
18
|
+
interceptor?: InterceptorStepLog;
|
|
17
19
|
}
|
package/dist/utils/id.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type EntityPrefix = 'tsk' | 'thd' | 'msg' | 'box' | 'prj' | 'mem' | 'spn' | 'cron' | 'wbs' | 'job' | 'tcl' | 'req' | 'ws' | 'wfr' | 'ntf' | 'sug' | 'brd' | 'pjc' | 'pje' | 'the' | 'thl' | 'thr';
|
|
1
|
+
export type EntityPrefix = 'tsk' | 'thd' | 'msg' | 'box' | 'prj' | 'mem' | 'spn' | 'cron' | 'wbs' | 'job' | 'tcl' | 'req' | 'ws' | 'wfr' | 'ntf' | 'sug' | 'brd' | 'pjc' | 'pje' | 'the' | 'thl' | 'thr' | 'uls';
|
|
2
2
|
export type PrefixedId<P extends EntityPrefix> = `${P}_${string}`;
|
|
3
3
|
export declare function generateId<P extends EntityPrefix>(prefix: P): PrefixedId<P>;
|
|
4
4
|
export declare function generateFingerprint<P extends EntityPrefix>(prefix: P, input: string): PrefixedId<P>;
|