@hearsay-tools/squawk 0.18.0-dev.8054 → 0.18.0-dev.8063
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/dist/automations/agent-tools.d.ts +2 -0
- package/dist/automations/agent-tools.js +24 -0
- package/dist/automations/agent-tools.js.map +1 -0
- package/dist/automations/tool-catalog.d.ts +119 -0
- package/dist/automations/tool-catalog.js +48 -0
- package/dist/automations/tool-catalog.js.map +1 -0
- package/dist/automations/tool-client.d.ts +9 -0
- package/dist/automations/tool-client.js +19 -0
- package/dist/automations/tool-client.js.map +1 -0
- package/dist/automations/tool-env.d.ts +1 -0
- package/dist/automations/tool-env.js +3 -0
- package/dist/automations/tool-env.js.map +1 -0
- package/dist/automations/tool-errors.d.ts +9 -0
- package/dist/automations/tool-errors.js +34 -0
- package/dist/automations/tool-errors.js.map +1 -0
- package/dist/automations/tool-session.d.ts +5 -0
- package/dist/automations/tool-session.js +19 -0
- package/dist/automations/tool-session.js.map +1 -0
- package/dist/automations/tools.d.ts +325 -0
- package/dist/automations/tools.js +30 -0
- package/dist/automations/tools.js.map +1 -0
- package/dist/built-in-tool-definitions.d.ts +0 -2
- package/dist/built-in-tool-definitions.js +3 -35
- package/dist/built-in-tool-definitions.js.map +1 -1
- package/dist/built-in-tools.js +4 -2
- package/dist/built-in-tools.js.map +1 -1
- package/dist/built-in-wait-kinds.d.ts +2 -1
- package/dist/built-in-wait-kinds.js +9 -5
- package/dist/built-in-wait-kinds.js.map +1 -1
- package/dist/ci-wait/client.d.ts +0 -17
- package/dist/ci-wait/client.js +0 -31
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.js +1 -2
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +1 -14
- package/dist/ci-wait/errors.js +0 -68
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/pr-wait-kind.d.ts +65 -0
- package/dist/ci-wait/pr-wait-kind.js +120 -0
- package/dist/ci-wait/pr-wait-kind.js.map +1 -0
- package/dist/ci-wait/tool-catalog.d.ts +0 -263
- package/dist/ci-wait/tool-catalog.js +0 -58
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tool-definition.d.ts +21 -0
- package/dist/ci-wait/tool-definition.js +9 -0
- package/dist/ci-wait/tool-definition.js.map +1 -0
- package/dist/ci-wait/tool-registry.d.ts +2 -0
- package/dist/ci-wait/tool-registry.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +2 -381
- package/dist/ci-wait/tools.js +3 -46
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/delegation/wait-kinds.d.ts +8 -0
- package/dist/delegation/wait-kinds.js +317 -0
- package/dist/delegation/wait-kinds.js.map +1 -0
- package/dist/preview/agent-address.js +1 -1
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/agent-tools.d.ts +2 -0
- package/dist/preview/agent-tools.js +18 -0
- package/dist/preview/agent-tools.js.map +1 -0
- package/dist/preview/registration.js +1 -1
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +1 -0
- package/dist/preview/run-tools.js +2 -1
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/preview/tool-catalog.d.ts +146 -0
- package/dist/preview/tool-catalog.js +14 -0
- package/dist/preview/tool-catalog.js.map +1 -0
- package/dist/preview/tool-client.d.ts +8 -0
- package/dist/preview/tool-client.js +16 -0
- package/dist/preview/tool-client.js.map +1 -0
- package/dist/preview/tool-env.d.ts +2 -0
- package/dist/preview/tool-env.js +4 -0
- package/dist/preview/tool-env.js.map +1 -0
- package/dist/preview/tool-errors.d.ts +7 -0
- package/dist/preview/tool-errors.js +36 -0
- package/dist/preview/tool-errors.js.map +1 -0
- package/dist/preview/tool-session.d.ts +6 -0
- package/dist/preview/tool-session.js +9 -0
- package/dist/preview/tool-session.js.map +1 -0
- package/dist/preview/tools.d.ts +57 -0
- package/dist/preview/tools.js +18 -0
- package/dist/preview/tools.js.map +1 -0
- package/dist/serve-command.d.ts +1 -1
- package/dist/serve-command.js +1 -1
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/workflows/run/compose.js +2 -2
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +6 -9
- package/dist/workflows/run/squawk-tools.js +8 -18
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +23 -37
- package/dist/workflows/run/wait-engine.js +100 -212
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-kind-registry.d.ts +78 -2
- package/dist/workflows/run/wait-kind-registry.js.map +1 -1
- package/dist/workflows/run/wait-kinds.d.ts +390 -1011
- package/dist/workflows/run/wait-kinds.js +71 -188
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration.d.ts +7 -0
- package/dist/workflows/run/wait-registration.js +2 -0
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +26 -36
- package/dist/workflows/run/wait-registry.js +71 -160
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/waits.d.ts +2 -2
- package/dist/workflows/waits.js +2 -2
- package/dist/workflows/waits.js.map +1 -1
- package/package.json +4 -4
- package/dist/ci-wait/tool-env.d.ts +0 -4
- package/dist/ci-wait/tool-env.js +0 -11
- package/dist/ci-wait/tool-env.js.map +0 -1
|
@@ -249,269 +249,6 @@ export declare const doneToolDefinition: {
|
|
|
249
249
|
type: 'object';
|
|
250
250
|
};
|
|
251
251
|
};
|
|
252
|
-
export declare const previewToolDefinition: {
|
|
253
|
-
name: string;
|
|
254
|
-
description: string;
|
|
255
|
-
inputSchema: {
|
|
256
|
-
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
257
|
-
$id?: string;
|
|
258
|
-
$anchor?: string;
|
|
259
|
-
$ref?: string;
|
|
260
|
-
$dynamicRef?: string;
|
|
261
|
-
$dynamicAnchor?: string;
|
|
262
|
-
$vocabulary?: Record<string, boolean>;
|
|
263
|
-
$comment?: string;
|
|
264
|
-
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
265
|
-
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
266
|
-
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
267
|
-
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
268
|
-
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
269
|
-
contains?: z.core.JSONSchema._JSONSchema;
|
|
270
|
-
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
271
|
-
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
272
|
-
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
273
|
-
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
274
|
-
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
275
|
-
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
276
|
-
if?: z.core.JSONSchema._JSONSchema;
|
|
277
|
-
then?: z.core.JSONSchema._JSONSchema;
|
|
278
|
-
else?: z.core.JSONSchema._JSONSchema;
|
|
279
|
-
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
280
|
-
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
281
|
-
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
282
|
-
not?: z.core.JSONSchema._JSONSchema;
|
|
283
|
-
multipleOf?: number;
|
|
284
|
-
maximum?: number;
|
|
285
|
-
exclusiveMaximum?: number | boolean;
|
|
286
|
-
minimum?: number;
|
|
287
|
-
exclusiveMinimum?: number | boolean;
|
|
288
|
-
maxLength?: number;
|
|
289
|
-
minLength?: number;
|
|
290
|
-
pattern?: string;
|
|
291
|
-
maxItems?: number;
|
|
292
|
-
minItems?: number;
|
|
293
|
-
uniqueItems?: boolean;
|
|
294
|
-
maxContains?: number;
|
|
295
|
-
minContains?: number;
|
|
296
|
-
maxProperties?: number;
|
|
297
|
-
minProperties?: number;
|
|
298
|
-
required?: string[];
|
|
299
|
-
dependentRequired?: Record<string, string[]>;
|
|
300
|
-
enum?: Array<string | number | boolean | null>;
|
|
301
|
-
const?: string | number | boolean | null;
|
|
302
|
-
id?: string;
|
|
303
|
-
title?: string;
|
|
304
|
-
description?: string;
|
|
305
|
-
default?: unknown;
|
|
306
|
-
deprecated?: boolean;
|
|
307
|
-
readOnly?: boolean;
|
|
308
|
-
writeOnly?: boolean;
|
|
309
|
-
nullable?: boolean;
|
|
310
|
-
examples?: unknown[];
|
|
311
|
-
format?: string;
|
|
312
|
-
contentMediaType?: string;
|
|
313
|
-
contentEncoding?: string;
|
|
314
|
-
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
315
|
-
_prefault?: unknown;
|
|
316
|
-
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodObject<{
|
|
317
|
-
command: z.ZodString;
|
|
318
|
-
port: z.ZodNumber;
|
|
319
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
320
|
-
label: z.ZodOptional<z.ZodString>;
|
|
321
|
-
path: z.ZodOptional<z.ZodString>;
|
|
322
|
-
}, z.core.$strip>>;
|
|
323
|
-
type: 'object';
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
export declare const previewStopToolDefinition: {
|
|
327
|
-
name: string;
|
|
328
|
-
description: string;
|
|
329
|
-
inputSchema: {
|
|
330
|
-
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
331
|
-
$id?: string;
|
|
332
|
-
$anchor?: string;
|
|
333
|
-
$ref?: string;
|
|
334
|
-
$dynamicRef?: string;
|
|
335
|
-
$dynamicAnchor?: string;
|
|
336
|
-
$vocabulary?: Record<string, boolean>;
|
|
337
|
-
$comment?: string;
|
|
338
|
-
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
339
|
-
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
340
|
-
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
341
|
-
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
342
|
-
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
343
|
-
contains?: z.core.JSONSchema._JSONSchema;
|
|
344
|
-
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
345
|
-
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
346
|
-
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
347
|
-
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
348
|
-
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
349
|
-
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
350
|
-
if?: z.core.JSONSchema._JSONSchema;
|
|
351
|
-
then?: z.core.JSONSchema._JSONSchema;
|
|
352
|
-
else?: z.core.JSONSchema._JSONSchema;
|
|
353
|
-
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
354
|
-
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
355
|
-
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
356
|
-
not?: z.core.JSONSchema._JSONSchema;
|
|
357
|
-
multipleOf?: number;
|
|
358
|
-
maximum?: number;
|
|
359
|
-
exclusiveMaximum?: number | boolean;
|
|
360
|
-
minimum?: number;
|
|
361
|
-
exclusiveMinimum?: number | boolean;
|
|
362
|
-
maxLength?: number;
|
|
363
|
-
minLength?: number;
|
|
364
|
-
pattern?: string;
|
|
365
|
-
maxItems?: number;
|
|
366
|
-
minItems?: number;
|
|
367
|
-
uniqueItems?: boolean;
|
|
368
|
-
maxContains?: number;
|
|
369
|
-
minContains?: number;
|
|
370
|
-
maxProperties?: number;
|
|
371
|
-
minProperties?: number;
|
|
372
|
-
required?: string[];
|
|
373
|
-
dependentRequired?: Record<string, string[]>;
|
|
374
|
-
enum?: Array<string | number | boolean | null>;
|
|
375
|
-
const?: string | number | boolean | null;
|
|
376
|
-
id?: string;
|
|
377
|
-
title?: string;
|
|
378
|
-
description?: string;
|
|
379
|
-
default?: unknown;
|
|
380
|
-
deprecated?: boolean;
|
|
381
|
-
readOnly?: boolean;
|
|
382
|
-
writeOnly?: boolean;
|
|
383
|
-
nullable?: boolean;
|
|
384
|
-
examples?: unknown[];
|
|
385
|
-
format?: string;
|
|
386
|
-
contentMediaType?: string;
|
|
387
|
-
contentEncoding?: string;
|
|
388
|
-
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
389
|
-
_prefault?: unknown;
|
|
390
|
-
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodObject<{
|
|
391
|
-
port: z.ZodNumber;
|
|
392
|
-
restart: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
-
}, z.core.$strict>>;
|
|
394
|
-
type: 'object';
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
/**
|
|
398
|
-
* hearsay-tools/cezarion#1465: a one-time schedule starts later as an ordinary task, so the agent
|
|
399
|
-
* does not keep a session parked on timers for days. `cezar_scheduled_tasks` takes one action per
|
|
400
|
-
* call; its union is advertised as one flat object for the same reason as `cezar_wait`.
|
|
401
|
-
*/
|
|
402
|
-
export declare const scheduleTaskToolDefinition: {
|
|
403
|
-
name: string;
|
|
404
|
-
description: string;
|
|
405
|
-
inputSchema: {
|
|
406
|
-
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
407
|
-
$id?: string;
|
|
408
|
-
$anchor?: string;
|
|
409
|
-
$ref?: string;
|
|
410
|
-
$dynamicRef?: string;
|
|
411
|
-
$dynamicAnchor?: string;
|
|
412
|
-
$vocabulary?: Record<string, boolean>;
|
|
413
|
-
$comment?: string;
|
|
414
|
-
$defs?: Record<string, z.core.JSONSchema.JSONSchema>;
|
|
415
|
-
additionalItems?: z.core.JSONSchema._JSONSchema;
|
|
416
|
-
unevaluatedItems?: z.core.JSONSchema._JSONSchema;
|
|
417
|
-
prefixItems?: z.core.JSONSchema._JSONSchema[];
|
|
418
|
-
items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
|
|
419
|
-
contains?: z.core.JSONSchema._JSONSchema;
|
|
420
|
-
additionalProperties?: z.core.JSONSchema._JSONSchema;
|
|
421
|
-
unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
|
|
422
|
-
properties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
423
|
-
patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
424
|
-
dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
|
|
425
|
-
propertyNames?: z.core.JSONSchema._JSONSchema;
|
|
426
|
-
if?: z.core.JSONSchema._JSONSchema;
|
|
427
|
-
then?: z.core.JSONSchema._JSONSchema;
|
|
428
|
-
else?: z.core.JSONSchema._JSONSchema;
|
|
429
|
-
allOf?: z.core.JSONSchema.JSONSchema[];
|
|
430
|
-
anyOf?: z.core.JSONSchema.JSONSchema[];
|
|
431
|
-
oneOf?: z.core.JSONSchema.JSONSchema[];
|
|
432
|
-
not?: z.core.JSONSchema._JSONSchema;
|
|
433
|
-
multipleOf?: number;
|
|
434
|
-
maximum?: number;
|
|
435
|
-
exclusiveMaximum?: number | boolean;
|
|
436
|
-
minimum?: number;
|
|
437
|
-
exclusiveMinimum?: number | boolean;
|
|
438
|
-
maxLength?: number;
|
|
439
|
-
minLength?: number;
|
|
440
|
-
pattern?: string;
|
|
441
|
-
maxItems?: number;
|
|
442
|
-
minItems?: number;
|
|
443
|
-
uniqueItems?: boolean;
|
|
444
|
-
maxContains?: number;
|
|
445
|
-
minContains?: number;
|
|
446
|
-
maxProperties?: number;
|
|
447
|
-
minProperties?: number;
|
|
448
|
-
required?: string[];
|
|
449
|
-
dependentRequired?: Record<string, string[]>;
|
|
450
|
-
enum?: Array<string | number | boolean | null>;
|
|
451
|
-
const?: string | number | boolean | null;
|
|
452
|
-
id?: string;
|
|
453
|
-
title?: string;
|
|
454
|
-
description?: string;
|
|
455
|
-
default?: unknown;
|
|
456
|
-
deprecated?: boolean;
|
|
457
|
-
readOnly?: boolean;
|
|
458
|
-
writeOnly?: boolean;
|
|
459
|
-
nullable?: boolean;
|
|
460
|
-
examples?: unknown[];
|
|
461
|
-
format?: string;
|
|
462
|
-
contentMediaType?: string;
|
|
463
|
-
contentEncoding?: string;
|
|
464
|
-
contentSchema?: z.core.JSONSchema.JSONSchema;
|
|
465
|
-
_prefault?: unknown;
|
|
466
|
-
"~standard": z.core.ZodStandardSchemaWithJSON<z.ZodObject<{
|
|
467
|
-
at: z.ZodOptional<z.ZodString>;
|
|
468
|
-
delay: z.ZodOptional<z.ZodString>;
|
|
469
|
-
latest_start: z.ZodOptional<z.ZodString>;
|
|
470
|
-
workflow: z.ZodOptional<z.ZodString>;
|
|
471
|
-
runner: z.ZodOptional<z.ZodString>;
|
|
472
|
-
model: z.ZodOptional<z.ZodString>;
|
|
473
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
474
|
-
name: z.ZodString;
|
|
475
|
-
prompt: z.ZodString;
|
|
476
|
-
enable: z.ZodOptional<z.ZodBoolean>;
|
|
477
|
-
}, z.core.$strict>>;
|
|
478
|
-
type: 'object';
|
|
479
|
-
};
|
|
480
|
-
};
|
|
481
|
-
export declare const scheduledTasksToolDefinition: {
|
|
482
|
-
name: string;
|
|
483
|
-
description: string;
|
|
484
|
-
inputSchema: {
|
|
485
|
-
type: 'object';
|
|
486
|
-
properties: {
|
|
487
|
-
action: {
|
|
488
|
-
type: string;
|
|
489
|
-
enum: ("cancel" | "enable" | "list" | "pause" | "show" | "update")[];
|
|
490
|
-
description: string;
|
|
491
|
-
};
|
|
492
|
-
archived: {
|
|
493
|
-
description: string;
|
|
494
|
-
};
|
|
495
|
-
};
|
|
496
|
-
required: string[];
|
|
497
|
-
additionalProperties: boolean;
|
|
498
|
-
};
|
|
499
|
-
};
|
|
500
|
-
export declare const automationToolDefinition: {
|
|
501
|
-
name: string;
|
|
502
|
-
description: string;
|
|
503
|
-
inputSchema: {
|
|
504
|
-
type: 'object';
|
|
505
|
-
properties: {
|
|
506
|
-
action: {
|
|
507
|
-
type: string;
|
|
508
|
-
enum: ("create" | "enable" | "preview" | "show")[];
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
required: string[];
|
|
512
|
-
additionalProperties: boolean;
|
|
513
|
-
};
|
|
514
|
-
};
|
|
515
252
|
/** Tool definitions in registration order, evaluated only after boot seals. */
|
|
516
253
|
export declare function squawkToolDefinitions(env?: NodeJS.ProcessEnv): {
|
|
517
254
|
name: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { agentToolMetadata, enabledAgentTools } from './tool-registry.js';
|
|
2
|
-
import { automationToolRequestSchema } from '../contract/index.js';
|
|
3
2
|
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema } from '../contract/index.js';
|
|
4
3
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
5
|
-
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
6
|
-
import { scheduleTaskRequestSchema, scheduledTasksRequestSchema } from '../contract/index.js';
|
|
7
4
|
import { registeredWaitKinds } from '../workflows/run/wait-kind-registry.js';
|
|
8
5
|
import { z } from 'zod';
|
|
9
6
|
/**
|
|
@@ -67,61 +64,6 @@ export const doneToolDefinition = {
|
|
|
67
64
|
description: `Finish the task, or in a workflow step that is not the last, finish that step. Call it when the goal is fully achieved and verified and you have no question for the user; end your turn after it answers. Squawk closes the session at the end of this turn and cancels every open wait; after a step, Squawk starts the next step, and the answer names it. It refuses, naming what to do first, while owned workers are live or uncollected, a worker question is unanswered, your question to the user is still pending, or input for you is still to be delivered (input_pending, listed in owed). A result or message that arrives after it is accepted is delivered with a note, and the task still finishes when that turn ends; a new message from the user, a new request or instruction, a failed result, or a wait or question you register withdraws it, so call cezar_done again when the task is complete.`,
|
|
68
65
|
inputSchema: { ...z.toJSONSchema(squawkDoneRequestSchema, { io: 'input' }), type: 'object' },
|
|
69
66
|
};
|
|
70
|
-
export const previewToolDefinition = {
|
|
71
|
-
name: 'cezar_preview_serve',
|
|
72
|
-
description: `Register a web dev server of this task so the user can click through it in the cockpit's live preview. Always pin the port (\`vite --strictPort\`, \`next dev -p\`) so the server comes up on the port you register. Squawk starts the command itself when the user opens the preview; do not wait for the user. ` +
|
|
73
|
-
'To drive the browser the user sees, connect to `$CEZ_PREVIEW_CDP_URL` when it is set, e.g. `agent-browser --cdp "$CEZ_PREVIEW_CDP_URL" --pin-tab open http://localhost:5173`; the user watches your page live. `agent-browser record` needs ffmpeg on PATH.',
|
|
74
|
-
inputSchema: { ...z.toJSONSchema(previewServeRequestSchema, { io: 'input' }), type: 'object' },
|
|
75
|
-
};
|
|
76
|
-
export const previewStopToolDefinition = {
|
|
77
|
-
name: 'cezar_preview_stop',
|
|
78
|
-
description: `Stop a preview server Squawk started for your own task. Set restart to true to reuse the unchanged command the owner approved, including after a crash. Adopted servers cannot be stopped; changed registrations need the owner to press Run and open again.`,
|
|
79
|
-
inputSchema: { ...z.toJSONSchema(previewStopRequestSchema, { io: 'input' }), type: 'object' },
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* hearsay-tools/cezarion#1465: a one-time schedule starts later as an ordinary task, so the agent
|
|
83
|
-
* does not keep a session parked on timers for days. `cezar_scheduled_tasks` takes one action per
|
|
84
|
-
* call; its union is advertised as one flat object for the same reason as `cezar_wait`.
|
|
85
|
-
*/
|
|
86
|
-
export const scheduleTaskToolDefinition = {
|
|
87
|
-
name: 'cezar_schedule_task',
|
|
88
|
-
description: `Schedule a new task to start once, later, in this project: give a name, the full prompt the task starts from, and either \`at\` (a UTC time YYYY-MM-DDTHH:MMZ, like every time in Squawk tools) or \`delay\` (30m, 6h, 7d of elapsed time from now). For a relative time ("in 2 hours"), use \`delay\`. For a clock time that the user names, convert it from the user's time zone to UTC. \`latest_start\` (10m to 30d) bounds how late it may still start after Squawk was down; past it the schedule is marked missed. Pass enable: true only when the user's request asks for the work to run later; otherwise it is created paused for the user to enable. The new task does not see this conversation, so put every detail it needs in the prompt. The answer gives \`due_at\` in UTC. The cockpit shows the schedule in local time.`,
|
|
89
|
-
inputSchema: { ...z.toJSONSchema(scheduleTaskRequestSchema, { io: 'input' }), type: 'object' },
|
|
90
|
-
};
|
|
91
|
-
function flatScheduledTasksInputSchema() {
|
|
92
|
-
const properties = {};
|
|
93
|
-
for (const option of scheduledTasksRequestSchema.options)
|
|
94
|
-
Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
|
|
95
|
-
return {
|
|
96
|
-
type: 'object',
|
|
97
|
-
properties: {
|
|
98
|
-
...properties,
|
|
99
|
-
action: { type: 'string', enum: scheduledTasksRequestSchema.options.map(option => option.shape.action.value), description: '"list" lists the one-time schedules of this project; "show", "update", "pause", "enable" and "cancel" take the `id` a list or a create answered.' },
|
|
100
|
-
archived: { ...properties.archived, description: 'action "list": "include" adds the archived schedules, "only" lists just them.' },
|
|
101
|
-
},
|
|
102
|
-
required: ['action'],
|
|
103
|
-
additionalProperties: false,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
export const scheduledTasksToolDefinition = {
|
|
107
|
-
name: 'cezar_scheduled_tasks',
|
|
108
|
-
description: 'List, show, update, pause, enable or cancel the one-time scheduled tasks of this project, one action per call. Change only the schedules the user asked you to manage. "update" takes the same fields as cezar_schedule_task; a new `at` or `delay` must be in the future. "cancel" archives the schedule so it never starts; an archived schedule cannot change.',
|
|
109
|
-
inputSchema: flatScheduledTasksInputSchema(),
|
|
110
|
-
};
|
|
111
|
-
function flatAutomationInputSchema() {
|
|
112
|
-
const properties = {};
|
|
113
|
-
for (const option of automationToolRequestSchema.options)
|
|
114
|
-
Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
|
|
115
|
-
return { type: 'object', properties: {
|
|
116
|
-
...properties,
|
|
117
|
-
action: { type: 'string', enum: automationToolRequestSchema.options.map(option => option.shape.action.value) },
|
|
118
|
-
}, required: ['action'], additionalProperties: false };
|
|
119
|
-
}
|
|
120
|
-
export const automationToolDefinition = {
|
|
121
|
-
name: 'cezar_automation',
|
|
122
|
-
description: 'Create, show, preview or enable a repeating automation in this project. "create" takes definition: a GitHub poll (kind github, events, intervalSeconds, filters and task) or repeating schedule (kind schedule, schedule and task). Creation is always paused. The Automations system instructions give the absolute CLI command: run its schema subcommand on demand for definition fields, bounds and prompt placeholders before creating. "show", "preview" and "enable" take its id. "preview" checks a GitHub poll without launching tasks. "enable" requires explicit: true, only when the user explicitly asked to switch it on; a poll also needs a successful preview of its current definition in this session. Autonomy is not enable consent. Report the url and preview matches, or next_run_at for a schedule (UTC; convert to the user’s zone). On refusal stop and report the error; never substitute a cron job, GitHub Action or polling script. Use cezar_schedule_task and cezar_scheduled_tasks for one-time schedules. Leave task.archiveWhenDone and task.autoMergePr off unless the user asks for each completion action.',
|
|
123
|
-
inputSchema: flatAutomationInputSchema(),
|
|
124
|
-
};
|
|
125
67
|
/** Tool definitions in registration order, evaluated only after boot seals. */
|
|
126
68
|
export function squawkToolDefinitions(env = process.env) {
|
|
127
69
|
return enabledAgentTools(env).map(agentToolMetadata);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAA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23BAA23B;IACx4B,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE;CACtG,CAAC;AAEF,+EAA+E;AAC/E,MAAM,UAAU,qBAAqB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACxE,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { SquawkToolHandlers } from './controller.ts';
|
|
3
|
+
import type { SquawkTool } from './tools.ts';
|
|
4
|
+
/** The controller validates once with this schema before dispatching the typed callback. */
|
|
5
|
+
export declare function bind<S extends z.ZodType>(schema: S, handle: (handlers: SquawkToolHandlers, input: z.output<S>, signal: AbortSignal) => Promise<unknown>): {
|
|
6
|
+
schema: S;
|
|
7
|
+
handle: (handlers: SquawkToolHandlers, input: unknown, signal: AbortSignal) => Promise<unknown>;
|
|
8
|
+
};
|
|
9
|
+
export declare function metadata<S extends z.ZodType>(tool: SquawkTool, schema: S, format: (answer: z.output<S>) => import('./tool-registry.ts').AgentToolResult): {
|
|
10
|
+
name: string;
|
|
11
|
+
description: () => string;
|
|
12
|
+
inputSchema: () => {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
type: 'object';
|
|
15
|
+
properties?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
trigger: string;
|
|
18
|
+
label: string;
|
|
19
|
+
invoke: (input: unknown) => Promise<import("./tool-registry.ts").AgentToolResult>;
|
|
20
|
+
format: (answer: unknown) => import("./tool-registry.ts").AgentToolResult;
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The controller validates once with this schema before dispatching the typed callback. */
|
|
2
|
+
export function bind(schema, handle) {
|
|
3
|
+
return { schema, handle: (handlers, input, signal) => handle(handlers, input, signal) };
|
|
4
|
+
}
|
|
5
|
+
export function metadata(tool, schema, format) {
|
|
6
|
+
return { name: tool.definition.name, description: () => tool.definition.description, inputSchema: () => tool.definition.inputSchema, trigger: tool.trigger, label: tool.label, invoke: tool.invoke,
|
|
7
|
+
format: (answer) => format(schema.parse(answer)) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=tool-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definition.js","sourceRoot":"","sources":["../../src/ci-wait/tool-definition.ts"],"names":[],"mappings":"AAGA,4FAA4F;AAC5F,MAAM,UAAU,IAAI,CAAsB,MAAS,EAAE,MAAmG;IACtJ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,QAA4B,EAAE,KAAc,EAAE,MAAmB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAoB,EAAE,MAAM,CAAC,EAAE,CAAC;AACnJ,CAAC;AACD,MAAM,UAAU,QAAQ,CAAsB,IAAgB,EAAE,MAAS,EAAE,MAA6E;IACtJ,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;QAChM,MAAM,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -21,6 +21,8 @@ export interface AgentToolDefinition {
|
|
|
21
21
|
trigger: string;
|
|
22
22
|
label: string;
|
|
23
23
|
enabled?(env: NodeJS.ProcessEnv): boolean;
|
|
24
|
+
sessionHandlers?(runId: string, host: import('../workflows/run/squawk-tools.ts').ToolHost): Partial<SquawkToolHandlers>;
|
|
25
|
+
sessionEnv?(env: NodeJS.ProcessEnv): Record<string, string>;
|
|
24
26
|
envNames?(env: NodeJS.ProcessEnv): string[];
|
|
25
27
|
maxBodyBytes?: number;
|
|
26
28
|
timeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/ci-wait/tool-registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/ci-wait/tool-registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA6B1D,MAAM,QAAQ,GAAG,mBAAmB,CAA8B;IAChE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,6DAA6D;CAChI,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAyB,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACzG,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC;AACpD,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC5C,MAAM,UAAU,iBAAiB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACpE,OAAO,oBAAoB,EAAE,CAAC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