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.
Files changed (98) hide show
  1. package/README.md +215 -76
  2. package/dist/index.d.ts +17 -3
  3. package/dist/index.js +10 -2
  4. package/dist/src/asset-spec.d.ts +14 -0
  5. package/dist/src/asset-spec.js +46 -0
  6. package/dist/src/cli.js +268 -57
  7. package/dist/src/common.d.ts +8 -0
  8. package/dist/src/common.js +46 -0
  9. package/dist/src/config.d.ts +37 -0
  10. package/dist/src/config.js +124 -0
  11. package/dist/src/embedder.d.ts +10 -0
  12. package/dist/src/embedder.js +87 -0
  13. package/dist/src/frontmatter.d.ts +30 -0
  14. package/dist/src/frontmatter.js +86 -0
  15. package/dist/src/indexer.d.ts +20 -2
  16. package/dist/src/indexer.js +212 -80
  17. package/dist/src/init.d.ts +19 -0
  18. package/dist/src/init.js +87 -0
  19. package/dist/src/llm.d.ts +15 -0
  20. package/dist/src/llm.js +91 -0
  21. package/dist/src/markdown.d.ts +18 -0
  22. package/dist/src/markdown.js +77 -0
  23. package/dist/src/metadata.d.ts +11 -2
  24. package/dist/src/metadata.js +161 -29
  25. package/dist/src/registry-install.d.ts +11 -0
  26. package/dist/src/registry-install.js +208 -0
  27. package/dist/src/registry-resolve.d.ts +3 -0
  28. package/dist/src/registry-resolve.js +231 -0
  29. package/dist/src/registry-search.d.ts +5 -0
  30. package/dist/src/registry-search.js +129 -0
  31. package/dist/src/registry-types.d.ts +55 -0
  32. package/dist/src/registry-types.js +1 -0
  33. package/dist/src/ripgrep-install.d.ts +12 -0
  34. package/dist/src/ripgrep-install.js +169 -0
  35. package/dist/src/ripgrep-resolve.d.ts +13 -0
  36. package/dist/src/ripgrep-resolve.js +68 -0
  37. package/dist/src/ripgrep.d.ts +3 -36
  38. package/dist/src/ripgrep.js +2 -262
  39. package/dist/src/similarity.d.ts +1 -2
  40. package/dist/src/similarity.js +11 -0
  41. package/dist/src/stash-add.d.ts +4 -0
  42. package/dist/src/stash-add.js +59 -0
  43. package/dist/src/stash-ref.d.ts +7 -0
  44. package/dist/src/stash-ref.js +33 -0
  45. package/dist/src/stash-registry.d.ts +18 -0
  46. package/dist/src/stash-registry.js +221 -0
  47. package/dist/src/stash-resolve.d.ts +2 -0
  48. package/dist/src/stash-resolve.js +45 -0
  49. package/dist/src/stash-search.d.ts +8 -0
  50. package/dist/src/stash-search.js +484 -0
  51. package/dist/src/stash-show.d.ts +5 -0
  52. package/dist/src/stash-show.js +114 -0
  53. package/dist/src/stash-types.d.ts +217 -0
  54. package/dist/src/stash-types.js +1 -0
  55. package/dist/src/stash.d.ts +10 -63
  56. package/dist/src/stash.js +6 -633
  57. package/dist/src/tool-runner.d.ts +35 -0
  58. package/dist/src/tool-runner.js +100 -0
  59. package/dist/src/walker.d.ts +19 -0
  60. package/dist/src/walker.js +47 -0
  61. package/package.json +8 -14
  62. package/src/asset-spec.ts +69 -0
  63. package/src/cli.ts +282 -46
  64. package/src/common.ts +58 -0
  65. package/src/config.ts +183 -0
  66. package/src/embedder.ts +117 -0
  67. package/src/frontmatter.ts +95 -0
  68. package/src/indexer.ts +244 -84
  69. package/src/init.ts +106 -0
  70. package/src/llm.ts +124 -0
  71. package/src/markdown.ts +106 -0
  72. package/src/metadata.ts +171 -27
  73. package/src/registry-install.ts +245 -0
  74. package/src/registry-resolve.ts +272 -0
  75. package/src/registry-search.ts +145 -0
  76. package/src/registry-types.ts +64 -0
  77. package/src/ripgrep-install.ts +200 -0
  78. package/src/ripgrep-resolve.ts +72 -0
  79. package/src/ripgrep.ts +3 -315
  80. package/src/similarity.ts +13 -1
  81. package/src/stash-add.ts +66 -0
  82. package/src/stash-ref.ts +41 -0
  83. package/src/stash-registry.ts +259 -0
  84. package/src/stash-resolve.ts +47 -0
  85. package/src/stash-search.ts +595 -0
  86. package/src/stash-show.ts +112 -0
  87. package/src/stash-types.ts +221 -0
  88. package/src/stash.ts +31 -760
  89. package/src/tool-runner.ts +129 -0
  90. package/src/walker.ts +53 -0
  91. package/.claude-plugin/plugin.json +0 -21
  92. package/commands/open.md +0 -11
  93. package/commands/run.md +0 -11
  94. package/commands/search.md +0 -11
  95. package/dist/src/plugin.d.ts +0 -2
  96. package/dist/src/plugin.js +0 -55
  97. package/skills/stash/SKILL.md +0 -73
  98. 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 {};
@@ -1,63 +1,10 @@
1
- export type AgentikitAssetType = "tool" | "skill" | "command" | "agent";
2
- export type AgentikitSearchType = AgentikitAssetType | "any";
3
- export interface SearchHit {
4
- type: AgentikitAssetType;
5
- name: string;
6
- path: string;
7
- openRef: string;
8
- summary?: string;
9
- description?: string;
10
- tags?: string[];
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";