@acontext/acontext 0.1.8 → 0.1.10

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.
@@ -50,7 +50,7 @@ export interface ClaudeAgentStorageOptions {
50
50
  sessionId?: string;
51
51
  /** Optional user identifier passed to `sessions.create()`. */
52
52
  user?: string;
53
- /** Whether to store ThinkingBlock content as text blocks. Default: false. */
53
+ /** Whether to store ThinkingBlock content as native thinking blocks. Default: false. */
54
54
  includeThinking?: boolean;
55
55
  /**
56
56
  * Optional error callback invoked when `storeMessage` raises.
@@ -127,7 +127,11 @@ function convertBlock(block, role, includeThinking) {
127
127
  if (!thinkingText) {
128
128
  return null; // empty thinking text
129
129
  }
130
- return { type: 'text', text: thinkingText };
130
+ return {
131
+ type: 'thinking',
132
+ thinking: thinkingText,
133
+ signature: block.signature ?? '',
134
+ };
131
135
  }
132
136
  case 'tool_use': {
133
137
  if (role !== 'assistant') {
@@ -11,6 +11,10 @@ export declare const AssetSchema: z.ZodObject<{
11
11
  size_b: z.ZodNumber;
12
12
  }, z.core.$strip>;
13
13
  export type Asset = z.infer<typeof AssetSchema>;
14
+ /**
15
+ * Message part schema.
16
+ * Part type is one of: 'text', 'image', 'audio', 'video', 'file', 'tool-call', 'tool-result', 'data', 'thinking'.
17
+ */
14
18
  export declare const PartSchema: z.ZodObject<{
15
19
  type: z.ZodString;
16
20
  text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -13,6 +13,10 @@ exports.AssetSchema = zod_1.z.object({
13
13
  mime: zod_1.z.string(),
14
14
  size_b: zod_1.z.number(),
15
15
  });
16
+ /**
17
+ * Message part schema.
18
+ * Part type is one of: 'text', 'image', 'audio', 'video', 'file', 'tool-call', 'tool-result', 'data', 'thinking'.
19
+ */
16
20
  exports.PartSchema = zod_1.z.object({
17
21
  type: zod_1.z.string(),
18
22
  text: zod_1.z.string().nullable().optional(),
@@ -12,6 +12,7 @@ export declare const SkillSchema: z.ZodObject<{
12
12
  user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  name: z.ZodString;
14
14
  description: z.ZodString;
15
+ disk_id: z.ZodString;
15
16
  file_index: z.ZodArray<z.ZodObject<{
16
17
  path: z.ZodString;
17
18
  mime: z.ZodString;
@@ -15,6 +15,7 @@ exports.SkillSchema = zod_1.z.object({
15
15
  user_id: zod_1.z.string().nullable().optional(),
16
16
  name: zod_1.z.string(),
17
17
  description: zod_1.z.string(),
18
+ disk_id: zod_1.z.string(),
18
19
  file_index: zod_1.z.array(exports.FileInfoSchema),
19
20
  meta: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable(),
20
21
  created_at: zod_1.z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontext/acontext",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "TypeScript SDK for the Acontext API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",