@xemahq/llm-registry-api-client 0.2.0 → 0.3.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/dist/endpoints/agent-agents/agent-agents.d.ts +66 -0
- package/dist/endpoints/agent-agents/agent-agents.js +217 -0
- package/dist/endpoints/agent-definitions/agent-definitions.d.ts +43 -43
- package/dist/endpoints/agent-definitions/agent-definitions.js +108 -108
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/agentBiomeAvailabilityDto.d.ts +13 -0
- package/dist/models/agentBiomeAvailabilityDto.js +9 -0
- package/dist/models/agentCapabilityLayerDto.d.ts +15 -0
- package/dist/models/agentCapabilityLayerDto.js +2 -0
- package/dist/models/agentCapabilityLayerDtoMayEditRepos.d.ts +12 -0
- package/dist/models/agentCapabilityLayerDtoMayEditRepos.js +14 -0
- package/dist/models/agentCapabilityLayerDtoWritePolicy.d.ts +13 -0
- package/dist/models/agentCapabilityLayerDtoWritePolicy.js +15 -0
- package/dist/models/agentControllerListParams.d.ts +12 -0
- package/dist/models/agentControllerListParams.js +9 -0
- package/dist/models/agentControllerResolveDraftCapableParams.d.ts +10 -0
- package/dist/models/agentControllerResolveDraftCapableParams.js +9 -0
- package/dist/models/agentControllerResolveParams.d.ts +10 -0
- package/dist/models/agentControllerResolveParams.js +9 -0
- package/dist/models/agentCredentialDto.d.ts +16 -0
- package/dist/models/agentCredentialDto.js +2 -0
- package/dist/models/agentEnvVarDto.d.ts +12 -0
- package/dist/models/agentEnvVarDto.js +9 -0
- package/dist/models/agentKernelControllerBrowseTalentPoolParams.d.ts +25 -0
- package/dist/models/agentKernelControllerBrowseTalentPoolParams.js +9 -0
- package/dist/models/agentKernelControllerListDefinitionsParams.d.ts +15 -0
- package/dist/models/agentKernelControllerListDefinitionsParams.js +2 -0
- package/dist/models/agentKernelControllerListInteractiveCatalogParams.d.ts +21 -0
- package/dist/models/agentKernelControllerListInteractiveCatalogParams.js +9 -0
- package/dist/models/agentKernelControllerResolveAgentBlocksParams.d.ts +13 -0
- package/dist/models/agentKernelControllerResolveAgentBlocksParams.js +9 -0
- package/dist/models/agentKernelControllerResolveAgentBundleFileAgentMode.d.ts +12 -0
- package/dist/models/agentKernelControllerResolveAgentBundleFileAgentMode.js +14 -0
- package/dist/models/agentKernelControllerResolveAgentBundleFileParams.d.ts +14 -0
- package/dist/models/agentKernelControllerResolveAgentBundleFileParams.js +2 -0
- package/dist/models/agentKernelResponseDto.d.ts +58 -0
- package/dist/models/agentKernelResponseDto.js +2 -0
- package/dist/models/agentKernelResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/agentKernelResponseDtoDataEnvelope.js +2 -0
- package/dist/models/agentKernelResponseDtoDefinitionHash.d.ts +10 -0
- package/dist/models/agentKernelResponseDtoDefinitionHash.js +9 -0
- package/dist/models/agentKernelResponseDtoModelClass.d.ts +15 -0
- package/dist/models/agentKernelResponseDtoModelClass.js +17 -0
- package/dist/models/agentKernelResponseDtoPaginatedEnvelope.d.ts +13 -0
- package/dist/models/agentKernelResponseDtoPaginatedEnvelope.js +2 -0
- package/dist/models/agentModelOverrideDto.d.ts +20 -0
- package/dist/models/agentModelOverrideDto.js +2 -0
- package/dist/models/agentModelOverrideDtoKind.d.ts +12 -0
- package/dist/models/agentModelOverrideDtoKind.js +14 -0
- package/dist/models/agentModelOverrideDtoModelClass.d.ts +15 -0
- package/dist/models/agentModelOverrideDtoModelClass.js +17 -0
- package/dist/models/agentMountLayoutDto.d.ts +20 -0
- package/dist/models/agentMountLayoutDto.js +2 -0
- package/dist/models/agentMountLayoutDtoInputs.d.ts +13 -0
- package/dist/models/agentMountLayoutDtoInputs.js +9 -0
- package/dist/models/agentMountLayoutDtoMounts.d.ts +13 -0
- package/dist/models/agentMountLayoutDtoMounts.js +9 -0
- package/dist/models/agentMountLayoutDtoSeedFilesItem.d.ts +10 -0
- package/dist/models/agentMountLayoutDtoSeedFilesItem.js +9 -0
- package/dist/models/agentNodeDto.d.ts +31 -0
- package/dist/models/agentNodeDto.js +2 -0
- package/dist/models/agentNodeDtoPermission.d.ts +13 -0
- package/dist/models/agentNodeDtoPermission.js +9 -0
- package/dist/models/agentOutputSurfaceDto.d.ts +25 -0
- package/dist/models/agentOutputSurfaceDto.js +2 -0
- package/dist/models/agentOutputSurfaceDtoMode.d.ts +12 -0
- package/dist/models/agentOutputSurfaceDtoMode.js +14 -0
- package/dist/models/agentPermissionsDto.d.ts +11 -0
- package/dist/models/agentPermissionsDto.js +2 -0
- package/dist/models/agentPermissionsToolsDto.d.ts +12 -0
- package/dist/models/agentPermissionsToolsDto.js +2 -0
- package/dist/models/agentPersistenceDto.d.ts +14 -0
- package/dist/models/agentPersistenceDto.js +2 -0
- package/dist/models/agentPersistenceDtoOverrides.d.ts +13 -0
- package/dist/models/agentPersistenceDtoOverrides.js +9 -0
- package/dist/models/agentRefDto.d.ts +12 -0
- package/dist/models/agentRefDto.js +9 -0
- package/dist/models/agentResponseDto.d.ts +42 -0
- package/dist/models/agentResponseDto.js +2 -0
- package/dist/models/agentResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/agentResponseDtoDataEnvelope.js +2 -0
- package/dist/models/agentResponseDtoLifecycle.d.ts +13 -0
- package/dist/models/agentResponseDtoLifecycle.js +15 -0
- package/dist/models/agentResponseDtoPaginatedEnvelope.d.ts +13 -0
- package/dist/models/agentResponseDtoPaginatedEnvelope.js +2 -0
- package/dist/models/agentRunConfigDto.d.ts +15 -0
- package/dist/models/agentRunConfigDto.js +9 -0
- package/dist/models/agentSkillRefDto.d.ts +12 -0
- package/dist/models/agentSkillRefDto.js +9 -0
- package/dist/models/agentToolRefDto.d.ts +16 -0
- package/dist/models/agentToolRefDto.js +2 -0
- package/dist/models/agentToolRefDtoKind.d.ts +12 -0
- package/dist/models/agentToolRefDtoKind.js +14 -0
- package/dist/models/agentWorkingFileDto.d.ts +18 -0
- package/dist/models/agentWorkingFileDto.js +2 -0
- package/dist/models/agentWorkingFileDtoFormat.d.ts +15 -0
- package/dist/models/agentWorkingFileDtoFormat.js +17 -0
- package/dist/models/agentWorkingFileDtoSourceRef.d.ts +10 -0
- package/dist/models/agentWorkingFileDtoSourceRef.js +9 -0
- package/dist/models/agentWorkingFileDtoSyncDirection.d.ts +13 -0
- package/dist/models/agentWorkingFileDtoSyncDirection.js +15 -0
- package/dist/models/agentWorkspaceDto.d.ts +26 -0
- package/dist/models/agentWorkspaceDto.js +2 -0
- package/dist/models/createAgentDto.d.ts +27 -0
- package/dist/models/createAgentDto.js +2 -0
- package/dist/models/createAgentKernelDto.d.ts +35 -0
- package/dist/models/createAgentKernelDto.js +2 -0
- package/dist/models/createAgentKernelDtoModelClass.d.ts +18 -0
- package/dist/models/createAgentKernelDtoModelClass.js +17 -0
- package/dist/models/index.d.ts +59 -59
- package/dist/models/index.js +59 -59
- package/dist/models/publishAgentDto.d.ts +19 -0
- package/dist/models/publishAgentDto.js +2 -0
- package/dist/models/resolvedAgentKernelResponseDto.d.ts +22 -0
- package/dist/models/resolvedAgentKernelResponseDto.js +2 -0
- package/dist/models/resolvedAgentKernelResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/resolvedAgentKernelResponseDtoDataEnvelope.js +2 -0
- package/dist/models/resolvedAgentKernelResponseDtoModelClass.d.ts +15 -0
- package/dist/models/resolvedAgentKernelResponseDtoModelClass.js +17 -0
- package/dist/models/resolvedAgentResponseDto.d.ts +12 -11
- package/dist/models/updateAgentDto.d.ts +18 -0
- package/dist/models/updateAgentDto.js +2 -0
- package/dist/models/updateAgentKernelDto.d.ts +20 -0
- package/dist/models/updateAgentKernelDto.js +2 -0
- package/dist/models/updateAgentKernelDtoModelClass.d.ts +15 -0
- package/dist/models/updateAgentKernelDtoModelClass.js +17 -0
- package/package.json +2 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.16.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* LLM Registry API
|
|
5
|
+
* Central registry for LLM providers, models, and per-project model configuration
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentControllerListParams, AgentControllerResolveDraftCapableParams, AgentControllerResolveParams, AgentResponseDtoDataEnvelope, AgentResponseDtoPaginatedEnvelope, CreateAgentDto, PublishAgentDto, RescopeDto, ResolvedAgentResponseDtoDataEnvelope, UpdateAgentDto } from '../../models';
|
|
9
|
+
export declare const getAgentControllerCreateUrl: () => string;
|
|
10
|
+
/**
|
|
11
|
+
* @summary Create an Agent. Created in draft lifecycle; publish separately.
|
|
12
|
+
*/
|
|
13
|
+
export declare const agentControllerCreate: (createAgentDto: CreateAgentDto, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
14
|
+
export declare const getAgentControllerListUrl: (params: AgentControllerListParams) => string;
|
|
15
|
+
/**
|
|
16
|
+
* @summary List Agent Agents for the org.
|
|
17
|
+
*/
|
|
18
|
+
export declare const agentControllerList: (params: AgentControllerListParams, options?: RequestInit) => Promise<AgentResponseDtoPaginatedEnvelope>;
|
|
19
|
+
export declare const getAgentControllerGetUrl: (id: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* @summary Get a single Agent by id.
|
|
22
|
+
*/
|
|
23
|
+
export declare const agentControllerGet: (id: string, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
24
|
+
export declare const getAgentControllerUpdateUrl: (id: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* @summary Update a draft Agent. Published/archived compositions are immutable.
|
|
27
|
+
*/
|
|
28
|
+
export declare const agentControllerUpdate: (id: string, updateAgentDto: UpdateAgentDto, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
29
|
+
export declare const getAgentControllerDeleteUrl: (id: string) => string;
|
|
30
|
+
/**
|
|
31
|
+
* @summary Delete a draft Agent. Published/archived rows are kept.
|
|
32
|
+
*/
|
|
33
|
+
export declare const agentControllerDelete: (id: string, options?: RequestInit) => Promise<unknown>;
|
|
34
|
+
export declare const getAgentControllerPublishDraftUrl: (slug: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* @summary Publish a draft revision of an Agent as a NEW immutable `published` version. The service:
|
|
37
|
+
|
|
38
|
+
1. Loads the draft row by (`slug`, `fromDraftRevisionId`).
|
|
39
|
+
2. Computes the next version by applying `semverBump` to the latest published version for `slug`.
|
|
40
|
+
3. Creates a new `published` Agent row at the bumped version (immutable; the only state the resolver serves).
|
|
41
|
+
4. Archives the source draft as a "consumed" lineage marker.
|
|
42
|
+
5. Emits `xema.composition.published.v1`.
|
|
43
|
+
|
|
44
|
+
Mediated by `composition:publish@1` against xema-capability-router (fail-CLOSED — a gateway 5xx aborts the publish). Typed denials map to the closed `AgentPublishError` set.
|
|
45
|
+
*/
|
|
46
|
+
export declare const agentControllerPublishDraft: (slug: string, publishAgentDto: PublishAgentDto, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
47
|
+
export declare const getAgentControllerArchiveUrl: (id: string) => string;
|
|
48
|
+
/**
|
|
49
|
+
* @summary Archive an Agent version. Archived rows are never resolved.
|
|
50
|
+
*/
|
|
51
|
+
export declare const agentControllerArchive: (id: string, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
52
|
+
export declare const getAgentControllerRescopeUrl: (id: string) => string;
|
|
53
|
+
/**
|
|
54
|
+
* @summary Re-scope an Agent — promote its owner UP the scope ladder (the "add to project" / "publish to org" action). Legal promotions: user → project|org, project → org. Touches only the owner columns; the slug, version and node tree are unchanged, so it is allowed in any lifecycle state. Illegal promotions / non-owner attempts fail fast with 400/403.
|
|
55
|
+
*/
|
|
56
|
+
export declare const agentControllerRescope: (id: string, rescopeDto: RescopeDto, options?: RequestInit) => Promise<AgentResponseDtoDataEnvelope>;
|
|
57
|
+
export declare const getAgentControllerResolveUrl: (ref: string, params: AgentControllerResolveParams) => string;
|
|
58
|
+
/**
|
|
59
|
+
* @summary Resolve a composition by `slug@version` (or bare `slug` = latest published) into the runtime-facing tree (agent versions pinned, capability envelope present). agent-session-api and the workflow runtime call this at session/dispatch time.
|
|
60
|
+
*/
|
|
61
|
+
export declare const agentControllerResolve: (ref: string, params: AgentControllerResolveParams, options?: RequestInit) => Promise<ResolvedAgentResponseDtoDataEnvelope>;
|
|
62
|
+
export declare const getAgentControllerResolveDraftCapableUrl: (id: string, params: AgentControllerResolveDraftCapableParams) => string;
|
|
63
|
+
/**
|
|
64
|
+
* @summary Resolve a composition by row id into the runtime-facing tree, allowing a DRAFT composition. Used only by the Agent Studio sandbox harness so an author can test an in-progress composition before publishing. An archived composition is still refused.
|
|
65
|
+
*/
|
|
66
|
+
export declare const agentControllerResolveDraftCapable: (id: string, params: AgentControllerResolveDraftCapableParams, options?: RequestInit) => Promise<ResolvedAgentResponseDtoDataEnvelope>;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.agentControllerResolveDraftCapable = exports.getAgentControllerResolveDraftCapableUrl = exports.agentControllerResolve = exports.getAgentControllerResolveUrl = exports.agentControllerRescope = exports.getAgentControllerRescopeUrl = exports.agentControllerArchive = exports.getAgentControllerArchiveUrl = exports.agentControllerPublishDraft = exports.getAgentControllerPublishDraftUrl = exports.agentControllerDelete = exports.getAgentControllerDeleteUrl = exports.agentControllerUpdate = exports.getAgentControllerUpdateUrl = exports.agentControllerGet = exports.getAgentControllerGetUrl = exports.agentControllerList = exports.getAgentControllerListUrl = exports.agentControllerCreate = exports.getAgentControllerCreateUrl = void 0;
|
|
4
|
+
const custom_fetch_1 = require("../../custom-fetch");
|
|
5
|
+
const getAgentControllerCreateUrl = () => {
|
|
6
|
+
return `/compositions`;
|
|
7
|
+
};
|
|
8
|
+
exports.getAgentControllerCreateUrl = getAgentControllerCreateUrl;
|
|
9
|
+
/**
|
|
10
|
+
* @summary Create an Agent. Created in draft lifecycle; publish separately.
|
|
11
|
+
*/
|
|
12
|
+
const agentControllerCreate = async (createAgentDto, options) => {
|
|
13
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerCreateUrl)(), {
|
|
14
|
+
...options,
|
|
15
|
+
method: 'POST',
|
|
16
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
17
|
+
body: JSON.stringify(createAgentDto)
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.agentControllerCreate = agentControllerCreate;
|
|
21
|
+
const getAgentControllerListUrl = (params) => {
|
|
22
|
+
const normalizedParams = new URLSearchParams();
|
|
23
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
24
|
+
if (value === undefined)
|
|
25
|
+
return;
|
|
26
|
+
if (value === null) {
|
|
27
|
+
normalizedParams.append(key, 'null');
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
for (const item of value) {
|
|
32
|
+
if (item === undefined || item === null)
|
|
33
|
+
continue;
|
|
34
|
+
normalizedParams.append(key, item.toString());
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
normalizedParams.append(key, value.toString());
|
|
39
|
+
});
|
|
40
|
+
const stringifiedParams = normalizedParams.toString();
|
|
41
|
+
return stringifiedParams.length > 0 ? `/compositions?${stringifiedParams}` : `/compositions`;
|
|
42
|
+
};
|
|
43
|
+
exports.getAgentControllerListUrl = getAgentControllerListUrl;
|
|
44
|
+
/**
|
|
45
|
+
* @summary List Agent Agents for the org.
|
|
46
|
+
*/
|
|
47
|
+
const agentControllerList = async (params, options) => {
|
|
48
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerListUrl)(params), {
|
|
49
|
+
...options,
|
|
50
|
+
method: 'GET'
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
exports.agentControllerList = agentControllerList;
|
|
54
|
+
const getAgentControllerGetUrl = (id) => {
|
|
55
|
+
return `/compositions/${id}`;
|
|
56
|
+
};
|
|
57
|
+
exports.getAgentControllerGetUrl = getAgentControllerGetUrl;
|
|
58
|
+
/**
|
|
59
|
+
* @summary Get a single Agent by id.
|
|
60
|
+
*/
|
|
61
|
+
const agentControllerGet = async (id, options) => {
|
|
62
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerGetUrl)(id), {
|
|
63
|
+
...options,
|
|
64
|
+
method: 'GET'
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
exports.agentControllerGet = agentControllerGet;
|
|
68
|
+
const getAgentControllerUpdateUrl = (id) => {
|
|
69
|
+
return `/compositions/${id}`;
|
|
70
|
+
};
|
|
71
|
+
exports.getAgentControllerUpdateUrl = getAgentControllerUpdateUrl;
|
|
72
|
+
/**
|
|
73
|
+
* @summary Update a draft Agent. Published/archived compositions are immutable.
|
|
74
|
+
*/
|
|
75
|
+
const agentControllerUpdate = async (id, updateAgentDto, options) => {
|
|
76
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerUpdateUrl)(id), {
|
|
77
|
+
...options,
|
|
78
|
+
method: 'PATCH',
|
|
79
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
80
|
+
body: JSON.stringify(updateAgentDto)
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
exports.agentControllerUpdate = agentControllerUpdate;
|
|
84
|
+
const getAgentControllerDeleteUrl = (id) => {
|
|
85
|
+
return `/compositions/${id}`;
|
|
86
|
+
};
|
|
87
|
+
exports.getAgentControllerDeleteUrl = getAgentControllerDeleteUrl;
|
|
88
|
+
/**
|
|
89
|
+
* @summary Delete a draft Agent. Published/archived rows are kept.
|
|
90
|
+
*/
|
|
91
|
+
const agentControllerDelete = async (id, options) => {
|
|
92
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerDeleteUrl)(id), {
|
|
93
|
+
...options,
|
|
94
|
+
method: 'DELETE'
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
exports.agentControllerDelete = agentControllerDelete;
|
|
98
|
+
const getAgentControllerPublishDraftUrl = (slug) => {
|
|
99
|
+
return `/compositions/${slug}/publish`;
|
|
100
|
+
};
|
|
101
|
+
exports.getAgentControllerPublishDraftUrl = getAgentControllerPublishDraftUrl;
|
|
102
|
+
/**
|
|
103
|
+
* @summary Publish a draft revision of an Agent as a NEW immutable `published` version. The service:
|
|
104
|
+
|
|
105
|
+
1. Loads the draft row by (`slug`, `fromDraftRevisionId`).
|
|
106
|
+
2. Computes the next version by applying `semverBump` to the latest published version for `slug`.
|
|
107
|
+
3. Creates a new `published` Agent row at the bumped version (immutable; the only state the resolver serves).
|
|
108
|
+
4. Archives the source draft as a "consumed" lineage marker.
|
|
109
|
+
5. Emits `xema.composition.published.v1`.
|
|
110
|
+
|
|
111
|
+
Mediated by `composition:publish@1` against xema-capability-router (fail-CLOSED — a gateway 5xx aborts the publish). Typed denials map to the closed `AgentPublishError` set.
|
|
112
|
+
*/
|
|
113
|
+
const agentControllerPublishDraft = async (slug, publishAgentDto, options) => {
|
|
114
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerPublishDraftUrl)(slug), {
|
|
115
|
+
...options,
|
|
116
|
+
method: 'POST',
|
|
117
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
118
|
+
body: JSON.stringify(publishAgentDto)
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
exports.agentControllerPublishDraft = agentControllerPublishDraft;
|
|
122
|
+
const getAgentControllerArchiveUrl = (id) => {
|
|
123
|
+
return `/compositions/${id}/archive`;
|
|
124
|
+
};
|
|
125
|
+
exports.getAgentControllerArchiveUrl = getAgentControllerArchiveUrl;
|
|
126
|
+
/**
|
|
127
|
+
* @summary Archive an Agent version. Archived rows are never resolved.
|
|
128
|
+
*/
|
|
129
|
+
const agentControllerArchive = async (id, options) => {
|
|
130
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerArchiveUrl)(id), {
|
|
131
|
+
...options,
|
|
132
|
+
method: 'PATCH'
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
exports.agentControllerArchive = agentControllerArchive;
|
|
136
|
+
const getAgentControllerRescopeUrl = (id) => {
|
|
137
|
+
return `/compositions/${id}/rescope`;
|
|
138
|
+
};
|
|
139
|
+
exports.getAgentControllerRescopeUrl = getAgentControllerRescopeUrl;
|
|
140
|
+
/**
|
|
141
|
+
* @summary Re-scope an Agent — promote its owner UP the scope ladder (the "add to project" / "publish to org" action). Legal promotions: user → project|org, project → org. Touches only the owner columns; the slug, version and node tree are unchanged, so it is allowed in any lifecycle state. Illegal promotions / non-owner attempts fail fast with 400/403.
|
|
142
|
+
*/
|
|
143
|
+
const agentControllerRescope = async (id, rescopeDto, options) => {
|
|
144
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerRescopeUrl)(id), {
|
|
145
|
+
...options,
|
|
146
|
+
method: 'POST',
|
|
147
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
148
|
+
body: JSON.stringify(rescopeDto)
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
exports.agentControllerRescope = agentControllerRescope;
|
|
152
|
+
const getAgentControllerResolveUrl = (ref, params) => {
|
|
153
|
+
const normalizedParams = new URLSearchParams();
|
|
154
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
155
|
+
if (value === undefined)
|
|
156
|
+
return;
|
|
157
|
+
if (value === null) {
|
|
158
|
+
normalizedParams.append(key, 'null');
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (Array.isArray(value)) {
|
|
162
|
+
for (const item of value) {
|
|
163
|
+
if (item === undefined || item === null)
|
|
164
|
+
continue;
|
|
165
|
+
normalizedParams.append(key, item.toString());
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
normalizedParams.append(key, value.toString());
|
|
170
|
+
});
|
|
171
|
+
const stringifiedParams = normalizedParams.toString();
|
|
172
|
+
return stringifiedParams.length > 0 ? `/compositions/resolve/${ref}?${stringifiedParams}` : `/compositions/resolve/${ref}`;
|
|
173
|
+
};
|
|
174
|
+
exports.getAgentControllerResolveUrl = getAgentControllerResolveUrl;
|
|
175
|
+
/**
|
|
176
|
+
* @summary Resolve a composition by `slug@version` (or bare `slug` = latest published) into the runtime-facing tree (agent versions pinned, capability envelope present). agent-session-api and the workflow runtime call this at session/dispatch time.
|
|
177
|
+
*/
|
|
178
|
+
const agentControllerResolve = async (ref, params, options) => {
|
|
179
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerResolveUrl)(ref, params), {
|
|
180
|
+
...options,
|
|
181
|
+
method: 'GET'
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
exports.agentControllerResolve = agentControllerResolve;
|
|
185
|
+
const getAgentControllerResolveDraftCapableUrl = (id, params) => {
|
|
186
|
+
const normalizedParams = new URLSearchParams();
|
|
187
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
188
|
+
if (value === undefined)
|
|
189
|
+
return;
|
|
190
|
+
if (value === null) {
|
|
191
|
+
normalizedParams.append(key, 'null');
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (Array.isArray(value)) {
|
|
195
|
+
for (const item of value) {
|
|
196
|
+
if (item === undefined || item === null)
|
|
197
|
+
continue;
|
|
198
|
+
normalizedParams.append(key, item.toString());
|
|
199
|
+
}
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
normalizedParams.append(key, value.toString());
|
|
203
|
+
});
|
|
204
|
+
const stringifiedParams = normalizedParams.toString();
|
|
205
|
+
return stringifiedParams.length > 0 ? `/compositions/${id}/resolved?${stringifiedParams}` : `/compositions/${id}/resolved`;
|
|
206
|
+
};
|
|
207
|
+
exports.getAgentControllerResolveDraftCapableUrl = getAgentControllerResolveDraftCapableUrl;
|
|
208
|
+
/**
|
|
209
|
+
* @summary Resolve a composition by row id into the runtime-facing tree, allowing a DRAFT composition. Used only by the Agent Studio sandbox harness so an author can test an in-progress composition before publishing. An archived composition is still refused.
|
|
210
|
+
*/
|
|
211
|
+
const agentControllerResolveDraftCapable = async (id, params, options) => {
|
|
212
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getAgentControllerResolveDraftCapableUrl)(id, params), {
|
|
213
|
+
...options,
|
|
214
|
+
method: 'GET'
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
exports.agentControllerResolveDraftCapable = agentControllerResolveDraftCapable;
|
|
@@ -5,109 +5,109 @@
|
|
|
5
5
|
* Central registry for LLM providers, models, and per-project model configuration
|
|
6
6
|
* OpenAPI spec version: 0.1.0
|
|
7
7
|
*/
|
|
8
|
-
import type { AgentConfigBlocksResponseDtoDataEnvelope,
|
|
9
|
-
export declare const
|
|
8
|
+
import type { AgentConfigBlocksResponseDtoDataEnvelope, AgentKernelControllerBrowseTalentPoolParams, AgentKernelControllerListDefinitionsParams, AgentKernelControllerListInteractiveCatalogParams, AgentKernelControllerResolveAgentBlocksParams, AgentKernelControllerResolveAgentBundleFileParams, AgentKernelResponseDtoDataEnvelope, AgentKernelResponseDtoPaginatedEnvelope, AgentProfileDtoDataEnvelope, AgentProfileDtoPaginatedEnvelope, BundleFileResponseDtoDataEnvelope, CreateAgentKernelDto, CreateProjectAgentOverrideDto, OrgInteractiveSubagentsResponseDtoDataEnvelope, ProjectAgentOverrideResponseDtoDataEnvelope, ProjectAgentOverrideResponseDtoPaginatedEnvelope, RescopeDto, ResolveFullResponseDtoDataEnvelope, ResolvedAgentKernelResponseDtoDataEnvelope, ResolvedConfigSnapshotResponseDtoDataEnvelope, UpdateAgentKernelDto, UpdateProjectAgentOverrideDto } from '../../models';
|
|
9
|
+
export declare const getAgentKernelControllerListDefinitionsUrl: (params?: AgentKernelControllerListDefinitionsParams) => string;
|
|
10
10
|
/**
|
|
11
11
|
* @summary List agent definitions. Biome-attributed rows are filtered through `@xemahq/biome-governance-client` against the caller org's enablement view; agents shipped by disabled biomes are hidden.
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
13
|
+
export declare const agentKernelControllerListDefinitions: (params?: AgentKernelControllerListDefinitionsParams, options?: RequestInit) => Promise<AgentKernelResponseDtoPaginatedEnvelope>;
|
|
14
|
+
export declare const getAgentKernelControllerCreateDefinitionUrl: () => string;
|
|
15
15
|
/**
|
|
16
16
|
* @summary Create an agent definition
|
|
17
17
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
18
|
+
export declare const agentKernelControllerCreateDefinition: (createAgentKernelDto: CreateAgentKernelDto, options?: RequestInit) => Promise<AgentKernelResponseDtoDataEnvelope>;
|
|
19
|
+
export declare const getAgentKernelControllerBrowseTalentPoolUrl: (params?: AgentKernelControllerBrowseTalentPoolParams) => string;
|
|
20
20
|
/**
|
|
21
21
|
* @summary Browse the talent pool — paginated, filterable agent profiles
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
23
|
+
export declare const agentKernelControllerBrowseTalentPool: (params?: AgentKernelControllerBrowseTalentPoolParams, options?: RequestInit) => Promise<AgentProfileDtoPaginatedEnvelope>;
|
|
24
|
+
export declare const getAgentKernelControllerGetTalentPoolProfileUrl: (slug: string) => string;
|
|
25
25
|
/**
|
|
26
26
|
* @summary Get agent profile by slug from the talent pool
|
|
27
27
|
*/
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
28
|
+
export declare const agentKernelControllerGetTalentPoolProfile: (slug: string, options?: RequestInit) => Promise<AgentProfileDtoDataEnvelope>;
|
|
29
|
+
export declare const getAgentKernelControllerGetTalentPoolStatsUrl: (slug: string) => string;
|
|
30
30
|
/**
|
|
31
31
|
* @summary Get agent usage stats (v1 stub)
|
|
32
32
|
*/
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
33
|
+
export declare const agentKernelControllerGetTalentPoolStats: (slug: string, options?: RequestInit) => Promise<unknown>;
|
|
34
|
+
export declare const getAgentKernelControllerListInteractiveCatalogUrl: (params?: AgentKernelControllerListInteractiveCatalogParams) => string;
|
|
35
35
|
/**
|
|
36
36
|
* @summary List agents available for interactive sessions — filtered by supportsAgentSessions=true
|
|
37
37
|
*/
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
38
|
+
export declare const agentKernelControllerListInteractiveCatalog: (params?: AgentKernelControllerListInteractiveCatalogParams, options?: RequestInit) => Promise<AgentKernelResponseDtoPaginatedEnvelope>;
|
|
39
|
+
export declare const getAgentKernelControllerListOrgInteractiveSubagentsUrl: () => string;
|
|
40
40
|
/**
|
|
41
41
|
* @summary Internal: list org-defined subagents eligible for mounting on interactive workers. Consumed by opencode-pool at session-acquire time so org-defined agents are staged in /workspace/.opencode/agents/<slug>.md. Returns only org-owned (NOT system) isActive definitions with executionMode=subagent.
|
|
42
42
|
*/
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
43
|
+
export declare const agentKernelControllerListOrgInteractiveSubagents: (options?: RequestInit) => Promise<OrgInteractiveSubagentsResponseDtoDataEnvelope>;
|
|
44
|
+
export declare const getAgentKernelControllerResolveAgentBundleFileUrl: (slug: string, params: AgentKernelControllerResolveAgentBundleFileParams) => string;
|
|
45
45
|
/**
|
|
46
46
|
* @summary Internal: resolve a single agent's `.opencode/agents/<slug>.md` content for the mount-apply pipeline. Honors project → org → biome → system precedence. `agentMode` controls the rendered frontmatter `mode` field (primary or subagent).
|
|
47
47
|
*/
|
|
48
|
-
export declare const
|
|
49
|
-
export declare const
|
|
48
|
+
export declare const agentKernelControllerResolveAgentBundleFile: (slug: string, params: AgentKernelControllerResolveAgentBundleFileParams, options?: RequestInit) => Promise<BundleFileResponseDtoDataEnvelope>;
|
|
49
|
+
export declare const getAgentKernelControllerResolveAgentBlocksUrl: (params: AgentKernelControllerResolveAgentBlocksParams) => string;
|
|
50
50
|
/**
|
|
51
51
|
* @summary Internal: resolve the per-agent OpenCode runtime config blocks (description/color/steps/temperature/tools/permission) for an explicit, closed slug set. Used by opencode-pool-api at allocation time. Honors project → org → biome → system precedence. Unknown slugs raise 404. The "fetch every agent at scope" mode was deleted in Phase B3 — sessions must declare their closure (primary + intrinsic floor + DSL overrides).
|
|
52
52
|
*/
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
53
|
+
export declare const agentKernelControllerResolveAgentBlocks: (params: AgentKernelControllerResolveAgentBlocksParams, options?: RequestInit) => Promise<AgentConfigBlocksResponseDtoDataEnvelope>;
|
|
54
|
+
export declare const getAgentKernelControllerResolveInstructionSectionBundleFileUrl: (sectionKey: string) => string;
|
|
55
55
|
/**
|
|
56
56
|
* @summary Internal: resolve a single instruction section's content for the mount-apply pipeline. Mounted at `/workspace/.xema/instructions/<sectionKey>.md` and auto-discovered by OpenCode via the static `instructions` glob in base opencode.jsonc.
|
|
57
57
|
*/
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
58
|
+
export declare const agentKernelControllerResolveInstructionSectionBundleFile: (sectionKey: string, options?: RequestInit) => Promise<BundleFileResponseDtoDataEnvelope>;
|
|
59
|
+
export declare const getAgentKernelControllerResolveFullConfigUrl: (slug: string) => string;
|
|
60
60
|
/**
|
|
61
61
|
* @summary Resolve the complete agent configuration (base + overrides + tools + skills)
|
|
62
62
|
*/
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
63
|
+
export declare const agentKernelControllerResolveFullConfig: (slug: string, options?: RequestInit) => Promise<ResolveFullResponseDtoDataEnvelope>;
|
|
64
|
+
export declare const getAgentKernelControllerGetResolvedSnapshotUrl: (snapshotId: string) => string;
|
|
65
65
|
/**
|
|
66
66
|
* @summary Get a persisted resolved config snapshot for audit, replay, and debugging
|
|
67
67
|
*/
|
|
68
|
-
export declare const
|
|
69
|
-
export declare const
|
|
68
|
+
export declare const agentKernelControllerGetResolvedSnapshot: (snapshotId: string, options?: RequestInit) => Promise<ResolvedConfigSnapshotResponseDtoDataEnvelope>;
|
|
69
|
+
export declare const getAgentKernelControllerGetDefinitionBySlugUrl: (slug: string) => string;
|
|
70
70
|
/**
|
|
71
71
|
* @summary Get agent definition by slug
|
|
72
72
|
*/
|
|
73
|
-
export declare const
|
|
74
|
-
export declare const
|
|
73
|
+
export declare const agentKernelControllerGetDefinitionBySlug: (slug: string, options?: RequestInit) => Promise<AgentKernelResponseDtoDataEnvelope>;
|
|
74
|
+
export declare const getAgentKernelControllerUpdateDefinitionUrl: (id: string) => string;
|
|
75
75
|
/**
|
|
76
76
|
* @summary Update an agent definition
|
|
77
77
|
*/
|
|
78
|
-
export declare const
|
|
79
|
-
export declare const
|
|
78
|
+
export declare const agentKernelControllerUpdateDefinition: (id: string, updateAgentKernelDto: UpdateAgentKernelDto, options?: RequestInit) => Promise<AgentKernelResponseDtoDataEnvelope>;
|
|
79
|
+
export declare const getAgentKernelControllerDeleteDefinitionUrl: (id: string) => string;
|
|
80
80
|
/**
|
|
81
81
|
* @summary Delete an agent definition
|
|
82
82
|
*/
|
|
83
|
-
export declare const
|
|
84
|
-
export declare const
|
|
83
|
+
export declare const agentKernelControllerDeleteDefinition: (id: string, options?: RequestInit) => Promise<unknown>;
|
|
84
|
+
export declare const getAgentKernelControllerRescopeDefinitionUrl: (id: string) => string;
|
|
85
85
|
/**
|
|
86
86
|
* @summary Re-scope an agent definition — promote its owner UP the scope ladder (the "add to project" / "publish to org" action). Legal promotions: user → project|org, project → org. Content is unchanged; only the owner columns move. Illegal promotions and non-owner attempts fail fast with 400/403.
|
|
87
87
|
*/
|
|
88
|
-
export declare const
|
|
89
|
-
export declare const
|
|
88
|
+
export declare const agentKernelControllerRescopeDefinition: (id: string, rescopeDto: RescopeDto, options?: RequestInit) => Promise<AgentKernelResponseDtoDataEnvelope>;
|
|
89
|
+
export declare const getAgentKernelControllerListOverridesUrl: (projectId: string) => string;
|
|
90
90
|
/**
|
|
91
91
|
* @summary List project-level agent overrides
|
|
92
92
|
*/
|
|
93
|
-
export declare const
|
|
94
|
-
export declare const
|
|
93
|
+
export declare const agentKernelControllerListOverrides: (projectId: string, options?: RequestInit) => Promise<ProjectAgentOverrideResponseDtoPaginatedEnvelope>;
|
|
94
|
+
export declare const getAgentKernelControllerCreateOverrideUrl: (projectId: string) => string;
|
|
95
95
|
/**
|
|
96
96
|
* @summary Create a project-level agent override
|
|
97
97
|
*/
|
|
98
|
-
export declare const
|
|
99
|
-
export declare const
|
|
98
|
+
export declare const agentKernelControllerCreateOverride: (projectId: string, createProjectAgentOverrideDto: CreateProjectAgentOverrideDto, options?: RequestInit) => Promise<ProjectAgentOverrideResponseDtoDataEnvelope>;
|
|
99
|
+
export declare const getAgentKernelControllerUpdateOverrideUrl: (projectId: string, id: string) => string;
|
|
100
100
|
/**
|
|
101
101
|
* @summary Update a project-level agent override
|
|
102
102
|
*/
|
|
103
|
-
export declare const
|
|
104
|
-
export declare const
|
|
103
|
+
export declare const agentKernelControllerUpdateOverride: (projectId: string, id: string, updateProjectAgentOverrideDto: UpdateProjectAgentOverrideDto, options?: RequestInit) => Promise<ProjectAgentOverrideResponseDtoDataEnvelope>;
|
|
104
|
+
export declare const getAgentKernelControllerDeleteOverrideUrl: (projectId: string, id: string) => string;
|
|
105
105
|
/**
|
|
106
106
|
* @summary Delete a project-level agent override
|
|
107
107
|
*/
|
|
108
|
-
export declare const
|
|
109
|
-
export declare const
|
|
108
|
+
export declare const agentKernelControllerDeleteOverride: (projectId: string, id: string, options?: RequestInit) => Promise<unknown>;
|
|
109
|
+
export declare const getAgentKernelControllerResolveAgentUrl: (projectId: string, slug: string) => string;
|
|
110
110
|
/**
|
|
111
111
|
* @summary Resolve effective agent config for a project (base + overrides)
|
|
112
112
|
*/
|
|
113
|
-
export declare const
|
|
113
|
+
export declare const agentKernelControllerResolveAgent: (projectId: string, slug: string, options?: RequestInit) => Promise<ResolvedAgentKernelResponseDtoDataEnvelope>;
|