@clawos-dev/clawd 0.2.663 → 0.2.665
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 +23 -4
- package/dist/cli.cjs +125 -46
- package/dist/cloud-persona-conversations.html +70 -70
- package/dist/dispatch/mcp-server.cjs +23 -4
- package/dist/persona-defaults/persona-app-builder/mcp/clawd-app-builder/mcp-server.cjs +23 -4
- package/dist/persona-defaults/persona-clawd-butler/.claude/skills/scan-persona-for-deploy/SKILL.md +2 -2
- package/dist/persona-defaults/persona-dataclaw-builder/mcp/clawd-app-builder/mcp-server.cjs +23 -4
- package/dist/share-ui/assets/{guest-CLzViujN.js → guest-B7AqtMdc.js} +91 -91
- package/dist/share-ui/guest.html +1 -1
- package/package.json +1 -1
|
@@ -31584,7 +31584,22 @@ var DeployStateSchema = external_exports.object({
|
|
|
31584
31584
|
var DeployUnpublishResultSchema = external_exports.object({
|
|
31585
31585
|
before: external_exports.number().nullable()
|
|
31586
31586
|
}).strict();
|
|
31587
|
+
var DeployLocalStateSchema = DeployStateSchema.pick({
|
|
31588
|
+
personaId: true,
|
|
31589
|
+
github: true,
|
|
31590
|
+
repo: true,
|
|
31591
|
+
scans: true,
|
|
31592
|
+
releases: true,
|
|
31593
|
+
promotions: true,
|
|
31594
|
+
engineChannels: true,
|
|
31595
|
+
historyError: true
|
|
31596
|
+
});
|
|
31587
31597
|
var DeployPatchResultSchema = DeployStateSchema.pick({ scans: true });
|
|
31598
|
+
var DeploySecretsResultSchema = external_exports.object({
|
|
31599
|
+
environment: DeployEnvironmentSchema,
|
|
31600
|
+
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
31601
|
+
engineChannels: DeployEngineChannelsSchema.optional()
|
|
31602
|
+
}).strict();
|
|
31588
31603
|
var DeployReleaseResultSchema = external_exports.object({
|
|
31589
31604
|
sha: external_exports.string().min(1),
|
|
31590
31605
|
actionsUrl: external_exports.string().min(1),
|
|
@@ -33824,6 +33839,10 @@ var METHOD_DOCS = {
|
|
|
33824
33839
|
summary: "\u4E0A\u4E91\u9875\u9762\u8981\u7684\u5168\u90E8\uFF1A\u4ED3\u5E93\u7ED1\u5B9A\u72B6\u6001\uFF08git \u73B0\u7B97\uFF09\u3001\u626B\u63CF\u5386\u53F2\uFF08\u6BCF\u6761\u5E26\u6E05\u5355\u5FEB\u7167\uFF09\u3001\u53D1\u5E03\u5386\u53F2\uFF08\u6700\u540E\u4E00\u6761 = \u7EBF\u4E0A\u6B63\u8DD1\u7684\uFF09\u3001\u4ED3\u5E93 Secrets \u91CC\u5404\u53D8\u91CF\u540D\u586B\u8FC7\u6CA1\u6709\uFF08**\u53EA\u6709\u540D\u5B57\u548C\u65F6\u95F4\uFF0C\u6CA1\u6709\u503C**\uFF09\u3001\u4E00\u6761\u6D41\u6C34\u7EBF\u72B6\u6001\uFF08\u7F3A\u7701\u4ED3\u5E93\u6700\u65B0\u90A3\u6761\uFF1B`releaseHead` \u6307\u540D\u770B\u54EA\u6B21\u53D1\u5E03\u7684\uFF09\uFF1Bowner-only",
|
|
33825
33840
|
args: DeployGetArgsSchema
|
|
33826
33841
|
},
|
|
33842
|
+
"deploy:getLocal": {
|
|
33843
|
+
summary: "\u4E0A\u4E91\u9875\u8981\u7684**\u672C\u673A\u90E8\u5206**\uFF1A\u4ED3\u5E93\u7ED1\u5B9A\u72B6\u6001\u3001\u626B\u63CF\u5386\u53F2\u3001\u53D1\u5E03\u5386\u53F2\u3001promotion \u8BB0\u5F55\u3001GitHub \u8EAB\u4EFD\u72B6\u6001\u3001\u6A21\u578B\u8BA2\u9605\u6E20\u9053\u3002\u53EA\u8BFB\u672C\u673A\u6587\u4EF6\uFF0C**\u4E0D\u95EE GitHub Actions / gateway / \u98DE\u4E66**\uFF08\u6CA1\u6709\u6D41\u6C34\u7EBF run\u3001Secrets\u3001\u5728\u7EBF\u72B6\u6001\u3001\u4E0B\u7EBF run\uFF09\uFF0C\u4E5F\u4E0D\u89E6\u53D1\u4EFB\u4F55\u4F1A\u5199\u76D8\u7684\u8FDC\u7A0B\u526F\u4F5C\u7528\uFF1BGitHub \u767B\u5F55\u8EAB\u4EFD\u6CBF\u7528 20 \u79D2\u7F13\u5B58\uFF0C\u672A\u547D\u4E2D\u65F6\u95EE\u4E00\u6B21 GET /user\u3002\u626B\u63CF\u671F\u95F4\u8F6E\u8BE2\u3001persona \u5361\u7247\u7528\u5B83\uFF1B\u8981\u5B8C\u6574\u72B6\u6001\u8D70 deploy:get\uFF1Bowner-only",
|
|
33844
|
+
args: DeployPersonaArgsSchema
|
|
33845
|
+
},
|
|
33827
33846
|
"deploy:scan": {
|
|
33828
33847
|
summary: "\u8D77\u4E00\u6B21\u626B\u63CF\u3002**\u6CA1\u4ED3\u5E93\u5148\u5EFA\u4ED3**\uFF08GitHub REST \u5EFA\u5728\u7EC4\u7EC7\u4E0B\u3001\u79C1\u6709\uFF0Cgit \u63A8\u9996\u4E2A\u63D0\u4EA4\uFF1Btoken \u6765\u81EA\u672C\u673A git \u7684\u8EAB\u4EFD\uFF0C\u6CA1\u6388\u6743\u5148\u62D2\uFF09\u3002\u628A persona \u76EE\u5F55\u63D0\u4EA4\u5230\u672C\u5730\uFF08\u4E0D\u63A8\uFF09\u3001\u5728\u626B\u63CF\u5386\u53F2\u91CC\u8FFD\u52A0\u4E00\u6761\u3001\u8D77 persona-butler \u7684\u626B\u63CF\u4F1A\u8BDD\uFF1B\u6B63\u5728\u626B\u7684\u8BDD\u539F\u6837\u8FD4\u56DE\u4E0D\u8D77\u7B2C\u4E8C\u4E2A\u4F1A\u8BDD\u3002\u5E26 scanBase\uFF08hard / soft\uFF09\u6309\u8BE5\u6863\u4F4D\u626B\uFF08soft \u4E0D\u6210\u7ACB\u81EA\u52A8\u9000 hard\uFF09\uFF0C\u7F3A\u5E2D daemon \u81EA\u52A8\u5B9A\uFF1Bowner-only",
|
|
33829
33848
|
args: DeployScanArgsSchema
|
|
@@ -33833,22 +33852,22 @@ var METHOD_DOCS = {
|
|
|
33833
33852
|
args: DeployPatchArgsSchema
|
|
33834
33853
|
},
|
|
33835
33854
|
"deploy:putSecret": {
|
|
33836
|
-
summary: "\u628A\u4E00\u6761\u51ED\u636E\u7684\u503C\u5199\u8FDB\u4ED3\u5E93\u7684 GitHub Secrets\uFF08GitHub REST\uFF0C\u503C\u7528\u4ED3\u5E93\u516C\u94A5\u5C01\u7BB1\u540E\u4E0A\u4F20\uFF09\u3002**\u8FD9\u662F\u6E05\u5355\u51ED\u636E\u503C\u552F\u4E00\u7684\u5165\u53E3**\uFF08\u6A21\u578B\u8BA2\u9605\u8D70 deploy:setEngineAuth\uFF09\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\u3002env \u540D\u5FC5\u987B\u662F scanId \u90A3\u6B21\u6E05\u5355\u91CC\u8BE5\u51ED\u636E\u58F0\u660E\u8FC7\u7684\uFF1Bowner-only",
|
|
33855
|
+
summary: "\u628A\u4E00\u6761\u51ED\u636E\u7684\u503C\u5199\u8FDB\u4ED3\u5E93\u7684 GitHub Secrets\uFF08GitHub REST\uFF0C\u503C\u7528\u4ED3\u5E93\u516C\u94A5\u5C01\u7BB1\u540E\u4E0A\u4F20\uFF09\u3002**\u8FD9\u662F\u6E05\u5355\u51ED\u636E\u503C\u552F\u4E00\u7684\u5165\u53E3**\uFF08\u6A21\u578B\u8BA2\u9605\u8D70 deploy:setEngineAuth\uFF09\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\u3002env \u540D\u5FC5\u987B\u662F scanId \u90A3\u6B21\u6E05\u5355\u91CC\u8BE5\u51ED\u636E\u58F0\u660E\u8FC7\u7684\u3002\u53EA\u56DE\u5199\u5165\u73AF\u5883\u73B0\u67E5\u7684\u540D\u5B57\u6E05\u5355 { environment, secrets }\uFF08secrets \u7F3A\u5E2D = \u5199\u6210\u529F\u4F46\u56DE\u67E5\u5931\u8D25\uFF0C\u8C03\u7528\u65B9\u81EA\u5DF1 deploy:get\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD deploy:get \u72B6\u6001\uFF1Bowner-only",
|
|
33837
33856
|
args: DeployPutSecretArgsSchema
|
|
33838
33857
|
},
|
|
33839
33858
|
"deploy:setEngineAuth": {
|
|
33840
|
-
summary: "\u6A21\u578B\u8BA2\u9605\uFF08\u4E91\u4E0A\u8DD1\u8FD9\u4E2A persona \u82B1\u8C01\u7684\u6A21\u578B\u989D\u5EA6\uFF09\uFF1Aauth = { baseUrl, apiKey } \u5199\u8FDB\u4ED3\u5E93 GitHub Secrets \u7684 CLAWD_ENGINE_BASE_URL / CLAWD_ENGINE_API_KEY\uFF08\u5730\u5740\u89C4\u8303\u6210 \u2026/v1\uFF09\uFF0Cnull = \u5220\u8FD9\u4E24\u6761\u3001\u6539\u56DE\u5E73\u53F0\u9ED8\u8BA4\u3002\u4E0B\u6B21\u53D1\u5E03\u751F\u6548\u3002\u540C putSecret \u7684\u7EAA\u5F8B\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\uFF1B\u56DE deploy:get \
|
|
33859
|
+
summary: "\u6A21\u578B\u8BA2\u9605\uFF08\u4E91\u4E0A\u8DD1\u8FD9\u4E2A persona \u82B1\u8C01\u7684\u6A21\u578B\u989D\u5EA6\uFF09\uFF1Aauth = { baseUrl, apiKey } \u5199\u8FDB\u4ED3\u5E93 GitHub Secrets \u7684 CLAWD_ENGINE_BASE_URL / CLAWD_ENGINE_API_KEY\uFF08\u5730\u5740\u89C4\u8303\u6210 \u2026/v1\uFF09\uFF0Cnull = \u5220\u8FD9\u4E24\u6761\u3001\u6539\u56DE\u5E73\u53F0\u9ED8\u8BA4\u3002\u4E0B\u6B21\u53D1\u5E03\u751F\u6548\u3002\u540C putSecret \u7684\u7EAA\u5F8B\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\uFF1B\u53EA\u56DE\u5199\u5165\u73AF\u5883\u73B0\u67E5\u7684\u540D\u5B57\u6E05\u5355\u548C engineChannels\uFF08{ environment, secrets?, engineChannels? }\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD deploy:get \u72B6\u6001\uFF1Bowner-only\u3001human-only",
|
|
33841
33860
|
args: DeploySetEngineAuthArgsSchema,
|
|
33842
33861
|
argsConstraints: {
|
|
33843
33862
|
anyOf: [{ required: ["channelId"] }, { required: ["auth"] }]
|
|
33844
33863
|
}
|
|
33845
33864
|
},
|
|
33846
33865
|
"deploy:reportFinding": {
|
|
33847
|
-
summary: "\u626B\u63CF\u4E2D\u7684 butler \u9010\u6761\u4E0A\u62A5\u4E00\u4E2A\u53D1\u73B0\uFF08cli / secret / asset\uFF09\u3002**\u8FB9\u626B\u8FB9\u62A5**\uFF0C\u9875\u9762\u968F\u4E4B\u4E00\u70B9\u70B9\u586B\u5145\uFF1B\u540C (kind,name) \u91CD\u590D\u4E0A\u62A5\u5373\u8986\u76D6\
|
|
33866
|
+
summary: "\u626B\u63CF\u4E2D\u7684 butler \u9010\u6761\u4E0A\u62A5\u4E00\u4E2A\u53D1\u73B0\uFF08cli / secret / asset\uFF09\u3002**\u8FB9\u626B\u8FB9\u62A5**\uFF0C\u9875\u9762\u968F\u4E4B\u4E00\u70B9\u70B9\u586B\u5145\uFF1B\u540C (kind,name) \u91CD\u590D\u4E0A\u62A5\u5373\u8986\u76D6\u3002\u53EA\u56DE\u626B\u63CF\u5386\u53F2 `scans`\uFF08\u540C deploy:patch\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD\u72B6\u6001\uFF1Bowner-only\u2014\u2014butler \u4F1A\u8BDD\u672C\u8EAB\u8DD1\u5728 owner \u6A21\u5F0F",
|
|
33848
33867
|
args: DeployReportFindingArgsSchema
|
|
33849
33868
|
},
|
|
33850
33869
|
"deploy:finishScan": {
|
|
33851
|
-
summary: "butler \u6536\u5C3E\uFF1A\u7ED9\u51FA\u5B58\u7591\u9879\uFF0C\u626B\u63CF\u8BB0\u5F55\u4ECE scanning \u8F6C done\u3002\u6CA1\u8C03\u5230\u5B83\u5C31\u7B49\u4E8E\u6CA1\u626B\u5B8C\u2014\u2014butler \u4F1A\u8BDD\u7ED3\u675F\u65F6\u8BB0\u5F55\u8FD8\u505C\u5728 scanning\uFF0Cdaemon \u636E\u6B64\u5224 failed\uFF1Bowner-only",
|
|
33870
|
+
summary: "butler \u6536\u5C3E\uFF1A\u7ED9\u51FA\u5B58\u7591\u9879\uFF0C\u626B\u63CF\u8BB0\u5F55\u4ECE scanning \u8F6C done\u3002\u6CA1\u8C03\u5230\u5B83\u5C31\u7B49\u4E8E\u6CA1\u626B\u5B8C\u2014\u2014butler \u4F1A\u8BDD\u7ED3\u675F\u65F6\u8BB0\u5F55\u8FD8\u505C\u5728 scanning\uFF0Cdaemon \u636E\u6B64\u5224 failed\u3002\u53EA\u56DE\u626B\u63CF\u5386\u53F2 `scans`\uFF1Bowner-only",
|
|
33852
33871
|
args: DeployFinishScanArgsSchema
|
|
33853
33872
|
},
|
|
33854
33873
|
"deploy:release": {
|
package/dist/cli.cjs
CHANGED
|
@@ -6317,7 +6317,7 @@ function cloudEngineSettings(p3) {
|
|
|
6317
6317
|
function repoSlug(url) {
|
|
6318
6318
|
return url.trim().replace(/^git@[^:]+:/, "").replace(/^https?:\/\/[^/]+\//, "").replace(/\.git$/, "");
|
|
6319
6319
|
}
|
|
6320
|
-
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, DeployPatchResultSchema, DeployReleaseResultSchema, DeployPersonaArgsSchema, DeployGetArgsSchema, DeployScanArgsSchema, DeployReleaseArgsSchema, DeployConfirmTestArgsSchema, DeployPromoteArgsSchema, DeployOpenTestArgsSchema, DeployEnvironmentArgsSchema, DeployConfirmTestResultSchema, DeployPromoteResultSchema, DeployOpenTestResultSchema, DeployPatchArgsSchema, DeployPutSecretArgsSchema, DeploySetEngineAuthArgsSchema, DeployRerunJobArgsSchema, DeployReportFindingArgsSchema, DeployFinishScanArgsSchema, PERSONA_REPO_ORG;
|
|
6320
|
+
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, DeployReleaseResultSchema, DeployPersonaArgsSchema, DeployGetArgsSchema, DeployScanArgsSchema, DeployReleaseArgsSchema, DeployConfirmTestArgsSchema, DeployPromoteArgsSchema, DeployOpenTestArgsSchema, DeployEnvironmentArgsSchema, DeployConfirmTestResultSchema, DeployPromoteResultSchema, DeployOpenTestResultSchema, DeployPatchArgsSchema, DeployPutSecretArgsSchema, DeploySetEngineAuthArgsSchema, DeployRerunJobArgsSchema, DeployReportFindingArgsSchema, DeployFinishScanArgsSchema, PERSONA_REPO_ORG;
|
|
6321
6321
|
var init_deploy_schemas = __esm({
|
|
6322
6322
|
"../protocol/src/deploy-schemas.ts"() {
|
|
6323
6323
|
"use strict";
|
|
@@ -6500,7 +6500,22 @@ var init_deploy_schemas = __esm({
|
|
|
6500
6500
|
DeployUnpublishResultSchema = external_exports.object({
|
|
6501
6501
|
before: external_exports.number().nullable()
|
|
6502
6502
|
}).strict();
|
|
6503
|
+
DeployLocalStateSchema = DeployStateSchema.pick({
|
|
6504
|
+
personaId: true,
|
|
6505
|
+
github: true,
|
|
6506
|
+
repo: true,
|
|
6507
|
+
scans: true,
|
|
6508
|
+
releases: true,
|
|
6509
|
+
promotions: true,
|
|
6510
|
+
engineChannels: true,
|
|
6511
|
+
historyError: true
|
|
6512
|
+
});
|
|
6503
6513
|
DeployPatchResultSchema = DeployStateSchema.pick({ scans: true });
|
|
6514
|
+
DeploySecretsResultSchema = external_exports.object({
|
|
6515
|
+
environment: DeployEnvironmentSchema,
|
|
6516
|
+
secrets: external_exports.array(DeploySecretPresenceSchema).optional(),
|
|
6517
|
+
engineChannels: DeployEngineChannelsSchema.optional()
|
|
6518
|
+
}).strict();
|
|
6504
6519
|
DeployReleaseResultSchema = external_exports.object({
|
|
6505
6520
|
sha: external_exports.string().min(1),
|
|
6506
6521
|
actionsUrl: external_exports.string().min(1),
|
|
@@ -9054,6 +9069,10 @@ var init_methods = __esm({
|
|
|
9054
9069
|
summary: "\u4E0A\u4E91\u9875\u9762\u8981\u7684\u5168\u90E8\uFF1A\u4ED3\u5E93\u7ED1\u5B9A\u72B6\u6001\uFF08git \u73B0\u7B97\uFF09\u3001\u626B\u63CF\u5386\u53F2\uFF08\u6BCF\u6761\u5E26\u6E05\u5355\u5FEB\u7167\uFF09\u3001\u53D1\u5E03\u5386\u53F2\uFF08\u6700\u540E\u4E00\u6761 = \u7EBF\u4E0A\u6B63\u8DD1\u7684\uFF09\u3001\u4ED3\u5E93 Secrets \u91CC\u5404\u53D8\u91CF\u540D\u586B\u8FC7\u6CA1\u6709\uFF08**\u53EA\u6709\u540D\u5B57\u548C\u65F6\u95F4\uFF0C\u6CA1\u6709\u503C**\uFF09\u3001\u4E00\u6761\u6D41\u6C34\u7EBF\u72B6\u6001\uFF08\u7F3A\u7701\u4ED3\u5E93\u6700\u65B0\u90A3\u6761\uFF1B`releaseHead` \u6307\u540D\u770B\u54EA\u6B21\u53D1\u5E03\u7684\uFF09\uFF1Bowner-only",
|
|
9055
9070
|
args: DeployGetArgsSchema
|
|
9056
9071
|
},
|
|
9072
|
+
"deploy:getLocal": {
|
|
9073
|
+
summary: "\u4E0A\u4E91\u9875\u8981\u7684**\u672C\u673A\u90E8\u5206**\uFF1A\u4ED3\u5E93\u7ED1\u5B9A\u72B6\u6001\u3001\u626B\u63CF\u5386\u53F2\u3001\u53D1\u5E03\u5386\u53F2\u3001promotion \u8BB0\u5F55\u3001GitHub \u8EAB\u4EFD\u72B6\u6001\u3001\u6A21\u578B\u8BA2\u9605\u6E20\u9053\u3002\u53EA\u8BFB\u672C\u673A\u6587\u4EF6\uFF0C**\u4E0D\u95EE GitHub Actions / gateway / \u98DE\u4E66**\uFF08\u6CA1\u6709\u6D41\u6C34\u7EBF run\u3001Secrets\u3001\u5728\u7EBF\u72B6\u6001\u3001\u4E0B\u7EBF run\uFF09\uFF0C\u4E5F\u4E0D\u89E6\u53D1\u4EFB\u4F55\u4F1A\u5199\u76D8\u7684\u8FDC\u7A0B\u526F\u4F5C\u7528\uFF1BGitHub \u767B\u5F55\u8EAB\u4EFD\u6CBF\u7528 20 \u79D2\u7F13\u5B58\uFF0C\u672A\u547D\u4E2D\u65F6\u95EE\u4E00\u6B21 GET /user\u3002\u626B\u63CF\u671F\u95F4\u8F6E\u8BE2\u3001persona \u5361\u7247\u7528\u5B83\uFF1B\u8981\u5B8C\u6574\u72B6\u6001\u8D70 deploy:get\uFF1Bowner-only",
|
|
9074
|
+
args: DeployPersonaArgsSchema
|
|
9075
|
+
},
|
|
9057
9076
|
"deploy:scan": {
|
|
9058
9077
|
summary: "\u8D77\u4E00\u6B21\u626B\u63CF\u3002**\u6CA1\u4ED3\u5E93\u5148\u5EFA\u4ED3**\uFF08GitHub REST \u5EFA\u5728\u7EC4\u7EC7\u4E0B\u3001\u79C1\u6709\uFF0Cgit \u63A8\u9996\u4E2A\u63D0\u4EA4\uFF1Btoken \u6765\u81EA\u672C\u673A git \u7684\u8EAB\u4EFD\uFF0C\u6CA1\u6388\u6743\u5148\u62D2\uFF09\u3002\u628A persona \u76EE\u5F55\u63D0\u4EA4\u5230\u672C\u5730\uFF08\u4E0D\u63A8\uFF09\u3001\u5728\u626B\u63CF\u5386\u53F2\u91CC\u8FFD\u52A0\u4E00\u6761\u3001\u8D77 persona-butler \u7684\u626B\u63CF\u4F1A\u8BDD\uFF1B\u6B63\u5728\u626B\u7684\u8BDD\u539F\u6837\u8FD4\u56DE\u4E0D\u8D77\u7B2C\u4E8C\u4E2A\u4F1A\u8BDD\u3002\u5E26 scanBase\uFF08hard / soft\uFF09\u6309\u8BE5\u6863\u4F4D\u626B\uFF08soft \u4E0D\u6210\u7ACB\u81EA\u52A8\u9000 hard\uFF09\uFF0C\u7F3A\u5E2D daemon \u81EA\u52A8\u5B9A\uFF1Bowner-only",
|
|
9059
9078
|
args: DeployScanArgsSchema
|
|
@@ -9063,22 +9082,22 @@ var init_methods = __esm({
|
|
|
9063
9082
|
args: DeployPatchArgsSchema
|
|
9064
9083
|
},
|
|
9065
9084
|
"deploy:putSecret": {
|
|
9066
|
-
summary: "\u628A\u4E00\u6761\u51ED\u636E\u7684\u503C\u5199\u8FDB\u4ED3\u5E93\u7684 GitHub Secrets\uFF08GitHub REST\uFF0C\u503C\u7528\u4ED3\u5E93\u516C\u94A5\u5C01\u7BB1\u540E\u4E0A\u4F20\uFF09\u3002**\u8FD9\u662F\u6E05\u5355\u51ED\u636E\u503C\u552F\u4E00\u7684\u5165\u53E3**\uFF08\u6A21\u578B\u8BA2\u9605\u8D70 deploy:setEngineAuth\uFF09\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\u3002env \u540D\u5FC5\u987B\u662F scanId \u90A3\u6B21\u6E05\u5355\u91CC\u8BE5\u51ED\u636E\u58F0\u660E\u8FC7\u7684\uFF1Bowner-only",
|
|
9085
|
+
summary: "\u628A\u4E00\u6761\u51ED\u636E\u7684\u503C\u5199\u8FDB\u4ED3\u5E93\u7684 GitHub Secrets\uFF08GitHub REST\uFF0C\u503C\u7528\u4ED3\u5E93\u516C\u94A5\u5C01\u7BB1\u540E\u4E0A\u4F20\uFF09\u3002**\u8FD9\u662F\u6E05\u5355\u51ED\u636E\u503C\u552F\u4E00\u7684\u5165\u53E3**\uFF08\u6A21\u578B\u8BA2\u9605\u8D70 deploy:setEngineAuth\uFF09\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\u3002env \u540D\u5FC5\u987B\u662F scanId \u90A3\u6B21\u6E05\u5355\u91CC\u8BE5\u51ED\u636E\u58F0\u660E\u8FC7\u7684\u3002\u53EA\u56DE\u5199\u5165\u73AF\u5883\u73B0\u67E5\u7684\u540D\u5B57\u6E05\u5355 { environment, secrets }\uFF08secrets \u7F3A\u5E2D = \u5199\u6210\u529F\u4F46\u56DE\u67E5\u5931\u8D25\uFF0C\u8C03\u7528\u65B9\u81EA\u5DF1 deploy:get\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD deploy:get \u72B6\u6001\uFF1Bowner-only",
|
|
9067
9086
|
args: DeployPutSecretArgsSchema
|
|
9068
9087
|
},
|
|
9069
9088
|
"deploy:setEngineAuth": {
|
|
9070
|
-
summary: "\u6A21\u578B\u8BA2\u9605\uFF08\u4E91\u4E0A\u8DD1\u8FD9\u4E2A persona \u82B1\u8C01\u7684\u6A21\u578B\u989D\u5EA6\uFF09\uFF1Aauth = { baseUrl, apiKey } \u5199\u8FDB\u4ED3\u5E93 GitHub Secrets \u7684 CLAWD_ENGINE_BASE_URL / CLAWD_ENGINE_API_KEY\uFF08\u5730\u5740\u89C4\u8303\u6210 \u2026/v1\uFF09\uFF0Cnull = \u5220\u8FD9\u4E24\u6761\u3001\u6539\u56DE\u5E73\u53F0\u9ED8\u8BA4\u3002\u4E0B\u6B21\u53D1\u5E03\u751F\u6548\u3002\u540C putSecret \u7684\u7EAA\u5F8B\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\uFF1B\u56DE deploy:get \
|
|
9089
|
+
summary: "\u6A21\u578B\u8BA2\u9605\uFF08\u4E91\u4E0A\u8DD1\u8FD9\u4E2A persona \u82B1\u8C01\u7684\u6A21\u578B\u989D\u5EA6\uFF09\uFF1Aauth = { baseUrl, apiKey } \u5199\u8FDB\u4ED3\u5E93 GitHub Secrets \u7684 CLAWD_ENGINE_BASE_URL / CLAWD_ENGINE_API_KEY\uFF08\u5730\u5740\u89C4\u8303\u6210 \u2026/v1\uFF09\uFF0Cnull = \u5220\u8FD9\u4E24\u6761\u3001\u6539\u56DE\u5E73\u53F0\u9ED8\u8BA4\u3002\u4E0B\u6B21\u53D1\u5E03\u751F\u6548\u3002\u540C putSecret \u7684\u7EAA\u5F8B\uFF1A\u5165\u53C2\u4E0D\u8FDB\u65E5\u5FD7\u3001\u54CD\u5E94\u4E0D\u56DE\u663E\u503C\u3001\u672C\u673A\u4E0D\u843D\u76D8\uFF1B\u53EA\u56DE\u5199\u5165\u73AF\u5883\u73B0\u67E5\u7684\u540D\u5B57\u6E05\u5355\u548C engineChannels\uFF08{ environment, secrets?, engineChannels? }\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD deploy:get \u72B6\u6001\uFF1Bowner-only\u3001human-only",
|
|
9071
9090
|
args: DeploySetEngineAuthArgsSchema,
|
|
9072
9091
|
argsConstraints: {
|
|
9073
9092
|
anyOf: [{ required: ["channelId"] }, { required: ["auth"] }]
|
|
9074
9093
|
}
|
|
9075
9094
|
},
|
|
9076
9095
|
"deploy:reportFinding": {
|
|
9077
|
-
summary: "\u626B\u63CF\u4E2D\u7684 butler \u9010\u6761\u4E0A\u62A5\u4E00\u4E2A\u53D1\u73B0\uFF08cli / secret / asset\uFF09\u3002**\u8FB9\u626B\u8FB9\u62A5**\uFF0C\u9875\u9762\u968F\u4E4B\u4E00\u70B9\u70B9\u586B\u5145\uFF1B\u540C (kind,name) \u91CD\u590D\u4E0A\u62A5\u5373\u8986\u76D6\
|
|
9096
|
+
summary: "\u626B\u63CF\u4E2D\u7684 butler \u9010\u6761\u4E0A\u62A5\u4E00\u4E2A\u53D1\u73B0\uFF08cli / secret / asset\uFF09\u3002**\u8FB9\u626B\u8FB9\u62A5**\uFF0C\u9875\u9762\u968F\u4E4B\u4E00\u70B9\u70B9\u586B\u5145\uFF1B\u540C (kind,name) \u91CD\u590D\u4E0A\u62A5\u5373\u8986\u76D6\u3002\u53EA\u56DE\u626B\u63CF\u5386\u53F2 `scans`\uFF08\u540C deploy:patch\uFF09\uFF0C\u4E0D\u56DE\u6574\u4EFD\u72B6\u6001\uFF1Bowner-only\u2014\u2014butler \u4F1A\u8BDD\u672C\u8EAB\u8DD1\u5728 owner \u6A21\u5F0F",
|
|
9078
9097
|
args: DeployReportFindingArgsSchema
|
|
9079
9098
|
},
|
|
9080
9099
|
"deploy:finishScan": {
|
|
9081
|
-
summary: "butler \u6536\u5C3E\uFF1A\u7ED9\u51FA\u5B58\u7591\u9879\uFF0C\u626B\u63CF\u8BB0\u5F55\u4ECE scanning \u8F6C done\u3002\u6CA1\u8C03\u5230\u5B83\u5C31\u7B49\u4E8E\u6CA1\u626B\u5B8C\u2014\u2014butler \u4F1A\u8BDD\u7ED3\u675F\u65F6\u8BB0\u5F55\u8FD8\u505C\u5728 scanning\uFF0Cdaemon \u636E\u6B64\u5224 failed\uFF1Bowner-only",
|
|
9100
|
+
summary: "butler \u6536\u5C3E\uFF1A\u7ED9\u51FA\u5B58\u7591\u9879\uFF0C\u626B\u63CF\u8BB0\u5F55\u4ECE scanning \u8F6C done\u3002\u6CA1\u8C03\u5230\u5B83\u5C31\u7B49\u4E8E\u6CA1\u626B\u5B8C\u2014\u2014butler \u4F1A\u8BDD\u7ED3\u675F\u65F6\u8BB0\u5F55\u8FD8\u505C\u5728 scanning\uFF0Cdaemon \u636E\u6B64\u5224 failed\u3002\u53EA\u56DE\u626B\u63CF\u5386\u53F2 `scans`\uFF1Bowner-only",
|
|
9082
9101
|
args: DeployFinishScanArgsSchema
|
|
9083
9102
|
},
|
|
9084
9103
|
"deploy:release": {
|
|
@@ -63461,12 +63480,44 @@ function buildDeployHandlers(deps) {
|
|
|
63461
63480
|
for (const env of ["integration", "production"]) secretsCache.delete(personaId2 + ":" + env);
|
|
63462
63481
|
secretsCache.delete(personaId2);
|
|
63463
63482
|
}
|
|
63464
|
-
async function
|
|
63465
|
-
const { releaseHead, releaseId, environment } = selection;
|
|
63466
|
-
const historical = releaseHead !== void 0 || releaseId !== void 0;
|
|
63483
|
+
async function readLocal(personaId2, historical, measure) {
|
|
63467
63484
|
const dir = deps.personaDir(personaId2);
|
|
63468
63485
|
const repo2 = await measure("repo", () => repoInfo(deps.exec, dir));
|
|
63469
63486
|
const github = await measure("github.identity", () => deps.githubIdentity.status());
|
|
63487
|
+
let file = emptyScanFile();
|
|
63488
|
+
let historyError;
|
|
63489
|
+
try {
|
|
63490
|
+
file = await measure("history", () => readHistory(dir));
|
|
63491
|
+
} catch (err) {
|
|
63492
|
+
historyError = err instanceof Error ? err.message : String(err);
|
|
63493
|
+
}
|
|
63494
|
+
file = await measure("history.settle", () => settleStale(personaId2, dir, file));
|
|
63495
|
+
const pending = file.promotions.at(-1);
|
|
63496
|
+
const bound = pending && file.releases.find((r2) => r2.id === pending.releaseId);
|
|
63497
|
+
if (!historical && pending && !pending.verified && !["completed", "failed"].includes(pending.phase) && bound?.verified && bound.confirmation?.fingerprint === bound.verified.verification.fingerprint) {
|
|
63498
|
+
file = { ...file, promotions: file.promotions.map((p3) => p3.id === pending.id ? { ...p3, verified: bound.verified } : p3) };
|
|
63499
|
+
await writeScanFile(dir, file);
|
|
63500
|
+
}
|
|
63501
|
+
return { dir, repo: repo2, github, file, historyError };
|
|
63502
|
+
}
|
|
63503
|
+
async function localStateOf(personaId2, measure = directRead) {
|
|
63504
|
+
const { file, repo: repo2, github, historyError } = await readLocal(personaId2, false, measure);
|
|
63505
|
+
return {
|
|
63506
|
+
personaId: personaId2,
|
|
63507
|
+
github,
|
|
63508
|
+
...file.engineChannels ? { engineChannels: file.engineChannels } : {},
|
|
63509
|
+
...repo2 ? { repo: repo2 } : {},
|
|
63510
|
+
scans: file.scans,
|
|
63511
|
+
releases: file.releases,
|
|
63512
|
+
promotions: file.promotions,
|
|
63513
|
+
...historyError ? { historyError } : {}
|
|
63514
|
+
};
|
|
63515
|
+
}
|
|
63516
|
+
async function stateOf(personaId2, selection = {}, measure = directRead) {
|
|
63517
|
+
const { releaseHead, releaseId, environment } = selection;
|
|
63518
|
+
const historical = releaseHead !== void 0 || releaseId !== void 0;
|
|
63519
|
+
const { dir, repo: repo2, github, historyError, file: stored } = await readLocal(personaId2, historical, measure);
|
|
63520
|
+
let file = stored;
|
|
63470
63521
|
const auth = deps.githubIdentity.cached();
|
|
63471
63522
|
const rawApi = auth ? deps.githubApi(auth.token) : void 0;
|
|
63472
63523
|
const requests = /* @__PURE__ */ new Map();
|
|
@@ -63495,20 +63546,6 @@ function buildDeployHandlers(deps) {
|
|
|
63495
63546
|
}
|
|
63496
63547
|
return promise;
|
|
63497
63548
|
};
|
|
63498
|
-
let file = emptyScanFile();
|
|
63499
|
-
let historyError;
|
|
63500
|
-
try {
|
|
63501
|
-
file = await measure("history", () => readHistory(dir));
|
|
63502
|
-
} catch (err) {
|
|
63503
|
-
historyError = err instanceof Error ? err.message : String(err);
|
|
63504
|
-
}
|
|
63505
|
-
file = await measure("history.settle", () => settleStale(personaId2, dir, file));
|
|
63506
|
-
const pending = file.promotions.at(-1);
|
|
63507
|
-
const bound = pending && file.releases.find((r2) => r2.id === pending.releaseId);
|
|
63508
|
-
if (!historical && pending && !pending.verified && !["completed", "failed"].includes(pending.phase) && bound?.verified && bound.confirmation?.fingerprint === bound.verified.verification.fingerprint) {
|
|
63509
|
-
file = { ...file, promotions: file.promotions.map((p3) => p3.id === pending.id ? { ...p3, verified: bound.verified } : p3) };
|
|
63510
|
-
await writeScanFile(dir, file);
|
|
63511
|
-
}
|
|
63512
63549
|
const { scans } = file;
|
|
63513
63550
|
const selected = releaseId ? file.releases.find((r2) => r2.id === releaseId && (!environment || r2.environment === environment)) : releaseHead ? file.releases.find((r2) => r2.head === releaseHead && (!environment || r2.environment === environment)) : void 0;
|
|
63514
63551
|
const publisherFeishuAuthRead = scans.at(-1)?.manifest.connectors.some(isFeishuPublisherConnector) ? (async () => {
|
|
@@ -63554,12 +63591,12 @@ function buildDeployHandlers(deps) {
|
|
|
63554
63591
|
return intRun2;
|
|
63555
63592
|
})();
|
|
63556
63593
|
const prodRunRead = (async () => {
|
|
63557
|
-
const
|
|
63558
|
-
if (!historical &&
|
|
63594
|
+
const pending = file.promotions.at(-1);
|
|
63595
|
+
if (!historical && pending?.verified && ["dispatched", "dispatching"].includes(pending.phase)) {
|
|
63559
63596
|
await intRunRead;
|
|
63560
|
-
const source = file.releases.find((r2) => r2.id ===
|
|
63597
|
+
const source = file.releases.find((r2) => r2.id === pending.releaseId);
|
|
63561
63598
|
if (source) {
|
|
63562
|
-
await measure("promotion", () => continuePromotion(personaId2, { ...source, verified:
|
|
63599
|
+
await measure("promotion", () => continuePromotion(personaId2, { ...source, verified: pending.verified }, pending, false, api, async () => (await observe("production")).image));
|
|
63563
63600
|
file = await readHistory(dir);
|
|
63564
63601
|
}
|
|
63565
63602
|
}
|
|
@@ -63634,6 +63671,21 @@ function buildDeployHandlers(deps) {
|
|
|
63634
63671
|
const view = async (personaId2, selection, measure) => ({
|
|
63635
63672
|
response: { type: "deploy:state", ...await stateOf(personaId2, selection, measure) }
|
|
63636
63673
|
});
|
|
63674
|
+
const localView = async (personaId2, measure) => ({
|
|
63675
|
+
response: { type: "deploy:state", ...await localStateOf(personaId2, measure) }
|
|
63676
|
+
});
|
|
63677
|
+
async function scansResult(dir) {
|
|
63678
|
+
return { response: { type: "deploy:scans", scans: (await readHistory(dir)).scans } };
|
|
63679
|
+
}
|
|
63680
|
+
async function secretsResult(personaId2, dir, api, environment, withChannels = false) {
|
|
63681
|
+
let secrets;
|
|
63682
|
+
try {
|
|
63683
|
+
secrets = await targetSecrets(personaId2, dir, api, environment, true);
|
|
63684
|
+
} catch {
|
|
63685
|
+
}
|
|
63686
|
+
const engineChannels = withChannels ? (await readHistory(dir)).engineChannels : void 0;
|
|
63687
|
+
return { response: { type: "deploy:secrets", environment, ...secrets ? { secrets } : {}, ...engineChannels ? { engineChannels } : {} } };
|
|
63688
|
+
}
|
|
63637
63689
|
async function beginScan(personaId2, dir, file, contentHead, want) {
|
|
63638
63690
|
liveScans.set(personaId2, {});
|
|
63639
63691
|
const released = latestProductionRelease(file.releases);
|
|
@@ -63735,7 +63787,7 @@ function buildDeployHandlers(deps) {
|
|
|
63735
63787
|
throw toClawdError(err);
|
|
63736
63788
|
}
|
|
63737
63789
|
invalidateSecrets(args.personaId);
|
|
63738
|
-
return
|
|
63790
|
+
return secretsResult(args.personaId, dir, api, args.environment);
|
|
63739
63791
|
};
|
|
63740
63792
|
const setEngineAuth = async (frame, _client, ctx) => {
|
|
63741
63793
|
ensureOwner(ctx);
|
|
@@ -63787,7 +63839,7 @@ function buildDeployHandlers(deps) {
|
|
|
63787
63839
|
} finally {
|
|
63788
63840
|
invalidateSecrets(args.personaId);
|
|
63789
63841
|
}
|
|
63790
|
-
return
|
|
63842
|
+
return secretsResult(args.personaId, dir, api, args.environment, true);
|
|
63791
63843
|
};
|
|
63792
63844
|
async function settlePackage(pkg) {
|
|
63793
63845
|
const localVersion = await deps.probeLocalVersion(pkg);
|
|
@@ -63853,7 +63905,7 @@ function buildDeployHandlers(deps) {
|
|
|
63853
63905
|
manifest: upsertFinding(scan.manifest, args.kind, item),
|
|
63854
63906
|
evidence: [...scan.evidence.filter((e) => e.target !== target), redactEvidence({ target, ...args.evidence })]
|
|
63855
63907
|
}));
|
|
63856
|
-
return
|
|
63908
|
+
return scansResult(dir);
|
|
63857
63909
|
};
|
|
63858
63910
|
const finishScan = async (frame, _client, ctx) => {
|
|
63859
63911
|
ensureOwner(ctx);
|
|
@@ -63869,7 +63921,7 @@ function buildDeployHandlers(deps) {
|
|
|
63869
63921
|
notes: [...scan.notes.filter((n2) => n2.startsWith(MCP_SCAN_NOTE_PREFIX) || n2.startsWith(TEST_SCAN_NOTE_PREFIX)), ...args.notes.map(redactSecretValues)],
|
|
63870
63922
|
error: void 0
|
|
63871
63923
|
}));
|
|
63872
|
-
return
|
|
63924
|
+
return scansResult(dir);
|
|
63873
63925
|
};
|
|
63874
63926
|
const scanHandler = async (frame, _client, ctx) => {
|
|
63875
63927
|
ensureOwner(ctx);
|
|
@@ -63895,9 +63947,9 @@ function buildDeployHandlers(deps) {
|
|
|
63895
63947
|
throw toClawdError(error);
|
|
63896
63948
|
}
|
|
63897
63949
|
const live = liveScans.get(personaId2);
|
|
63898
|
-
if (live && live.sessionId === void 0) return
|
|
63950
|
+
if (live && live.sessionId === void 0) return localView(personaId2);
|
|
63899
63951
|
let file = await readHistory(dir).catch(() => emptyScanFile());
|
|
63900
|
-
if (file.scans.some((s2) => s2.status === "scanning" && isLiveScan(live, s2))) return
|
|
63952
|
+
if (file.scans.some((s2) => s2.status === "scanning" && isLiveScan(live, s2))) return localView(personaId2);
|
|
63901
63953
|
file = await settleStale(personaId2, dir, file);
|
|
63902
63954
|
let head;
|
|
63903
63955
|
try {
|
|
@@ -63912,7 +63964,7 @@ function buildDeployHandlers(deps) {
|
|
|
63912
63964
|
liveScans.delete(personaId2);
|
|
63913
63965
|
throw err;
|
|
63914
63966
|
}
|
|
63915
|
-
return
|
|
63967
|
+
return localView(personaId2);
|
|
63916
63968
|
};
|
|
63917
63969
|
const configureTestIdentity = async (api, slug) => {
|
|
63918
63970
|
await requireIntegrationPublishingConfig(api, slug);
|
|
@@ -64151,18 +64203,12 @@ function buildDeployHandlers(deps) {
|
|
|
64151
64203
|
const id = await deps.openTestPersona(personaId2, record4.verified, releaseId);
|
|
64152
64204
|
return { response: { type: "deploy:openTest", personaId: id, expectedImage: record4.verified.image } };
|
|
64153
64205
|
};
|
|
64154
|
-
|
|
64155
|
-
const coalescedGet = async (frame, client, ctx) => {
|
|
64156
|
-
ensureOwner(ctx);
|
|
64157
|
-
const args = parseArgs2(DeployGetArgsSchema, frame, "deploy:get");
|
|
64158
|
-
const key = JSON.stringify(args);
|
|
64159
|
-
const hit = getInFlight.get(key);
|
|
64160
|
-
if (hit) return hit;
|
|
64206
|
+
function startTrace(personaId2, event) {
|
|
64161
64207
|
const started = import_node_perf_hooks.performance.now();
|
|
64162
64208
|
const traceId = (0, import_node_crypto14.randomUUID)();
|
|
64163
|
-
const log = (
|
|
64209
|
+
const log = (phase, meta) => {
|
|
64164
64210
|
try {
|
|
64165
|
-
deps.logger?.info(
|
|
64211
|
+
deps.logger?.info(`${event}.${phase}`, { personaId: personaId2, traceId, ...meta });
|
|
64166
64212
|
} catch {
|
|
64167
64213
|
}
|
|
64168
64214
|
};
|
|
@@ -64175,7 +64221,7 @@ function buildDeployHandlers(deps) {
|
|
|
64175
64221
|
return result;
|
|
64176
64222
|
} finally {
|
|
64177
64223
|
const finished = import_node_perf_hooks.performance.now();
|
|
64178
|
-
log(stage === "total" ? "
|
|
64224
|
+
log(stage === "total" ? "finished" : "stage", {
|
|
64179
64225
|
stage,
|
|
64180
64226
|
status,
|
|
64181
64227
|
...details,
|
|
@@ -64184,10 +64230,20 @@ function buildDeployHandlers(deps) {
|
|
|
64184
64230
|
});
|
|
64185
64231
|
}
|
|
64186
64232
|
};
|
|
64187
|
-
|
|
64233
|
+
return { log, measure, started };
|
|
64234
|
+
}
|
|
64235
|
+
const getInFlight = /* @__PURE__ */ new Map();
|
|
64236
|
+
const coalescedGet = async (frame, client, ctx) => {
|
|
64237
|
+
ensureOwner(ctx);
|
|
64238
|
+
const args = parseArgs2(DeployGetArgsSchema, frame, "deploy:get");
|
|
64239
|
+
const key = JSON.stringify(args);
|
|
64240
|
+
const hit = getInFlight.get(key);
|
|
64241
|
+
if (hit) return hit;
|
|
64242
|
+
const { log, measure, started } = startTrace(args.personaId, "deploy.get");
|
|
64243
|
+
log("started", { historical: args.releaseHead !== void 0 || args.releaseId !== void 0, ...args.environment ? { environment: args.environment } : {} });
|
|
64188
64244
|
const promise = measure("total", () => enqueue(args.personaId, async () => {
|
|
64189
64245
|
const durationMs = Math.round((import_node_perf_hooks.performance.now() - started) * 100) / 100;
|
|
64190
|
-
log("
|
|
64246
|
+
log("stage", { stage: "queue", status: "ok", durationMs, elapsedMs: durationMs });
|
|
64191
64247
|
const { personaId: personaId2, ...selection } = args;
|
|
64192
64248
|
mustPersona(personaId2);
|
|
64193
64249
|
return view(personaId2, selection, measure);
|
|
@@ -64199,8 +64255,30 @@ function buildDeployHandlers(deps) {
|
|
|
64199
64255
|
});
|
|
64200
64256
|
return promise;
|
|
64201
64257
|
};
|
|
64258
|
+
const localInFlight = /* @__PURE__ */ new Map();
|
|
64259
|
+
const coalescedLocalGet = async (frame, _client, ctx) => {
|
|
64260
|
+
ensureOwner(ctx);
|
|
64261
|
+
const { personaId: personaId2 } = parseArgs2(DeployPersonaArgsSchema, frame, "deploy:getLocal");
|
|
64262
|
+
const hit = localInFlight.get(personaId2);
|
|
64263
|
+
if (hit) return hit;
|
|
64264
|
+
const { log, measure, started } = startTrace(personaId2, "deploy.getLocal");
|
|
64265
|
+
log("started", {});
|
|
64266
|
+
const promise = measure("total", () => enqueue(personaId2, async () => {
|
|
64267
|
+
const durationMs = Math.round((import_node_perf_hooks.performance.now() - started) * 100) / 100;
|
|
64268
|
+
log("stage", { stage: "queue", status: "ok", durationMs, elapsedMs: durationMs });
|
|
64269
|
+
mustPersona(personaId2);
|
|
64270
|
+
return localView(personaId2, measure);
|
|
64271
|
+
}));
|
|
64272
|
+
localInFlight.set(personaId2, promise);
|
|
64273
|
+
void promise.finally(() => {
|
|
64274
|
+
if (localInFlight.get(personaId2) === promise) localInFlight.delete(personaId2);
|
|
64275
|
+
}).catch(() => {
|
|
64276
|
+
});
|
|
64277
|
+
return promise;
|
|
64278
|
+
};
|
|
64202
64279
|
return {
|
|
64203
64280
|
"deploy:get": coalescedGet,
|
|
64281
|
+
"deploy:getLocal": coalescedLocalGet,
|
|
64204
64282
|
"deploy:confirmTest": serial(confirmTest),
|
|
64205
64283
|
"deploy:promote": serial(promote),
|
|
64206
64284
|
"deploy:openTest": serial(openTest),
|
|
@@ -74508,6 +74586,7 @@ var METHOD_GRANT_MAP = {
|
|
|
74508
74586
|
"visitor:list": ADMIN_ANY,
|
|
74509
74587
|
// Deployment handlers use owner credentials and can publish resources; exclude guests.
|
|
74510
74588
|
"deploy:get": ADMIN_ANY,
|
|
74589
|
+
"deploy:getLocal": ADMIN_ANY,
|
|
74511
74590
|
"deploy:scan": ADMIN_ANY,
|
|
74512
74591
|
"deploy:patch": ADMIN_ANY,
|
|
74513
74592
|
"deploy:putSecret": ADMIN_ANY,
|
|
@@ -74738,7 +74817,7 @@ function computeMethodAccess(args) {
|
|
|
74738
74817
|
}
|
|
74739
74818
|
|
|
74740
74819
|
// src/version.ts
|
|
74741
|
-
var version = "0.2.
|
|
74820
|
+
var version = "0.2.665".length > 0 ? "0.2.665" : "dev";
|
|
74742
74821
|
|
|
74743
74822
|
// src/cli-probe/probe.ts
|
|
74744
74823
|
var fs86 = __toESM(require("fs"), 1);
|