@goondan/openharness-base 0.0.1-alpha1

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 (83) hide show
  1. package/README.md +11 -0
  2. package/dist/extensions/compaction.d.ts +12 -0
  3. package/dist/extensions/compaction.d.ts.map +1 -0
  4. package/dist/extensions/compaction.js +162 -0
  5. package/dist/extensions/compaction.js.map +1 -0
  6. package/dist/extensions/context-message.d.ts +9 -0
  7. package/dist/extensions/context-message.d.ts.map +1 -0
  8. package/dist/extensions/context-message.js +451 -0
  9. package/dist/extensions/context-message.js.map +1 -0
  10. package/dist/extensions/index.d.ts +13 -0
  11. package/dist/extensions/index.d.ts.map +1 -0
  12. package/dist/extensions/index.js +7 -0
  13. package/dist/extensions/index.js.map +1 -0
  14. package/dist/extensions/logging.d.ts +11 -0
  15. package/dist/extensions/logging.d.ts.map +1 -0
  16. package/dist/extensions/logging.js +140 -0
  17. package/dist/extensions/logging.js.map +1 -0
  18. package/dist/extensions/message-integrity.d.ts +8 -0
  19. package/dist/extensions/message-integrity.d.ts.map +1 -0
  20. package/dist/extensions/message-integrity.js +88 -0
  21. package/dist/extensions/message-integrity.js.map +1 -0
  22. package/dist/extensions/message-window.d.ts +7 -0
  23. package/dist/extensions/message-window.d.ts.map +1 -0
  24. package/dist/extensions/message-window.js +60 -0
  25. package/dist/extensions/message-window.js.map +1 -0
  26. package/dist/extensions/required-tools-guard.d.ts +9 -0
  27. package/dist/extensions/required-tools-guard.d.ts.map +1 -0
  28. package/dist/extensions/required-tools-guard.js +74 -0
  29. package/dist/extensions/required-tools-guard.js.map +1 -0
  30. package/dist/extensions/tool-search.d.ts +10 -0
  31. package/dist/extensions/tool-search.d.ts.map +1 -0
  32. package/dist/extensions/tool-search.js +198 -0
  33. package/dist/extensions/tool-search.js.map +1 -0
  34. package/dist/harness.yaml +503 -0
  35. package/dist/index.d.ts +5 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +5 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/manifests/base.d.ts +8 -0
  40. package/dist/manifests/base.d.ts.map +1 -0
  41. package/dist/manifests/base.js +352 -0
  42. package/dist/manifests/base.js.map +1 -0
  43. package/dist/manifests/index.d.ts +3 -0
  44. package/dist/manifests/index.d.ts.map +1 -0
  45. package/dist/manifests/index.js +2 -0
  46. package/dist/manifests/index.js.map +1 -0
  47. package/dist/tools/bash.d.ts +8 -0
  48. package/dist/tools/bash.d.ts.map +1 -0
  49. package/dist/tools/bash.js +119 -0
  50. package/dist/tools/bash.js.map +1 -0
  51. package/dist/tools/file-system.d.ts +12 -0
  52. package/dist/tools/file-system.d.ts.map +1 -0
  53. package/dist/tools/file-system.js +117 -0
  54. package/dist/tools/file-system.js.map +1 -0
  55. package/dist/tools/http-fetch.d.ts +8 -0
  56. package/dist/tools/http-fetch.d.ts.map +1 -0
  57. package/dist/tools/http-fetch.js +149 -0
  58. package/dist/tools/http-fetch.js.map +1 -0
  59. package/dist/tools/index.d.ts +7 -0
  60. package/dist/tools/index.d.ts.map +1 -0
  61. package/dist/tools/index.js +7 -0
  62. package/dist/tools/index.js.map +1 -0
  63. package/dist/tools/json-query.d.ts +12 -0
  64. package/dist/tools/json-query.d.ts.map +1 -0
  65. package/dist/tools/json-query.js +176 -0
  66. package/dist/tools/json-query.js.map +1 -0
  67. package/dist/tools/text-transform.d.ts +16 -0
  68. package/dist/tools/text-transform.d.ts.map +1 -0
  69. package/dist/tools/text-transform.js +127 -0
  70. package/dist/tools/text-transform.js.map +1 -0
  71. package/dist/tools/wait.d.ts +6 -0
  72. package/dist/tools/wait.d.ts.map +1 -0
  73. package/dist/tools/wait.js +32 -0
  74. package/dist/tools/wait.js.map +1 -0
  75. package/dist/types.d.ts +4 -0
  76. package/dist/types.d.ts.map +1 -0
  77. package/dist/types.js +6 -0
  78. package/dist/types.js.map +1 -0
  79. package/dist/utils.d.ts +17 -0
  80. package/dist/utils.d.ts.map +1 -0
  81. package/dist/utils.js +155 -0
  82. package/dist/utils.js.map +1 -0
  83. package/package.json +45 -0
