@crewx/sdk 0.9.0-rc.30 → 0.9.0-rc.32
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/esm/index.js +62 -62
- package/dist/esm/plugins/index.js +33 -33
- package/dist/esm/repository/index.js +30 -30
- package/dist/index.browser.js +2 -2
- package/dist/index.js +63 -63
- package/dist/internal/windows-spawn.d.ts +10 -0
- package/dist/migrations/0012_blue_turbo.sql +23 -0
- package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
- package/dist/migrations/meta/0012_snapshot.json +1494 -0
- package/dist/migrations/meta/0013_snapshot.json +1592 -0
- package/dist/migrations/meta/_journal.json +14 -0
- package/dist/plugin/types.d.ts +1 -0
- package/dist/plugins/index.js +29 -29
- package/dist/repository/agent-suggestion.repository.d.ts +31 -0
- package/dist/repository/index.d.ts +4 -0
- package/dist/repository/index.js +30 -30
- package/dist/repository/notification.repository.d.ts +58 -0
- package/dist/schema/agent-suggestions.d.ts +199 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/notifications.d.ts +303 -0
- package/dist/types/index.d.ts +28 -3
- package/dist/utils/id.d.ts +1 -1
- package/package.json +1 -1
- package/templates/agents/default.yaml +28 -1
|
@@ -20,15 +20,25 @@ export type WindowsSpawnInvocation = {
|
|
|
20
20
|
shell?: boolean;
|
|
21
21
|
windowsHide?: boolean;
|
|
22
22
|
};
|
|
23
|
+
export type BinResolutionMode = 'global_first' | 'local_first';
|
|
24
|
+
export type ResolveExecutablePathOptions = {
|
|
25
|
+
cwd?: string;
|
|
26
|
+
env?: NodeJS.ProcessEnv;
|
|
27
|
+
platform?: NodeJS.Platform;
|
|
28
|
+
resolution?: BinResolutionMode;
|
|
29
|
+
};
|
|
23
30
|
export type ResolveWindowsSpawnProgramParams = {
|
|
24
31
|
command: string;
|
|
25
32
|
platform?: NodeJS.Platform;
|
|
26
33
|
env?: NodeJS.ProcessEnv;
|
|
27
34
|
execPath?: string;
|
|
28
35
|
packageName?: string;
|
|
36
|
+
cwd?: string;
|
|
37
|
+
resolution?: BinResolutionMode;
|
|
29
38
|
allowShellFallback?: boolean;
|
|
30
39
|
};
|
|
31
40
|
export type ResolveWindowsSpawnProgramCandidateParams = Omit<ResolveWindowsSpawnProgramParams, 'allowShellFallback'>;
|
|
41
|
+
export declare function resolveExecutablePath(command: string, options?: ResolveExecutablePathOptions): string;
|
|
32
42
|
export declare function resolveWindowsExecutablePath(command: string, env: NodeJS.ProcessEnv): string;
|
|
33
43
|
export declare function resolveWindowsSpawnProgramCandidate(params: ResolveWindowsSpawnProgramCandidateParams): WindowsSpawnProgramCandidate;
|
|
34
44
|
export declare function applyWindowsSpawnProgramPolicy(params: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `notification_reads` (
|
|
2
|
+
`notification_id` text NOT NULL,
|
|
3
|
+
`user_id` text NOT NULL,
|
|
4
|
+
`read_at` text NOT NULL,
|
|
5
|
+
PRIMARY KEY(`notification_id`, `user_id`)
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
CREATE TABLE IF NOT EXISTS `notifications` (
|
|
9
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
10
|
+
`workspace_id` text NOT NULL,
|
|
11
|
+
`agent_id` text,
|
|
12
|
+
`task_id` text,
|
|
13
|
+
`thread_id` text,
|
|
14
|
+
`source` text DEFAULT 'agent' NOT NULL,
|
|
15
|
+
`level` text DEFAULT 'info' NOT NULL,
|
|
16
|
+
`title` text NOT NULL,
|
|
17
|
+
`body` text,
|
|
18
|
+
`target_user_id` text,
|
|
19
|
+
`created_at` text NOT NULL,
|
|
20
|
+
`metadata` text
|
|
21
|
+
);
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
CREATE INDEX IF NOT EXISTS `idx_notifications_ws_created` ON `notifications` (`workspace_id`,"created_at" DESC);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `agent_suggestions` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`workspace_id` text NOT NULL,
|
|
4
|
+
`agent_id` text NOT NULL,
|
|
5
|
+
`task_id` text,
|
|
6
|
+
`type` text NOT NULL,
|
|
7
|
+
`status` text DEFAULT 'pending' NOT NULL,
|
|
8
|
+
`payload` text NOT NULL,
|
|
9
|
+
`applied_commit_sha` text,
|
|
10
|
+
`created_at` text NOT NULL,
|
|
11
|
+
`updated_at` text NOT NULL
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
CREATE INDEX IF NOT EXISTS `idx_agent_suggestions_ws_agent` ON `agent_suggestions` (`workspace_id`,`agent_id`);--> statement-breakpoint
|
|
15
|
+
CREATE INDEX IF NOT EXISTS `idx_agent_suggestions_ws_created` ON `agent_suggestions` (`workspace_id`,`created_at`);
|