@kanyun-ai-infra/agenthub 1.35.0 → 1.35.1

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  本文件从 1.12.0 开始记录;更早的版本见 git 历史中的 `chore(agenthub-sdk): release X.Y.Z` 提交。
4
4
 
5
+ ## 1.35.1
6
+
7
+ - `sessions.create` 允许同时提供 `stage`、`revisionId`(或 `versionId`)、`environmentId` 和 `environmentVersion`。在已部署此能力的服务端,显式环境版本与槽位实际解析版本相同时可以创建带 stage 的会话。版本不匹配返回 409 `STAGE_REVISION_MISMATCH`,`details.mismatches` 包含 `environmentVersion`。同键重放沿用原会话,仍按其冻结版本校验请求。1.35.0 在发送请求前拒绝四字段组合,旧服务端收到组合后仍返回 400 `VALIDATION_ERROR`。
8
+
5
9
  ## 1.35.0
6
10
 
7
11
  - 新增 `evals.listOnlineSamples({ projectId, sessionId, turnId?, cursor?, limit? })`(`GET /api/eval-online/samples`,scope `eval:read`):按会话(可选到轮)读在线采样分数,每条带 `graderKey`、`level`、`status`、`score`、`judgeIdentity`、`engineVersion` 与 `samplingTier`(1 / 2,按 `level` + `graderType` 判,不按 `engineVersion`)。会话不存在或不属于该项目回 404 `SESSION_NOT_FOUND`,项目不在 token 范围回 403。新增导出 `EvalOnlineSessionSamplesResponseReadSchema`与类型 `EvalOnlineSessionSamplesResponseRead` / `OnlineSessionScoreSampleRead`。需要服务端已部署该路由。
