cyber-agentkit 1.0.0 → 1.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/dist/index.d.ts CHANGED
@@ -1,5 +1,28 @@
1
1
  import { n as harnessIds, t as HarnessId } from "./harness-id-BgKL-x6C.js";
2
- import { A as FoundSkill, C as defaultLayer, D as ReferenceCode, E as userReferencesDir, M as skillsIn, N as Platform, O as ReferenceWarning, S as SkillDefaults, T as referenceLayers, _ as ReferenceLayer, a as ReferenceTrace, b as ReferencePlugin, c as ReferenceTraceSection, d as referenceNames, f as resolveReference, g as SectionSource, h as MergeOperation, i as ReferenceStatus, j as skillName, k as ReferenceWarningCode, l as ResolveOptions, m as parseReferenceName, n as ExtendsStep, o as ReferenceTraceContribution, p as ReferenceName, r as OperationSource, s as ReferenceTraceLayer, t as AmbiguousCause, u as ResolvedReference, v as ReferenceLayerOptions, w as projectReferencesDir, x as ReferenceTier, y as ReferenceLayers } from "./resolve-reference-Cis-Ye6T.js";
2
+ import { A as FoundSkill, C as defaultLayer, D as ReferenceCode, E as userReferencesDir, M as skillsIn, N as Platform, O as ReferenceWarning, S as SkillDefaults, T as referenceLayers, _ as ReferenceLayer, a as ReferenceTrace, b as ReferencePlugin, c as ReferenceTraceSection, d as referenceNames, f as resolveReference, g as SectionSource, h as MergeOperation, i as ReferenceStatus, j as skillName, k as ReferenceWarningCode, l as ResolveOptions, m as parseReferenceName, n as ExtendsStep, o as ReferenceTraceContribution, p as ReferenceName, r as OperationSource, s as ReferenceTraceLayer, t as AmbiguousCause, u as ResolvedReference, v as ReferenceLayerOptions, w as projectReferencesDir, x as ReferenceTier, y as ReferenceLayers } from "./resolve-reference-D62VJZc0.js";
3
+ //#region src/references/load-reference.d.ts
4
+ /** `referenceLayers`' options, with the machine's own home directory, platform, and environment by default. */
5
+ type LoadReferenceOptions = Omit<ReferenceLayerOptions, 'home' | 'platform' | 'folder'> & {
6
+ home?: string | undefined;
7
+ platform?: Platform | undefined;
8
+ };
9
+ /**
10
+ * Resolves one reference for `root` the way `reference show` does, returning the full record: every
11
+ * field `show` prints with `--metadata` and `--trace`. A name that is not a reference name comes back
12
+ * `invalid`, and one no contribution answers `missing`; neither throws.
13
+ */
14
+ export declare function loadReference(name: string, options: LoadReferenceOptions & {
15
+ folder?: ReferenceLayerOptions['folder'];
16
+ }): Promise<ResolvedReference>;
17
+ //#endregion
18
+ //#region src/assets/load-asset.d.ts
19
+ /**
20
+ * Resolves one asset by name the way `asset load` does: the reference engine, reading `assets/` where
21
+ * it reads `references/`. A data file answers whole from the highest tier holding the name; the skill's
22
+ * own `assets/<name>.<ext>` (`defaultSkill`) is the lowest.
23
+ */
24
+ export declare function loadAsset(name: string, options: LoadReferenceOptions): Promise<ResolvedReference>;
25
+ //#endregion
3
26
  //#region src/harness/harness-environment.d.ts
4
27
  /**
5
28
  * The parts of the running process a harness query depends on. Every field defaults to the
@@ -403,22 +426,10 @@ interface PluginStorage {
403
426
  */
404
427
  export declare function pluginStorage(harness: HarnessId, environment?: HarnessEnvironment): PluginStorage;
405
428
  //#endregion
406
- //#region src/references/load-reference.d.ts
407
- /** `referenceLayers`' options, with the machine's own home directory, platform, and environment by default. */
408
- type LoadReferenceOptions = Omit<ReferenceLayerOptions, 'home' | 'platform'> & {
409
- home?: string | undefined;
410
- platform?: Platform | undefined;
411
- };
412
- /**
413
- * Resolves one reference for `root` the way `reference show` does, returning the full record: every
414
- * field `show` prints with `--metadata` and `--trace`. A name that is not a reference name comes back
415
- * `invalid`, and one no contribution answers `missing`; neither throws.
416
- */
417
- export declare function loadReference(name: string, options: LoadReferenceOptions): Promise<ResolvedReference>;
418
- //#endregion
419
429
  //#region src/references/reference-catalog.d.ts
420
430
  /** One row per name. */
