cyber-agentkit 1.1.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 +718 -16
- package/dist/index.d.ts +92 -1
- package/dist/index.js +583 -1
- package/package.json +1 -1
- package/plugin.json +3 -2
- package/skills/asset/scripts/asset.mjs +76 -55
- 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/SKILL.md +1 -1
- package/skills/reference/scripts/reference.mjs +76 -55
package/dist/index.d.ts
CHANGED
|
@@ -426,6 +426,97 @@ interface PluginStorage {
|
|
|
426
426
|
*/
|
|
427
427
|
export declare function pluginStorage(harness: HarnessId, environment?: HarnessEnvironment): PluginStorage;
|
|
428
428
|
//#endregion
|
|
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[];
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
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.
|
|
517
|
+
*/
|
|
518
|
+
export declare function retire(history: string, wording: string, date: string, reason: string): string;
|
|
519
|
+
//#endregion
|
|
429
520
|
//#region src/references/reference-catalog.d.ts
|
|
430
521
|
/** One row per name. */
|
|
431
522
|
type ReferenceListRow = {
|
|
@@ -734,4 +825,4 @@ interface SkillsDirectories {
|
|
|
734
825
|
*/
|
|
735
826
|
export declare function skillsDirectories(harness: HarnessId): SkillsDirectories | undefined;
|
|
736
827
|
//#endregion
|
|
737
|
-
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 };
|