@openagentpack/sdk 0.0.2-beta.0 → 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/NOTICE
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
OpenAgentPack SDK (@openagentpack/sdk)
|
|
2
|
+
Copyright (c) 2024-present The OpenAgentPack Authors
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at:
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
================================================================================
|
|
18
|
+
Third-Party Notices
|
|
19
|
+
================================================================================
|
|
20
|
+
|
|
21
|
+
This product includes software developed by third parties. The license for each
|
|
22
|
+
component is elected from the component's available license options as noted
|
|
23
|
+
below.
|
|
24
|
+
|
|
25
|
+
--------------------------------------------------------------------------------
|
|
26
|
+
jszip 3.10.1 — https://github.com/Stuk/jszip
|
|
27
|
+
--------------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
Upstream license: (MIT OR GPL-3.0-or-later)
|
|
30
|
+
OpenAgentPack elects the MIT License option.
|
|
31
|
+
|
|
32
|
+
The MIT License (MIT)
|
|
33
|
+
|
|
34
|
+
Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger,
|
|
35
|
+
António Afonso
|
|
36
|
+
|
|
37
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
39
|
+
in the Software without restriction, including without limitation the rights
|
|
40
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
41
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
42
|
+
furnished to do so, subject to the following conditions:
|
|
43
|
+
|
|
44
|
+
The above copyright notice and this permission notice shall be included in
|
|
45
|
+
all copies or substantial portions of the Software.
|
|
46
|
+
|
|
47
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
48
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
49
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
50
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
51
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
52
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
53
|
+
THE SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResourceAddress, a as ResourceType, C as CloudAgent, b as CloudEnvironment, c as CloudVault, E as EventStreamOptions, P as ProviderSessionEvent, d as EventListOptions, e as ProviderSessionEventList, f as PlannedAction, D as Diagnostic, A as AgentDefinition, g as AgentWithReadiness, h as AgentSyncRun } from './session-event-
|
|
2
|
-
export { i as ActionType, j as ActionTypeSchema, k as AgentDefinitionSchema, l as AgentDriftSeverity, m as AgentDriftSeveritySchema, n as AgentModel, o as AgentModelSchema, p as AgentReadiness, q as AgentReadinessSchema, r as AgentReadinessStatus, s as AgentReadinessStatusSchema, t as AgentRecoveryAction, u as AgentRecoveryActionSchema, v as AgentSkillRef, w as AgentSkillRefSchema, x as AgentSyncResult, y as AgentSyncResultSchema, z as AgentSyncRunSchema, B as AgentSyncStatus, F as AgentSyncStatusSchema, G as AgentWithReadinessSchema, H as CloudAgentSchema, I as CloudEnvironmentSchema, J as CloudVaultSchema, K as CreateSessionRequest, L as CreateSessionRequestSchema, M as CreateSessionResponse, N as CreateSessionResponseSchema, O as DiagnosticSchema, Q as DiagnosticSeverity, S as DiagnosticSeveritySchema, T as DriftKind, U as DriftKindSchema, V as GetSessionRequest, W as GetSessionRequestSchema, X as KNOWN_SESSION_EVENT_TYPES, Y as KnownSessionEventType, Z as ListCloudAgentsResponse, _ as ListCloudAgentsResponseSchema, $ as ListCloudEnvironmentsResponse, a0 as ListCloudEnvironmentsResponseSchema, a1 as ListSessionEventsRequest, a2 as ListSessionEventsRequestSchema, a3 as ListSessionEventsResponse, a4 as ListSessionEventsResponseSchema, a5 as ListSessionsRequest, a6 as ListSessionsRequestSchema, a7 as ListSessionsResponse, a8 as ListSessionsResponseSchema, a9 as PlannedActionSchema, aa as ResourceAddressSchema, ab as ResourceTypeSchema, ac as SendEventRequest, ad as SendEventRequestSchema, ae as SendEventResponse, af as SendEventResponseSchema, ag as Session, ah as SessionAgent, ai as SessionAgentSchema, aj as SessionContentBlock, ak as SessionContentBlockSchema, al as SessionEvent, am as SessionEventSchema, an as SessionEventType, ao as SessionEventTypeName, ap as SessionEventTypeSchema, aq as SessionSchema } from './session-event-
|
|
1
|
+
import { R as ResourceAddress, a as ResourceType, C as CloudAgent, b as CloudEnvironment, c as CloudVault, E as EventStreamOptions, P as ProviderSessionEvent, d as EventListOptions, e as ProviderSessionEventList, f as PlannedAction, D as Diagnostic, A as AgentDefinition, g as AgentWithReadiness, h as AgentSyncRun } from './session-event-C2ED1o1m.js';
|
|
2
|
+
export { i as ActionType, j as ActionTypeSchema, k as AgentDefinitionSchema, l as AgentDriftSeverity, m as AgentDriftSeveritySchema, n as AgentModel, o as AgentModelSchema, p as AgentReadiness, q as AgentReadinessSchema, r as AgentReadinessStatus, s as AgentReadinessStatusSchema, t as AgentRecoveryAction, u as AgentRecoveryActionSchema, v as AgentSkillRef, w as AgentSkillRefSchema, x as AgentSyncResult, y as AgentSyncResultSchema, z as AgentSyncRunSchema, B as AgentSyncStatus, F as AgentSyncStatusSchema, G as AgentWithReadinessSchema, H as CloudAgentSchema, I as CloudEnvironmentSchema, J as CloudVaultSchema, K as CreateSessionRequest, L as CreateSessionRequestSchema, M as CreateSessionResponse, N as CreateSessionResponseSchema, O as DiagnosticSchema, Q as DiagnosticSeverity, S as DiagnosticSeveritySchema, T as DriftKind, U as DriftKindSchema, V as GetSessionRequest, W as GetSessionRequestSchema, X as KNOWN_SESSION_EVENT_TYPES, Y as KnownSessionEventType, Z as ListCloudAgentsResponse, _ as ListCloudAgentsResponseSchema, $ as ListCloudEnvironmentsResponse, a0 as ListCloudEnvironmentsResponseSchema, a1 as ListSessionEventsRequest, a2 as ListSessionEventsRequestSchema, a3 as ListSessionEventsResponse, a4 as ListSessionEventsResponseSchema, a5 as ListSessionsRequest, a6 as ListSessionsRequestSchema, a7 as ListSessionsResponse, a8 as ListSessionsResponseSchema, a9 as PlannedActionSchema, aa as ResourceAddressSchema, ab as ResourceTypeSchema, ac as SendEventRequest, ad as SendEventRequestSchema, ae as SendEventResponse, af as SendEventResponseSchema, ag as Session, ah as SessionAgent, ai as SessionAgentSchema, aj as SessionContentBlock, ak as SessionContentBlockSchema, al as SessionEvent, am as SessionEventSchema, an as SessionEventType, ao as SessionEventTypeName, ap as SessionEventTypeSchema, aq as SessionSchema } from './session-event-C2ED1o1m.js';
|
|
3
3
|
import { P as ProviderFileInfo } from './file-URqwlxLf.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -610,7 +610,7 @@ function compactDeep(value) {
|
|
|
610
610
|
}
|
|
611
611
|
return value;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function stripAgentsMetadata(value) {
|
|
614
614
|
if (!value || typeof value !== "object") return void 0;
|
|
615
615
|
const out = {};
|
|
616
616
|
for (const [key, raw] of Object.entries(value)) {
|
|
@@ -653,7 +653,7 @@ function vaultToDecl(raw, rawCredentials, resourceName) {
|
|
|
653
653
|
return compactDeep({
|
|
654
654
|
display_name: raw.display_name ?? resourceName,
|
|
655
655
|
credentials,
|
|
656
|
-
metadata:
|
|
656
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
function fileToDecl(raw, filename) {
|
|
@@ -683,7 +683,7 @@ function envToDecl(raw) {
|
|
|
683
683
|
networking: config.networking,
|
|
684
684
|
packages: config.packages
|
|
685
685
|
},
|
|
686
|
-
metadata:
|
|
686
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
689
|
function agentToDecl(raw) {
|
|
@@ -741,7 +741,7 @@ function agentToDecl(raw) {
|
|
|
741
741
|
mcp_servers: mcpServerDecls,
|
|
742
742
|
skills: skillDecls,
|
|
743
743
|
multiagent: multiagentDecl,
|
|
744
|
-
metadata:
|
|
744
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
747
|
function mapEnvironment(name, decl, projectName) {
|
|
@@ -1527,7 +1527,7 @@ function vaultToDecl2(raw, rawCredentials, resourceName) {
|
|
|
1527
1527
|
return compactDeep({
|
|
1528
1528
|
display_name: raw.display_name ?? raw.name ?? resourceName,
|
|
1529
1529
|
credentials: rawCredentials.map((c, i) => credToDecl2(c, resourceName, i)),
|
|
1530
|
-
metadata:
|
|
1530
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
1531
1531
|
});
|
|
1532
1532
|
}
|
|
1533
1533
|
function fileToDecl2(raw, filename) {
|
|
@@ -1546,7 +1546,7 @@ function envToDecl2(raw) {
|
|
|
1546
1546
|
networking: config.networking,
|
|
1547
1547
|
packages: config.packages
|
|
1548
1548
|
},
|
|
1549
|
-
metadata:
|
|
1549
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
1550
1550
|
});
|
|
1551
1551
|
}
|
|
1552
1552
|
function skillToDecl2(raw, name) {
|
|
@@ -1591,7 +1591,7 @@ function agentToDecl2(raw) {
|
|
|
1591
1591
|
tools: builtinTools?.length ? { builtin: builtinTools } : void 0,
|
|
1592
1592
|
mcp_servers: mcpServerDecls,
|
|
1593
1593
|
skills: skillDecls,
|
|
1594
|
-
metadata:
|
|
1594
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
1595
1595
|
});
|
|
1596
1596
|
}
|
|
1597
1597
|
function mapMemoryStore(name, decl) {
|
|
@@ -1895,7 +1895,7 @@ var QoderAdapter = class _QoderAdapter {
|
|
|
1895
1895
|
networking: config.networking,
|
|
1896
1896
|
packages: config.packages
|
|
1897
1897
|
},
|
|
1898
|
-
metadata:
|
|
1898
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
1899
1899
|
});
|
|
1900
1900
|
}
|
|
1901
1901
|
return compactDeep({
|
|
@@ -1904,7 +1904,7 @@ var QoderAdapter = class _QoderAdapter {
|
|
|
1904
1904
|
instructions: raw.system,
|
|
1905
1905
|
tools: normalizeQoderTools(raw.tools),
|
|
1906
1906
|
mcp_servers: normalizeQoderMcpServers(raw.mcp_servers),
|
|
1907
|
-
metadata:
|
|
1907
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
1908
1908
|
});
|
|
1909
1909
|
}
|
|
1910
1910
|
async createEnvironment(name, decl) {
|
|
@@ -2330,7 +2330,7 @@ function vaultToDecl3(raw, rawCredentials, resourceName) {
|
|
|
2330
2330
|
return compactDeep({
|
|
2331
2331
|
display_name: raw.display_name ?? resourceName,
|
|
2332
2332
|
credentials: rawCredentials.map((c) => credToDecl3(c, resourceName)),
|
|
2333
|
-
metadata:
|
|
2333
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
2334
2334
|
});
|
|
2335
2335
|
}
|
|
2336
2336
|
function fileToDecl3(raw, filename) {
|
|
@@ -2355,7 +2355,7 @@ function envToDecl3(raw) {
|
|
|
2355
2355
|
networking: config.networking,
|
|
2356
2356
|
packages: config.packages
|
|
2357
2357
|
},
|
|
2358
|
-
metadata:
|
|
2358
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
2361
|
function agentToDecl3(raw) {
|
|
@@ -2394,7 +2394,7 @@ function agentToDecl3(raw) {
|
|
|
2394
2394
|
tools: builtinTools?.length ? { builtin: builtinTools } : void 0,
|
|
2395
2395
|
mcp_servers: mcpServerDecls,
|
|
2396
2396
|
skills: skillDecls,
|
|
2397
|
-
metadata:
|
|
2397
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
2398
2398
|
});
|
|
2399
2399
|
}
|
|
2400
2400
|
function mapAgent3(name, decl, refs, version, projectName, skillVersions) {
|
|
@@ -2595,7 +2595,7 @@ var BailianAdapter = class _BailianAdapter {
|
|
|
2595
2595
|
networking: config.networking,
|
|
2596
2596
|
packages: config.packages
|
|
2597
2597
|
},
|
|
2598
|
-
metadata:
|
|
2598
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
2599
2599
|
});
|
|
2600
2600
|
}
|
|
2601
2601
|
return compactDeep({
|
|
@@ -2604,7 +2604,7 @@ var BailianAdapter = class _BailianAdapter {
|
|
|
2604
2604
|
instructions: raw.system,
|
|
2605
2605
|
tools: normalizeBailianTools(raw.tools),
|
|
2606
2606
|
mcp_servers: normalizeBailianMcpServers(raw.mcp_servers),
|
|
2607
|
-
metadata:
|
|
2607
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
2608
2608
|
});
|
|
2609
2609
|
}
|
|
2610
2610
|
async exportResources(type) {
|
|
@@ -3231,7 +3231,7 @@ function vaultToDecl4(raw, rawCredentials, resourceName) {
|
|
|
3231
3231
|
return compactDeep({
|
|
3232
3232
|
display_name: raw.display_name ?? resourceName,
|
|
3233
3233
|
credentials,
|
|
3234
|
-
metadata:
|
|
3234
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
3235
3235
|
});
|
|
3236
3236
|
}
|
|
3237
3237
|
function fileToDecl4(raw, filename) {
|
|
@@ -3261,7 +3261,7 @@ function envToDecl4(raw) {
|
|
|
3261
3261
|
networking: config.networking,
|
|
3262
3262
|
packages: config.packages
|
|
3263
3263
|
},
|
|
3264
|
-
metadata:
|
|
3264
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
3265
3265
|
});
|
|
3266
3266
|
}
|
|
3267
3267
|
function agentToDecl4(raw) {
|
|
@@ -3323,7 +3323,7 @@ function agentToDecl4(raw) {
|
|
|
3323
3323
|
mcp_servers: mcpServerDecls,
|
|
3324
3324
|
skills: skillDecls,
|
|
3325
3325
|
multiagent: multiagentDecl,
|
|
3326
|
-
metadata:
|
|
3326
|
+
metadata: stripAgentsMetadata(raw.metadata)
|
|
3327
3327
|
});
|
|
3328
3328
|
}
|
|
3329
3329
|
function mapEnvironment4(name, decl, projectName, wireName) {
|
package/dist/session-events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderSessionEvent, al as SessionEvent } from './session-event-
|
|
1
|
+
import { P as ProviderSessionEvent, al as SessionEvent } from './session-event-C2ED1o1m.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
declare function sanitizeSessionEvents(events: ProviderSessionEvent[], options?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagentpack/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "OpenAgentPack SDK (Node-compatible runtime)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/modelstudioai/OpenAgentPack/issues"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=22"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"files": [
|
|
53
53
|
"dist",
|
|
54
|
-
"LICENSE"
|
|
54
|
+
"LICENSE",
|
|
55
|
+
"NOTICE"
|
|
55
56
|
],
|
|
56
57
|
"publishConfig": {
|
|
57
58
|
"access": "public",
|
|
@@ -112,8 +112,8 @@ declare const PlannedActionSchema: z.ZodObject<{
|
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
type PlannedAction = z.infer<typeof PlannedActionSchema>;
|
|
114
114
|
declare const AgentReadinessStatusSchema: z.ZodEnum<{
|
|
115
|
-
ready: "ready";
|
|
116
115
|
error: "error";
|
|
116
|
+
ready: "ready";
|
|
117
117
|
missing: "missing";
|
|
118
118
|
creating: "creating";
|
|
119
119
|
updating: "updating";
|
|
@@ -160,8 +160,8 @@ declare const AgentDefinitionSchema: z.ZodObject<{
|
|
|
160
160
|
type AgentDefinition = z.infer<typeof AgentDefinitionSchema>;
|
|
161
161
|
declare const AgentReadinessSchema: z.ZodObject<{
|
|
162
162
|
status: z.ZodEnum<{
|
|
163
|
-
ready: "ready";
|
|
164
163
|
error: "error";
|
|
164
|
+
ready: "ready";
|
|
165
165
|
missing: "missing";
|
|
166
166
|
creating: "creating";
|
|
167
167
|
updating: "updating";
|
|
@@ -276,8 +276,8 @@ declare const AgentWithReadinessSchema: z.ZodObject<{
|
|
|
276
276
|
}, z.core.$strip>;
|
|
277
277
|
readiness: z.ZodObject<{
|
|
278
278
|
status: z.ZodEnum<{
|
|
279
|
-
ready: "ready";
|
|
280
279
|
error: "error";
|
|
280
|
+
ready: "ready";
|
|
281
281
|
missing: "missing";
|
|
282
282
|
creating: "creating";
|
|
283
283
|
updating: "updating";
|
|
@@ -469,9 +469,9 @@ declare const SessionEventTypeSchema: z.ZodEnum<{
|
|
|
469
469
|
}>;
|
|
470
470
|
type SessionEventType = z.infer<typeof SessionEventTypeSchema>;
|
|
471
471
|
declare const AgentSyncStatusSchema: z.ZodEnum<{
|
|
472
|
-
failed: "failed";
|
|
473
472
|
completed: "completed";
|
|
474
473
|
blocked: "blocked";
|
|
474
|
+
failed: "failed";
|
|
475
475
|
}>;
|
|
476
476
|
type AgentSyncStatus = z.infer<typeof AgentSyncStatusSchema>;
|
|
477
477
|
declare const AgentSyncResultSchema: z.ZodObject<{
|
|
@@ -519,8 +519,8 @@ declare const AgentSyncResultSchema: z.ZodObject<{
|
|
|
519
519
|
}, z.core.$strip>>;
|
|
520
520
|
}, z.core.$strip>;
|
|
521
521
|
status: z.ZodEnum<{
|
|
522
|
-
failed: "failed";
|
|
523
522
|
success: "success";
|
|
523
|
+
failed: "failed";
|
|
524
524
|
skipped: "skipped";
|
|
525
525
|
}>;
|
|
526
526
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -530,9 +530,9 @@ declare const AgentSyncRunSchema: z.ZodObject<{
|
|
|
530
530
|
agentId: z.ZodString;
|
|
531
531
|
provider: z.ZodOptional<z.ZodString>;
|
|
532
532
|
status: z.ZodEnum<{
|
|
533
|
-
failed: "failed";
|
|
534
533
|
completed: "completed";
|
|
535
534
|
blocked: "blocked";
|
|
535
|
+
failed: "failed";
|
|
536
536
|
}>;
|
|
537
537
|
actions: z.ZodArray<z.ZodObject<{
|
|
538
538
|
action: z.ZodEnum<{
|
|
@@ -687,8 +687,8 @@ declare const AgentSyncRunSchema: z.ZodObject<{
|
|
|
687
687
|
}, z.core.$strip>>;
|
|
688
688
|
}, z.core.$strip>;
|
|
689
689
|
status: z.ZodEnum<{
|
|
690
|
-
failed: "failed";
|
|
691
690
|
success: "success";
|
|
691
|
+
failed: "failed";
|
|
692
692
|
skipped: "skipped";
|
|
693
693
|
}>;
|
|
694
694
|
error: z.ZodOptional<z.ZodString>;
|