package/dist/index.cjs CHANGED
@@ -668,6 +668,8 @@ var EXECUTOR_FORMAT_REGISTRY = {
668
668
  adapterVersion: null,
669
669
  sectionKey: "claudeCode",
670
670
  workerContractKind: "managed_agent",
671
+ instructionsFile: "CLAUDE.md",
672
+ localDevRunnable: true,
671
673
  // resume: followup CLI resume + mid-stream recovery. toolFiltering: the
672
674
  // `declaredMcpTools` allowlist. approvals: none (`bypassPermissions`).
673
675
  capabilities: { resume: true, structuredOutput: false, toolFiltering: true, approvals: false },
@@ -697,6 +699,8 @@ var EXECUTOR_FORMAT_REGISTRY = {
697
699
  adapterVersion: "1.0.154",
698
700
  sectionKey: "pi",
699
701
  workerContractKind: "managed_agent",
702
+ instructionsFile: "AGENTS.md",
703
+ localDevRunnable: false,
700
704
  // Provisional until #3670 S0: only `structuredOutput: false` is decided
701
705
  // (#3670 2026-09-24). The rest are `false` because an unconfirmed `true`
702
706
  // would let EXP-3 accept a capability pi may not have; `false` fails closed.
@@ -745,6 +749,8 @@ var EXECUTOR_FORMAT_REGISTRY = {
745
749
  adapterVersion: "0.2.2-rc.1",
746
750
  sectionKey: "dsh",
747
751
  workerContractKind: "managed_agent",
752
+ instructionsFile: "AGENTS.md",
753
+ localDevRunnable: false,
748
754
  // All `false` until the executor lands and each is verified: an
749
755
  // unconfirmed `true` would let EXP-3 accept a capability dsh may not
750
756
  // have; `false` fails closed (same rule as pi's provisional entry).
@@ -5263,14 +5269,15 @@ var CreateSessionRequestSchema = import_zod16.z.object({
5263
5269
  /**
5264
5270
  * #5764 / F6 — 钉 `revisionId` 起会话时显式指定 environment(`runtime_templates`
5265
5271
  * 行 id)。不传 = 现行为(pin 路径 environment 为 null,用 revision 快照的模板)。
5266
- * 只在带 `revisionId` 时接受(refine `ENVIRONMENT_REQUIRES_REVISION_PIN`);与 `stage`
5267
- * 同传仍被拒——stage 路径的环境来自槽位绑定。服务端按建会话的新引用重做可引用性
5268
- * 校验(同项目或平台共享、未归档),读不到的环境拒绝。
5272
+ * 只在带 `revisionId` 时接受(refine `ENVIRONMENT_REQUIRES_REVISION_PIN`)。
5273
+ * 同传 `stage` 时,断言环境 ID 等于槽位绑定。服务端按建会话的新引用重做
5274
+ * 可引用性校验(同项目或平台共享、未归档),读不到的环境拒绝。
5269
5275
  */
5270
5276
  environmentId: import_zod16.z.string().uuid().optional(),
5271
5277
  /**
5272
5278
  * 与 {@link environmentId} 配对的版本号。不传 = 解析时该环境的当前可服务版本,
5273
- * 实际版本冻进会话(与槽位路径同)。传了而不存在 / 不可服务 → 拒绝,不退到 tip。
5279
+ * 实际版本冻进会话。纯 pin 指定不存在或不可服务的版本时拒绝。
5280
+ * 同传 `stage` 时,显式版本须等于槽位实际解析出的版本。
5274
5281
  */
5275
5282
  environmentVersion: import_zod16.z.number().int().positive().optional(),
5276
5283
  /**
@@ -5567,10 +5574,13 @@ var CreateSessionRequestSchema = import_zod16.z.object({
5567
5574
  }).refine((data) => data.environmentVersion === void 0 || data.environmentId !== void 0, {
5568
5575
  message: "environmentVersion requires environmentId",
5569
5576
  path: ["environmentVersion"]
5570
- }).refine((data) => data.environmentVersion === void 0 || data.stage === void 0, {
5571
- message: "ENVIRONMENT_REQUIRES_REVISION_PIN: environmentVersion is not accepted together with stage \u2014 the stage slot decides the environment version",
5572
- path: ["environmentVersion"]
5573
- }).refine((data) => data.deliveryMode !== "direct_push" || data.repoUrl !== void 0, {
5577
+ }).refine(
5578
+ (data) => data.environmentVersion === void 0 || data.stage === void 0 || data.revisionId !== void 0 && data.environmentId !== void 0,
5579
+ {
5580
+ message: "ENVIRONMENT_REQUIRES_REVISION_PIN: environmentVersion is not accepted together with stage \u2014 the stage slot decides the environment version",
5581
+ path: ["environmentVersion"]
5582
+ }
5583
+ ).refine((data) => data.deliveryMode !== "direct_push" || data.repoUrl !== void 0, {
5574
5584
  message: "DELIVERY_MODE_REQUIRES_REPO_URL: deliveryMode 'direct_push' requires repoUrl \u2014 there is no delivery without a repo",
5575
5585
  path: ["deliveryMode"]
5576
5586
  }).refine(
@@ -17668,7 +17678,7 @@ var EvalCandidateTriageStateSchema = import_zod106.z.enum([
17668
17678
  "archived"
17669
17679
  ]);
17670
17680
  var EvalCandidateCaseStatusSchema = import_zod106.z.enum(["none", "drafted", "converted"]);
17671
- var EvalCandidateReviewFilterSchema = import_zod106.z.enum(["pending", "reviewed", "all"]);
17681
+ var EvalCandidateReviewFilterSchema = import_zod106.z.enum(["pending", "reviewed", "archived", "all"]);
17672
17682
  var EvalCandidateTriageInputSchema = import_zod106.z.object({
17673
17683
  status: EvalCandidateTriageStatusSchema,
17674
17684
  failureTags: import_zod106.z.array(EvalCandidateFailureTagSchema).default([]),
@@ -23769,7 +23779,7 @@ function unwrapEnvelope(envelope, routeLabel, requiredKeys) {
23769
23779
  }
23770
23780
 
23771
23781
  // src/client.ts
23772
- var AGENTHUB_SDK_USER_AGENT = `@kanyun-ai-infra/agenthub/${true ? "1.35.0" : "0.0.0-dev"}`;
23782
+ var AGENTHUB_SDK_USER_AGENT = `@kanyun-ai-infra/agenthub/${true ? "1.35.1" : "0.0.0-dev"}`;
23773
23783
  var DEFAULT_CONTROL_PLANE_URL = "https://agenthub-plane.zhenguanyu.com";
23774
23784
  var NON_JSON_ERROR_BODY_MAX_CHARS = 200;
23775
23785
  var clientDefaultSignals = /* @__PURE__ */ new WeakMap();