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