strapi-plugin-ai-sdk 0.6.9 → 0.7.0

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.
@@ -106,5 +106,67 @@ declare const _default: {
106
106
  };
107
107
  };
108
108
  };
109
+ task: {
110
+ schema: {
111
+ kind: string;
112
+ collectionName: string;
113
+ info: {
114
+ singularName: string;
115
+ pluralName: string;
116
+ displayName: string;
117
+ };
118
+ options: {
119
+ draftAndPublish: boolean;
120
+ };
121
+ pluginOptions: {
122
+ "content-manager": {
123
+ visible: boolean;
124
+ };
125
+ "content-type-builder": {
126
+ visible: boolean;
127
+ };
128
+ };
129
+ attributes: {
130
+ title: {
131
+ type: string;
132
+ required: boolean;
133
+ };
134
+ description: {
135
+ type: string;
136
+ };
137
+ content: {
138
+ type: string;
139
+ };
140
+ done: {
141
+ type: string;
142
+ default: boolean;
143
+ };
144
+ priority: {
145
+ type: string;
146
+ enum: string[];
147
+ default: string;
148
+ };
149
+ consequence: {
150
+ type: string;
151
+ default: number;
152
+ min: number;
153
+ max: number;
154
+ };
155
+ impact: {
156
+ type: string;
157
+ default: number;
158
+ min: number;
159
+ max: number;
160
+ };
161
+ dueDate: {
162
+ type: string;
163
+ };
164
+ adminUserId: {
165
+ type: string;
166
+ required: boolean;
167
+ };
168
+ };
169
+ };
170
+ };
109
171
  };
110
172
  export default _default;
@@ -0,0 +1,63 @@
1
+ declare const _default: {
2
+ schema: {
3
+ kind: string;
4
+ collectionName: string;
5
+ info: {
6
+ singularName: string;
7
+ pluralName: string;
8
+ displayName: string;
9
+ };
10
+ options: {
11
+ draftAndPublish: boolean;
12
+ };
13
+ pluginOptions: {
14
+ "content-manager": {
15
+ visible: boolean;
16
+ };
17
+ "content-type-builder": {
18
+ visible: boolean;
19
+ };
20
+ };
21
+ attributes: {
22
+ title: {
23
+ type: string;
24
+ required: boolean;
25
+ };
26
+ description: {
27
+ type: string;
28
+ };
29
+ content: {
30
+ type: string;
31
+ };
32
+ done: {
33
+ type: string;
34
+ default: boolean;
35
+ };
36
+ priority: {
37
+ type: string;
38
+ enum: string[];
39
+ default: string;
40
+ };
41
+ consequence: {
42
+ type: string;
43
+ default: number;
44
+ min: number;
45
+ max: number;
46
+ };
47
+ impact: {
48
+ type: string;
49
+ default: number;
50
+ min: number;
51
+ max: number;
52
+ };
53
+ dueDate: {
54
+ type: string;
55
+ };
56
+ adminUserId: {
57
+ type: string;
58
+ required: boolean;
59
+ };
60
+ };
61
+ };
62
+ };
63
+ export default _default;
@@ -39,5 +39,13 @@ declare const _default: {
39
39
  update(ctx: import("koa").Context): Promise<void>;
40
40
  delete(ctx: import("koa").Context): Promise<void>;
41
41
  };
42
+ task: ({ strapi }: {
43
+ strapi: import("@strapi/types/dist/core").Strapi;
44
+ }) => {
45
+ find(ctx: import("koa").Context): Promise<void>;
46
+ create(ctx: import("koa").Context): Promise<void>;
47
+ update(ctx: import("koa").Context): Promise<void>;
48
+ delete(ctx: import("koa").Context): Promise<void>;
49
+ };
42
50
  };
43
51
  export default _default;
@@ -0,0 +1,11 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ import type { Context } from 'koa';
3
+ declare const taskController: ({ strapi }: {
4
+ strapi: Core.Strapi;
5
+ }) => {
6
+ find(ctx: Context): Promise<void>;
7
+ create(ctx: Context): Promise<void>;
8
+ update(ctx: Context): Promise<void>;
9
+ delete(ctx: Context): Promise<void>;
10
+ };
11
+ export default taskController;
@@ -77,6 +77,14 @@ declare const _default: {
77
77
  update(ctx: import("koa").Context): Promise<void>;
78
78
  delete(ctx: import("koa").Context): Promise<void>;
79
79
  };
80
+ task: ({ strapi }: {
81
+ strapi: import("@strapi/types/dist/core").Strapi;
82
+ }) => {
83
+ find(ctx: import("koa").Context): Promise<void>;
84
+ create(ctx: import("koa").Context): Promise<void>;
85
+ update(ctx: import("koa").Context): Promise<void>;
86
+ delete(ctx: import("koa").Context): Promise<void>;
87
+ };
80
88
  };
