@m1a0rz/agent-identity 0.4.0 → 0.4.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.
Files changed (127) hide show
  1. package/README-cn.md +34 -0
  2. package/README.md +34 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +91 -6
  5. package/dist/scripts/demo-get-session.d.ts +15 -0
  6. package/dist/scripts/demo-get-session.d.ts.map +1 -0
  7. package/dist/scripts/demo-get-session.js +58 -0
  8. package/dist/src/actions/identity-actions.d.ts +74 -8
  9. package/dist/src/actions/identity-actions.d.ts.map +1 -1
  10. package/dist/src/actions/identity-actions.js +209 -83
  11. package/dist/src/commands/identity-commands.d.ts.map +1 -1
  12. package/dist/src/commands/identity-commands.js +139 -11
  13. package/dist/src/gateway/identity-session-methods.d.ts +67 -0
  14. package/dist/src/gateway/identity-session-methods.d.ts.map +1 -0
  15. package/dist/src/gateway/identity-session-methods.js +134 -0
  16. package/dist/src/hooks/after-tool-call.d.ts.map +1 -1
  17. package/dist/src/hooks/after-tool-call.js +12 -0
  18. package/dist/src/hooks/before-agent-start.d.ts +2 -0
  19. package/dist/src/hooks/before-agent-start.d.ts.map +1 -1
  20. package/dist/src/hooks/before-agent-start.js +33 -6
  21. package/dist/src/hooks/before-tool-call.d.ts +1 -0
  22. package/dist/src/hooks/before-tool-call.d.ts.map +1 -1
  23. package/dist/src/hooks/before-tool-call.js +29 -5
  24. package/dist/src/hooks/llm-input.d.ts.map +1 -1
  25. package/dist/src/hooks/llm-input.js +32 -4
  26. package/dist/src/hooks/sessions-send-propagation.d.ts.map +1 -1
  27. package/dist/src/hooks/sessions-send-propagation.js +1 -0
  28. package/dist/src/hooks/sessions-spawn-propagation.d.ts.map +1 -1
  29. package/dist/src/hooks/sessions-spawn-propagation.js +1 -0
  30. package/dist/src/hooks/tool-result-persist.d.ts +20 -0
  31. package/dist/src/hooks/tool-result-persist.d.ts.map +1 -0
  32. package/dist/src/hooks/tool-result-persist.js +50 -0
  33. package/dist/src/preflight/plugin-preflight.d.ts +55 -0
  34. package/dist/src/preflight/plugin-preflight.d.ts.map +1 -0
  35. package/dist/src/preflight/plugin-preflight.js +226 -0
  36. package/dist/src/preflight/plugin-state.d.ts +18 -0
  37. package/dist/src/preflight/plugin-state.d.ts.map +1 -0
  38. package/dist/src/preflight/plugin-state.js +19 -0
  39. package/dist/src/routes/oidc-login.js +2 -2
  40. package/dist/src/services/identity-client.d.ts +106 -1
  41. package/dist/src/services/identity-client.d.ts.map +1 -1
  42. package/dist/src/services/identity-client.js +123 -1
  43. package/dist/src/services/identity-credentials.d.ts +1 -1
  44. package/dist/src/services/identity-credentials.d.ts.map +1 -1
  45. package/dist/src/services/identity-credentials.js +32 -16
  46. package/dist/src/services/oidc-client.d.ts +12 -1
  47. package/dist/src/services/oidc-client.d.ts.map +1 -1
  48. package/dist/src/services/oidc-client.js +20 -3
  49. package/dist/src/services/session-refresh.d.ts +10 -0
  50. package/dist/src/services/session-refresh.d.ts.map +1 -1
  51. package/dist/src/services/session-refresh.js +29 -5
  52. package/dist/src/services/skill-contract-metadata.d.ts +35 -0
  53. package/dist/src/services/skill-contract-metadata.d.ts.map +1 -0
  54. package/dist/src/services/skill-contract-metadata.js +145 -0
  55. package/dist/src/services/skill-contract-renderer.d.ts +14 -0
  56. package/dist/src/services/skill-contract-renderer.d.ts.map +1 -0
  57. package/dist/src/services/skill-contract-renderer.js +120 -0
  58. package/dist/src/services/tip-propagation.d.ts +2 -0
  59. package/dist/src/services/tip-propagation.d.ts.map +1 -1
  60. package/dist/src/services/tip-propagation.js +4 -3
  61. package/dist/src/services/tip-with-refresh.d.ts +1 -1
  62. package/dist/src/services/tip-with-refresh.d.ts.map +1 -1
  63. package/dist/src/services/tip-with-refresh.js +24 -39
  64. package/dist/src/store/credential-store.d.ts +6 -1
  65. package/dist/src/store/credential-store.d.ts.map +1 -1
  66. package/dist/src/store/credential-store.js +3 -0
  67. package/dist/src/store/oidc-state-store.d.ts +3 -3
  68. package/dist/src/store/oidc-state-store.d.ts.map +1 -1
  69. package/dist/src/store/oidc-state-store.js +2 -2
  70. package/dist/src/store/sender-session-store.d.ts +8 -0
  71. package/dist/src/store/sender-session-store.d.ts.map +1 -1
  72. package/dist/src/store/sender-session-store.js +46 -11
  73. package/dist/src/store/skill-contract-store.d.ts +19 -0
  74. package/dist/src/store/skill-contract-store.d.ts.map +1 -0
  75. package/dist/src/store/skill-contract-store.js +65 -0
  76. package/dist/src/store/skill-path-store.d.ts +5 -0
  77. package/dist/src/store/skill-path-store.d.ts.map +1 -1
  78. package/dist/src/store/skill-path-store.js +13 -1
  79. package/dist/src/tools/identity-approve-tool.d.ts +2 -11
  80. package/dist/src/tools/identity-approve-tool.d.ts.map +1 -1
  81. package/dist/src/tools/identity-config-suggest.d.ts +2 -13
  82. package/dist/src/tools/identity-config-suggest.d.ts.map +1 -1
  83. package/dist/src/tools/identity-config.d.ts +2 -7
  84. package/dist/src/tools/identity-config.d.ts.map +1 -1
  85. package/dist/src/tools/identity-fetch.d.ts +2 -13
  86. package/dist/src/tools/identity-fetch.d.ts.map +1 -1
  87. package/dist/src/tools/identity-fetch.js +3 -3
  88. package/dist/src/tools/identity-get-role-credentials.d.ts +10 -0
  89. package/dist/src/tools/identity-get-role-credentials.d.ts.map +1 -0
  90. package/dist/src/tools/identity-get-role-credentials.js +56 -0
  91. package/dist/src/tools/identity-get-session-token.d.ts +8 -0
  92. package/dist/src/tools/identity-get-session-token.d.ts.map +1 -0
  93. package/dist/src/tools/identity-get-session-token.js +46 -0
  94. package/dist/src/tools/identity-get-tip-token.d.ts +8 -0
  95. package/dist/src/tools/identity-get-tip-token.d.ts.map +1 -0
  96. package/dist/src/tools/identity-get-tip-token.js +46 -0
  97. package/dist/src/tools/identity-list-credentials.d.ts +2 -11
  98. package/dist/src/tools/identity-list-credentials.d.ts.map +1 -1
  99. package/dist/src/tools/identity-list-credentials.js +4 -3
  100. package/dist/src/tools/identity-list-risk-patterns.d.ts +2 -7
  101. package/dist/src/tools/identity-list-risk-patterns.d.ts.map +1 -1
  102. package/dist/src/tools/identity-list-roles.d.ts +8 -0
  103. package/dist/src/tools/identity-list-roles.d.ts.map +1 -0
  104. package/dist/src/tools/identity-list-roles.js +43 -0
  105. package/dist/src/tools/identity-list-tips.d.ts +2 -7
  106. package/dist/src/tools/identity-list-tips.d.ts.map +1 -1
  107. package/dist/src/tools/identity-login.d.ts +2 -7
  108. package/dist/src/tools/identity-login.d.ts.map +1 -1
  109. package/dist/src/tools/identity-logout.d.ts +2 -7
  110. package/dist/src/tools/identity-logout.d.ts.map +1 -1
  111. package/dist/src/tools/identity-risk-check.d.ts +3 -17
  112. package/dist/src/tools/identity-risk-check.d.ts.map +1 -1
  113. package/dist/src/tools/identity-set-binding.d.ts +2 -10
  114. package/dist/src/tools/identity-set-binding.d.ts.map +1 -1
  115. package/dist/src/tools/identity-status.d.ts +2 -7
  116. package/dist/src/tools/identity-status.d.ts.map +1 -1
  117. package/dist/src/tools/identity-unset-binding.d.ts +2 -9
  118. package/dist/src/tools/identity-unset-binding.d.ts.map +1 -1
  119. package/dist/src/tools/identity-whoami.d.ts +2 -7
  120. package/dist/src/tools/identity-whoami.d.ts.map +1 -1
  121. package/dist/src/types.d.ts +21 -0
  122. package/dist/src/types.d.ts.map +1 -1
  123. package/dist/src/utils/derive-session-key.d.ts +11 -1
  124. package/dist/src/utils/derive-session-key.d.ts.map +1 -1
  125. package/dist/src/utils/derive-session-key.js +46 -6
  126. package/openclaw.plugin.json +18 -0
  127. package/package.json +33 -7
