@m1a0rz/agent-identity 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/src/tools/identity-config-suggest.d.ts +118 -0
- package/dist/src/tools/identity-config-suggest.d.ts.map +1 -0
- package/dist/src/tools/identity-config-suggest.js +167 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/skills/SKILL.md +18 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA8D7D,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,iBAAiB,QAqWtD"}
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import { IdentityService } from "./src/services/identity-service.js";
|
|
|
23
23
|
import { sendNotificationFeishu } from "./src/services/send-notification-feishu.js";
|
|
24
24
|
import { createIdentityApproveTool } from "./src/tools/identity-approve-tool.js";
|
|
25
25
|
import { createIdentityConfigTool } from "./src/tools/identity-config.js";
|
|
26
|
+
import { createIdentityConfigSuggestTool } from "./src/tools/identity-config-suggest.js";
|
|
26
27
|
import { createIdentityListRiskPatternsTool } from "./src/tools/identity-list-risk-patterns.js";
|
|
27
28
|
import { createIdentityRiskCheckTool } from "./src/tools/identity-risk-check.js";
|
|
28
29
|
import { createIdentityFetchTool } from "./src/tools/identity-fetch.js";
|
|
@@ -278,6 +279,7 @@ export default function register(api) {
|
|
|
278
279
|
api.registerTool(createIdentityListCredentialsTool(identityCommandsDeps), { optional: false });
|
|
279
280
|
api.registerTool(createIdentityListTipsTool(identityCommandsDeps), { optional: false });
|
|
280
281
|
api.registerTool(createIdentityConfigTool(identityCommandsDeps), { optional: false });
|
|
282
|
+
api.registerTool(createIdentityConfigSuggestTool(), { optional: false });
|
|
281
283
|
api.registerTool(createIdentityFetchTool(identityCommandsDeps), { optional: false });
|
|
282
284
|
api.registerTool(createIdentitySetBindingTool(identityCommandsDeps), { optional: true });
|
|
283
285
|
api.registerTool(createIdentityUnsetBindingTool(identityCommandsDeps), { optional: true });
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* identity_config_suggest: generate config snippets for agent-identity plugin.
|
|
3
|
+
* Helps skill/agent assist users in configuring openclaw.json.
|
|
4
|
+
* Does not modify config; returns JSON and instructions for manual edit.
|
|
5
|
+
*/
|
|
6
|
+
declare const INTENTS: {
|
|
7
|
+
readonly identity: {
|
|
8
|
+
readonly label: "Identity API (AK/SK, endpoint)";
|
|
9
|
+
readonly config: {
|
|
10
|
+
readonly identity: {
|
|
11
|
+
readonly endpoint: "https://id.cn-beijing.volcengineapi.com";
|
|
12
|
+
readonly accessKeyId: "<your-access-key>";
|
|
13
|
+
readonly secretAccessKey: "<your-secret-key>";
|
|
14
|
+
readonly workloadPoolName: "default";
|
|
15
|
+
readonly workloadName: "openclaw-agent";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly instructions: {
|
|
19
|
+
readonly en: "Add under plugins.entries.agent-identity.config. Credentials can also come from env (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) or credentialsFile.";
|
|
20
|
+
readonly zh: "添加到 plugins.entries.agent-identity.config 下。凭据也可通过环境变量 (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) 或 credentialsFile 提供。";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly userpool: {
|
|
24
|
+
readonly label: "UserPool OIDC (login)";
|
|
25
|
+
readonly config: {
|
|
26
|
+
readonly userpool: {
|
|
27
|
+
readonly discoveryUrl: "https://your-idp.com/.well-known/openid-configuration";
|
|
28
|
+
readonly clientId: "<your-client-id>";
|
|
29
|
+
readonly clientSecret: "<optional-for-public-clients>";
|
|
30
|
+
readonly callbackUrl: "https://your-gateway/identity/oauth/callback";
|
|
31
|
+
readonly scope: "openid profile email";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly instructions: {
|
|
35
|
+
readonly en: "Required for /identity login. callbackUrl must match the URL registered with your IdP. For dynamic mode, use userPoolName + clientName instead of discoveryUrl + clientId.";
|
|
36
|
+
readonly zh: "登录功能必需。callbackUrl 需与 IdP 中注册的回调地址一致。动态模式可使用 userPoolName + clientName 替代 discoveryUrl + clientId。";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly authz: {
|
|
40
|
+
readonly label: "AuthZ (tool/skill permission, risk approval)";
|
|
41
|
+
readonly config: {
|
|
42
|
+
readonly authz: {
|
|
43
|
+
readonly toolCheck: true;
|
|
44
|
+
readonly skillReadCheck: false;
|
|
45
|
+
readonly requireRiskApproval: true;
|
|
46
|
+
readonly namespaceName: "default";
|
|
47
|
+
readonly lowRiskBypass: true;
|
|
48
|
+
readonly approvalTtlSeconds: 300;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly instructions: {
|
|
52
|
+
readonly en: "toolCheck: CheckPermission for tools. skillReadCheck: CheckPermission for SKILL.md reads. requireRiskApproval: user approval for high-risk tools (exec, write). Restart gateway after config change.";
|
|
53
|
+
readonly zh: "toolCheck: 对工具调用做 CheckPermission。skillReadCheck: 对 SKILL.md 读取做权限检查。requireRiskApproval: 高风险工具需用户审批。修改后需重启 gateway。";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly llm_risk: {
|
|
57
|
+
readonly label: "LLM risk check (re-evaluate medium-risk)";
|
|
58
|
+
readonly config: {
|
|
59
|
+
readonly authz: {
|
|
60
|
+
readonly requireRiskApproval: true;
|
|
61
|
+
readonly enableLlmRiskCheck: true;
|
|
62
|
+
readonly llmRiskCheck: {
|
|
63
|
+
readonly endpoint: "http://localhost:11434";
|
|
64
|
+
readonly api: "ollama";
|
|
65
|
+
readonly model: "qwen3:8b";
|
|
66
|
+
readonly timeoutMs: 10000;
|
|
67
|
+
readonly cacheTtlMs: 300000;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly instructions: {
|
|
72
|
+
readonly en: "When rules return medium, LLM re-evaluates. Requires requireRiskApproval. endpoint: Ollama or OpenAI-compat base URL.";
|
|
73
|
+
readonly zh: "规则返回 medium 时由 LLM 二次评估。需同时开启 requireRiskApproval。endpoint 为 Ollama 或 OpenAI 兼容接口地址。";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly full: {
|
|
77
|
+
readonly label: "Full example (identity + userpool + authz)";
|
|
78
|
+
readonly config: {
|
|
79
|
+
readonly identity: {
|
|
80
|
+
readonly endpoint: "https://id.cn-beijing.volcengineapi.com";
|
|
81
|
+
readonly workloadPoolName: "default";
|
|
82
|
+
readonly workloadName: "openclaw-agent";
|
|
83
|
+
};
|
|
84
|
+
readonly userpool: {
|
|
85
|
+
readonly discoveryUrl: "https://your-idp.com/.well-known/openid-configuration";
|
|
86
|
+
readonly clientId: "<your-client-id>";
|
|
87
|
+
readonly callbackUrl: "https://your-gateway/identity/oauth/callback";
|
|
88
|
+
readonly scope: "openid profile email";
|
|
89
|
+
};
|
|
90
|
+
readonly authz: {
|
|
91
|
+
readonly toolCheck: false;
|
|
92
|
+
readonly skillReadCheck: false;
|
|
93
|
+
readonly requireRiskApproval: false;
|
|
94
|
+
readonly lowRiskBypass: true;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly instructions: {
|
|
98
|
+
readonly en: "Minimal full config. Fill in your IdP discoveryUrl, clientId, callbackUrl. Enable authz flags as needed.";
|
|
99
|
+
readonly zh: "完整示例。填入 IdP 的 discoveryUrl、clientId、callbackUrl。按需开启 authz 各项。";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export type ConfigSuggestIntent = keyof typeof INTENTS;
|
|
104
|
+
export declare function createIdentityConfigSuggestTool(): () => {
|
|
105
|
+
name: string;
|
|
106
|
+
label: string;
|
|
107
|
+
description: string;
|
|
108
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
109
|
+
intent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
110
|
+
lang: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
111
|
+
}>;
|
|
112
|
+
execute: (_toolCallId: string, params: {
|
|
113
|
+
intent?: ConfigSuggestIntent;
|
|
114
|
+
lang?: "en" | "zh";
|
|
115
|
+
}) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
|
|
116
|
+
};
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=identity-config-suggest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-config-suggest.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-config-suggest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmCH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGH,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEvD,wBAAgB,+BAA+B;;;;;;;;2BAoB5B,MAAM,UACX;QAAE,MAAM,CAAC,EAAE,mBAAmB,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE;EA2BjE"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* identity_config_suggest: generate config snippets for agent-identity plugin.
|
|
3
|
+
* Helps skill/agent assist users in configuring openclaw.json.
|
|
4
|
+
* Does not modify config; returns JSON and instructions for manual edit.
|
|
5
|
+
*/
|
|
6
|
+
import { Type } from "@sinclair/typebox";
|
|
7
|
+
import { jsonResult } from "openclaw/plugin-sdk";
|
|
8
|
+
const CONFIG_PATH = "plugins.entries.agent-identity.config";
|
|
9
|
+
/** Identity credential defaults and resolution order. Included when intent is identity or full. */
|
|
10
|
+
const IDENTITY_DEFAULTS = {
|
|
11
|
+
envVars: {
|
|
12
|
+
VOLCENGINE_ACCESS_KEY: "Access Key when accessKeyId not in config",
|
|
13
|
+
VOLCENGINE_SECRET_KEY: "Secret Key when secretAccessKey not in config",
|
|
14
|
+
VOLCENGINE_SESSION_TOKEN: "STS session token (optional)",
|
|
15
|
+
VOLCENGINE_CREDENTIALS_FILE: "Path to credential JSON; overrides default file path",
|
|
16
|
+
RUNTIME_IAM_ROLE_TRN: "Role TRN for AssumeRole when loading from credential file (fallback if file has no role_trn)",
|
|
17
|
+
},
|
|
18
|
+
defaultCredPath: "/var/run/secrets/iam/credential",
|
|
19
|
+
credentialResolutionOrder: [
|
|
20
|
+
"1. Explicit config (accessKeyId, secretAccessKey, sessionToken)",
|
|
21
|
+
"2. Environment variables (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY, VOLCENGINE_SESSION_TOKEN)",
|
|
22
|
+
"3. Credential file (credentialsFile config, or VOLCENGINE_CREDENTIALS_FILE env, or /var/run/secrets/iam/credential)",
|
|
23
|
+
],
|
|
24
|
+
identityConfigDefaults: {
|
|
25
|
+
endpoint: "https://id.cn-beijing.volcengineapi.com",
|
|
26
|
+
workloadPoolName: "default",
|
|
27
|
+
workloadName: "openclaw-agent",
|
|
28
|
+
},
|
|
29
|
+
credentialFileFormat: {
|
|
30
|
+
access_key_id: "string",
|
|
31
|
+
secret_access_key: "string",
|
|
32
|
+
session_token: "optional, for STS",
|
|
33
|
+
role_trn: "optional, for AssumeRole",
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const INTENTS = {
|
|
37
|
+
identity: {
|
|
38
|
+
label: "Identity API (AK/SK, endpoint)",
|
|
39
|
+
config: {
|
|
40
|
+
identity: {
|
|
41
|
+
endpoint: "https://id.cn-beijing.volcengineapi.com",
|
|
42
|
+
accessKeyId: "<your-access-key>",
|
|
43
|
+
secretAccessKey: "<your-secret-key>",
|
|
44
|
+
workloadPoolName: "default",
|
|
45
|
+
workloadName: "openclaw-agent",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
instructions: {
|
|
49
|
+
en: "Add under plugins.entries.agent-identity.config. Credentials can also come from env (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) or credentialsFile.",
|
|
50
|
+
zh: "添加到 plugins.entries.agent-identity.config 下。凭据也可通过环境变量 (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) 或 credentialsFile 提供。",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
userpool: {
|
|
54
|
+
label: "UserPool OIDC (login)",
|
|
55
|
+
config: {
|
|
56
|
+
userpool: {
|
|
57
|
+
discoveryUrl: "https://your-idp.com/.well-known/openid-configuration",
|
|
58
|
+
clientId: "<your-client-id>",
|
|
59
|
+
clientSecret: "<optional-for-public-clients>",
|
|
60
|
+
callbackUrl: "https://your-gateway/identity/oauth/callback",
|
|
61
|
+
scope: "openid profile email",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
instructions: {
|
|
65
|
+
en: "Required for /identity login. callbackUrl must match the URL registered with your IdP. For dynamic mode, use userPoolName + clientName instead of discoveryUrl + clientId.",
|
|
66
|
+
zh: "登录功能必需。callbackUrl 需与 IdP 中注册的回调地址一致。动态模式可使用 userPoolName + clientName 替代 discoveryUrl + clientId。",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
authz: {
|
|
70
|
+
label: "AuthZ (tool/skill permission, risk approval)",
|
|
71
|
+
config: {
|
|
72
|
+
authz: {
|
|
73
|
+
toolCheck: true,
|
|
74
|
+
skillReadCheck: false,
|
|
75
|
+
requireRiskApproval: true,
|
|
76
|
+
namespaceName: "default",
|
|
77
|
+
lowRiskBypass: true,
|
|
78
|
+
approvalTtlSeconds: 300,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
instructions: {
|
|
82
|
+
en: "toolCheck: CheckPermission for tools. skillReadCheck: CheckPermission for SKILL.md reads. requireRiskApproval: user approval for high-risk tools (exec, write). Restart gateway after config change.",
|
|
83
|
+
zh: "toolCheck: 对工具调用做 CheckPermission。skillReadCheck: 对 SKILL.md 读取做权限检查。requireRiskApproval: 高风险工具需用户审批。修改后需重启 gateway。",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
llm_risk: {
|
|
87
|
+
label: "LLM risk check (re-evaluate medium-risk)",
|
|
88
|
+
config: {
|
|
89
|
+
authz: {
|
|
90
|
+
requireRiskApproval: true,
|
|
91
|
+
enableLlmRiskCheck: true,
|
|
92
|
+
llmRiskCheck: {
|
|
93
|
+
endpoint: "http://localhost:11434",
|
|
94
|
+
api: "ollama",
|
|
95
|
+
model: "qwen3:8b",
|
|
96
|
+
timeoutMs: 10000,
|
|
97
|
+
cacheTtlMs: 300000,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
instructions: {
|
|
102
|
+
en: "When rules return medium, LLM re-evaluates. Requires requireRiskApproval. endpoint: Ollama or OpenAI-compat base URL.",
|
|
103
|
+
zh: "规则返回 medium 时由 LLM 二次评估。需同时开启 requireRiskApproval。endpoint 为 Ollama 或 OpenAI 兼容接口地址。",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
full: {
|
|
107
|
+
label: "Full example (identity + userpool + authz)",
|
|
108
|
+
config: {
|
|
109
|
+
identity: {
|
|
110
|
+
endpoint: "https://id.cn-beijing.volcengineapi.com",
|
|
111
|
+
workloadPoolName: "default",
|
|
112
|
+
workloadName: "openclaw-agent",
|
|
113
|
+
},
|
|
114
|
+
userpool: {
|
|
115
|
+
discoveryUrl: "https://your-idp.com/.well-known/openid-configuration",
|
|
116
|
+
clientId: "<your-client-id>",
|
|
117
|
+
callbackUrl: "https://your-gateway/identity/oauth/callback",
|
|
118
|
+
scope: "openid profile email",
|
|
119
|
+
},
|
|
120
|
+
authz: {
|
|
121
|
+
toolCheck: false,
|
|
122
|
+
skillReadCheck: false,
|
|
123
|
+
requireRiskApproval: false,
|
|
124
|
+
lowRiskBypass: true,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
instructions: {
|
|
128
|
+
en: "Minimal full config. Fill in your IdP discoveryUrl, clientId, callbackUrl. Enable authz flags as needed.",
|
|
129
|
+
zh: "完整示例。填入 IdP 的 discoveryUrl、clientId、callbackUrl。按需开启 authz 各项。",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
export function createIdentityConfigSuggestTool() {
|
|
134
|
+
return () => ({
|
|
135
|
+
name: "identity_config_suggest",
|
|
136
|
+
label: "Identity Config Suggest",
|
|
137
|
+
description: "Generate config snippets for agent-identity plugin. Use when user asks to configure identity, login, authz, or risk approval. Returns JSON to add to openclaw.json under plugins.entries.agent-identity.config.",
|
|
138
|
+
parameters: Type.Object({
|
|
139
|
+
intent: Type.Optional(Type.String({
|
|
140
|
+
description: "Config intent: identity (AK/SK), userpool (OIDC login), authz (permission/approval), llm_risk (LLM re-eval), full (all). Default: full",
|
|
141
|
+
})),
|
|
142
|
+
lang: Type.Optional(Type.String({
|
|
143
|
+
description: "Instruction language: en or zh. Default: en",
|
|
144
|
+
})),
|
|
145
|
+
}),
|
|
146
|
+
execute: async (_toolCallId, params) => {
|
|
147
|
+
const intent = (params?.intent ?? "full");
|
|
148
|
+
const lang = params?.lang ?? "en";
|
|
149
|
+
const entry = INTENTS[intent] ?? INTENTS.full;
|
|
150
|
+
const includeIdentityDefaults = intent === "identity" || intent === "full";
|
|
151
|
+
const result = {
|
|
152
|
+
configPath: CONFIG_PATH,
|
|
153
|
+
intent,
|
|
154
|
+
label: entry.label,
|
|
155
|
+
config: entry.config,
|
|
156
|
+
instructions: entry.instructions[lang],
|
|
157
|
+
nextSteps: lang === "zh"
|
|
158
|
+
? "将上述 config 合并到 openclaw.json 的对应路径下,保存后重启 gateway。"
|
|
159
|
+
: "Merge the config above into openclaw.json at the given path, save, and restart the gateway.",
|
|
160
|
+
};
|
|
161
|
+
if (includeIdentityDefaults) {
|
|
162
|
+
result.identityDefaults = IDENTITY_DEFAULTS;
|
|
163
|
+
}
|
|
164
|
+
return jsonResult(result);
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "agent-identity",
|
|
3
3
|
"name": "Agent Identity",
|
|
4
|
-
"description": "UserPool (用户池) login, TIP token (工作负载令牌 GetWorkloadAccessTokenForJWT), credential 3LO (凭据托管), session management. Integrates with Volcengine 智能体身份和权限管理平台. Credentials from config, env, or file; STS AssumeRole supported.",
|
|
4
|
+
"description": "UserPool (用户池) login, TIP token (工作负载令牌 GetWorkloadAccessTokenForJWT), credential 3LO (凭据托管), session management, optional tool/skill permission control (CheckPermission) and risk approval. Integrates with Volcengine 智能体身份和权限管理平台. Credentials from config, env, or file; STS AssumeRole supported.",
|
|
5
5
|
"skills": ["./skills"],
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m1a0rz/agent-identity",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Agent Identity: UserPool (用户池) login, TIP token (工作负载令牌), credential hosting (凭据托管 OAuth2/API key), optional tool risk approval. Integrates with Volcengine 智能体身份和权限管理平台.",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Agent Identity: UserPool (用户池) login, TIP token (工作负载令牌), credential hosting (凭据托管 OAuth2/API key), optional tool/skill permission control (CheckPermission) and risk approval. Integrates with Volcengine 智能体身份和权限管理平台.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
package/skills/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: identity
|
|
3
3
|
description: |
|
|
4
|
-
UserPool login, TIP token, credential hosting, and tool risk approval. Activate when user needs to check identity (whoami/status), log in, list/add credentials, manage env bindings, or diagnose/approve risky tool calls.
|
|
5
|
-
Also activates for: 用户说登录、查身份、获取凭据、添加/配置API
|
|
4
|
+
UserPool login, TIP token, credential hosting, and tool risk approval. Activate when user needs to check identity (whoami/status), log in, list/add credentials, manage env bindings, configure the plugin, or diagnose/approve risky tool calls.
|
|
5
|
+
Also activates for: 用户说登录、查身份、获取凭据、添加/配置API密钥、绑定环境变量、配置插件、审批工具调用、风险检查.
|
|
6
6
|
metadata:
|
|
7
7
|
{
|
|
8
8
|
"openclaw":
|
|
@@ -53,6 +53,7 @@ Use the agent-identity plugin for UserPool OIDC login (入站授权), TIP token
|
|
|
53
53
|
| `identity_list_credentials` | `page?` | List providers and credentials (paginated) |
|
|
54
54
|
| `identity_list_tips` | — | List valid TIP tokens and bindings |
|
|
55
55
|
| `identity_config` | — | Show plugin config (secrets redacted) |
|
|
56
|
+
| `identity_config_suggest` | `intent?`, `lang?` | Generate config snippets for openclaw.json |
|
|
56
57
|
| `identity_fetch` | `provider`, `flow?`, `redirectUrl?`, `scopes?` | Add credential |
|
|
57
58
|
| `identity_set_binding` | `provider`, `envVar` | Bind provider → env var for tool injection |
|
|
58
59
|
| `identity_unset_binding` | `provider` | Remove env binding |
|
|
@@ -204,6 +205,21 @@ Returns built-in dangerous command patterns and sensitive paths. No params. Use
|
|
|
204
205
|
{}
|
|
205
206
|
```
|
|
206
207
|
|
|
208
|
+
### identity_config_suggest
|
|
209
|
+
|
|
210
|
+
Generates config snippets for the agent-identity plugin. **Call when:** user asks to configure identity, login, authz, risk approval, or "如何配置 identity 插件", "帮我配置登录", "怎么开启权限检查".
|
|
211
|
+
|
|
212
|
+
| Param | Type | Required | Description |
|
|
213
|
+
| ------- | ------ | -------- | --------------------------------------------------------------------------- |
|
|
214
|
+
| `intent`| string | No | `identity` (AK/SK), `userpool` (OIDC login), `authz` (permission/approval), `llm_risk` (LLM re-eval), `full` (all). Default: full |
|
|
215
|
+
| `lang` | string | No | `en` or `zh` for instructions. Default: en |
|
|
216
|
+
|
|
217
|
+
Returns: `configPath`, `config` (JSON to merge), `instructions`, `nextSteps`. When `intent` is `identity` or `full`, also returns `identityDefaults` (env vars, credential resolution order, config defaults, credential file format). User must manually add to openclaw.json and restart gateway.
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{ "intent": "userpool", "lang": "zh" }
|
|
221
|
+
```
|
|
222
|
+
|
|
207
223
|
## Workflow: Adding a Credential
|
|
208
224
|
|
|
209
225
|
1. **Check login**: `identity_whoami` (brief) or `identity_status` (full). If not logged in, use `identity_login` first (user opens auth URL).
|