@zhama/tego-plugin-sdk 1.36.0 → 1.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -3
- package/bin/tego-plugin.mjs +2 -2
- package/dist/chunk-2ORO36BY.js +1 -0
- package/dist/chunk-KMN5RHLX.cjs +1 -0
- package/dist/{chunk-3KUOBGJN.js → chunk-P2Q2AKWP.js} +13 -13
- package/dist/{chunk-THMWRUAT.cjs → chunk-PWSTCQRN.cjs} +1 -1
- package/dist/dev.cjs +275 -0
- package/dist/dev.d.cts +108 -0
- package/dist/dev.d.ts +108 -0
- package/dist/dev.js +275 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{manifest-types-DQARCQJt.d.cts → manifest-types-CUTNfJTa.d.cts} +1 -1
- package/dist/{manifest-types-DQARCQJt.d.ts → manifest-types-CUTNfJTa.d.ts} +1 -1
- package/dist/manifest.d.cts +660 -660
- package/dist/manifest.d.ts +660 -660
- package/dist/pack.cjs +1 -1
- package/dist/pack.d.cts +3 -2
- package/dist/pack.d.ts +3 -2
- package/dist/pack.js +1 -1
- package/dist/publish.cjs +1 -1
- package/dist/publish.d.cts +1 -1
- package/dist/publish.d.ts +1 -1
- package/dist/publish.js +1 -1
- package/dist/scaffold.cjs +2 -1
- package/dist/scaffold.js +2 -1
- package/dist/server.d.cts +33 -33
- package/dist/server.d.ts +33 -33
- package/package.json +7 -1
package/dist/pack.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=Object.defineProperty;var e=(r,n)=>t(r,"name",{value:n,configurable:!0});var chunkPWSTCQRN_cjs=require("./chunk-PWSTCQRN.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs"),require("./chunk-ROFUQLOZ.cjs"),require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs"),Object.defineProperty(exports,"buildAgentTemplate",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildAgentTemplate},"get")}),Object.defineProperty(exports,"buildPluginBackend",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildPluginBackend},"get")}),Object.defineProperty(exports,"buildPluginTemplates",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildPluginTemplates},"get")}),Object.defineProperty(exports,"lockPlugin",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.lockPlugin},"get")}),Object.defineProperty(exports,"packPlugin",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.packPlugin},"get")}),Object.defineProperty(exports,"readManifest",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.readManifest},"get")}),Object.defineProperty(exports,"watchPluginFrontend",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.watchPluginFrontend},"get")});
|
package/dist/pack.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-
|
|
1
|
+
import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-CUTNfJTa.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Staging a `runtime: "python"` backend: source, locked wheels, and a lock
|
|
@@ -144,6 +144,7 @@ interface WatchPluginOptions {
|
|
|
144
144
|
* Never resolves — the caller is a foreground command the author interrupts.
|
|
145
145
|
*/
|
|
146
146
|
declare function watchPluginFrontend(options: WatchPluginOptions): Promise<never>;
|
|
147
|
+
declare function readManifest(root: string): Promise<TegoPluginManifest>;
|
|
147
148
|
interface BuildPluginBackendOptions {
|
|
148
149
|
/** Package root: the directory holding `tego.plugin.json`. */
|
|
149
150
|
root: string;
|
|
@@ -166,4 +167,4 @@ interface BuildPluginBackendOptions {
|
|
|
166
167
|
*/
|
|
167
168
|
declare function buildPluginBackend(part: ResolvedBackendPart, options: BuildPluginBackendOptions): Promise<void>;
|
|
168
169
|
|
|
169
|
-
export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, watchPluginFrontend };
|
|
170
|
+
export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, readManifest, watchPluginFrontend };
|
package/dist/pack.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-
|
|
1
|
+
import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-CUTNfJTa.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Staging a `runtime: "python"` backend: source, locked wheels, and a lock
|
|
@@ -144,6 +144,7 @@ interface WatchPluginOptions {
|
|
|
144
144
|
* Never resolves — the caller is a foreground command the author interrupts.
|
|
145
145
|
*/
|
|
146
146
|
declare function watchPluginFrontend(options: WatchPluginOptions): Promise<never>;
|
|
147
|
+
declare function readManifest(root: string): Promise<TegoPluginManifest>;
|
|
147
148
|
interface BuildPluginBackendOptions {
|
|
148
149
|
/** Package root: the directory holding `tego.plugin.json`. */
|
|
149
150
|
root: string;
|
|
@@ -166,4 +167,4 @@ interface BuildPluginBackendOptions {
|
|
|
166
167
|
*/
|
|
167
168
|
declare function buildPluginBackend(part: ResolvedBackendPart, options: BuildPluginBackendOptions): Promise<void>;
|
|
168
169
|
|
|
169
|
-
export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, watchPluginFrontend };
|
|
170
|
+
export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, readManifest, watchPluginFrontend };
|
package/dist/pack.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{buildAgentTemplate,buildPluginBackend,buildPluginTemplates,lockPlugin,packPlugin,watchPluginFrontend}from"./chunk-
|
|
1
|
+
export{buildAgentTemplate,buildPluginBackend,buildPluginTemplates,lockPlugin,packPlugin,readManifest,watchPluginFrontend}from"./chunk-P2Q2AKWP.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";
|
package/dist/publish.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty;var s=(e,a)=>$(e,"name",{value:a,configurable:!0});var
|
|
1
|
+
"use strict";var $=Object.defineProperty;var s=(e,a)=>$(e,"name",{value:a,configurable:!0});var chunkPWSTCQRN_cjs=require("./chunk-PWSTCQRN.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs");var chunkROFUQLOZ_cjs=require("./chunk-ROFUQLOZ.cjs");require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs");var promises=require("fs/promises"),path=require("path"),API_PREFIX="/api/v1/tego-os";async function publishPlugin(e){const a=e.log===null?()=>{}:e.log??(t=>console.log(t)),n=await chunkPWSTCQRN_cjs.packPlugin({root:e.root,log:a});return publishPackedPlugin(n,e)}s(publishPlugin,"publishPlugin");async function publishPackedPlugin(e,a){const n=a.log===null?()=>{}:a.log??(p=>console.log(p)),t=a.fetchImpl??fetch,r=createCaller(a.server,a.token,t),u=await promises.readFile(e.file),o=path.basename(e.file);n("\u203A presigning upload");const c=await r("POST","/admin/runtime-plugins/presign-stream",{filename:o,mimeType:"application/zip",size:u.byteLength});n(`\u203A uploading ${o} (${u.byteLength} bytes)`),await putArchive(a.server,c.uploadUrl,u,t),n("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:c.uploadToken});n(` ${l.pluginId}@${l.semanticVersion} \u2014 ${describeParts(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),n("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:c.uploadToken,...a.meta});let i=g.release;n(` release ${i.id} (${i.status})`),(a.approve??!0)&&(n("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),n(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=chunkROFUQLOZ_cjs.resolvePluginScope(e.manifest),f=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};n(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",f),reportInstall(d,n)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}s(publishPackedPlugin,"publishPackedPlugin");function describeParts(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}s(describeParts,"describeParts");function reportInstall(e,a){const n=e.avatars;if(!n||n.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const t=n.attempted-n.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${t}/${n.attempted} avatars`);for(const r of n.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}s(reportInstall,"reportInstall");function createCaller(e,a,n){const t=e.replace(/\/+$/,"");return s(async function(u,o,c){const l=await n(`${t}${API_PREFIX}${o}`,{method:u,headers:{authorization:`Bearer ${a}`,...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}});return unwrap(l,`${u} ${o}`)},"call")}s(createCaller,"createCaller");async function putArchive(e,a,n,t){const r=e.replace(/\/+$/,""),u=await t(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:n});await unwrap(u,"PUT upload")}s(putArchive,"putArchive");async function unwrap(e,a){let n;try{n=await e.json()}catch{n=null}if(!e.ok||!n?.success){const t=n?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${t}`)}return n.data}s(unwrap,"unwrap"),exports.publishPackedPlugin=publishPackedPlugin,exports.publishPlugin=publishPlugin;
|
package/dist/publish.d.cts
CHANGED
package/dist/publish.d.ts
CHANGED
package/dist/publish.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.defineProperty;var o=(e,a)=>h(e,"name",{value:a,configurable:!0});import{packPlugin as v}from"./chunk-
|
|
1
|
+
var h=Object.defineProperty;var o=(e,a)=>h(e,"name",{value:a,configurable:!0});import{packPlugin as v}from"./chunk-P2Q2AKWP.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import{resolvePluginScope as P}from"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";import{readFile as w}from"fs/promises";import{basename as y}from"path";var I="/api/v1/tego-os";async function T(e){const a=e.log===null?()=>{}:e.log??(n=>console.log(n)),t=await v({root:e.root,log:a});return f(t,e)}o(T,"publishPlugin");async function f(e,a){const t=a.log===null?()=>{}:a.log??(p=>console.log(p)),n=a.fetchImpl??fetch,r=A(a.server,a.token,n),s=await w(e.file),c=y(e.file);t("\u203A presigning upload");const u=await r("POST","/admin/runtime-plugins/presign-stream",{filename:c,mimeType:"application/zip",size:s.byteLength});t(`\u203A uploading ${c} (${s.byteLength} bytes)`),await S(a.server,u.uploadUrl,s,n),t("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:u.uploadToken});t(` ${l.pluginId}@${l.semanticVersion} \u2014 ${b(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),t("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:u.uploadToken,...a.meta});let i=g.release;t(` release ${i.id} (${i.status})`),(a.approve??!0)&&(t("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),t(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=P(e.manifest),$=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};t(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",$),k(d,t)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}o(f,"publishPackedPlugin");function b(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}o(b,"describeParts");function k(e,a){const t=e.avatars;if(!t||t.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const n=t.attempted-t.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${n}/${t.attempted} avatars`);for(const r of t.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}o(k,"reportInstall");function A(e,a,t){const n=e.replace(/\/+$/,"");return o(async function(s,c,u){const l=await t(`${n}${I}${c}`,{method:s,headers:{authorization:`Bearer ${a}`,...u===void 0?{}:{"content-type":"application/json"}},...u===void 0?{}:{body:JSON.stringify(u)}});return m(l,`${s} ${c}`)},"call")}o(A,"createCaller");async function S(e,a,t,n){const r=e.replace(/\/+$/,""),s=await n(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:t});await m(s,"PUT upload")}o(S,"putArchive");async function m(e,a){let t;try{t=await e.json()}catch{t=null}if(!e.ok||!t?.success){const n=t?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${n}`)}return t.data}o(m,"unwrap");export{f as publishPackedPlugin,T as publishPlugin};
|
package/dist/scaffold.cjs
CHANGED
|
@@ -6,6 +6,7 @@ backend/dist/
|
|
|
6
6
|
claw/dist/
|
|
7
7
|
coverage/
|
|
8
8
|
.turbo/
|
|
9
|
+
.tego-dev/
|
|
9
10
|
`,STANDALONE_PNPM_WORKSPACE=`allowBuilds:
|
|
10
11
|
esbuild: true
|
|
11
12
|
`,STANDALONE_TSCONFIG_FILES={"tsconfig.base.json":{$schema:"https://json.schemastore.org/tsconfig",compilerOptions:{strict:!0,useUnknownInCatchVariables:!0,allowJs:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,isolatedModules:!0,verbatimModuleSyntax:!0,declaration:!0,declarationMap:!0,esModuleInterop:!0,incremental:!1,noUncheckedIndexedAccess:!0,moduleDetection:"force",exactOptionalPropertyTypes:!0,target:"ES2022",lib:["ES2022","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler"},exclude:["node_modules"]},"tsconfig.frontend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2020",lib:["ES2020","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler",jsx:"react-jsx",noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}},"tsconfig.backend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2022",lib:["ES2022"],module:"ESNext",moduleResolution:"bundler",types:["node"],noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}}};function tsconfigPreset(e,t){return t==="workspace"?`@tego/tsconfig/plugin-${e}.json`:`../tsconfig.${e}.json`}i(tsconfigPreset,"tsconfigPreset");var STANDALONE_ESLINT_CONFIG=`import js from '@eslint/js';
|
|
@@ -41,7 +42,7 @@ export default tseslint.config(
|
|
|
41
42
|
prettierConfig
|
|
42
43
|
);
|
|
43
44
|
`,STANDALONE_LINT_DEPENDENCIES={"@eslint/js":"^9.16.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-hooks":"^5.2.0",globals:"^15.13.0","typescript-eslint":"^8.17.0"};function standaloneRootFiles(){return[{path:".prettierrc.json",contents:json(STANDALONE_PRETTIER)},{path:".gitignore",contents:STANDALONE_GITIGNORE},{path:"pnpm-workspace.yaml",contents:STANDALONE_PNPM_WORKSPACE},...Object.entries(STANDALONE_TSCONFIG_FILES).map(([e,t])=>({path:e,contents:json(t)}))]}i(standaloneRootFiles,"standaloneRootFiles");var STANDALONE_TOOLCHAIN={"@typescript/native-preview":"7.0.0-dev.20260519.1",eslint:"^9.39.1",prettier:"^3.7.4",typescript:"^5.9.3"},SUPPORTED_LOCALES=["zh-CN","zh-TW","en","ja","ko","de","es","fr","it","pt"];function packageNameFor(e){return`@tego/plugin-${e.replace(/^tego-/,"")}`}i(packageNameFor,"packageNameFor");function keyNamespaceFor(e){return e.replace(/^tego-/,"")}i(keyNamespaceFor,"keyNamespaceFor");function json(e){return`${JSON.stringify(e,null,2)}
|
|
44
|
-
`}i(json,"json");function manifest(e){const t=keyNamespaceFor(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:json(r)}}i(manifest,"manifest");function rootPackageJson(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":sdkSpec("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":sdkSpec("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,STANDALONE_TOOLCHAIN,STANDALONE_LINT_DEPENDENCIES);const c={name:packageNameFor(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:sortedRecord(r)};return{path:"package.json",contents:json(c)}}i(rootPackageJson,"rootPackageJson");function sortedRecord(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(sortedRecord,"sortedRecord");function eslintConfig(e){return e==="npm"?{path:"eslint.config.js",contents:STANDALONE_ESLINT_CONFIG}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
|
|
45
|
+
`}i(json,"json");function manifest(e){const t=keyNamespaceFor(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:json(r)}}i(manifest,"manifest");function rootPackageJson(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":sdkSpec("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":sdkSpec("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,STANDALONE_TOOLCHAIN,STANDALONE_LINT_DEPENDENCIES);const c={name:packageNameFor(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch",dev:"tego-plugin dev","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:sortedRecord(r)};return{path:"package.json",contents:json(c)}}i(rootPackageJson,"rootPackageJson");function sortedRecord(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(sortedRecord,"sortedRecord");function eslintConfig(e){return e==="npm"?{path:"eslint.config.js",contents:STANDALONE_ESLINT_CONFIG}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
|
|
45
46
|
|
|
46
47
|
export default [
|
|
47
48
|
...baseConfig,
|
package/dist/scaffold.js
CHANGED
|
@@ -6,6 +6,7 @@ backend/dist/
|
|
|
6
6
|
claw/dist/
|
|
7
7
|
coverage/
|
|
8
8
|
.turbo/
|
|
9
|
+
.tego-dev/
|
|
9
10
|
`,q=`allowBuilds:
|
|
10
11
|
esbuild: true
|
|
11
12
|
`,E={"tsconfig.base.json":{$schema:"https://json.schemastore.org/tsconfig",compilerOptions:{strict:!0,useUnknownInCatchVariables:!0,allowJs:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,isolatedModules:!0,verbatimModuleSyntax:!0,declaration:!0,declarationMap:!0,esModuleInterop:!0,incremental:!1,noUncheckedIndexedAccess:!0,moduleDetection:"force",exactOptionalPropertyTypes:!0,target:"ES2022",lib:["ES2022","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler"},exclude:["node_modules"]},"tsconfig.frontend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2020",lib:["ES2020","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler",jsx:"react-jsx",noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}},"tsconfig.backend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2022",lib:["ES2022"],module:"ESNext",moduleResolution:"bundler",types:["node"],noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}}};function u(e,t){return t==="workspace"?`@tego/tsconfig/plugin-${e}.json`:`../tsconfig.${e}.json`}i(u,"tsconfigPreset");var H=`import js from '@eslint/js';
|
|
@@ -41,7 +42,7 @@ export default tseslint.config(
|
|
|
41
42
|
prettierConfig
|
|
42
43
|
);
|
|
43
44
|
`,z={"@eslint/js":"^9.16.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-hooks":"^5.2.0",globals:"^15.13.0","typescript-eslint":"^8.17.0"};function B(){return[{path:".prettierrc.json",contents:c(F)},{path:".gitignore",contents:M},{path:"pnpm-workspace.yaml",contents:q},...Object.entries(E).map(([e,t])=>({path:e,contents:c(t)}))]}i(B,"standaloneRootFiles");var U={"@typescript/native-preview":"7.0.0-dev.20260519.1",eslint:"^9.39.1",prettier:"^3.7.4",typescript:"^5.9.3"},G=["zh-CN","zh-TW","en","ja","ko","de","es","fr","it","pt"];function h(e){return`@tego/plugin-${e.replace(/^tego-/,"")}`}i(h,"packageNameFor");function v(e){return e.replace(/^tego-/,"")}i(v,"keyNamespaceFor");function c(e){return`${JSON.stringify(e,null,2)}
|
|
44
|
-
`}i(c,"json");function K(e){const t=v(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:c(r)}}i(K,"manifest");function J(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":k("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":k("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,U,z);const l={name:h(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:Q(r)};return{path:"package.json",contents:c(l)}}i(J,"rootPackageJson");function Q(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(Q,"sortedRecord");function W(e){return e==="npm"?{path:"eslint.config.js",contents:H}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
|
|
45
|
+
`}i(c,"json");function K(e){const t=v(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:c(r)}}i(K,"manifest");function J(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":k("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":k("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,U,z);const l={name:h(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch",dev:"tego-plugin dev","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:Q(r)};return{path:"package.json",contents:c(l)}}i(J,"rootPackageJson");function Q(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(Q,"sortedRecord");function W(e){return e==="npm"?{path:"eslint.config.js",contents:H}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
|
|
45
46
|
|
|
46
47
|
export default [
|
|
47
48
|
...baseConfig,
|
package/dist/server.d.cts
CHANGED
|
@@ -14,32 +14,32 @@ declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14
14
|
requestId: string;
|
|
15
15
|
organizationName: string;
|
|
16
16
|
email?: string | undefined;
|
|
17
|
-
username?: string | undefined;
|
|
18
17
|
phone?: string | undefined;
|
|
18
|
+
username?: string | undefined;
|
|
19
19
|
userId?: string | undefined;
|
|
20
20
|
fullName?: string | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
requestId: string;
|
|
23
23
|
organizationName: string;
|
|
24
24
|
email?: string | undefined;
|
|
25
|
-
username?: string | undefined;
|
|
26
25
|
phone?: string | undefined;
|
|
26
|
+
username?: string | undefined;
|
|
27
27
|
userId?: string | undefined;
|
|
28
28
|
fullName?: string | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
requestId: string;
|
|
31
31
|
organizationName: string;
|
|
32
32
|
email?: string | undefined;
|
|
33
|
-
username?: string | undefined;
|
|
34
33
|
phone?: string | undefined;
|
|
34
|
+
username?: string | undefined;
|
|
35
35
|
userId?: string | undefined;
|
|
36
36
|
fullName?: string | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
requestId: string;
|
|
39
39
|
organizationName: string;
|
|
40
40
|
email?: string | undefined;
|
|
41
|
-
username?: string | undefined;
|
|
42
41
|
phone?: string | undefined;
|
|
42
|
+
username?: string | undefined;
|
|
43
43
|
userId?: string | undefined;
|
|
44
44
|
fullName?: string | undefined;
|
|
45
45
|
}>;
|
|
@@ -58,36 +58,36 @@ declare const accountProvisionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
58
58
|
requestId: string;
|
|
59
59
|
organizationName: string;
|
|
60
60
|
email?: string | undefined;
|
|
61
|
+
phone?: string | undefined;
|
|
61
62
|
password?: string | undefined;
|
|
62
63
|
username?: string | undefined;
|
|
63
|
-
phone?: string | undefined;
|
|
64
64
|
userId?: string | undefined;
|
|
65
65
|
fullName?: string | undefined;
|
|
66
66
|
}, {
|
|
67
67
|
requestId: string;
|
|
68
68
|
organizationName: string;
|
|
69
69
|
email?: string | undefined;
|
|
70
|
+
phone?: string | undefined;
|
|
70
71
|
password?: string | undefined;
|
|
71
72
|
username?: string | undefined;
|
|
72
|
-
phone?: string | undefined;
|
|
73
73
|
userId?: string | undefined;
|
|
74
74
|
fullName?: string | undefined;
|
|
75
75
|
}>, {
|
|
76
76
|
requestId: string;
|
|
77
77
|
organizationName: string;
|
|
78
78
|
email?: string | undefined;
|
|
79
|
+
phone?: string | undefined;
|
|
79
80
|
password?: string | undefined;
|
|
80
81
|
username?: string | undefined;
|
|
81
|
-
phone?: string | undefined;
|
|
82
82
|
userId?: string | undefined;
|
|
83
83
|
fullName?: string | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
requestId: string;
|
|
86
86
|
organizationName: string;
|
|
87
87
|
email?: string | undefined;
|
|
88
|
+
phone?: string | undefined;
|
|
88
89
|
password?: string | undefined;
|
|
89
90
|
username?: string | undefined;
|
|
90
|
-
phone?: string | undefined;
|
|
91
91
|
userId?: string | undefined;
|
|
92
92
|
fullName?: string | undefined;
|
|
93
93
|
}>;
|
|
@@ -444,13 +444,13 @@ declare const pluginCollectionEnsureSchema: z.ZodObject<{
|
|
|
444
444
|
/** @deprecated Accepted for older clients; reads use ordinary knowledge ACL. */
|
|
445
445
|
policyScope: z.ZodOptional<z.ZodString>;
|
|
446
446
|
}, "strict", z.ZodTypeAny, {
|
|
447
|
-
name: string;
|
|
448
447
|
key: string;
|
|
448
|
+
name: string;
|
|
449
449
|
accessMode?: "managed" | "private" | undefined;
|
|
450
450
|
policyScope?: string | undefined;
|
|
451
451
|
}, {
|
|
452
|
-
name: string;
|
|
453
452
|
key: string;
|
|
453
|
+
name: string;
|
|
454
454
|
accessMode?: "managed" | "private" | undefined;
|
|
455
455
|
policyScope?: string | undefined;
|
|
456
456
|
}>;
|
|
@@ -461,23 +461,23 @@ declare const pluginCollectionPermissionsSchema: z.ZodObject<{
|
|
|
461
461
|
subjectType: z.ZodEnum<["user", "team", "role", "tenant"]>;
|
|
462
462
|
subjectId: z.ZodString;
|
|
463
463
|
}, "strict", z.ZodTypeAny, {
|
|
464
|
-
subjectType: "
|
|
464
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
465
465
|
subjectId: string;
|
|
466
466
|
}, {
|
|
467
|
-
subjectType: "
|
|
467
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
468
468
|
subjectId: string;
|
|
469
469
|
}>, "many">;
|
|
470
470
|
}, "strict", z.ZodTypeAny, {
|
|
471
471
|
key: string;
|
|
472
472
|
grants: {
|
|
473
|
-
subjectType: "
|
|
473
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
474
474
|
subjectId: string;
|
|
475
475
|
}[];
|
|
476
476
|
syncRevision?: string | undefined;
|
|
477
477
|
}, {
|
|
478
478
|
key: string;
|
|
479
479
|
grants: {
|
|
480
|
-
subjectType: "
|
|
480
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
481
481
|
subjectId: string;
|
|
482
482
|
}[];
|
|
483
483
|
syncRevision?: string | undefined;
|
|
@@ -523,23 +523,23 @@ declare const pluginCollectionAccessSchema: z.ZodEffects<z.ZodObject<{
|
|
|
523
523
|
/** Identity snapshot returned by access({enabled:false}); required to resume. */
|
|
524
524
|
identityRevision: z.ZodOptional<z.ZodString>;
|
|
525
525
|
}, "strict", z.ZodTypeAny, {
|
|
526
|
-
enabled?: boolean | undefined;
|
|
527
526
|
key?: string | undefined;
|
|
527
|
+
enabled?: boolean | undefined;
|
|
528
528
|
syncRevision?: string | undefined;
|
|
529
529
|
identityRevision?: string | undefined;
|
|
530
530
|
}, {
|
|
531
|
-
enabled?: boolean | undefined;
|
|
532
531
|
key?: string | undefined;
|
|
532
|
+
enabled?: boolean | undefined;
|
|
533
533
|
syncRevision?: string | undefined;
|
|
534
534
|
identityRevision?: string | undefined;
|
|
535
535
|
}>, {
|
|
536
|
-
enabled?: boolean | undefined;
|
|
537
536
|
key?: string | undefined;
|
|
537
|
+
enabled?: boolean | undefined;
|
|
538
538
|
syncRevision?: string | undefined;
|
|
539
539
|
identityRevision?: string | undefined;
|
|
540
540
|
}, {
|
|
541
|
-
enabled?: boolean | undefined;
|
|
542
541
|
key?: string | undefined;
|
|
542
|
+
enabled?: boolean | undefined;
|
|
543
543
|
syncRevision?: string | undefined;
|
|
544
544
|
identityRevision?: string | undefined;
|
|
545
545
|
}>;
|
|
@@ -552,31 +552,31 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
|
|
|
552
552
|
text: z.ZodString;
|
|
553
553
|
metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
|
|
554
554
|
}, "strict", z.ZodTypeAny, {
|
|
555
|
-
text: string;
|
|
556
555
|
title: string;
|
|
556
|
+
text: string;
|
|
557
557
|
externalId: string;
|
|
558
558
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
559
559
|
}, {
|
|
560
|
-
text: string;
|
|
561
560
|
title: string;
|
|
561
|
+
text: string;
|
|
562
562
|
externalId: string;
|
|
563
563
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
564
564
|
}>, "many">, {
|
|
565
|
-
text: string;
|
|
566
565
|
title: string;
|
|
566
|
+
text: string;
|
|
567
567
|
externalId: string;
|
|
568
568
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
569
569
|
}[], {
|
|
570
|
-
text: string;
|
|
571
570
|
title: string;
|
|
571
|
+
text: string;
|
|
572
572
|
externalId: string;
|
|
573
573
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
574
574
|
}[]>;
|
|
575
575
|
}, "strict", z.ZodTypeAny, {
|
|
576
576
|
key: string;
|
|
577
577
|
documents: {
|
|
578
|
-
text: string;
|
|
579
578
|
title: string;
|
|
579
|
+
text: string;
|
|
580
580
|
externalId: string;
|
|
581
581
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
582
582
|
}[];
|
|
@@ -584,8 +584,8 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
|
|
|
584
584
|
}, {
|
|
585
585
|
key: string;
|
|
586
586
|
documents: {
|
|
587
|
-
text: string;
|
|
588
587
|
title: string;
|
|
588
|
+
text: string;
|
|
589
589
|
externalId: string;
|
|
590
590
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
591
591
|
}[];
|
|
@@ -687,8 +687,8 @@ declare const pluginCollectionDocumentContentSchema: z.ZodObject<{
|
|
|
687
687
|
page: z.ZodDefault<z.ZodNumber>;
|
|
688
688
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
689
689
|
}, "strict", z.ZodTypeAny, {
|
|
690
|
-
page: number;
|
|
691
690
|
key: string;
|
|
691
|
+
page: number;
|
|
692
692
|
externalId: string;
|
|
693
693
|
pageSize: number;
|
|
694
694
|
}, {
|
|
@@ -704,13 +704,13 @@ declare const pluginCollectionSearchSchema: z.ZodObject<{
|
|
|
704
704
|
/** Equality per key; an array matches any of its values. */
|
|
705
705
|
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
|
|
706
706
|
}, "strict", z.ZodTypeAny, {
|
|
707
|
-
query: string;
|
|
708
707
|
key: string;
|
|
708
|
+
query: string;
|
|
709
709
|
topK: number;
|
|
710
710
|
filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
711
711
|
}, {
|
|
712
|
-
query: string;
|
|
713
712
|
key: string;
|
|
713
|
+
query: string;
|
|
714
714
|
filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
715
715
|
topK?: number | undefined;
|
|
716
716
|
}>;
|
|
@@ -888,39 +888,39 @@ declare const pluginKnowledgeBaseInputSchema: z.ZodObject<{
|
|
|
888
888
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
889
889
|
}, "strict", z.ZodTypeAny, {
|
|
890
890
|
permission: "view" | "manage" | "use" | "operate";
|
|
891
|
-
subjectType: "
|
|
891
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
892
892
|
subjectId: string;
|
|
893
893
|
expiresAt?: string | null | undefined;
|
|
894
894
|
}, {
|
|
895
895
|
permission: "view" | "manage" | "use" | "operate";
|
|
896
|
-
subjectType: "
|
|
896
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
897
897
|
subjectId: string;
|
|
898
898
|
expiresAt?: string | null | undefined;
|
|
899
899
|
}>, "many">;
|
|
900
900
|
idempotencyKey: z.ZodString;
|
|
901
901
|
}, "strict", z.ZodTypeAny, {
|
|
902
|
-
name: string;
|
|
903
902
|
scope: {
|
|
904
903
|
type: "team";
|
|
905
904
|
teamId: string;
|
|
906
905
|
};
|
|
906
|
+
name: string;
|
|
907
907
|
grants: {
|
|
908
908
|
permission: "view" | "manage" | "use" | "operate";
|
|
909
|
-
subjectType: "
|
|
909
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
910
910
|
subjectId: string;
|
|
911
911
|
expiresAt?: string | null | undefined;
|
|
912
912
|
}[];
|
|
913
913
|
idempotencyKey: string;
|
|
914
914
|
description?: string | undefined;
|
|
915
915
|
}, {
|
|
916
|
-
name: string;
|
|
917
916
|
scope: {
|
|
918
917
|
type: "team";
|
|
919
918
|
teamId: string;
|
|
920
919
|
};
|
|
920
|
+
name: string;
|
|
921
921
|
grants: {
|
|
922
922
|
permission: "view" | "manage" | "use" | "operate";
|
|
923
|
-
subjectType: "
|
|
923
|
+
subjectType: "tenant" | "user" | "team" | "role";
|
|
924
924
|
subjectId: string;
|
|
925
925
|
expiresAt?: string | null | undefined;
|
|
926
926
|
}[];
|