@agent-phonon/protocol 0.2.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.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +24 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/json-schema/_index.json +3794 -0
  8. package/dist/json-schema/connect.hello.json +117 -0
  9. package/dist/json-schema/discovery.changed.json +190 -0
  10. package/dist/json-schema/discovery.get.json +183 -0
  11. package/dist/json-schema/discovery.list.json +182 -0
  12. package/dist/json-schema/document.prepare_upload.json +96 -0
  13. package/dist/json-schema/document.send.json +165 -0
  14. package/dist/json-schema/hook.fired.json +100 -0
  15. package/dist/json-schema/hook.resolve.json +96 -0
  16. package/dist/json-schema/interaction.cancel.json +48 -0
  17. package/dist/json-schema/interaction.request.json +376 -0
  18. package/dist/json-schema/interaction.response.json +68 -0
  19. package/dist/json-schema/project.create.json +89 -0
  20. package/dist/json-schema/project.get.json +76 -0
  21. package/dist/json-schema/project.git.deleteBranch.json +64 -0
  22. package/dist/json-schema/project.list.json +72 -0
  23. package/dist/json-schema/project.remove.json +69 -0
  24. package/dist/json-schema/project.worktree.create.json +88 -0
  25. package/dist/json-schema/project.worktree.list.json +77 -0
  26. package/dist/json-schema/project.worktree.remove.json +61 -0
  27. package/dist/json-schema/session.compress.json +72 -0
  28. package/dist/json-schema/session.create.json +128 -0
  29. package/dist/json-schema/session.inject.json +72 -0
  30. package/dist/json-schema/session.interrupt.json +58 -0
  31. package/dist/json-schema/session.list.json +127 -0
  32. package/dist/json-schema/session.send.json +132 -0
  33. package/dist/json-schema/session.status.json +94 -0
  34. package/dist/json-schema/session.switchModel.json +73 -0
  35. package/dist/json-schema/session.terminate.json +54 -0
  36. package/dist/json-schema/skill.install.json +171 -0
  37. package/dist/json-schema/skill.list.json +101 -0
  38. package/dist/json-schema/skill.uninstall.json +76 -0
  39. package/dist/json-schema/stream.ack.json +36 -0
  40. package/dist/json-schema/stream.event.json +381 -0
  41. package/dist/schemas/capabilities.d.ts +90 -0
  42. package/dist/schemas/capabilities.d.ts.map +1 -0
  43. package/dist/schemas/capabilities.js +59 -0
  44. package/dist/schemas/capabilities.js.map +1 -0
  45. package/dist/schemas/common.d.ts +66 -0
  46. package/dist/schemas/common.d.ts.map +1 -0
  47. package/dist/schemas/common.js +97 -0
  48. package/dist/schemas/common.js.map +1 -0
  49. package/dist/schemas/connect.d.ts +111 -0
  50. package/dist/schemas/connect.d.ts.map +1 -0
  51. package/dist/schemas/connect.js +46 -0
  52. package/dist/schemas/connect.js.map +1 -0
  53. package/dist/schemas/device.d.ts +221 -0
  54. package/dist/schemas/device.d.ts.map +1 -0
  55. package/dist/schemas/device.js +59 -0
  56. package/dist/schemas/device.js.map +1 -0
  57. package/dist/schemas/discovery.d.ts +892 -0
  58. package/dist/schemas/discovery.d.ts.map +1 -0
  59. package/dist/schemas/discovery.js +66 -0
  60. package/dist/schemas/discovery.js.map +1 -0
  61. package/dist/schemas/document.d.ts +351 -0
  62. package/dist/schemas/document.d.ts.map +1 -0
  63. package/dist/schemas/document.js +103 -0
  64. package/dist/schemas/document.js.map +1 -0
  65. package/dist/schemas/env.d.ts +265 -0
  66. package/dist/schemas/env.d.ts.map +1 -0
  67. package/dist/schemas/env.js +44 -0
  68. package/dist/schemas/env.js.map +1 -0
  69. package/dist/schemas/file.d.ts +274 -0
  70. package/dist/schemas/file.d.ts.map +1 -0
  71. package/dist/schemas/file.js +72 -0
  72. package/dist/schemas/file.js.map +1 -0
  73. package/dist/schemas/hook.d.ts +132 -0
  74. package/dist/schemas/hook.d.ts.map +1 -0
  75. package/dist/schemas/hook.js +58 -0
  76. package/dist/schemas/hook.js.map +1 -0
  77. package/dist/schemas/interaction.d.ts +1583 -0
  78. package/dist/schemas/interaction.d.ts.map +1 -0
  79. package/dist/schemas/interaction.js +112 -0
  80. package/dist/schemas/interaction.js.map +1 -0
  81. package/dist/schemas/jsonrpc.d.ts +314 -0
  82. package/dist/schemas/jsonrpc.d.ts.map +1 -0
  83. package/dist/schemas/jsonrpc.js +64 -0
  84. package/dist/schemas/jsonrpc.js.map +1 -0
  85. package/dist/schemas/methods.d.ts +3826 -0
  86. package/dist/schemas/methods.d.ts.map +1 -0
  87. package/dist/schemas/methods.js +311 -0
  88. package/dist/schemas/methods.js.map +1 -0
  89. package/dist/schemas/policy.d.ts +81 -0
  90. package/dist/schemas/policy.d.ts.map +1 -0
  91. package/dist/schemas/policy.js +66 -0
  92. package/dist/schemas/policy.js.map +1 -0
  93. package/dist/schemas/project.d.ts +506 -0
  94. package/dist/schemas/project.d.ts.map +1 -0
  95. package/dist/schemas/project.js +148 -0
  96. package/dist/schemas/project.js.map +1 -0
  97. package/dist/schemas/session.d.ts +730 -0
  98. package/dist/schemas/session.d.ts.map +1 -0
  99. package/dist/schemas/session.js +287 -0
  100. package/dist/schemas/session.js.map +1 -0
  101. package/dist/schemas/skill.d.ts +465 -0
  102. package/dist/schemas/skill.d.ts.map +1 -0
  103. package/dist/schemas/skill.js +103 -0
  104. package/dist/schemas/skill.js.map +1 -0
  105. package/dist/schemas/stream.d.ts +688 -0
  106. package/dist/schemas/stream.d.ts.map +1 -0
  107. package/dist/schemas/stream.js +133 -0
  108. package/dist/schemas/stream.js.map +1 -0
  109. package/package.json +52 -0
  110. package/src/index.ts +24 -0
  111. package/src/schemas/capabilities.ts +62 -0
  112. package/src/schemas/common.ts +119 -0
  113. package/src/schemas/connect.ts +50 -0
  114. package/src/schemas/device.ts +67 -0
  115. package/src/schemas/discovery.ts +80 -0
  116. package/src/schemas/document.ts +121 -0
  117. package/src/schemas/env.ts +60 -0
  118. package/src/schemas/file.ts +97 -0
  119. package/src/schemas/hook.ts +66 -0
  120. package/src/schemas/interaction.ts +135 -0
  121. package/src/schemas/jsonrpc.ts +80 -0
  122. package/src/schemas/methods.ts +414 -0
  123. package/src/schemas/policy.ts +71 -0
  124. package/src/schemas/project.ts +185 -0
  125. package/src/schemas/session.ts +336 -0
  126. package/src/schemas/skill.ts +121 -0
  127. package/src/schemas/stream.ts +149 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/schemas/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AAEH,kBAAkB;AAClB,eAAO,MAAM,SAAS;IACpB,6CAA6C;;IAE7C,eAAe;;IAEf,oDAAoD;;IAEpD,gCAAgC;;;;;;;;;;;;EAEhC,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,sBAAsB;AACtB,eAAO,MAAM,eAAe;;IAE1B,wCAAwC;;IAExC,2CAA2C;;IAE3C,gCAAgC;;IAEhC,uEAAuE;;IAEvE,wBAAwB;;IAExB,cAAc;;QAxBd,6CAA6C;;QAE7C,eAAe;;QAEf,oDAAoD;;QAEpD,gCAAgC;;;;;;;;;;;;;IAoBhC,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEjC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhB,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAG9D,eAAO,MAAM,mBAAmB;IAC9B,gBAAgB;;;;;;EAEhB,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB;;;QA1B9B,wCAAwC;;QAExC,2CAA2C;;QAE3C,gCAAgC;;QAEhC,uEAAuE;;QAEvE,wBAAwB;;QAExB,cAAc;;YA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uEAAuE;;QAEvE,wBAAwB;;QAExB,cAAc;;YAxBd,6CAA6C;;YAE7C,eAAe;;YAEf,oDAAoD;;YAEpD,gCAAgC;;;;;;;;;;;;;QAoBhC,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEjC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoChB,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { z } from "zod";