@@ -1,3 +1,4 @@
1
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
1
2
  declare const INTENTS: {
2
3
  readonly identity: {
3
4
  readonly label: "Identity API (AK/SK, endpoint)";
@@ -96,18 +97,6 @@ declare const INTENTS: {
96
97
  };
97
98
  };
98
99
  export type ConfigSuggestIntent = keyof typeof INTENTS;
99
- export declare function createIdentityConfigSuggestTool(): () => {
100
- name: string;
101
- label: string;
102
- description: string;
103
- parameters: import("@sinclair/typebox").TObject<{
104
- intent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
105
- lang: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
106
- }>;
107
- execute: (_toolCallId: string, params: {
108
- intent?: ConfigSuggestIntent;
109
- lang?: "en" | "zh";
110
- }) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
111
- };
100
+ export declare function createIdentityConfigSuggestTool(): () => AnyAgentTool;
112
101
  export {};
113
102
  //# sourceMappingURL=identity-config-suggest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-config-suggest.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-config-suggest.ts"],"names":[],"mappings":"AAwDA,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"}
1
+ {"version":3,"file":"identity-config-suggest.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-config-suggest.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAiC/D,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGH,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEvD,wBAAgB,+BAA+B,UAClC,YAAY,CA+CxB"}
@@ -2,12 +2,7 @@
2
2
  * identity_config: show identity plugin configuration (redacted).
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityConfigTool(deps: IdentityActionsDeps): (_ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
7
+ export declare function createIdentityConfigTool(deps: IdentityActionsDeps): (_ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-config.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-config.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,MAAM,iBAAiB;;;;;;EAUhC"}
1
+ {"version":3,"file":"identity-config.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-config.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,MAAM,iBAAiB,KAAG,YAAY,CAU/C"}
@@ -4,18 +4,7 @@
4
4
  * When returnValue is true and fetch succeeds, returns the credential value for same-turn automation.
5
5
  */
6
6
  import type { PluginToolContext } from "../types.js";
7
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
7
8
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
8
- export declare function createIdentityFetchTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
9
- name: string;
10
- label: string;
11
- description: string;
12
- parameters: import("@sinclair/typebox").TObject<{
13
- provider: import("@sinclair/typebox").TString;
14
- flow: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"oauth2-user" | "oauth2-m2m" | "apikey">>;
15
- redirectUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
16
- scopes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
17
- returnValue: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
18
- }>;
19
- execute: (_toolCallId: any, params: any) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
20
- };
9
+ export declare function createIdentityFetchTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
21
10
  //# sourceMappingURL=identity-fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-fetch.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-fetch.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAO1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,IACvD,KAAK,iBAAiB;;;;;;;;;;;;EA8D/B"}
1
+ {"version":3,"file":"identity-fetch.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-fetch.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAO1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,IACvD,KAAK,iBAAiB,KAAG,YAAY,CA8D9C"}
@@ -19,16 +19,16 @@ import { jsonResult } from "openclaw/plugin-sdk";
19
19
  import { runFetch } from "../actions/identity-actions.js";
20
20
  import { getCredential, resolveCredentialValue } from "../store/credential-store.js";
21
21
  import { resolveEffectiveSessionKey } from "../store/sender-session-store.js";
22
- const FETCH_FLOWS = ["oauth2-user", "oauth2-m2m", "apikey"];
22
+ const FETCH_FLOWS = ["oauth2-user", "oauth2-m2m", "apikey", "user"];
23
23
  export function createIdentityFetchTool(deps) {
24
24
  return (ctx) => ({
25
25
  name: "identity_fetch",
26
26
  label: "Identity Fetch Credential",
27
- description: "Add credential for a provider. OAuth2-user returns auth URL to open; apikey/oauth2-m2m complete immediately. Set returnValue=true to receive the credential value for same-turn automation (use with care: value may appear in logs).",
27
+ description: "Add credential for a provider. OAuth2-user returns auth URL to open; apikey/oauth2-m2m/user complete immediately. Set returnValue=true to receive the credential value for same-turn automation (use with care: value may appear in logs).",
28
28
  parameters: Type.Object({
29
29
  provider: Type.String({ description: "Provider name (e.g. google, openai)" }),
30
30
  flow: Type.Optional(optionalStringEnum(FETCH_FLOWS, {
31
- description: "oauth2-user (default for 3LO), oauth2-m2m, apikey",
31
+ description: "oauth2-user (default for 3LO), oauth2-m2m, apikey, user",
32
32
  })),
33
33
  redirectUrl: Type.Optional(Type.String()),
34
34
  scopes: Type.Optional(Type.Array(Type.String())),
@@ -0,0 +1,10 @@
1
+ /**
2
+ * identity_get_role_credentials: obtain STS temporary credentials via a role credential provider.
3
+ * Skills that need IAM Role access call this tool to get AK/SK/SessionToken,
4
+ * then use them for downstream API requests.
5
+ */
6
+ import type { PluginToolContext } from "../types.js";
7
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
8
+ import type { IdentityActionsDeps } from "../actions/identity-actions.js";
9
+ export declare function createIdentityGetRoleCredentialsTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
10
+ //# sourceMappingURL=identity-get-role-credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-get-role-credentials.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-get-role-credentials.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,mBAAmB,IACpE,KAAK,iBAAiB,KAAG,YAAY,CAsC9C"}
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Type } from "@sinclair/typebox";
17
+ import { jsonResult } from "openclaw/plugin-sdk";
18
+ import { runGetRoleCredentials } from "../actions/identity-actions.js";
19
+ import { resolveEffectiveSessionKey } from "../store/sender-session-store.js";
20
+ export function createIdentityGetRoleCredentialsTool(deps) {
21
+ return (ctx) => ({
22
+ name: "identity_get_role_credentials",
23
+ label: "Identity Get Role Credentials",
24
+ description: "Obtain temporary STS credentials (AccessKeyId, SecretAccessKey, SessionToken) " +
25
+ "via a role credential provider. Use when a skill or tool needs IAM Role access " +
26
+ "to call cloud APIs. By default uses the user session token (id_token); " +
27
+ "set useTip=true to use the TIP token instead.",
28
+ parameters: Type.Object({
29
+ providerName: Type.String({
30
+ description: "Role credential provider name configured in the control plane.",
31
+ }),
32
+ useTip: Type.Optional(Type.Boolean({
33
+ description: "When true, use TIP token as identity token instead of user session token. Default false.",
34
+ })),
35
+ }),
36
+ execute: async (_toolCallId, params) => {
37
+ const sessionKey = ctx.sessionKey ? resolveEffectiveSessionKey(ctx.sessionKey) : undefined;
38
+ if (!sessionKey) {
39
+ return jsonResult({ error: "No session context", success: false });
40
+ }
41
+ const p = params;
42
+ const result = await runGetRoleCredentials(deps, sessionKey, {
43
+ providerName: p.providerName,
44
+ useTip: p.useTip ?? false,
45
+ config: ctx.config,
46
+ });
47
+ if (result.kind === "error") {
48
+ return jsonResult({ success: false, error: result.message });
49
+ }
50
+ return jsonResult({
51
+ success: true,
52
+ credentials: result.credentials,
53
+ });
54
+ },
55
+ });
56
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * identity_get_session_token: obtain the OIDC id_token (session / user token) for the current session.
3
+ */
4
+ import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
6
+ import type { IdentityActionsDeps } from "../actions/identity-actions.js";
7
+ export declare function createIdentityGetSessionTokenTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
8
+ //# sourceMappingURL=identity-get-session-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-get-session-token.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-get-session-token.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,mBAAmB,IACjE,KAAK,iBAAiB,KAAG,YAAY,CA0B9C"}
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Type } from "@sinclair/typebox";
17
+ import { jsonResult } from "openclaw/plugin-sdk";
18
+ import { runGetSessionToken } from "../actions/identity-actions.js";
19
+ import { resolveEffectiveSessionKey } from "../store/sender-session-store.js";
20
+ export function createIdentityGetSessionTokenTool(deps) {
21
+ return (ctx) => ({
22
+ name: "identity_get_session_token",
23
+ label: "Identity Get Session Token",
24
+ description: "Obtain the OIDC id_token stored for this session (UserPool / session identity token). " +
25
+ "Use when a skill needs the end-user JWT instead of the TIP workload token. " +
26
+ "The value is sensitive; do not print it in chat.",
27
+ parameters: Type.Object({}),
28
+ execute: async () => {
29
+ const sessionKey = ctx.sessionKey ? resolveEffectiveSessionKey(ctx.sessionKey) : undefined;
30
+ if (!sessionKey) {
31
+ return jsonResult({ success: false, error: "No session context" });
32
+ }
33
+ const result = await runGetSessionToken(deps, sessionKey);
34
+ if (result.kind === "error") {
35
+ return jsonResult({ success: false, error: result.message });
36
+ }
37
+ return jsonResult({
38
+ success: true,
39
+ sessionIdToken: result.sessionIdToken,
40
+ sub: result.sub,
41
+ loginAt: result.loginAt,
42
+ expiresAt: result.expiresAt,
43
+ });
44
+ },
45
+ });
46
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * identity_get_tip_token: obtain the workload TIP JWT for the current session.
3
+ */
4
+ import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
6
+ import type { IdentityActionsDeps } from "../actions/identity-actions.js";
7
+ export declare function createIdentityGetTipTokenTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
8
+ //# sourceMappingURL=identity-get-tip-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-get-tip-token.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-get-tip-token.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,mBAAmB,IAC7D,KAAK,iBAAiB,KAAG,YAAY,CA0B9C"}
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Type } from "@sinclair/typebox";
17
+ import { jsonResult } from "openclaw/plugin-sdk";
18
+ import { runGetTipToken } from "../actions/identity-actions.js";
19
+ import { resolveEffectiveSessionKey } from "../store/sender-session-store.js";
20
+ export function createIdentityGetTipTokenTool(deps) {
21
+ return (ctx) => ({
22
+ name: "identity_get_tip_token",
23
+ label: "Identity Get TIP Token",
24
+ description: "Obtain the Trusted Identity Provider (TIP) JWT for this session. " +
25
+ "Use when a skill needs the workload token for downstream APIs. " +
26
+ "The value is sensitive; do not print it in chat.",
27
+ parameters: Type.Object({}),
28
+ execute: async () => {
29
+ const sessionKey = ctx.sessionKey ? resolveEffectiveSessionKey(ctx.sessionKey) : undefined;
30
+ if (!sessionKey) {
31
+ return jsonResult({ success: false, error: "No session context" });
32
+ }
33
+ const result = await runGetTipToken(deps, sessionKey, ctx.config);
34
+ if (result.kind === "error") {
35
+ return jsonResult({ success: false, error: result.message });
36
+ }
37
+ return jsonResult({
38
+ success: true,
39
+ tipToken: result.tipToken,
40
+ sub: result.sub,
41
+ issuedAt: result.issuedAt,
42
+ expiresAt: result.expiresAt,
43
+ });
44
+ },
45
+ });
46
+ }
@@ -2,16 +2,7 @@
2
2
  * identity_list_credentials: list credential providers and stored credentials (paginated).
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityListCredentialsTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{
11
- page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
12
- name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
13
- flow: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
14
- }>;
15
- execute: (_toolCallId: any, params: any) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
16
- };
7
+ export declare function createIdentityListCredentialsTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
17
8
  //# sourceMappingURL=identity-list-credentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-list-credentials.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-credentials.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,mBAAmB,IACjE,KAAK,iBAAiB;;;;;;;;;;EAyB/B"}
1
+ {"version":3,"file":"identity-list-credentials.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-credentials.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,mBAAmB,IACjE,KAAK,iBAAiB,KAAG,YAAY,CA0B9C"}
@@ -21,19 +21,20 @@ export function createIdentityListCredentialsTool(deps) {
21
21
  return (ctx) => ({
22
22
  name: "identity_list_credentials",
23
23
  label: "Identity List Credentials",
24
- description: "List credential providers and stored credentials. Supports filtering by name or flow to locate a specific provider without paging through all results.",
24
+ description: "List credential providers (OAuth/API key) and stored credentials. Use identity_list_roles for role credential providers (STS).",
25
25
  parameters: Type.Object({
26
26
  page: Type.Optional(Type.Number({ minimum: 1, default: 1 })),
27
27
  name: Type.Optional(Type.String({ description: "Filter providers by name (exact or prefix match)." })),
28
28
  flow: Type.Optional(Type.String({ description: "Filter providers by flow, e.g. 'M2M' or 'USER_FEDERATION'." })),
29
+ type: Type.Optional(Type.String({ description: "Filter credential providers by type, e.g. 'api_key' or 'oauth2'." })),
29
30
  }),
30
31
  execute: async (_toolCallId, params) => {
31
32
  const sessionKey = ctx.sessionKey ? resolveEffectiveSessionKey(ctx.sessionKey) : undefined;
32
33
  if (!sessionKey) {
33
34
  return jsonResult({ error: "No session context", providers: [], storedOnly: [] });
34
35
  }
35
- const { page, name, flow } = params;
36
- const filter = name || flow ? { name, flow } : undefined;
36
+ const { page, name, flow, type } = params;
37
+ const filter = name || flow || type ? { name, flow, type } : undefined;
37
38
  const result = await runListCredentials(deps, sessionKey, page ?? 1, filter);
38
39
  return jsonResult({
39
40
  providers: result.providers,
@@ -3,11 +3,6 @@
3
3
  * Use to understand what the plugin considers high-risk before running commands.
4
4
  */
5
5
  import type { PluginToolContext } from "../types.js";
6
- export declare function createIdentityListRiskPatternsTool(): (_ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
6
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
7
+ export declare function createIdentityListRiskPatternsTool(): (_ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-list-risk-patterns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-list-risk-patterns.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-risk-patterns.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD,wBAAgB,kCAAkC,KACxC,MAAM,iBAAiB;;;;;;EAehC"}
1
+ {"version":3,"file":"identity-list-risk-patterns.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-risk-patterns.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAG/D,wBAAgB,kCAAkC,KACxC,MAAM,iBAAiB,KAAG,YAAY,CAe/C"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * identity_list_roles: list role credential providers (STS).
3
+ */
4
+ import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
6
+ import type { IdentityActionsDeps } from "../actions/identity-actions.js";
7
+ export declare function createIdentityListRolesTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
8
+ //# sourceMappingURL=identity-list-roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-list-roles.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-roles.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,mBAAmB,IAC3D,KAAK,iBAAiB,KAAG,YAAY,CAsB9C"}
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Type } from "@sinclair/typebox";
17
+ import { jsonResult } from "openclaw/plugin-sdk";
18
+ import { runListRoleCredentials } from "../actions/identity-actions.js";
19
+ import { resolveEffectiveSessionKey } from "../store/sender-session-store.js";
20
+ export function createIdentityListRolesTool(deps) {
21
+ return (ctx) => ({
22
+ name: "identity_list_roles",
23
+ label: "Identity List Roles",
24
+ description: "List role credential providers (STS). Use identity_get_role_credentials to obtain credentials for a provider.",
25
+ parameters: Type.Object({
26
+ name: Type.Optional(Type.String({ description: "Filter providers by name (prefix match)." })),
27
+ }),
28
+ execute: async (_toolCallId, params) => {
29
+ const sessionKey = ctx.sessionKey ? resolveEffectiveSessionKey(ctx.sessionKey) : undefined;
30
+ if (!sessionKey) {
31
+ return jsonResult({ error: "No session context", providers: [] });
32
+ }
33
+ const { name } = params;
34
+ const filter = name ? { name } : undefined;
35
+ const result = await runListRoleCredentials(deps, sessionKey, filter);
36
+ return jsonResult({
37
+ providers: result.providers,
38
+ page: result.page,
39
+ hasMore: result.hasMore,
40
+ });
41
+ },
42
+ });
43
+ }
@@ -2,12 +2,7 @@
2
2
  * identity_list_tips: list valid TIP tokens and env bindings.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityListTipsTool(deps: IdentityActionsDeps): (_ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
7
+ export declare function createIdentityListTipsTool(deps: IdentityActionsDeps): (_ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-list-tips.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-list-tips.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-tips.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,mBAAmB,IAC1D,MAAM,iBAAiB;;;;;;EAahC"}
1
+ {"version":3,"file":"identity-list-tips.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-list-tips.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,mBAAmB,IAC1D,MAAM,iBAAiB,KAAG,YAAY,CAa/C"}
@@ -3,12 +3,7 @@
3
3
  * Returns auth URL when login needed; tools don't have deliveryTarget so callback falls back to sessionKey.
4
4
  */
5
5
  import type { PluginToolContext } from "../types.js";
6
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
6
7
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
7
- export declare function createIdentityLoginTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
8
- name: string;
9
- label: string;
10
- description: string;
11
- parameters: import("@sinclair/typebox").TObject<{}>;
12
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
13
- };
8
+ export declare function createIdentityLoginTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
14
9
  //# sourceMappingURL=identity-login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-login.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-login.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,IACvD,KAAK,iBAAiB;;;;;;EAiC/B"}
1
+ {"version":3,"file":"identity-login.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-login.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,IACvD,KAAK,iBAAiB,KAAG,YAAY,CAiC9C"}
@@ -2,12 +2,7 @@
2
2
  * identity_logout: clear session and TIP for the caller's session.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityLogoutTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
7
+ export declare function createIdentityLogoutTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-logout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-logout.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-logout.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,KAAK,iBAAiB;;;;;;EAgB/B"}
1
+ {"version":3,"file":"identity-logout.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-logout.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,KAAK,iBAAiB,KAAG,YAAY,CAgB9C"}
@@ -2,8 +2,8 @@
2
2
  * identity_risk_check: diagnose risk for a command or tool call without executing.
3
3
  * Use before running exec/write to see if it would require approval.
4
4
  */
5
- import type { PluginToolContext } from "../types.js";
6
- import type { PluginConfig } from "../types.js";
5
+ import type { PluginToolContext, PluginConfig } from "../types.js";
6
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
7
7
  export type IdentityRiskCheckDeps = {
8
8
  pluginConfig: PluginConfig;
9
9
  logger?: {
@@ -11,19 +11,5 @@ export type IdentityRiskCheckDeps = {
11
11
  warn?: (msg: string) => void;
12
12
  };
13
13
  };
14
- export declare function createIdentityRiskCheckTool(deps: IdentityRiskCheckDeps): (_ctx: PluginToolContext) => {
15
- name: string;
16
- label: string;
17
- description: string;
18
- parameters: import("@sinclair/typebox").TObject<{
19
- command: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
- toolName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
21
- params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
22
- }>;
23
- execute: (_toolCallId: string, params: {
24
- command?: string;
25
- toolName?: string;
26
- params?: Record<string, unknown>;
27
- }) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
28
- };
14
+ export declare function createIdentityRiskCheckTool(deps: IdentityRiskCheckDeps): (_ctx: PluginToolContext) => AnyAgentTool;
29
15
  //# sourceMappingURL=identity-risk-check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-risk-check.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-risk-check.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC1E,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,qBAAqB,IAC7D,MAAM,iBAAiB;;;;;;;;;2BAuBd,MAAM,UACX;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;EAuCtF"}
1
+ {"version":3,"file":"identity-risk-check.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-risk-check.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAG/D,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC1E,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,qBAAqB,IAC7D,MAAM,iBAAiB,KAAG,YAAY,CA+D/C"}
@@ -2,15 +2,7 @@
2
2
  * identity_set_binding: bind a credential provider to an env var for tool injection.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentitySetBindingTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{
11
- provider: import("@sinclair/typebox").TString;
12
- envVar: import("@sinclair/typebox").TString;
13
- }>;
14
- execute: (_toolCallId: any, params: any) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
15
- };
7
+ export declare function createIdentitySetBindingTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
16
8
  //# sourceMappingURL=identity-set-binding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-set-binding.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-set-binding.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,mBAAmB,IAC5D,KAAK,iBAAiB;;;;;;;;;EAwB/B"}
1
+ {"version":3,"file":"identity-set-binding.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-set-binding.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,mBAAmB,IAC5D,KAAK,iBAAiB,KAAG,YAAY,CAwB9C"}
@@ -2,12 +2,7 @@
2
2
  * identity_status: return login status, credentials, and env bindings for the caller's session.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityStatusTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
7
+ export declare function createIdentityStatusTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-status.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-status.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,KAAK,iBAAiB;;;;;;EAiC/B"}
1
+ {"version":3,"file":"identity-status.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-status.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,IACxD,KAAK,iBAAiB,KAAG,YAAY,CAiC9C"}
@@ -2,14 +2,7 @@
2
2
  * identity_unset_binding: remove credential env binding.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityUnsetBindingTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{
11
- provider: import("@sinclair/typebox").TString;
12
- }>;
13
- execute: (_toolCallId: any, params: any) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
14
- };
7
+ export declare function createIdentityUnsetBindingTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
15
8
  //# sourceMappingURL=identity-unset-binding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-unset-binding.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-unset-binding.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,mBAAmB,IAC9D,KAAK,iBAAiB;;;;;;;;EAiB/B"}
1
+ {"version":3,"file":"identity-unset-binding.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-unset-binding.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,mBAAmB,IAC9D,KAAK,iBAAiB,KAAG,YAAY,CAiB9C"}
@@ -2,12 +2,7 @@
2
2
  * identity_whoami: return current session identity (sub, TIP status) for the caller's session.
3
3
  */
4
4
  import type { PluginToolContext } from "../types.js";
5
+ import { AnyAgentTool } from "openclaw/plugin-sdk";
5
6
  import type { IdentityActionsDeps } from "../actions/identity-actions.js";
6
- export declare function createIdentityWhoamiTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => {
7
- name: string;
8
- label: string;
9
- description: string;
10
- parameters: import("@sinclair/typebox").TObject<{}>;
11
- execute: () => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<unknown>>;
12
- };
7
+ export declare function createIdentityWhoamiTool(deps: IdentityActionsDeps): (ctx: PluginToolContext) => AnyAgentTool;
13
8
  //# sourceMappingURL=identity-whoami.d.ts.map