agentikit 0.0.7 → 0.0.9
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/README.md +215 -76
- package/dist/index.d.ts +17 -3
- package/dist/index.js +10 -2
- package/dist/src/asset-spec.d.ts +14 -0
- package/dist/src/asset-spec.js +46 -0
- package/dist/src/cli.js +268 -57
- package/dist/src/common.d.ts +8 -0
- package/dist/src/common.js +46 -0
- package/dist/src/config.d.ts +37 -0
- package/dist/src/config.js +124 -0
- package/dist/src/embedder.d.ts +10 -0
- package/dist/src/embedder.js +87 -0
- package/dist/src/frontmatter.d.ts +30 -0
- package/dist/src/frontmatter.js +86 -0
- package/dist/src/indexer.d.ts +20 -2
- package/dist/src/indexer.js +212 -80
- package/dist/src/init.d.ts +19 -0
- package/dist/src/init.js +87 -0
- package/dist/src/llm.d.ts +15 -0
- package/dist/src/llm.js +91 -0
- package/dist/src/markdown.d.ts +18 -0
- package/dist/src/markdown.js +77 -0
- package/dist/src/metadata.d.ts +11 -2
- package/dist/src/metadata.js +161 -29
- package/dist/src/registry-install.d.ts +11 -0
- package/dist/src/registry-install.js +208 -0
- package/dist/src/registry-resolve.d.ts +3 -0
- package/dist/src/registry-resolve.js +231 -0
- package/dist/src/registry-search.d.ts +5 -0
- package/dist/src/registry-search.js +129 -0
- package/dist/src/registry-types.d.ts +55 -0
- package/dist/src/registry-types.js +1 -0
- package/dist/src/ripgrep-install.d.ts +12 -0
- package/dist/src/ripgrep-install.js +169 -0
- package/dist/src/ripgrep-resolve.d.ts +13 -0
- package/dist/src/ripgrep-resolve.js +68 -0
- package/dist/src/ripgrep.d.ts +3 -36
- package/dist/src/ripgrep.js +2 -262
- package/dist/src/similarity.d.ts +1 -2
- package/dist/src/similarity.js +11 -0
- package/dist/src/stash-add.d.ts +4 -0
- package/dist/src/stash-add.js +59 -0
- package/dist/src/stash-ref.d.ts +7 -0
- package/dist/src/stash-ref.js +33 -0
- package/dist/src/stash-registry.d.ts +18 -0
- package/dist/src/stash-registry.js +221 -0
- package/dist/src/stash-resolve.d.ts +2 -0
- package/dist/src/stash-resolve.js +45 -0
- package/dist/src/stash-search.d.ts +8 -0
- package/dist/src/stash-search.js +484 -0
- package/dist/src/stash-show.d.ts +5 -0
- package/dist/src/stash-show.js +114 -0
- package/dist/src/stash-types.d.ts +217 -0
- package/dist/src/stash-types.js +1 -0
- package/dist/src/stash.d.ts +10 -63
- package/dist/src/stash.js +6 -633
- package/dist/src/tool-runner.d.ts +35 -0
- package/dist/src/tool-runner.js +100 -0
- package/dist/src/walker.d.ts +19 -0
- package/dist/src/walker.js +47 -0
- package/package.json +8 -14
- package/src/asset-spec.ts +69 -0
- package/src/cli.ts +282 -46
- package/src/common.ts +58 -0
- package/src/config.ts +183 -0
- package/src/embedder.ts +117 -0
- package/src/frontmatter.ts +95 -0
- package/src/indexer.ts +244 -84
- package/src/init.ts +106 -0
- package/src/llm.ts +124 -0
- package/src/markdown.ts +106 -0
- package/src/metadata.ts +171 -27
- package/src/registry-install.ts +245 -0
- package/src/registry-resolve.ts +272 -0
- package/src/registry-search.ts +145 -0
- package/src/registry-types.ts +64 -0
- package/src/ripgrep-install.ts +200 -0
- package/src/ripgrep-resolve.ts +72 -0
- package/src/ripgrep.ts +3 -315
- package/src/similarity.ts +13 -1
- package/src/stash-add.ts +66 -0
- package/src/stash-ref.ts +41 -0
- package/src/stash-registry.ts +259 -0
- package/src/stash-resolve.ts +47 -0
- package/src/stash-search.ts +595 -0
- package/src/stash-show.ts +112 -0
- package/src/stash-types.ts +221 -0
- package/src/stash.ts +31 -760
- package/src/tool-runner.ts +129 -0
- package/src/walker.ts +53 -0
- package/.claude-plugin/plugin.json +0 -21
- package/commands/open.md +0 -11
- package/commands/run.md +0 -11
- package/commands/search.md +0 -11
- package/dist/src/plugin.d.ts +0 -2
- package/dist/src/plugin.js +0 -55
- package/skills/stash/SKILL.md +0 -73
- package/src/plugin.ts +0 -56
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { AgentikitAssetType } from "./common";
|
|
2
|
+
import type { RegistrySource } from "./registry-types";
|
|
3
|
+
import type { ToolKind } from "./tool-runner";
|
|
4
|
+
export type AgentikitSearchType = AgentikitAssetType | "any";
|
|
5
|
+
export type SearchUsageMode = "none" | "both" | "item" | "guide";
|
|
6
|
+
export type SearchSource = "local" | "registry" | "both";
|
|
7
|
+
export interface LocalSearchHit {
|
|
8
|
+
hitSource: "local";
|
|
9
|
+
type: AgentikitAssetType;
|
|
10
|
+
name: string;
|
|
11
|
+
path: string;
|
|
12
|
+
openRef: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
score?: number;
|
|
16
|
+
whyMatched?: string[];
|
|
17
|
+
runCmd?: string;
|
|
18
|
+
kind?: ToolKind;
|
|
19
|
+
usage?: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface RegistrySearchResultHit {
|
|
22
|
+
hitSource: "registry";
|
|
23
|
+
type: "registry";
|
|
24
|
+
name: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
openRef?: string;
|
|
27
|
+
id: string;
|
|
28
|
+
registrySource: RegistrySource;
|
|
29
|
+
ref: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
tags?: string[];
|
|
32
|
+
homepage?: string;
|
|
33
|
+
score?: number;
|
|
34
|
+
whyMatched?: string[];
|
|
35
|
+
runCmd?: string;
|
|
36
|
+
kind?: ToolKind;
|
|
37
|
+
usage?: string[];
|
|
38
|
+
metadata?: Record<string, string>;
|
|
39
|
+
installRef: string;
|
|
40
|
+
installCmd: string;
|
|
41
|
+
}
|
|
42
|
+
export type SearchHit = LocalSearchHit | RegistrySearchResultHit;
|
|
43
|
+
export interface SearchResponse {
|
|
44
|
+
stashDir: string;
|
|
45
|
+
source: SearchSource;
|
|
46
|
+
hits: SearchHit[];
|
|
47
|
+
usageGuide?: Partial<Record<AgentikitAssetType, string[]>>;
|
|
48
|
+
tip?: string;
|
|
49
|
+
warnings?: string[];
|
|
50
|
+
/** Timing counters in milliseconds */
|
|
51
|
+
timing?: {
|
|
52
|
+
totalMs: number;
|
|
53
|
+
rankMs?: number;
|
|
54
|
+
embedMs?: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface AddResponse {
|
|
58
|
+
stashDir: string;
|
|
59
|
+
ref: string;
|
|
60
|
+
installed: {
|
|
61
|
+
id: string;
|
|
62
|
+
source: RegistrySource;
|
|
63
|
+
ref: string;
|
|
64
|
+
artifactUrl: string;
|
|
65
|
+
resolvedVersion?: string;
|
|
66
|
+
resolvedRevision?: string;
|
|
67
|
+
stashRoot: string;
|
|
68
|
+
cacheDir: string;
|
|
69
|
+
extractedDir: string;
|
|
70
|
+
installedAt: string;
|
|
71
|
+
};
|
|
72
|
+
config: {
|
|
73
|
+
additionalStashDirs: string[];
|
|
74
|
+
installedRegistryCount: number;
|
|
75
|
+
};
|
|
76
|
+
index: {
|
|
77
|
+
mode: "full" | "incremental";
|
|
78
|
+
totalEntries: number;
|
|
79
|
+
directoriesScanned: number;
|
|
80
|
+
directoriesSkipped: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface RegistryInstallStatus {
|
|
84
|
+
id: string;
|
|
85
|
+
source: RegistrySource;
|
|
86
|
+
ref: string;
|
|
87
|
+
artifactUrl: string;
|
|
88
|
+
resolvedVersion?: string;
|
|
89
|
+
resolvedRevision?: string;
|
|
90
|
+
stashRoot: string;
|
|
91
|
+
cacheDir: string;
|
|
92
|
+
extractedDir: string;
|
|
93
|
+
installedAt: string;
|
|
94
|
+
}
|
|
95
|
+
export interface RegistryListEntry {
|
|
96
|
+
id: string;
|
|
97
|
+
source: RegistrySource;
|
|
98
|
+
ref: string;
|
|
99
|
+
artifactUrl: string;
|
|
100
|
+
resolvedVersion?: string;
|
|
101
|
+
resolvedRevision?: string;
|
|
102
|
+
stashRoot: string;
|
|
103
|
+
cacheDir: string;
|
|
104
|
+
installedAt: string;
|
|
105
|
+
status: {
|
|
106
|
+
cacheDirExists: boolean;
|
|
107
|
+
stashRootExists: boolean;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export interface ListResponse {
|
|
111
|
+
stashDir: string;
|
|
112
|
+
installed: RegistryListEntry[];
|
|
113
|
+
totalInstalled: number;
|
|
114
|
+
}
|
|
115
|
+
export interface RemoveResponse {
|
|
116
|
+
stashDir: string;
|
|
117
|
+
target: string;
|
|
118
|
+
removed: {
|
|
119
|
+
id: string;
|
|
120
|
+
source: RegistrySource;
|
|
121
|
+
ref: string;
|
|
122
|
+
cacheDir: string;
|
|
123
|
+
stashRoot: string;
|
|
124
|
+
};
|
|
125
|
+
config: {
|
|
126
|
+
additionalStashDirs: string[];
|
|
127
|
+
installedRegistryCount: number;
|
|
128
|
+
};
|
|
129
|
+
index: {
|
|
130
|
+
mode: "full" | "incremental";
|
|
131
|
+
totalEntries: number;
|
|
132
|
+
directoriesScanned: number;
|
|
133
|
+
directoriesSkipped: number;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export interface ReinstallResultItem {
|
|
137
|
+
id: string;
|
|
138
|
+
source: RegistrySource;
|
|
139
|
+
ref: string;
|
|
140
|
+
previousCacheDir: string;
|
|
141
|
+
installed: RegistryInstallStatus;
|
|
142
|
+
}
|
|
143
|
+
export interface ReinstallResponse {
|
|
144
|
+
stashDir: string;
|
|
145
|
+
target?: string;
|
|
146
|
+
all: boolean;
|
|
147
|
+
processed: ReinstallResultItem[];
|
|
148
|
+
config: {
|
|
149
|
+
additionalStashDirs: string[];
|
|
150
|
+
installedRegistryCount: number;
|
|
151
|
+
};
|
|
152
|
+
index: {
|
|
153
|
+
mode: "full" | "incremental";
|
|
154
|
+
totalEntries: number;
|
|
155
|
+
directoriesScanned: number;
|
|
156
|
+
directoriesSkipped: number;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export interface UpdateResultItem {
|
|
160
|
+
id: string;
|
|
161
|
+
source: RegistrySource;
|
|
162
|
+
ref: string;
|
|
163
|
+
previous: {
|
|
164
|
+
resolvedVersion?: string;
|
|
165
|
+
resolvedRevision?: string;
|
|
166
|
+
cacheDir: string;
|
|
167
|
+
};
|
|
168
|
+
installed: RegistryInstallStatus;
|
|
169
|
+
changed: {
|
|
170
|
+
version: boolean;
|
|
171
|
+
revision: boolean;
|
|
172
|
+
any: boolean;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export interface UpdateResponse {
|
|
176
|
+
stashDir: string;
|
|
177
|
+
target?: string;
|
|
178
|
+
all: boolean;
|
|
179
|
+
processed: UpdateResultItem[];
|
|
180
|
+
config: {
|
|
181
|
+
additionalStashDirs: string[];
|
|
182
|
+
installedRegistryCount: number;
|
|
183
|
+
};
|
|
184
|
+
index: {
|
|
185
|
+
mode: "full" | "incremental";
|
|
186
|
+
totalEntries: number;
|
|
187
|
+
directoriesScanned: number;
|
|
188
|
+
directoriesSkipped: number;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
export interface ShowResponse {
|
|
192
|
+
type: AgentikitAssetType;
|
|
193
|
+
name: string;
|
|
194
|
+
path: string;
|
|
195
|
+
content?: string;
|
|
196
|
+
template?: string;
|
|
197
|
+
prompt?: string;
|
|
198
|
+
description?: string;
|
|
199
|
+
toolPolicy?: unknown;
|
|
200
|
+
modelHint?: unknown;
|
|
201
|
+
runCmd?: string;
|
|
202
|
+
kind?: ToolKind;
|
|
203
|
+
}
|
|
204
|
+
export type KnowledgeView = {
|
|
205
|
+
mode: "full";
|
|
206
|
+
} | {
|
|
207
|
+
mode: "toc";
|
|
208
|
+
} | {
|
|
209
|
+
mode: "frontmatter";
|
|
210
|
+
} | {
|
|
211
|
+
mode: "section";
|
|
212
|
+
heading: string;
|
|
213
|
+
} | {
|
|
214
|
+
mode: "lines";
|
|
215
|
+
start: number;
|
|
216
|
+
end: number;
|
|
217
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/stash.d.ts
CHANGED
|
@@ -1,63 +1,10 @@
|
|
|
1
|
-
export type AgentikitAssetType
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
score?: number;
|
|
12
|
-
runCmd?: string;
|
|
13
|
-
kind?: "bash" | "bun" | "powershell" | "cmd";
|
|
14
|
-
}
|
|
15
|
-
export interface SearchResponse {
|
|
16
|
-
stashDir: string;
|
|
17
|
-
hits: SearchHit[];
|
|
18
|
-
tip?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface OpenResponse {
|
|
21
|
-
type: AgentikitAssetType;
|
|
22
|
-
name: string;
|
|
23
|
-
path: string;
|
|
24
|
-
content?: string;
|
|
25
|
-
template?: string;
|
|
26
|
-
prompt?: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
toolPolicy?: unknown;
|
|
29
|
-
modelHint?: unknown;
|
|
30
|
-
runCmd?: string;
|
|
31
|
-
kind?: "bash" | "bun" | "powershell" | "cmd";
|
|
32
|
-
}
|
|
33
|
-
export interface RunResponse {
|
|
34
|
-
type: "tool";
|
|
35
|
-
name: string;
|
|
36
|
-
path: string;
|
|
37
|
-
output: string;
|
|
38
|
-
exitCode: number;
|
|
39
|
-
}
|
|
40
|
-
export declare function resolveStashDir(): string;
|
|
41
|
-
export declare function agentikitSearch(input: {
|
|
42
|
-
query: string;
|
|
43
|
-
type?: AgentikitSearchType;
|
|
44
|
-
limit?: number;
|
|
45
|
-
}): SearchResponse;
|
|
46
|
-
export declare function agentikitOpen(input: {
|
|
47
|
-
ref: string;
|
|
48
|
-
}): OpenResponse;
|
|
49
|
-
export declare function agentikitRun(input: {
|
|
50
|
-
ref: string;
|
|
51
|
-
}): RunResponse;
|
|
52
|
-
export interface InitResponse {
|
|
53
|
-
stashDir: string;
|
|
54
|
-
created: boolean;
|
|
55
|
-
envSet: boolean;
|
|
56
|
-
profileUpdated?: string;
|
|
57
|
-
ripgrep?: {
|
|
58
|
-
rgPath: string;
|
|
59
|
-
installed: boolean;
|
|
60
|
-
version: string;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export declare function agentikitInit(): InitResponse;
|
|
1
|
+
export type { AgentikitAssetType } from "./common";
|
|
2
|
+
export { resolveStashDir } from "./common";
|
|
3
|
+
export { agentikitInit } from "./init";
|
|
4
|
+
export type { InitResponse } from "./init";
|
|
5
|
+
export type { ToolKind } from "./tool-runner";
|
|
6
|
+
export { agentikitSearch } from "./stash-search";
|
|
7
|
+
export { agentikitShow } from "./stash-show";
|
|
8
|
+
export { agentikitAdd } from "./stash-add";
|
|
9
|
+
export { agentikitList, agentikitRemove, agentikitReinstall, agentikitUpdate } from "./stash-registry";
|
|
10
|
+
export type { AddResponse, AgentikitSearchType, LocalSearchHit, RegistrySearchResultHit, SearchSource, SearchUsageMode, SearchHit, SearchResponse, ShowResponse, KnowledgeView, ListResponse, RemoveResponse, ReinstallResponse, UpdateResponse, RegistryListEntry, RegistryInstallStatus, ReinstallResultItem, UpdateResultItem, } from "./stash-types";
|