cyber-agentkit 1.0.0 → 1.2.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/dist/cli.js +1389 -72
- package/dist/commands.d.ts +7 -1
- package/dist/commands.js +469 -48
- package/dist/index.d.ts +116 -12
- package/dist/index.js +608 -13
- package/dist/{reference-where-BhymfNgA.js → reference-where-C84J6MsR.js} +3839 -3649
- package/dist/{resolve-reference-Cis-Ye6T.d.ts → resolve-reference-D62VJZc0.d.ts} +17 -3
- package/package.json +1 -1
- package/plugin.json +4 -2
- package/skills/asset/README.md +14 -0
- package/skills/asset/SKILL.md +52 -0
- package/skills/asset/scripts/asset.mjs +220 -0
- package/skills/prose-update/README.md +24 -0
- package/skills/prose-update/SKILL.md +58 -0
- package/skills/prose-update/scripts/prose-update.mjs +220 -0
- package/skills/reference/README.md +1 -1
- package/skills/reference/SKILL.md +3 -3
- package/skills/reference/scripts/reference.mjs +77 -56
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-
|
|
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,101 @@ interface PluginStorage {
|
|
|
403
426
|
*/
|
|
404
427
|
export declare function pluginStorage(harness: HarnessId, environment?: HarnessEnvironment): PluginStorage;
|
|
405
428
|
//#endregion
|
|
406
|
-
//#region src/
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
429
|
+
//#region src/prose-update/split-sentences.d.ts
|
|
430
|
+
type SentenceKind = 'text' | 'heading' | 'item' | 'row' | 'fence' | 'quote';
|
|
431
|
+
/** The unit prose-update compares: see K4 in the prose-update spec. */
|
|
432
|
+
type Sentence = {
|
|
433
|
+
text: string;
|
|
434
|
+
kind: SentenceKind;
|
|
435
|
+
/** What separated this sentence from the one before it: nothing, a space, a newline, or a blank line. */
|
|
436
|
+
gap: '' | ' ' | '\n' | '\n\n';
|
|
437
|
+
};
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/prose-update/merge.d.ts
|
|
440
|
+
/** A place where the owner and the offered wording each changed the same base sentences differently. */
|
|
441
|
+
type Collision = {
|
|
442
|
+
base: Sentence[];
|
|
443
|
+
found: Sentence[];
|
|
444
|
+
offered: Sentence[];
|
|
445
|
+
};
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/prose-update/classify.d.ts
|
|
448
|
+
type Outcome = 'up-to-date' | 'update' | 'conflict' | 'owners' | 'undetermined';
|
|
449
|
+
type Reason = 'no-history' | 'empty-section' | 'tied-base' | 'no-base';
|
|
450
|
+
/** The retired wording a found text descends from: its place in the history (0 is the newest) and its date. */
|
|
451
|
+
type BaseRef = {
|
|
452
|
+
index: number;
|
|
453
|
+
date?: string | undefined;
|
|
454
|
+
};
|
|
455
|
+
type PartResult = {
|
|
456
|
+
path: string[];
|
|
457
|
+
key: string;
|
|
458
|
+
outcome: Outcome;
|
|
459
|
+
reason?: Reason;
|
|
460
|
+
/** Set with `tied-base`: the places in the history of the wordings that tied. */
|
|
461
|
+
tied?: number[];
|
|
462
|
+
base?: BaseRef;
|
|
463
|
+
/** Sentences the found part shares with the base part (K10), and the base part's sentence count. */
|
|
464
|
+
shared?: number;
|
|
465
|
+
baseSentences?: number;
|
|
466
|
+
revision?: 'append' | 'rewrite';
|
|
467
|
+
/** The part's text: as found for `up-to-date` and `owners`, merged for `update` (empty when the part is removed). */
|
|
468
|
+
text?: string;
|
|
469
|
+
collisions?: Collision[];
|
|
470
|
+
};
|
|
471
|
+
type Classification = {
|
|
472
|
+
outcome: Outcome;
|
|
473
|
+
reason?: Reason;
|
|
474
|
+
base?: BaseRef;
|
|
475
|
+
parts: PartResult[];
|
|
476
|
+
/** The found text for every outcome but `update` and `conflict`; the merged text otherwise. */
|
|
477
|
+
text: string;
|
|
478
|
+
};
|
|
479
|
+
type ClassifyInput = {
|
|
480
|
+
found: string;
|
|
481
|
+
offered: string;
|
|
482
|
+
/** A history text (parsed by `parseHistory`), or retired wordings, newest first. */
|
|
483
|
+
history: string | readonly string[];
|
|
484
|
+
};
|
|
485
|
+
/** The offered wording is empty, so nothing can be classified (R33). */
|
|
486
|
+
export declare class ProseUpdateError extends Error {
|
|
487
|
+
readonly code: 'empty-offered';
|
|
488
|
+
constructor(code: 'empty-offered', message: string);
|
|
489
|
+
}
|
|
490
|
+
/** Classifies each part of the found text against the offered wording and the history, and merges where it can. */
|
|
491
|
+
export declare function classify(input: ClassifyInput): Classification;
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/prose-update/history.d.ts
|
|
494
|
+
type RetiredWording = {
|
|
495
|
+
wording: string;
|
|
496
|
+
date: string;
|
|
497
|
+
reason: string;
|
|
498
|
+
};
|
|
499
|
+
/** An entry that did not parse: its place among the `Superseded` headings (from 0), its line (from 1), and its heading. */
|
|
500
|
+
type InvalidEntry = {
|
|
501
|
+
position: number;
|
|
502
|
+
line: number;
|
|
503
|
+
heading: string;
|
|
504
|
+
};
|
|
505
|
+
type ParsedHistory = {
|
|
506
|
+
entries: RetiredWording[];
|
|
507
|
+
invalid: InvalidEntry[];
|
|
411
508
|
};
|
|
412
509
|
/**
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
|
|
510
|
+
* Reads the retired wordings of a history text, newest first. Each entry is a `## Superseded <date> — <reason>`
|
|
511
|
+
* heading followed by the wording in a fence. An entry that does not parse is returned in `invalid`.
|
|
512
|
+
*/
|
|
513
|
+
export declare function parseHistory(text: string): ParsedHistory;
|
|
514
|
+
/**
|
|
515
|
+
* Returns the history text with the outgoing wording added as its newest entry and every other byte unchanged.
|
|
516
|
+
* The wording equal to the newest retired one changes nothing.
|
|
416
517
|
*/
|
|
417
|
-
export declare function
|
|
518
|
+
export declare function retire(history: string, wording: string, date: string, reason: string): string;
|
|
418
519
|
//#endregion
|
|
419
520
|
//#region src/references/reference-catalog.d.ts
|
|
420
521
|
/** One row per name. */
|
|
421
522
|
type ReferenceListRow = {
|
|
523
|
+
format?: string;
|
|
422
524
|
name: string;
|
|
423
525
|
description: string;
|
|
424
526
|
status: ReferenceStatus;
|
|
@@ -604,9 +706,11 @@ type WhereOptions = {
|
|
|
604
706
|
root: string;
|
|
605
707
|
/** How a path outside the project is shown, such as with the home directory collapsed to `~`. */
|
|
606
708
|
display?: ((path: string) => string) | undefined;
|
|
709
|
+
/** An assets call: the project write goes to `.agents/assets/`. */
|
|
710
|
+
assets?: boolean | undefined;
|
|
607
711
|
};
|
|
608
712
|
/** 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;
|
|
713
|
+
export declare function whereReference(input: string | ReferenceName, source: ReferenceLayers | readonly ReferenceLayer[], { root, display, assets }: WhereOptions): ReferenceWhereReport;
|
|
610
714
|
//#endregion
|
|
611
715
|
//#region src/skills/harness-skill-folders.d.ts
|
|
612
716
|
/**
|
|
@@ -721,4 +825,4 @@ interface SkillsDirectories {
|
|
|
721
825
|
*/
|
|
722
826
|
export declare function skillsDirectories(harness: HarnessId): SkillsDirectories | undefined;
|
|
723
827
|
//#endregion
|
|
724
|
-
export { type AmbiguousCause, type CheckOptions, type CheckPluginDependenciesOptions, type CheckedDependency, type DependencyState, type DetectHarnessOptions, type EnabledPluginSource, type EnabledPluginsOptions, type EnabledPluginsResult, type ExcludedImplementation, type ExtendsStep, type FoundSkill, type HarnessDetectionResult, type HarnessEnvironment, type HarnessEvidence, type HarnessId, type HeadlessCommand, type HeadlessCommandOptions, type HeadlessExitCode, type HeadlessInvocation, type HeadlessMode, type HeadlessOutputFormat, type HeadlessPermission, type HeadlessTranscript, type HeadlessUnavailable, type HeadlessUsage, type ImplementationsOptions, type ImplementsEntry, type InstalledPlugin, type InstalledPluginSource, type InstalledPluginsResult, type InterfaceCardinality, type InterfaceCheck, type InterfaceCheckFailure, type ListOptions, type LoadReferenceOptions, type ManagedPolicyKind, type ManagedPolicyLocation, type ManagedPolicyOptions, type MatchKind, type MergeOperation, type OperationSource, type Platform, type PluginDependenciesRead, type PluginDependency, type PluginDependencyCheck, type PluginEnablement, type PluginScope, type PluginSkill, type PluginStorage, type PluginStorageKind, type PluginStorageLocation, type ReferenceCheckEntry, type ReferenceCheckFailure, type ReferenceCheckKind, type ReferenceCode, type ReferenceImplementation, type ReferenceImplementations, type ReferenceInterface, type ReferenceLayer, type ReferenceLayerOptions, type ReferenceLayers, type ReferenceListLayerRow, type ReferenceListRow, type ReferenceListing, type ReferenceName, type ReferencePlugin, type ReferenceSearch, type ReferenceStatus, type ReferenceTier, type ReferenceTrace, type ReferenceTraceContribution, type ReferenceTraceLayer, type ReferenceTraceSection, type ReferenceWarning, type ReferenceWarningCode, type ReferenceWherePlace, type ReferenceWhereReport, type ResolveOptions, type ResolvedReference, type SearchMatch, type SectionSource, type SkillDefaults, type SkillFolderOptions, type SkillInvocation, type SkillsDirectories, type WhereOptions, defaultLayer, harnessIds, parseReferenceName, projectReferencesDir, referenceLayers, referenceNames, resolveReference, skillName, skillsIn, userReferencesDir };
|
|
828
|
+
export { type AmbiguousCause, type BaseRef, type CheckOptions, type CheckPluginDependenciesOptions, type CheckedDependency, type Classification, type ClassifyInput, type Collision, type DependencyState, type DetectHarnessOptions, type EnabledPluginSource, type EnabledPluginsOptions, type EnabledPluginsResult, type ExcludedImplementation, type ExtendsStep, type FoundSkill, type HarnessDetectionResult, type HarnessEnvironment, type HarnessEvidence, type HarnessId, type HeadlessCommand, type HeadlessCommandOptions, type HeadlessExitCode, type HeadlessInvocation, type HeadlessMode, type HeadlessOutputFormat, type HeadlessPermission, type HeadlessTranscript, type HeadlessUnavailable, type HeadlessUsage, type ImplementationsOptions, type ImplementsEntry, type InstalledPlugin, type InstalledPluginSource, type InstalledPluginsResult, type InterfaceCardinality, type InterfaceCheck, type InterfaceCheckFailure, type InvalidEntry, type ListOptions, type LoadReferenceOptions, type ManagedPolicyKind, type ManagedPolicyLocation, type ManagedPolicyOptions, type MatchKind, type MergeOperation, type OperationSource, type Outcome, type ParsedHistory, type PartResult, type Platform, type PluginDependenciesRead, type PluginDependency, type PluginDependencyCheck, type PluginEnablement, type PluginScope, type PluginSkill, type PluginStorage, type PluginStorageKind, type PluginStorageLocation, type Reason, type ReferenceCheckEntry, type ReferenceCheckFailure, type ReferenceCheckKind, type ReferenceCode, type ReferenceImplementation, type ReferenceImplementations, type ReferenceInterface, type ReferenceLayer, type ReferenceLayerOptions, type ReferenceLayers, type ReferenceListLayerRow, type ReferenceListRow, type ReferenceListing, type ReferenceName, type ReferencePlugin, type ReferenceSearch, type ReferenceStatus, type ReferenceTier, type ReferenceTrace, type ReferenceTraceContribution, type ReferenceTraceLayer, type ReferenceTraceSection, type ReferenceWarning, type ReferenceWarningCode, type ReferenceWherePlace, type ReferenceWhereReport, type ResolveOptions, type ResolvedReference, type RetiredWording, type SearchMatch, type SectionSource, type SkillDefaults, type SkillFolderOptions, type SkillInvocation, type SkillsDirectories, type WhereOptions, defaultLayer, harnessIds, parseReferenceName, projectReferencesDir, referenceLayers, referenceNames, resolveReference, skillName, skillsIn, userReferencesDir };
|