Merge pull request #129 from yunyingk/codex/release-v0.10.25
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
🚀 Release / 🚀 Build & Publish GitHub Release (push) Has been cancelled
🚀 Release / 📦 Sync Gitea Mirror (push) Has been cancelled

Release v0.10.25: MCP boot fix, read-only/write tool split, contract and release gates
This commit is contained in:
yunyingk authored and GitHub committed 2026-09-15 23:09:00 +08:00
commit bb3929bfc8
7 files changed
+16 -14

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-use",
"version": "0.10.24",
"version": "0.10.25",
"description": "Seal Use tenant operations: approval-run diagnosis, minimal rule remediation, delegation links, Hose/合思 authorization, users, rules, billing, and search.",
"author": {
"name": "yingqing"
+2
View File
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.10.25] - 2026-09-15
### Added
- **`x-implementation-status` on Every OpenAPI Operation, Gated by a Test**: the published contract and the adapter had drifted in **both** directions, and the CI sync gate only compared `openapi/openapi.yaml` against `dist/openapi.json`, so neither direction was visible. It advertised `/v1/approval/rules/{ruleId}` PATCH/DELETE, `/v1/approval/documents*`, `/v1/corps/current/switch` and `/v1/material-packages/upload` — none of which `src/http/routes.ts` routes, so a caller following the contract got 404 — while omitting `/v1/approval-runs/stats`, `/v1/preferences` and `/v1/preferences/decision`, which it does serve. All 46 operations now carry `implemented` (19) or `planned` (27); the three missing implemented endpoints are documented; and `src/http/openapi-implementation.test.ts` fails when an `implemented` operation has no matching route, when an exact `/v1` route is undocumented, or when either status goes unused.
- **Release Guard: the Tag Must Be on `main`**: `release.yml` published on any pushed `v*` tag with `contents: write`, so a tag on an unreviewed branch shipped binaries, and the `workflow_dispatch` tag input could name a tag that was never merged. A guard step now requires the tagged commit to be an ancestor of `origin/main` and fails loudly otherwise (verified against a real release tag, a nonexistent tag, and a branch name). The Gitea mirror job changed from `always()` to "the publish job succeeded", so it no longer chases assets after a refused publish.
+6 -6
View File
@@ -75,7 +75,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|| ${C} === "boolean" || ${B} === null`).assign(b,Q._`[${B}]`)}}}function q({gen:N,parentData:D,parentDataProperty:T},A){N.if(Q._`${D} !== undefined`,()=>N.assign(Q._`${D}[${T}]`,A))}function V(N,D,T,A=I.Correct){let B=A===I.Correct?Q.operators.EQ:Q.operators.NEQ,j;switch(N){case"null":return Q._`${D} ${B} null`;case"array":j=Q._`Array.isArray(${D})`;break;case"object":j=Q._`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":j=C(Q._`!(${D} % 1) && !isNaN(${D})`);break;case"number":j=C();break;default:return Q._`typeof ${D} ${B} ${N}`}return A===I.Correct?j:(0,Q.not)(j);function C(b=Q.nil){return(0,Q.and)(Q._`typeof ${D} == "number"`,b,T?Q._`isFinite(${D})`:Q.nil)}}$.checkDataType=V;function F(N,D,T,A){if(N.length===1)return V(N[0],D,T,A);let B,j=(0,J.toHash)(N);if(j.array&&j.object){let C=Q._`typeof ${D} != "object"`;B=j.null?C:Q._`!${D} || ${C}`,delete j.null,delete j.array,delete j.object}else B=Q.nil;if(j.number)delete j.integer;for(let C in j)B=(0,Q.and)(B,V(C,D,T,A));return B}$.checkDataTypes=F;let M={message:({schema:N})=>`must be ${N}`,params:({schema:N,schemaValue:D})=>typeof N=="string"?Q._`{type: ${N}}`:Q._`{type: ${D}}`};function w(N){let D=O(N);(0,U.reportError)(D,M)}$.reportTypeError=w;function O(N){let{gen:D,data:T,schema:A}=N,B=(0,J.schemaRefOrVal)(N,A,"type");return{gen:D,keyword:"type",data:T,schema:A.type,schemaCode:B,schemaValue:B,parentSchema:A,params:{},it:N}}}),af0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.assignDefaults=void 0;let Y=L1(),z=v1();function U(J,I){let{properties:K,items:G}=J.schema;if(I==="object"&&K)for(let W in K)Q(J,W,K[W].default);else if(I==="array"&&Array.isArray(G))G.forEach((W,H)=>Q(J,H,W.default))}$.assignDefaults=U;function Q(J,I,K){let{gen:G,compositeRule:W,data:H,opts:X}=J;if(K===void 0)return;let Z=Y._`${H}${(0,Y.getProperty)(I)}`;if(W){(0,z.checkStrictMode)(J,`default is ignored for: ${Z}`);return}let q=Y._`${Z} === undefined`;if(X.useDefaults==="empty")q=Y._`${q} || ${Z} === null || ${Z} === ""`;G.if(q,Y._`${Z} = ${(0,Y.stringify)(K)}`)}}),Q5=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0}),$.validateUnion=$.validateArray=$.usePattern=$.callValidateCode=$.schemaProperties=$.allSchemaProperties=$.noPropertyInData=$.propertyInData=$.isOwnProperty=$.hasPropFunc=$.reportMissingProp=$.checkMissingProp=$.checkReportMissingProp=void 0;let Y=L1(),z=v1(),U=U5(),Q=v1();function J(N,D){let{gen:T,data:A,it:B}=N;T.if(X(T,A,D,B.opts.ownProperties),()=>{N.setParams({missingProperty:Y._`${D}`},!0),N.error()})}$.checkReportMissingProp=J;function I({gen:N,data:D,it:{opts:T}},A,B){return(0,Y.or)(...A.map((j)=>(0,Y.and)(X(N,D,j,T.ownProperties),Y._`${B} = ${j}`)))}$.checkMissingProp=I;function K(N,D){N.setParams({missingProperty:D},!0),N.error()}$.reportMissingProp=K;function G(N){return N.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Y._`Object.prototype.hasOwnProperty`})}$.hasPropFunc=G;function W(N,D,T){return Y._`${G(N)}.call(${D}, ${T})`}$.isOwnProperty=W;function H(N,D,T,A){let B=Y._`${D}${(0,Y.getProperty)(T)} !== undefined`;return A?Y._`${B} && ${W(N,D,T)}`:B}$.propertyInData=H;function X(N,D,T,A){let B=Y._`${D}${(0,Y.getProperty)(T)} === undefined`;return A?(0,Y.or)(B,(0,Y.not)(W(N,D,T))):B}$.noPropertyInData=X;function Z(N){return N?Object.keys(N).filter((D)=>D!=="__proto__"):[]}$.allSchemaProperties=Z;function q(N,D){return Z(D).filter((T)=>!(0,z.alwaysValidSchema)(N,D[T]))}$.schemaProperties=q;function V({schemaCode:N,data:D,it:{gen:T,topSchemaRef:A,schemaPath:B,errorPath:j},it:C},b,k,h){let i=h?Y._`${N}, ${D}, ${A}${B}`:D,c=[[U.default.instancePath,(0,Y.strConcat)(U.default.instancePath,j)],[U.default.parentData,C.parentData],[U.default.parentDataProperty,C.parentDataProperty],[U.default.rootData,U.default.rootData]];if(C.opts.dynamicRef)c.push([U.default.dynamicAnchors,U.default.dynamicAnchors]);let U0=Y._`${i}, ${T.object(...c)}`;return k!==Y.nil?Y._`${b}.call(${k}, ${U0})`:Y._`${b}(${U0})`}$.callValidateCode=V;let F=Y._`new RegExp`;function M({gen:N,it:{opts:D}},T){let A=D.unicodeRegExp?"u":"",{regExp:B}=D.code,j=B(T,A);return N.scopeValue("pattern",{key:j.toString(),ref:j,code:Y._`${B.code==="new RegExp"?F:(0,Q.useFunc)(N,B)}(${T}, ${A})`})}$.usePattern=M;function w(N){let{gen:D,data:T,keyword:A,it:B}=N,j=D.name("valid");if(B.allErrors){let b=D.let("valid",!0);return C(()=>D.assign(b,!1)),b}return D.var(j,!0),C(()=>D.break()),j;function C(b){let k=D.const("len",Y._`${T}.length`);D.forRange("i",0,k,(h)=>{N.subschema({keyword:A,dataProp:h,dataPropType:z.Type.Num},j),D.if((0,Y.not)(j),b)})}}$.validateArray=w;function O(N){let{gen:D,schema:T,keyword:A,it:B}=N;if(!Array.isArray(T))throw Error("ajv implementation error");if(T.some((b)=>(0,z.alwaysValidSchema)(B,b))&&!B.opts.unevaluated)return;let j=D.let("valid",!1),C=D.name("_valid");D.block(()=>T.forEach((b,k)=>{let h=N.subschema({keyword:A,schemaProp:k,compositeRule:!0},C);if(D.assign(j,Y._`${j} || ${C}`),!N.mergeValidEvaluated(h,C) Line truncated
missingProperty: ${X},
depsCount: ${W},
deps: ${H}}`};let Q={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(G){let[W,H]=J(G);I(G,W),K(G,H)}};function J({schema:G}){let W={},H={};for(let X in G){if(X==="__proto__")continue;let Z=Array.isArray(G[X])?W:H;Z[X]=G[X]}return[W,H]}function I(G,W=G.schema){let{gen:H,data:X,it:Z}=G;if(Object.keys(W).length===0)return;let q=H.let("missing");for(let V in W){let F=W[V];if(F.length===0)continue;let M=(0,U.propertyInData)(H,X,V,Z.opts.ownProperties);if(G.setParams({property:V,depsCount:F.length,deps:F.join(", ")}),Z.allErrors)H.if(M,()=>{for(let w of F)(0,U.checkReportMissingProp)(G,w)});else H.if(Y._`${M} && (${(0,U.checkMissingProp)(G,F,q)})`),(0,U.reportMissingProp)(G,q),H.else()}}$.validatePropertyDeps=I;function K(G,W=G.schema){let{gen:H,data:X,keyword:Z,it:q}=G,V=H.name("valid");for(let F in W){if((0,z.alwaysValidSchema)(q,W[F]))continue;H.if((0,U.propertyInData)(H,X,F,q.opts.ownProperties),()=>{let M=G.subschema({keyword:Z,schemaProp:F},V);G.mergeValidEvaluated(M,V)},()=>H.var(V,!0)),G.ok(V)}}$.validateSchemaDeps=K,$.default=Q}),Nu0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=L1(),z=v1(),U={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q;if((0,z.alwaysValidSchema)(G,I))return;let W=J.name("valid");J.forIn("key",K,(H)=>{Q.setParams({propertyName:H}),Q.subschema({keyword:"propertyNames",data:H,dataTypes:["string"],propertyName:H,compositeRule:!0},W),J.if((0,Y.not)(W),()=>{if(Q.error(!0),!G.allErrors)J.break()})}),Q.ok(W)}};$.default=U}),ft=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Q5(),z=L1(),U=U5(),Q=v1(),J={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:I})=>z._`{additionalProperty: ${I.additionalProperty}}`},code(I){let{gen:K,schema:G,parentSchema:W,data:H,errsCount:X,it:Z}=I;if(!X)throw Error("ajv implementation error");let{allErrors:q,opts:V}=Z;if(Z.props=!0,V.removeAdditional!=="all"&&(0,Q.alwaysValidSchema)(Z,G))return;let F=(0,Y.allSchemaProperties)(W.properties),M=(0,Y.allSchemaProperties)(W.patternProperties);w(),I.ok(z._`${X} === ${U.default.errors}`);function w(){K.forIn("key",H,(A)=>{if(!F.length&&!M.length)D(A);else K.if(O(A),()=>D(A))})}function O(A){let B;if(F.length>8){let j=(0,Q.schemaRefOrVal)(Z,W.properties,"properties");B=(0,Y.isOwnProperty)(K,j,A)}else if(F.length)B=(0,z.or)(...F.map((j)=>z._`${A} === ${j}`));else B=z.nil;if(M.length)B=(0,z.or)(B,...M.map((j)=>z._`${(0,Y.usePattern)(I,j)}.test(${A})`));return(0,z.not)(B)}function N(A){K.code(z._`delete ${H}[${A}]`)}function D(A){if(V.removeAdditional==="all"||V.removeAdditional&&G===!1){N(A);return}if(G===!1){if(I.setParams({additionalProperty:A}),I.error(),!q)K.break();return}if(typeof G=="object"&&!(0,Q.alwaysValidSchema)(Z,G)){let B=K.name("valid");if(V.removeAdditional==="failing")T(A,B,!1),K.if((0,z.not)(B),()=>{I.reset(),N(A)});else if(T(A,B),!q)K.if((0,z.not)(B),()=>K.break())}}function T(A,B,j){let C={keyword:"additionalProperties",dataProp:A,dataPropType:Q.Type.Str};if(j===!1)Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1});I.subschema(C,B)}}};$.default=J}),Du0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=hQ(),z=Q5(),U=v1(),Q=ft(),J={keyword:"properties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,parentSchema:W,data:H,it:X}=I;if(X.opts.removeAdditional==="all"&&W.additionalProperties===void 0)Q.default.code(new Y.KeywordCxt(X,Q.default,"additionalProperties"));let Z=(0,z.allSchemaProperties)(G);for(let w of Z)X.definedProperties.add(w);if(X.opts.unevaluated&&Z.length&&X.props!==!0)X.props=U.mergeEvaluated.props(K,(0,U.toHash)(Z),X.props);let q=Z.filter((w)=>!(0,U.alwaysValidSchema)(X,G[w]));if(q.length===0)return;let V=K.name("valid");for(let w of q){if(F(w))M(w);else{if(K.if((0,z.propertyInData)(K,H,w,X.opts.ownProperties)),M(w),!X.allErrors)K.else().var(V,!0);K.endIf()}I.it.definedProperties.add(w),I.ok(V)}function F(w){return X.opts.useDefaults&&!X.compositeRule&&G[w].default!==void 0}function M(w){I.subschema({keyword:"properties",schemaProp:w,dataProp:w},V)}}};$.default=J}),Bu0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Q5(),z=L1(),U=v1(),Q=v1(),J={keyword:"patternProperties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,data:W,parentSchema:H,it:X}=I,{opts:Z}=X,q=(0,Y.allSchemaProperties)(G),V=q.filter((T)=>(0,U.alwaysValidSchema)(X,G[T]));if(q.length===0||V.length===q.length&&(!X.opts.unevaluated||X.props===!0))return;let F=Z.strictSchema&&!Z.allowMatchingProperties&&H.properties,M=K.name("valid");if(X.props!==!0&&!(X.props instanceof z.Name))X.props=(0,Q.evaluatedPropsToName)(K,X.props);let{props:w}=X;O();function O(){for(let T of q){if(F)N(T);if(X.allErrors) Line truncated
deps: ${H}}`};let Q={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(G){let[W,H]=J(G);I(G,W),K(G,H)}};function J({schema:G}){let W={},H={};for(let X in G){if(X==="__proto__")continue;let Z=Array.isArray(G[X])?W:H;Z[X]=G[X]}return[W,H]}function I(G,W=G.schema){let{gen:H,data:X,it:Z}=G;if(Object.keys(W).length===0)return;let q=H.let("missing");for(let V in W){let F=W[V];if(F.length===0)continue;let M=(0,U.propertyInData)(H,X,V,Z.opts.ownProperties);if(G.setParams({property:V,depsCount:F.length,deps:F.join(", ")}),Z.allErrors)H.if(M,()=>{for(let w of F)(0,U.checkReportMissingProp)(G,w)});else H.if(Y._`${M} && (${(0,U.checkMissingProp)(G,F,q)})`),(0,U.reportMissingProp)(G,q),H.else()}}$.validatePropertyDeps=I;function K(G,W=G.schema){let{gen:H,data:X,keyword:Z,it:q}=G,V=H.name("valid");for(let F in W){if((0,z.alwaysValidSchema)(q,W[F]))continue;H.if((0,U.propertyInData)(H,X,F,q.opts.ownProperties),()=>{let M=G.subschema({keyword:Z,schemaProp:F},V);G.mergeValidEvaluated(M,V)},()=>H.var(V,!0)),G.ok(V)}}$.validateSchemaDeps=K,$.default=Q}),Nu0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=L1(),z=v1(),U={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},code(Q){let{gen:J,schema:I,data:K,it:G}=Q;if((0,z.alwaysValidSchema)(G,I))return;let W=J.name("valid");J.forIn("key",K,(H)=>{Q.setParams({propertyName:H}),Q.subschema({keyword:"propertyNames",data:H,dataTypes:["string"],propertyName:H,compositeRule:!0},W),J.if((0,Y.not)(W),()=>{if(Q.error(!0),!G.allErrors)J.break()})}),Q.ok(W)}};$.default=U}),ft=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Q5(),z=L1(),U=U5(),Q=v1(),J={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:I})=>z._`{additionalProperty: ${I.additionalProperty}}`},code(I){let{gen:K,schema:G,parentSchema:W,data:H,errsCount:X,it:Z}=I;if(!X)throw Error("ajv implementation error");let{allErrors:q,opts:V}=Z;if(Z.props=!0,V.removeAdditional!=="all"&&(0,Q.alwaysValidSchema)(Z,G))return;let F=(0,Y.allSchemaProperties)(W.properties),M=(0,Y.allSchemaProperties)(W.patternProperties);w(),I.ok(z._`${X} === ${U.default.errors}`);function w(){K.forIn("key",H,(A)=>{if(!F.length&&!M.length)D(A);else K.if(O(A),()=>D(A))})}function O(A){let B;if(F.length>8){let j=(0,Q.schemaRefOrVal)(Z,W.properties,"properties");B=(0,Y.isOwnProperty)(K,j,A)}else if(F.length)B=(0,z.or)(...F.map((j)=>z._`${A} === ${j}`));else B=z.nil;if(M.length)B=(0,z.or)(B,...M.map((j)=>z._`${(0,Y.usePattern)(I,j)}.test(${A})`));return(0,z.not)(B)}function N(A){K.code(z._`delete ${H}[${A}]`)}function D(A){if(V.removeAdditional==="all"||V.removeAdditional&&G===!1){N(A);return}if(G===!1){if(I.setParams({additionalProperty:A}),I.error(),!q)K.break();return}if(typeof G=="object"&&!(0,Q.alwaysValidSchema)(Z,G)){let B=K.name("valid");if(V.removeAdditional==="failing")T(A,B,!1),K.if((0,z.not)(B),()=>{I.reset(),N(A)});else if(T(A,B),!q)K.if((0,z.not)(B),()=>K.break())}}function T(A,B,j){let C={keyword:"additionalProperties",dataProp:A,dataPropType:Q.Type.Str};if(j===!1)Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1});I.subschema(C,B)}}};$.default=J}),Du0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=hQ(),z=Q5(),U=v1(),Q=ft(),J={keyword:"properties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,parentSchema:W,data:H,it:X}=I;if(X.opts.removeAdditional==="all"&&W.additionalProperties===void 0)Q.default.code(new Y.KeywordCxt(X,Q.default,"additionalProperties"));let Z=(0,z.allSchemaProperties)(G);for(let w of Z)X.definedProperties.add(w);if(X.opts.unevaluated&&Z.length&&X.props!==!0)X.props=U.mergeEvaluated.props(K,(0,U.toHash)(Z),X.props);let q=Z.filter((w)=>!(0,U.alwaysValidSchema)(X,G[w]));if(q.length===0)return;let V=K.name("valid");for(let w of q){if(F(w))M(w);else{if(K.if((0,z.propertyInData)(K,H,w,X.opts.ownProperties)),M(w),!X.allErrors)K.else().var(V,!0);K.endIf()}I.it.definedProperties.add(w),I.ok(V)}function F(w){return X.opts.useDefaults&&!X.compositeRule&&G[w].default!==void 0}function M(w){I.subschema({keyword:"properties",schemaProp:w,dataProp:w},V)}}};$.default=J}),Bu0=R0(($)=>{Object.defineProperty($,"__esModule",{value:!0});let Y=Q5(),z=L1(),U=v1(),Q=v1(),J={keyword:"patternProperties",type:"object",schemaType:"object",code(I){let{gen:K,schema:G,data:W,parentSchema:H,it:X}=I,{opts:Z}=X,q=(0,Y.allSchemaProperties)(G),V=q.filter((T)=>(0,U.alwaysValidSchema)(X,G[T]));if(q.length===0||V.length===q.length&&(!X.opts.unevaluated||X.props===!0))return;let F=Z.strictSchema&&!Z.allowMatchingProperties&&H.properties,M=K.name("valid");if(X.props!==!0&&!(X.props instanceof z.Name))X.props=(0,Q.evaluatedPropsToName)(K,X.props);let{props:w}=X;O();function O(){for(let T of q){if(F)N(T);if(X.allErrors) Line truncated
\x00`,k+=O4(j,2),k+=K.magic,k+=O4(M,2),k+=O4(w,2),k+=O4(B.crc32,4),k+=O4(B.compressedSize,4),k+=O4(B.uncompressedSize,4),k+=O4(W.length,2),k+=O4(O.length,2);var h=ZO.LOCAL_FILE_HEADER+k+W+O,i=ZO.CENTRAL_FILE_HEADER+O4(b,2)+k+O4(Z.length,2)+"\x00\x00\x00\x00"+O4(C,4)+O4(U,4)+W+O+Z;return{fileRecord:h,dirRecord:i}},To0=function($,Y,z,U,Q){var J="",I=VJ.transformTo("string",Q(U));return J=ZO.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+O4($,2)+O4($,2)+O4(Y,4)+O4(z,4)+O4(I.length,2)+I,J},jo0=function($){var Y="";return Y=ZO.DATA_DESCRIPTOR+O4($.crc32,4)+O4($.compressedSize,4)+O4($.uncompressedSize,4),Y};function X5($,Y,z,U){LJ.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=Y,this.zipPlatform=z,this.encodeFileName=U,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}VJ.inherits(X5,LJ);X5.prototype.push=function($){var Y=$.meta.percent||0,z=this.entriesCount,U=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,LJ.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:z?(Y+100*(z-U-1))/z:100}})};X5.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var Y=this.streamFiles&&!$.file.dir;if(Y){var z=L50($,Y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:z.fileRecord,meta:{percent:0}})}else this.accumulate=!0};X5.prototype.closedSource=function($){this.accumulate=!1;var Y=this.streamFiles&&!$.file.dir,z=L50($,Y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(z.dirRecord),Y)this.push({data:jo0($),meta:{percent:100}});else{this.push({data:z.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};X5.prototype.flush=function(){var $=this.bytesWritten;for(var Y=0;Y<this.dirRecords.length;Y++)this.push({data:this.dirRecords[Y],meta:{percent:100}});var z=this.bytesWritten-$,U=To0(this.dirRecords.length,z,$,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})};X5.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};X5.prototype.registerPrevious=function($){this._sources.push($);var Y=this;return $.on("data",function(z){Y.processChunk(z)}),$.on("end",function(){if(Y.closedSource(Y.previous.streamInfo),Y._sources.length)Y.prepareNextSource();else Y.end()}),$.on("error",function(z){Y.error(z)}),this};X5.prototype.resume=function(){if(!LJ.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};X5.prototype.error=function($){var Y=this._sources;if(!LJ.prototype.error.call(this,$))return!1;for(var z=0;z<Y.length;z++)try{Y[z].error($)}catch(U){}return!0};X5.prototype.lock=function(){LJ.prototype.lock.call(this);var $=this._sources;for(var Y=0;Y<$.length;Y++)$[Y].lock()};F50.exports=X5});var M50=E((_o0)=>{var Eo0=Sy(),Co0=w50(),Ro0=function($,Y){var z=$||Y,U=Eo0[z];if(!U)throw Error(z+" is not a valid compression method !");return U};_o0.generateWorker=function($,Y,z){var U=new Co0(Y.streamFiles,z,Y.platform,Y.encodeFileName),Q=0;try{$.forEach(function(J,I){Q++;var K=Ro0(I.options.compression,Y.compression),G=I.options.compressionOptions||Y.compressionOptions||{},W=I.dir,H=I.date;I._compressWorker(K,G).withStreamInfo("file",{name:J,dir:W,date:H,comment:I.comment||"",unixPermissions:I.unixPermissions,dosPermissions:I.dosPermissions}).pipe(U)}),U.entriesCount=Q}catch(J){U.error(J)}return U}});var N50=E((gn1,O50)=>{var ho0=c4(),qO=I$();function qH($,Y){qO.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(Y)}ho0.inherits(qH,qO);qH.prototype._bindStream=function($){var Y=this;this._stream=$,$.pause(),$.on("data",function(z){Y.push({data:z,meta:{percent:0}})}).on("error",function(z){if(Y.isPaused)this.generatedError=z;else Y.error(z)}).on("end",function(){if(Y.isPaused)Y._upstreamEnded=!0;else Y.end()})};qH.prototype.pause=function(){if(!qO.prototype.pause.call(this))return!1;return this._stream.pause(),!0};qH.prototype.resume=function(){if(!qO.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};O50.exports=qH});var _50=E((yn1,R50)=>{var So0=QJ(),VH=c4(),A50=I$(),go0=ug(),T50=bg(),D50=oM(),yo0=B80(),ko0=M50(),B50=mW(),xo0=N50(),j50=function($,Y,z){var U=VH.getTypeOf(Y),Q,J=VH.extend(z||{},T50);if(J.date=J.date||new Date,J.compression!==null)J.compression=J.compression.toUpperCase();if(typeof J.unixPermissions==="string")J.unixPermissions=parseInt(J.unixPermissions,8);if(J.unixPermissions&&J.unixPermissions&16384)J.dir=!0;if(J.dosPermissions&&J.dosPermission Line truncated
`)}openNode($,Y){let z=this.tos,U=this._xml;if(z&&this.open)U.push(">");this._stack.push($),U.push("<"),U.push($),Fk(U,Y),this.leaf=!0,this.open=!0}addAttribute($,Y){if(!this.open)throw Error("Cannot write attributes to node if it is not open");if(Y!==void 0)N70(this._xml,$,Y)}addAttributes($){if(!this.open)throw Error("Cannot write attributes to node if it is not open");Fk(this._xml,$)}writeText($){let Y=this._xml;if(this.open)Y.push(">"),this.open=!1;this.leaf=!1,Y.push(O70.xmlEncode($.toString()))}writeXml($){if(this.open)this._xml.push(">"),this.open=!1;this.leaf=!1,this._xml.push($)}closeNode(){let $=this._stack.pop(),Y=this._xml;if(this.leaf)Y.push("/>");else Y.push("</"),Y.push($),Y.push(">");this.open=!1,this.leaf=!1}leafNode($,Y,z){if(this.openNode($,Y),z!==void 0)this.writeText(z);this.closeNode()}closeAll(){while(this._stack.length)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let $=this._rollbacks.pop();if(this._xml.length>$.xml)this._xml.splice($.xml,this._xml.length-$.xml);if(this._stack.length>$.stack)this._stack.splice($.stack,this._stack.length-$.stack);this.leaf=$.leaf,this.open=$.open}get xml(){return this.closeAll(),this._xml.join("")}}wk.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"};D70.exports=wk});var Mk=E((Ca0)=>{var B70=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Ea0($){if(typeof $==="string")return $;if(B70)return B70.decode($);return $.toString()}Ca0.bufferToString=Ea0});var E70=E((A70)=>{Object.defineProperty(A70,"__esModule",{value:!0});A70.CHAR=`
\r -퟿-�\uD800\uDC00-\uDBFF\uDFFF`;A70.S=` \r
@@ -948,13 +948,13 @@ Please specify 'staffId', 'staffName', or 'staffPhone' to explicitly select an a
`)}if(Z.length===1)console.error(`\uD83D\uDCA1 提示:若希望单配置自动同步,可附加 --auto 参数:seal-use deploy hosecloud sync --auto --corp ${Q.id}
`);throw new w4("缺少必需参数 <sign-key>。请从上述候选列表中选择并指定 signKey 执行同步。",2,Z.length===1?`seal-use deploy hosecloud sync ${Z[0].signKey} --corp ${Q.id}`:void 0)}await k0("seal_deploy_hosecloud_sync",U,Q,{signKey:W},C0(J.options));return}throw Error(`Unknown deploy hosecloud action: ${K??""}. Available: requirements, list, get, status, configure, sync.`)}var Jh0=o(()=>{o4();D4();J4();X6();L$()});var Kh0=`---
name: seal-use
description: "v0.10.24: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
description: "v0.10.25: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
metadata:
version: 0.10.24
short-description: Seal tenant and Hose approval automation (v0.10.24)
version: 0.10.25
short-description: Seal tenant and Hose approval automation (v0.10.25)
---
# Seal Use (v0.10.24)
# Seal Use (v0.10.25)
**The CLI is the primary path; the MCP server is an optional extra that is off by default.** Prefer the global \`seal-use\` CLI, and only use MCP when it is actually available in the current session. If no \`seal_cli*\` tool is present, that is the normal default — do not try to enable it or treat it as a fault; just use the CLI. Enabling it is the user's choice in the plugin settings (插件配置中的「启用 MCP 服务」,默认关闭,打开后需重连该插件的 MCP 服务).
@@ -2127,7 +2127,7 @@ ${ml.map(($)=>`### \`seal-use ${$.domain}\`
`}var pl,dl,ml;var ll=o(()=>{pl=[{name:"配置与状态根目录",category:"config",standardPath:"~/.config/seal-use",purpose:"用户本地持久化配置根目录,存放企业连接元数据、会话缓存与全局状态。",accessMode:"read-write",retention:"persistent"},{name:"企业配置文件目录",category:"config",standardPath:"~/.config/seal-use/enterprises",purpose:"存放各已添加企业的配置 JSON 文件(如 xiezihao.json),存储企业域名、脱敏 Token、员工绑定关系等。",accessMode:"read-write",retention:"persistent"},{name:"全局配置文件",category:"config",standardPath:"~/.config/seal-use/config.json",purpose:"维护全局工作模式(stateful/stateless)、默认激活企业 defaultCorpId 以及 Lint 偏好。",accessMode:"read-write",retention:"persistent"},{name:"会话凭据安全缓存",category:"config",standardPath:"~/.config/seal-use/seal_tokens.json",purpose:"缓存已认证租户的 Bearer Token 与过期时间戳,避免高频调用上游 OAuth 换票接口。",accessMode:"read-write",retention:"cache"},{name:"规则版本映射快照",category:"config",standardPath:"~/.config/seal-use/mappings",purpose:"存储 corps sync-test 生成的生产与测试规则版本/编号对照映射快照,供 rules map 离线毫秒级速查。",accessMode:"read-write",retention:"persistent"},{name:"后台守护服务日志",category:"config",standardPath:"~/.config/seal-use/service.log",purpose:"常驻后台 HTTP 服务守护进程运行输出日志。",accessMode:"read-write",retention:"persistent"},{name:"全局命令行程序",category:"binary",standardPath:"/opt/homebrew/bin/seal-use",purpose:"macOS / Linux 全局独立单文件二进制程序;附带软链接 seal-home -> seal-use 兼容旧指令。",accessMode:"executable",retention:"persistent"},{name:"AI Agent 技能主目录",category:"skill",standardPath:"~/.agents/skills/seal-use",purpose:"面向 Antigravity、Codex 等 AI 智能体的标准技能目录,包含 SKILL.md、参考文档与操作规程。",accessMode:"read-write",retention:"persistent"},{name:"报表默认导出目录",category:"export",standardPath:"~/Downloads",purpose:"执行 approval-runs export 等大盘报表命令且未指定 --out 时,默认写入的 Excel 文件路径。",accessMode:"read-write",retention:"persistent"},{name:"系统隔离临时目录",category:"temp",standardPath:"/tmp 或 /var/folders/.../T",purpose:"自动化测试(bun test)生成的隔离工作副本,执行完毕后通过 afterEach 钩子彻底删除,零残留。",accessMode:"transient",retention:"ephemeral"}],dl=[{topic:"敏感凭据脱敏保护",guarantee:"appSecurity、password 等高危密钥永不回显在 stdout,Session Token 采用掩码处理(如 5oUL...Y%3D)。",enforcement:"CLI 所有展示接口(corps get、corps list、probe 等)均经 formatSafeSourceDetail 脱敏过滤。"},{topic:"正式环境与测试环境严格隔离",guarantee:"正式企业与测试企业必须严格 1 对 1 下挂,禁止多层级级联绑定;环境标记需显式 --confirm 确认。",enforcement:"corps bind-test 与 mark 强制要求 --confirm,缺少时阻断并返回退出码 10(confirmationRequired)。"},{topic:"跨环境规则同步安全基线",guarantee:"corps sync-test 仅将正式企业偏好与规则覆盖同步至测试企业并自动发布,正式企业规则严格维持草稿态永不发布。",enforcement:"规则同步流水线由 sync-test 独占受控,正式环境端仅执行拉取草稿读取操作,零发版变更。"},{topic:"只读诊断无副作用原则",guarantee:"doctor、search、get、list、context、probe 等命令为严格只读操作,不修改用户本地文件系统,零写入污染。",enforcement:"核心领域函数严格分离 Mutation 操作与 Query 操作,Query 路径杜绝写文件与环境篡改。"}],ml=[{domain:"corps (企业管理)",summary:"多租户接入、智能软搜索、富属性查看、环境标记、测试绑定与配置规则同步",primaryCommands:["corps list","corps search <query>","corps get <corpId>","corps mark","corps bind-test","corps sync-test"]},{domain:"approval-runs (审核大盘)",summary:"AI 审核单据检索、统计分析、引证规则查看、附件全链路追踪、Excel 报表导出、免登 SSO 深度链接",primaryCommands:["approval-runs list","approval-runs stats","approval-runs get","approval-runs export","approval-runs url"]},{domain:"rules (规则治理)",summary:"审核规则拉取、本地 Lint 质量检查、增量差量推送、离线版本与编号对照映射速查",primaryCommands:["rules pull","rules lint","rules push","rules map","rules count"]},{domain:"preference (决策偏好)",summary:"AI 审核偏好读取与更新、全局与分品类思考深度策略(medium/high)配置",primaryCommands:["preference get","preference decision update","preference thinking-depth set"]},{domain:"simulation (模拟演练)",summary:"合思单据指定、材 Line truncated
`)}var uh0=o(()=>{Gp();t9();S7();Dq();gP();ll()});var bh0={};x8(bh0,{formatTenantDoctorDashboard:()=>yS1,diagnoseTenantContract:()=>gS1});async function gS1($,Y){let z=[],U=Y.environment==="test"?"test":"production",Q=U==="test"?Y.prodCorpId:Y.testCorpId,J=U==="test"?"prodParent":"testTarget",I=null,K=null;try{let M=await H8($);if(I=M.user,K=M.tenant,Boolean(I?.isAdmin||I?.permissions?.includes("*")))z.push({id:"auth_identity",name:"身份与权限契约",status:"pass",summary:`已认证为管理员「${I.name??"未知"}」(${I.id??""}),具备完整操作权限`,details:{userId:I.id,userName:I.name,isAdmin:!0,tenantSlug:K?.tenantSlug,permissions:I.permissions}});else z.push({id:"auth_identity",name:"身份与权限契约",status:"warn",summary:`已认证为普通用户「${I.name??"未知"}」,非超级管理员,部分配置操作可能受限`,details:{userId:I.id,userName:I.name,isAdmin:!1,permissions:I.permissions},recommendation:"建议使用具有管理权限的企业主账号执行规则修改与集成发布"})}catch(M){z.push({id:"auth_identity",name:"身份与权限契约",status:"fail",summary:`鉴权握手失败:${M instanceof Error?M.message:String(M)}`,details:{error:String(M)},recommendation:`请执行 seal-use auth login --corp ${Y.id} 重新登录或更新 Token`})}let G={featureCode:"ai-approval",balance:0,deductionAmount:120,estimatedRuns:0,status:"exhausted"},W={used:0,remaining:0};try{let M=await bY($),w=Array.isArray(M.features)?M.features:[],O=w.find((D)=>D?.code==="ai-approval");if(O){let D=typeof O.balance==="number"?O.balance:0,T=typeof O.deductionAmount==="number"&&O.deductionAmount>0?O.deductionAmount:120,A=Math.floor(D/T);if(G.balance=D,G.deductionAmount=T,G.estimatedRuns=A,D<=0)G.status="exhausted",z.push({id:"billing_quota",name:"AI 审批额度余量",status:"fail",summary:"当前额度已耗尽 (余量 0 点),无法执行审批模拟或回归测试",details:{balance:D,deductionAmount:T,estimatedRuns:A},recommendation:"请联系管理员为企业充值 AI 审批额度"});else if(A<10)G.status="low",z.push({id:"billing_quota",name:"AI 审批额度余量",status:"warn",summary:`额度偏低:剩余 ${D} 点 (单笔扣除 ${T} 点),仅可支持约 ${A} 笔审核`,details:{balance:D,deductionAmount:T,estimatedRuns:A},recommendation:"建议在发起大规模自动化回归前充值补充额度"});else G.status="sufficient",z.push({id:"billing_quota",name:"AI 审批额度余量",status:"pass",summary:`额度充裕:剩余 ${D} 点,预估可支持 ${A} 笔审核单据`,details:{balance:D,deductionAmount:T,estimatedRuns:A}})}else z.push({id:"billing_quota",name:"AI 审批额度余量",status:"warn",summary:"未检索到「ai-approval」功能包额度明细,按默认通道运行",details:{features:w.map((D)=>D?.code)}});let N=w.find((D)=>D?.code==="approval-rules");if(N)W.used=typeof N.used==="number"?N.used:0,W.remaining=typeof N.remaining==="number"?N.remaining:0}catch(M){z.push({id:"billing_quota",name:"AI 审批额度余量",status:"warn",summary:`读取计费状态失败:${M instanceof Error?M.message:String(M)}`,details:{error:String(M)}})}let H={totalCount:0,activeCount:0,quotaUsed:W.used,quotaRemaining:W.remaining};try{let M=await p6($),w=Array.isArray(M.rules)?M.rules:[];if(H.totalCount=w.length,H.activeCount=w.filter((O)=>O.status==="ACTIVE").length,w.length===0)z.push({id:"rules_status",name:"审核规则状态",status:"warn",summary:"当前租户未配置任何审核规则 (规则数为 0)",details:{totalCount:0,activeCount:0},recommendation:U==="test"&&Q?`可运行 seal-use corps sync-test --corp ${Q} 从生产企业同步规则`:"可运行 seal-use rules add 创建基础规则"});else z.push({id:"rules_status",name:"审核规则状态",status:"pass",summary:`审核规则健康:共 ${H.totalCount} 条规则,其中生效活跃 ${H.activeCount} 条`,details:{totalCount:H.totalCount,activeCount:H.activeCount,quotaUsed:W.used,quotaRemaining:W.remaining}})}catch(M){z.push({id:"rules_status",name:"审核规则状态",status:"fail",summary:`拉取规则列表失败:${M instanceof Error?M.message:String(M)}`,details:{error:String(M)}})}let X={integrationCount:0,hasReplayChannel:!1,activeWebhookId:void 0};try{let M=await J$($);X.integrationCount=M.length;let w=M.find((O)=>O.name.includes("回放")||O.name.toLowerCase().includes("replay"));if(X.hasReplayChannel=Boolean(w),X.activeWebhookId=w?.id??M[0]?.id,M.length===0)z.push({id:"webhook_integrations",name:"单据推送 Webhook 通道",status:"warn",summary:"未配置任何 Webhook 集成通道,执行重放测试时将自动创建临时回放通道",details:{integrationCount:0},recommendation:"可运行 seal-use webhook add --name (回放通道) 手动注册专属通道"});else z.push({id:"webhook_integrations",name:"单据推送 Webhook 通道",status:"pass",summary:`Webhook 集成通道就绪:共 ${M.length} 个通道${w?` (含专属回放通道「${w.name}」)`:""}`,details:{integrationCount:M.length Line truncated
`)}var ih0=o(()=>{X6()});async function ch0($,Y,z){let U=($??Y??"").toLowerCase();if(U==="guide"||U==="doc"||U==="knowledge"||U==="book"){console.error(`\uD83D\uDCD6 [Seal Use Doctor] 正在读取内嵌系统规范白皮书(纯内存只读)...
`),console.log(gh0());return}if(U==="paths"||U==="dirs"||U==="directories"){let I=ol();c0(I.directories);return}if(U==="tenant"||U==="corp"||U==="enterprise"){let{selectCorp:I}=await Promise.resolve().then(() => (o4(),Y_0)),{createSealClient:K}=await Promise.resolve().then(() => (i8(),V00)),{stringOption:G}=await Promise.resolve().then(() => (D4(),lR0)),{diagnoseTenantContract:W,formatTenantDoctorDashboard:H}=await Promise.resolve().then(() => (ih0(),bh0)),X=G(z.options.corp)??(Y&&Y!==U?Y:void 0)??(z.command[2]&&z.command[2]!==U?z.command[2]:void 0),Z=I(X),q=await K(Z),V=await W(q,Z);if(!(F0(z.options.quiet)||F0(z.options.silent)))console.error(H(V));c0(V);return}let Q=ol();if(!(F0(z.options.quiet)||F0(z.options.silent)))console.error(fh0(Q));c0(Q)}var nh0=o(()=>{uh0();ll();D4();J4()});var dh0;var ph0=o(()=>{dh0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.24",description:"HTTP contract for the seal-use wrapped backend API, served by the local HTTP adapter\n(`seal-use http`, or the `seal-use service start` daemon; default http://127.0.0.1:8787).\n\nThese endpoints describe the stable wrapped API for frontend developers and agents. They are\nnot the raw downstream Seal endpoints: seal-use is responsible for enterprise selection,\nsource authentication, response compaction, and diagnostics-friendly fields.\n\nEvery operation declares `x-implementation-status`, so a caller can tell what the running\nadapter actually serves:\n\n- `implemented` — routed by `src/http/routes.ts` today. `src/http/openapi-implementation.test.ts`\n fails when an `implemented` operation has no matching route.\n- `planned` — contract-only, designed but not routed yet. Calling it returns 404.\n\nThe same capabilities are reachable through the CLI, and through the optional MCP server when\nit is enabled.\n"},servers:[{url:"http://localhost:8787",description:"Local HTTP adapter (`seal-use http`, or the `seal-use service start` daemon). Loopback-only by default."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps","x-implementation-status":"implemented",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp","x-implementation-status":"planned",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp","x-implementation-status":"planned",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig","x-implementation-status":"planned",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local Line truncated
`),console.log(gh0());return}if(U==="paths"||U==="dirs"||U==="directories"){let I=ol();c0(I.directories);return}if(U==="tenant"||U==="corp"||U==="enterprise"){let{selectCorp:I}=await Promise.resolve().then(() => (o4(),Y_0)),{createSealClient:K}=await Promise.resolve().then(() => (i8(),V00)),{stringOption:G}=await Promise.resolve().then(() => (D4(),lR0)),{diagnoseTenantContract:W,formatTenantDoctorDashboard:H}=await Promise.resolve().then(() => (ih0(),bh0)),X=G(z.options.corp)??(Y&&Y!==U?Y:void 0)??(z.command[2]&&z.command[2]!==U?z.command[2]:void 0),Z=I(X),q=await K(Z),V=await W(q,Z);if(!(F0(z.options.quiet)||F0(z.options.silent)))console.error(H(V));c0(V);return}let Q=ol();if(!(F0(z.options.quiet)||F0(z.options.silent)))console.error(fh0(Q));c0(Q)}var nh0=o(()=>{uh0();ll();D4();J4()});var dh0;var ph0=o(()=>{dh0={openapi:"3.1.0",info:{title:"seal-use Wrapped API",version:"0.10.25",description:"HTTP contract for the seal-use wrapped backend API, served by the local HTTP adapter\n(`seal-use http`, or the `seal-use service start` daemon; default http://127.0.0.1:8787).\n\nThese endpoints describe the stable wrapped API for frontend developers and agents. They are\nnot the raw downstream Seal endpoints: seal-use is responsible for enterprise selection,\nsource authentication, response compaction, and diagnostics-friendly fields.\n\nEvery operation declares `x-implementation-status`, so a caller can tell what the running\nadapter actually serves:\n\n- `implemented` — routed by `src/http/routes.ts` today. `src/http/openapi-implementation.test.ts`\n fails when an `implemented` operation has no matching route.\n- `planned` — contract-only, designed but not routed yet. Calling it returns 404.\n\nThe same capabilities are reachable through the CLI, and through the optional MCP server when\nit is enabled.\n"},servers:[{url:"http://localhost:8787",description:"Local HTTP adapter (`seal-use http`, or the `seal-use service start` daemon). Loopback-only by default."}],security:[{localSession:[]}],tags:[{name:"Corps",description:"Local enterprise configuration selection."},{name:"Source",description:"Source-derived Seal enterprise configuration."},{name:"Auth",description:"Wrapped authentication diagnostics and current identity."},{name:"Approval Runs",description:"Wrapped approval run history, summaries, document URLs, and trace bridge helpers."},{name:"Approval Knowledge",description:"Wrapped approval rules, documents, preferences, and search."},{name:"Simulation",description:"Wrapped simulation batch record access."}],paths:{"/v1/corps":{get:{tags:["Corps"],operationId:"listCorps","x-implementation-status":"implemented",summary:"List configured enterprises",responses:{"200":{description:"Configured enterprises.",content:{"application/json":{schema:{type:"array",items:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}}},"/v1/corps/current":{get:{tags:["Corps"],operationId:"getCurrentCorp","x-implementation-status":"planned",summary:"Get current enterprise",description:"Returns the configured default enterprise in stateful mode. Stateless mode has no current enterprise and requires an explicit corpId for enterprise operations.",responses:{"200":{description:"Current enterprise.",content:{"application/json":{schema:{type:"object",required:["id","name","sourceType","current"],properties:{id:{type:"string"},name:{type:"string"},sourceType:{type:"string",enum:["hose","direct","seal"]},current:{type:"boolean"}}}}}}}}},"/v1/corps/current/switch":{post:{tags:["Corps"],operationId:"switchCurrentCorp","x-implementation-status":"planned",summary:"Switch current enterprise",requestBody:{required:!0,content:{"application/json":{schema:{type:"object",required:["corpId"],properties:{corpId:{type:"string"}}}}}},responses:{"200":{description:"Switched enterprise.",content:{"application/json":{schema:{type:"object",required:["current","id","name"],properties:{current:{type:"boolean"},id:{type:"string"},name:{type:"string"}}}}}},"404":{description:"Requested resource was not found.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,required:["error"],properties:{error:{type:"string"},message:{type:"string"},details:{}}}}}}}}},"/v1/source/config":{get:{tags:["Source"],operationId:"getSourceConfig","x-implementation-status":"planned",summary:"Resolve source-derived Seal enterprise config",parameters:[{name:"corpId",in:"query",schema:{type:"string"},description:"Local enterprise config ID. Required when global selection mode is stateless; optional in stateful mode, where the configured default enterprise is used."}],responses:{"200":{description:"Redacted Seal enterprise config.",content:{"application/json":{schema:{type:"object",additionalProperties:!0,description:"Redacted Seal enterprise config resolved from the configured source."}}}},"401":{description:"Local Line truncated
the credentials already stored on this machine for the selected enterprise. Keep it bound
to loopback (\`--host 127.0.0.1\`) and do not expose the port to a network or an origin you
do not control.
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "seal-use Wrapped API",
"version": "0.10.24",
"version": "0.10.25",
"description": "HTTP contract for the seal-use wrapped backend API, served by the local HTTP adapter\n(`seal-use http`, or the `seal-use service start` daemon; default http://127.0.0.1:8787).\n\nThese endpoints describe the stable wrapped API for frontend developers and agents. They are\nnot the raw downstream Seal endpoints: seal-use is responsible for enterprise selection,\nsource authentication, response compaction, and diagnostics-friendly fields.\n\nEvery operation declares `x-implementation-status`, so a caller can tell what the running\nadapter actually serves:\n\n- `implemented` — routed by `src/http/routes.ts` today. `src/http/openapi-implementation.test.ts`\n fails when an `implemented` operation has no matching route.\n- `planned` — contract-only, designed but not routed yet. Calling it returns 404.\n\nThe same capabilities are reachable through the CLI, and through the optional MCP server when\nit is enabled.\n"
},
"servers": [
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: seal-use Wrapped API
version: 0.10.24
version: 0.10.25
description: |
HTTP contract for the seal-use wrapped backend API, served by the local HTTP adapter
(`seal-use http`, or the `seal-use service start` daemon; default http://127.0.0.1:8787).
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-use",
"version": "0.10.24",
"version": "0.10.25",
"private": true,
"description": "Seal tenant operations toolkit: approval-run diagnosis, rule remediation, Hose/合思 auth, plus a CLI and an optional MCP server.",
"license": "MIT",
+4 -4
View File
@@ -1,12 +1,12 @@
---
name: seal-use
description: "v0.10.24: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
description: "v0.10.25: Use for Seal Use first-time enterprise onboarding, Hose/合思 or Seal-native authentication, assistance links and browser cURL intake, plus tenant approval operations, diagnosis, simulation, rules, users, configuration, and search."
metadata:
version: 0.10.24
short-description: Seal tenant and Hose approval automation (v0.10.24)
version: 0.10.25
short-description: Seal tenant and Hose approval automation (v0.10.25)
---
# Seal Use (v0.10.24)
# Seal Use (v0.10.25)
**The CLI is the primary path; the MCP server is an optional extra that is off by default.** Prefer the global `seal-use` CLI, and only use MCP when it is actually available in the current session. If no `seal_cli*` tool is present, that is the normal default — do not try to enable it or treat it as a fault; just use the CLI. Enabling it is the user's choice in the plugin settings (插件配置中的「启用 MCP 服务」,默认关闭,打开后需重连该插件的 MCP 服务).