@m1a0rz/agent-identity 0.2.0 → 0.2.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 (120) hide show
  1. package/LICENSE +201 -0
  2. package/README-cn.md +42 -32
  3. package/README.md +42 -32
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +17 -9
  6. package/dist/src/actions/identity-actions.d.ts.map +1 -1
  7. package/dist/src/actions/identity-actions.js +14 -3
  8. package/dist/src/commands/identity-commands.d.ts.map +1 -1
  9. package/dist/src/commands/identity-commands.js +14 -3
  10. package/dist/src/hooks/before-agent-start.d.ts.map +1 -1
  11. package/dist/src/hooks/before-agent-start.js +14 -5
  12. package/dist/src/hooks/before-tool-call.d.ts.map +1 -1
  13. package/dist/src/hooks/before-tool-call.js +13 -6
  14. package/dist/src/hooks/llm-input.d.ts +0 -5
  15. package/dist/src/hooks/llm-input.d.ts.map +1 -1
  16. package/dist/src/hooks/llm-input.js +15 -0
  17. package/dist/src/hooks/sessions-send-propagation.d.ts.map +1 -1
  18. package/dist/src/hooks/sessions-send-propagation.js +13 -5
  19. package/dist/src/hooks/sessions-spawn-propagation.d.ts.map +1 -1
  20. package/dist/src/hooks/sessions-spawn-propagation.js +13 -6
  21. package/dist/src/hooks/subagent-ended-cleanup.d.ts +0 -6
  22. package/dist/src/hooks/subagent-ended-cleanup.d.ts.map +1 -1
  23. package/dist/src/hooks/subagent-ended-cleanup.js +15 -0
  24. package/dist/src/risk/classify-risk.d.ts.map +1 -1
  25. package/dist/src/risk/classify-risk.js +14 -3
  26. package/dist/src/risk/diagnose-risk.d.ts.map +1 -1
  27. package/dist/src/risk/diagnose-risk.js +14 -3
  28. package/dist/src/risk/llm-risk-check.d.ts.map +1 -1
  29. package/dist/src/risk/llm-risk-check.js +14 -4
  30. package/dist/src/risk/low-risk-tools.d.ts +0 -3
  31. package/dist/src/risk/low-risk-tools.d.ts.map +1 -1
  32. package/dist/src/risk/low-risk-tools.js +15 -0
  33. package/dist/src/routes/oidc-login.d.ts.map +1 -1
  34. package/dist/src/routes/oidc-login.js +12 -5
  35. package/dist/src/services/identity-client.d.ts.map +1 -1
  36. package/dist/src/services/identity-client.js +13 -8
  37. package/dist/src/services/identity-credentials.d.ts +0 -8
  38. package/dist/src/services/identity-credentials.d.ts.map +1 -1
  39. package/dist/src/services/identity-credentials.js +15 -0
  40. package/dist/src/services/identity-service.d.ts.map +1 -1
  41. package/dist/src/services/identity-service.js +14 -3
  42. package/dist/src/services/oidc-client.d.ts.map +1 -1
  43. package/dist/src/services/oidc-client.js +13 -6
  44. package/dist/src/services/send-notification-feishu.d.ts.map +1 -1
  45. package/dist/src/services/send-notification-feishu.js +14 -4
  46. package/dist/src/services/session-refresh.d.ts +0 -4
  47. package/dist/src/services/session-refresh.d.ts.map +1 -1
  48. package/dist/src/services/session-refresh.js +15 -0
  49. package/dist/src/services/tip-acquisition.d.ts.map +1 -1
  50. package/dist/src/services/tip-acquisition.js +14 -3
  51. package/dist/src/services/tip-propagation.d.ts.map +1 -1
  52. package/dist/src/services/tip-propagation.js +14 -2
  53. package/dist/src/services/tip-with-refresh.d.ts.map +1 -1
  54. package/dist/src/services/tip-with-refresh.js +14 -4
  55. package/dist/src/store/credential-env-bindings.d.ts +0 -5
  56. package/dist/src/store/credential-env-bindings.d.ts.map +1 -1
  57. package/dist/src/store/credential-env-bindings.js +15 -0
  58. package/dist/src/store/credential-store.d.ts.map +1 -1
  59. package/dist/src/store/credential-store.js +14 -3
  60. package/dist/src/store/oidc-state-store.d.ts.map +1 -1
  61. package/dist/src/store/oidc-state-store.js +14 -3
  62. package/dist/src/store/session-store.d.ts +0 -5
  63. package/dist/src/store/session-store.d.ts.map +1 -1
  64. package/dist/src/store/session-store.js +15 -0
  65. package/dist/src/store/skill-path-store.d.ts +0 -5
  66. package/dist/src/store/skill-path-store.d.ts.map +1 -1
  67. package/dist/src/store/skill-path-store.js +15 -0
  68. package/dist/src/store/tip-store.d.ts +0 -6
  69. package/dist/src/store/tip-store.d.ts.map +1 -1
  70. package/dist/src/store/tip-store.js +15 -0
  71. package/dist/src/store/tool-approval-store.d.ts +0 -4
  72. package/dist/src/store/tool-approval-store.d.ts.map +1 -1
  73. package/dist/src/store/tool-approval-store.js +15 -0
  74. package/dist/src/tools/identity-approve-tool.d.ts.map +1 -1
  75. package/dist/src/tools/identity-approve-tool.js +14 -3
  76. package/dist/src/tools/identity-config-suggest.d.ts +113 -0
  77. package/dist/src/tools/identity-config-suggest.d.ts.map +1 -0
  78. package/dist/src/tools/identity-config-suggest.js +182 -0
  79. package/dist/src/tools/identity-config.d.ts.map +1 -1
  80. package/dist/src/tools/identity-config.js +14 -2
  81. package/dist/src/tools/identity-fetch.d.ts.map +1 -1
  82. package/dist/src/tools/identity-fetch.js +14 -4
  83. package/dist/src/tools/identity-list-credentials.d.ts.map +1 -1
  84. package/dist/src/tools/identity-list-credentials.js +14 -2
  85. package/dist/src/tools/identity-list-risk-patterns.d.ts.map +1 -1
  86. package/dist/src/tools/identity-list-risk-patterns.js +14 -3
  87. package/dist/src/tools/identity-list-tips.d.ts.map +1 -1
  88. package/dist/src/tools/identity-list-tips.js +14 -2
  89. package/dist/src/tools/identity-login.d.ts.map +1 -1
  90. package/dist/src/tools/identity-login.js +14 -3
  91. package/dist/src/tools/identity-logout.d.ts.map +1 -1
  92. package/dist/src/tools/identity-logout.js +14 -2
  93. package/dist/src/tools/identity-risk-check.d.ts.map +1 -1
  94. package/dist/src/tools/identity-risk-check.js +14 -3
  95. package/dist/src/tools/identity-set-binding.d.ts.map +1 -1
  96. package/dist/src/tools/identity-set-binding.js +14 -2
  97. package/dist/src/tools/identity-status.d.ts.map +1 -1
  98. package/dist/src/tools/identity-status.js +14 -2
  99. package/dist/src/tools/identity-unset-binding.d.ts.map +1 -1
  100. package/dist/src/tools/identity-unset-binding.js +14 -2
  101. package/dist/src/tools/identity-whoami.d.ts.map +1 -1
  102. package/dist/src/tools/identity-whoami.js +14 -2
  103. package/dist/src/types.d.ts.map +1 -1
  104. package/dist/src/types.js +14 -3
  105. package/dist/src/utils/approval-channel.d.ts +0 -4
  106. package/dist/src/utils/approval-channel.d.ts.map +1 -1
  107. package/dist/src/utils/approval-channel.js +15 -0
  108. package/dist/src/utils/auth.d.ts.map +1 -1
  109. package/dist/src/utils/auth.js +13 -4
  110. package/dist/src/utils/derive-session-key.d.ts.map +1 -1
  111. package/dist/src/utils/derive-session-key.js +14 -3
  112. package/dist/src/utils/logger.d.ts.map +1 -1
  113. package/dist/src/utils/logger.js +15 -0
  114. package/dist/src/utils/parse-available-skills.d.ts.map +1 -1
  115. package/dist/src/utils/parse-available-skills.js +15 -0
  116. package/dist/src/utils/token-errors.d.ts.map +1 -1
  117. package/dist/src/utils/token-errors.js +15 -0
  118. package/openclaw.plugin.json +1 -1
  119. package/package.json +2 -2
  120. package/skills/SKILL.md +18 -2
