@standardagents/builder 0.11.12 → 0.12.1
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/built-in-routes.js +3498 -498
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +56 -25
- package/dist/client/vendor.js +78 -5
- package/dist/client/vue.js +1 -1
- package/dist/discovery-CpMs68Yx.d.ts +97 -0
- package/dist/index-DkbUJ4MM.d.ts +1043 -0
- package/dist/index.d.ts +205 -999
- package/dist/index.js +4563 -956
- package/dist/index.js.map +1 -1
- package/dist/packing.d.ts +266 -0
- package/dist/packing.js +2202 -0
- package/dist/packing.js.map +1 -0
- package/dist/plugin.js +3477 -608
- package/dist/plugin.js.map +1 -1
- package/dist/test.d.ts +256 -0
- package/dist/test.js +391 -0
- package/dist/test.js.map +1 -0
- package/dist/types-pLkJx8vg.d.ts +306 -0
- package/package.json +25 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { D as DiscoveredPackage } from './types-pLkJx8vg.js';
|
|
2
|
+
import { PackageSignature } from '@standardagents/spec';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Package discovery service for Standard Agents.
|
|
6
|
+
*
|
|
7
|
+
* Discovers packed agent packages from:
|
|
8
|
+
* - npm packages (by keyword, naming convention, or standardagent field)
|
|
9
|
+
* - Local agents/packed/ directory
|
|
10
|
+
*
|
|
11
|
+
* Packages are detected by checking for the `standardagent` field in
|
|
12
|
+
* package.json, not by looking for manifest.json.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for package discovery.
|
|
19
|
+
*/
|
|
20
|
+
interface DiscoveryConfig {
|
|
21
|
+
/** Root directory of the project */
|
|
22
|
+
rootDir: string;
|
|
23
|
+
/** Directory for local packed agents (default: agents/packed) */
|
|
24
|
+
packedDir?: string;
|
|
25
|
+
/** Whether to scan npm packages (default: true) */
|
|
26
|
+
scanNpm?: boolean;
|
|
27
|
+
/** Whether to scan local packed directory (default: true) */
|
|
28
|
+
scanLocal?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Service for discovering packed agent packages.
|
|
32
|
+
*/
|
|
33
|
+
declare class PackageDiscoveryService {
|
|
34
|
+
private config;
|
|
35
|
+
constructor(config: DiscoveryConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Discover all packed agent packages.
|
|
38
|
+
*
|
|
39
|
+
* @returns Array of discovered packages
|
|
40
|
+
*/
|
|
41
|
+
discoverPackages(): Promise<DiscoveredPackage[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Discover npm packages that are Standard Agents packages.
|
|
44
|
+
*
|
|
45
|
+
* Looks for packages with:
|
|
46
|
+
* - "standardagent" keyword in package.json
|
|
47
|
+
* - "standardagent-*" prefix in name
|
|
48
|
+
* - "@standardagents/*" scope
|
|
49
|
+
* - "standardagent" field in package.json
|
|
50
|
+
*/
|
|
51
|
+
private discoverNpmPackages;
|
|
52
|
+
/**
|
|
53
|
+
* Check if an npm package is a Standard Agent package.
|
|
54
|
+
*
|
|
55
|
+
* Detection is based on the `standardagent` field in package.json,
|
|
56
|
+
* which must contain `entryAgents` array.
|
|
57
|
+
*/
|
|
58
|
+
private checkNpmPackage;
|
|
59
|
+
/**
|
|
60
|
+
* Discover local packed agents from agents/packed/ directory.
|
|
61
|
+
* Handles both regular packages and scoped packages (@scope/name).
|
|
62
|
+
*/
|
|
63
|
+
private discoverLocalPackages;
|
|
64
|
+
/**
|
|
65
|
+
* Check if a local directory is a packed agent package.
|
|
66
|
+
*
|
|
67
|
+
* Detection is based on the `standardagent` field in package.json.
|
|
68
|
+
*/
|
|
69
|
+
private checkLocalPackage;
|
|
70
|
+
/**
|
|
71
|
+
* Scan a directory and return entry names.
|
|
72
|
+
*/
|
|
73
|
+
private scanDirectory;
|
|
74
|
+
/**
|
|
75
|
+
* Validate a standardagent field structure in package.json.
|
|
76
|
+
*/
|
|
77
|
+
static validateStandardAgentField(field: unknown): field is {
|
|
78
|
+
entryAgents: string[];
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Get a package by ID.
|
|
82
|
+
*/
|
|
83
|
+
getPackage(packageId: string): Promise<DiscoveredPackage | null>;
|
|
84
|
+
/**
|
|
85
|
+
* Create a package signature from a discovered package.
|
|
86
|
+
*
|
|
87
|
+
* Note: packedAt is set to current time since it's no longer
|
|
88
|
+
* stored in a manifest file.
|
|
89
|
+
*/
|
|
90
|
+
static createSignature(pkg: DiscoveredPackage): PackageSignature;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Convenience function to discover all packages.
|
|
94
|
+
*/
|
|
95
|
+
declare function discoverPackages(rootDir: string): Promise<DiscoveredPackage[]>;
|
|
96
|
+
|
|
97
|
+
export { type DiscoveryConfig as D, PackageDiscoveryService as P, discoverPackages as d };
|