alibabacloud-agentcore-sdk 0.1.0
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/LICENSE +202 -0
- package/README.md +189 -0
- package/dist/access-key-CkoHq3S8.d.cts +30 -0
- package/dist/access-key-CkoHq3S8.d.ts +30 -0
- package/dist/agent-sa-token-DD1Sb8P1.d.cts +14 -0
- package/dist/agent-sa-token-DD1Sb8P1.d.ts +14 -0
- package/dist/auth/index.cjs +36 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +34 -0
- package/dist/auth/index.d.ts +34 -0
- package/dist/auth/index.js +36 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/bound-credentials-C1fM0thh.d.cts +39 -0
- package/dist/bound-credentials-DqT64Q2s.d.ts +39 -0
- package/dist/chunk-2E5EWEDG.cjs +142 -0
- package/dist/chunk-2E5EWEDG.cjs.map +1 -0
- package/dist/chunk-55XZZRKO.js +220 -0
- package/dist/chunk-55XZZRKO.js.map +1 -0
- package/dist/chunk-5JXA7JPS.js +29 -0
- package/dist/chunk-5JXA7JPS.js.map +1 -0
- package/dist/chunk-5RKN46UU.cjs +139 -0
- package/dist/chunk-5RKN46UU.cjs.map +1 -0
- package/dist/chunk-5ZOLHQXO.js +296 -0
- package/dist/chunk-5ZOLHQXO.js.map +1 -0
- package/dist/chunk-7Y263YIW.js +298 -0
- package/dist/chunk-7Y263YIW.js.map +1 -0
- package/dist/chunk-A3PF2SPD.cjs +141 -0
- package/dist/chunk-A3PF2SPD.cjs.map +1 -0
- package/dist/chunk-A3WMLVJC.cjs +141 -0
- package/dist/chunk-A3WMLVJC.cjs.map +1 -0
- package/dist/chunk-BVZ7H2F5.cjs +582 -0
- package/dist/chunk-BVZ7H2F5.cjs.map +1 -0
- package/dist/chunk-EGUKJE3Z.cjs +24 -0
- package/dist/chunk-EGUKJE3Z.cjs.map +1 -0
- package/dist/chunk-EKXZKKJJ.js +24 -0
- package/dist/chunk-EKXZKKJJ.js.map +1 -0
- package/dist/chunk-GYLT23D3.js +110 -0
- package/dist/chunk-GYLT23D3.js.map +1 -0
- package/dist/chunk-IF7LMBXC.js +306 -0
- package/dist/chunk-IF7LMBXC.js.map +1 -0
- package/dist/chunk-IUCLCPVV.js +113 -0
- package/dist/chunk-IUCLCPVV.js.map +1 -0
- package/dist/chunk-JSP7ZROS.cjs +95 -0
- package/dist/chunk-JSP7ZROS.cjs.map +1 -0
- package/dist/chunk-JW62DVIC.js +238 -0
- package/dist/chunk-JW62DVIC.js.map +1 -0
- package/dist/chunk-K3TE7625.js +139 -0
- package/dist/chunk-K3TE7625.js.map +1 -0
- package/dist/chunk-LE5P3SJW.cjs +16 -0
- package/dist/chunk-LE5P3SJW.cjs.map +1 -0
- package/dist/chunk-LXHW6OT4.cjs +77 -0
- package/dist/chunk-LXHW6OT4.cjs.map +1 -0
- package/dist/chunk-MICRSJ6R.js +48 -0
- package/dist/chunk-MICRSJ6R.js.map +1 -0
- package/dist/chunk-MWAHO47B.cjs +220 -0
- package/dist/chunk-MWAHO47B.cjs.map +1 -0
- package/dist/chunk-MZ5UWGXS.js +95 -0
- package/dist/chunk-MZ5UWGXS.js.map +1 -0
- package/dist/chunk-NZL3VPJ2.js +16 -0
- package/dist/chunk-NZL3VPJ2.js.map +1 -0
- package/dist/chunk-PC4FM2RP.cjs +180 -0
- package/dist/chunk-PC4FM2RP.cjs.map +1 -0
- package/dist/chunk-PKYET77D.cjs +296 -0
- package/dist/chunk-PKYET77D.cjs.map +1 -0
- package/dist/chunk-PTJPB27L.js +31 -0
- package/dist/chunk-PTJPB27L.js.map +1 -0
- package/dist/chunk-QIZO3A4Y.cjs +306 -0
- package/dist/chunk-QIZO3A4Y.cjs.map +1 -0
- package/dist/chunk-RBAY4MO2.js +202 -0
- package/dist/chunk-RBAY4MO2.js.map +1 -0
- package/dist/chunk-RHY7Y43E.js +582 -0
- package/dist/chunk-RHY7Y43E.js.map +1 -0
- package/dist/chunk-RQRI6RCG.cjs +238 -0
- package/dist/chunk-RQRI6RCG.cjs.map +1 -0
- package/dist/chunk-RYXL25AI.js +141 -0
- package/dist/chunk-RYXL25AI.js.map +1 -0
- package/dist/chunk-RZNQGEGJ.cjs +113 -0
- package/dist/chunk-RZNQGEGJ.cjs.map +1 -0
- package/dist/chunk-S7PWSJNP.cjs +48 -0
- package/dist/chunk-S7PWSJNP.cjs.map +1 -0
- package/dist/chunk-TWEO5XVM.cjs +298 -0
- package/dist/chunk-TWEO5XVM.cjs.map +1 -0
- package/dist/chunk-UBP5CHU7.js +142 -0
- package/dist/chunk-UBP5CHU7.js.map +1 -0
- package/dist/chunk-ULJTQSLE.cjs +35 -0
- package/dist/chunk-ULJTQSLE.cjs.map +1 -0
- package/dist/chunk-UWPKFJYM.js +77 -0
- package/dist/chunk-UWPKFJYM.js.map +1 -0
- package/dist/chunk-WKZUYPDS.js +180 -0
- package/dist/chunk-WKZUYPDS.js.map +1 -0
- package/dist/chunk-YZP55W7S.cjs +29 -0
- package/dist/chunk-YZP55W7S.cjs.map +1 -0
- package/dist/chunk-ZELRQU4J.cjs +31 -0
- package/dist/chunk-ZELRQU4J.cjs.map +1 -0
- package/dist/chunk-ZLKYXRNM.js +141 -0
- package/dist/chunk-ZLKYXRNM.js.map +1 -0
- package/dist/chunk-ZLQ2IBTC.cjs +110 -0
- package/dist/chunk-ZLQ2IBTC.cjs.map +1 -0
- package/dist/chunk-ZTWLCHCO.cjs +202 -0
- package/dist/chunk-ZTWLCHCO.cjs.map +1 -0
- package/dist/chunk-ZWQBAJ5O.js +35 -0
- package/dist/chunk-ZWQBAJ5O.js.map +1 -0
- package/dist/client-DDU4-ygJ.d.cts +72 -0
- package/dist/client-pDzS7EZR.d.ts +72 -0
- package/dist/collaboration/index.cjs +44 -0
- package/dist/collaboration/index.cjs.map +1 -0
- package/dist/collaboration/index.d.cts +73 -0
- package/dist/collaboration/index.d.ts +73 -0
- package/dist/collaboration/index.js +44 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/common-BSXkQfxI.d.cts +25 -0
- package/dist/common-BSXkQfxI.d.ts +25 -0
- package/dist/common-DRdI-75k.d.ts +8 -0
- package/dist/common-_vxreiEW.d.cts +8 -0
- package/dist/config-CMkmMtx1.d.cts +20 -0
- package/dist/config-CMkmMtx1.d.ts +20 -0
- package/dist/context-M9rOTifU.d.cts +12 -0
- package/dist/context-M9rOTifU.d.ts +12 -0
- package/dist/controller-DWs3Sy04.d.cts +9 -0
- package/dist/controller-DmI4L4sP.d.ts +9 -0
- package/dist/controlplane/index.cjs +13 -0
- package/dist/controlplane/index.cjs.map +1 -0
- package/dist/controlplane/index.d.cts +66 -0
- package/dist/controlplane/index.d.ts +66 -0
- package/dist/controlplane/index.js +13 -0
- package/dist/controlplane/index.js.map +1 -0
- package/dist/errors-BjGO6N10.d.ts +93 -0
- package/dist/errors-D9OtcR-o.d.cts +93 -0
- package/dist/event-converters-BIn8odqo.d.ts +38 -0
- package/dist/event-converters-Cn_NeGyQ.d.cts +38 -0
- package/dist/google-adk-model-N47R7GB2.js +208 -0
- package/dist/google-adk-model-N47R7GB2.js.map +1 -0
- package/dist/google-adk-model-PDBKY5YZ.cjs +208 -0
- package/dist/google-adk-model-PDBKY5YZ.cjs.map +1 -0
- package/dist/index.cjs +322 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +78 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +322 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/ai-sdk.cjs +15 -0
- package/dist/integrations/ai-sdk.cjs.map +1 -0
- package/dist/integrations/ai-sdk.d.cts +21 -0
- package/dist/integrations/ai-sdk.d.ts +21 -0
- package/dist/integrations/ai-sdk.js +15 -0
- package/dist/integrations/ai-sdk.js.map +1 -0
- package/dist/integrations/google-adk.cjs +90 -0
- package/dist/integrations/google-adk.cjs.map +1 -0
- package/dist/integrations/google-adk.d.cts +46 -0
- package/dist/integrations/google-adk.d.ts +46 -0
- package/dist/integrations/google-adk.js +90 -0
- package/dist/integrations/google-adk.js.map +1 -0
- package/dist/integrations/langchain.cjs +95 -0
- package/dist/integrations/langchain.cjs.map +1 -0
- package/dist/integrations/langchain.d.cts +52 -0
- package/dist/integrations/langchain.d.ts +52 -0
- package/dist/integrations/langchain.js +95 -0
- package/dist/integrations/langchain.js.map +1 -0
- package/dist/integrations/langgraph.cjs +30 -0
- package/dist/integrations/langgraph.cjs.map +1 -0
- package/dist/integrations/langgraph.d.cts +53 -0
- package/dist/integrations/langgraph.d.ts +53 -0
- package/dist/integrations/langgraph.js +30 -0
- package/dist/integrations/langgraph.js.map +1 -0
- package/dist/integrations/mastra.cjs +108 -0
- package/dist/integrations/mastra.cjs.map +1 -0
- package/dist/integrations/mastra.d.cts +47 -0
- package/dist/integrations/mastra.d.ts +47 -0
- package/dist/integrations/mastra.js +108 -0
- package/dist/integrations/mastra.js.map +1 -0
- package/dist/langchain-adapter-DFJdEX04.d.cts +47 -0
- package/dist/langchain-adapter-DJsyjm5V.d.ts +47 -0
- package/dist/langchain-provider-NF5GIDQV.cjs +227 -0
- package/dist/langchain-provider-NF5GIDQV.cjs.map +1 -0
- package/dist/langchain-provider-PHL4UWNF.js +227 -0
- package/dist/langchain-provider-PHL4UWNF.js.map +1 -0
- package/dist/loader-DrIQ37nm.d.ts +38 -0
- package/dist/loader-eWuJ2GSL.d.cts +38 -0
- package/dist/logging-C8GLLg1f.d.cts +9 -0
- package/dist/logging-C8GLLg1f.d.ts +9 -0
- package/dist/managed-CwLx9h4C.d.cts +32 -0
- package/dist/managed-D9eQK1ut.d.ts +32 -0
- package/dist/mcp/index.cjs +12 -0
- package/dist/mcp/index.cjs.map +1 -0
- package/dist/mcp/index.d.cts +62 -0
- package/dist/mcp/index.d.ts +62 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/memory/index.cjs +12 -0
- package/dist/memory/index.cjs.map +1 -0
- package/dist/memory/index.d.cts +113 -0
- package/dist/memory/index.d.ts +113 -0
- package/dist/memory/index.js +12 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/model/index.cjs +16 -0
- package/dist/model/index.cjs.map +1 -0
- package/dist/model/index.d.cts +129 -0
- package/dist/model/index.d.ts +129 -0
- package/dist/model/index.js +16 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model-CkYHzHPk.d.cts +50 -0
- package/dist/model-CkYHzHPk.d.ts +50 -0
- package/dist/runtime/index.cjs +49 -0
- package/dist/runtime/index.cjs.map +1 -0
- package/dist/runtime/index.d.cts +73 -0
- package/dist/runtime/index.d.ts +73 -0
- package/dist/runtime/index.js +49 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/server/index.cjs +604 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +69 -0
- package/dist/server/index.d.ts +69 -0
- package/dist/server/index.js +604 -0
- package/dist/server/index.js.map +1 -0
- package/dist/skill/index.cjs +14 -0
- package/dist/skill/index.cjs.map +1 -0
- package/dist/skill/index.d.cts +16 -0
- package/dist/skill/index.d.ts +16 -0
- package/dist/skill/index.js +14 -0
- package/dist/skill/index.js.map +1 -0
- package/package.json +292 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# AgentCore SDK for Node.js
|
|
2
|
+
|
|
3
|
+
使用 TypeScript 或 JavaScript 构建 Agent,连接 AgentCore 云端资源或自有服务,并与常用 Agent 框架集成。
|
|
4
|
+
|
|
5
|
+
[AgentCore 官网](https://www.aliyun.com/product/agentcore) · [官方文档](https://help.aliyun.com/zh/agentcore/) · [示例指南](examples/README.md)
|
|
6
|
+
|
|
7
|
+
## 从这里开始
|
|
8
|
+
|
|
9
|
+
| 你想做什么 | 入口 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| 连接平台上的模型、MCP 和 Skill | [云端资源](#使用云端资源) |
|
|
12
|
+
| 使用自己的模型、MCP 或本地 Skill | [自定义资源](#使用自定义资源) |
|
|
13
|
+
| 为 Agent 添加长期记忆 | [Memory](#使用-memory) |
|
|
14
|
+
| 配置 MCP 凭证与固定 Header | [凭证与 Header](#凭证与-mcp-header) |
|
|
15
|
+
| 接入已有 Agent 框架 | [框架集成](#框架集成) |
|
|
16
|
+
| 将 Agent 发布为 HTTP 服务 | [服务协议](#提供-agent-服务) |
|
|
17
|
+
|
|
18
|
+
## 功能
|
|
19
|
+
|
|
20
|
+
- **模型**:访问托管模型,或连接自定义模型服务。
|
|
21
|
+
- **工具与 Skill**:接入 MCP 服务,使用云端或随应用分发的 Skill。
|
|
22
|
+
- **记忆**:检索和保存长期记忆,接入框架的 Agent 执行流程。
|
|
23
|
+
- **凭证**:按名称获取托管 API Key,或为 MCP 显式绑定 Header 凭证。
|
|
24
|
+
- **服务协议**:通过 AG-UI 或 OpenAI Chat Completions 提供 Agent 服务。
|
|
25
|
+
|
|
26
|
+
支持 LangChain、LangGraph、Google ADK、Mastra 和 AI SDK。
|
|
27
|
+
|
|
28
|
+
## 安装
|
|
29
|
+
|
|
30
|
+
基础 SDK 需要 Node.js 20.3+;使用全部框架示例建议 Node.js 22.22+。
|
|
31
|
+
|
|
32
|
+
> 当前分支处于公开发布准备阶段。以下为公开发行版的安装方式,包的可用版本以正式发布为准。
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install alibabacloud-agentcore-sdk
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
框架依赖按需安装,见 [示例指南](examples/README.md#框架依赖)。
|
|
39
|
+
|
|
40
|
+
## 快速开始
|
|
41
|
+
|
|
42
|
+
### 使用云端资源
|
|
43
|
+
|
|
44
|
+
先参考[官方文档](https://help.aliyun.com/zh/agentcore/)创建 Workspace,再按需准备模型连接、MCP 和 Skill,并为 Agent 授予访问权限。以下代码在部署到 AgentCore 的应用中运行;将资源名称替换为当前 Workspace 中自己的资源名称。只使用模型时,无需创建 MCP 或 Skill。
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { AgentCore } from 'alibabacloud-agentcore-sdk';
|
|
48
|
+
|
|
49
|
+
const core = AgentCore.auto();
|
|
50
|
+
try {
|
|
51
|
+
const model = await core.model('test-mc', { model: 'qwen3.8-max' });
|
|
52
|
+
const response = await model.completion([{ role: 'user', content: '你好' }]);
|
|
53
|
+
console.log(response);
|
|
54
|
+
|
|
55
|
+
const mcp = await core.mcp('test-mcp');
|
|
56
|
+
console.log((await mcp.listTools()).map(tool => tool.name));
|
|
57
|
+
|
|
58
|
+
const skill = await core.skills.managed('test-skill');
|
|
59
|
+
console.log(skill.name);
|
|
60
|
+
} finally {
|
|
61
|
+
await core.close();
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 凭证与 MCP Header
|
|
66
|
+
|
|
67
|
+
在平台创建凭证并授权后,使用 `await core.credentials.get(name)` 按名称获取。API Key 凭证通过 `credential.value` 读取;MCP Header 凭证通过 `credential.asHeaders()` 读取。不要将凭证值写入日志或提交到代码仓库。
|
|
68
|
+
|
|
69
|
+
托管 MCP 可在创建时显式绑定 MCP Header 凭证,并追加固定 Header。只有该 MCP 在凭证允许的应用范围内时才能使用:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const mcp = await core.mcp('test-mcp', {
|
|
73
|
+
credentialName: 'my-mcp-credential', // 可省略;须在平台创建并允许访问该 MCP
|
|
74
|
+
headers: { 'x-business-id': 'my-app' }, // 可省略
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Header 作用于该客户端的握手、工具发现和工具调用,不是请求级身份上下文。
|
|
79
|
+
SDK 会复制配置,不同 Header 配置使用不同客户端和 Session;不传时保持原有行为。
|
|
80
|
+
合并顺序为平台 Header → 凭证 Header → 自定义 Header;名称大小写不敏感,冲突直接报错,不做覆盖。
|
|
81
|
+
`Authorization`、平台已配置的 Header,以及 `Host`、`Mcp-Session-Id`、`Mcp-Protocol-Version` 等协议维护字段不可覆盖。
|
|
82
|
+
凭证在首次建连和重连时查询与获取,复用 Session 期间不重复获取,也不后台刷新。
|
|
83
|
+
托管 MCP 使用 Streamable HTTP;直连 MCP 保留 `headersProvider`,stdio 不承载 HTTP Header。
|
|
84
|
+
不要修改共享客户端来切换用户身份。Header 的内容由业务明确选择,不自动透传入站请求头。
|
|
85
|
+
固定 Header 不等于可信身份。完整示例见 [MCP 凭证与 Header](examples/mcp-credentials.ts)。
|
|
86
|
+
|
|
87
|
+
### 使用自定义资源
|
|
88
|
+
|
|
89
|
+
连接自有模型、MCP 服务,无需在 AgentCore 注册资源:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { AgentCore } from 'alibabacloud-agentcore-sdk';
|
|
93
|
+
|
|
94
|
+
const core = new AgentCore();
|
|
95
|
+
try {
|
|
96
|
+
const model = core.directModel({
|
|
97
|
+
provider: 'openai',
|
|
98
|
+
model: process.env.CUSTOM_MODEL_NAME!,
|
|
99
|
+
baseURL: process.env.CUSTOM_MODEL_BASE_URL!,
|
|
100
|
+
apiKey: process.env.CUSTOM_MODEL_API_KEY!,
|
|
101
|
+
});
|
|
102
|
+
console.log(await model.completion([{ role: 'user', content: '你好' }]));
|
|
103
|
+
|
|
104
|
+
const mcp = core.directMCP({ url: process.env.CUSTOM_MCP_URL! });
|
|
105
|
+
console.log((await mcp.listTools()).map(tool => tool.name));
|
|
106
|
+
} finally {
|
|
107
|
+
await core.close();
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
本地 Skill 加载方式及完整配置见 [自定义资源示例](examples/direct-resources.ts)。
|
|
112
|
+
|
|
113
|
+
## 使用 Memory
|
|
114
|
+
|
|
115
|
+
Memory 用于保存和检索长期记忆,也支持查询、更新、删除记忆以及查看会话消息。使用前,在 AgentCore 中创建 MemoryStore 并授予应用访问权限。
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { AgentCore } from 'alibabacloud-agentcore-sdk';
|
|
119
|
+
|
|
120
|
+
const core = AgentCore.auto();
|
|
121
|
+
try {
|
|
122
|
+
const store = core.memoryStore('test-memory');
|
|
123
|
+
await store.addMemories({
|
|
124
|
+
scope: { userId: 'example-user', sessionId: 'session-1' },
|
|
125
|
+
text: '用户喜欢简短的中文回答。',
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Newly added memories may take time to become searchable.
|
|
129
|
+
const result = await store.searchMemories('用户有哪些回答偏好?', {
|
|
130
|
+
scope: { userId: 'example-user' },
|
|
131
|
+
topK: 5,
|
|
132
|
+
});
|
|
133
|
+
for (const hit of result.memories) {
|
|
134
|
+
console.log(hit.memory.content.text);
|
|
135
|
+
}
|
|
136
|
+
} finally {
|
|
137
|
+
await core.close();
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
- `userId`、`agentId`、`sessionId` 是独立的记忆范围字段;写入时都可省略,服务端会使用默认范围。
|
|
142
|
+
- 查询时只指定需要精确匹配的字段,未指定字段按通配范围查询;响应中的默认范围字段表现为 `undefined`。
|
|
143
|
+
- `listMemorySessionMessages(sessionId, { userId, agentId })` 要求会话 ID,且 `userId`、`agentId` 至少提供一个。
|
|
144
|
+
- 分区标识由可信业务上下文提供,不替代访问权限控制。
|
|
145
|
+
|
|
146
|
+
示例会写入真实数据,建议使用测试记忆空间。新写入的记忆可能需要一定时间才能检索到,首次查询可能为空。
|
|
147
|
+
|
|
148
|
+
完整代码见 [Memory 基础示例](examples/memory.ts)。框架接入见 [LangChain](examples/langchain-server.ts)、[Google ADK](examples/google-adk.ts) 和 [Mastra](examples/mastra.ts) 示例。
|
|
149
|
+
|
|
150
|
+
## 框架集成
|
|
151
|
+
|
|
152
|
+
将模型、MCP 和 Skill 接入现有框架,不必重写 Agent 的业务逻辑。
|
|
153
|
+
|
|
154
|
+
| 框架 | 使用指南 | 示例 |
|
|
155
|
+
| --- | --- | --- |
|
|
156
|
+
| LangChain | [LangChain / LangGraph](docs/langchain.md) | [Agent 服务与 Memory](examples/langchain-server.ts) |
|
|
157
|
+
| LangGraph | [LangChain / LangGraph](docs/langchain.md) | [模型与工具循环](examples/langgraph.ts) |
|
|
158
|
+
| Google ADK | [Google ADK](docs/google-adk.md) | [Runner 与 Memory](examples/google-adk.ts) |
|
|
159
|
+
| Mastra | [Mastra](docs/mastra.md) | [Agent 与 Memory](examples/mastra.ts) |
|
|
160
|
+
| AI SDK 6 | [AI SDK](docs/ai-sdk.md) | [模型与工具循环](examples/ai-sdk.ts) |
|
|
161
|
+
|
|
162
|
+
## 提供 Agent 服务
|
|
163
|
+
|
|
164
|
+
`AgentCoreServer` 支持 AG-UI、OpenAI Chat Completions 和自定义 `ProtocolHandler`。
|
|
165
|
+
|
|
166
|
+
在仓库中运行 [最小服务示例](examples/server.ts):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm ci
|
|
170
|
+
npm run build
|
|
171
|
+
npx tsx examples/server.ts
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
示例监听 9000 端口,默认接口为 `POST /ag-ui/agent` 和 `POST /openai/v1/chat/completions`,支持流式响应。
|
|
175
|
+
|
|
176
|
+
示例使用公开包名导入,在仓库中运行前需要构建本地包。完整模型、MCP、Skill 和 Memory 服务见 [LangChain 示例](examples/langchain-server.ts),AG-UI/OpenAI 请求示例见 [调用 Agent 服务](examples/README.md#调用-agent-服务)。
|
|
177
|
+
|
|
178
|
+
框架执行流应使用对应的[事件转换器](examples/execution-events.md),不要只提取文本。AG-UI 可表达消息边界、工具调用和工具结果;OpenAI Chat Completions 按其标准表达文本和工具调用,不提供独立的工具结果流式事件。会话历史的保存与恢复仍由应用或所用框架负责。完整配置见 [Agent 服务指南](docs/server.md)。
|
|
179
|
+
|
|
180
|
+
## 使用提示
|
|
181
|
+
|
|
182
|
+
- 在应用生命周期内复用 Core,退出时调用 `await core.close()`。
|
|
183
|
+
- 模型的工具调用、Responses 和 Embedding 支持情况取决于所选模型。
|
|
184
|
+
- 仅加载可信 Skill;不需要执行命令时设置 `ALLOW_EXECUTE_COMMAND=false`。
|
|
185
|
+
- 使用 `AgentCore.auto({ logger: console })` 开启日志,不要记录 API Key 等敏感信息。
|
|
186
|
+
|
|
187
|
+
更多资源配置、框架依赖与运行命令见 [示例指南](examples/README.md)。
|
|
188
|
+
|
|
189
|
+
执行流接入参见 [框架事件转换器与协议边界](examples/execution-events.md)。展示工具执行过程时,不要只转发文本 chunk。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
|
|
3
|
+
interface AccessKeyOptions {
|
|
4
|
+
accessKeyId: string;
|
|
5
|
+
accessKeySecret: string;
|
|
6
|
+
securityToken?: string;
|
|
7
|
+
}
|
|
8
|
+
declare class AccessKeyCredential {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(values: AccessKeyOptions);
|
|
11
|
+
get accessKeyId(): string;
|
|
12
|
+
get accessKeySecret(): string;
|
|
13
|
+
get securityToken(): string | undefined;
|
|
14
|
+
[inspect.custom](): string;
|
|
15
|
+
toJSON(): string;
|
|
16
|
+
}
|
|
17
|
+
declare class ResourceCredential extends AccessKeyCredential {
|
|
18
|
+
readonly expiration: Date;
|
|
19
|
+
readonly credentialType = "ram_sts";
|
|
20
|
+
constructor(values: AccessKeyOptions & {
|
|
21
|
+
securityToken: string;
|
|
22
|
+
expiration: Date;
|
|
23
|
+
});
|
|
24
|
+
[inspect.custom](): string;
|
|
25
|
+
}
|
|
26
|
+
interface CredentialProvider {
|
|
27
|
+
get(purpose?: string): Promise<AccessKeyCredential> | AccessKeyCredential;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { AccessKeyCredential as A, type CredentialProvider as C, ResourceCredential as R, type AccessKeyOptions as a };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
|
|
3
|
+
interface AccessKeyOptions {
|
|
4
|
+
accessKeyId: string;
|
|
5
|
+
accessKeySecret: string;
|
|
6
|
+
securityToken?: string;
|
|
7
|
+
}
|
|
8
|
+
declare class AccessKeyCredential {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(values: AccessKeyOptions);
|
|
11
|
+
get accessKeyId(): string;
|
|
12
|
+
get accessKeySecret(): string;
|
|
13
|
+
get securityToken(): string | undefined;
|
|
14
|
+
[inspect.custom](): string;
|
|
15
|
+
toJSON(): string;
|
|
16
|
+
}
|
|
17
|
+
declare class ResourceCredential extends AccessKeyCredential {
|
|
18
|
+
readonly expiration: Date;
|
|
19
|
+
readonly credentialType = "ram_sts";
|
|
20
|
+
constructor(values: AccessKeyOptions & {
|
|
21
|
+
securityToken: string;
|
|
22
|
+
expiration: Date;
|
|
23
|
+
});
|
|
24
|
+
[inspect.custom](): string;
|
|
25
|
+
}
|
|
26
|
+
interface CredentialProvider {
|
|
27
|
+
get(purpose?: string): Promise<AccessKeyCredential> | AccessKeyCredential;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { AccessKeyCredential as A, type CredentialProvider as C, ResourceCredential as R, type AccessKeyOptions as a };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const DEFAULT_AGENT_SA_TOKEN_PATH = "/var/run/agentcore/agent/token";
|
|
2
|
+
interface AgentSATokenSource {
|
|
3
|
+
get(): string | Promise<string>;
|
|
4
|
+
refresh?(current: string): string | Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
declare class AgentSATokenProvider implements AgentSATokenSource {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
constructor(path?: string);
|
|
9
|
+
get(): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
declare function getAgentSAToken(source: AgentSATokenSource): Promise<string>;
|
|
12
|
+
declare function refreshAgentSAToken(source: AgentSATokenSource, current: string): Promise<string>;
|
|
13
|
+
|
|
14
|
+
export { type AgentSATokenSource as A, DEFAULT_AGENT_SA_TOKEN_PATH as D, AgentSATokenProvider as a, getAgentSAToken as g, refreshAgentSAToken as r };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const DEFAULT_AGENT_SA_TOKEN_PATH = "/var/run/agentcore/agent/token";
|
|
2
|
+
interface AgentSATokenSource {
|
|
3
|
+
get(): string | Promise<string>;
|
|
4
|
+
refresh?(current: string): string | Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
declare class AgentSATokenProvider implements AgentSATokenSource {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
constructor(path?: string);
|
|
9
|
+
get(): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
declare function getAgentSAToken(source: AgentSATokenSource): Promise<string>;
|
|
12
|
+
declare function refreshAgentSAToken(source: AgentSATokenSource, current: string): Promise<string>;
|
|
13
|
+
|
|
14
|
+
export { type AgentSATokenSource as A, DEFAULT_AGENT_SA_TOKEN_PATH as D, AgentSATokenProvider as a, getAgentSAToken as g, refreshAgentSAToken as r };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkZTWLCHCOcjs = require('../chunk-ZTWLCHCO.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkRZNQGEGJcjs = require('../chunk-RZNQGEGJ.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk2E5EWEDGcjs = require('../chunk-2E5EWEDG.cjs');
|
|
19
|
+
require('../chunk-5RKN46UU.cjs');
|
|
20
|
+
require('../chunk-LE5P3SJW.cjs');
|
|
21
|
+
require('../chunk-JSP7ZROS.cjs');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.AGENT_IDENTITY_DATA_PURPOSE = _chunkRZNQGEGJcjs.AGENT_IDENTITY_DATA_PURPOSE; exports.AccessKeyCredential = _chunkRZNQGEGJcjs.AccessKeyCredential; exports.AgentSATokenProvider = _chunk2E5EWEDGcjs.AgentSATokenProvider; exports.BoundCredential = _chunkZTWLCHCOcjs.BoundCredential; exports.BoundCredentials = _chunkZTWLCHCOcjs.BoundCredentials; exports.DEFAULT_AGENT_SA_TOKEN_PATH = _chunk2E5EWEDGcjs.DEFAULT_AGENT_SA_TOKEN_PATH; exports.HIGH_CODE_SDK_PURPOSE = _chunkRZNQGEGJcjs.HIGH_CODE_SDK_PURPOSE; exports.ResourceCredential = _chunkRZNQGEGJcjs.ResourceCredential; exports.ResourceSTSProvider = _chunkRZNQGEGJcjs.ResourceSTSProvider; exports.WorkloadAccessTokenProvider = _chunkZTWLCHCOcjs.WorkloadAccessTokenProvider; exports.getAgentSAToken = _chunk2E5EWEDGcjs.getAgentSAToken; exports.refreshAgentSAToken = _chunk2E5EWEDGcjs.refreshAgentSAToken;
|
|
36
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/auth/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,y1BAAC","file":"/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/auth/index.cjs"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { R as ResourceCredential } from '../access-key-CkoHq3S8.cjs';
|
|
2
|
+
export { A as AccessKeyCredential, a as AccessKeyOptions, C as CredentialProvider } from '../access-key-CkoHq3S8.cjs';
|
|
3
|
+
import { A as AgentSATokenSource } from '../agent-sa-token-DD1Sb8P1.cjs';
|
|
4
|
+
export { a as AgentSATokenProvider, D as DEFAULT_AGENT_SA_TOKEN_PATH, g as getAgentSAToken, r as refreshAgentSAToken } from '../agent-sa-token-DD1Sb8P1.cjs';
|
|
5
|
+
import { C as ControllerOptions } from '../controller-DWs3Sy04.cjs';
|
|
6
|
+
export { B as BoundCredential, a as BoundCredentials } from '../bound-credentials-C1fM0thh.cjs';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../logging-C8GLLg1f.cjs';
|
|
9
|
+
import '../controlplane/index.cjs';
|
|
10
|
+
|
|
11
|
+
declare const HIGH_CODE_SDK_PURPOSE = "highcode_sdk";
|
|
12
|
+
declare const AGENT_IDENTITY_DATA_PURPOSE = "agentidentitydata";
|
|
13
|
+
declare class ResourceSTSProvider {
|
|
14
|
+
private readonly controller;
|
|
15
|
+
private readonly cache;
|
|
16
|
+
private readonly pending;
|
|
17
|
+
constructor(endpoint: string, source: AgentSATokenSource, options?: ControllerOptions);
|
|
18
|
+
get(purpose?: string): Promise<ResourceCredential>;
|
|
19
|
+
close(): void;
|
|
20
|
+
private exchange;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class WorkloadAccessTokenProvider {
|
|
24
|
+
#private;
|
|
25
|
+
private readonly controller;
|
|
26
|
+
private pending?;
|
|
27
|
+
constructor(endpoint: string, source: AgentSATokenSource, options?: ControllerOptions);
|
|
28
|
+
get(): Promise<string>;
|
|
29
|
+
invalidate(token?: string): Promise<void>;
|
|
30
|
+
close(): void;
|
|
31
|
+
private exchange;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { AGENT_IDENTITY_DATA_PURPOSE, AgentSATokenSource, ControllerOptions, HIGH_CODE_SDK_PURPOSE, ResourceCredential, ResourceSTSProvider, WorkloadAccessTokenProvider };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { R as ResourceCredential } from '../access-key-CkoHq3S8.js';
|
|
2
|
+
export { A as AccessKeyCredential, a as AccessKeyOptions, C as CredentialProvider } from '../access-key-CkoHq3S8.js';
|
|
3
|
+
import { A as AgentSATokenSource } from '../agent-sa-token-DD1Sb8P1.js';
|
|
4
|
+
export { a as AgentSATokenProvider, D as DEFAULT_AGENT_SA_TOKEN_PATH, g as getAgentSAToken, r as refreshAgentSAToken } from '../agent-sa-token-DD1Sb8P1.js';
|
|
5
|
+
import { C as ControllerOptions } from '../controller-DmI4L4sP.js';
|
|
6
|
+
export { B as BoundCredential, a as BoundCredentials } from '../bound-credentials-DqT64Q2s.js';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../logging-C8GLLg1f.js';
|
|
9
|
+
import '../controlplane/index.js';
|
|
10
|
+
|
|
11
|
+
declare const HIGH_CODE_SDK_PURPOSE = "highcode_sdk";
|
|
12
|
+
declare const AGENT_IDENTITY_DATA_PURPOSE = "agentidentitydata";
|
|
13
|
+
declare class ResourceSTSProvider {
|
|
14
|
+
private readonly controller;
|
|
15
|
+
private readonly cache;
|
|
16
|
+
private readonly pending;
|
|
17
|
+
constructor(endpoint: string, source: AgentSATokenSource, options?: ControllerOptions);
|
|
18
|
+
get(purpose?: string): Promise<ResourceCredential>;
|
|
19
|
+
close(): void;
|
|
20
|
+
private exchange;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class WorkloadAccessTokenProvider {
|
|
24
|
+
#private;
|
|
25
|
+
private readonly controller;
|
|
26
|
+
private pending?;
|
|
27
|
+
constructor(endpoint: string, source: AgentSATokenSource, options?: ControllerOptions);
|
|
28
|
+
get(): Promise<string>;
|
|
29
|
+
invalidate(token?: string): Promise<void>;
|
|
30
|
+
close(): void;
|
|
31
|
+
private exchange;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { AGENT_IDENTITY_DATA_PURPOSE, AgentSATokenSource, ControllerOptions, HIGH_CODE_SDK_PURPOSE, ResourceCredential, ResourceSTSProvider, WorkloadAccessTokenProvider };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BoundCredential,
|
|
3
|
+
BoundCredentials,
|
|
4
|
+
WorkloadAccessTokenProvider
|
|
5
|
+
} from "../chunk-RBAY4MO2.js";
|
|
6
|
+
import {
|
|
7
|
+
AGENT_IDENTITY_DATA_PURPOSE,
|
|
8
|
+
AccessKeyCredential,
|
|
9
|
+
HIGH_CODE_SDK_PURPOSE,
|
|
10
|
+
ResourceCredential,
|
|
11
|
+
ResourceSTSProvider
|
|
12
|
+
} from "../chunk-IUCLCPVV.js";
|
|
13
|
+
import {
|
|
14
|
+
AgentSATokenProvider,
|
|
15
|
+
DEFAULT_AGENT_SA_TOKEN_PATH,
|
|
16
|
+
getAgentSAToken,
|
|
17
|
+
refreshAgentSAToken
|
|
18
|
+
} from "../chunk-UBP5CHU7.js";
|
|
19
|
+
import "../chunk-K3TE7625.js";
|
|
20
|
+
import "../chunk-NZL3VPJ2.js";
|
|
21
|
+
import "../chunk-MZ5UWGXS.js";
|
|
22
|
+
export {
|
|
23
|
+
AGENT_IDENTITY_DATA_PURPOSE,
|
|
24
|
+
AccessKeyCredential,
|
|
25
|
+
AgentSATokenProvider,
|
|
26
|
+
BoundCredential,
|
|
27
|
+
BoundCredentials,
|
|
28
|
+
DEFAULT_AGENT_SA_TOKEN_PATH,
|
|
29
|
+
HIGH_CODE_SDK_PURPOSE,
|
|
30
|
+
ResourceCredential,
|
|
31
|
+
ResourceSTSProvider,
|
|
32
|
+
WorkloadAccessTokenProvider,
|
|
33
|
+
getAgentSAToken,
|
|
34
|
+
refreshAgentSAToken
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|