81
89
  routes: {
82
90
  'content-api': {
@@ -144,9 +152,6 @@ declare const _default: {
144
152
  };
145
153
  };
146
154
  contentTypes: {
147
- /**
148
- * Plugin server methods
149
- */
150
155
  conversation: {
151
156
  schema: {
152
157
  kind: string;
@@ -254,6 +259,68 @@ declare const _default: {
254
259
  };
255
260
  };
256
261
  };
262
+ task: {
263
+ schema: {
264
+ kind: string;
265
+ collectionName: string;
266
+ info: {
267
+ singularName: string;
268
+ pluralName: string;
269
+ displayName: string;
270
+ };
271
+ options: {
272
+ draftAndPublish: boolean;
273
+ };
274
+ pluginOptions: {
275
+ "content-manager": {
276
+ visible: boolean;
277
+ };
278
+ "content-type-builder": {
279
+ visible: boolean;
280
+ };
281
+ };
282
+ attributes: {
283
+ title: {
284
+ type: string;
285
+ required: boolean;
286
+ };
287
+ description: {
288
+ type: string;
289
+ };
290
+ content: {
291
+ type: string;
292
+ };
293
+ done: {
294
+ type: string;
295
+ default: boolean;
296
+ };
297
+ priority: {
298
+ type: string;
299
+ enum: string[];
300
+ default: string;
301
+ };
302
+ consequence: {
303
+ type: string;
304
+ default: number;
305
+ min: number;
306
+ max: number;
307
+ };
308
+ impact: {
309
+ type: string;
310
+ default: number;
311
+ min: number;
312
+ max: number;
313
+ };
314
+ dueDate: {
315
+ type: string;
316
+ };
317
+ adminUserId: {
318
+ type: string;
319
+ required: boolean;
320
+ };
321
+ };
322
+ };
323
+ };
257
324
  };
258
325
  policies: {};
259
326
  middlewares: {
@@ -13,6 +13,8 @@ export interface ToolDefinition {
13
13
  /** If true, tool is safe for unauthenticated public chat (read-only) */
14
14
  publicSafe?: boolean;
15
15
  }
16
+ /** Type alias for external plugin authors to import when contributing tools */
17
+ export type AiToolContribution = ToolDefinition;
16
18
  export declare class ToolRegistry {
17
19
  private readonly tools;
18
20
  register(def: ToolDefinition): void;
@@ -18,5 +18,7 @@ export { recallPublicMemories, recallPublicMemoriesSchema, recallPublicMemoriesD
18
18
  export type { RecallPublicMemoriesParams, RecallPublicMemoriesResult } from './recall-public-memories';
19
19
  export { aggregateContent, aggregateContentSchema, aggregateContentDescription } from './aggregate-content';
20
20
  export type { AggregateContentParams, AggregateContentResult } from './aggregate-content';
21
+ export { manageTask, manageTaskSchema, manageTaskDescription } from './manage-task';
22
+ export type { ManageTaskParams, ManageTaskResult } from './manage-task';
21
23
  export { resolveFieldPath, getDisplayField, isRelation, getRelationTarget, getSchema } from './schema-utils';
22
24
  export type { ResolvedField } from './schema-utils';
@@ -0,0 +1,43 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ import { z } from 'zod';
3
+ import type { ToolContext } from '../lib/tool-registry';
4
+ export declare const manageTaskSchema: z.ZodObject<{
5
+ action: z.ZodEnum<{
6
+ list: "list";
7
+ create: "create";
8
+ update: "update";
9
+ complete: "complete";
10
+ summary: "summary";
11
+ }>;
12
+ documentId: z.ZodOptional<z.ZodString>;
13
+ title: z.ZodOptional<z.ZodString>;
14
+ description: z.ZodOptional<z.ZodString>;
15
+ content: z.ZodOptional<z.ZodString>;
16
+ priority: z.ZodOptional<z.ZodEnum<{
17
+ low: "low";
18
+ medium: "medium";
19
+ high: "high";
20
+ urgent: "urgent";
21
+ }>>;
22
+ consequence: z.ZodOptional<z.ZodNumber>;
23
+ impact: z.ZodOptional<z.ZodNumber>;
24
+ dueDate: z.ZodOptional<z.ZodString>;
25
+ done: z.ZodOptional<z.ZodBoolean>;
26
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
+ }, z.core.$strip>;
28
+ export declare const manageTaskDescription = "Manage the user's task list. Create, update, complete, list, or summarize tasks. Tasks are scored by consequence \u00D7 impact to help prioritize what matters most.";
29
+ export type ManageTaskParams = z.infer<typeof manageTaskSchema>;
30
+ export interface ManageTaskResult {
31
+ success: boolean;
32
+ message: string;
33
+ status?: 'pending_confirmation';
34
+ proposed?: {
35
+ title: string;
36
+ description?: string;
37
+ content?: string;
38
+ priority: string;
39
+ dueDate: string | null;
40
+ };
41
+ data?: unknown;
42
+ }
43
+ export declare function manageTask(strapi: Core.Strapi, params: ManageTaskParams, context?: ToolContext): Promise<ManageTaskResult>;
@@ -0,0 +1,2 @@
1
+ import type { ToolDefinition } from '../../lib/tool-registry';
2
+ export declare const manageTaskTool: ToolDefinition;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.9",
2
+ "version": "0.7.0",
3
3
  "keywords": [
4
4
  "strapi",
5
5
  "strapi-plugin",