Add delegation link support and bump version to 0.3.6
This commit is contained in:
1 parent
997ece006a
commit
33ca5fcb4a
8 files changed
+108
-6
No files matched your search
+21
@@ -142,6 +142,24 @@ async function main() {
|
||||
|
||||
const client = await createSealClient(corp);
|
||||
|
||||
if (area === "delegation" && action === "list") {
|
||||
await runTool("seal_delegation_list", client, corp, {}, outputOptions(args.options));
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "delegation" && action === "create") {
|
||||
const note = stringOption(args.options.note) ?? (maybeName ? [maybeName, ...args.command.slice(2)].join(" ") : undefined);
|
||||
await runTool("seal_delegation_create", client, corp, { note }, outputOptions(args.options));
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "delegation" && action === "revoke") {
|
||||
const tokenId = maybeName ?? stringOption(args.options.tokenId);
|
||||
if (!tokenId) throw new Error("Usage: seal-home delegation revoke <tokenId>");
|
||||
await runTool("seal_delegation_revoke", client, corp, { tokenId }, outputOptions(args.options));
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "context") {
|
||||
await runTool("seal_approval_context_get", client, corp, {
|
||||
documentLimit: numberOption(args.options.documentLimit),
|
||||
@@ -1238,6 +1256,9 @@ Usage:
|
||||
seal-home corps add-seal --json '{"sealUrl":"https://tenant.sealai.cc","token":"seal-bearer-token"}'
|
||||
seal-home auth diagnose [--corp <corpId>]
|
||||
seal-home auth hose-link [--corp <corpId>] [--expire 7200]
|
||||
seal-home delegation list [--corp <corpId>]
|
||||
seal-home delegation create [--note <note>] [--corp <corpId>]
|
||||
seal-home delegation revoke <tokenId> [--corp <corpId>]
|
||||
seal-home source config [--corp <corpId>]
|
||||
seal-home tool <toolName> [--corp <corpId>] [--json '{"key":"value"}']
|
||||
seal-home rules count [--corp <corpId>]
|
||||
|
||||
Reference in new issue
Block a user