Clarify Hose command names
This commit is contained in:
1 parent
e0f1724929
commit
f3134a59b3
6 files changed
+22
-20
No files matched your search
Vendored
+6
-6
@@ -913,7 +913,7 @@ export default lintRule;
|
||||
`+"• 安全边界:该凭证绝不包含且无法访问合思 (Hose) 主系统;仅限内部排查,严禁在外部公开分享!")}return{url:W?I:Z?V:G,type:X,mode:Z?"auto_login":"direct",sealResultUrl:G,hoseDocumentUrl:I,documentUrl:I,ssoUrl:V,expiresIn:Z?q:void 0,identity:F,warning:w,hoseDomain:J.type==="hose"?pS1(J.domain):void 0,recordId:Q.id,sourceDocumentSN:Q.sourceDocumentSN,sourceDocumentId:Q.sourceDocumentId,sourceSystem:Q.sourceSystem,missing:{hoseDocumentUrl:!I?"sourceExtendData.hosecloudViewUrl is absent from the approval run detail.":void 0}}}},{name:"seal_approval_run_pick",description:"按合思单号或关键字查询运行记录,返回候选记录及其当时使用的规则版本,便于再取详情或查版本规则",parameters:L.object({query:L.string().optional().describe("合思单号、源单据 ID、运行记录 ID 或 trace 关键字"),sn:L.string().optional().describe("合思/易快报单号;优先作为精确 sourceDocumentSN 查询"),batchId:L.string().optional().describe("模拟批次 ID"),latest:L.boolean().optional().describe("只返回最新一条匹配记录"),fields:L.union([L.string(),L.array(L.string())]).optional().describe("限制返回字段"),limit:L.number().int().positive().max(100).optional(),maxScan:L.number().int().positive().max(5000).optional().describe("最多扫描多少条运行记录用于本地匹配,默认 1000"),includeBridge:L.boolean().optional()}),handler:async($,Y,z)=>{let U=Y.sn??Y.query;if(!U)throw Error("query or sn is required");let Q=await dS1($,{query:U,sn:Y.sn,batchId:Y.batchId,latest:Y.latest,limit:Y.latest?1:Y.limit??20,maxScan:Y.maxScan??1000}),J=await Promise.all(Q.records.map((X)=>H4($,X.id))),I=A_0(Y.fields),K=J.map((X)=>iS1(X,I)),G=J.find((X)=>X.ruleSetVersionNumber!==void 0)?.ruleSetVersionNumber,H=G===void 0?"latest":String(G),W=G===void 0?'"latestRuleVersion":true':`"ruleVersionNumber":${G}`;return{query:U,sourceDocumentSN:Y.sn,simulationBatchId:Y.batchId,latest:Y.latest??!1,total:Q.total,scanned:Q.scanned,matched:K.length,records:K,next:{getSummary:`seal-use approval-runs get <recordId> --summary --corp ${z.corp.id}`,getRuleVersion:`seal-use rules version ${H} --corp ${z.corp.id}`,searchRuleVersion:`seal-use tool seal_approval_search --corp ${z.corp.id} --json '{"keywords":["关键词"],"areas":["rules"],"ruleVersionScope":"version",${W}}'`,getVersionContext:`seal-use tool seal_approval_context_get --corp ${z.corp.id} --json '{${W}}'`},...Y.includeBridge?{bridge:wj(J)}:{}}}},{name:"seal_simulation_batch_records_get",description:"获取某一次 Seal 模拟批次的运行记录,并整理对应 Langfuse trace/session 桥接字段",parameters:L.object({batchId:L.string().describe("simulation batch ID"),query:L.string().optional().describe("在 id、sourceDocumentSN、sourceDocumentId、documentId、Langfuse traceId 中做本地包含匹配")}),handler:async($,Y)=>{let z=yl(await Wg($,Y.batchId),Y.query);return{batchId:Y.batchId,count:z.length,records:z.map(fU),bridge:wj(z)}}},{name:"seal_simulation_batch_create",description:"创建 Seal 模拟测试批次。支持合思指定单号(hosecloud)与材料包导入(material_pack)两种模式;其他取数模式通过 rawParams 预留透传。",parameters:L.object({mode:L.enum(["hosecloud","material_pack"]).default("hosecloud").describe("来源模式: hosecloud=合思指定单号; material_pack=材料包导入"),flowIds:L.array(L.string()).max(100).optional().describe("合思模式: 单据流水号列表"),rejectNodeName:L.string().nullable().optional().describe("仅关注特定节点: 节点名称, 不设为 null 表示不限制"),thinkingDepthOverride:L.enum(["default","medium","high"]).optional().describe("思考深度: default=按偏好设置, medium=标准, high=深度推理"),skipInvoiceGeneration:L.boolean().optional().describe("跳过发票生成, 默认 true"),skipExpenseExtraction:L.boolean().optional().describe("跳过费用提取, 默认 true"),disableAttachmentCache:L.boolean().optional().describe("不使用附件缓存, 默认 false"),signKey:L.string().optional().describe("合思集成标识; 缺省时自动取第一个合思集成"),packageIds:L.array(L.string()).optional().describe("材料包模式: 材料包 id 列表(来自 material-packages upload 响应)"),templateId:L.string().optional().describe("材料包模板 id, 例如 conference_reimbursement_v1; 缺省取 schemaConfig.id"),schemaConfig:L.record(L.string(),L.unknown()).optional().describe("材料包字段映射(确认参数), 建议使用 material-packages upload 返回的 schemaConfig"),noWait:L.boolean().optional().describe("创建后立即返回异步票据,不等待批次完成"),rawParams:L.record(L.string(),L.unknown()).optional().describe("预留: 其他取数模式(如时间范围 startTime/endTime)透传参数, 覆盖上述构建结果")}),handler:async($,Y)=>{let z=Y.mode??"hosecloud",U=Y.signKey;if(z==="hosecloud"&&!U){if(U=(await Zg($)).find((K)=>K.signKey)?.signKey,!U)throw Error("
Line truncated
|
||||
`)}function Yg1($){let Y=[];if(Y.push(`seal-use ${$.area} - ${$.title}`),$.description)Y.push($.description);Y.push(""),Y.push("Usage:");let z=new Map;for(let Q of $.commands){let J=Q.group??"",I=z.get(J)??[];I.push(Q),z.set(J,I)}let U=[...$.groupOrder??[],...[...z.keys()].filter((Q)=>!$.groupOrder?.includes(Q))];for(let Q of U){let J=z.get(Q);if(!J)continue;if(Q)Y.push(""),Y.push(`${Q}:`);for(let I of J)for(let K of I.usage)Y.push(` ${K}`)}if($.commands.some((Q)=>Q.name))Y.push(""),Y.push(`Run 'seal-use ${$.area} <command> --help' for details on a specific command.`);return Y.join(`
|
||||
`)}function i_0(){let $=[];$.push("seal-use CLI"),$.push(""),$.push("Usage:"),$.push(" seal-use version");for(let Y of n_0)for(let z of Y.commands)for(let U of z.usage)$.push(` ${U}`);return $.push(""),$.push("Run 'seal-use <command> --help' for details on a specific command."),$.join(`
|
||||
`)}var n_0;var nl=m(()=>{F$();n_0=[{area:"corps",title:"Enterprise and tenant management",description:"Manage enterprise configurations, environment modes, test bindings, and syncing.",groupOrder:["企业接入","发现与选择","企业配置","测试配对与验证","Hose 专属能力"],commands:[{name:"list",group:"发现与选择",summary:"List configured enterprises sorted by 7-day usage frequency",usage:["seal-use corps list [query] [--all] [--limit <n>] [--env <production|test>] [--strict] [--corp <corpId>]"],options:[{flag:"--all",description:"Display all configured enterprises without the default 10-item limit"},{flag:"--limit <n>",description:"Maximum number of enterprises to display (defaults to 10)"},{flag:"--env <production|test>",description:"Filter enterprises by environment ('production' or 'test')"},{flag:"--strict",description:"Use strict exact substring matching instead of default soft fuzzy search"}]},{name:"search",aliases:["find"],group:"发现与选择",summary:"Search configured enterprises with intelligent soft fuzzy matching",usage:["seal-use corps search <query> [--env <production|test>] [--strict]"],options:[{flag:"--env <production|test>",description:"Filter enterprises by environment ('production' or 'test')"},{flag:"--strict",description:"Use strict exact substring matching instead of default soft fuzzy search"}],description:"Searches enterprise ID, name, staff ID, domain, tenant slug, environment, or bindings. Uses soft search by default (case-insensitive, Chinese homophones, front/back nasal vowels, initials, typo/missing letter tolerance)."},{name:"get",aliases:["show"],group:"发现与选择",summary:"Get rich details and configuration of an enterprise",usage:["seal-use corps get <corpId>"],description:"Retrieves complete enterprise details (URLs, tenant slugs, custom headers/cookies, staff IDs, relations, config file path) with sensitive secrets safely redacted."},{name:"current",group:"发现与选择",summary:"Show active enterprise in stateful mode",usage:["seal-use corps current [--corp <corpId>]"]},{name:"switch",group:"发现与选择",summary:"Switch default active enterprise",usage:["seal-use corps switch <corpId>"]},{name:"mark",group:"企业配置",summary:"Mark enterprise environment as production or test",usage:["seal-use corps mark <corpId> --env <production|test> [--confirm]"],options:[{flag:"--env <production|test>",description:"Target environment: 'production' or 'test' (required)"},{flag:"--confirm",description:"Confirm the environment update (required)"}],description:"Explicitly updates an enterprise's environment tag. Requires --confirm to prevent accidental changes."},{name:"rename",group:"企业配置",summary:"Rename an enterprise display name",usage:["seal-use corps rename <corpId> --name <newName>"],options:[{flag:"--name <newName>",description:"New human-readable enterprise name (required)"}],description:"Safely updates the display name of a configured enterprise without modifying underlying files manually."},{name:"bind-test",group:"测试配对与验证",summary:"Bind a production enterprise to a test enterprise (1-to-1 association)",usage:["seal-use corps bind-test <prodCorpId> <testCorpId> [--confirm] [--force]","seal-use corps bind-test <testCorpId> --corp <prodCorpId> [--confirm] [--force]"],options:[{flag:"--confirm",description:"Explicitly confirm binding and tag test environment (required)"},{flag:"--force",description:"Force re-binding if the production enterprise is already bound"},{flag:"--corp <corpId>",description:"Specify production enterprise ID or name"}],description:"Establishes a strict 1-to-1 association between a production enterprise and a test enterprise. Automatically marks the test enterprise with environment 'test'."},{name:"unbind-test",group:"测试配对与验证",summary:"Unbind a production and test enterprise association",usage:["seal-use corps unbind-test [<corpId>] [--confirm]"],options:[{flag:"--confirm",description:"Explicitly confirm unbinding both sides (required)"},{flag:"--corp <corpId>",description:"Specify enterprise ID or name"}],description:"Removes the 1-to-1 test association from both the production enterprise and the test enterprise."},{name:"sync-test",group:"测试配对与验证",summary:"Synchronize rules and preferences from production to test enterprise",usage:["seal-use corps sync-test [<prodCorpId>] [--dry-run] [--yes] [--version-name <name>]"],options:[{flag:"--dry-run",description:"Preview sync diff without making network mutations (default)"},{flag:"--yes",description:"Execute synchronization and publish new rule version on test enterprise"},{flag:"--version-name <name>",description:"Custom version name for published test rule version"},{flag:"--corp <corpId>",description:"Specify production enterprise ID or name"}],description:"Overwrites test enterprise decision preferences with production preferences, syncs production draft rules to test enterprise, and immediately publishes a new versi
Line truncated
|
||||
`)}var n_0;var nl=m(()=>{F$();n_0=[{area:"corps",title:"Enterprise and tenant management",description:"Manage enterprise configurations, environment modes, test bindings, and syncing.",groupOrder:["企业接入","发现与选择","企业配置","测试配对与验证","Hose 专属能力"],commands:[{name:"list",group:"发现与选择",summary:"List configured enterprises sorted by 7-day usage frequency",usage:["seal-use corps list [query] [--all] [--limit <n>] [--env <production|test>] [--strict] [--corp <corpId>]"],options:[{flag:"--all",description:"Display all configured enterprises without the default 10-item limit"},{flag:"--limit <n>",description:"Maximum number of enterprises to display (defaults to 10)"},{flag:"--env <production|test>",description:"Filter enterprises by environment ('production' or 'test')"},{flag:"--strict",description:"Use strict exact substring matching instead of default soft fuzzy search"}]},{name:"search",aliases:["find"],group:"发现与选择",summary:"Search configured enterprises with intelligent soft fuzzy matching",usage:["seal-use corps search <query> [--env <production|test>] [--strict]"],options:[{flag:"--env <production|test>",description:"Filter enterprises by environment ('production' or 'test')"},{flag:"--strict",description:"Use strict exact substring matching instead of default soft fuzzy search"}],description:"Searches enterprise ID, name, staff ID, domain, tenant slug, environment, or bindings. Uses soft search by default (case-insensitive, Chinese homophones, front/back nasal vowels, initials, typo/missing letter tolerance)."},{name:"get",aliases:["show"],group:"发现与选择",summary:"Get rich details and configuration of an enterprise",usage:["seal-use corps get <corpId>"],description:"Retrieves complete enterprise details (URLs, tenant slugs, custom headers/cookies, staff IDs, relations, config file path) with sensitive secrets safely redacted."},{name:"current",group:"发现与选择",summary:"Show active enterprise in stateful mode",usage:["seal-use corps current [--corp <corpId>]"]},{name:"switch",group:"发现与选择",summary:"Switch default active enterprise",usage:["seal-use corps switch <corpId>"]},{name:"mark",group:"企业配置",summary:"Mark enterprise environment as production or test",usage:["seal-use corps mark <corpId> --env <production|test> [--confirm]"],options:[{flag:"--env <production|test>",description:"Target environment: 'production' or 'test' (required)"},{flag:"--confirm",description:"Confirm the environment update (required)"}],description:"Explicitly updates an enterprise's environment tag. Requires --confirm to prevent accidental changes."},{name:"rename",group:"企业配置",summary:"Rename an enterprise display name",usage:["seal-use corps rename <corpId> --name <newName>"],options:[{flag:"--name <newName>",description:"New human-readable enterprise name (required)"}],description:"Safely updates the display name of a configured enterprise without modifying underlying files manually."},{name:"bind-test",group:"测试配对与验证",summary:"Bind a production enterprise to a test enterprise (1-to-1 association)",usage:["seal-use corps bind-test <prodCorpId> <testCorpId> [--confirm] [--force]","seal-use corps bind-test <testCorpId> --corp <prodCorpId> [--confirm] [--force]"],options:[{flag:"--confirm",description:"Explicitly confirm binding and tag test environment (required)"},{flag:"--force",description:"Force re-binding if the production enterprise is already bound"},{flag:"--corp <corpId>",description:"Specify production enterprise ID or name"}],description:"Establishes a strict 1-to-1 association between a production enterprise and a test enterprise. Automatically marks the test enterprise with environment 'test'."},{name:"unbind-test",group:"测试配对与验证",summary:"Unbind a production and test enterprise association",usage:["seal-use corps unbind-test [<corpId>] [--confirm]"],options:[{flag:"--confirm",description:"Explicitly confirm unbinding both sides (required)"},{flag:"--corp <corpId>",description:"Specify enterprise ID or name"}],description:"Removes the 1-to-1 test association from both the production enterprise and the test enterprise."},{name:"sync-test",group:"测试配对与验证",summary:"Synchronize rules and preferences from production to test enterprise",usage:["seal-use corps sync-test [<prodCorpId>] [--dry-run] [--yes] [--version-name <name>]"],options:[{flag:"--dry-run",description:"Preview sync diff without making network mutations (default)"},{flag:"--yes",description:"Execute synchronization and publish new rule version on test enterprise"},{flag:"--version-name <name>",description:"Custom version name for published test rule version"},{flag:"--corp <corpId>",description:"Specify production enterprise ID or name"}],description:"Overwrites test enterprise decision preferences with production preferences, syncs production draft rules to test enterprise, and immediately publishes a new versi
Line truncated
|
||||
`)}
|
||||
`}function Tq($){return $.replace(/([?&](?:accessToken|token|returnToken)=)[^&\s]+/gi,"$1<redacted>").replace(/(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"$1<redacted>")}function x0($,Y={}){Ig1($,Y);let z=`${JSON.stringify($,null,2)}
|
||||
`;if(Y.outputFile){zg1(Y.outputFile,z),console.log(JSON.stringify({outputFile:Y.outputFile,bytes:Buffer.byteLength(z,"utf-8")},null,2));return}console.log(z.trimEnd())}function Ig1($,Y={}){if(Y.allowFull||Y.outputFile)return;let z=Buffer.byteLength(JSON.stringify($),"utf-8");if(z>Jg1)throw new eB(`Output is large (${z} bytes). Use --summary, --fields, --count, or --output-file; pass --full only when you really need the full response.`)}function m_0($,Y){if(Y)return;let z=$&&typeof $==="object"?$:{},U=typeof z.count==="number"?z.count:void 0,Q=Array.isArray(z.rules)?z.rules.length:void 0,J=Buffer.byteLength(JSON.stringify($),"utf-8"),I=U??Q??0;if(I>Ug1||J>Qg1)throw new eB(`Rule list is large (${I} rules, ${J} bytes). Use "seal-use rules list --summary", "seal-use rules count", or --output-file; pass --full only when you really need full descriptions.`,"seal-use rules list --summary")}function E0($){return{allowFull:Z0($.full)===!0,outputFile:h($.outputFile)??h($["output-file"])}}function l_0($=[]){console.log(p_0($))}var Ug1=100,Qg1=120000,d_0,Jg1=200000;var K4=m(()=>{A4();F$();nl();d_0=["code","status","strictness","scope","updatedAt"]});var pl={};D8(pl,{selectCorp:()=>T1,runToolResult:()=>O$,runTool:()=>k0,globalConfigSummary:()=>a2});function T1($){let Y=a8(),z=v4(),U=n2(Y,{stateful:z.stateful,defaultCorpId:z.defaultCorpId,corpId:$},g3());return kA0(U.id),U}function a2($=v4()){return{mode:$.stateful?"stateful":"stateless",stateful:$.stateful,...$.stateful&&$.defaultCorpId?{defaultCorpId:$.defaultCorpId}:{},...$.testEnterprisesDir?{testEnterprisesDir:$.testEnterprisesDir}:{},lint:$.lint,configFile:ZU()}}async function k0($,Y,z,U,Q={}){x0(await O$($,Y,z,U),Q)}async function O$($,Y,z,U){let Q=Dq.find((K)=>K.name===$);if(!Q)throw Error(`Unknown Seal tool: ${$}`);let J=Object.fromEntries(Object.entries(U).filter(([,K])=>K!==void 0)),I=Q.handler;return I(Y,J,{corp:z})}var f4=m(()=>{k3();rB();Bq();K4()});import{existsSync as o_0}from"node:fs";async function r_0($,Y){if(!o_0($))throw Error(`File not found: ${$}`);let z=xU($);console.log(JSON.stringify(await kU(z.fileBuffer,z.fileName,Y),null,2))}async function Cj($,Y,z,U,Q){if($==="ready"||$==="status"){let J=Y??h(Q.options.file)??h(Q.options.input),I=await qj(z,U,{filePath:J,webhook:h(Q.options.webhook)??h(Q.options.selector)});if(console.error(`[webhook-ready] 企业环境: ${I.corp.name} (${I.corp.id}) [${I.stateMode}]`),I.corp.tenant?.name)console.error(`[webhook-ready] 租户信息: ${I.corp.tenant.name} (${I.corp.tenant.id})`);console.error(`[webhook-ready] 凭证状态: ${I.authStatus==="ok"?"OK":`异常 (${I.authError})`}`),console.error(`[webhook-ready] Webhook 通道: ${I.activeWebhooks.length} 个可用`);for(let K of I.activeWebhooks){let G=K.isDefault?" [默认通道]":"";console.error(` - ${K.name} (${K.id}) mode=${K.mode}${G}`)}if(I.materialPack)console.error(`[webhook-ready] 材料包预检: ${I.materialPack.valid?`通过 (${I.materialPack.documentCount} 单)`:`失败 (${I.materialPack.errors?.join("; ")})`}`);if(I.ready)console.error(`\uD83D\uDFE2 ${I.statusMessage}`),console.error(`\uD83D\uDC49 Next action: ${I.nextAction}`);else console.error(`\uD83D\uDD34 准备阶段未通过: ${I.statusMessage}`),console.error(`\uD83D\uDC49 Next action: ${I.nextAction}`);console.log(JSON.stringify(I,null,2));return}if($==="replay"){let J=Y??h(Q.options.recordId)??h(Q.options["record-id"])??h(Q.options.id),I=h(Q.options.recordIds)??h(Q.options["record-ids"]),K=I?I.split(",").map((n)=>n.trim()).filter(Boolean):void 0,G=h(Q.options.sn)??h(Q.options.documentSn)??h(Q.options["document-sn"]),H=h(Q.options.sns)??h(Q.options["document-sns"]),W=H?H.split(",").map((n)=>n.trim()).filter(Boolean):void 0,X=s0(Q.options.limit),Z=h(Q.options.status),q=h(Q.options.startDate)??h(Q.options["start-date"]),V=h(Q.options.endDate)??h(Q.options["end-date"]);if(!J&&!K&&!G&&!W&&X===void 0)throw Error("Usage: seal-use webhook replay <recordId> [--sn <documentSN>] [--limit <n>] [--status <status>] [--webhook <idOrName>] [--source-corp <corpId>] [--target-corp <corpId>] [--dry-run]");let F=h(Q.options.sourceCorp)??h(Q.options["source-corp"])??h(Q.options.prodCorp)??h(Q.options["prod-corp"]),w=h(Q.options.targetCorp)??h(Q.options["target-corp"])??h(Q.options.testCorp)??h(Q.options["test-corp"]),O=Z0(Q.options.force)===!0,{sourceCorp:N,targetCorp:M}=$P({sourceCorpId:F,targetCorpId:w,activeCorp:U,force:O},T1),D=N.id===U.id?z:await P1(N),P=M.id===U.id?z:await P1(M),j=h(Q.options.webhook)??h(Q.options.selector),A=h(Q.options.snSuffix)??h(Q.options["sn-suffix"]),T=h(Q.options.snPrefix)??h(Q.options["sn-prefix"]),C=h(Q.options.docIdSuffix)??h(Q.options["doc-id-suffix"]),b=h(Q.options.docIdPrefix)??h(Q.options["doc-id-prefix"]),k=Z0(Q.options.dryRun)??Z0(Q.options["dry-run"]),i=await zK({query:{recordId:J,recordIds:K,sn:G,sns:W,limit:X,status:Z,startDate:q,endDate:V},sourceClient:D,targetClient:P,sourceCorp:N,targetCorp:M,webhookSelector:j,snPrefix:T,snSuffix:A,docIdPrefix:b,docIdSuffix:C,dr
Line truncated
|
||||
@@ -922,7 +922,7 @@ export default lintRule;
|
||||
or: seal-use corps bind-test <testCorpId> --corp <prodCorpId> [--confirm] [--force]`);let J=T1(U),I=T1(Q);if(J.id===I.id)throw m4(`Cannot bind enterprise '${J.id}' to itself.`);if(J.prodCorpId&&J.prodCorpId!==I.id)throw m4(`Cannot use '${J.id}' as a production enterprise because it is already registered as a test enterprise for '${J.prodCorpId}'. Multi-tier chaining is not permitted.`);if(I.testCorpId&&I.testCorpId!==J.id)throw m4(`Cannot bind '${I.id}' as a test enterprise because it already has a bound test enterprise '${I.testCorpId}'. Multi-tier chaining is not permitted.`);let K=Z0(z.options.force)===!0;if(J.testCorpId&&J.testCorpId!==I.id||I.prodCorpId&&I.prodCorpId!==J.id){if(!K)throw A5(`Enterprise binding conflict: production enterprise '${J.id}' is bound to '${J.testCorpId??"none"}', and test enterprise '${I.id}' is bound to '${I.prodCorpId??"none"}'. Overwriting an existing binding requires --force and --confirm.`,`seal-use corps bind-test ${J.id} ${I.id} --confirm --force`)}if(!(Z0(z.options.confirm)===!0||Z0(z.options.yes)===!0)){let X=K?" --force":"";throw A5(`Refusing to bind test enterprise '${I.name}' (${I.id}) to production enterprise '${J.name}' (${J.id}) without --confirm. Enterprise binding establishes 1-to-1 sync pairing and marks '${I.id}' as a test environment.`,`seal-use corps bind-test ${J.id} ${I.id} --confirm${X}`)}if(J.testCorpId&&J.testCorpId!==I.id)try{y3(J.testCorpId,{prodCorpId:void 0})}catch{}if(I.prodCorpId&&I.prodCorpId!==J.id)try{y3(I.prodCorpId,{testCorpId:void 0})}catch{}let H=y3(J.id,{environment:"production",testCorpId:I.id}),W=y3(I.id,{environment:"test",prodCorpId:J.id});x0({success:!0,productionEnterprise:{id:H.id,name:H.name,environment:H.environment,testCorpId:H.testCorpId},testEnterprise:{id:W.id,name:W.name,environment:W.environment,prodCorpId:W.prodCorpId}});return}if($==="unbind-test"){let U=Y??h(z.options.corp),Q=T1(U);if(!Q.testCorpId&&!Q.prodCorpId){x0({unbound:!1,message:`Enterprise '${Q.name}' (${Q.id}) does not have an active test enterprise binding.`});return}let J=Q.testCorpId?Q.id:Q.prodCorpId,I=Q.testCorpId?Q.testCorpId:Q.id;if(!(Z0(z.options.confirm)===!0||Z0(z.options.yes)===!0))throw A5(`Refusing to unbind production enterprise '${J}' and test enterprise '${I}' without --confirm.`,`seal-use corps unbind-test ${Q.id} --confirm`);y3(J,{testCorpId:void 0});try{y3(I,{prodCorpId:void 0})}catch{}x0({success:!0,unboundProduction:J,unboundTest:I});return}if($==="sync-test"){let U=Y??h(z.options.corp),Q=T1(U);if(!Q.testCorpId)throw m4(`Production enterprise '${Q.name}' (${Q.id}) has no bound test enterprise.
|
||||
Run 'seal-use corps bind-test ${Q.id} <testCorpId> --confirm' first to establish a verified 1-to-1 association.`);let J=T1(Q.testCorpId);if(J.environment!=="test")throw Error(`Target enterprise '${J.name}' (${J.id}) is marked as '${J.environment}', NOT 'test'. Aborting sync to protect non-test environments.`);let I=await P1(Q),K=await P1(J),[G,H,W,X,Z,q,V,F]=await Promise.all([o1(I,Q.seal.endpoints.approvalStylePreferences),o1(K,J.seal.endpoints.approvalStylePreferences),X6(I),X6(K),c8(I),c8(K),Ch0(I),Ch0(K)]),w=(V.articles||[]).filter((G0)=>!G0.isDeleted),O=(F.articles||[]).filter((G0)=>!G0.isDeleted),N=new Map(O.map((G0)=>[G0.title.trim(),G0])),M=[],D=[],P=new Set(w.map((G0)=>G0.title.trim()));for(let G0 of w){let f0=G0.title.trim(),e0=N.get(f0);if(!e0)M.push(G0);else{let s=e0.content!==G0.content,H0=(e0.purpose??"")!==(G0.purpose??""),F0=e0.enabled!==G0.enabled,b0=e0.contentType!==G0.contentType,i0=(e0.status??"")!==(G0.status??""),n0=JSON.stringify([...e0.scenarios??[]].sort())!==JSON.stringify([...G0.scenarios??[]].sort()),w1=JSON.stringify([...e0.tags??[]].sort())!==JSON.stringify([...G0.tags??[]].sort());if(s||H0||F0||b0||i0||n0||w1)D.push({testId:e0.id,prodDoc:G0,reasons:[...s?["content"]:[],...H0?["purpose"]:[],...F0?["enabled"]:[],...b0?["contentType"]:[],...i0?["status"]:[],...n0?["scenarios"]:[],...w1?["tags"]:[]]})}}let j=O.filter((G0)=>!P.has(G0.title.trim())),T=[...Z].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0],C=T?.versionNumber,k=([...q].sort((G0,f0)=>f0.versionNumber-G0.versionNumber)[0]?.versionNumber??0)+1,S=Th0(Q.name,C,q),n=h(z.options["version-name"])??h(z.options.versionName)??Eh0(Q.name,C,S,k),U0={...H,tone:G.tone,language:G.language,detailLevel:G.detailLevel,outputFormat:G.outputFormat,examples:G.examples??[],prohibitedPhrases:G.prohibitedPhrases??[],customInstructions:G.customInstructions,decisionPreferences:G.decisionPreferences,thinkingDepthPreference:G.thinkingDepthPreference};if(Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0){x0({dryRun:!0,source:{id:Q.id,name:Q.name,environment:Q.environment,latestPublishedVersion:T?{versionNumber:T.versionNumber,versionName:T.versionName}:null,documentsCount:w.length},target:{id:J.id,name:J.name,environment:J.environment},versionMappingPlan:{sourceProdVersionNumber:C??null,sourceProdVersionName:T?.versionName??null,targetTestExpectedVersionNumber:k,targetTestPublishVersionName:n,iteration:S},preferencesDiff:{decisionPreferences:{before:H.decisionPreferences,after:G.decisionPreferences},thinkingDepthPreference:{before:H.thinkingDepthPreference,after:G.thinkingDepthPreference}},rulesPlan:{sourceDraftRuleCount:W.rules.length,targetExistingDraftRuleCount:X.rules.length,toDeleteCount:X.rules.length,toCreateCount:W.rules.length,rulesToSync:W.rules.map((G0,f0)=>({index:f0+1,sourceRuleId:G0.id,sourceRuleCode:G0.code??f0+1,expectedTargetCode:`rule-${f0+1}`,description:G0.description,scope:G0.scope,strictness:G0.strictness}))},documentsPlan:{sourceDocumentCount:w.length,targetExistingDocumentCount:O.length,toCreateCount:M.length,toCreate:M.map((G0)=>({title:G0.title,purpose:G0.purpose,contentType:G0.contentType,scenarios:G0.scenarios})),toUpdateCount:D.length,toUpdate:D.map((G0)=>({targetDocumentId:G0.testId,title:G0.prodDoc.title,reasons:G0.reasons})),toDeleteCount:j.length,toDelete:j.map((G0)=>({targetDocumentId:G0.id,title:G0.title}))},publishingPlan:{targetCorpId:J.id,publishVersionName:n,publishTarget:"test"},hosecloudSyncPlan:(()=>{if(Q.source.type!=="hose")return{sourceType:Q.source.type,skipped:!0,reason:"prod source is not hose; no hosecloud credentials available"};let G0=(G.integrations??[]).filter((s)=>s.type==="hosecloud"),f0=new Set,e0=G0.filter((s)=>{let H0=s.corporationId??Q.id;if(f0.has(H0))return!1;return f0.add(H0),!0});return{sourceType:"hose",outboundName:yh0(Q.name),targetMode:"assisted",integrationsCount:e0.length,integrations:e0.map((s)=>({corporationId:s.corporationId,apiOrigin:s.apiOrigin,customApiUrl:s.customApiUrl}))}})(),productionGuarantees:{prodRulesStayDraft:!0,prodVersionPublished:!1}});return}if(!(Z0(z.options.yes)===!0||Z0(z.options.confirm)===!0))throw A5(`Refusing to overwrite test enterprise '${J.name}' (${J.id}) with preferences, ${W.rules.length} draft rules, and ${w.length} knowledge documents from production enterprise '${Q.name}' (${Q.id}) without --yes. This will replace test draft rules, synchronize knowledge documents, and publish a new version on the test enterprise.`,`seal-use corps sync-test ${Q.id} --yes`);await s5(K,U0,J.seal.endpoints.approvalStylePreferences);let t=[];for(let G0 of j)await Bw(K,G0.id),t.push({id:G0.id,title:G0.title});let e=[];for(let G0 of D)await Aw(K,G0.testId,{title:G0.prodDoc.title,purpose:G0.prodDoc.purpose,content:G0.prodDoc.content,contentType:G0.prodDoc.contentType,status:G0.prodDoc.status,enabled:G0.prodDoc.enabled,scenarios:G0.prodDoc.scenarios&&G0.prodDoc.scenarios.length>0?G0.prodDoc.scenarios:["audit"],tags:G0.prodDoc.tags}),e.push({id:G0.testId,title
Line truncated
|
||||
Run 'seal-use corps bind-test ${Q.id} <testCorpId> --confirm' first to establish a verified 1-to-1 association,
|
||||
or add '--force' (or use 'seal-use webhook replay <recordId> --force') if you explicitly intend to replay directly within production.`);G=Q}else if(G=T1(Q.testCorpId),G.environment!=="test"&&!J)throw Error(`Target enterprise '${G.name}' (${G.id}) is marked as '${G.environment}', NOT 'test'. Aborting replay to protect non-test environments (use --force to override).`);if(!I&&!K)throw A5("Refusing to replay approval records without --confirm. Use --dry-run to preview the payload without sending it.",`seal-use corps replay-test ${U??"<prodCorpId>"} --confirm`);let H=h(z.options.recordId)??h(z.options["record-id"])??h(z.options.id),W=h(z.options.recordIds)??h(z.options["record-ids"]),X=W?W.split(",").map((S)=>S.trim()).filter(Boolean):void 0,Z=h(z.options.sn)??h(z.options.documentSn)??h(z.options["document-sn"]),q=h(z.options.sns)??h(z.options["document-sns"]),V=q?q.split(",").map((S)=>S.trim()).filter(Boolean):void 0,F=s0(z.options.limit)??(!H&&!X&&!Z&&!V?1:void 0),w=h(z.options.status),O=h(z.options.startDate)??h(z.options["start-date"]),N=h(z.options.endDate)??h(z.options["end-date"]),M=await P1(Q),D=Q.id===G.id?M:await P1(G),P=h(z.options.webhook)??h(z.options.selector),j=h(z.options.snSuffix)??h(z.options["sn-suffix"]),A=h(z.options.snPrefix)??h(z.options["sn-prefix"]),T=h(z.options.docIdSuffix)??h(z.options["doc-id-suffix"]),C=h(z.options.docIdPrefix)??h(z.options["doc-id-prefix"]),b={recordId:H,recordIds:X,sn:Z,sns:V,limit:F,status:w,startDate:O,endDate:N};console.error(`[corps-replay-test] 正式企业「${Q.name}」(${Q.id}) -> 测试企业「${G.name}」(${G.id})`);let k=await zK({query:b,sourceClient:M,targetClient:D,sourceCorp:Q,targetCorp:G,webhookSelector:P,snPrefix:A,snSuffix:j,docIdPrefix:C,docIdSuffix:T,dryRun:I});if(I){console.error(`[corps-replay-test] 预览模式:已成功从 ${Q.name} 提取单据并转换为 Webhook Payload(未实际推送)。`),console.log(JSON.stringify(k,null,2));return}if(k.success)if(k.totalCount===1&&k.replayedDocument)console.error(`\uD83D\uDFE2 成功重放单据「${k.replayedDocument.documentSN}」至 ${G.name} (${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDFE2 成功重放 ${k.successCount} 条单据(来自「${Q.name}」)至「${G.name}」(${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDD34 单据重放部分或全部失败(成功 ${k.successCount} 条,失败 ${k.failureCount} 条)至「${G.name}」`);if(console.error(`\uD83D\uDC49 Next action: seal-use approval-runs list --corp ${G.id} --limit ${k.totalCount}`),console.log(JSON.stringify(k,null,2)),!k.success)throw new L4(`Approval record replay failed: ${k.failureCount} record(s) failed.`,1);return}if($==="switch"){let U=Y;if(!U)throw Error("Usage: seal-use corps switch <corpId>");let Q=v4();if(!Q.stateful)throw Error("Cannot switch the default enterprise while stateless mode is enabled. Use `seal-use config mode stateful` first.");let J=T1(U);qU({...Q,stateful:!0,defaultCorpId:J.id}),x0({current:!0,id:J.id,name:J.name});return}if($==="probe-hose"){await fg1(k8(z.json));return}if($==="hose-staffs"){await ug1(k8(z.json));return}if($==="add-hose"){let Q={...k8(z.json),...z.options.staffName?{staffName:h(z.options.staffName)}:{},...z.options["staff-name"]?{staffName:h(z.options["staff-name"])}:{},...z.options.staffPhone?{staffPhone:h(z.options.staffPhone)}:{},...z.options["staff-phone"]?{staffPhone:h(z.options["staff-phone"])}:{},...z.options.name?{name:h(z.options.name)}:{},...z.options.domain?{domain:h(z.options.domain)}:{},...z.options.corpId?{corpId:h(z.options.corpId)}:{},...z.options["corp-id"]?{corpId:h(z.options["corp-id"])}:{},...z.options.appKey?{appKey:h(z.options.appKey)}:{},...z.options["app-key"]?{appKey:h(z.options["app-key"])}:{},...z.options.appSecurity?{appSecurity:h(z.options.appSecurity)}:{},...z.options["app-security"]?{appSecurity:h(z.options["app-security"])}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await Go(Q);return}if($==="add-seal"){let Q={...k8(z.json),...z.options.name?{name:h(z.options.name)}:{},...z.options.token?{token:h(z.options.token)}:{},...z.options.sealUrl?{sealUrl:h(z.options.sealUrl)}:{},...z.options.url?{sealUrl:h(z.options.url)}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await bg1(Q);return}if($==="add-link"){let U=Y??h(z.options.link)??h(z.options.url);if(!U)throw Error("Usage: seal-use corps add-link <url> [--name <customName>] [--as-hose] [--overwrite]");let Q=Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0;if(Z0(z.options["as-hose"])===!0||Z0(z.options.hose)===!0){if(ml(U)[0]?.kind==="seal-delegate")throw Error("Option --as-hose cannot be used with a Seal native delegate link. Seal delegate links directly authenticate to Seal.");await ng1(U,h(z.options.name),Z0(z.options.overwrite)===!0,Z0(z.options.force
Line truncated
|
||||
or add '--force' (or use 'seal-use webhook replay <recordId> --force') if you explicitly intend to replay directly within production.`);G=Q}else if(G=T1(Q.testCorpId),G.environment!=="test"&&!J)throw Error(`Target enterprise '${G.name}' (${G.id}) is marked as '${G.environment}', NOT 'test'. Aborting replay to protect non-test environments (use --force to override).`);if(!I&&!K)throw A5("Refusing to replay approval records without --confirm. Use --dry-run to preview the payload without sending it.",`seal-use corps replay-test ${U??"<prodCorpId>"} --confirm`);let H=h(z.options.recordId)??h(z.options["record-id"])??h(z.options.id),W=h(z.options.recordIds)??h(z.options["record-ids"]),X=W?W.split(",").map((S)=>S.trim()).filter(Boolean):void 0,Z=h(z.options.sn)??h(z.options.documentSn)??h(z.options["document-sn"]),q=h(z.options.sns)??h(z.options["document-sns"]),V=q?q.split(",").map((S)=>S.trim()).filter(Boolean):void 0,F=s0(z.options.limit)??(!H&&!X&&!Z&&!V?1:void 0),w=h(z.options.status),O=h(z.options.startDate)??h(z.options["start-date"]),N=h(z.options.endDate)??h(z.options["end-date"]),M=await P1(Q),D=Q.id===G.id?M:await P1(G),P=h(z.options.webhook)??h(z.options.selector),j=h(z.options.snSuffix)??h(z.options["sn-suffix"]),A=h(z.options.snPrefix)??h(z.options["sn-prefix"]),T=h(z.options.docIdSuffix)??h(z.options["doc-id-suffix"]),C=h(z.options.docIdPrefix)??h(z.options["doc-id-prefix"]),b={recordId:H,recordIds:X,sn:Z,sns:V,limit:F,status:w,startDate:O,endDate:N};console.error(`[corps-replay-test] 正式企业「${Q.name}」(${Q.id}) -> 测试企业「${G.name}」(${G.id})`);let k=await zK({query:b,sourceClient:M,targetClient:D,sourceCorp:Q,targetCorp:G,webhookSelector:P,snPrefix:A,snSuffix:j,docIdPrefix:C,docIdSuffix:T,dryRun:I});if(I){console.error(`[corps-replay-test] 预览模式:已成功从 ${Q.name} 提取单据并转换为 Webhook Payload(未实际推送)。`),console.log(JSON.stringify(k,null,2));return}if(k.success)if(k.totalCount===1&&k.replayedDocument)console.error(`\uD83D\uDFE2 成功重放单据「${k.replayedDocument.documentSN}」至 ${G.name} (${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDFE2 成功重放 ${k.successCount} 条单据(来自「${Q.name}」)至「${G.name}」(${k.targetWebhook?.name??"Webhook 通道"})`);else console.error(`\uD83D\uDD34 单据重放部分或全部失败(成功 ${k.successCount} 条,失败 ${k.failureCount} 条)至「${G.name}」`);if(console.error(`\uD83D\uDC49 Next action: seal-use approval-runs list --corp ${G.id} --limit ${k.totalCount}`),console.log(JSON.stringify(k,null,2)),!k.success)throw new L4(`Approval record replay failed: ${k.failureCount} record(s) failed.`,1);return}if($==="switch"){let U=Y;if(!U)throw Error("Usage: seal-use corps switch <corpId>");let Q=v4();if(!Q.stateful)throw Error("Cannot switch the default enterprise while stateless mode is enabled. Use `seal-use config mode stateful` first.");let J=T1(U);qU({...Q,stateful:!0,defaultCorpId:J.id}),x0({current:!0,id:J.id,name:J.name});return}if($==="probe-hose"){await fg1(k8(z.json));return}if($==="hose-staffs"){await ug1(k8(z.json));return}if($==="add-hose"){let Q={...k8(z.json),...z.options.staffName?{staffName:h(z.options.staffName)}:{},...z.options["staff-name"]?{staffName:h(z.options["staff-name"])}:{},...z.options.staffPhone?{staffPhone:h(z.options.staffPhone)}:{},...z.options["staff-phone"]?{staffPhone:h(z.options["staff-phone"])}:{},...z.options.name?{name:h(z.options.name)}:{},...z.options.domain?{domain:h(z.options.domain)}:{},...z.options.corpId?{corpId:h(z.options.corpId)}:{},...z.options["corp-id"]?{corpId:h(z.options["corp-id"])}:{},...z.options.appKey?{appKey:h(z.options.appKey)}:{},...z.options["app-key"]?{appKey:h(z.options["app-key"])}:{},...z.options.appSecurity?{appSecurity:h(z.options.appSecurity)}:{},...z.options["app-security"]?{appSecurity:h(z.options["app-security"])}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await Go(Q);return}if($==="add-seal"){let Q={...k8(z.json),...z.options.name?{name:h(z.options.name)}:{},...z.options.token?{token:h(z.options.token)}:{},...z.options.sealUrl?{sealUrl:h(z.options.sealUrl)}:{},...z.options.url?{sealUrl:h(z.options.url)}:{},...z.options.force!==void 0?{force:Z0(z.options.force)}:{},...z.options.overwrite!==void 0?{overwrite:Z0(z.options.overwrite)}:{}};await bg1(Q);return}if($==="add-link"){let U=Y??h(z.options.link)??h(z.options.url);if(!U)throw Error("Usage: seal-use corps add-link <url> [--name <customName>] [--as-hose] [--overwrite]");let Q=Z0(z.options["dry-run"])===!0||Z0(z.options.dryRun)===!0;if(Z0(z.options["as-hose"])===!0||Z0(z.options.hose)===!0){if(ml(U)[0]?.kind==="seal-delegate")throw Error("Option --as-hose cannot be used with a Seal native delegate link. Seal delegate links directly authenticate to Seal.");await ng1(U,h(z.options.name),Z0(z.options.overwrite)===!0,Z0(z.options.force
Line truncated
|
||||
`);throw Error(`Missing required parameter: staffId. 当前企业共配置了 ${C.length} 位管理员账号(手机号已脱敏):
|
||||
|
||||
`+`${b}
|
||||
@@ -936,7 +936,7 @@ or add '--force' (or use 'seal-use webhook replay <recordId> --force') if you ex
|
||||
❌ 未找到指定的合思 OpenAPI 密钥 (${z.appKey??z.keyId})。`),console.error(`ℹ️ 该合思企业当前存在以下 ${$.length} 套候选密钥:`);for(let J of $){let I=J.active?"\uD83D\uDFE2 启用":"⚪ 停用";console.error(` • "${J.name||"未命名应用"}" (appKey: ${J.appKey}, keyId: ${J.id}, 状态: ${I})`)}throw new L4("指定的合思密钥不存在,请从上述候选列表中选择正确的 appKey 或 keyId。",2,`${U} --app-key ${$[0].appKey}`)}return Q}if($.length===1)return $[0];console.error(`
|
||||
ℹ️ [合思子域提权] 合思企业 [${Y}] 存在多套 (${$.length} 套) OpenAPI 应用密钥凭据:`);for(let Q=0;Q<$.length;Q++){let J=$[Q],I=J.active?"\uD83D\uDFE2 启用":"⚪ 停用",K=J.name||"未命名应用";console.error(` [${Q+1}] "${K}" (appKey: ${J.appKey}, keyId: ${J.id}, 状态: ${I})`)}throw console.error(`
|
||||
\uD83D\uDC49 为确保权限提权绑定正确的业务应用,请显式指定要使用的密钥套件:`),console.error(` 在命令后追加 --app-key <key> 或 --key-id <id> 参数。
|
||||
`),new L4(`合思企业 [${Y}] 存在多套 OpenAPI 密钥,必须指定 --app-key 或 --key-id 明确选择要绑定的密钥。`,2,`${U} --app-key ${$[0].appKey}`)}async function ng1($,Y,z,U=!1,Q=!1,J){console.error("ℹ️ [合思子域提权] 正在通过合思协助链接提取 OpenAPI 开发者密钥并提升企业权限等级...");let I=await lS($),K=xh0(I.keys,I.corpId,J??{},'seal-use corps add-link "<url>" --as-hose');if(console.error(Q?`ℹ️ [合思子域提权] 已选定合思 OpenAPI 凭据 (appKey: ${K.appKey}, 应用: "${K.name||"未命名应用"}"),正在生成预览...`:`ℹ️ [合思子域提权] 已选定合思 OpenAPI 凭据 (appKey: ${K.appKey}, 应用: "${K.name||"未命名应用"}"),正在初始化为长期合思标准配置...`),Q){x0({dryRun:!0,kind:"hose",provider:"hose",corpId:I.corpId,corpName:I.corpName,baseUrl:I.baseUrl,staffId:I.staffId,selectedKey:{id:K.id,name:K.name||"-",appKey:K.appKey,appSecurity:Ww(K.appSecurity),active:K.active}});return}await Go({domain:I.baseUrl,appKey:K.appKey,appSecurity:K.appSecurity,corpId:I.corpId,name:Y??I.corpName,staffId:I.staffId,overwrite:z,force:U})}async function uj($,Y){let z=await lS($),U=Y.reveal===!0;if(Y.save){let Q=xh0(z.keys,z.corpId,{appKey:Y.appKey,keyId:Y.keyId},'seal-use corps extract-keys "<url>" --save');console.error(`ℹ️ [合思子域提权] 正在将选定的合思 OpenAPI 密钥 (appKey: ${Q.appKey}, 应用: "${Q.name||"未命名应用"}") 保存为标准合思企业配置...`),await Go({domain:z.baseUrl,appKey:Q.appKey,appSecurity:Q.appSecurity,corpId:z.corpId,name:Y.name??z.corpName,staffId:z.staffId,overwrite:Y.overwrite,force:Y.force});return}if(!U)console.error(`ℹ️ [合思子域提权] 成功提取合思 (Hose) OpenAPI 密钥。接入密码默认脱敏,附加 --reveal (或 -r) 可查看完整 appSecurity 明文;附加 --save 可将临时会话提权并持久化为标准合思企业。
|
||||
`),new L4(`合思企业 [${Y}] 存在多套 OpenAPI 密钥,必须指定 --app-key 或 --key-id 明确选择要绑定的密钥。`,2,`${U} --app-key ${$[0].appKey}`)}async function ng1($,Y,z,U=!1,Q=!1,J){console.error("ℹ️ [合思子域提权] 正在通过合思协助链接提取 OpenAPI 开发者密钥并提升企业权限等级...");let I=await lS($),K=xh0(I.keys,I.corpId,J??{},'seal-use corps add-link "<url>" --as-hose');if(console.error(Q?`ℹ️ [合思子域提权] 已选定合思 OpenAPI 凭据 (appKey: ${K.appKey}, 应用: "${K.name||"未命名应用"}"),正在生成预览...`:`ℹ️ [合思子域提权] 已选定合思 OpenAPI 凭据 (appKey: ${K.appKey}, 应用: "${K.name||"未命名应用"}"),正在初始化为长期合思标准配置...`),Q){x0({dryRun:!0,kind:"hose",provider:"hose",corpId:I.corpId,corpName:I.corpName,baseUrl:I.baseUrl,staffId:I.staffId,selectedKey:{id:K.id,name:K.name||"-",appKey:K.appKey,appSecurity:Ww(K.appSecurity),active:K.active}});return}await Go({domain:I.baseUrl,appKey:K.appKey,appSecurity:K.appSecurity,corpId:I.corpId,name:Y??I.corpName,staffId:I.staffId,overwrite:z,force:U})}async function uj($,Y){let z=await lS($),U=Y.reveal===!0;if(Y.save){let Q=xh0(z.keys,z.corpId,{appKey:Y.appKey,keyId:Y.keyId},'seal-use corps hose-extract-keys "<url>" --save');console.error(`ℹ️ [合思子域提权] 正在将选定的合思 OpenAPI 密钥 (appKey: ${Q.appKey}, 应用: "${Q.name||"未命名应用"}") 保存为标准合思企业配置...`),await Go({domain:z.baseUrl,appKey:Q.appKey,appSecurity:Q.appSecurity,corpId:z.corpId,name:Y.name??z.corpName,staffId:z.staffId,overwrite:Y.overwrite,force:Y.force});return}if(!U)console.error(`ℹ️ [合思子域提权] 成功提取合思 (Hose) OpenAPI 密钥。接入密码默认脱敏,附加 --reveal (或 -r) 可查看完整 appSecurity 明文;附加 --save 可将临时会话提权并持久化为标准合思企业。
|
||||
`);else console.error(`⚠️ [合思子域提权] 正在以明文展示合思 (Hose) appSecurity 接入密码,请妥善保管敏感凭据。
|
||||
`);x0({provider:"hose",capability:"privilege-elevation",corpId:z.corpId,corpName:z.corpName??z.corpId,baseUrl:z.baseUrl,staffId:z.staffId,keyCount:z.keys.length,keys:z.keys.map((Q)=>({id:Q.id,name:Q.name||"-",appKey:Q.appKey,appSecurity:U?Q.appSecurity:Ww(Q.appSecurity),active:Q.active,createTime:Q.createTime,updateTime:Q.updateTime}))})}async function Ho($,Y){let z=T1($),U=Y.reveal===!0;if(z.source.type!=="hose")throw new L4(`【合思子域专享能力】当前企业「${z.name}」(id: ${z.id}) 为原生 Seal (${z.source.type}) 租户,非合思 (Hose/合思云/易快报) 渠道企业。
|
||||
`+"OpenAPI 密钥查询与提权能力专属于合思生态租户(用于从合思协助链接或合思凭据中提取开发者密钥提升权限等级),非合思渠道企业不支持此能力。",2);let Q=z.source.appKey??z.source.key,J=z.source.appSecurity??z.source.password;if(!U)console.error(`\uD83D\uDCA1 [合思子域] 接入密码默认脱敏,附加 --reveal (或 -r) 可查看完整 appSecurity 明文。
|
||||
@@ -1017,7 +1017,7 @@ metadata:
|
||||

|
||||
3. 找到任一正常业务请求,右键「复制」-「以 cURL 格式复制」:
|
||||

|
||||
3. **无感接入**:Agent 接收材料后自动执行 \`corps add-hose\`、\`corps add-link\` 或 \`corps extract-keys --save\`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 \`corpId\` 或 \`staffId\`。详阅 \`references/first-time-user.md\` 与 \`references/enterprise-onboarding.md\`。
|
||||
3. **无感接入**:Agent 接收材料后自动执行 \`corps add-hose\`、\`corps add-link\` 或 \`corps hose-extract-keys --save\`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 \`corpId\` 或 \`staffId\`。详阅 \`references/first-time-user.md\` 与 \`references/enterprise-onboarding.md\`。
|
||||
|
||||
---
|
||||
|
||||
@@ -1033,7 +1033,7 @@ metadata:
|
||||
- **发现与选择(高频管理)**:\`list\`、\`search\`/\`find\`、\`get\`/\`show\`、\`current\`、\`switch\`。
|
||||
- **企业配置(低频维护)**:\`mark\`、\`rename\`。
|
||||
- **测试配对与验证(生产变更闭环)**:\`bind-test\`、\`unbind-test\`、\`sync-test\`、\`replay-test\`;回归测试统一使用 \`seal-use test regression\`。
|
||||
- **Hose 专属能力(次级入口)**:\`probe-hose\`、\`hose-staffs\`、\`extract-keys\`、\`keys\`/\`hose-keys\`,用于域名探测、角色员工发现、临时会话提权和密钥查看。
|
||||
- **Hose 专属能力(次级入口)**:\`probe-hose\`、\`hose-staffs\`、\`hose-extract-keys\`、\`hose-keys\`,用于域名探测、角色员工发现、临时会话提权和密钥查看。
|
||||
|
||||
命令保持扁平兼容以避免破坏现有脚本;\`seal-use corps --help\` 会按上述业务组展示,不代表这些命令属于同一风险等级。涉及本地配置或测试数据写入的操作仍须遵守确认与预览规则。
|
||||
|
||||
@@ -1371,7 +1371,7 @@ Important nuance:
|
||||
|
||||
- This is a bad-case pattern, not a general rule that every amount-total dispute is caused by \`pre_analysis\`.
|
||||
- Use it when the current trace shows recognized amounts being excluded downstream or duplicate attachments producing inconsistent conclusions.
|
||||
`;var JS0=()=>{};var GS0="# Approval Run Lightweight Queries\n\nUse this reference when the user gives a 合思/易快报单号, source document SN, record ID, simulation batch ID, or asks for an approval decision without needing the full raw run payload.\n\n## Locate A Run By Document Number\n\nPrefer `pick` before broad search + bridge + get.\n\n```bash\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --latest\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --batch <batchId> --latest\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --latest --fields recordId,sourceDocumentSN,status,aiDecision,aiSummary\n```\n\nDefault output is intentionally small: `recordId`, `sourceDocumentSN`, `sourceDocumentId`, `simulationBatchId`, `status`, `taskMode`, `ruleSetVersionNumber`, `langfuseTraceId`, `manualResult`, `aiDecision`, and `aiSummary`.\n\nIf there are multiple candidates and `--latest` was not used, report the candidates and ask which one to inspect.\n\n## Read Compact Run Detail\n\nUse `--summary` for most diagnosis and support questions.\n\n```bash\nseal-use approval-runs get <recordId> --corp <corpId> --summary\n```\n\nUse `--fields` when the user needs a particular slice.\n\n```bash\nseal-use approval-runs get <recordId> --corp <corpId> --fields metadata\nseal-use approval-runs get <recordId> --corp <corpId> --fields document.fields,result.summary\nseal-use approval-runs get <recordId> --corp <corpId> --fields result.summary,result.decision,result.riskPoints\nseal-use approval-runs get <recordId> --corp <corpId> --fields document.keyFields,result,manualApprovalRecord,ruleSetVersionNumber\n```\n\nAvoid full `approval-runs get <recordId>` unless the user specifically needs raw document fields, pipeline logs, invoice rawData, or signed URLs. Prefer `--output-file` for full payloads.\n\n## Understand The Case First\n\nBefore pulling the full document, use:\n\n```bash\nseal-use approval-runs document-summary <recordId> --corp <corpId>\n```\n\nThis is for quick case reading: template/title, key fields, amount, expense type, cost company, payee, invoice summary, attachment names, AI result, and manual result.\n\n## Extract AI-Cited Rules\n\nUse this when the user asks \"AI 用了哪条规则\", \"为什么命中这条\", or needs the rule evidence for a specific run.\n\n```bash\nseal-use approval-runs cited-rules <recordId> --corp <corpId>\n```\n\nReturn and discuss `runtimeRuleId`, `ruleCode`, `versionNumber`, `scope`, `strictness`, `appliedAnalysis`, `checkResult`, and `findings` when present.\n\nIf the user then wants the full text of one cited rule, use `rules get --record-id <recordId> --runtime-id rule-205` from `rule-lightweight.md`.\n\n## Attachments Without Raw Payloads\n\nUse:\n\n```bash\n# 查看附件列表摘要(包含文件名、类型、大小及直链可用性)\nseal-use approval-runs attachments <recordId> --corp <corpId> --summary\n\n# 下载全部附件到本地目录(优先使用 ossSignedUrl 签名直链)\nseal-use approval-runs attachments download <recordId> --all --out-dir ./downloads --corp <corpId>\n\n# 按名称或 fileId 过滤下载单个附件\nseal-use approval-runs attachments download <recordId> --name 发票 --corp <corpId>\n```\n\nThis should be enough for file names, file IDs, mime types, positions, invoice/attachment grouping, and links when available. For customer disputes about OCR, receipt/invoice classification, or image content, switch to `approval-attachment-trace.md`.\n\n## Result Summary\n\nUse:\n\n```bash\nseal-use approval-runs result <recordId> --corp <corpId> --summary\n```\n\nThis is for decision, summary, risk point count, matched rule count, trace ID, and record ID.\n\n## Approval Run Web Links & Auto-Login Links\n\nUse this when the user asks for a link to an approval run or wants to open the run directly in their browser:\n\n```bash\n# 默认推荐:生成 Seal AI 审核详情直达链接(无凭证、无越权风险,用户在已有登录状态的浏览器中直接打开)\nseal-use approval-runs link <recordId> --corp <corpId>\nseal-use approval-runs link --sn <sourceDocumentSN> --corp <corpId>\n\n# 生成合思主系统原始单据页面链接\nseal-use approval-runs link <recordId> --type hose-document --corp <corpId>\n\n# 仅当用户明确要求免密/跨浏览器/无登录直达且确认知晓安全风险时:生成携带合思单次临时票据的免登直达链接\nseal-use approval-runs link <recordId> --auto-login [--expire 7200] --corp <corpId>\n```\n\n### 返回字段说明与语义规范\n- `sealResultUrl`: Seal AI 单据智能审核结果页\n- `hoseDocumentUrl`: 合思费控主系统原始报销/借款单详情页\n- `type`: 链接类型,默认为 `seal_result`,指定时可为 `hose_document`\n- `mode`: 鉴权模式,`direct`(原生直接打开)或 `auto_login`(免密换票)\n\n### 免登链接安全与声明规范\n当向用户返回 `--auto-login` 链接时
Line truncated
|
||||
`;var JS0=()=>{};var GS0="# Approval Run Lightweight Queries\n\nUse this reference when the user gives a 合思/易快报单号, source document SN, record ID, simulation batch ID, or asks for an approval decision without needing the full raw run payload.\n\n## Locate A Run By Document Number\n\nPrefer `pick` before broad search + bridge + get.\n\n```bash\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --latest\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --batch <batchId> --latest\nseal-use approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --latest --fields recordId,sourceDocumentSN,status,aiDecision,aiSummary\n```\n\nDefault output is intentionally small: `recordId`, `sourceDocumentSN`, `sourceDocumentId`, `simulationBatchId`, `status`, `taskMode`, `ruleSetVersionNumber`, `langfuseTraceId`, `manualResult`, `aiDecision`, and `aiSummary`.\n\nIf there are multiple candidates and `--latest` was not used, report the candidates and ask which one to inspect.\n\n## Read Compact Run Detail\n\nUse `--summary` for most diagnosis and support questions.\n\n```bash\nseal-use approval-runs get <recordId> --corp <corpId> --summary\n```\n\nUse `--fields` when the user needs a particular slice.\n\n```bash\nseal-use approval-runs get <recordId> --corp <corpId> --fields metadata\nseal-use approval-runs get <recordId> --corp <corpId> --fields document.fields,result.summary\nseal-use approval-runs get <recordId> --corp <corpId> --fields result.summary,result.decision,result.riskPoints\nseal-use approval-runs get <recordId> --corp <corpId> --fields document.keyFields,result,manualApprovalRecord,ruleSetVersionNumber\n```\n\nAvoid full `approval-runs get <recordId>` unless the user specifically needs raw document fields, pipeline logs, invoice rawData, or signed URLs. Prefer `--output-file` for full payloads.\n\n## Understand The Case First\n\nBefore pulling the full document, use:\n\n```bash\nseal-use approval-runs document-summary <recordId> --corp <corpId>\n```\n\nThis is for quick case reading: template/title, key fields, amount, expense type, cost company, payee, invoice summary, attachment names, AI result, and manual result.\n\n## Extract AI-Cited Rules\n\nUse this when the user asks \"AI 用了哪条规则\", \"为什么命中这条\", or needs the rule evidence for a specific run.\n\n```bash\nseal-use approval-runs cited-rules <recordId> --corp <corpId>\n```\n\nReturn and discuss `runtimeRuleId`, `ruleCode`, `versionNumber`, `scope`, `strictness`, `appliedAnalysis`, `checkResult`, and `findings` when present.\n\nIf the user then wants the full text of one cited rule, use `rules get --record-id <recordId> --runtime-id rule-205` from `rule-lightweight.md`.\n\n## Attachments Without Raw Payloads\n\nUse:\n\n```bash\n# 查看附件列表摘要(包含文件名、类型、大小及直链可用性)\nseal-use approval-runs attachments <recordId> --corp <corpId> --summary\n\n# 下载全部附件到本地目录(优先使用 ossSignedUrl 签名直链)\nseal-use approval-runs attachments download <recordId> --all --out-dir ./downloads --corp <corpId>\n\n# 按名称或 fileId 过滤下载单个附件\nseal-use approval-runs attachments download <recordId> --name 发票 --corp <corpId>\n```\n\nThis should be enough for file names, file IDs, mime types, positions, invoice/attachment grouping, and links when available. For customer disputes about OCR, receipt/invoice classification, or image content, switch to `approval-attachment-trace.md`.\n\n## Result Summary\n\nUse:\n\n```bash\nseal-use approval-runs result <recordId> --corp <corpId> --summary\n```\n\nThis is for decision, summary, risk point count, matched rule count, trace ID, and record ID.\n\n## Approval Run Web Links & Auto-Login Links\n\nUse this when the user asks for a link to an approval run or wants to open the run directly in their browser:\n\n```bash\n# 默认推荐:生成 Seal AI 审核详情直达链接(无凭证、无越权风险,用户在已有登录状态的浏览器中直接打开)\nseal-use approval-runs link <recordId> --corp <corpId>\nseal-use approval-runs link --sn <sourceDocumentSN> --corp <corpId>\n\n# 生成合思主系统原始单据页面链接\nseal-use approval-runs link <recordId> --type hose-document --corp <corpId>\n\n# 仅当用户明确要求免密/跨浏览器/无登录直达且确认知晓安全风险时:生成携带合思单次临时票据的免登直达链接\nseal-use approval-runs link <recordId> --auto-login [--expire 7200] --corp <corpId>\n```\n\n### 返回字段说明与语义规范\n- `sealResultUrl`: Seal AI 单据智能审核结果页\n- `hoseDocumentUrl`: 合思费控主系统原始报销/借款单详情页\n- `type`: 链接类型,默认为 `seal_result`,指定时可为 `hose_document`\n- `mode`: 鉴权模式,`direct`(原生直接打开)或 `auto_login`(免密换票)\n\n### 免登链接安全与声明规范\n当向用户返回 `--auto-login` 链接时
Line truncated
|
||||
|
||||
Use this low-freedom workflow when the user provides packaged customer feedback from WeChat, screenshots, rejection notifications, a document number, or expected business behavior and wants diagnosis or an approval-rule change.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ metadata:
|
||||

|
||||
3. 找到任一正常业务请求,右键「复制」-「以 cURL 格式复制」:
|
||||

|
||||
3. **无感接入**:Agent 接收材料后自动执行 `corps add-hose`、`corps add-link` 或 `corps extract-keys --save`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 `corpId` 或 `staffId`。详阅 `references/first-time-user.md` 与 `references/enterprise-onboarding.md`。
|
||||
3. **无感接入**:Agent 接收材料后自动执行 `corps add-hose`、`corps add-link` 或 `corps hose-extract-keys --save`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 `corpId` 或 `staffId`。详阅 `references/first-time-user.md` 与 `references/enterprise-onboarding.md`。
|
||||
|
||||
---
|
||||
|
||||
@@ -74,7 +74,7 @@ metadata:
|
||||
- **发现与选择(高频管理)**:`list`、`search`/`find`、`get`/`show`、`current`、`switch`。
|
||||
- **企业配置(低频维护)**:`mark`、`rename`。
|
||||
- **测试配对与验证(生产变更闭环)**:`bind-test`、`unbind-test`、`sync-test`、`replay-test`;回归测试统一使用 `seal-use test regression`。
|
||||
- **Hose 专属能力(次级入口)**:`probe-hose`、`hose-staffs`、`extract-keys`、`keys`/`hose-keys`,用于域名探测、角色员工发现、临时会话提权和密钥查看。
|
||||
- **Hose 专属能力(次级入口)**:`probe-hose`、`hose-staffs`、`hose-extract-keys`、`hose-keys`,用于域名探测、角色员工发现、临时会话提权和密钥查看。
|
||||
|
||||
命令保持扁平兼容以避免破坏现有脚本;`seal-use corps --help` 会按上述业务组展示,不代表这些命令属于同一风险等级。涉及本地配置或测试数据写入的操作仍须遵守确认与预览规则。
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@ seal-use corps add-seal --json '{"sealUrl":"https://tenant.sealai.cc","token":"s
|
||||
seal-use corps add-link <url> [--name <customName>] [--as-hose] [--app-key <key>] [--key-id <id>] [--overwrite] [--dry-run]
|
||||
seal-use corps probe-hose --json '{"appKey":"...","appSecurity":"...","domain":"https://..."}'
|
||||
seal-use corps hose-staffs --json '{"appKey":"...","appSecurity":"...","role":"admin"}'
|
||||
seal-use corps extract-keys <https://.../web/thirdparty.html?...> [--reveal] [--save] [--name <customName>] [--app-key <key>] [--key-id <id>] [--overwrite]
|
||||
seal-use corps keys [<url> | <corpId>] [--reveal] [--save] [--app-key <key>] [--key-id <id>]
|
||||
seal-use corps hose-extract-keys <https://.../web/thirdparty.html?...> [--reveal] [--save] [--name <customName>] [--app-key <key>] [--key-id <id>] [--overwrite]
|
||||
seal-use corps hose-keys [<url> | <corpId>] [--reveal] [--save] [--app-key <key>] [--key-id <id>]
|
||||
seal-use auth extract-keys <https://.../web/thirdparty.html?...> [--reveal] [--save] [--name <customName>] [--app-key <key>] [--key-id <id>] [--overwrite]
|
||||
seal-use auth keys [--corp <corpId>] [--reveal]
|
||||
seal-use auth check [--corp <corpId>]
|
||||
@@ -225,8 +225,8 @@ Use the command groups in this order for normal work: **enterprise onboarding**
|
||||
- `seal-use corps replay-test [<prodCorpId>] ... [--dry-run] [--confirm|--yes] [--force]` replays sanitized approval records to the paired test Webhook. Preview does not send; live replay requires confirmation. `--force` only overrides missing/non-test pairing guards.
|
||||
- `seal-use corps probe-hose --json '{"appKey":"...","appSecurity":"...","domain":"https://..."}'` probes Hose domains and discovers enterprise identity without saving configuration.
|
||||
- `seal-use corps hose-staffs --json '{"appKey":"...","appSecurity":"...","role":"admin"}'` discovers role-based staff candidates; cellphones are masked by default.
|
||||
- `seal-use corps extract-keys <url> [--reveal] [--save] [--name <name>] [--app-key <key>] [--key-id <id>] [--overwrite]` extracts OpenAPI keys (`appKey` and `appSecurity`) from a Hose assistance link (`thirdparty.html`). **Hose Subdomain Privilege Elevation**: elevates a short-lived session token to permanent Hose OpenAPI developer credentials. If `--save` is specified, registers the enterprise as a durable Hose tenant. If the enterprise has multiple keys, execution halts and candidates are listed unless `--app-key` or `--key-id` is passed.
|
||||
- `seal-use corps keys [<url> | <corpId>] [--reveal] [--save]` reads/displays OpenAPI keys for a Hose assistance link or configured Hose enterprise (masked by default, `--reveal` displays plaintext). Rejects non-Hose/native-Seal tenants with exit code 2.
|
||||
- `seal-use corps hose-extract-keys <url> [--reveal] [--save] [--name <name>] [--app-key <key>] [--key-id <id>] [--overwrite]` extracts OpenAPI keys (`appKey` and `appSecurity`) from a Hose assistance link (`thirdparty.html`). The old `extract-keys`/`extract-key`/`extract-hose-keys` forms remain aliases. **Hose Subdomain Privilege Elevation**: elevates a short-lived session token to permanent Hose OpenAPI developer credentials. If `--save` is specified, registers the enterprise as a durable Hose tenant. If the enterprise has multiple keys, execution halts and candidates are listed unless `--app-key` or `--key-id` is passed.
|
||||
- `seal-use corps hose-keys [<url> | <corpId>] [--reveal] [--save]` reads/displays OpenAPI keys for a Hose assistance link or configured Hose enterprise (masked by default, `--reveal` displays plaintext). The old `keys` form remains an alias. Rejects non-Hose/native-Seal tenants with exit code 2.
|
||||
- `seal-use auth extract-keys <url>` and `seal-use auth keys [--corp <corpId>]` provide auth-domain aliases for key extraction and inspection.
|
||||
|
||||
Read-only discovery:
|
||||
|
||||
@@ -1079,7 +1079,7 @@ export async function handleCorpsCommand(action: string | undefined, maybeName:
|
||||
const link = maybeName ?? stringOption(args.options.link) ?? stringOption(args.options.url);
|
||||
if (!link) {
|
||||
throw new Error(
|
||||
"Usage: seal-use corps extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
|
||||
"Usage: seal-use corps hose-extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
|
||||
);
|
||||
}
|
||||
const reveal =
|
||||
@@ -1793,7 +1793,7 @@ export async function extractKeysFromLinkAction(
|
||||
result.keys,
|
||||
result.corpId,
|
||||
{ appKey: options.appKey, keyId: options.keyId },
|
||||
`seal-use corps extract-keys "<url>" --save`
|
||||
`seal-use corps hose-extract-keys "<url>" --save`
|
||||
);
|
||||
console.error(
|
||||
`ℹ️ [合思子域提权] 正在将选定的合思 OpenAPI 密钥 (appKey: ${selectedKey.appKey}, 应用: "${selectedKey.name || "未命名应用"}") 保存为标准合思企业配置...`
|
||||
|
||||
@@ -78,6 +78,8 @@ describe("renderHelp", () => {
|
||||
expect(help).toContain("Hose 专属能力:");
|
||||
expect(help).toContain("seal-use corps probe-hose");
|
||||
expect(help).toContain("seal-use corps hose-staffs");
|
||||
expect(help).toContain("seal-use corps hose-extract-keys");
|
||||
expect(help).toContain("seal-use corps hose-keys");
|
||||
expect(help).not.toContain("seal-use webhook");
|
||||
expect(help).not.toContain("seal-use simulation");
|
||||
expect(help).not.toContain("seal-use billing");
|
||||
|
||||
+6
-6
@@ -199,12 +199,12 @@ export const HELP_REGISTRY: AreaHelp[] = [
|
||||
description: "按合思角色查询员工候选;手机号默认脱敏,供 add-hose 选择管理员。"
|
||||
},
|
||||
{
|
||||
name: "extract-keys",
|
||||
aliases: ["extract-key", "extract-hose-keys", "hose-extract-keys"],
|
||||
name: "hose-extract-keys",
|
||||
aliases: ["extract-keys", "extract-key", "extract-hose-keys"],
|
||||
group: "Hose 专属能力",
|
||||
summary: "【合思子域提权】从合思协助链接提取 OpenAPI 开发者密钥 (appKey/appSecurity)",
|
||||
usage: [
|
||||
"seal-use corps extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
|
||||
"seal-use corps hose-extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
|
||||
],
|
||||
options: [
|
||||
{ flag: "--reveal, -r", description: "显式揭示完整 appSecurity 明文(默认脱敏保护)" },
|
||||
@@ -217,12 +217,12 @@ export const HELP_REGISTRY: AreaHelp[] = [
|
||||
description: "专属于合思 (Hose/合思云/易快报) 子域的能力。利用协助链接中的内部权限读取 OpenAPI 密钥,将临时会话提权为标准开发者凭据。非合思渠道企业不支持。"
|
||||
},
|
||||
{
|
||||
name: "keys",
|
||||
aliases: ["hose-keys"],
|
||||
name: "hose-keys",
|
||||
aliases: ["keys"],
|
||||
group: "Hose 专属能力",
|
||||
summary: "【合思子域】查看企业已配置的合思 OpenAPI 密钥,或从协助链接中提取",
|
||||
usage: [
|
||||
"seal-use corps keys [<url> | <corpId>] [--reveal] [--save] [--app-key <key>]"
|
||||
"seal-use corps hose-keys [<url> | <corpId>] [--reveal] [--save] [--app-key <key>]"
|
||||
],
|
||||
options: [
|
||||
{ flag: "--reveal, -r", description: "显式揭示完整 appSecurity 明文(默认脱敏保护)" },
|
||||
|
||||
Reference in new issue
Block a user