421
431
  type ReferenceListRow = {
432
+ format?: string;
422
433
  name: string;
423
434
  description: string;
424
435
  status: ReferenceStatus;
@@ -604,9 +615,11 @@ type WhereOptions = {
604
615
  root: string;
605
616
  /** How a path outside the project is shown, such as with the home directory collapsed to `~`. */
606
617
  display?: ((path: string) => string) | undefined;
618
+ /** An assets call: the project write goes to `.agents/assets/`. */
619
+ assets?: boolean | undefined;
607
620
  };
608
621
  /** The project and user files a customization of `name` is written to, with the document below each. */
609
- export declare function whereReference(input: string | ReferenceName, source: ReferenceLayers | readonly ReferenceLayer[], { root, display }: WhereOptions): ReferenceWhereReport;
622
+ export declare function whereReference(input: string | ReferenceName, source: ReferenceLayers | readonly ReferenceLayer[], { root, display, assets }: WhereOptions): ReferenceWhereReport;
610
623
  //#endregion
611
624
  //#region src/skills/harness-skill-folders.d.ts
612
625
  /**
package/dist/index.js CHANGED
@@ -1,6 +1,34 @@
1
- import { A as skillFoldersVerified, B as isRecord, C as userReferencesDir, D as adminSkillFolders, F as packageDir, H as stripJsonComments, I as detectHarness, L as installedPlugins, M as pluginManifestName, N as pluginManifestPaths, O as harnessSkillFolders, P as declaredDependencies, R as enabledPlugins, T as skillsIn, U as managedPolicyLocations, V as readText, b as projectReferencesDir, d as parseReferenceName, j as skillsDirectories, k as pluginSkillFolders, l as referenceNames, n as referenceImplementations, o as listReferences, r as checkReferences, s as searchReferences, t as whereReference, u as resolveReference, w as skillName, x as referenceLayers, y as defaultLayer, z as pluginStorage } from "./reference-where-BhymfNgA.js";
2
- import { join } from "node:path";
1
+ import { A as skillName, B as declaredDependencies, D as pluginStorage, E as enabledPlugins, F as pluginSkillFolders, H as isRecord, I as skillFoldersVerified, L as skillsDirectories, N as adminSkillFolders, O as managedPolicyLocations, P as harnessSkillFolders, R as pluginManifestName, S as referenceLayers, T as installedPlugins, U as readText, V as packageDir, W as stripJsonComments, b as defaultLayer, d as parseReferenceName, j as skillsIn, k as detectHarness, l as referenceNames, n as referenceImplementations, o as listReferences, r as checkReferences, s as searchReferences, t as whereReference, u as resolveReference, w as userReferencesDir, x as projectReferencesDir, z as pluginManifestPaths } from "./reference-where-C84J6MsR.js";
3
2
  import { homedir } from "node:os";
3
+ import { join } from "node:path";
4
+ //#region src/references/load-reference.ts
5
+ /**
6
+ * Resolves one reference for `root` the way `reference show` does, returning the full record: every
7
+ * field `show` prints with `--metadata` and `--trace`. A name that is not a reference name comes back
8
+ * `invalid`, and one no contribution answers `missing`; neither throws.
9
+ */
10
+ async function loadReference(name, options) {
11
+ const layers = await referenceLayers({
12
+ ...options,
13
+ home: options.home ?? homedir(),
14
+ platform: options.platform ?? process.platform
15
+ });
16
+ return resolveReference(name, layers);
17
+ }
18
+ //#endregion
19
+ //#region src/assets/load-asset.ts
20
+ /**
21
+ * Resolves one asset by name the way `asset load` does: the reference engine, reading `assets/` where
22
+ * it reads `references/`. A data file answers whole from the highest tier holding the name; the skill's
23
+ * own `assets/<name>.<ext>` (`defaultSkill`) is the lowest.
24
+ */
25
+ async function loadAsset(name, options) {
26
+ return loadReference(name, {
27
+ ...options,
28
+ folder: "assets"
29
+ });
30
+ }
31
+ //#endregion
4
32
  //#region src/plugins/plugin-dependencies.ts
5
33
  /**
6
34
  * Whether a harness lets a plugin declare other plugins it depends on. Only Claude Code does, via
@@ -559,21 +587,6 @@ function headlessCommand(harness, options) {
559
587
  };
560
588
  }
561
589
  //#endregion
562
- //#region src/references/load-reference.ts
563
- /**
564
- * Resolves one reference for `root` the way `reference show` does, returning the full record: every
565
- * field `show` prints with `--metadata` and `--trace`. A name that is not a reference name comes back
566
- * `invalid`, and one no contribution answers `missing`; neither throws.
567
- */
568
- async function loadReference(name, options) {
569
- const layers = await referenceLayers({
570
- ...options,
571
- home: options.home ?? homedir(),
572
- platform: options.platform ?? process.platform
573
- });
574
- return resolveReference(name, layers);
575
- }
576
- //#endregion
577
590
  //#region src/skills/skill-invocation.ts
578
591
  /**
579
592
  * How a user invokes a plugin's skill in a harness.
@@ -649,4 +662,4 @@ function skillInvocation(harness, { plugin, skill }) {
649
662
  }
650
663
  }
651
664
  //#endregion
652
- export { adminSkillFolders, checkPluginDependencies, checkReferences, declaredDependencies, declaredPluginDependencies, defaultLayer, detectHarness, enabledPlugins, harnessIds, harnessSkillFolders, headlessCommand, headlessInvocation, installedPlugins, listReferences, loadReference, managedPolicyLocations, packageDir, parseReferenceName, pluginManifestName, pluginManifestPaths, pluginSkillFolders, pluginStorage, projectReferencesDir, readPluginDependencies, referenceImplementations, referenceLayers, referenceNames, resolveReference, searchReferences, skillFoldersVerified, skillInvocation, skillName, skillsDirectories, skillsIn, supportsPluginDependencies, userReferencesDir, whereReference };
665
+ export { adminSkillFolders, checkPluginDependencies, checkReferences, declaredDependencies, declaredPluginDependencies, defaultLayer, detectHarness, enabledPlugins, harnessIds, harnessSkillFolders, headlessCommand, headlessInvocation, installedPlugins, listReferences, loadAsset, loadReference, managedPolicyLocations, packageDir, parseReferenceName, pluginManifestName, pluginManifestPaths, pluginSkillFolders, pluginStorage, projectReferencesDir, readPluginDependencies, referenceImplementations, referenceLayers, referenceNames, resolveReference, searchReferences, skillFoldersVerified, skillInvocation, skillName, skillsDirectories, skillsIn, supportsPluginDependencies, userReferencesDir, whereReference };