agentsmesh 0.6.0 → 0.8.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/engine.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { b as CanonicalFiles } from './canonical-types-CZwrJoBX.js';
2
- import { G as GenerateResult, V as ValidatedConfig, f as TargetLayoutScope, L as LintDiagnostic, b as ImportResult } from './target-descriptor-DjHhww11.js';
1
+ import { V as ValidatedConfig, b as CanonicalFiles } from './schema-BeGiBqbB.js';
2
+ import { G as GenerateResult, h as TargetLayoutScope, L as LintDiagnostic, d as ImportResult } from './target-descriptor-Cb9PXaxr.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
@@ -97,19 +97,6 @@ declare class FileSystemError extends AgentsMeshError {
97
97
  });
98
98
  }
99
99
 
100
- /**
101
- * Standalone target ID constants.
102
- *
103
- * Extracted from builtin-targets.ts to break a circular type dependency:
104
- * schema.ts → builtin-targets.ts → descriptors → ValidatedConfig → schema.ts
105
- *
106
- * When adding a new target, add its ID here AND its descriptor to
107
- * BUILTIN_TARGETS in builtin-targets.ts. A compile-time assertion
108
- * in builtin-targets.ts ensures they stay in sync.
109
- */
110
- declare const TARGET_IDS: readonly ["claude-code", "cursor", "copilot", "continue", "junie", "kiro", "gemini-cli", "cline", "codex-cli", "windsurf", "antigravity", "roo-code"];
111
- type BuiltinTargetId = (typeof TARGET_IDS)[number];
112
-
113
100
  /**
114
101
  * Diff engine: produces unified diffs between generated content and on-disk files.
115
102
  */
@@ -168,7 +155,7 @@ interface CheckLockSyncOptions {
168
155
  readonly canonicalDir: string;
169
156
  }
170
157
 
171
- declare function importFrom(target: BuiltinTargetId, opts: {
158
+ declare function importFrom(target: string, opts: {
172
159
  root: string;
173
160
  scope?: 'project' | 'global';
174
161
  }): Promise<ImportResult[]>;
@@ -193,6 +180,28 @@ declare function loadConfigFromDirectory(configDir: string): Promise<{
193
180
  config: ValidatedConfig;
194
181
  configDir: string;
195
182
  }>;
183
+ interface LoadProjectContextOptions {
184
+ /** Defaults to `'project'`. Use `'global'` to load `~/.agentsmesh/`. */
185
+ readonly scope?: TargetLayoutScope;
186
+ /** Refresh remote extend cache before loading canonical content. */
187
+ readonly refreshRemoteCache?: boolean;
188
+ }
189
+ interface ProjectContext {
190
+ readonly config: ValidatedConfig;
191
+ readonly canonical: CanonicalFiles;
192
+ /** Root base used for generated paths: project config dir or user home for global scope. */
193
+ readonly projectRoot: string;
194
+ readonly scope: TargetLayoutScope;
195
+ readonly configDir: string;
196
+ readonly canonicalDir: string;
197
+ }
198
+ /**
199
+ * Load the same execution context the CLI uses: scoped config, plugin
200
+ * descriptors, extends, packs, and local canonical content. The returned object
201
+ * is directly usable as a `GenerateContext` because it contains
202
+ * `{ config, canonical, projectRoot, scope }`.
203
+ */
204
+ declare function loadProjectContext(projectRoot: string, options?: LoadProjectContextOptions): Promise<ProjectContext>;
196
205
  interface LintOptions {
197
206
  readonly config: ValidatedConfig;
198
207
  readonly canonical: CanonicalFiles;
@@ -234,4 +243,4 @@ declare function diff(ctx: GenerateContext): Promise<ComputeDiffResult & {
234
243
  */
235
244
  declare function check(opts: CheckLockSyncOptions): Promise<LockSyncReport>;
236
245
 
237
- export { AgentsMeshError, type AgentsMeshErrorCode, CanonicalFiles, type CheckLockSyncOptions, type ComputeDiffResult, ConfigNotFoundError, ConfigValidationError, type DiffEntry, type DiffSummary, FileSystemError, type GenerateContext, GenerateResult, GenerationError, ImportError, ImportResult, LintDiagnostic, type LintOptions, type LintResult, LockAcquisitionError, type LockSyncReport, RemoteFetchError, TargetLayoutScope, TargetNotFoundError, ValidatedConfig, check, computeDiff, diff, formatDiffSummary, generate, importFrom, lint, loadConfig, loadConfigFromDirectory, resolveOutputCollisions };
246
+ export { AgentsMeshError, type AgentsMeshErrorCode, CanonicalFiles, type CheckLockSyncOptions, type ComputeDiffResult, ConfigNotFoundError, ConfigValidationError, type DiffEntry, type DiffSummary, FileSystemError, type GenerateContext, GenerateResult, GenerationError, ImportError, ImportResult, LintDiagnostic, type LintOptions, type LintResult, type LoadProjectContextOptions, LockAcquisitionError, type LockSyncReport, type ProjectContext, RemoteFetchError, TargetLayoutScope, TargetNotFoundError, ValidatedConfig, check, computeDiff, diff, formatDiffSummary, generate, importFrom, lint, loadConfig, loadConfigFromDirectory, loadProjectContext, resolveOutputCollisions };