@kanyun-ai-infra/agenthub 1.15.0 → 1.16.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.
- package/CHANGELOG.md +14 -0
- package/README.md +5 -0
- package/dist/index.cjs +37 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +37 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
本文件从 1.12.0 开始记录;更早的版本见 git 历史中的 `chore(agenthub-sdk): release X.Y.Z` 提交。
|
|
4
4
|
|
|
5
|
+
## 1.16.0
|
|
6
|
+
|
|
7
|
+
Revision 读面改为宽容读者:服务端给 `workloads.get` / `getRevision` / `getVersion` 的响应新增字段时,已发布的客户端不再报错。这一版同时接受可选的 `sequence`,服务端读面带出后即可读取,无需再次升级 SDK。
|
|
8
|
+
|
|
9
|
+
### 新增与变化
|
|
10
|
+
|
|
11
|
+
- `PlatformRevision` 新增可选字段 `sequence`(正整数):每个 Agent(workload)内从 1 递增的人类可读版本序号,号可以不连续。当前服务端读面尚未返回该字段;在它上线前该字段恒为 `undefined`。
|
|
12
|
+
- `workloads.get` / `getRevision` / `getVersion` 的响应解析改为宽容读者:schema 未声明的字段被忽略(不报错,也不出现在结果里)。此前 revision 响应是 strict,服务端多一个字段就会让所有已发布客户端抛 `MALFORMED_PLATFORM_RESPONSE`。
|
|
13
|
+
- 请求 schema 不变:`publishRevision` / `applyRevisionManifest` 仍拒绝未知字段,行为与 1.15.0 相同。
|
|
14
|
+
|
|
15
|
+
### 迁移说明
|
|
16
|
+
|
|
17
|
+
- 无需迁移。升级是可选的,用于获得对服务端后续新增响应字段的兼容性;`sequence` 在服务端读面上线前读不到。
|
|
18
|
+
|
|
5
19
|
## 1.15.0
|
|
6
20
|
|
|
7
21
|
浏览器实时语音入口新增播放对齐、页面工具执行与播放输出节点;其余为随共享契约内联的变化。
|
package/README.md
CHANGED
|
@@ -151,6 +151,11 @@ Agents 和 runtime templates 都是 **project-scoped**。Version 必须在同一
|
|
|
151
151
|
|
|
152
152
|
> 本文一律用主词汇 **agent / version**;它们是底层 wire 名 `workload` / `revision`
|
|
153
153
|
> 的别名,SDK 两套都接受,规范名与别名同传会抛 `ALIAS_CONFLICT`,细节见下方「完整参考」。
|
|
154
|
+
>
|
|
155
|
+
> 读面响应是**宽容读者**:`agents.get` / `getVersion` / `getRevision` 的响应出现 SDK
|
|
156
|
+
> 未声明的字段时会被忽略,不会报错;服务端新增字段不需要客户端升级。1.16.0 起
|
|
157
|
+
> `PlatformRevision` 接受可选的 `sequence`(每个 Agent 内从 1 递增的版本序号,号可
|
|
158
|
+
> 不连续);服务端读面返回它之前,该字段为 `undefined`。
|
|
154
159
|
|
|
155
160
|
## 记忆(agenthub.memories)
|
|
156
161
|
|
package/dist/index.cjs
CHANGED
|
@@ -498,7 +498,8 @@ var EXECUTOR_FORMAT_REGISTRY = {
|
|
|
498
498
|
// `declaredMcpTools` allowlist. approvals: none (`bypassPermissions`).
|
|
499
499
|
capabilities: { resume: true, structuredOutput: false, toolFiltering: true, approvals: false },
|
|
500
500
|
// Today's behaviour: Claude Code runs every model the platform offers.
|
|
501
|
-
allowedModels: { kind: "any" }
|
|
501
|
+
allowedModels: { kind: "any" },
|
|
502
|
+
mcpMode: "native"
|
|
502
503
|
},
|
|
503
504
|
pi: {
|
|
504
505
|
descriptor: { kind: "harness", adapterId: "pi", protocolVersion: "1" },
|
|
@@ -519,7 +520,10 @@ var EXECUTOR_FORMAT_REGISTRY = {
|
|
|
519
520
|
},
|
|
520
521
|
// Provisional until #3843 / #3670: no model family decided yet, so none
|
|
521
522
|
// is offered (fails closed; pi is not publishable before then anyway).
|
|
522
|
-
allowedModels: { kind: "idPrefixes", idPrefixes: [] }
|
|
523
|
+
allowedModels: { kind: "idPrefixes", idPrefixes: [] },
|
|
524
|
+
// Pi's MCP goes through managed MCP only (owner 2026-09-28): no rush
|
|
525
|
+
// direct references, no self-loaded MCP client extension.
|
|
526
|
+
mcpMode: "bridge"
|
|
523
527
|
}
|
|
524
528
|
};
|
|
525
529
|
var ReservedExecutorValueSchema = import_zod5.z.never();
|
|
@@ -580,6 +584,10 @@ var RecordImageCapabilityDeclarationRequestSchema = import_zod5.z.object({
|
|
|
580
584
|
declaration: ImageCapabilityDeclarationSchema,
|
|
581
585
|
source: import_zod5.z.enum(IMAGE_CAPABILITY_DECLARATION_SOURCES)
|
|
582
586
|
}).strict();
|
|
587
|
+
var FrozenSessionExecutorSchema = import_zod5.z.object({
|
|
588
|
+
format: import_zod5.z.string().min(1),
|
|
589
|
+
protocolVersion: import_zod5.z.string()
|
|
590
|
+
});
|
|
583
591
|
var SESSION_ENVIRONMENT_OUTDATED = "SESSION_ENVIRONMENT_OUTDATED";
|
|
584
592
|
var SessionEnvironmentOutdatedPayloadSchema = import_zod5.z.object({
|
|
585
593
|
code: import_zod5.z.literal(SESSION_ENVIRONMENT_OUTDATED),
|
|
@@ -4158,6 +4166,24 @@ var WorkloadManifestErrorCodeSchema = import_zod4.z.enum([
|
|
|
4158
4166
|
// the `statusForManifestError` default) and additive-widening note as the
|
|
4159
4167
|
// four codes above.
|
|
4160
4168
|
"EXECUTOR_NOT_APPLICABLE_TO_LIVE",
|
|
4169
|
+
// HX-T7 (spec `pilot-v2-executor-host-contract.md` §6): a bridge-mode
|
|
4170
|
+
// executor's Revision whose frozen snapshot carries a non-platform MCP
|
|
4171
|
+
// source (rush `enabledMcpServers`). The bridge never connects those
|
|
4172
|
+
// entries, so publishing would silently drop them; the remediation is
|
|
4173
|
+
// managed MCP. Thrown by `applyRevisionManifest` (400, the
|
|
4174
|
+
// `statusForManifestError` default) and by the stage-binding gate (422,
|
|
4175
|
+
// control-plane `WorkloadStageServiceErrorCode`). Additive widening = patch.
|
|
4176
|
+
"EXECUTOR_NON_PLATFORM_MCP_UNSUPPORTED",
|
|
4177
|
+
// EXP-1c (spec `pilot-v2-executor-identity.md` §3, #3668 D6a): the merged,
|
|
4178
|
+
// normalised executor format's registry entry declares a worker contract
|
|
4179
|
+
// kind the Revision does not match (today every entry declares
|
|
4180
|
+
// `managed_agent`, so this fires on a `self_managed` Revision that
|
|
4181
|
+
// inherits a non-default executor — the revision-level snapshot key is
|
|
4182
|
+
// schema-blocked for self_managed, so the reachable channel is workload
|
|
4183
|
+
// `spec.defaults.executor` inheritance). Thrown by `applyRevisionManifest`
|
|
4184
|
+
// (400, the `statusForManifestError` default), judged in
|
|
4185
|
+
// `assertExecutorPublishGate` after EXP-1. Additive widening = patch.
|
|
4186
|
+
"EXECUTOR_NOT_APPLICABLE_TO_SELF_MANAGED",
|
|
4161
4187
|
// `format: live` publish admission (#4625 PR-1, spec
|
|
4162
4188
|
// pilot-v2-managed-agent-profile.md §11 MAP-VL3), both thrown by
|
|
4163
4189
|
// `applyRevisionManifest` and mapped to 400 by the default branch of
|
|
@@ -10022,12 +10048,13 @@ var PlatformRevisionSchema = import_zod66.z.object({
|
|
|
10022
10048
|
workloadSlug: WorkloadManifestNameSchema.optional(),
|
|
10023
10049
|
version: WorkloadManifestNameSchema,
|
|
10024
10050
|
runtimeSnapshotHash: import_zod66.z.string().nullable().optional(),
|
|
10025
|
-
createdAt: import_zod66.z.string().optional()
|
|
10026
|
-
|
|
10051
|
+
createdAt: import_zod66.z.string().optional(),
|
|
10052
|
+
sequence: import_zod66.z.number().int().positive().optional()
|
|
10053
|
+
}).strip();
|
|
10027
10054
|
var GetPlatformWorkloadResponseSchema = PlatformWorkloadSchema.extend({
|
|
10028
10055
|
kind: WorkloadKindSchema,
|
|
10029
10056
|
defaultRevision: PlatformRevisionSchema.nullable()
|
|
10030
|
-
});
|
|
10057
|
+
}).strip();
|
|
10031
10058
|
var GetPlatformRevisionResponseSchema = PlatformRevisionSchema;
|
|
10032
10059
|
var GetPlatformSessionResponseSchema = import_zod66.z.object({
|
|
10033
10060
|
id: import_zod66.z.string().uuid(),
|
|
@@ -13146,15 +13173,13 @@ var OnlineSessionPreconditionSchema = import_zod83.z.union([
|
|
|
13146
13173
|
fileExistsPrecondition,
|
|
13147
13174
|
toolCalledPrecondition
|
|
13148
13175
|
]);
|
|
13149
|
-
var
|
|
13150
|
-
error: "threshold is only valid on llm graders \u2014 boolean graders (transcript/reply/file/script) pass or fail, there is no score to threshold"
|
|
13151
|
-
}).optional();
|
|
13176
|
+
var optionalBooleanThreshold = import_zod83.z.number().min(0).max(1).optional();
|
|
13152
13177
|
var OnlineTranscriptGraderSchema = EvalTranscriptGraderSchema.pick({
|
|
13153
13178
|
type: true,
|
|
13154
13179
|
label: true
|
|
13155
13180
|
}).extend({
|
|
13156
13181
|
precondition: OnlineTurnPreconditionSchema.optional(),
|
|
13157
|
-
threshold:
|
|
13182
|
+
threshold: optionalBooleanThreshold,
|
|
13158
13183
|
expect: EvalTranscriptExpectSchema.pick({
|
|
13159
13184
|
completed: true,
|
|
13160
13185
|
forbiddenTools: true,
|
|
@@ -13166,7 +13191,7 @@ var OnlineTranscriptGraderSchema = EvalTranscriptGraderSchema.pick({
|
|
|
13166
13191
|
}).strict();
|
|
13167
13192
|
var OnlineReplyGraderSchema = EvalReplyGraderSchema.pick({ type: true, label: true }).extend({
|
|
13168
13193
|
precondition: OnlineTurnPreconditionSchema.optional(),
|
|
13169
|
-
threshold:
|
|
13194
|
+
threshold: optionalBooleanThreshold,
|
|
13170
13195
|
expect: EvalReplyExpectSchema.pick({ excludes: true, matches: true })
|
|
13171
13196
|
}).strict();
|
|
13172
13197
|
var OnlineLlmToolsSchema = EvalLlmToolsSchema;
|
|
@@ -13190,7 +13215,7 @@ var OnlineFileGraderSchema = import_zod83.z.object({
|
|
|
13190
13215
|
type: import_zod83.z.literal("file"),
|
|
13191
13216
|
label: EvalGraderLabelSchema,
|
|
13192
13217
|
precondition: OnlineSessionPreconditionSchema,
|
|
13193
|
-
threshold:
|
|
13218
|
+
threshold: optionalBooleanThreshold,
|
|
13194
13219
|
path: EvalRelativePathSchema,
|
|
13195
13220
|
expect: EvalReplyExpectSchema.pick({ excludes: true }).required()
|
|
13196
13221
|
}).strict();
|
|
@@ -13201,7 +13226,7 @@ var OnlineScriptGraderSchema = EvalScriptGraderSchema.pick({
|
|
|
13201
13226
|
timeout: true
|
|
13202
13227
|
}).extend({
|
|
13203
13228
|
precondition: OnlineSessionPreconditionSchema,
|
|
13204
|
-
threshold:
|
|
13229
|
+
threshold: optionalBooleanThreshold,
|
|
13205
13230
|
expect: EvalScriptExpectSchema.optional()
|
|
13206
13231
|
}).strict();
|
|
13207
13232
|
var OnlineTurnGraderSpecSchema = import_zod83.z.discriminatedUnion("type", [
|