@@ -0,0 +1,503 @@
1
+ apiVersion: "goondan.ai/v1"
2
+ kind: "Package"
3
+ metadata:
4
+ name: "@goondan/openharness-base"
5
+ spec:
6
+ version: "0.0.1-alpha1"
7
+ ---
8
+ apiVersion: "goondan.ai/v1"
9
+ kind: "Tool"
10
+ metadata:
11
+ name: "bash"
12
+ labels:
13
+ tier: "base"
14
+ spec:
15
+ entry: "./dist/tools/bash.js"
16
+ errorMessageLimit: 1200
17
+ exports:
18
+ -
19
+ name: "exec"
20
+ description: "Execute one shell command using /bin/sh -lc in the current instance workspace."
21
+ parameters:
22
+ type: "object"
23
+ properties:
24
+ command:
25
+ type: "string"
26
+ description: "Shell command string to execute."
27
+ cwd:
28
+ type: "string"
29
+ description: "Optional working directory path relative to the instance workdir."
30
+ timeoutMs:
31
+ type: "number"
32
+ description: "Maximum execution time in milliseconds (default: 30000)."
33
+ env:
34
+ type: "object"
35
+ description: "Optional environment variable overrides merged with process.env before execution."
36
+ additionalProperties: false
37
+ required:
38
+ - "command"
39
+ -
40
+ name: "script"
41
+ description: "Run a script file from workdir with optional arguments and custom shell."
42
+ parameters:
43
+ type: "object"
44
+ properties:
45
+ path:
46
+ type: "string"
47
+ description: "Script file path relative to the instance workdir."
48
+ args:
49
+ type: "array"
50
+ description: "Optional command-line arguments passed to the script in order."
51
+ items:
52
+ type: "string"
53
+ description: "Single script argument value."
54
+ shell:
55
+ type: "string"
56
+ description: "Shell binary path used to execute the script (default: /bin/bash)."
57
+ timeoutMs:
58
+ type: "number"
59
+ description: "Maximum execution time in milliseconds (default: 30000)."
60
+ env:
61
+ type: "object"
62
+ description: "Optional environment variable overrides merged with process.env before execution."
63
+ additionalProperties: false
64
+ required:
65
+ - "path"
66
+ ---
67
+ apiVersion: "goondan.ai/v1"
68
+ kind: "Tool"
69
+ metadata:
70
+ name: "wait"
71
+ labels:
72
+ tier: "base"
73
+ spec:
74
+ entry: "./dist/tools/wait.js"
75
+ errorMessageLimit: 600
76
+ exports:
77
+ -
78
+ name: "seconds"
79
+ description: "Pause execution for the specified number of seconds"
80
+ parameters:
81
+ type: "object"
82
+ properties:
83
+ seconds:
84
+ type: "number"
85
+ description: "Seconds to wait (range: 0 to 300)."
86
+ additionalProperties: false
87
+ required:
88
+ - "seconds"
89
+ ---
90
+ apiVersion: "goondan.ai/v1"
91
+ kind: "Tool"
92
+ metadata:
93
+ name: "file-system"
94
+ labels:
95
+ tier: "base"
96
+ spec:
97
+ entry: "./dist/tools/file-system.js"
98
+ errorMessageLimit: 2000
99
+ exports:
100
+ -
101
+ name: "read"
102
+ description: "Read file content from workdir"
103
+ parameters:
104
+ type: "object"
105
+ properties:
106
+ path:
107
+ type: "string"
108
+ description: "File path relative to workdir to read."
109
+ maxBytes:
110
+ type: "number"
111
+ description: "Maximum bytes to return from file content (default: 100000)."
112
+ additionalProperties: false
113
+ required:
114
+ - "path"
115
+ -
116
+ name: "write"
117
+ description: "Write file content in workdir"
118
+ parameters:
119
+ type: "object"
120
+ properties:
121
+ path:
122
+ type: "string"
123
+ description: "File path relative to workdir to write. Parent directories are created automatically."
124
+ content:
125
+ type: "string"
126
+ description: "UTF-8 text content to write."
127
+ append:
128
+ type: "boolean"
129
+ description: "When true, append content instead of overwriting the file (default: false)."
130
+ additionalProperties: false
131
+ required:
132
+ - "path"
133
+ - "content"
134
+ -
135
+ name: "list"
136
+ description: "List directory entries"
137
+ parameters:
138
+ type: "object"
139
+ properties:
140
+ path:
141
+ type: "string"
142
+ description: "Directory path relative to workdir (default: \".\")."
143
+ recursive:
144
+ type: "boolean"
145
+ description: "When true, traverse subdirectories recursively (default: false)."
146
+ includeDirs:
147
+ type: "boolean"
148
+ description: "Include directory entries in result (default: true)."
149
+ includeFiles:
150
+ type: "boolean"
151
+ description: "Include file entries in result (default: true)."
152
+ additionalProperties: false
153
+ -
154
+ name: "mkdir"
155
+ description: "Create directory in workdir"
156
+ parameters:
157
+ type: "object"
158
+ properties:
159
+ path:
160
+ type: "string"
161
+ description: "Directory path relative to workdir to create."
162
+ recursive:
163
+ type: "boolean"
164
+ description: "Create parent directories when missing (default: true)."
165
+ additionalProperties: false
166
+ required:
167
+ - "path"
168
+ ---
169
+ apiVersion: "goondan.ai/v1"
170
+ kind: "Tool"
171
+ metadata:
172
+ name: "http-fetch"
173
+ labels:
174
+ tier: "base"
175
+ spec:
176
+ entry: "./dist/tools/http-fetch.js"
177
+ exports:
178
+ -
179
+ name: "get"
180
+ description: "Perform HTTP GET request"
181
+ parameters:
182
+ type: "object"
183
+ properties:
184
+ url:
185
+ type: "string"
186
+ description: "HTTP/HTTPS URL to request."
187
+ headers:
188
+ type: "object"
189
+ description: "Optional request headers object. Primitive values are stringified."
190
+ timeoutMs:
191
+ type: "number"
192
+ description: "Request timeout in milliseconds (default: 30000)."
193
+ maxBytes:
194
+ type: "number"
195
+ description: "Maximum response body bytes returned (default: 500000)."
196
+ additionalProperties: false
197
+ required:
198
+ - "url"
199
+ -
200
+ name: "post"
201
+ description: "Perform HTTP POST request"
202
+ parameters:
203
+ type: "object"
204
+ properties:
205
+ url:
206
+ type: "string"
207
+ description: "HTTP/HTTPS URL to request."
208
+ body:
209
+ type: "object"
210
+ description: "JSON body object. When provided, it is stringified and content-type defaults to application/json."
211
+ bodyString:
212
+ type: "string"
213
+ description: "Raw string request body. Ignored when body is provided."
214
+ headers:
215
+ type: "object"
216
+ description: "Optional request headers object. Primitive values are stringified."
217
+ timeoutMs:
218
+ type: "number"
219
+ description: "Request timeout in milliseconds (default: 30000)."
220
+ maxBytes:
221
+ type: "number"
222
+ description: "Maximum response body bytes returned (default: 500000)."
223
+ additionalProperties: false
224
+ required:
225
+ - "url"
226
+ ---
227
+ apiVersion: "goondan.ai/v1"
228
+ kind: "Tool"
229
+ metadata:
230
+ name: "json-query"
231
+ labels:
232
+ tier: "base"
233
+ spec:
234
+ entry: "./dist/tools/json-query.js"
235
+ exports:
236
+ -
237
+ name: "query"
238
+ description: "Query JSON data by dot-notation path"
239
+ parameters:
240
+ type: "object"
241
+ properties:
242
+ data:
243
+ type: "string"
244
+ description: "Input JSON string to parse and query."
245
+ path:
246
+ type: "string"
247
+ description: "Dot/bracket path expression. Defaults to \".\" for root."
248
+ additionalProperties: false
249
+ required:
250
+ - "data"
251
+ -
252
+ name: "pick"
253
+ description: "Pick specific keys from JSON object"
254
+ parameters:
255
+ type: "object"
256
+ properties:
257
+ data:
258
+ type: "string"
259
+ description: "Input JSON string expected to be an object."
260
+ keys:
261
+ type: "array"
262
+ description: "Object keys to pick from parsed JSON object."
263
+ items:
264
+ type: "string"
265
+ description: "Key name to pick."
266
+ additionalProperties: false
267
+ required:
268
+ - "data"
269
+ - "keys"
270
+ -
271
+ name: "count"
272
+ description: "Count elements at a JSON path"
273
+ parameters:
274
+ type: "object"
275
+ properties:
276
+ data:
277
+ type: "string"
278
+ description: "Input JSON string to parse."
279
+ path:
280
+ type: "string"
281
+ description: "Dot/bracket path expression to count at. Defaults to \".\" for root."
282
+ additionalProperties: false
283
+ required:
284
+ - "data"
285
+ -
286
+ name: "flatten"
287
+ description: "Flatten nested JSON arrays"
288
+ parameters:
289
+ type: "object"
290
+ properties:
291
+ data:
292
+ type: "string"
293
+ description: "Input JSON string expected to be an array."
294
+ depth:
295
+ type: "number"
296
+ description: "Flatten depth level (default: 1)."
297
+ additionalProperties: false
298
+ required:
299
+ - "data"
300
+ ---
301
+ apiVersion: "goondan.ai/v1"
302
+ kind: "Tool"
303
+ metadata:
304
+ name: "text-transform"
305
+ labels:
306
+ tier: "base"
307
+ spec:
308
+ entry: "./dist/tools/text-transform.js"
309
+ exports:
310
+ -
311
+ name: "replace"
312
+ description: "Replace text occurrences"
313
+ parameters:
314
+ type: "object"
315
+ properties:
316
+ text:
317
+ type: "string"
318
+ description: "Source text to transform."
319
+ search:
320
+ type: "string"
321
+ description: "Search string to find in text."
322
+ replacement:
323
+ type: "string"
324
+ description: "Replacement string (default: empty string)."
325
+ all:
326
+ type: "boolean"
327
+ description: "Replace all occurrences instead of first occurrence only."
328
+ additionalProperties: false
329
+ required:
330
+ - "text"
331
+ - "search"
332
+ -
333
+ name: "slice"
334
+ description: "Extract substring by start/end positions"
335
+ parameters:
336
+ type: "object"
337
+ properties:
338
+ text:
339
+ type: "string"
340
+ description: "Source text to slice."
341
+ start:
342
+ type: "number"
343
+ description: "Start index (default: 0)."
344
+ end:
345
+ type: "number"
346
+ description: "Optional end index (exclusive)."
347
+ additionalProperties: false
348
+ required:
349
+ - "text"
350
+ -
351
+ name: "split"
352
+ description: "Split text by delimiter"
353
+ parameters:
354
+ type: "object"
355
+ properties:
356
+ text:
357
+ type: "string"
358
+ description: "Source text to split."
359
+ delimiter:
360
+ type: "string"
361
+ description: "Delimiter string (default: newline)."
362
+ maxParts:
363
+ type: "number"
364
+ description: "Optional maximum number of split parts to return."
365
+ additionalProperties: false
366
+ required:
367
+ - "text"
368
+ -
369
+ name: "join"
370
+ description: "Join array of strings with delimiter"
371
+ parameters:
372
+ type: "object"
373
+ properties:
374
+ parts:
375
+ type: "array"
376
+ description: "List of values to join into a single string."
377
+ items:
378
+ type:
379
+ - "string"
380
+ - "number"
381
+ - "boolean"
382
+ description: "Part value. Numbers/booleans are stringified before join."
383
+ delimiter:
384
+ type: "string"
385
+ description: "Delimiter string inserted between parts (default: newline)."
386
+ additionalProperties: false
387
+ required:
388
+ - "parts"
389
+ -
390
+ name: "trim"
391
+ description: "Trim whitespace from text"
392
+ parameters:
393
+ type: "object"
394
+ properties:
395
+ text:
396
+ type: "string"
397
+ description: "Source text to trim."
398
+ mode:
399
+ type: "string"
400
+ description: "Trim mode (default: both)."
401
+ enum:
402
+ - "start"
403
+ - "end"
404
+ - "both"
405
+ additionalProperties: false
406
+ required:
407
+ - "text"
408
+ -
409
+ name: "case"
410
+ description: "Transform text case (upper/lower)"
411
+ parameters:
412
+ type: "object"
413
+ properties:
414
+ text:
415
+ type: "string"
416
+ description: "Source text to transform."
417
+ to:
418
+ type: "string"
419
+ description: "Target case transform mode."
420
+ enum:
421
+ - "upper"
422
+ - "lower"
423
+ additionalProperties: false
424
+ required:
425
+ - "text"
426
+ - "to"
427
+ ---
428
+ apiVersion: "goondan.ai/v1"
429
+ kind: "Extension"
430
+ metadata:
431
+ name: "logging"
432
+ labels:
433
+ tier: "base"
434
+ spec:
435
+ entry: "./dist/extensions/logging.js"
436
+ config:
437
+ level: "info"
438
+ includeToolArgs: false
439
+ ---
440
+ apiVersion: "goondan.ai/v1"
441
+ kind: "Extension"
442
+ metadata:
443
+ name: "message-compaction"
444
+ labels:
445
+ tier: "base"
446
+ spec:
447
+ entry: "./dist/extensions/compaction.js"
448
+ config:
449
+ maxMessages: 40
450
+ maxCharacters: 12000
451
+ retainLastMessages: 8
452
+ mode: "remove"
453
+ appendSummary: true
454
+ ---
455
+ apiVersion: "goondan.ai/v1"
456
+ kind: "Extension"
457
+ metadata:
458
+ name: "message-window"
459
+ labels:
460
+ tier: "base"
461
+ spec:
462
+ entry: "./dist/extensions/message-window.js"
463
+ config:
464
+ maxMessages: 80
465
+ ---
466
+ apiVersion: "goondan.ai/v1"
467
+ kind: "Extension"
468
+ metadata:
469
+ name: "tool-search"
470
+ labels:
471
+ tier: "base"
472
+ spec:
473
+ entry: "./dist/extensions/tool-search.js"
474
+ config:
475
+ toolName: "tool-search__search"
476
+ maxResults: 10
477
+ minQueryLength: 1
478
+ persistSelection: true
479
+ ---
480
+ apiVersion: "goondan.ai/v1"
481
+ kind: "Extension"
482
+ metadata:
483
+ name: "context-message"
484
+ labels:
485
+ tier: "base"
486
+ spec:
487
+ entry: "./dist/extensions/context-message.js"
488
+ config:
489
+ includeAgentPrompt: true
490
+ includeRouteSummary: false
491
+ includeInboundInput: true
492
+ ---
493
+ apiVersion: "goondan.ai/v1"
494
+ kind: "Extension"
495
+ metadata:
496
+ name: "required-tools-guard"
497
+ labels:
498
+ tier: "base"
499
+ spec:
500
+ entry: "./dist/extensions/required-tools-guard.js"
501
+ config:
502
+ requiredTools: []
503
+ errorMessage: ""
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export * from './tools/index.js';
3
+ export * from './extensions/index.js';
4
+ export * from './manifests/index.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export * from './tools/index.js';
3
+ export * from './extensions/index.js';
4
+ export * from './manifests/index.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ExtensionManifestSpec, ResourceManifest, ToolManifestSpec } from '../types.js';
2
+ export type BaseToolManifest = ResourceManifest<'Tool', ToolManifestSpec>;
3
+ export type BaseExtensionManifest = ResourceManifest<'Extension', ExtensionManifestSpec>;
4
+ export type BaseManifest = BaseToolManifest | BaseExtensionManifest;
5
+ export declare function createBaseToolManifests(): BaseToolManifest[];
6
+ export declare function createBaseExtensionManifests(): BaseExtensionManifest[];
7
+ export declare function createBaseManifestSet(): BaseManifest[];
8
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/manifests/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EAErB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;AAEzF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;AA+HpE,wBAAgB,uBAAuB,IAAI,gBAAgB,EAAE,CAuR5D;AAED,wBAAgB,4BAA4B,IAAI,qBAAqB,EAAE,CAkCtE;AAED,wBAAgB,qBAAqB,IAAI,YAAY,EAAE,CAKtD"}