2
+ import { AgentId, Timestamp } from "./common.js";
3
+ import { AgentCapabilities } from "./capabilities.js";
4
+ /**
5
+ * Agent / 模型发现(design §5 / D14)。
6
+ *
7
+ * 发现 = 内部扫描机制(非协议)+ 对外暴露接口(属协议)。本文件只定义
8
+ * **对外接口**的数据形状:服务端借此感知「这台设备上哪些 agent 可用、
9
+ * 各自哪些模型可用」。
10
+ */
11
+ /** 单个模型的可用性描述。 */
12
+ export const ModelInfo = z.object({
13
+ /** 模型 id,session.create 的 `model` 入参取自这里。 */
14
+ id: z.string().min(1),
15
+ /** 展示名(可选)。 */
16
+ displayName: z.string().optional(),
17
+ /** 上下文窗口(token,若已知)。注意:以 phonon 实测/配置为准,不盲信后端返回。 */
18
+ contextWindow: z.number().int().positive().optional(),
19
+ /** 该模型当前是否可用(如鉴权过期会变 false)。 */
20
+ available: z.boolean().default(true),
21
+ });
22
+ /** 单个 agent 的发现条目。 */
23
+ export const AgentDescriptor = z.object({
24
+ agentId: AgentId,
25
+ /** 展示名,如 "Claude Code" / "OpenClaw"。 */
26
+ displayName: z.string().min(1),
27
+ /** 适配器内部名,如 "openclaw" / "claude-code"。 */
28
+ adapter: z.string().min(1),
29
+ /** 整体是否可用(已安装 + 可执行 + 凭证就绪)。 */
30
+ available: z.boolean(),
31
+ /** 不可用时的原因(如 "not_installed" / "not_logged_in" / "no_credentials")。 */
32
+ unavailableReason: z.string().optional(),
33
+ /** agent 自身版本(若可探测)。 */
34
+ version: z.string().optional(),
35
+ /** 可用模型列表。 */
36
+ models: z.array(ModelInfo),
37
+ /** 能力声明(随 discovery 暴露,见 §7)。 */
38
+ capabilities: AgentCapabilities,
39
+ /** 最近一次扫描时间。 */
40
+ scannedAt: Timestamp.optional(),
41
+ });
42
+ // --- discovery.list ---
43
+ export const DiscoveryListParams = z.object({
44
+ /** 可选:只看可用的。 */
45
+ availableOnly: z.boolean().optional(),
46
+ });
47
+ export const DiscoveryListResult = z.object({
48
+ agents: z.array(AgentDescriptor),
49
+ });
50
+ // --- discovery.get ---
51
+ export const DiscoveryGetParams = z.object({
52
+ agentId: AgentId,
53
+ });
54
+ export const DiscoveryGetResult = z.object({
55
+ agent: AgentDescriptor,
56
+ });
57
+ // --- discovery.changed (phonon -> server 主动推送,notification) ---
58
+ export const DiscoveryChangedParams = z.object({
59
+ /** 变更类型:agent 上/下线、模型增减、能力变化。 */
60
+ kind: z.enum(["agent_added", "agent_removed", "agent_updated", "models_changed"]),
61
+ agentId: AgentId,
62
+ /** 变更后的完整快照(可选,便于服务端直接更新缓存)。 */
63
+ snapshot: AgentDescriptor.optional(),
64
+ at: Timestamp,
65
+ });
66
+ //# sourceMappingURL=discovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/schemas/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;GAMG;AAEH,kBAAkB;AAClB,MAAM,CAAC,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QAAQ,EAAE;CACtC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACjC,CAAC,CAAC;AAGH,wBAAwB;AACxB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,eAAe;CACvB,CAAC,CAAC;AAGH,iEAAiE;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,iCAAiC;IACjC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;IACjF,OAAO,EAAE,OAAO;IAChB,gCAAgC;IAChC,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAAE;IACpC,EAAE,EAAE,SAAS;CACd,CAAC,CAAC"}
@@ -0,0 +1,351 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * 文档交换协议(design 平面③ / D20)。
4
+ *
5
+ * 场景:agent 需要/被要求发送本地文档时,在输出里 emit 一个**指令**(skill 教的格式,
6
+ * 见 DocumentDirective),phonon 解析后**负责读取本地文件**,打包成附件/其他形式发到服务端。
7
+ * 也就是说:agent 只说「路径」,读盘 + 传输由 phonon 这一层兜。
8
+ *
9
+ * 两个层次要分清:
10
+ * - DocumentDirective :agent ↔ phonon 的指令(含本地 path,skill 教)
11
+ * - document.send :phonon ↔ server 的线协议(含真实内容/附件)
12
+ */
13
+ /** 文档用途/形式。 */
14
+ export declare const DocumentKind: z.ZodEnum<["attachment", "document", "image", "file"]>;
15
+ export type DocumentKind = z.infer<typeof DocumentKind>;
16
+ /** 内容承载方式:小文件内联,大文件用 ref 走分块传输(具体待定)。 */
17
+ export declare const DocumentContent: z.ZodUnion<[z.ZodObject<{
18
+ encoding: z.ZodLiteral<"base64">;
19
+ data: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ encoding: "base64";
22
+ data: string;
23
+ }, {
24
+ encoding: "base64";
25
+ data: string;
26
+ }>, z.ZodObject<{
27
+ encoding: z.ZodLiteral<"utf8">;
28
+ data: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ encoding: "utf8";
31
+ data: string;
32
+ }, {
33
+ encoding: "utf8";
34
+ data: string;
35
+ }>, z.ZodObject<{
36
+ ref: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ ref: string;
39
+ }, {
40
+ ref: string;
41
+ }>]>;
42
+ export type DocumentContent = z.infer<typeof DocumentContent>;
43
+ /**
44
+ * agent 在输出里 emit 的指令格式(skill 教)——只含本地路径与元信息,
45
+ * phonon 据此读本地文件。**不直接进线协议。**
46
+ *
47
+ * 安全(D27 policy):默认 **project-scoped**——路径必须在绑定项目/worktree 目录内,
48
+ * 越界需 tenant policy 显式 `allowExternalDocuments`;命中 denyPathPatterns 一律拒。
49
+ */
50
+ export declare const DocumentDirective: z.ZodObject<{
51
+ /** 文件路径(默认相对于项目/worktree 根;绝对路径需 policy 允许且在范围内)。 */
52
+ path: z.ZodString;
53
+ /** 可选:覆盖文件名(默认取 path 的 basename)。 */
54
+ name: z.ZodOptional<z.ZodString>;
55
+ kind: z.ZodOptional<z.ZodEnum<["attachment", "document", "image", "file"]>>;
56
+ caption: z.ZodOptional<z.ZodString>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ path: string;
59
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
60
+ name?: string | undefined;
61
+ caption?: string | undefined;
62
+ }, {
63
+ path: string;
64
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
65
+ name?: string | undefined;
66
+ caption?: string | undefined;
67
+ }>;
68
+ export type DocumentDirective = z.infer<typeof DocumentDirective>;
69
+ /** 单个文档的线上描述(phonon 读完本地文件后封装)。 */
70
+ export declare const DocumentDescriptor: z.ZodObject<{
71
+ name: z.ZodString;
72
+ /** 相对项目根的路径(审计/去重用;不暴露设备绝对路径)。 */
73
+ relativePath: z.ZodOptional<z.ZodString>;
74
+ mimeType: z.ZodOptional<z.ZodString>;
75
+ kind: z.ZodDefault<z.ZodEnum<["attachment", "document", "image", "file"]>>;
76
+ caption: z.ZodOptional<z.ZodString>;
77
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
78
+ /** 内容 sha256(完整性校验 / 去重)。 */
79
+ sha256: z.ZodOptional<z.ZodString>;
80
+ content: z.ZodUnion<[z.ZodObject<{
81
+ encoding: z.ZodLiteral<"base64">;
82
+ data: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ encoding: "base64";
85
+ data: string;
86
+ }, {
87
+ encoding: "base64";
88
+ data: string;
89
+ }>, z.ZodObject<{
90
+ encoding: z.ZodLiteral<"utf8">;
91
+ data: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ encoding: "utf8";
94
+ data: string;
95
+ }, {
96
+ encoding: "utf8";
97
+ data: string;
98
+ }>, z.ZodObject<{
99
+ ref: z.ZodString;
100
+ }, "strip", z.ZodTypeAny, {
101
+ ref: string;
102
+ }, {
103
+ ref: string;
104
+ }>]>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ kind: "attachment" | "document" | "image" | "file";
107
+ content: {
108
+ encoding: "base64";
109
+ data: string;
110
+ } | {
111
+ encoding: "utf8";
112
+ data: string;
113
+ } | {
114
+ ref: string;
115
+ };
116
+ name: string;
117
+ caption?: string | undefined;
118
+ relativePath?: string | undefined;
119
+ mimeType?: string | undefined;
120
+ sizeBytes?: number | undefined;
121
+ sha256?: string | undefined;
122
+ }, {
123
+ content: {
124
+ encoding: "base64";
125
+ data: string;
126
+ } | {
127
+ encoding: "utf8";
128
+ data: string;
129
+ } | {
130
+ ref: string;
131
+ };
132
+ name: string;
133
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
134
+ caption?: string | undefined;
135
+ relativePath?: string | undefined;
136
+ mimeType?: string | undefined;
137
+ sizeBytes?: number | undefined;
138
+ sha256?: string | undefined;
139
+ }>;
140
+ export type DocumentDescriptor = z.infer<typeof DocumentDescriptor>;
141
+ export declare const DocumentSendParams: z.ZodObject<{
142
+ /** 关联会话(通常有;纯设备级发送可省)。 */
143
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
144
+ /** 关联轮次(若在某轮对话内触发)。 */
145
+ turnId: z.ZodOptional<z.ZodString>;
146
+ documents: z.ZodArray<z.ZodObject<{
147
+ name: z.ZodString;
148
+ /** 相对项目根的路径(审计/去重用;不暴露设备绝对路径)。 */
149
+ relativePath: z.ZodOptional<z.ZodString>;
150
+ mimeType: z.ZodOptional<z.ZodString>;
151
+ kind: z.ZodDefault<z.ZodEnum<["attachment", "document", "image", "file"]>>;
152
+ caption: z.ZodOptional<z.ZodString>;
153
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
154
+ /** 内容 sha256(完整性校验 / 去重)。 */
155
+ sha256: z.ZodOptional<z.ZodString>;
156
+ content: z.ZodUnion<[z.ZodObject<{
157
+ encoding: z.ZodLiteral<"base64">;
158
+ data: z.ZodString;
159
+ }, "strip", z.ZodTypeAny, {
160
+ encoding: "base64";
161
+ data: string;
162
+ }, {
163
+ encoding: "base64";
164
+ data: string;
165
+ }>, z.ZodObject<{
166
+ encoding: z.ZodLiteral<"utf8">;
167
+ data: z.ZodString;
168
+ }, "strip", z.ZodTypeAny, {
169
+ encoding: "utf8";
170
+ data: string;
171
+ }, {
172
+ encoding: "utf8";
173
+ data: string;
174
+ }>, z.ZodObject<{
175
+ ref: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ ref: string;
178
+ }, {
179
+ ref: string;
180
+ }>]>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ kind: "attachment" | "document" | "image" | "file";
183
+ content: {
184
+ encoding: "base64";
185
+ data: string;
186
+ } | {
187
+ encoding: "utf8";
188
+ data: string;
189
+ } | {
190
+ ref: string;
191
+ };
192
+ name: string;
193
+ caption?: string | undefined;
194
+ relativePath?: string | undefined;
195
+ mimeType?: string | undefined;
196
+ sizeBytes?: number | undefined;
197
+ sha256?: string | undefined;
198
+ }, {
199
+ content: {
200
+ encoding: "base64";
201
+ data: string;
202
+ } | {
203
+ encoding: "utf8";
204
+ data: string;
205
+ } | {
206
+ ref: string;
207
+ };
208
+ name: string;
209
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
210
+ caption?: string | undefined;
211
+ relativePath?: string | undefined;
212
+ mimeType?: string | undefined;
213
+ sizeBytes?: number | undefined;
214
+ sha256?: string | undefined;
215
+ }>, "many">;
216
+ at: z.ZodString;
217
+ }, "strip", z.ZodTypeAny, {
218
+ at: string;
219
+ documents: {
220
+ kind: "attachment" | "document" | "image" | "file";
221
+ content: {
222
+ encoding: "base64";
223
+ data: string;
224
+ } | {
225
+ encoding: "utf8";
226
+ data: string;
227
+ } | {
228
+ ref: string;
229
+ };
230
+ name: string;
231
+ caption?: string | undefined;
232
+ relativePath?: string | undefined;
233
+ mimeType?: string | undefined;
234
+ sizeBytes?: number | undefined;
235
+ sha256?: string | undefined;
236
+ }[];
237
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
238
+ turnId?: string | undefined;
239
+ }, {
240
+ at: string;
241
+ documents: {
242
+ content: {
243
+ encoding: "base64";
244
+ data: string;
245
+ } | {
246
+ encoding: "utf8";
247
+ data: string;
248
+ } | {
249
+ ref: string;
250
+ };
251
+ name: string;
252
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
253
+ caption?: string | undefined;
254
+ relativePath?: string | undefined;
255
+ mimeType?: string | undefined;
256
+ sizeBytes?: number | undefined;
257
+ sha256?: string | undefined;
258
+ }[];
259
+ sessionId?: string | undefined;
260
+ turnId?: string | undefined;
261
+ }>;
262
+ export type DocumentSendParams = z.infer<typeof DocumentSendParams>;
263
+ export declare const DocumentSendResult: z.ZodObject<{
264
+ delivered: z.ZodArray<z.ZodObject<{
265
+ name: z.ZodString;
266
+ ok: z.ZodBoolean;
267
+ /** 服务端落地引用(如云文档 token / 附件 id)。 */
268
+ serverRef: z.ZodOptional<z.ZodString>;
269
+ error: z.ZodOptional<z.ZodString>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ name: string;
272
+ ok: boolean;
273
+ error?: string | undefined;
274
+ serverRef?: string | undefined;
275
+ }, {
276
+ name: string;
277
+ ok: boolean;
278
+ error?: string | undefined;
279
+ serverRef?: string | undefined;
280
+ }>, "many">;
281
+ }, "strip", z.ZodTypeAny, {
282
+ delivered: {
283
+ name: string;
284
+ ok: boolean;
285
+ error?: string | undefined;
286
+ serverRef?: string | undefined;
287
+ }[];
288
+ }, {
289
+ delivered: {
290
+ name: string;
291
+ ok: boolean;
292
+ error?: string | undefined;
293
+ serverRef?: string | undefined;
294
+ }[];
295
+ }>;
296
+ export type DocumentSendResult = z.infer<typeof DocumentSendResult>;
297
+ export declare const DocumentPrepareUploadParams: z.ZodObject<{
298
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
299
+ turnId: z.ZodOptional<z.ZodString>;
300
+ filename: z.ZodString;
301
+ sizeBytes: z.ZodNumber;
302
+ mimeType: z.ZodOptional<z.ZodString>;
303
+ sha256: z.ZodOptional<z.ZodString>;
304
+ kind: z.ZodDefault<z.ZodEnum<["attachment", "document", "image", "file"]>>;
305
+ at: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ at: string;
308
+ kind: "attachment" | "document" | "image" | "file";
309
+ sizeBytes: number;
310
+ filename: string;
311
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
312
+ turnId?: string | undefined;
313
+ mimeType?: string | undefined;
314
+ sha256?: string | undefined;
315
+ }, {
316
+ at: string;
317
+ sizeBytes: number;
318
+ filename: string;
319
+ sessionId?: string | undefined;
320
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
321
+ turnId?: string | undefined;
322
+ mimeType?: string | undefined;
323
+ sha256?: string | undefined;
324
+ }>;
325
+ export type DocumentPrepareUploadParams = z.infer<typeof DocumentPrepareUploadParams>;
326
+ export declare const DocumentPrepareUploadResult: z.ZodObject<{
327
+ /** 上传句柄,上传成功后回填到 DocumentContent.ref。 */
328
+ uploadRef: z.ZodString;
329
+ /** server 给的 HTTP 上传地址(预签名 URL 等)。 */
330
+ uploadUrl: z.ZodString;
331
+ /** HTTP 方法(默认 PUT)。 */
332
+ method: z.ZodDefault<z.ZodEnum<["PUT", "POST"]>>;
333
+ /** 需携带的额外请求头。 */
334
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
335
+ /** 上传地址过期时间。 */
336
+ expiresAt: z.ZodOptional<z.ZodString>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ uploadRef: string;
339
+ uploadUrl: string;
340
+ method: "PUT" | "POST";
341
+ headers?: Record<string, string> | undefined;
342
+ expiresAt?: string | undefined;
343
+ }, {
344
+ uploadRef: string;
345
+ uploadUrl: string;
346
+ method?: "PUT" | "POST" | undefined;
347
+ headers?: Record<string, string> | undefined;
348
+ expiresAt?: string | undefined;
349
+ }>;
350
+ export type DocumentPrepareUploadResult = z.infer<typeof DocumentPrepareUploadResult>;
351
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/schemas/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;GAUG;AAEH,eAAe;AACf,eAAO,MAAM,YAAY,wDAKvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,yCAAyC;AACzC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;IAI1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAA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BAAgB;;;;;;;;;;;;;;EAEhB,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { z } from "zod";
2
+ import { SessionId, Timestamp } from "./common.js";
3
+ /**
4
+ * 文档交换协议(design 平面③ / D20)。
5
+ *
6
+ * 场景:agent 需要/被要求发送本地文档时,在输出里 emit 一个**指令**(skill 教的格式,
7
+ * 见 DocumentDirective),phonon 解析后**负责读取本地文件**,打包成附件/其他形式发到服务端。
8
+ * 也就是说:agent 只说「路径」,读盘 + 传输由 phonon 这一层兜。
9
+ *
10
+ * 两个层次要分清:
11
+ * - DocumentDirective :agent ↔ phonon 的指令(含本地 path,skill 教)
12
+ * - document.send :phonon ↔ server 的线协议(含真实内容/附件)
13
+ */
14
+ /** 文档用途/形式。 */
15
+ export const DocumentKind = z.enum([
16
+ "attachment", // 通用附件
17
+ "document", // 富文本文档(如 .md → 服务端可转云文档)
18
+ "image", // 图片
19
+ "file", // 其他普通文件
20
+ ]);
21
+ /** 内容承载方式:小文件内联,大文件用 ref 走分块传输(具体待定)。 */
22
+ export const DocumentContent = z.union([
23
+ z.object({ encoding: z.literal("base64"), data: z.string() }),
24
+ z.object({ encoding: z.literal("utf8"), data: z.string() }),
25
+ z.object({ ref: z.string() }), // 分块传输句柄(大文件,开放问题)
26
+ ]);
27
+ /**
28
+ * agent 在输出里 emit 的指令格式(skill 教)——只含本地路径与元信息,
29
+ * phonon 据此读本地文件。**不直接进线协议。**
30
+ *
31
+ * 安全(D27 policy):默认 **project-scoped**——路径必须在绑定项目/worktree 目录内,
32
+ * 越界需 tenant policy 显式 `allowExternalDocuments`;命中 denyPathPatterns 一律拒。
33
+ */
34
+ export const DocumentDirective = z.object({
35
+ /** 文件路径(默认相对于项目/worktree 根;绝对路径需 policy 允许且在范围内)。 */
36
+ path: z.string().min(1),
37
+ /** 可选:覆盖文件名(默认取 path 的 basename)。 */
38
+ name: z.string().optional(),
39
+ kind: DocumentKind.optional(),
40
+ caption: z.string().optional(),
41
+ });
42
+ /** 单个文档的线上描述(phonon 读完本地文件后封装)。 */
43
+ export const DocumentDescriptor = z.object({
44
+ name: z.string().min(1),
45
+ /** 相对项目根的路径(审计/去重用;不暴露设备绝对路径)。 */
46
+ relativePath: z.string().optional(),
47
+ mimeType: z.string().optional(),
48
+ kind: DocumentKind.default("file"),
49
+ caption: z.string().optional(),
50
+ sizeBytes: z.number().int().nonnegative().optional(),
51
+ /** 内容 sha256(完整性校验 / 去重)。 */
52
+ sha256: z.string().optional(),
53
+ content: DocumentContent,
54
+ });
55
+ // --- document.send(phonon → server)---
56
+ export const DocumentSendParams = z.object({
57
+ /** 关联会话(通常有;纯设备级发送可省)。 */
58
+ sessionId: SessionId.optional(),
59
+ /** 关联轮次(若在某轮对话内触发)。 */
60
+ turnId: z.string().optional(),
61
+ documents: z.array(DocumentDescriptor).min(1),
62
+ at: Timestamp,
63
+ });
64
+ export const DocumentSendResult = z.object({
65
+ delivered: z.array(z.object({
66
+ name: z.string(),
67
+ ok: z.boolean(),
68
+ /** 服务端落地引用(如云文档 token / 附件 id)。 */
69
+ serverRef: z.string().optional(),
70
+ error: z.string().optional(),
71
+ })),
72
+ });
73
+ // ===========================================================================
74
+ // 大文件:凭证上传(P1-6 / Gemini#2)
75
+ // 不走 WS 发文件主体(避免内存暴涨/断线重传痛),而是:
76
+ // phonon → document.prepare_upload {filename,size,mime,sha256}
77
+ // server → 返回一个 HTTP 上传地址(预签名 URL / 一次性 token)
78
+ // phonon 本地跑标准 HTTP POST(multipart/流式/断点续传)
79
+ // 上传成功后用 document.send 用 ref 关联回 session
80
+ // ===========================================================================
81
+ export const DocumentPrepareUploadParams = z.object({
82
+ sessionId: SessionId.optional(),
83
+ turnId: z.string().optional(),
84
+ filename: z.string().min(1),
85
+ sizeBytes: z.number().int().nonnegative(),
86
+ mimeType: z.string().optional(),
87
+ sha256: z.string().optional(),
88
+ kind: DocumentKind.default("file"),
89
+ at: Timestamp,
90
+ });
91
+ export const DocumentPrepareUploadResult = z.object({
92
+ /** 上传句柄,上传成功后回填到 DocumentContent.ref。 */
93
+ uploadRef: z.string(),
94
+ /** server 给的 HTTP 上传地址(预签名 URL 等)。 */
95
+ uploadUrl: z.string(),
96
+ /** HTTP 方法(默认 PUT)。 */
97
+ method: z.enum(["PUT", "POST"]).default("PUT"),
98
+ /** 需携带的额外请求头。 */
99
+ headers: z.record(z.string()).optional(),
100
+ /** 上传地址过期时间。 */
101
+ expiresAt: Timestamp.optional(),
102
+ });
103
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/schemas/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;GAUG;AAEH,eAAe;AACf,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,YAAY,EAAE,OAAO;IACrB,UAAU,EAAE,0BAA0B;IACtC,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAGH,yCAAyC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC7D,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC3D,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,E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