@clawos-dev/clawd 0.2.712 → 0.2.713
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/dist/app-builder-plugin/mcp-server.cjs +25 -15
- package/dist/cli.cjs +55 -28
- package/dist/cloud-persona-conversations.html +73 -73
- package/dist/cloud-persona-metrics.html +1 -1
- package/dist/dispatch/mcp-server.cjs +24 -15
- package/dist/owner-ui/assets/owner-C1KVShIL.js +949 -0
- package/dist/owner-ui/assets/owner-DTREasE7.css +32 -0
- package/dist/owner-ui/owner.html +2 -2
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/mcp-server.cjs +25 -15
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/mcp-server.cjs +25 -15
- package/dist/share-md-viewer-error.html +1 -1
- package/dist/share-md-viewer.html +1 -1
- package/dist/share-ui/assets/{guest-CTCsmUx0.js → guest-BQ_bshku.js} +146 -146
- package/dist/share-ui/assets/guest-Dm9FFGUk.css +32 -0
- package/dist/share-ui/guest.html +2 -2
- package/package.json +1 -1
- package/dist/owner-ui/assets/owner-C-ZD935y.css +0 -32
- package/dist/owner-ui/assets/owner-CI-qa2Oo.js +0 -949
- package/dist/share-ui/assets/guest-CI_nvySJ.css +0 -32
|
@@ -31495,7 +31495,9 @@ var DeployConfigSchema = external_exports.object({
|
|
|
31495
31495
|
effort: external_exports.string(),
|
|
31496
31496
|
size: external_exports.string().min(1),
|
|
31497
31497
|
cpu: external_exports.number().positive(),
|
|
31498
|
-
taskConcurrency: external_exports.number().int().positive()
|
|
31498
|
+
taskConcurrency: external_exports.number().int().positive(),
|
|
31499
|
+
// Optional to preserve the exact serialization of legacy attested configs.
|
|
31500
|
+
minPods: external_exports.number().int().nonnegative().safe().optional()
|
|
31499
31501
|
}).strict();
|
|
31500
31502
|
var VerifiedPersonaReleaseSchema = external_exports.object({
|
|
31501
31503
|
version: external_exports.literal(1),
|
|
@@ -31561,6 +31563,8 @@ var PersonaFileSchema = external_exports.object({
|
|
|
31561
31563
|
cpu: external_exports.number().finite().optional(),
|
|
31562
31564
|
/** Cloud task-Pod concurrency, validated at release. Local execution ignores it; changes apply on the next publication. */
|
|
31563
31565
|
taskConcurrency: external_exports.number().int().positive().optional(),
|
|
31566
|
+
/** Cloud-wide warm capacity; user identity is assigned only when a Pod is claimed. */
|
|
31567
|
+
minPods: external_exports.number().int().nonnegative().safe().optional(),
|
|
31564
31568
|
cloudEngine: PersonaCloudEngineSchema.optional(),
|
|
31565
31569
|
createdAt: external_exports.number(),
|
|
31566
31570
|
updatedAt: external_exports.number(),
|
|
@@ -31661,6 +31665,7 @@ var PersonaUpdateArgsSchema = external_exports.object({
|
|
|
31661
31665
|
size: PersonaSizeSchema.optional(),
|
|
31662
31666
|
cpu: PersonaCpuSchema.optional(),
|
|
31663
31667
|
taskConcurrency: PersonaFileSchema.shape.taskConcurrency,
|
|
31668
|
+
minPods: PersonaFileSchema.shape.minPods,
|
|
31664
31669
|
// 整体替换(上云页每次交完整的 { model, effort });切 tool 不清它
|
|
31665
31670
|
cloudEngine: PersonaCloudEngineSchema.optional(),
|
|
31666
31671
|
personality: external_exports.string().optional(),
|
|
@@ -31803,6 +31808,22 @@ var DeployUnpublishRunSchema = external_exports.object({
|
|
|
31803
31808
|
conclusion: external_exports.enum(["success", "failure"]).optional(),
|
|
31804
31809
|
htmlUrl: external_exports.string().min(1)
|
|
31805
31810
|
}).strict();
|
|
31811
|
+
var ReservationStateSchema = external_exports.object({
|
|
31812
|
+
desired: external_exports.number().int().nonnegative().safe(),
|
|
31813
|
+
ready: external_exports.number().int().nonnegative().safe(),
|
|
31814
|
+
bound: external_exports.number().int().nonnegative().safe(),
|
|
31815
|
+
starting: external_exports.number().int().nonnegative().safe(),
|
|
31816
|
+
retiring: external_exports.number().int().nonnegative().safe(),
|
|
31817
|
+
observedAt: external_exports.number(),
|
|
31818
|
+
error: external_exports.string().nullable()
|
|
31819
|
+
}).strict();
|
|
31820
|
+
var DeployCloudStatusSchema = external_exports.object({
|
|
31821
|
+
online: external_exports.boolean().optional(),
|
|
31822
|
+
image: ImageDigestSchema.optional(),
|
|
31823
|
+
minPods: external_exports.number().int().nonnegative().safe().optional(),
|
|
31824
|
+
reservation: ReservationStateSchema.nullable().optional(),
|
|
31825
|
+
reservationError: external_exports.string().optional()
|
|
31826
|
+
}).strict();
|
|
31806
31827
|
var DeployStateSchema = external_exports.object({
|
|
31807
31828
|
personaId: external_exports.string().min(1),
|
|
31808
31829
|
engineChannels: DeployEngineChannelsSchema.optional(),
|
|
@@ -31818,20 +31839,8 @@ var DeployStateSchema = external_exports.object({
|
|
|
31818
31839
|
releases: external_exports.array(DeployReleasedSchema).default([]),
|
|
31819
31840
|
promotions: external_exports.array(DeployPromotionSchema).optional(),
|
|
31820
31841
|
targets: external_exports.object({
|
|
31821
|
-
integration: external_exports.
|
|
31822
|
-
|
|
31823
|
-
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
31824
|
-
online: external_exports.boolean().optional(),
|
|
31825
|
-
image: ImageDigestSchema.optional(),
|
|
31826
|
-
unpublish: DeployUnpublishRunSchema.optional()
|
|
31827
|
-
}).strict().optional(),
|
|
31828
|
-
production: external_exports.object({
|
|
31829
|
-
run: DeployRunSchema.optional(),
|
|
31830
|
-
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
31831
|
-
online: external_exports.boolean().optional(),
|
|
31832
|
-
image: ImageDigestSchema.optional(),
|
|
31833
|
-
unpublish: DeployUnpublishRunSchema.optional()
|
|
31834
|
-
}).strict().optional()
|
|
31842
|
+
integration: DeployCloudStatusSchema.extend({ run: DeployRunSchema.optional(), secrets: external_exports.array(DeploySecretPresenceSchema).optional(), unpublish: DeployUnpublishRunSchema.optional() }).optional(),
|
|
31843
|
+
production: DeployCloudStatusSchema.extend({ run: DeployRunSchema.optional(), secrets: external_exports.array(DeploySecretPresenceSchema).optional(), unpublish: DeployUnpublishRunSchema.optional() }).optional()
|
|
31835
31844
|
}).strict().optional(),
|
|
31836
31845
|
/** 没仓库时缺席(查不了) */
|
|
31837
31846
|
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
@@ -34795,6 +34804,7 @@ function renderDeployWorkflow(config2) {
|
|
|
34795
34804
|
" --cpu '${{ steps.plan.outputs.cpu }}' \\",
|
|
34796
34805
|
" --config-source '${{ steps.plan.outputs.config_source }}' \\",
|
|
34797
34806
|
" --task-concurrency '${{ steps.plan.outputs.task_concurrency }}' \\",
|
|
34807
|
+
" --min-pods '${{ steps.plan.outputs.min_pods }}' \\",
|
|
34798
34808
|
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
34799
34809
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
34800
34810
|
" --run-number '${{ github.run_number }}'",
|
package/dist/cli.cjs
CHANGED
|
@@ -6374,7 +6374,9 @@ var init_release_schemas = __esm({
|
|
|
6374
6374
|
effort: external_exports.string(),
|
|
6375
6375
|
size: external_exports.string().min(1),
|
|
6376
6376
|
cpu: external_exports.number().positive(),
|
|
6377
|
-
taskConcurrency: external_exports.number().int().positive()
|
|
6377
|
+
taskConcurrency: external_exports.number().int().positive(),
|
|
6378
|
+
// Optional to preserve the exact serialization of legacy attested configs.
|
|
6379
|
+
minPods: external_exports.number().int().nonnegative().safe().optional()
|
|
6378
6380
|
}).strict();
|
|
6379
6381
|
VerifiedPersonaReleaseSchema = external_exports.object({
|
|
6380
6382
|
version: external_exports.literal(1),
|
|
@@ -6469,6 +6471,8 @@ var init_persona_schemas = __esm({
|
|
|
6469
6471
|
cpu: external_exports.number().finite().optional(),
|
|
6470
6472
|
/** Cloud task-Pod concurrency, validated at release. Local execution ignores it; changes apply on the next publication. */
|
|
6471
6473
|
taskConcurrency: external_exports.number().int().positive().optional(),
|
|
6474
|
+
/** Cloud-wide warm capacity; user identity is assigned only when a Pod is claimed. */
|
|
6475
|
+
minPods: external_exports.number().int().nonnegative().safe().optional(),
|
|
6472
6476
|
cloudEngine: PersonaCloudEngineSchema.optional(),
|
|
6473
6477
|
createdAt: external_exports.number(),
|
|
6474
6478
|
updatedAt: external_exports.number(),
|
|
@@ -6569,6 +6573,7 @@ var init_persona_schemas = __esm({
|
|
|
6569
6573
|
size: PersonaSizeSchema.optional(),
|
|
6570
6574
|
cpu: PersonaCpuSchema.optional(),
|
|
6571
6575
|
taskConcurrency: PersonaFileSchema.shape.taskConcurrency,
|
|
6576
|
+
minPods: PersonaFileSchema.shape.minPods,
|
|
6572
6577
|
// 整体替换(上云页每次交完整的 { model, effort });切 tool 不清它
|
|
6573
6578
|
cloudEngine: PersonaCloudEngineSchema.optional(),
|
|
6574
6579
|
personality: external_exports.string().optional(),
|
|
@@ -6635,16 +6640,16 @@ function configOfPersona(p3) {
|
|
|
6635
6640
|
const { tool, model, effort } = cloudEngineSettings(p3);
|
|
6636
6641
|
const size = (p3.size ?? "").trim() || DEFAULT_PERSONA_SIZE;
|
|
6637
6642
|
const cpu = p3.cpu ?? PERSONA_CPU_DEFAULTS[size] ?? PERSONA_CPU_DEFAULTS[DEFAULT_PERSONA_SIZE];
|
|
6638
|
-
return { engine: tool, model: model.trim(), effort: effort.trim(), size, cpu, taskConcurrency: p3.taskConcurrency ?? DEFAULT_TASK_CONCURRENCY };
|
|
6643
|
+
return { engine: tool, model: model.trim(), effort: effort.trim(), size, cpu, taskConcurrency: p3.taskConcurrency ?? DEFAULT_TASK_CONCURRENCY, minPods: p3.minPods ?? 0 };
|
|
6639
6644
|
}
|
|
6640
6645
|
function changedConfigKeys(a2, b3) {
|
|
6641
6646
|
if (!a2 || !b3) return null;
|
|
6642
|
-
return CONFIG_KEYS.filter((key) => a2[key] !== b3[key]);
|
|
6647
|
+
return CONFIG_KEYS.filter((key) => key === "minPods" ? (a2.minPods ?? 0) !== (b3.minPods ?? 0) : a2[key] !== b3[key]);
|
|
6643
6648
|
}
|
|
6644
6649
|
function repoSlug(url) {
|
|
6645
6650
|
return url.trim().replace(/^git@[^:]+:/, "").replace(/^https?:\/\/[^/]+\//, "").replace(/\.git$/, "");
|
|
6646
6651
|
}
|
|
6647
|
-
var DeployFileSchema, SCAN_BASE_KINDS, ScanBaseKindSchema, DeployScanStatusSchema, DeployScanSchema, DeployReleasedSchema, DEPLOY_PROMOTION_PHASES, DeployPromotionSchema, DeployEngineChannelSchema, DeployEngineChannelsSchema, DeployScanFileSchema, DeployRepoSchema, DeploySecretPresenceSchema, ENGINE_AUTH_SECRETS, ENGINE_AUTH_PARTIAL_BLOCKER, DEPLOY_STAGE_STATUSES, DeployStageStatusSchema, DEPLOY_VERIFY_STAGE, DEPLOY_STAGE_KEYS, DeployStageKeySchema, DeployJobSchema, DeployRunSchema, CLOUD_ENGINES, DeployUnpublishRunSchema, DeployStateSchema, DeployUnpublishResultSchema, DeployLocalStateSchema, DeployPatchResultSchema, DeploySecretsResultSchema, DEPLOY_WORKFLOW_VERSION, DEFAULT_TASK_CONCURRENCY, CONFIG_KEYS, DeployReleaseResultSchema, DeployPersonaArgsSchema, DeployGetArgsSchema, DeployScanArgsSchema, DeployReleaseArgsSchema, DeployConfirmTestArgsSchema, DeployPromoteArgsSchema, DeployApplyConfigArgsSchema, DeployOpenTestArgsSchema, DeployEnvironmentArgsSchema, DeployConfirmTestResultSchema, DeployPromoteResultSchema, DeployOpenTestResultSchema, DeployPatchArgsSchema, DeployPutSecretArgsSchema, DeploySetEngineAuthArgsSchema, DeployRerunJobArgsSchema, DeployReportFindingArgsSchema, DeployFinishScanArgsSchema, PERSONA_REPO_ORG;
|
|
6652
|
+
var DeployFileSchema, SCAN_BASE_KINDS, ScanBaseKindSchema, DeployScanStatusSchema, DeployScanSchema, DeployReleasedSchema, DEPLOY_PROMOTION_PHASES, DeployPromotionSchema, DeployEngineChannelSchema, DeployEngineChannelsSchema, DeployScanFileSchema, DeployRepoSchema, DeploySecretPresenceSchema, ENGINE_AUTH_SECRETS, ENGINE_AUTH_PARTIAL_BLOCKER, DEPLOY_STAGE_STATUSES, DeployStageStatusSchema, DEPLOY_VERIFY_STAGE, DEPLOY_STAGE_KEYS, DeployStageKeySchema, DeployJobSchema, DeployRunSchema, CLOUD_ENGINES, DeployUnpublishRunSchema, ReservationStateSchema, DeployCloudStatusSchema, DeployStateSchema, DeployUnpublishResultSchema, DeployLocalStateSchema, DeployPatchResultSchema, DeploySecretsResultSchema, DEPLOY_WORKFLOW_VERSION, workflowVersionForConfigKeys, DEFAULT_TASK_CONCURRENCY, CONFIG_KEYS, DeployReleaseResultSchema, DeployPersonaArgsSchema, DeployGetArgsSchema, DeployScanArgsSchema, DeployReleaseArgsSchema, DeployConfirmTestArgsSchema, DeployPromoteArgsSchema, DeployApplyConfigArgsSchema, DeployOpenTestArgsSchema, DeployEnvironmentArgsSchema, DeployConfirmTestResultSchema, DeployPromoteResultSchema, DeployOpenTestResultSchema, DeployPatchArgsSchema, DeployPutSecretArgsSchema, DeploySetEngineAuthArgsSchema, DeployRerunJobArgsSchema, DeployReportFindingArgsSchema, DeployFinishScanArgsSchema, PERSONA_REPO_ORG;
|
|
6648
6653
|
var init_deploy_schemas = __esm({
|
|
6649
6654
|
"../protocol/src/deploy-schemas.ts"() {
|
|
6650
6655
|
"use strict";
|
|
@@ -6781,6 +6786,22 @@ var init_deploy_schemas = __esm({
|
|
|
6781
6786
|
conclusion: external_exports.enum(["success", "failure"]).optional(),
|
|
6782
6787
|
htmlUrl: external_exports.string().min(1)
|
|
6783
6788
|
}).strict();
|
|
6789
|
+
ReservationStateSchema = external_exports.object({
|
|
6790
|
+
desired: external_exports.number().int().nonnegative().safe(),
|
|
6791
|
+
ready: external_exports.number().int().nonnegative().safe(),
|
|
6792
|
+
bound: external_exports.number().int().nonnegative().safe(),
|
|
6793
|
+
starting: external_exports.number().int().nonnegative().safe(),
|
|
6794
|
+
retiring: external_exports.number().int().nonnegative().safe(),
|
|
6795
|
+
observedAt: external_exports.number(),
|
|
6796
|
+
error: external_exports.string().nullable()
|
|
6797
|
+
}).strict();
|
|
6798
|
+
DeployCloudStatusSchema = external_exports.object({
|
|
6799
|
+
online: external_exports.boolean().optional(),
|
|
6800
|
+
image: ImageDigestSchema.optional(),
|
|
6801
|
+
minPods: external_exports.number().int().nonnegative().safe().optional(),
|
|
6802
|
+
reservation: ReservationStateSchema.nullable().optional(),
|
|
6803
|
+
reservationError: external_exports.string().optional()
|
|
6804
|
+
}).strict();
|
|
6784
6805
|
DeployStateSchema = external_exports.object({
|
|
6785
6806
|
personaId: external_exports.string().min(1),
|
|
6786
6807
|
engineChannels: DeployEngineChannelsSchema.optional(),
|
|
@@ -6796,20 +6817,8 @@ var init_deploy_schemas = __esm({
|
|
|
6796
6817
|
releases: external_exports.array(DeployReleasedSchema).default([]),
|
|
6797
6818
|
promotions: external_exports.array(DeployPromotionSchema).optional(),
|
|
6798
6819
|
targets: external_exports.object({
|
|
6799
|
-
integration: external_exports.
|
|
6800
|
-
|
|
6801
|
-
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
6802
|
-
online: external_exports.boolean().optional(),
|
|
6803
|
-
image: ImageDigestSchema.optional(),
|
|
6804
|
-
unpublish: DeployUnpublishRunSchema.optional()
|
|
6805
|
-
}).strict().optional(),
|
|
6806
|
-
production: external_exports.object({
|
|
6807
|
-
run: DeployRunSchema.optional(),
|
|
6808
|
-
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
6809
|
-
online: external_exports.boolean().optional(),
|
|
6810
|
-
image: ImageDigestSchema.optional(),
|
|
6811
|
-
unpublish: DeployUnpublishRunSchema.optional()
|
|
6812
|
-
}).strict().optional()
|
|
6820
|
+
integration: DeployCloudStatusSchema.extend({ run: DeployRunSchema.optional(), secrets: external_exports.array(DeploySecretPresenceSchema).optional(), unpublish: DeployUnpublishRunSchema.optional() }).optional(),
|
|
6821
|
+
production: DeployCloudStatusSchema.extend({ run: DeployRunSchema.optional(), secrets: external_exports.array(DeploySecretPresenceSchema).optional(), unpublish: DeployUnpublishRunSchema.optional() }).optional()
|
|
6813
6822
|
}).strict().optional(),
|
|
6814
6823
|
/** 没仓库时缺席(查不了) */
|
|
6815
6824
|
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
@@ -6850,9 +6859,10 @@ var init_deploy_schemas = __esm({
|
|
|
6850
6859
|
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
6851
6860
|
engineChannels: DeployEngineChannelsSchema.optional()
|
|
6852
6861
|
}).strict();
|
|
6853
|
-
DEPLOY_WORKFLOW_VERSION =
|
|
6862
|
+
DEPLOY_WORKFLOW_VERSION = 3;
|
|
6863
|
+
workflowVersionForConfigKeys = (keys) => keys.includes("minPods") ? 3 : 2;
|
|
6854
6864
|
DEFAULT_TASK_CONCURRENCY = 4;
|
|
6855
|
-
CONFIG_KEYS = ["engine", "model", "effort", "size", "cpu", "taskConcurrency"];
|
|
6865
|
+
CONFIG_KEYS = ["engine", "model", "effort", "size", "cpu", "taskConcurrency", "minPods"];
|
|
6856
6866
|
DeployReleaseResultSchema = external_exports.object({
|
|
6857
6867
|
sha: external_exports.string().min(1),
|
|
6858
6868
|
actionsUrl: external_exports.string().min(1),
|
|
@@ -58271,6 +58281,7 @@ var CloudGatewayClient = class {
|
|
|
58271
58281
|
...typeof d2.model === "string" && d2.model ? { model: d2.model } : {},
|
|
58272
58282
|
...typeof d2.effort === "string" && d2.effort ? { effort: d2.effort } : {},
|
|
58273
58283
|
...typeof d2.registeredAt === "number" ? { registeredAt: d2.registeredAt } : {},
|
|
58284
|
+
...typeof d2.minPods === "number" && Number.isSafeInteger(d2.minPods) && d2.minPods >= 0 ? { minPods: d2.minPods } : {},
|
|
58274
58285
|
...Array.isArray(d2.connectors) ? { connectors: d2.connectors.map((c2) => EnvConnectorSchema.safeParse(c2)).flatMap((p3) => p3.success ? [p3.data] : []) } : {}
|
|
58275
58286
|
});
|
|
58276
58287
|
}
|
|
@@ -58383,6 +58394,7 @@ var CloudGatewayClient = class {
|
|
|
58383
58394
|
const qs = new URLSearchParams();
|
|
58384
58395
|
if (q3.window) qs.set("window", q3.window);
|
|
58385
58396
|
if (q3.entry) qs.set("entry", q3.entry);
|
|
58397
|
+
if (q3.reservationOnly) qs.set("part", "reservation");
|
|
58386
58398
|
const query = qs.toString();
|
|
58387
58399
|
try {
|
|
58388
58400
|
const res = await this.fetchImpl(gatewayUrl + GATEWAY_ROUTES.metrics(q3.personaId) + (query ? `?${query}` : ""), {
|
|
@@ -62853,6 +62865,7 @@ function renderDeployWorkflow(config) {
|
|
|
62853
62865
|
" --cpu '${{ steps.plan.outputs.cpu }}' \\",
|
|
62854
62866
|
" --config-source '${{ steps.plan.outputs.config_source }}' \\",
|
|
62855
62867
|
" --task-concurrency '${{ steps.plan.outputs.task_concurrency }}' \\",
|
|
62868
|
+
" --min-pods '${{ steps.plan.outputs.min_pods }}' \\",
|
|
62856
62869
|
" --engine '${{ steps.plan.outputs.engine }}' \\",
|
|
62857
62870
|
" --connectors '${{ steps.plan.outputs.connectors }}' \\",
|
|
62858
62871
|
" --run-number '${{ github.run_number }}'",
|
|
@@ -64305,7 +64318,7 @@ function buildDeployHandlers(deps) {
|
|
|
64305
64318
|
const latestPromotion = file.promotions.at(-1);
|
|
64306
64319
|
const cloud = file.releases.some((r2) => r2.environment === environment2) || environment2 === "production" && latestPromotion ? await measure("cloud", () => cachedCloud(personaId2, environment2, targetRun, targetUnpublish, cloudName, () => observe(environment2), snapshots.has(environment2)), { environment: environment2 }) : {};
|
|
64307
64320
|
const { image, online: targetOnline } = cloud;
|
|
64308
|
-
return { ...targetUnpublish ? { unpublish: targetUnpublish } : {}, ...targetRun ? { run: targetRun } : {}, ...targetSecretsList ? { secrets: targetSecretsList } : {}, ...image ? { image } : {}, ...targetOnline !== void 0 ? { online: targetOnline } : {} };
|
|
64321
|
+
return { ...cloud, ...targetUnpublish ? { unpublish: targetUnpublish } : {}, ...targetRun ? { run: targetRun } : {}, ...targetSecretsList ? { secrets: targetSecretsList } : {}, ...image ? { image } : {}, ...targetOnline !== void 0 ? { online: targetOnline } : {} };
|
|
64309
64322
|
};
|
|
64310
64323
|
const productionRunRead = Promise.all([prodRunRead, legacyRunRead]).then(([prodRun2, legacyRun2]) => prodRun2 ?? (latestProductionRelease(file.releases)?.legacy ? legacyRun2 : void 0));
|
|
64311
64324
|
const settled = await Promise.allSettled([loadTarget("integration", intRunRead), loadTarget("production", productionRunRead), intRunRead, prodRunRead, legacyRunRead]);
|
|
@@ -64663,7 +64676,7 @@ function buildDeployHandlers(deps) {
|
|
|
64663
64676
|
return void 0;
|
|
64664
64677
|
}
|
|
64665
64678
|
};
|
|
64666
|
-
const CONFIG_KEY_LABEL = { engine: "\u5F15\u64CE", model: "\u6A21\u578B", effort: "\u63A8\u7406\u6863\u4F4D", size: "\u89C4\u683C", cpu: "CPU", taskConcurrency: "\u4EFB\u52A1\u5E76\u53D1" };
|
|
64679
|
+
const CONFIG_KEY_LABEL = { engine: "\u5F15\u64CE", model: "\u6A21\u578B", effort: "\u63A8\u7406\u6863\u4F4D", size: "\u89C4\u683C", cpu: "CPU", taskConcurrency: "\u4EFB\u52A1\u5E76\u53D1", minPods: "\u4FDD\u5E95 Pod \u6570" };
|
|
64667
64680
|
const assertConfigTested = async (personaId2, record4) => {
|
|
64668
64681
|
const changed = changedConfigKeys(configOfPersona(deps.personaEngine(personaId2) ?? {}), await testedConfigOf(mustPersona(personaId2), record4));
|
|
64669
64682
|
if (changed?.length) throw invalid(`\u914D\u7F6E\u6539\u8FC7\u4E86\uFF08${changed.map((k3) => CONFIG_KEY_LABEL[k3]).join("\u3001")}\uFF09\uFF0C\u5148\u300C\u5E94\u7528\u5230\u6D4B\u8BD5\u73AF\u5883\u300D\u5E76\u786E\u8BA4\uFF0C\u518D\u4E0A\u7EBF`);
|
|
@@ -64935,7 +64948,7 @@ function buildDeployHandlers(deps) {
|
|
|
64935
64948
|
const file = await readHistory(dir);
|
|
64936
64949
|
const latest = [...file.releases].reverse().find((r2) => r2.environment === "integration");
|
|
64937
64950
|
if (!latest || latest.id !== releaseId) throw invalid("\u53EA\u80FD\u5BF9\u6700\u65B0\u4E00\u6B21\u6D4B\u8BD5\u53D1\u5E03\u5E94\u7528\u914D\u7F6E\uFF0C\u5237\u65B0\u9875\u9762\u540E\u518D\u8BD5");
|
|
64938
|
-
if (!latest.workflowVersion
|
|
64951
|
+
if (!latest.workflowVersion) throw invalid("\u8FD9\u4E2A\u4ED3\u5E93\u7684\u53D1\u5E03\u6D41\u6C34\u7EBF\u662F\u65E7\u7248\u672C\uFF0C\u4E0D\u8BA4\u65B0\u914D\u7F6E\u2014\u2014\u8BF7\u5148\u5B8C\u6574\u91CD\u65B0\u53D1\u5E03\u4E00\u6B21\uFF08\u4F1A\u91CD\u65B0\u6784\u5EFA\uFF09");
|
|
64939
64952
|
const repo2 = await repoInfo(deps.exec, dir);
|
|
64940
64953
|
if (!repo2) throw invalid("\u4ED3\u5E93\u4E0D\u5B58\u5728");
|
|
64941
64954
|
const { api } = await requireGithub();
|
|
@@ -64954,7 +64967,9 @@ function buildDeployHandlers(deps) {
|
|
|
64954
64967
|
const source = await testedRelease(personaId2, base.id, false);
|
|
64955
64968
|
const config = configOfPersona(deps.personaEngine(personaId2) ?? {});
|
|
64956
64969
|
if (!config.model) throw invalid("\u8FD8\u6CA1\u9009\u6A21\u578B\u2014\u2014\u5728\u4E0A\u4E91\u9875\u300C\u5F15\u64CE\u4E0E\u6A21\u578B\u300D\u91CC\u9009\u4E00\u4E2A");
|
|
64957
|
-
|
|
64970
|
+
const keys = changedConfigKeys(config, await testedConfigOf(dir, source));
|
|
64971
|
+
if (!retryAfterFailure && keys?.length === 0) throw invalid("\u914D\u7F6E\u548C\u6D4B\u8BD5\u73AF\u5883\u91CC\u7684\u4E00\u81F4\uFF0C\u6CA1\u6709\u9700\u8981\u5E94\u7528\u7684");
|
|
64972
|
+
if (latest.workflowVersion < (keys ? workflowVersionForConfigKeys(keys) : DEPLOY_WORKFLOW_VERSION)) throw invalid("\u8FD9\u4E2A\u4ED3\u5E93\u7684\u53D1\u5E03\u6D41\u6C34\u7EBF\u662F\u65E7\u7248\u672C\uFF0C\u4E0D\u8BA4\u4FDD\u5E95 Pod \u6570\u2014\u2014\u8BF7\u5148\u5B8C\u6574\u91CD\u65B0\u53D1\u5E03\u4E00\u6B21\uFF08\u4F1A\u91CD\u65B0\u6784\u5EFA\uFF09");
|
|
64958
64973
|
const id = (0, import_node_crypto15.randomUUID)();
|
|
64959
64974
|
try {
|
|
64960
64975
|
await api.dispatchWorkflow(slug, DEPLOY_WORKFLOW_FILE, "integration", { environment: "integration", release_json: JSON.stringify(source.verified), config_json: JSON.stringify(config), config_id: id });
|
|
@@ -65258,6 +65273,7 @@ var SubscriptionChannelStore = class {
|
|
|
65258
65273
|
|
|
65259
65274
|
// src/index.ts
|
|
65260
65275
|
init_subscription_channels_apply();
|
|
65276
|
+
init_protocol();
|
|
65261
65277
|
|
|
65262
65278
|
// src/deploy/local-probe.ts
|
|
65263
65279
|
function pickVersion(s2) {
|
|
@@ -75962,7 +75978,7 @@ function computeMethodAccess(args) {
|
|
|
75962
75978
|
}
|
|
75963
75979
|
|
|
75964
75980
|
// src/version.ts
|
|
75965
|
-
var version = "0.2.
|
|
75981
|
+
var version = "0.2.713".length > 0 ? "0.2.713" : "dev";
|
|
75966
75982
|
|
|
75967
75983
|
// src/cli-probe/probe.ts
|
|
75968
75984
|
var fs87 = __toESM(require("fs"), 1);
|
|
@@ -79652,7 +79668,7 @@ async function startDaemon(config) {
|
|
|
79652
79668
|
personaDir: (personaId2) => personaStore.personaDirPath(personaId2),
|
|
79653
79669
|
personaEngine: (personaId2) => {
|
|
79654
79670
|
const p3 = personaRegistry.get(personaId2);
|
|
79655
|
-
return p3 ? { ...p3.tool ? { tool: p3.tool } : {}, ...p3.model ? { model: p3.model } : {}, ...p3.effort ? { effort: p3.effort } : {}, ...p3.cloudEngine ? { cloudEngine: p3.cloudEngine } : {}, ...p3.size ? { size: p3.size } : {}, ...p3.cpu !== void 0 ? { cpu: p3.cpu } : {}, ...p3.taskConcurrency !== void 0 ? { taskConcurrency: p3.taskConcurrency } : {} } : void 0;
|
|
79671
|
+
return p3 ? { ...p3.tool ? { tool: p3.tool } : {}, ...p3.model ? { model: p3.model } : {}, ...p3.effort ? { effort: p3.effort } : {}, ...p3.cloudEngine ? { cloudEngine: p3.cloudEngine } : {}, ...p3.size ? { size: p3.size } : {}, ...p3.cpu !== void 0 ? { cpu: p3.cpu } : {}, ...p3.taskConcurrency !== void 0 ? { taskConcurrency: p3.taskConcurrency } : {}, ...p3.minPods !== void 0 ? { minPods: p3.minPods } : {} } : void 0;
|
|
79656
79672
|
},
|
|
79657
79673
|
exec: runCommand,
|
|
79658
79674
|
// 探本机前刷一次登录 shell 的 PATH:daemon 继承的是 app 启动时的快照,之后装的 CLI(~/.local/bin)看不见。
|
|
@@ -79687,9 +79703,20 @@ async function startDaemon(config) {
|
|
|
79687
79703
|
// 拉不到(没登录飞书 / gateway 不通 / healthz 5s 没回)→ undefined,页面不给下线按钮也不撤「线上」标。
|
|
79688
79704
|
// 失败上界:中心那一跳自带 15s,healthz 这一趟 5s——deploy:get 要保证页面打得开,gateway 接了连接不回时不能挂到 undici 默认的 300s
|
|
79689
79705
|
cloudState: async (personaId2, environment) => {
|
|
79690
|
-
const
|
|
79706
|
+
const gateway = gatewayForEnvironment(environment);
|
|
79707
|
+
const list = await gateway.listPersonas({ healthzTimeoutMs: 5e3 });
|
|
79691
79708
|
const persona = list.find((p3) => p3.personaId === personaId2);
|
|
79692
|
-
|
|
79709
|
+
const base = { online: persona !== void 0, ...persona?.image ? { image: persona.image } : {}, minPods: persona?.minPods ?? 0 };
|
|
79710
|
+
if (!base.minPods) return base;
|
|
79711
|
+
try {
|
|
79712
|
+
const response = await gateway.fetchMetrics({ personaId: personaId2, window: null, entry: null, reservationOnly: true });
|
|
79713
|
+
if (response.status !== 200) throw new Error("\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u9884\u7559 Pod \u72B6\u6001");
|
|
79714
|
+
const parsed = ReservationStateSchema.safeParse(JSON.parse(response.body).reservation);
|
|
79715
|
+
if (!parsed.success) throw new Error("gateway \u672A\u8FD4\u56DE\u6709\u6548\u7684\u9884\u7559\u72B6\u6001");
|
|
79716
|
+
return { ...base, reservation: parsed.data };
|
|
79717
|
+
} catch (e) {
|
|
79718
|
+
return { ...base, reservation: null, reservationError: e instanceof Error ? e.message : "\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u9884\u7559 Pod \u72B6\u6001" };
|
|
79719
|
+
}
|
|
79693
79720
|
},
|
|
79694
79721
|
publisherFeishuAuth: async (personaId2, environment) => {
|
|
79695
79722
|
const loginPass = requireEnvironmentIdentity(environmentStores, environment).loginPass;
|