@hearsay-tools/squawk 0.18.0-dev.8054 → 0.18.0-dev.8057
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/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/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/routes.d.ts +79 -79
- 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/runs/run-archive.d.ts +72 -72
- package/dist/serve-command.d.ts +1 -1
- package/dist/serve-command.js +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +1323 -1323
- 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 +72 -72
- 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
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type AgentToolResult } from './tool-registry.ts';
|
|
2
2
|
import type { SquawkAskAnswer, SquawkWaitAnswer } from '../contract/index.js';
|
|
3
|
-
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition
|
|
4
|
-
export { previewToolEnabled, automationsToolEnabled } from './tool-env.ts';
|
|
3
|
+
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition } from './tool-catalog.ts';
|
|
5
4
|
export { squawkToolNames, squawkToolEnvNames } from './tool-names.ts';
|
|
6
|
-
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait
|
|
5
|
+
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait } from './client.ts';
|
|
7
6
|
/**
|
|
8
7
|
* The one list of Squawk tools (#781). The MCP adapter lists it, Pi's extension registers it, and
|
|
9
8
|
* every allow-list or admission site reads its names, so adding a tool is one edit here.
|
|
@@ -540,387 +539,9 @@ export declare function formatDoneTool(answer: Awaited<ReturnType<typeof callSqu
|
|
|
540
539
|
})[] | undefined;
|
|
541
540
|
};
|
|
542
541
|
};
|
|
543
|
-
/** JSON first, then the hint as a plain sentence: the shape every Squawk tool answers in. */
|
|
544
|
-
export declare function invokePreviewTool(input: unknown): Promise<{
|
|
545
|
-
content: {
|
|
546
|
-
type: 'text';
|
|
547
|
-
text: string;
|
|
548
|
-
}[];
|
|
549
|
-
isError: boolean;
|
|
550
|
-
details: {
|
|
551
|
-
ok: boolean;
|
|
552
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
553
|
-
message: string;
|
|
554
|
-
hint: string;
|
|
555
|
-
};
|
|
556
|
-
}>;
|
|
557
|
-
export declare function formatPreviewTool(result: Awaited<ReturnType<typeof callPreviewServe>>): {
|
|
558
|
-
content: {
|
|
559
|
-
type: 'text';
|
|
560
|
-
text: string;
|
|
561
|
-
}[];
|
|
562
|
-
isError: boolean;
|
|
563
|
-
details: {
|
|
564
|
-
ok: boolean;
|
|
565
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
566
|
-
message: string;
|
|
567
|
-
hint: string;
|
|
568
|
-
};
|
|
569
|
-
};
|
|
570
|
-
export declare function invokePreviewStopTool(input: unknown): Promise<{
|
|
571
|
-
content: {
|
|
572
|
-
type: 'text';
|
|
573
|
-
text: string;
|
|
574
|
-
}[];
|
|
575
|
-
isError: boolean;
|
|
576
|
-
details: {
|
|
577
|
-
ok: boolean;
|
|
578
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
579
|
-
message: string;
|
|
580
|
-
hint: string;
|
|
581
|
-
};
|
|
582
|
-
}>;
|
|
583
|
-
export declare function formatPreviewStopTool(result: Awaited<ReturnType<typeof callPreviewStop>>): {
|
|
584
|
-
content: {
|
|
585
|
-
type: 'text';
|
|
586
|
-
text: string;
|
|
587
|
-
}[];
|
|
588
|
-
isError: boolean;
|
|
589
|
-
details: {
|
|
590
|
-
ok: boolean;
|
|
591
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
592
|
-
message: string;
|
|
593
|
-
hint: string;
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
export declare const PREVIEW_STOP_TOOL: SquawkTool;
|
|
597
|
-
export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
598
|
-
content: {
|
|
599
|
-
type: 'text';
|
|
600
|
-
text: string;
|
|
601
|
-
}[];
|
|
602
|
-
isError: boolean;
|
|
603
|
-
details: {
|
|
604
|
-
ok: false;
|
|
605
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
606
|
-
message: string;
|
|
607
|
-
} | {
|
|
608
|
-
ok: true;
|
|
609
|
-
task: {
|
|
610
|
-
id: string;
|
|
611
|
-
name: string;
|
|
612
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
613
|
-
due_at: string;
|
|
614
|
-
latest_start_minutes?: number | undefined;
|
|
615
|
-
run_id?: string | undefined;
|
|
616
|
-
url?: string | undefined;
|
|
617
|
-
};
|
|
618
|
-
note: string;
|
|
619
|
-
};
|
|
620
|
-
}>;
|
|
621
|
-
export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof callScheduleTask>>): {
|
|
622
|
-
content: {
|
|
623
|
-
type: 'text';
|
|
624
|
-
text: string;
|
|
625
|
-
}[];
|
|
626
|
-
isError: boolean;
|
|
627
|
-
details: {
|
|
628
|
-
ok: false;
|
|
629
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
630
|
-
message: string;
|
|
631
|
-
} | {
|
|
632
|
-
ok: true;
|
|
633
|
-
task: {
|
|
634
|
-
id: string;
|
|
635
|
-
name: string;
|
|
636
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
637
|
-
due_at: string;
|
|
638
|
-
latest_start_minutes?: number | undefined;
|
|
639
|
-
run_id?: string | undefined;
|
|
640
|
-
url?: string | undefined;
|
|
641
|
-
};
|
|
642
|
-
note: string;
|
|
643
|
-
};
|
|
644
|
-
};
|
|
645
|
-
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
646
|
-
content: {
|
|
647
|
-
type: 'text';
|
|
648
|
-
text: string;
|
|
649
|
-
}[];
|
|
650
|
-
isError: boolean;
|
|
651
|
-
details: {
|
|
652
|
-
ok: false;
|
|
653
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
654
|
-
message: string;
|
|
655
|
-
} | {
|
|
656
|
-
ok: true;
|
|
657
|
-
tasks: {
|
|
658
|
-
id: string;
|
|
659
|
-
name: string;
|
|
660
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
661
|
-
due_at: string;
|
|
662
|
-
latest_start_minutes?: number | undefined;
|
|
663
|
-
run_id?: string | undefined;
|
|
664
|
-
url?: string | undefined;
|
|
665
|
-
}[];
|
|
666
|
-
} | {
|
|
667
|
-
ok: true;
|
|
668
|
-
task: {
|
|
669
|
-
id: string;
|
|
670
|
-
name: string;
|
|
671
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
672
|
-
due_at: string;
|
|
673
|
-
latest_start_minutes?: number | undefined;
|
|
674
|
-
run_id?: string | undefined;
|
|
675
|
-
url?: string | undefined;
|
|
676
|
-
};
|
|
677
|
-
};
|
|
678
|
-
}>;
|
|
679
|
-
export declare function formatScheduledTasksTool(answer: Awaited<ReturnType<typeof callScheduledTasks>>): {
|
|
680
|
-
content: {
|
|
681
|
-
type: 'text';
|
|
682
|
-
text: string;
|
|
683
|
-
}[];
|
|
684
|
-
isError: boolean;
|
|
685
|
-
details: {
|
|
686
|
-
ok: false;
|
|
687
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
688
|
-
message: string;
|
|
689
|
-
} | {
|
|
690
|
-
ok: true;
|
|
691
|
-
tasks: {
|
|
692
|
-
id: string;
|
|
693
|
-
name: string;
|
|
694
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
695
|
-
due_at: string;
|
|
696
|
-
latest_start_minutes?: number | undefined;
|
|
697
|
-
run_id?: string | undefined;
|
|
698
|
-
url?: string | undefined;
|
|
699
|
-
}[];
|
|
700
|
-
} | {
|
|
701
|
-
ok: true;
|
|
702
|
-
task: {
|
|
703
|
-
id: string;
|
|
704
|
-
name: string;
|
|
705
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
706
|
-
due_at: string;
|
|
707
|
-
latest_start_minutes?: number | undefined;
|
|
708
|
-
run_id?: string | undefined;
|
|
709
|
-
url?: string | undefined;
|
|
710
|
-
};
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
export declare function invokeAutomationTool(input: unknown): Promise<{
|
|
714
|
-
content: {
|
|
715
|
-
type: 'text';
|
|
716
|
-
text: string;
|
|
717
|
-
}[];
|
|
718
|
-
isError: boolean;
|
|
719
|
-
details: {
|
|
720
|
-
ok: true;
|
|
721
|
-
automation: {
|
|
722
|
-
[x: string]: unknown;
|
|
723
|
-
id: string;
|
|
724
|
-
revision: number;
|
|
725
|
-
name: string;
|
|
726
|
-
description?: string | undefined;
|
|
727
|
-
enabled: boolean;
|
|
728
|
-
kind: "github" | "schedule";
|
|
729
|
-
events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
|
|
730
|
-
intervalSeconds?: number | undefined;
|
|
731
|
-
filters?: {
|
|
732
|
-
[x: string]: unknown;
|
|
733
|
-
includeExisting?: boolean | undefined;
|
|
734
|
-
requireCurrentLabels?: boolean | undefined;
|
|
735
|
-
authors?: string[] | undefined;
|
|
736
|
-
assignees?: string[] | undefined;
|
|
737
|
-
allLabels?: string[] | undefined;
|
|
738
|
-
anyLabels?: string[] | undefined;
|
|
739
|
-
excludeLabels?: string[] | undefined;
|
|
740
|
-
changedLabels?: string[] | undefined;
|
|
741
|
-
lookbackDays: number;
|
|
742
|
-
maxRecords: number;
|
|
743
|
-
} | undefined;
|
|
744
|
-
schedule?: {
|
|
745
|
-
[x: string]: unknown;
|
|
746
|
-
type: "daily" | "hours" | "once" | "weekdays" | "weekly";
|
|
747
|
-
hour?: number | undefined;
|
|
748
|
-
minute?: number | undefined;
|
|
749
|
-
day?: number | undefined;
|
|
750
|
-
every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
|
|
751
|
-
at?: string | undefined;
|
|
752
|
-
timeZone?: string | undefined;
|
|
753
|
-
latestStartMinutes?: number | undefined;
|
|
754
|
-
} | undefined;
|
|
755
|
-
task: {
|
|
756
|
-
[x: string]: unknown;
|
|
757
|
-
archiveWhenDone?: boolean | undefined;
|
|
758
|
-
autoMergePr?: boolean | undefined;
|
|
759
|
-
allowWorkers?: boolean | undefined;
|
|
760
|
-
allowMessaging?: boolean | undefined;
|
|
761
|
-
prompt: string;
|
|
762
|
-
workflow?: string | undefined;
|
|
763
|
-
steps?: {
|
|
764
|
-
id: string;
|
|
765
|
-
name?: string | undefined;
|
|
766
|
-
prompt?: string | undefined;
|
|
767
|
-
skill?: string | undefined;
|
|
768
|
-
model?: string | undefined;
|
|
769
|
-
effort?: string | undefined;
|
|
770
|
-
timeoutMs?: number | undefined;
|
|
771
|
-
runner?: string | undefined;
|
|
772
|
-
agentProfile?: string | undefined;
|
|
773
|
-
allowedTools?: string[] | undefined;
|
|
774
|
-
bashAllowlist?: string[] | undefined;
|
|
775
|
-
kind?: "plugin" | undefined;
|
|
776
|
-
pluginKind?: string | undefined;
|
|
777
|
-
config?: Record<string, unknown> | undefined;
|
|
778
|
-
command?: string | undefined;
|
|
779
|
-
onFail?: {
|
|
780
|
-
retry: string;
|
|
781
|
-
max: number;
|
|
782
|
-
} | undefined;
|
|
783
|
-
}[] | undefined;
|
|
784
|
-
runner?: string | undefined;
|
|
785
|
-
model?: string | undefined;
|
|
786
|
-
effort?: string | undefined;
|
|
787
|
-
variants?: 1 | 2 | 3 | undefined;
|
|
788
|
-
worktree?: boolean | undefined;
|
|
789
|
-
autonomous?: boolean | undefined;
|
|
790
|
-
systemPrompt?: string | undefined;
|
|
791
|
-
};
|
|
792
|
-
archived?: {
|
|
793
|
-
[x: string]: unknown;
|
|
794
|
-
at: string;
|
|
795
|
-
outcome: "cancelled" | "launched";
|
|
796
|
-
runId?: string | undefined;
|
|
797
|
-
receiptId?: string | undefined;
|
|
798
|
-
trigger?: "late" | "manual" | "retry" | "schedule" | undefined;
|
|
799
|
-
} | undefined;
|
|
800
|
-
createdAt: string;
|
|
801
|
-
updatedAt: string;
|
|
802
|
-
};
|
|
803
|
-
url?: string | undefined;
|
|
804
|
-
next_run_at?: string | undefined;
|
|
805
|
-
preview?: {
|
|
806
|
-
matches: number;
|
|
807
|
-
truncated: boolean;
|
|
808
|
-
} | undefined;
|
|
809
|
-
} | {
|
|
810
|
-
ok: false;
|
|
811
|
-
code: "automations_off" | "conflict" | "explicit_required" | "invalid_request" | "not_found" | "preview_required" | "unavailable";
|
|
812
|
-
message: string;
|
|
813
|
-
};
|
|
814
|
-
}>;
|
|
815
|
-
export declare function formatAutomationTool(answer: Awaited<ReturnType<typeof callAutomation>>): {
|
|
816
|
-
content: {
|
|
817
|
-
type: 'text';
|
|
818
|
-
text: string;
|
|
819
|
-
}[];
|
|
820
|
-
isError: boolean;
|
|
821
|
-
details: {
|
|
822
|
-
ok: true;
|
|
823
|
-
automation: {
|
|
824
|
-
[x: string]: unknown;
|
|
825
|
-
id: string;
|
|
826
|
-
revision: number;
|
|
827
|
-
name: string;
|
|
828
|
-
description?: string | undefined;
|
|
829
|
-
enabled: boolean;
|
|
830
|
-
kind: "github" | "schedule";
|
|
831
|
-
events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
|
|
832
|
-
intervalSeconds?: number | undefined;
|
|
833
|
-
filters?: {
|
|
834
|
-
[x: string]: unknown;
|
|
835
|
-
includeExisting?: boolean | undefined;
|
|
836
|
-
requireCurrentLabels?: boolean | undefined;
|
|
837
|
-
authors?: string[] | undefined;
|
|
838
|
-
assignees?: string[] | undefined;
|
|
839
|
-
allLabels?: string[] | undefined;
|
|
840
|
-
anyLabels?: string[] | undefined;
|
|
841
|
-
excludeLabels?: string[] | undefined;
|
|
842
|
-
changedLabels?: string[] | undefined;
|
|
843
|
-
lookbackDays: number;
|
|
844
|
-
maxRecords: number;
|
|
845
|
-
} | undefined;
|
|
846
|
-
schedule?: {
|
|
847
|
-
[x: string]: unknown;
|
|
848
|
-
type: "daily" | "hours" | "once" | "weekdays" | "weekly";
|
|
849
|
-
hour?: number | undefined;
|
|
850
|
-
minute?: number | undefined;
|
|
851
|
-
day?: number | undefined;
|
|
852
|
-
every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
|
|
853
|
-
at?: string | undefined;
|
|
854
|
-
timeZone?: string | undefined;
|
|
855
|
-
latestStartMinutes?: number | undefined;
|
|
856
|
-
} | undefined;
|
|
857
|
-
task: {
|
|
858
|
-
[x: string]: unknown;
|
|
859
|
-
archiveWhenDone?: boolean | undefined;
|
|
860
|
-
autoMergePr?: boolean | undefined;
|
|
861
|
-
allowWorkers?: boolean | undefined;
|
|
862
|
-
allowMessaging?: boolean | undefined;
|
|
863
|
-
prompt: string;
|
|
864
|
-
workflow?: string | undefined;
|
|
865
|
-
steps?: {
|
|
866
|
-
id: string;
|
|
867
|
-
name?: string | undefined;
|
|
868
|
-
prompt?: string | undefined;
|
|
869
|
-
skill?: string | undefined;
|
|
870
|
-
model?: string | undefined;
|
|
871
|
-
effort?: string | undefined;
|
|
872
|
-
timeoutMs?: number | undefined;
|
|
873
|
-
runner?: string | undefined;
|
|
874
|
-
agentProfile?: string | undefined;
|
|
875
|
-
allowedTools?: string[] | undefined;
|
|
876
|
-
bashAllowlist?: string[] | undefined;
|
|
877
|
-
kind?: "plugin" | undefined;
|
|
878
|
-
pluginKind?: string | undefined;
|
|
879
|
-
config?: Record<string, unknown> | undefined;
|
|
880
|
-
command?: string | undefined;
|
|
881
|
-
onFail?: {
|
|
882
|
-
retry: string;
|
|
883
|
-
max: number;
|
|
884
|
-
} | undefined;
|
|
885
|
-
}[] | undefined;
|
|
886
|
-
runner?: string | undefined;
|
|
887
|
-
model?: string | undefined;
|
|
888
|
-
effort?: string | undefined;
|
|
889
|
-
variants?: 1 | 2 | 3 | undefined;
|
|
890
|
-
worktree?: boolean | undefined;
|
|
891
|
-
autonomous?: boolean | undefined;
|
|
892
|
-
systemPrompt?: string | undefined;
|
|
893
|
-
};
|
|
894
|
-
archived?: {
|
|
895
|
-
[x: string]: unknown;
|
|
896
|
-
at: string;
|
|
897
|
-
outcome: "cancelled" | "launched";
|
|
898
|
-
runId?: string | undefined;
|
|
899
|
-
receiptId?: string | undefined;
|
|
900
|
-
trigger?: "late" | "manual" | "retry" | "schedule" | undefined;
|
|
901
|
-
} | undefined;
|
|
902
|
-
createdAt: string;
|
|
903
|
-
updatedAt: string;
|
|
904
|
-
};
|
|
905
|
-
url?: string | undefined;
|
|
906
|
-
next_run_at?: string | undefined;
|
|
907
|
-
preview?: {
|
|
908
|
-
matches: number;
|
|
909
|
-
truncated: boolean;
|
|
910
|
-
} | undefined;
|
|
911
|
-
} | {
|
|
912
|
-
ok: false;
|
|
913
|
-
code: "automations_off" | "conflict" | "explicit_required" | "invalid_request" | "not_found" | "preview_required" | "unavailable";
|
|
914
|
-
message: string;
|
|
915
|
-
};
|
|
916
|
-
};
|
|
917
|
-
export declare const AUTOMATION_TOOL: SquawkTool;
|
|
918
|
-
export declare const SCHEDULE_TASK_TOOL: SquawkTool;
|
|
919
|
-
export declare const SCHEDULED_TASKS_TOOL: SquawkTool;
|
|
920
542
|
export declare const WAIT_TOOL: SquawkTool;
|
|
921
543
|
export declare const ASK_TOOL: SquawkTool;
|
|
922
544
|
export declare const CANCEL_WAIT_TOOL: SquawkTool;
|
|
923
545
|
export declare const DONE_TOOL: SquawkTool;
|
|
924
|
-
export declare const PREVIEW_TOOL: SquawkTool;
|
|
925
546
|
export declare function squawkTools(env?: NodeJS.ProcessEnv): SquawkTool[];
|
|
926
547
|
export declare function squawkServerInstructions(env?: NodeJS.ProcessEnv): string;
|
package/dist/ci-wait/tools.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { agentToolInstructions, agentToolMetadata, enabledAgentTools } from './tool-registry.js';
|
|
2
|
-
import { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition
|
|
3
|
-
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition
|
|
4
|
-
export { previewToolEnabled, automationsToolEnabled } from './tool-env.js';
|
|
2
|
+
import { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition } from './tool-catalog.js';
|
|
3
|
+
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition } from './tool-catalog.js';
|
|
5
4
|
export { squawkToolNames, squawkToolEnvNames } from './tool-names.js';
|
|
6
|
-
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait
|
|
5
|
+
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait } from './client.js';
|
|
7
6
|
/**
|
|
8
7
|
* hearsay-tools/cezarion#1428: agents asked about drafts they never sent, and treated the context
|
|
9
8
|
* they cut from a rejected card as sent. Both hints say where that context belongs: `context`.
|
|
@@ -57,52 +56,10 @@ export function formatDoneTool(answer) {
|
|
|
57
56
|
: `Accepted. End your turn; Squawk finishes the task at its end.`;
|
|
58
57
|
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.ok, details: answer };
|
|
59
58
|
}
|
|
60
|
-
/** JSON first, then the hint as a plain sentence: the shape every Squawk tool answers in. */
|
|
61
|
-
export async function invokePreviewTool(input) {
|
|
62
|
-
return formatPreviewTool(await callPreviewServe(input));
|
|
63
|
-
}
|
|
64
|
-
export function formatPreviewTool(result) {
|
|
65
|
-
return { content: [{ type: 'text', text: `${JSON.stringify(result)}\n${result.hint}` }], isError: !result.ok, details: result };
|
|
66
|
-
}
|
|
67
|
-
export async function invokePreviewStopTool(input) {
|
|
68
|
-
return formatPreviewStopTool(await callPreviewStop(input));
|
|
69
|
-
}
|
|
70
|
-
export function formatPreviewStopTool(result) {
|
|
71
|
-
return { content: [{ type: 'text', text: `${JSON.stringify(result)}\n${result.hint}` }], isError: !result.ok, details: result };
|
|
72
|
-
}
|
|
73
|
-
export const PREVIEW_STOP_TOOL = { definition: previewStopToolDefinition, trigger: `load when your Squawk-started preview server needs stopping or restarting.`, label: 'Stop live preview', invoke: invokePreviewStopTool };
|
|
74
|
-
function scheduleHint(answer) {
|
|
75
|
-
if (answer.ok)
|
|
76
|
-
return 'Done. due_at is UTC: tell the user that time in their time zone, and name the zone.';
|
|
77
|
-
return answer.code === 'automations_off' || answer.code === 'unavailable' ? 'Not scheduled. Tell the user, and do not retry.' : 'Not changed. Fix the call from the message, or continue without it.';
|
|
78
|
-
}
|
|
79
|
-
export async function invokeScheduleTaskTool(input) {
|
|
80
|
-
return formatScheduleTaskTool(await callScheduleTask(input));
|
|
81
|
-
}
|
|
82
|
-
export function formatScheduleTaskTool(answer) {
|
|
83
|
-
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${scheduleHint(answer)}` }], isError: !answer.ok, details: answer };
|
|
84
|
-
}
|
|
85
|
-
export async function invokeScheduledTasksTool(input) {
|
|
86
|
-
return formatScheduledTasksTool(await callScheduledTasks(input));
|
|
87
|
-
}
|
|
88
|
-
export function formatScheduledTasksTool(answer) {
|
|
89
|
-
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${scheduleHint(answer)}` }], isError: !answer.ok, details: answer };
|
|
90
|
-
}
|
|
91
|
-
export async function invokeAutomationTool(input) {
|
|
92
|
-
return formatAutomationTool(await callAutomation(input));
|
|
93
|
-
}
|
|
94
|
-
export function formatAutomationTool(answer) {
|
|
95
|
-
const hint = answer.ok ? 'Report the url and preview matches, or the next occurrence in the user’s time zone.' : 'Stop and report the error. Do not substitute another automation mechanism.';
|
|
96
|
-
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.ok, details: answer };
|
|
97
|
-
}
|
|
98
|
-
export const AUTOMATION_TOOL = { definition: automationToolDefinition, trigger: 'load when the user asks for recurring work, or wants to inspect or activate an automation.', label: 'Automations', invoke: invokeAutomationTool };
|
|
99
|
-
export const SCHEDULE_TASK_TOOL = { definition: scheduleTaskToolDefinition, trigger: 'load when work should start later as a new task (in an hour, tomorrow, next week) instead of keeping this session waiting.', label: 'Schedule a task', invoke: invokeScheduleTaskTool };
|
|
100
|
-
export const SCHEDULED_TASKS_TOOL = { definition: scheduledTasksToolDefinition, trigger: 'load when you need to list, change, pause, resume or cancel a one-time scheduled task.', label: 'Scheduled tasks', invoke: invokeScheduledTasksTool };
|
|
101
59
|
export const WAIT_TOOL = { definition: waitToolDefinition, trigger: 'load when you are waiting on CI for a PR or on a background job you started, or want to re-check something later; end your turn after it answers.', label: 'Wait', invoke: invokeWaitTool };
|
|
102
60
|
export const ASK_TOOL = { definition: askToolDefinition, trigger: 'load for a user decision or missing input; provide the full draft or findings in its rendered context field.', label: 'Ask the user', invoke: invokeAskTool };
|
|
103
61
|
export const CANCEL_WAIT_TOOL = { definition: cancelWaitToolDefinition, trigger: 'load when a wait you registered is no longer needed.', label: 'Cancel wait', invoke: invokeCancelWaitTool };
|
|
104
62
|
export const DONE_TOOL = { definition: doneToolDefinition, trigger: 'load when the task is complete and verified.', label: 'Done', invoke: invokeDoneTool };
|
|
105
|
-
export const PREVIEW_TOOL = { definition: previewToolDefinition, trigger: 'load when you have started, or are about to start, a web server the user should click through.', label: 'Live preview', invoke: invokePreviewTool };
|
|
106
63
|
export function squawkTools(env = process.env) {
|
|
107
64
|
return enabledAgentTools(env).map(tool => ({ definition: agentToolMetadata(tool), trigger: tool.trigger, label: tool.label, invoke: tool.invoke }));
|
|
108
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/ci-wait/tools.ts"],"names":[],"m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