@amodalai/core 0.1.10 → 0.1.12
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/src/admin/admin-agent.d.ts +34 -0
- package/dist/src/admin/admin-agent.js +160 -0
- package/dist/src/admin/admin-agent.js.map +1 -0
- package/dist/src/admin/admin-loader.d.ts +22 -0
- package/dist/src/admin/admin-loader.js +70 -0
- package/dist/src/admin/admin-loader.js.map +1 -0
- package/dist/src/admin/index.d.ts +8 -0
- package/dist/src/admin/index.js +8 -0
- package/dist/src/admin/index.js.map +1 -0
- package/dist/src/amodal-config.d.ts +1 -5
- package/dist/src/amodal-config.js +3 -5
- package/dist/src/amodal-config.js.map +1 -1
- package/dist/src/eval/eval-runner.d.ts +1 -1
- package/dist/src/eval/eval-runner.js +1 -1
- package/dist/src/eval/eval-runner.js.map +1 -1
- package/dist/src/eval/eval-session-provider.d.ts +1 -1
- package/dist/src/eval/eval-session-provider.js +1 -1
- package/dist/src/eval/eval-session-provider.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/knowledge/kb-formatter.d.ts +1 -1
- package/dist/src/knowledge/kb-formatter.js +2 -11
- package/dist/src/knowledge/kb-formatter.js.map +1 -1
- package/dist/src/knowledge/kb-index.d.ts +2 -2
- package/dist/src/knowledge/kb-index.js +2 -5
- package/dist/src/knowledge/kb-index.js.map +1 -1
- package/dist/src/knowledge/kb-types.d.ts +5 -7
- package/dist/src/knowledge/knowledge-store.d.ts +1 -4
- package/dist/src/knowledge/knowledge-store.js +6 -16
- package/dist/src/knowledge/knowledge-store.js.map +1 -1
- package/dist/src/knowledge/propose-kb-update.d.ts +1 -1
- package/dist/src/knowledge/propose-kb-update.js +3 -7
- package/dist/src/knowledge/propose-kb-update.js.map +1 -1
- package/dist/src/knowledge/propose-knowledge.d.ts +1 -1
- package/dist/src/knowledge/propose-knowledge.js +3 -7
- package/dist/src/knowledge/propose-knowledge.js.map +1 -1
- package/dist/src/packages/config-deps.d.ts +4 -4
- package/dist/src/packages/config-deps.js +6 -8
- package/dist/src/packages/config-deps.js.map +1 -1
- package/dist/src/packages/lock-file.d.ts +19 -13
- package/dist/src/packages/lock-file.js +27 -26
- package/dist/src/packages/lock-file.js.map +1 -1
- package/dist/src/packages/npm-context.d.ts +12 -11
- package/dist/src/packages/npm-context.js +36 -73
- package/dist/src/packages/npm-context.js.map +1 -1
- package/dist/src/packages/package-types.d.ts +85 -293
- package/dist/src/packages/package-types.js +63 -103
- package/dist/src/packages/package-types.js.map +1 -1
- package/dist/src/packages/resolver.d.ts +8 -19
- package/dist/src/packages/resolver.js +182 -284
- package/dist/src/packages/resolver.js.map +1 -1
- package/dist/src/platform/config-builder.js +1 -4
- package/dist/src/platform/config-builder.js.map +1 -1
- package/dist/src/platform/platform-client.d.ts +8 -8
- package/dist/src/platform/platform-client.js +13 -16
- package/dist/src/platform/platform-client.js.map +1 -1
- package/dist/src/platform/platform-types.d.ts +0 -2
- package/dist/src/repo/config-schema.d.ts +31 -31
- package/dist/src/repo/connection-schemas.d.ts +31 -6
- package/dist/src/repo/connection-schemas.js +13 -2
- package/dist/src/repo/connection-schemas.js.map +1 -1
- package/dist/src/repo/local-reader.js +12 -121
- package/dist/src/repo/local-reader.js.map +1 -1
- package/dist/src/repo/parsers.js +2 -2
- package/dist/src/repo/parsers.js.map +1 -1
- package/dist/src/repo/repo-types.d.ts +1 -1
- package/dist/src/repo/tool-types.d.ts +2 -2
- package/dist/src/runtime/connection-bridge.js +4 -1
- package/dist/src/runtime/connection-bridge.js.map +1 -1
- package/dist/src/runtime/explore-tool.js +1 -1
- package/dist/src/runtime/explore-tool.js.map +1 -1
- package/dist/src/sdk.js +6 -17
- package/dist/src/sdk.js.map +1 -1
- package/dist/src/snapshot/snapshot-types.d.ts +186 -90
- package/dist/src/stores/store-backend.d.ts +8 -8
- package/dist/src/tool-context.d.ts +2 -2
- package/dist/src/tool-registration.js +3 -3
- package/dist/src/tool-registration.js.map +1 -1
- package/dist/src/tools/definitions/amodal-tools.js +5 -5
- package/dist/src/tools/definitions/amodal-tools.js.map +1 -1
- package/dist/src/tools/request-tool.js +1 -1
- package/dist/src/tools/store-query-tool.d.ts +2 -2
- package/dist/src/tools/store-query-tool.js +9 -9
- package/dist/src/tools/store-query-tool.js.map +1 -1
- package/dist/src/tools/store-write-tool.d.ts +2 -2
- package/dist/src/tools/store-write-tool.js +8 -8
- package/dist/src/tools/store-write-tool.js.map +1 -1
- package/dist/src/versions/version-bundle-types.d.ts +18 -18
- package/dist/src/versions/version-bundle-types.js +2 -2
- package/dist/src/versions/version-bundle-types.js.map +1 -1
- package/dist/src/widgets/present-tool.js +2 -2
- package/dist/src/widgets/present-tool.js.map +1 -1
- package/dist/src/widgets/widget-types.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { PackageError } from './package-error.js';
|
|
8
|
-
|
|
9
|
-
* The four package types in the Amodal ecosystem.
|
|
10
|
-
*/
|
|
11
|
-
export const PackageTypeSchema = z.enum([
|
|
12
|
-
'connection',
|
|
13
|
-
'skill',
|
|
14
|
-
'automation',
|
|
15
|
-
'knowledge',
|
|
16
|
-
'mcp',
|
|
17
|
-
]);
|
|
18
|
-
/**
|
|
19
|
-
* A single lock file entry for an installed package.
|
|
20
|
-
*/
|
|
21
|
-
export const LockEntrySchema = z.object({
|
|
22
|
-
version: z.string().min(1),
|
|
23
|
-
npm: z.string().min(1),
|
|
24
|
-
integrity: z.string(),
|
|
25
|
-
});
|
|
26
|
-
/**
|
|
27
|
-
* The lock file schema (amodal.lock).
|
|
28
|
-
*/
|
|
29
|
-
export const LockFileSchema = z.object({
|
|
30
|
-
lockVersion: z.literal(1),
|
|
31
|
-
packages: z.record(z.string(), LockEntrySchema),
|
|
32
|
-
});
|
|
33
|
-
// --- Auth schemas for connection manifests ---
|
|
8
|
+
// --- Auth schemas (used by connection packages) ---
|
|
34
9
|
export const OAuth2AuthSchema = z.object({
|
|
35
10
|
type: z.literal('oauth2'),
|
|
36
11
|
authorizeUrl: z.string().min(1),
|
|
@@ -52,105 +27,90 @@ export const PackageAuthSchema = z.discriminatedUnion('type', [
|
|
|
52
27
|
BearerAuthSchema,
|
|
53
28
|
ApiKeyAuthSchema,
|
|
54
29
|
]);
|
|
55
|
-
// --- Package manifest
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
// --- Package manifest ---
|
|
31
|
+
/**
|
|
32
|
+
* Known content directories that a package can contain.
|
|
33
|
+
* Used by `amodal publish` to auto-populate the `contains` field.
|
|
34
|
+
*/
|
|
35
|
+
export const KNOWN_CONTENT_DIRS = [
|
|
36
|
+
'connections',
|
|
37
|
+
'skills',
|
|
38
|
+
'automations',
|
|
39
|
+
'knowledge',
|
|
40
|
+
'stores',
|
|
41
|
+
'tools',
|
|
42
|
+
'pages',
|
|
43
|
+
'agents',
|
|
44
|
+
'evals',
|
|
45
|
+
];
|
|
46
|
+
/**
|
|
47
|
+
* Package manifest — lives in package.json under the "amodal" key.
|
|
48
|
+
*
|
|
49
|
+
* A package can contain any combination of amodal directories.
|
|
50
|
+
* Two classification axes:
|
|
51
|
+
* - `contains`: structural — what kinds of content are in the package
|
|
52
|
+
* (auto-populated by `amodal publish` from directory scan)
|
|
53
|
+
* - `tags`: topical — what domain/use-case the package is for
|
|
54
|
+
* (user-curated for discovery)
|
|
55
|
+
*/
|
|
56
|
+
export const PackageManifestSchema = z.object({
|
|
58
57
|
name: z.string().min(1),
|
|
58
|
+
contains: z.array(z.string()).optional(),
|
|
59
|
+
tags: z.array(z.string()).optional(),
|
|
60
|
+
description: z.string().optional(),
|
|
61
|
+
// Connection-specific fields
|
|
59
62
|
auth: PackageAuthSchema.optional(),
|
|
60
63
|
testEndpoints: z.array(z.string()).optional(),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
64
|
-
export const SkillManifestSchema = z.object({
|
|
65
|
-
type: z.literal('skill'),
|
|
66
|
-
name: z.string().min(1),
|
|
67
|
-
requiredEntities: z.array(z.string()).optional(),
|
|
68
|
-
});
|
|
69
|
-
export const AutomationManifestSchema = z.object({
|
|
70
|
-
type: z.literal('automation'),
|
|
71
|
-
name: z.string().min(1),
|
|
72
|
-
});
|
|
73
|
-
export const KnowledgeManifestSchema = z.object({
|
|
74
|
-
type: z.literal('knowledge'),
|
|
75
|
-
name: z.string().min(1),
|
|
76
|
-
});
|
|
77
|
-
export const McpManifestSchema = z.object({
|
|
78
|
-
type: z.literal('mcp'),
|
|
79
|
-
name: z.string().min(1),
|
|
80
|
-
transport: z.enum(['stdio', 'sse', 'http']).default('http'),
|
|
64
|
+
// MCP-specific fields
|
|
65
|
+
transport: z.enum(['stdio', 'sse', 'http']).optional(),
|
|
81
66
|
url: z.string().optional(),
|
|
82
67
|
command: z.string().optional(),
|
|
83
68
|
args: z.array(z.string()).optional(),
|
|
84
69
|
env: z.record(z.string()).optional(),
|
|
85
70
|
trust: z.boolean().optional(),
|
|
86
71
|
});
|
|
87
|
-
|
|
88
|
-
ConnectionManifestSchema,
|
|
89
|
-
SkillManifestSchema,
|
|
90
|
-
AutomationManifestSchema,
|
|
91
|
-
KnowledgeManifestSchema,
|
|
92
|
-
McpManifestSchema,
|
|
93
|
-
]);
|
|
72
|
+
// --- Lock file ---
|
|
94
73
|
/**
|
|
95
|
-
*
|
|
74
|
+
* A single lock file entry for an installed package.
|
|
75
|
+
* Keyed by npm package name (e.g., "@amodalai/alert-enrichment").
|
|
96
76
|
*/
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
export const LockEntrySchema = z.object({
|
|
78
|
+
version: z.string().min(1),
|
|
79
|
+
integrity: z.string(),
|
|
80
|
+
});
|
|
100
81
|
/**
|
|
101
|
-
*
|
|
82
|
+
* The lock file schema (amodal.lock).
|
|
102
83
|
*/
|
|
103
|
-
export
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const name = key.slice(slashIdx + 1);
|
|
110
|
-
const result = PackageTypeSchema.safeParse(rawType);
|
|
111
|
-
if (!result.success) {
|
|
112
|
-
throw new PackageError('PARSE_FAILED', `Invalid package type in key: ${key}`);
|
|
113
|
-
}
|
|
114
|
-
return { type: result.data, name };
|
|
115
|
-
}
|
|
84
|
+
export const LockFileSchema = z.object({
|
|
85
|
+
lockVersion: z.literal(2),
|
|
86
|
+
packages: z.record(z.string(), LockEntrySchema),
|
|
87
|
+
});
|
|
88
|
+
// --- Naming helpers ---
|
|
89
|
+
const AMODAL_SCOPE = '@amodalai/';
|
|
116
90
|
/**
|
|
117
|
-
*
|
|
91
|
+
* Normalize a package name to a full npm name.
|
|
92
|
+
* "alert-enrichment" → "@amodalai/alert-enrichment"
|
|
93
|
+
* "@amodalai/alert-enrichment" → "@amodalai/alert-enrichment"
|
|
118
94
|
*/
|
|
119
|
-
export function toNpmName(
|
|
120
|
-
|
|
95
|
+
export function toNpmName(name) {
|
|
96
|
+
if (name.startsWith('@'))
|
|
97
|
+
return name;
|
|
98
|
+
return `${AMODAL_SCOPE}${name}`;
|
|
121
99
|
}
|
|
122
100
|
/**
|
|
123
|
-
*
|
|
101
|
+
* Extract the short name from an npm package name.
|
|
102
|
+
* "@amodalai/alert-enrichment" → "alert-enrichment"
|
|
124
103
|
*/
|
|
125
104
|
export function fromNpmName(npm) {
|
|
126
|
-
|
|
127
|
-
if (!npm.startsWith(prefix)) {
|
|
105
|
+
if (!npm.startsWith(AMODAL_SCOPE)) {
|
|
128
106
|
throw new PackageError('PARSE_FAILED', `Not an amodal package name: ${npm}`);
|
|
129
107
|
}
|
|
130
|
-
|
|
131
|
-
// Find the first dash that separates type from name
|
|
132
|
-
for (const t of PackageTypeSchema.options) {
|
|
133
|
-
if (rest.startsWith(`${t}-`)) {
|
|
134
|
-
return { type: t, name: rest.slice(t.length + 1) };
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
throw new PackageError('PARSE_FAILED', `Cannot parse package type from: ${npm}`);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Convert type + name to symlink directory name: "connection--salesforce"
|
|
141
|
-
*/
|
|
142
|
-
export function toSymlinkName(type, name) {
|
|
143
|
-
return `${type}--${name}`;
|
|
108
|
+
return npm.slice(AMODAL_SCOPE.length);
|
|
144
109
|
}
|
|
145
110
|
/**
|
|
146
|
-
*
|
|
111
|
+
* Check if a string is an amodal scoped package name.
|
|
147
112
|
*/
|
|
148
|
-
export function
|
|
149
|
-
return
|
|
150
|
-
type,
|
|
151
|
-
name,
|
|
152
|
-
key: packageKey(type, name),
|
|
153
|
-
npmName: toNpmName(type, name),
|
|
154
|
-
};
|
|
113
|
+
export function isAmodalPackage(npm) {
|
|
114
|
+
return npm.startsWith(AMODAL_SCOPE);
|
|
155
115
|
}
|
|
156
116
|
//# sourceMappingURL=package-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-types.js","sourceRoot":"","sources":["../../../src/packages/package-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"package-types.js","sourceRoot":"","sources":["../../../src/packages/package-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD,qDAAqD;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAA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License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
6
|
import type { LoadedConnection } from '../repo/connection-types.js';
|
|
7
7
|
import type { LoadedAutomation, LoadedKnowledge, LoadedSkill } from '../repo/repo-types.js';
|
|
8
|
+
import type { LoadedStore } from '../repo/store-types.js';
|
|
9
|
+
import type { LoadedTool } from '../repo/tool-types.js';
|
|
8
10
|
import type { LockFile } from './package-types.js';
|
|
9
11
|
/**
|
|
10
|
-
* The result of resolving all installed +
|
|
12
|
+
* The result of resolving all installed packages + local repo content.
|
|
11
13
|
*/
|
|
12
14
|
export interface ResolvedPackages {
|
|
13
15
|
connections: Map<string, LoadedConnection>;
|
|
14
16
|
skills: LoadedSkill[];
|
|
15
17
|
automations: LoadedAutomation[];
|
|
16
18
|
knowledge: LoadedKnowledge[];
|
|
19
|
+
stores: LoadedStore[];
|
|
20
|
+
tools: LoadedTool[];
|
|
17
21
|
warnings: string[];
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
|
-
* Resolve
|
|
21
|
-
|
|
22
|
-
export declare function resolveConnection(name: string, repoDir: string | null, packageDir: string | null): Promise<LoadedConnection | null>;
|
|
23
|
-
/**
|
|
24
|
-
* Resolve a single skill by merging package + repo files.
|
|
25
|
-
*/
|
|
26
|
-
export declare function resolveSkill(name: string, repoDir: string | null, packageDir: string | null): Promise<LoadedSkill | null>;
|
|
27
|
-
/**
|
|
28
|
-
* Resolve a single automation by merging package + repo file.
|
|
29
|
-
*/
|
|
30
|
-
export declare function resolveAutomation(name: string, repoDir: string | null, packageDir: string | null): Promise<LoadedAutomation | null>;
|
|
31
|
-
/**
|
|
32
|
-
* Resolve a single knowledge file by merging package + repo file.
|
|
33
|
-
*/
|
|
34
|
-
export declare function resolveKnowledge(name: string, repoDir: string | null, packageDir: string | null): Promise<LoadedKnowledge | null>;
|
|
35
|
-
/**
|
|
36
|
-
* Resolve all packages: merge lock file packages with repo directories.
|
|
24
|
+
* Resolve all packages: scan installed packages in node_modules, then local repo.
|
|
25
|
+
* Local repo files always win over package files for the same name.
|
|
37
26
|
*/
|
|
38
27
|
export declare function resolveAllPackages(options: {
|
|
39
28
|
repoPath: string;
|