@hearsay-tools/squawk 0.18.0-pr4408.8606 → 0.18.0-pr4411.8616

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.
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
+ output: {
31
+ error: string;
32
+ code?: "invalid_input" | undefined;
33
+ };
34
+ outputFormat: "json";
35
+ status: 400;
36
+ input: {
37
+ query: {
38
+ offset?: string | undefined;
39
+ };
40
+ };
41
+ } | {
30
42
  output: {
31
43
  workers: {
32
44
  workerId: string;
@@ -79,18 +91,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
79
91
  offset?: string | undefined;
80
92
  };
81
93
  };
82
- } | {
83
- output: {
84
- error: string;
85
- code?: "invalid_input" | undefined;
86
- };
87
- outputFormat: "json";
88
- status: 400;
89
- input: {
90
- query: {
91
- offset?: string | undefined;
92
- };
93
- };
94
94
  };
95
95
  };
96
96
  } & {
@@ -677,6 +677,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
677
677
  } & {
678
678
  "/:workerId": {
679
679
  $get: {
680
+ output: {
681
+ error: string;
682
+ code?: "invalid_input" | undefined;
683
+ };
684
+ outputFormat: "json";
685
+ status: 400;
686
+ input: {
687
+ param: {
688
+ workerId: string;
689
+ };
690
+ };
691
+ } | {
680
692
  output: {
681
693
  workerId: string;
682
694
  settled: boolean;
@@ -801,7 +813,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
801
813
  workerId: string;
802
814
  };
803
815
  };
804
- } | {
816
+ };
817
+ };
818
+ } & {
819
+ "/:workerId/collect": {
820
+ $post: {
805
821
  output: {
806
822
  error: string;
807
823
  code?: "invalid_input" | undefined;
@@ -812,12 +828,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
812
828
  param: {
813
829
  workerId: string;
814
830
  };
831
+ } & {
832
+ json: Record<string, never>;
815
833
  };
816
- };
817
- };
818
- } & {
819
- "/:workerId/collect": {
820
- $post: {
834
+ } | {
821
835
  output: {
822
836
  workerId: string;
823
837
  parentRunId: string;
@@ -940,7 +954,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
940
954
  } & {
941
955
  json: Record<string, never>;
942
956
  };
943
- } | {
957
+ };
958
+ };
959
+ } & {
960
+ "/:workerId/steer": {
961
+ $post: {
944
962
  output: {
945
963
  error: string;
946
964
  code?: "invalid_input" | undefined;
@@ -952,13 +970,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
952
970
  workerId: string;
953
971
  };
954
972
  } & {
955
- json: Record<string, never>;
973
+ json: {
974
+ text: string;
975
+ };
956
976
  };
957
- };
958
- };
959
- } & {
960
- "/:workerId/steer": {
961
- $post: {
977
+ } | {
962
978
  output: {
963
979
  workerId: string;
964
980
  state: "delivered" | "queued";
@@ -974,7 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
974
990
  text: string;
975
991
  };
976
992
  };
977
- } | {
993
+ };
994
+ };
995
+ } & {
996
+ "/:workerId/stop": {
997
+ $post: {
978
998
  output: {
979
999
  error: string;
980
1000
  code?: "invalid_input" | undefined;
@@ -986,15 +1006,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
986
1006
  workerId: string;
987
1007
  };
988
1008
  } & {
989
- json: {
990
- text: string;
991
- };
1009
+ json: Record<string, never>;
992
1010
  };
993
- };
994
- };
995
- } & {
996
- "/:workerId/stop": {
997
- $post: {
1011
+ } | {
998
1012
  output: {
999
1013
  workerId: string;
1000
1014
  state: "stopping" | "terminated";
@@ -1008,7 +1022,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1008
1022
  } & {
1009
1023
  json: Record<string, never>;
1010
1024
  };
1011
- } | {
1025
+ };
1026
+ };
1027
+ } & {
1028
+ "/:workerId/destroy": {
1029
+ $post: {
1012
1030
  output: {
1013
1031
  error: string;
1014
1032
  code?: "invalid_input" | undefined;
@@ -1020,13 +1038,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1020
1038
  workerId: string;
1021
1039
  };
1022
1040
  } & {
1023
- json: Record<string, never>;
1041
+ json: {
1042
+ discardWork?: true | undefined;
1043
+ };
1024
1044
  };
1025
- };
1026
- };
1027
- } & {
1028
- "/:workerId/destroy": {
1029
- $post: {
1045
+ } | {
1030
1046
  output: {
1031
1047
  workerId: string;
1032
1048
  state: "complete" | "incomplete";
@@ -1055,22 +1071,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1055
1071
  discardWork?: true | undefined;
1056
1072
  };
1057
1073
  };
1058
- } | {
1059
- output: {
1060
- error: string;
1061
- code?: "invalid_input" | undefined;
1062
- };
1063
- outputFormat: "json";
1064
- status: 400;
1065
- input: {
1066
- param: {
1067
- workerId: string;
1068
- };
1069
- } & {
1070
- json: {
1071
- discardWork?: true | undefined;
1072
- };
1073
- };
1074
1074
  } | {
1075
1075
  output: {
1076
1076
  workerId: string;
@@ -1106,13 +1106,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1106
1106
  "/:workerId/diff": {
1107
1107
  $get: {
1108
1108
  output: {
1109
- workerId: string;
1110
- baselineSha: string;
1111
- diff: string;
1112
- truncated: boolean;
1109
+ error: string;
1110
+ code?: "invalid_input" | undefined;
1113
1111
  };
1114
1112
  outputFormat: "json";
1115
- status: 200;
1113
+ status: 400;
1116
1114
  input: {
1117
1115
  param: {
1118
1116
  workerId: string;
@@ -1120,11 +1118,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1120
1118
  };
1121
1119
  } | {
1122
1120
  output: {
1123
- error: string;
1124
- code?: "invalid_input" | undefined;
1121
+ workerId: string;
1122
+ baselineSha: string;
1123
+ diff: string;
1124
+ truncated: boolean;
1125
1125
  };
1126
1126
  outputFormat: "json";
1127
- status: 400;
1127
+ status: 200;
1128
1128
  input: {
1129
1129
  param: {
1130
1130
  workerId: string;
@@ -55,3 +55,11 @@ export declare function resolveReleaseTarget(bump: ReleaseBump, base: string, re
55
55
  }): ReleaseTarget | {
56
56
  error: string;
57
57
  };
58
+ /** Diagnostic printed when an OIDC `npm publish` fails without the version on the registry.
59
+ * npm swallows OIDC token-exchange failures at default log level and answers `E404`, including
60
+ * after a GitHub repository rename, so naming the expected Trusted Publisher settings saves
61
+ * operators from debugging a misleading 404. */
62
+ export declare function formatOidcPublishHint(packageName: string, version: string, context?: {
63
+ repository?: string | undefined;
64
+ workflowRef?: string | undefined;
65
+ }): string;
@@ -77,4 +77,16 @@ export function resolveReleaseTarget(bump, base, requested = {}) {
77
77
  return { error: `dist-tag "${distTag}" names another version line than ${version}.` };
78
78
  return { version, distTag, exactPins: candidate };
79
79
  }
80
+ /** Diagnostic printed when an OIDC `npm publish` fails without the version on the registry.
81
+ * npm swallows OIDC token-exchange failures at default log level and answers `E404`, including
82
+ * after a GitHub repository rename, so naming the expected Trusted Publisher settings saves
83
+ * operators from debugging a misleading 404. */
84
+ export function formatOidcPublishHint(packageName, version, context = {}) {
85
+ const repo = context.repository?.trim();
86
+ const workflowFile = /\/([^/@]+)@/.exec(context.workflowRef ?? '')?.[1] ?? 'release.yml';
87
+ const target = repo
88
+ ? `repository ${repo}, workflow ${workflowFile}, environment production`
89
+ : `workflow ${workflowFile}, environment production`;
90
+ return `release: OIDC publish of ${packageName}@${version} failed. If npm returned E404, check Settings -> Trusted Publisher on npmjs.com for ${packageName}: it must match ${target} (update it after a GitHub repository rename). See docs/publishing.md#one-time-admin-setup.`;
91
+ }
80
92
  //# sourceMappingURL=stable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stable.js","sourceRoot":"","sources":["../../src/release/stable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAA+C,MAAM,gBAAgB,CAAC;AAO/F,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE7F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