@@ -1 +1 @@
1
- {"version":3,"file":"tip-acquisition.d.ts","sourceRoot":"","sources":["../../../src/services/tip-acquisition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BpF"}
1
+ {"version":3,"file":"tip-acquisition.d.ts","sourceRoot":"","sources":["../../../src/services/tip-acquisition.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BpF"}
@@ -1,6 +1,17 @@
1
- /**
2
- * Shared TIP acquisition and store logic.
3
- * Used by before_agent_start (main) and sessions_send_propagation (subagent).
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.
4
15
  */
5
16
  import { setTIPToken } from "../store/tip-store.js";
6
17
  import { resolveAgentId, resolveWorkloadNameForSession, } from "../utils/derive-session-key.js";
@@ -1 +1 @@
1
- {"version":3,"file":"tip-propagation.d.ts","sourceRoot":"","sources":["../../../src/services/tip-propagation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,C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C;IAClD,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CACzE,CAAC;AAEF;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2CpF"}
@@ -1,5 +1,17 @@
1
- /**
2
- * Shared TIP propagation logic for sessions_send and sessions_spawn.
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.
3
15
  */
4
16
  import { getSession, setSession } from "../store/session-store.js";
5
17
  import { setTIPToken } from "../store/tip-store.js";
@@ -1 +1 @@
1
- {"version":3,"file":"tip-with-refresh.d.ts","sourceRoot":"","sources":["../../../src/services/tip-with-refresh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,uBAAuB,CAAC,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IA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,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CA6DlD"}
@@ -1,7 +1,17 @@
1
- /**
2
- * Get TIP token with optional refresh when expired.
3
- * When refresh options are provided and TIP is missing/expired, attempts to
4
- * fetch TIP from session userToken (and refresh userToken if expired).
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.
5
15
  */
6
16
  import { getSession } from "../store/session-store.js";
7
17
  import { getTIPToken } from "../store/tip-store.js";
@@ -1,8 +1,3 @@
1
- /**
2
- * Credential-to-env-var bindings, per sessionKey.
3
- * Used by `identity set <provider> <envVar>` to configure injection of stored credentials.
4
- * Format: { [sessionKey]: { [provider]: envVar } }.
5
- */
6
1
  /**
7
2
  * Get bindings for a session.
8
3
  */
@@ -1 +1 @@
1
- {"version":3,"file":"credential-env-bindings.d.ts","sourceRoot":"","sources":["../../../src/store/credential-env-bindings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA6BH;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAIjC;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAEjD;AAED,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAWf"}
1
+ {"version":3,"file":"credential-env-bindings.d.ts","sourceRoot":"","sources":["../../../src/store/credential-env-bindings.ts"],"names":[],"mappings":"AAiDA;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAIjC;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAEjD;AAED,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAWf"}
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * Credential-to-env-var bindings, per sessionKey.
3
18
  * Used by `identity set <provider> <envVar>` to configure injection of stored credentials.
@@ -1 +1 @@
1
- {"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../../../src/store/credential-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,cAAc,GAAG,eAAe,GAAG,SAAS,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAUlE,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAW1C;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAQjC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAOjF;AAED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AM,GAAG,SAAS,CAOjF;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,6DAA6D;AAC7D,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAKvF"}
@@ -1,6 +1,17 @@
1
- /**
2
- * Credential store: (sessionKey, provider) -> credential (in-memory only).
3
- * Credentials are per-session; not persisted; lost on gateway restart.
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.
4
15
  */
5
16
  const SESSION_PROVIDER_SEP = "\0";
6
17
  function credKey(sessionKey, provider) {
@@ -1 +1 @@
1
- {"version":3,"file":"oidc-state-store.d.ts","sourceRoot":"","sources":["../../../src/store/oidc-state-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,cAAc,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAClD,CAAC;AAYF,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,wBAAwB,GAAG,IAAI,GAC/C,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAOhC"}
1
+ {"version":3,"file":"oidc-state-store.d.ts","sourceRoot":"","sources":["../../../src/store/oidc-state-store.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,cAAc,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAClD,CAAC;AAYF,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,wBAAwB,GAAG,IAAI,GAC/C,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAOhC"}
@@ -1,6 +1,17 @@
1
- /**
2
- * OAuth2 state store for OIDC login flow (in-memory only).
3
- * Stores state -> { sessionKey, redirectUri, deliveryTarget? } with TTL. Lost on gateway restart.
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.
4
15
  */
5
16
  const STATE_TTL_MS = 5 * 60 * 1000; // 5 min
6
17
  const states = new Map();
@@ -1,8 +1,3 @@
1
- /**
2
- * Session store: sessionKey → userToken mapping.
3
- * Persists to ~/.openclaw/plugins/identity/sessions.json
4
- * Prunes expired entries on load/save to prevent growth.
5
- */
6
1
  export type SessionEntry = {
7
2
  userToken: string;
8
3
  sub: string;
@@ -1 +1 @@
1
- {"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/store/session-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAeD,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAc1F;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YA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C,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvF"}
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * Session store: sessionKey → userToken mapping.
3
18
  * Persists to ~/.openclaw/plugins/identity/sessions.json
@@ -1,8 +1,3 @@
1
- /**
2
- * In-memory store: sessionKey -> (normalizedPath -> skillName).
3
- * Populated by llm_input hook from <available_skills> in system prompt.
4
- * Cleared on session_end to avoid leaks.
5
- */
6
1
  export declare function setSkillPathsForSession(sessionKey: string, pathToSkill: Map<string, string>, workspaceDir?: string, sessionId?: string): void;
7
2
  export declare function getSkillNameForPath(sessionKey: string, pathStr: string, workspaceDir?: string): string | undefined;
8
3
  export declare function clearSessionByKey(sessionKey: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-path-store.d.ts","sourceRoot":"","sources":["../../../src/store/skill-path-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4BH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,YAAY,CAAC,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CA0BN;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAS1D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKxD"}
1
+ {"version":3,"file":"skill-path-store.d.ts","sourceRoot":"","sources":["../../../src/store/skill-path-store.ts"],"names":[],"mappings":"AAgDA,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,YAAY,CAAC,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CA0BN;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAS1D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAKxD"}
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * In-memory store: sessionKey -> (normalizedPath -> skillName).
3
18
  * Populated by llm_input hook from <available_skills> in system prompt.
@@ -1,9 +1,3 @@
1
- /**
2
- * TIP (Trusted Identity Provider) token store.
3
- * Caches sessionKey → TIP token mapping.
4
- * Persists to ~/.openclaw/plugins/identity/tip-tokens.json
5
- * Prunes expired entries on load/save to prevent growth.
6
- */
7
1
  export type TIPTokenEntry = {
8
2
  token: string;
9
3
  sub: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tip-store.d.ts","sourceRoot":"","sources":["../../../src/store/tip-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAIF,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAaD,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAc5F;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAU/B;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAKf"}
1
+ {"version":3,"file":"tip-store.d.ts","sourceRoot":"","sources":["../../../src/store/tip-store.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAIF,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAaD,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAc5F;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAU/B;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAKf"}
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * TIP (Trusted Identity Provider) token store.
3
18
  * Caches sessionKey → TIP token mapping.
@@ -1,7 +1,3 @@
1
- /**
2
- * In-memory store for tool approval flow.
3
- * Pending: awaiting user approval. Approval: recorded for retry-path allow.
4
- */
5
1
  export type PendingEntry = {
6
2
  approvalId: string;
7
3
  sessionKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-approval-store.d.ts","sourceRoot":"","sources":["../../../src/store/tool-approval-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAoBF;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGxF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAaD,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAUP;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAOvE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CACrB,UAAU,EAAE,MAAM,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D;AAaD,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAUP;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAOvE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CACrB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GACjC,OAAO,CAkBT;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAatF;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAQT;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAST;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,EAAE,CASvE;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,OAAO,CAAC,OAAO,CAAC,CAwBlB"}
@@ -1,3 +1,18 @@
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
+ */
1
16
  /**
2
17
  * In-memory store for tool approval flow.
3
18
  * Pending: awaiting user approval. Approval: recorded for retry-path allow.
@@ -1 +1 @@
1
- {"version":3,"file":"identity-approve-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-approve-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAMrD,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,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,yBAAyB,CAAC,IAAI,EAAE,uBAAuB,IAC7D,KAAK,iBAAiB;;;;;;;2BAOC,MAAM,UAAU;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;EAsBxE"}
1
+ {"version":3,"file":"identity-approve-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/identity-approve-tool.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAMrD,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,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,yBAAyB,CAAC,IAAI,EAAE,uBAAuB,IAC7D,KAAK,iBAAiB;;;;;;;2BAOC,MAAM,UAAU;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;EAsBxE"}
@@ -1,6 +1,17 @@
1
- /**
2
- * identity_approve_tool: approve a high-risk tool call by approval_id.
3
- * Used for webchat/TUI flow when user approves via UI then agent retries.
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.
4
15
  */
5
16
  import { Type } from "@sinclair/typebox";
6
17
  import { jsonResult } from "openclaw/plugin-sdk";
@@ -0,0 +1,113 @@
1
+ declare const INTENTS: {
2
+ readonly identity: {
3
+ readonly label: "Identity API (AK/SK, endpoint)";
4
+ readonly config: {
5
+ readonly identity: {
6
+ readonly endpoint: "https://id.cn-beijing.volcengineapi.com";
7
+ readonly accessKeyId: "<your-access-key>";
8
+ readonly secretAccessKey: "<your-secret-key>";
9
+ readonly workloadPoolName: "default";
10
+ readonly workloadName: "openclaw-agent";
11
+ };
12
+ };
13
+ readonly instructions: {
14
+ readonly en: "Add under plugins.entries.agent-identity.config. Credentials can also come from env (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) or credentialsFile.";
15
+ readonly zh: "添加到 plugins.entries.agent-identity.config 下。凭据也可通过环境变量 (VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY) 或 credentialsFile 提供。";
16
+ };
17
+ };
18
+ readonly userpool: {
19
+ readonly label: "UserPool OIDC (login)";
20
+ readonly config: {
21
+ readonly userpool: {
22
+ readonly discoveryUrl: "https://your-idp.com/.well-known/openid-configuration";
23
+ readonly clientId: "<your-client-id>";
24
+ readonly clientSecret: "<optional-for-public-clients>";
25
+ readonly callbackUrl: "https://your-gateway/identity/oauth/callback";
26
+ readonly scope: "openid profile email";
27
+ };
28
+ };
29
+ readonly instructions: {
30
+ 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.";
31
+ readonly zh: "登录功能必需。callbackUrl 需与 IdP 中注册的回调地址一致。动态模式可使用 userPoolName + clientName 替代 discoveryUrl + clientId。";
32
+ };
33
+ };
34
+ readonly authz: {
35
+ readonly label: "AuthZ (tool/skill permission, risk approval)";
36
+ readonly config: {
37
+ readonly authz: {
38
+ readonly toolCheck: true;
39
+ readonly skillReadCheck: false;
40
+ readonly requireRiskApproval: true;
41
+ readonly namespaceName: "default";
42
+ readonly lowRiskBypass: true;
43
+ readonly approvalTtlSeconds: 300;
44
+ };
45
+ };
46
+ readonly instructions: {
47
+ 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.";
48
+ readonly zh: "toolCheck: 对工具调用做 CheckPermission。skillReadCheck: 对 SKILL.md 读取做权限检查。requireRiskApproval: 高风险工具需用户审批。修改后需重启 gateway。";
49
+ };
50
+ };
51
+ readonly llm_risk: {
52
+ readonly label: "LLM risk check (re-evaluate medium-risk)";
53
+ readonly config: {
54
+ readonly authz: {
55
+ readonly requireRiskApproval: true;
56
+ readonly enableLlmRiskCheck: true;
57
+ readonly llmRiskCheck: {
58
+ readonly endpoint: "http://localhost:11434";
59
+ readonly api: "ollama";
60
+ readonly model: "qwen3:8b";
61
+ readonly timeoutMs: 10000;
62
+ readonly cacheTtlMs: 300000;
63
+ };
64
+ };
65
+ };
66
+ readonly instructions: {
67
+ readonly en: "When rules return medium, LLM re-evaluates. Requires requireRiskApproval. endpoint: Ollama or OpenAI-compat base URL.";
68
+ readonly zh: "规则返回 medium 时由 LLM 二次评估。需同时开启 requireRiskApproval。endpoint 为 Ollama 或 OpenAI 兼容接口地址。";
69
+ };
70
+ };
71
+ readonly full: {
72
+ readonly label: "Full example (identity + userpool + authz)";
73
+ readonly config: {
74
+ readonly identity: {
75
+ readonly endpoint: "https://id.cn-beijing.volcengineapi.com";
76
+ readonly workloadPoolName: "default";
77
+ readonly workloadName: "openclaw-agent";
78
+ };
79
+ readonly userpool: {
80
+ readonly discoveryUrl: "https://your-idp.com/.well-known/openid-configuration";
81
+ readonly clientId: "<your-client-id>";
82
+ readonly callbackUrl: "https://your-gateway/identity/oauth/callback";
83
+ readonly scope: "openid profile email";
84
+ };
85
+ readonly authz: {
86
+ readonly toolCheck: false;
87
+ readonly skillReadCheck: false;
88
+ readonly requireRiskApproval: false;
89
+ readonly lowRiskBypass: true;
90
+ };
91
+ };
92
+ readonly instructions: {
93
+ readonly en: "Minimal full config. Fill in your IdP discoveryUrl, clientId, callbackUrl. Enable authz flags as needed.";
94
+ readonly zh: "完整示例。填入 IdP 的 discoveryUrl、clientId、callbackUrl。按需开启 authz 各项。";
95
+ };
96
+ };
97
+ };
98
+ 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
+ };
112
+ export {};
113
+ //# 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":"AAuDA,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"}