@acontext/acontext 0.0.10 → 0.0.11

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.
@@ -62,12 +62,29 @@ export declare const SessionSchema: z.ZodObject<{
62
62
  updated_at: z.ZodString;
63
63
  }, z.core.$strip>;
64
64
  export type Session = z.infer<typeof SessionSchema>;
65
+ /**
66
+ * TaskData represents the structured data stored in a task.
67
+ * This schema matches the TaskData model in acontext_core/schema/session/task.py
68
+ * and the Go API TaskData struct.
69
+ */
70
+ export declare const TaskDataSchema: z.ZodObject<{
71
+ task_description: z.ZodString;
72
+ progresses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
73
+ user_preferences: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
74
+ sop_thinking: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
+ }, z.core.$strip>;
76
+ export type TaskData = z.infer<typeof TaskDataSchema>;
65
77
  export declare const TaskSchema: z.ZodObject<{
66
78
  id: z.ZodString;
67
79
  session_id: z.ZodString;
68
80
  project_id: z.ZodString;
69
81
  order: z.ZodNumber;
70
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
82
+ data: z.ZodObject<{
83
+ task_description: z.ZodString;
84
+ progresses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
85
+ user_preferences: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
86
+ sop_thinking: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ }, z.core.$strip>;
71
88
  status: z.ZodString;
72
89
  is_planning: z.ZodBoolean;
73
90
  space_digested: z.ZodBoolean;
@@ -110,7 +127,12 @@ export declare const GetTasksOutputSchema: z.ZodObject<{
110
127
  session_id: z.ZodString;
111
128
  project_id: z.ZodString;
112
129
  order: z.ZodNumber;
113
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
130
+ data: z.ZodObject<{
131
+ task_description: z.ZodString;
132
+ progresses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
133
+ user_preferences: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
134
+ sop_thinking: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ }, z.core.$strip>;
114
136
  status: z.ZodString;
115
137
  is_planning: z.ZodBoolean;
116
138
  space_digested: z.ZodBoolean;
@@ -3,7 +3,7 @@
3
3
  * Type definitions for session, message, and task resources.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EditStrategySchema = exports.TokenLimitStrategySchema = exports.TokenLimitParamsSchema = exports.RemoveToolResultStrategySchema = exports.RemoveToolResultParamsSchema = exports.TokenCountsSchema = exports.LearningStatusSchema = exports.GetTasksOutputSchema = exports.GetMessagesOutputSchema = exports.PublicURLSchema = exports.ListSessionsOutputSchema = exports.TaskSchema = exports.SessionSchema = exports.MessageSchema = exports.PartSchema = exports.AssetSchema = void 0;
6
+ exports.EditStrategySchema = exports.TokenLimitStrategySchema = exports.TokenLimitParamsSchema = exports.RemoveToolResultStrategySchema = exports.RemoveToolResultParamsSchema = exports.TokenCountsSchema = exports.LearningStatusSchema = exports.GetTasksOutputSchema = exports.GetMessagesOutputSchema = exports.PublicURLSchema = exports.ListSessionsOutputSchema = exports.TaskSchema = exports.TaskDataSchema = exports.SessionSchema = exports.MessageSchema = exports.PartSchema = exports.AssetSchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  exports.AssetSchema = zod_1.z.object({
9
9
  bucket: zod_1.z.string(),
@@ -41,12 +41,23 @@ exports.SessionSchema = zod_1.z.object({
41
41
  created_at: zod_1.z.string(),
42
42
  updated_at: zod_1.z.string(),
43
43
  });
44
+ /**
45
+ * TaskData represents the structured data stored in a task.
46
+ * This schema matches the TaskData model in acontext_core/schema/session/task.py
47
+ * and the Go API TaskData struct.
48
+ */
49
+ exports.TaskDataSchema = zod_1.z.object({
50
+ task_description: zod_1.z.string(),
51
+ progresses: zod_1.z.array(zod_1.z.string()).nullable().optional(),
52
+ user_preferences: zod_1.z.array(zod_1.z.string()).nullable().optional(),
53
+ sop_thinking: zod_1.z.string().nullable().optional(),
54
+ });
44
55
  exports.TaskSchema = zod_1.z.object({
45
56
  id: zod_1.z.string(),
46
57
  session_id: zod_1.z.string(),
47
58
  project_id: zod_1.z.string(),
48
59
  order: zod_1.z.number(),
49
- data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
60
+ data: exports.TaskDataSchema,
50
61
  status: zod_1.z.string(),
51
62
  is_planning: zod_1.z.boolean(),
52
63
  space_digested: zod_1.z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontext/acontext",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "TypeScript SDK for the Acontext API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",