alibabacloud-agentcore-sdk 0.1.4 → 0.1.6
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/README.md +14 -0
- package/dist/auth/index.d.cts +2 -2
- package/dist/auth/index.d.ts +2 -2
- package/dist/{bound-credentials-DqT64Q2s.d.ts → bound-credentials-CpEUcH6w.d.ts} +1 -1
- package/dist/{bound-credentials-C1fM0thh.d.cts → bound-credentials-rHDKhpQy.d.cts} +1 -1
- package/dist/{chunk-UMTUXOKE.cjs → chunk-C35QBAIS.cjs} +23 -10
- package/dist/chunk-C35QBAIS.cjs.map +1 -0
- package/dist/{chunk-JK6KPDVW.cjs → chunk-EYDYQCSJ.cjs} +45 -8
- package/dist/chunk-EYDYQCSJ.cjs.map +1 -0
- package/dist/{chunk-7UBN3SJI.js → chunk-I2SSXKT7.js} +42 -5
- package/dist/chunk-I2SSXKT7.js.map +1 -0
- package/dist/{chunk-R7NVBTPK.cjs → chunk-JT33ZCFJ.cjs} +5 -3
- package/dist/chunk-JT33ZCFJ.cjs.map +1 -0
- package/dist/{chunk-D45QSOR4.js → chunk-MXPHQGBQ.js} +23 -10
- package/dist/chunk-MXPHQGBQ.js.map +1 -0
- package/dist/{chunk-6NNPSP3O.js → chunk-XW6YGVZO.js} +5 -3
- package/dist/chunk-XW6YGVZO.js.map +1 -0
- package/dist/{client-pDzS7EZR.d.ts → client-D4f63nzj.d.ts} +1 -1
- package/dist/{client-DDU4-ygJ.d.cts → client-K_TFV6Ea.d.cts} +1 -1
- package/dist/collaboration/index.d.cts +4 -4
- package/dist/collaboration/index.d.ts +4 -4
- package/dist/{context-M9rOTifU.d.cts → context-CVUx3RZg.d.cts} +2 -1
- package/dist/{context-M9rOTifU.d.ts → context-CVUx3RZg.d.ts} +2 -1
- package/dist/controlplane/index.cjs +2 -2
- package/dist/controlplane/index.d.cts +3 -65
- package/dist/controlplane/index.d.ts +3 -65
- package/dist/controlplane/index.js +1 -1
- package/dist/{errors-BGfCbCgs.d.cts → errors-BA8gNCmW.d.cts} +1 -1
- package/dist/{errors-D_809AqR.d.ts → errors-DAxP-nfs.d.ts} +1 -1
- package/dist/index-CkDNn3fW.d.ts +71 -0
- package/dist/index-Dsu71P1g.d.cts +71 -0
- package/dist/index.cjs +160 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -9
- package/dist/index.d.ts +41 -9
- package/dist/index.js +142 -5
- package/dist/index.js.map +1 -1
- package/dist/integrations/ai-sdk.d.cts +2 -2
- package/dist/integrations/ai-sdk.d.ts +2 -2
- package/dist/integrations/google-adk.cjs +1 -1
- package/dist/integrations/google-adk.d.cts +3 -3
- package/dist/integrations/google-adk.d.ts +3 -3
- package/dist/integrations/google-adk.js +1 -1
- package/dist/integrations/langchain.cjs +1 -1
- package/dist/integrations/langchain.d.cts +4 -4
- package/dist/integrations/langchain.d.ts +4 -4
- package/dist/integrations/langchain.js +1 -1
- package/dist/integrations/langgraph.cjs +1 -1
- package/dist/integrations/langgraph.d.cts +4 -4
- package/dist/integrations/langgraph.d.ts +4 -4
- package/dist/integrations/langgraph.js +1 -1
- package/dist/integrations/mastra.cjs +1 -1
- package/dist/integrations/mastra.d.cts +3 -3
- package/dist/integrations/mastra.d.ts +3 -3
- package/dist/integrations/mastra.js +1 -1
- package/dist/{langchain-adapter-DtxU7oAi.d.cts → langchain-adapter-3o4RGnV2.d.cts} +2 -2
- package/dist/{langchain-adapter-CaTCXaeo.d.ts → langchain-adapter-sBJrE0Jd.d.ts} +2 -2
- package/dist/{loader-DrIQ37nm.d.ts → loader-BV55JAVK.d.ts} +1 -1
- package/dist/{loader-eWuJ2GSL.d.cts → loader-kC1qeJWI.d.cts} +1 -1
- package/dist/mcp/index.d.cts +2 -2
- package/dist/mcp/index.d.ts +2 -2
- package/dist/model/index.d.cts +3 -3
- package/dist/model/index.d.ts +3 -3
- package/dist/runtime/index.cjs +2 -2
- package/dist/runtime/index.d.cts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/skill/index.cjs +2 -2
- package/dist/skill/index.d.cts +3 -3
- package/dist/skill/index.d.ts +3 -3
- package/dist/skill/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6NNPSP3O.js.map +0 -1
- package/dist/chunk-7UBN3SJI.js.map +0 -1
- package/dist/chunk-D45QSOR4.js.map +0 -1
- package/dist/chunk-JK6KPDVW.cjs.map +0 -1
- package/dist/chunk-R7NVBTPK.cjs.map +0 -1
- package/dist/chunk-UMTUXOKE.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/skill/loader.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport { lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join, posix, resolve } from 'node:path';\nimport { fromBuffer, type Entry, type ZipFile } from 'yauzl';\nimport { parseDocument } from 'yaml';\nimport type { SkillArtifact } from '../controlplane/client';\nimport { ConfigError, ResourceNotConfiguredError } from '../errors';\nimport { nullLogger, type Logger } from '../logging';\n\nconst MAX_BYTES = 10 * 1024 * 1024;\nconst METADATA = '.agentcore-skill.json';\nconst writes = new Map<string, Promise<void>>();\nexport interface Skill {\n readonly name: string;\n readonly description: string;\n readonly version: string;\n readonly instruction: string;\n readonly root: string;\n readonly files: readonly string[];\n readonly source: 'local' | 'agentcore';\n readonly digest?: string;\n readonly workspaceId?: string;\n}\nexport interface SkillProvider { getSkill(name: string, version?: string): Promise<SkillArtifact>; }\nexport interface SkillsOptions {\n workspaceDir?: string;\n runtime?: () => Promise<{ workspaceId: string; provider: SkillProvider }>;\n logger?: Logger;\n}\n\nexport class Skills {\n private readonly pins = new Map<string, Promise<Skill>>();\n private readonly workspace: string;\n private readonly logger: Logger;\n constructor(private readonly options: SkillsOptions = {}) {\n this.workspace = resolve(options.workspaceDir ?? process.env.AGENTCORE_SKILL_WORKSPACE_DIR ?? '.skills/.agentcore-managed');\n this.logger = options.logger ?? nullLogger;\n }\n async local(root: string): Promise<Skill[]> {\n this.logger.info('agentcore.skill.local.load.started', { root });\n try {\n root = resolve(root);\n if (!(await lstat(root)).isDirectory()) throw new ConfigError('local Skill root is not a directory');\n const entries = await readdir(root, { withFileTypes: true });\n const directories = entries.some((entry) => entry.name === 'SKILL.md') ? [root] : entries.sort((a, b) => a.name.localeCompare(b.name)).flatMap((entry) => {\n if (entry.isSymbolicLink()) throw new ConfigError('local Skill root must not contain symbolic-link Skills');\n return entry.isDirectory() ? [join(root, entry.name)] : [];\n });\n const result: Skill[] = [];\n for (const directory of directories) {\n if ((await readdir(directory)).includes('SKILL.md')) result.push(await loadDirectory(directory));\n }\n this.logger.info('agentcore.skill.local.load.succeeded', { root, skill_count: result.length }); return result;\n } catch (error) { this.logger.warn('agentcore.skill.local.load.failed', { root, error_type: error instanceof Error ? error.name : 'Error' }); throw error; }\n }\n async managed(name: string, options: { version?: string } = {}): Promise<Skill> {\n if (!this.options.runtime) throw new ResourceNotConfiguredError('managed Skill runtime is not configured');\n const { workspaceId, provider } = await this.options.runtime();\n component(name, 'name'); component(workspaceId, 'workspace ID');\n if (options.version !== undefined) component(options.version, 'version');\n const key = JSON.stringify([workspaceId, name, options.version]);\n const cached = this.pins.get(key); if (cached) return cached;\n const pending = (async () => {\n this.logger.info('agentcore.skill.managed.load.started', { workspace_id: workspaceId, name, version: options.version ?? 'latest' });\n const artifact = await provider.getSkill(name, options.version); component(artifact.version, 'version');\n const files = await unpackArchive(artifact.archive, name);\n const hash = createHash('sha256');\n for (const [path, data] of [...files.entries()].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)) hash.update(path).update('\\0').update(data).update('\\0');\n const digest = hash.digest('hex');\n const target = join(this.workspace, workspaceId, name, artifact.version);\n const metadata = { source: 'agentcore', workspaceId, name, version: artifact.version, digest };\n // Serialize writes to the same named version across Core instances in this process.\n const write = (writes.get(target) ?? Promise.resolve()).catch(() => undefined).then(() => materialize(target, files, metadata));\n writes.set(target, write);\n try { await write; } finally { if (writes.get(target) === write) writes.delete(target); }\n const sourceFiles = ['SKILL.md', ...[...files.keys()].filter((path) => path !== 'SKILL.md').sort()];\n const skill = Object.freeze({ ...await loadDirectory(target, sourceFiles), ...metadata, source: 'agentcore' as const });\n this.logger.info('agentcore.skill.managed.load.succeeded', { workspace_id: workspaceId, name, version: artifact.version, digest });\n return skill;\n })();\n this.pins.set(key, pending);\n try { return await pending; } catch (error) {\n this.pins.delete(key); this.logger.warn('agentcore.skill.managed.load.failed', { workspace_id: workspaceId, name, error_type: error instanceof Error ? error.name : 'Error' }); throw error;\n }\n }\n}\n\nfunction component(value: string, label: string): void {\n if (!value.trim() || /[\\\\/:\\0]/.test(value) || value === '.' || value === '..') throw new ConfigError(`managed Skill ${label} is invalid`);\n}\nfunction safePath(path: string): void {\n if (!path || /[\\\\:\\0]/.test(path) || posix.isAbsolute(path) || path !== posix.normalize(path) || path.split('/').some((part) => part === '.' || part === '..') || path === METADATA) throw new ConfigError('managed Skill contains an unsafe resource path');\n}\nexport async function unpackArchive(archive: Uint8Array, name?: string, maxBytes = MAX_BYTES): Promise<Map<string, Buffer>> {\n if (!archive.length || archive.length > maxBytes) throw new ConfigError('Resource archive exceeds the size limit');\n try {\n const zip = await new Promise<ZipFile>((accept, reject) => fromBuffer(Buffer.from(archive), { lazyEntries: true, strictFileNames: true }, (error, value) => error ? reject(error) : accept(value)));\n const files = new Map<string, Buffer>(); let total = 0;\n await new Promise<void>((accept, reject) => {\n zip.on('error', reject); zip.on('end', accept);\n zip.on('entry', (entry: Entry) => { void (async () => {\n if (entry.fileName.endsWith('/')) return;\n safePath(entry.fileName);\n if (name !== undefined && !entry.fileName.startsWith(`${name}/`)) throw new ConfigError('managed Skill package must use the Skill name as its root directory');\n const path = name === undefined ? entry.fileName : entry.fileName.slice(name.length + 1); safePath(path);\n if (files.has(path)) throw new ConfigError('managed Skill package contains a duplicate path');\n if (((entry.externalFileAttributes >>> 16) & 0xf000) === 0xa000) throw new ConfigError('Skill directories must not contain symbolic links');\n if (entry.uncompressedSize > maxBytes - total) throw new ConfigError('Resource content exceeds the size limit');\n const stream = await new Promise<NodeJS.ReadableStream>((resolve, reject) => zip.openReadStream(entry, (error, stream) => error ? reject(error) : resolve(stream)));\n const chunks: Buffer[] = [];\n for await (const chunk of stream) { const data = Buffer.from(chunk); total += data.length; if (total > maxBytes) throw new ConfigError('Resource content exceeds the size limit'); chunks.push(data); }\n files.set(path, Buffer.concat(chunks));\n })().then(() => zip.readEntry(), (error) => { zip.close(); reject(error); }); });\n zip.readEntry();\n });\n if (name !== undefined && !files.has('SKILL.md')) throw new ConfigError(`managed Skill package does not contain ${name}/SKILL.md`);\n for (const path of files.keys()) {\n let parent = posix.dirname(path);\n while (parent !== '.') { if (files.has(parent)) throw new ConfigError('managed Skill contains a colliding resource path'); parent = posix.dirname(parent); }\n }\n return files;\n } catch (error) { if (error instanceof ConfigError) throw error; throw new ConfigError('managed Skill package is not a valid ZIP archive'); }\n}\n\n/** @internal Materialize a static template Skill through the existing atomic writer. */\nexport async function materializeTemplateSkill(target: string, name: string, files: Map<string, Buffer>, metadata: Record<string, string>): Promise<Skill> {\n if (!files.has('SKILL.md')) throw new ConfigError(`Static Skill ${JSON.stringify(name)} has no SKILL.md`);\n const write = (writes.get(target) ?? Promise.resolve()).catch(() => undefined).then(() => materialize(target, files, metadata));\n writes.set(target, write);\n try { await write; } finally { if (writes.get(target) === write) writes.delete(target); }\n return Object.freeze({ ...await loadDirectory(target), name, workspaceId: metadata.workspaceId, digest: metadata.digest });\n}\n\nasync function materialize(target: string, files: Map<string, Buffer>, metadata: Record<string, string>): Promise<void> {\n try {\n const stat = await lstat(target);\n if (stat.isDirectory() && !stat.isSymbolicLink()) {\n const existing: unknown = JSON.parse(await readFile(join(target, METADATA), 'utf8'));\n if (JSON.stringify(existing) === JSON.stringify(metadata)) return;\n }\n } catch (error) { if (!(error instanceof SyntaxError) && (error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n await mkdir(dirname(target), { recursive: true });\n const temporary = await mkdtemp(join(dirname(target), '.skill-'));\n try {\n for (const [path, content] of files) { const destination = join(temporary, path); await mkdir(dirname(destination), { recursive: true }); await writeFile(destination, content); }\n await writeFile(join(temporary, METADATA), JSON.stringify(metadata));\n await loadDirectory(temporary); // Do not replace a working version with invalid SKILL.md.\n await rm(target, { recursive: true, force: true });\n await rename(temporary, target);\n } finally { await rm(temporary, { recursive: true, force: true }); }\n}\n\nasync function loadDirectory(root: string, sourceFiles?: readonly string[]): Promise<Skill> {\n const files: string[] = []; let total = 0;\n async function walk(directory: string, prefix = ''): Promise<void> {\n for (const entry of (await readdir(directory, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {\n if (entry.isSymbolicLink()) throw new ConfigError('Skill directories must not contain symbolic links');\n const name = prefix + entry.name;\n if (entry.isDirectory()) await walk(join(directory, entry.name), `${name}/`);\n else if (entry.isFile() && entry.name !== METADATA) { total += (await lstat(join(directory, entry.name))).size; if (total > MAX_BYTES) throw new ConfigError('Skill content exceeds the 10 MiB size limit'); files.push(name); }\n }\n }\n if (sourceFiles) {\n // Managed packages track source files, not files generated by command execution.\n for (const name of sourceFiles) {\n const entry = await lstat(join(root, name));\n if (entry.isSymbolicLink() || !entry.isFile()) throw new ConfigError('managed Skill workspace is missing a source file');\n files.push(name);\n }\n } else await walk(root);\n const instruction = new TextDecoder('utf8', { fatal: true }).decode(await readFile(join(root, 'SKILL.md')));\n const match = /^---\\s*\\n([\\s\\S]*?)\\n---(?:\\s*\\n|$)/.exec(instruction);\n const metadata: Record<string, string> = {};\n if (match) {\n const document = parseDocument(match[1]!);\n if (document.errors.length) throw new ConfigError('SKILL.md contains invalid YAML frontmatter');\n let value: unknown;\n try { value = document.toJS({ maxAliasCount: 0 }) ?? {}; } catch { throw new ConfigError('SKILL.md contains invalid YAML frontmatter'); }\n if (!value || typeof value !== 'object' || Array.isArray(value)) throw new ConfigError('SKILL.md frontmatter must be an object');\n for (const key of ['name', 'description', 'version']) {\n const item = (value as Record<string, unknown>)[key];\n if (item !== undefined && item !== null) { if (typeof item !== 'string') throw new ConfigError(`SKILL.md frontmatter ${key} must be a string`); metadata[key] = item; }\n }\n }\n return Object.freeze({ name: metadata.name || basename(root), description: metadata.description || '', version: metadata.version || '', instruction, root, files: Object.freeze(files), source: 'local' as const });\n}\n"],"mappings":";;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,OAAO,OAAO,SAAS,UAAU,SAAS,QAAQ,IAAI,iBAAiB;AAChF,SAAS,UAAU,SAAS,MAAM,OAAO,eAAe;AACxD,SAAS,kBAA4C;AACrD,SAAS,qBAAqB;AAK9B,IAAM,YAAY,KAAK,OAAO;AAC9B,IAAM,WAAW;AACjB,IAAM,SAAS,oBAAI,IAA2B;AAmBvC,IAAM,SAAN,MAAa;AAAA,EAIlB,YAA6B,UAAyB,CAAC,GAAG;AAA7B;AAC3B,SAAK,YAAY,QAAQ,QAAQ,gBAAgB,QAAQ,IAAI,iCAAiC,4BAA4B;AAC1H,SAAK,SAAS,QAAQ,UAAU;AAAA,EAClC;AAAA,EAH6B;AAAA,EAHZ,OAAO,oBAAI,IAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EAKjB,MAAM,MAAM,MAAgC;AAC1C,SAAK,OAAO,KAAK,sCAAsC,EAAE,KAAK,CAAC;AAC/D,QAAI;AACF,aAAO,QAAQ,IAAI;AACnB,UAAI,EAAE,MAAM,MAAM,IAAI,GAAG,YAAY,EAAG,OAAM,IAAI,YAAY,qCAAqC;AACnG,YAAM,UAAU,MAAM,QAAQ,MAAM,EAAE,eAAe,KAAK,CAAC;AAC3D,YAAM,cAAc,QAAQ,KAAK,CAAC,UAAU,MAAM,SAAS,UA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
|
|
8
8
|
var RequestContext = class {
|
|
9
|
-
headers
|
|
10
|
-
|
|
9
|
+
constructor(headers, signal) {
|
|
10
|
+
this.signal = signal;
|
|
11
11
|
this.headers = Object.freeze(Object.fromEntries(Object.entries(headers).map(([k, v]) => [k.toLowerCase(), v])));
|
|
12
12
|
}
|
|
13
|
+
signal;
|
|
14
|
+
headers;
|
|
13
15
|
[inspect.custom]() {
|
|
14
16
|
return "RequestContext(headers=<redacted>)";
|
|
15
17
|
}
|
|
@@ -32,4 +34,4 @@ export {
|
|
|
32
34
|
currentContext,
|
|
33
35
|
useContext
|
|
34
36
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-XW6YGVZO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/runtime/context.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\nimport { inspect } from 'node:util';\nimport { ContextError } from '../errors';\n\nexport class RequestContext {\n readonly headers: Readonly<Record<string, string>>;\n constructor(headers: Readonly<Record<string, string>>, readonly signal?: AbortSignal) {\n this.headers = Object.freeze(Object.fromEntries(Object.entries(headers).map(([k, v]) => [k.toLowerCase(), v])));\n }\n [inspect.custom](): string { return 'RequestContext(headers=<redacted>)'; }\n toJSON(): string { return this[inspect.custom](); }\n}\nconst context = new AsyncLocalStorage<RequestContext>();\nexport function currentContext(required = true): RequestContext | undefined {\n const value = context.getStore();\n if (!value && required) throw new ContextError('no AgentCore request context is active');\n return value;\n}\nexport function useContext<T>(value: RequestContext, callback: () => T): T {\n return context.run(value, callback);\n}\n"],"mappings":";;;;;AAAA,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAGjB,IAAM,iBAAN,MAAqB;AAAA,EAE1B,YAAY,SAAoD,QAAsB;AAAtB;AAC9D,SAAK,UAAU,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,EAChH;AAAA,EAFgE;AAAA,EADvD;AAAA,EAIT,CAAC,QAAQ,MAAM,IAAY;AAAE,WAAO;AAAA,EAAsC;AAAA,EAC1E,SAAiB;AAAE,WAAO,KAAK,QAAQ,MAAM,EAAE;AAAA,EAAG;AACpD;AACA,IAAM,UAAU,IAAI,kBAAkC;AAC/C,SAAS,eAAe,WAAW,MAAkC;AAC1E,QAAM,QAAQ,QAAQ,SAAS;AAC/B,MAAI,CAAC,SAAS,SAAU,OAAM,IAAI,aAAa,wCAAwC;AACvF,SAAO;AACT;AACO,SAAS,WAAc,OAAuB,UAAsB;AACzE,SAAO,QAAQ,IAAI,OAAO,QAAQ;AACpC;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { L as Logger } from './logging-C8GLLg1f.js';
|
|
3
3
|
import { A as AgentConfig } from './config-CMkmMtx1.js';
|
|
4
|
-
import { ModelDescriptor } from './
|
|
4
|
+
import { M as ModelDescriptor } from './index-CkDNn3fW.js';
|
|
5
5
|
|
|
6
6
|
type ModelProtocol = 'openai' | 'anthropic';
|
|
7
7
|
type ModelMessage = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { L as Logger } from './logging-C8GLLg1f.cjs';
|
|
3
3
|
import { A as AgentConfig } from './config-CMkmMtx1.cjs';
|
|
4
|
-
import { ModelDescriptor } from './
|
|
4
|
+
import { M as ModelDescriptor } from './index-Dsu71P1g.cjs';
|
|
5
5
|
|
|
6
6
|
type ModelProtocol = 'openai' | 'anthropic';
|
|
7
7
|
type ModelMessage = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
import { C as ConfigError, a as ContextError, A as AgentCoreError } from '../errors-
|
|
3
|
-
export { b as CollaborationOptions, c as CollaborationRuntime, W as Worker } from '../errors-
|
|
2
|
+
import { C as ConfigError, a as ContextError, A as AgentCoreError } from '../errors-BA8gNCmW.cjs';
|
|
3
|
+
export { b as CollaborationOptions, c as CollaborationRuntime, W as Worker } from '../errors-BA8gNCmW.cjs';
|
|
4
4
|
import '../common-BSXkQfxI.cjs';
|
|
5
5
|
import '../logging-C8GLLg1f.cjs';
|
|
6
|
-
import '../loader-
|
|
7
|
-
import '../
|
|
6
|
+
import '../loader-kC1qeJWI.cjs';
|
|
7
|
+
import '../index-Dsu71P1g.cjs';
|
|
8
8
|
import '../access-key-CkoHq3S8.cjs';
|
|
9
9
|
|
|
10
10
|
declare class CollaborationTurnContext {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
import { C as ConfigError, a as ContextError, A as AgentCoreError } from '../errors-
|
|
3
|
-
export { b as CollaborationOptions, c as CollaborationRuntime, W as Worker } from '../errors-
|
|
2
|
+
import { C as ConfigError, a as ContextError, A as AgentCoreError } from '../errors-DAxP-nfs.js';
|
|
3
|
+
export { b as CollaborationOptions, c as CollaborationRuntime, W as Worker } from '../errors-DAxP-nfs.js';
|
|
4
4
|
import '../common-BSXkQfxI.js';
|
|
5
5
|
import '../logging-C8GLLg1f.js';
|
|
6
|
-
import '../loader-
|
|
7
|
-
import '../
|
|
6
|
+
import '../loader-BV55JAVK.js';
|
|
7
|
+
import '../index-CkDNn3fW.js';
|
|
8
8
|
import '../access-key-CkoHq3S8.js';
|
|
9
9
|
|
|
10
10
|
declare class CollaborationTurnContext {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
|
|
3
3
|
declare class RequestContext {
|
|
4
|
+
readonly signal?: AbortSignal | undefined;
|
|
4
5
|
readonly headers: Readonly<Record<string, string>>;
|
|
5
|
-
constructor(headers: Readonly<Record<string, string
|
|
6
|
+
constructor(headers: Readonly<Record<string, string>>, signal?: AbortSignal | undefined);
|
|
6
7
|
[inspect.custom](): string;
|
|
7
8
|
toJSON(): string;
|
|
8
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
|
|
3
3
|
declare class RequestContext {
|
|
4
|
+
readonly signal?: AbortSignal | undefined;
|
|
4
5
|
readonly headers: Readonly<Record<string, string>>;
|
|
5
|
-
constructor(headers: Readonly<Record<string, string
|
|
6
|
+
constructor(headers: Readonly<Record<string, string>>, signal?: AbortSignal | undefined);
|
|
6
7
|
[inspect.custom](): string;
|
|
7
8
|
toJSON(): string;
|
|
8
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEYDYQCSJcjs = require('../chunk-EYDYQCSJ.cjs');
|
|
4
4
|
require('../chunk-RJCDBVZ6.cjs');
|
|
5
5
|
require('../chunk-25KH5XKG.cjs');
|
|
6
6
|
require('../chunk-KQTZUIMI.cjs');
|
|
@@ -8,5 +8,5 @@ require('../chunk-NXMTTQQK.cjs');
|
|
|
8
8
|
require('../chunk-V4A6MJ42.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.AgentCoreControlPlane =
|
|
11
|
+
exports.AgentCoreControlPlane = _chunkEYDYQCSJcjs.AgentCoreControlPlane;
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,66 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
export { A as AgentCoreControlPlane, b as ControlPlaneOptions, C as CredentialMetadata, a as MCPDescriptor, M as ModelDescriptor, S as SkillArtifact } from '../index-Dsu71P1g.cjs';
|
|
2
|
+
import '../access-key-CkoHq3S8.cjs';
|
|
3
3
|
import 'node:util';
|
|
4
|
-
|
|
5
|
-
interface ModelDescriptor {
|
|
6
|
-
readonly connectionId: string;
|
|
7
|
-
readonly connectionName: string;
|
|
8
|
-
readonly protocol: string;
|
|
9
|
-
readonly providerType: string;
|
|
10
|
-
readonly modelId: string;
|
|
11
|
-
readonly modelName: string;
|
|
12
|
-
readonly contextSize?: number;
|
|
13
|
-
readonly maxTokens?: number;
|
|
14
|
-
readonly capabilities: Readonly<Record<string, boolean>>;
|
|
15
|
-
}
|
|
16
|
-
interface MCPDescriptor {
|
|
17
|
-
readonly mcpServerId: string;
|
|
18
|
-
readonly name: string;
|
|
19
|
-
readonly protocol: string;
|
|
20
|
-
readonly type: string;
|
|
21
|
-
readonly status: string;
|
|
22
|
-
}
|
|
23
|
-
interface SkillArtifact {
|
|
24
|
-
version: string;
|
|
25
|
-
archive: Uint8Array;
|
|
26
|
-
}
|
|
27
|
-
interface CredentialMetadata {
|
|
28
|
-
readonly credentialId: string;
|
|
29
|
-
readonly name: string;
|
|
30
|
-
readonly credentialType: string;
|
|
31
|
-
readonly resourceScope: string;
|
|
32
|
-
readonly resourceRefs: ReadonlyArray<{
|
|
33
|
-
resourceType: string;
|
|
34
|
-
resourceId: string;
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
interface ControlPlaneOptions {
|
|
38
|
-
workspaceId: string;
|
|
39
|
-
regionId: string;
|
|
40
|
-
accessKeyCredential?: AccessKeyCredential;
|
|
41
|
-
resourceSTSProvider?: CredentialProvider;
|
|
42
|
-
endpoint?: string;
|
|
43
|
-
logger?: Logger;
|
|
44
|
-
}
|
|
45
|
-
declare class AgentCoreControlPlane {
|
|
46
|
-
private readonly options;
|
|
47
|
-
readonly workspaceId: string;
|
|
48
|
-
readonly regionId: string;
|
|
49
|
-
private readonly endpoint?;
|
|
50
|
-
private readonly protocol?;
|
|
51
|
-
private discoveredEndpoint?;
|
|
52
|
-
private readonly logger;
|
|
53
|
-
private readonly lifetime;
|
|
54
|
-
constructor(options: ControlPlaneOptions);
|
|
55
|
-
resolveModel(connectionName: string, modelName?: string): Promise<ModelDescriptor>;
|
|
56
|
-
resolveMCP(name: string): Promise<MCPDescriptor>;
|
|
57
|
-
getSkill(name: string, version?: string): Promise<SkillArtifact>;
|
|
58
|
-
close(): void;
|
|
59
|
-
resolveCredential(name: string): Promise<CredentialMetadata>;
|
|
60
|
-
private runtimeOptions;
|
|
61
|
-
private client;
|
|
62
|
-
private invoke;
|
|
63
|
-
private downloadSkill;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { AgentCoreControlPlane, type ControlPlaneOptions, type CredentialMetadata, type MCPDescriptor, type ModelDescriptor, type SkillArtifact };
|
|
4
|
+
import '../logging-C8GLLg1f.cjs';
|
|
@@ -1,66 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
export { A as AgentCoreControlPlane, b as ControlPlaneOptions, C as CredentialMetadata, a as MCPDescriptor, M as ModelDescriptor, S as SkillArtifact } from '../index-CkDNn3fW.js';
|
|
2
|
+
import '../access-key-CkoHq3S8.js';
|
|
3
3
|
import 'node:util';
|
|
4
|
-
|
|
5
|
-
interface ModelDescriptor {
|
|
6
|
-
readonly connectionId: string;
|
|
7
|
-
readonly connectionName: string;
|
|
8
|
-
readonly protocol: string;
|
|
9
|
-
readonly providerType: string;
|
|
10
|
-
readonly modelId: string;
|
|
11
|
-
readonly modelName: string;
|
|
12
|
-
readonly contextSize?: number;
|
|
13
|
-
readonly maxTokens?: number;
|
|
14
|
-
readonly capabilities: Readonly<Record<string, boolean>>;
|
|
15
|
-
}
|
|
16
|
-
interface MCPDescriptor {
|
|
17
|
-
readonly mcpServerId: string;
|
|
18
|
-
readonly name: string;
|
|
19
|
-
readonly protocol: string;
|
|
20
|
-
readonly type: string;
|
|
21
|
-
readonly status: string;
|
|
22
|
-
}
|
|
23
|
-
interface SkillArtifact {
|
|
24
|
-
version: string;
|
|
25
|
-
archive: Uint8Array;
|
|
26
|
-
}
|
|
27
|
-
interface CredentialMetadata {
|
|
28
|
-
readonly credentialId: string;
|
|
29
|
-
readonly name: string;
|
|
30
|
-
readonly credentialType: string;
|
|
31
|
-
readonly resourceScope: string;
|
|
32
|
-
readonly resourceRefs: ReadonlyArray<{
|
|
33
|
-
resourceType: string;
|
|
34
|
-
resourceId: string;
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
interface ControlPlaneOptions {
|
|
38
|
-
workspaceId: string;
|
|
39
|
-
regionId: string;
|
|
40
|
-
accessKeyCredential?: AccessKeyCredential;
|
|
41
|
-
resourceSTSProvider?: CredentialProvider;
|
|
42
|
-
endpoint?: string;
|
|
43
|
-
logger?: Logger;
|
|
44
|
-
}
|
|
45
|
-
declare class AgentCoreControlPlane {
|
|
46
|
-
private readonly options;
|
|
47
|
-
readonly workspaceId: string;
|
|
48
|
-
readonly regionId: string;
|
|
49
|
-
private readonly endpoint?;
|
|
50
|
-
private readonly protocol?;
|
|
51
|
-
private discoveredEndpoint?;
|
|
52
|
-
private readonly logger;
|
|
53
|
-
private readonly lifetime;
|
|
54
|
-
constructor(options: ControlPlaneOptions);
|
|
55
|
-
resolveModel(connectionName: string, modelName?: string): Promise<ModelDescriptor>;
|
|
56
|
-
resolveMCP(name: string): Promise<MCPDescriptor>;
|
|
57
|
-
getSkill(name: string, version?: string): Promise<SkillArtifact>;
|
|
58
|
-
close(): void;
|
|
59
|
-
resolveCredential(name: string): Promise<CredentialMetadata>;
|
|
60
|
-
private runtimeOptions;
|
|
61
|
-
private client;
|
|
62
|
-
private invoke;
|
|
63
|
-
private downloadSkill;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { AgentCoreControlPlane, type ControlPlaneOptions, type CredentialMetadata, type MCPDescriptor, type ModelDescriptor, type SkillArtifact };
|
|
4
|
+
import '../logging-C8GLLg1f.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as Tool } from './common-BSXkQfxI.cjs';
|
|
2
2
|
import { L as Logger } from './logging-C8GLLg1f.cjs';
|
|
3
|
-
import { S as Skill } from './loader-
|
|
3
|
+
import { S as Skill } from './loader-kC1qeJWI.cjs';
|
|
4
4
|
|
|
5
5
|
/** Stable base-SDK contract; Worker implementation lives in the independently installed addon. */
|
|
6
6
|
interface Worker {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as Tool } from './common-BSXkQfxI.js';
|
|
2
2
|
import { L as Logger } from './logging-C8GLLg1f.js';
|
|
3
|
-
import { S as Skill } from './loader-
|
|
3
|
+
import { S as Skill } from './loader-BV55JAVK.js';
|
|
4
4
|
|
|
5
5
|
/** Stable base-SDK contract; Worker implementation lives in the independently installed addon. */
|
|
6
6
|
interface Worker {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { A as AccessKeyCredential, C as CredentialProvider } from './access-key-CkoHq3S8.js';
|
|
2
|
+
import { L as Logger } from './logging-C8GLLg1f.js';
|
|
3
|
+
|
|
4
|
+
interface ModelDescriptor {
|
|
5
|
+
readonly connectionId: string;
|
|
6
|
+
readonly connectionName: string;
|
|
7
|
+
readonly protocol: string;
|
|
8
|
+
readonly providerType: string;
|
|
9
|
+
readonly modelId: string;
|
|
10
|
+
readonly modelName: string;
|
|
11
|
+
readonly contextSize?: number;
|
|
12
|
+
readonly maxTokens?: number;
|
|
13
|
+
readonly capabilities: Readonly<Record<string, boolean>>;
|
|
14
|
+
}
|
|
15
|
+
interface MCPDescriptor {
|
|
16
|
+
readonly mcpServerId: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly protocol: string;
|
|
19
|
+
readonly type: string;
|
|
20
|
+
readonly status: string;
|
|
21
|
+
}
|
|
22
|
+
interface SkillArtifact {
|
|
23
|
+
version: string;
|
|
24
|
+
archive: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
interface TemplateArtifact {
|
|
27
|
+
version: string;
|
|
28
|
+
archive: Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
interface CredentialMetadata {
|
|
31
|
+
readonly credentialId: string;
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly credentialType: string;
|
|
34
|
+
readonly resourceScope: string;
|
|
35
|
+
readonly resourceRefs: ReadonlyArray<{
|
|
36
|
+
resourceType: string;
|
|
37
|
+
resourceId: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
interface ControlPlaneOptions {
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
regionId: string;
|
|
43
|
+
accessKeyCredential?: AccessKeyCredential;
|
|
44
|
+
resourceSTSProvider?: CredentialProvider;
|
|
45
|
+
endpoint?: string;
|
|
46
|
+
logger?: Logger;
|
|
47
|
+
}
|
|
48
|
+
declare class AgentCoreControlPlane {
|
|
49
|
+
private readonly options;
|
|
50
|
+
readonly workspaceId: string;
|
|
51
|
+
readonly regionId: string;
|
|
52
|
+
private readonly endpoint?;
|
|
53
|
+
private readonly protocol?;
|
|
54
|
+
private discoveredEndpoint?;
|
|
55
|
+
private readonly logger;
|
|
56
|
+
private readonly lifetime;
|
|
57
|
+
constructor(options: ControlPlaneOptions);
|
|
58
|
+
resolveModel(connectionName: string, modelName?: string): Promise<ModelDescriptor>;
|
|
59
|
+
resolveMCP(name: string): Promise<MCPDescriptor>;
|
|
60
|
+
getSkill(name: string, version?: string): Promise<SkillArtifact>;
|
|
61
|
+
resolveSkillVersion(name: string, selectorType: string, value: string): Promise<string>;
|
|
62
|
+
getTemplate(name: string, version?: string): Promise<TemplateArtifact>;
|
|
63
|
+
close(): void;
|
|
64
|
+
resolveCredential(name: string): Promise<CredentialMetadata>;
|
|
65
|
+
private runtimeOptions;
|
|
66
|
+
private client;
|
|
67
|
+
private invoke;
|
|
68
|
+
private downloadSkill;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { AgentCoreControlPlane as A, type CredentialMetadata as C, type ModelDescriptor as M, type SkillArtifact as S, type TemplateArtifact as T, type MCPDescriptor as a, type ControlPlaneOptions as b };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { A as AccessKeyCredential, C as CredentialProvider } from './access-key-CkoHq3S8.cjs';
|
|
2
|
+
import { L as Logger } from './logging-C8GLLg1f.cjs';
|
|
3
|
+
|
|
4
|
+
interface ModelDescriptor {
|
|
5
|
+
readonly connectionId: string;
|
|
6
|
+
readonly connectionName: string;
|
|
7
|
+
readonly protocol: string;
|
|
8
|
+
readonly providerType: string;
|
|
9
|
+
readonly modelId: string;
|
|
10
|
+
readonly modelName: string;
|
|
11
|
+
readonly contextSize?: number;
|
|
12
|
+
readonly maxTokens?: number;
|
|
13
|
+
readonly capabilities: Readonly<Record<string, boolean>>;
|
|
14
|
+
}
|
|
15
|
+
interface MCPDescriptor {
|
|
16
|
+
readonly mcpServerId: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly protocol: string;
|
|
19
|
+
readonly type: string;
|
|
20
|
+
readonly status: string;
|
|
21
|
+
}
|
|
22
|
+
interface SkillArtifact {
|
|
23
|
+
version: string;
|
|
24
|
+
archive: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
interface TemplateArtifact {
|
|
27
|
+
version: string;
|
|
28
|
+
archive: Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
interface CredentialMetadata {
|
|
31
|
+
readonly credentialId: string;
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly credentialType: string;
|
|
34
|
+
readonly resourceScope: string;
|
|
35
|
+
readonly resourceRefs: ReadonlyArray<{
|
|
36
|
+
resourceType: string;
|
|
37
|
+
resourceId: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
interface ControlPlaneOptions {
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
regionId: string;
|
|
43
|
+
accessKeyCredential?: AccessKeyCredential;
|
|
44
|
+
resourceSTSProvider?: CredentialProvider;
|
|
45
|
+
endpoint?: string;
|
|
46
|
+
logger?: Logger;
|
|
47
|
+
}
|
|
48
|
+
declare class AgentCoreControlPlane {
|
|
49
|
+
private readonly options;
|
|
50
|
+
readonly workspaceId: string;
|
|
51
|
+
readonly regionId: string;
|
|
52
|
+
private readonly endpoint?;
|
|
53
|
+
private readonly protocol?;
|
|
54
|
+
private discoveredEndpoint?;
|
|
55
|
+
private readonly logger;
|
|
56
|
+
private readonly lifetime;
|
|
57
|
+
constructor(options: ControlPlaneOptions);
|
|
58
|
+
resolveModel(connectionName: string, modelName?: string): Promise<ModelDescriptor>;
|
|
59
|
+
resolveMCP(name: string): Promise<MCPDescriptor>;
|
|
60
|
+
getSkill(name: string, version?: string): Promise<SkillArtifact>;
|
|
61
|
+
resolveSkillVersion(name: string, selectorType: string, value: string): Promise<string>;
|
|
62
|
+
getTemplate(name: string, version?: string): Promise<TemplateArtifact>;
|
|
63
|
+
close(): void;
|
|
64
|
+
resolveCredential(name: string): Promise<CredentialMetadata>;
|
|
65
|
+
private runtimeOptions;
|
|
66
|
+
private client;
|
|
67
|
+
private invoke;
|
|
68
|
+
private downloadSkill;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { AgentCoreControlPlane as A, type CredentialMetadata as C, type ModelDescriptor as M, type SkillArtifact as S, type TemplateArtifact as T, type MCPDescriptor as a, type ControlPlaneOptions as b };
|