@bridge4dev/runner 0.61.0 → 0.63.0
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/README.md +12 -6
- package/dist/adapters/claude.js +11 -6
- package/dist/adapters/codex.js +80 -15
- package/dist/adapters/types.d.ts +50 -0
- package/dist/adapters/types.js +59 -0
- package/dist/checkpoints.d.ts +11 -0
- package/dist/checkpoints.js +64 -5
- package/dist/git.d.ts +56 -0
- package/dist/git.js +78 -7
- package/dist/gitops.d.ts +29 -0
- package/dist/gitops.js +74 -19
- package/dist/index.js +25 -0
- package/dist/policy.d.ts +27 -0
- package/dist/policy.js +38 -5
- package/dist/protocol.d.ts +57 -2
- package/dist/protocol.js +15 -0
- package/dist/supervisor.js +14 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/protocol.d.ts
CHANGED
|
@@ -113,6 +113,18 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
113
113
|
agentProtectedBranches: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
114
114
|
agentAllowForcePush: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
115
115
|
agentAllowDestructiveGit: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
116
|
+
/**
|
|
117
|
+
* #418: may the agent read and write OUTSIDE the project folder?
|
|
118
|
+
*
|
|
119
|
+
* `.optional().catch(undefined)` for the QA-100 MAJOR-1 reason above, and
|
|
120
|
+
* safe here for the same reason as `agentPushBan` — though the polarity
|
|
121
|
+
* runs the other way. `policy.ts` resolves this one with `=== true`, so a
|
|
122
|
+
* value this schema throws away leaves the session confined to its folder:
|
|
123
|
+
* strictly more restricted, never less. Rubbish in this field therefore
|
|
124
|
+
* costs a project its permission, which is the direction a dropped value is
|
|
125
|
+
* allowed to fail in.
|
|
126
|
+
*/
|
|
127
|
+
agentAllowOutsideFolder: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
116
128
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
117
129
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
118
130
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -128,6 +140,7 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
128
140
|
agentProtectedBranches?: string[] | undefined;
|
|
129
141
|
agentAllowForcePush?: boolean | undefined;
|
|
130
142
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
143
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
131
144
|
}, {
|
|
132
145
|
path: string;
|
|
133
146
|
id: string;
|
|
@@ -141,6 +154,7 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
141
154
|
agentProtectedBranches?: unknown;
|
|
142
155
|
agentAllowForcePush?: unknown;
|
|
143
156
|
agentAllowDestructiveGit?: unknown;
|
|
157
|
+
agentAllowOutsideFolder?: unknown;
|
|
144
158
|
}>;
|
|
145
159
|
/**
|
|
146
160
|
* «Run this one without the project's agent prompt.» Absent means no — both
|
|
@@ -248,6 +262,7 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
248
262
|
agentProtectedBranches?: string[] | undefined;
|
|
249
263
|
agentAllowForcePush?: boolean | undefined;
|
|
250
264
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
265
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
251
266
|
};
|
|
252
267
|
tickets: {
|
|
253
268
|
number: number;
|
|
@@ -290,6 +305,7 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
290
305
|
agentProtectedBranches?: unknown;
|
|
291
306
|
agentAllowForcePush?: unknown;
|
|
292
307
|
agentAllowDestructiveGit?: unknown;
|
|
308
|
+
agentAllowOutsideFolder?: unknown;
|
|
293
309
|
};
|
|
294
310
|
tickets: {
|
|
295
311
|
number: number;
|
|
@@ -547,6 +563,18 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
547
563
|
agentProtectedBranches: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
548
564
|
agentAllowForcePush: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
549
565
|
agentAllowDestructiveGit: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
566
|
+
/**
|
|
567
|
+
* #418: may the agent read and write OUTSIDE the project folder?
|
|
568
|
+
*
|
|
569
|
+
* `.optional().catch(undefined)` for the QA-100 MAJOR-1 reason above, and
|
|
570
|
+
* safe here for the same reason as `agentPushBan` — though the polarity
|
|
571
|
+
* runs the other way. `policy.ts` resolves this one with `=== true`, so a
|
|
572
|
+
* value this schema throws away leaves the session confined to its folder:
|
|
573
|
+
* strictly more restricted, never less. Rubbish in this field therefore
|
|
574
|
+
* costs a project its permission, which is the direction a dropped value is
|
|
575
|
+
* allowed to fail in.
|
|
576
|
+
*/
|
|
577
|
+
agentAllowOutsideFolder: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
550
578
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
551
579
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
552
580
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -562,6 +590,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
562
590
|
agentProtectedBranches?: string[] | undefined;
|
|
563
591
|
agentAllowForcePush?: boolean | undefined;
|
|
564
592
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
593
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
565
594
|
}, {
|
|
566
595
|
path: string;
|
|
567
596
|
id: string;
|
|
@@ -575,6 +604,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
575
604
|
agentProtectedBranches?: unknown;
|
|
576
605
|
agentAllowForcePush?: unknown;
|
|
577
606
|
agentAllowDestructiveGit?: unknown;
|
|
607
|
+
agentAllowOutsideFolder?: unknown;
|
|
578
608
|
}>;
|
|
579
609
|
/**
|
|
580
610
|
* «Run this one without the project's agent prompt.» Absent means no — both
|
|
@@ -682,6 +712,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
682
712
|
agentProtectedBranches?: string[] | undefined;
|
|
683
713
|
agentAllowForcePush?: boolean | undefined;
|
|
684
714
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
715
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
685
716
|
};
|
|
686
717
|
tickets: {
|
|
687
718
|
number: number;
|
|
@@ -724,6 +755,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
724
755
|
agentProtectedBranches?: unknown;
|
|
725
756
|
agentAllowForcePush?: unknown;
|
|
726
757
|
agentAllowDestructiveGit?: unknown;
|
|
758
|
+
agentAllowOutsideFolder?: unknown;
|
|
727
759
|
};
|
|
728
760
|
tickets: {
|
|
729
761
|
number: number;
|
|
@@ -751,6 +783,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
751
783
|
branchPlan?: unknown;
|
|
752
784
|
}>, "many">;
|
|
753
785
|
}, "strip", z.ZodTypeAny, {
|
|
786
|
+
type: "hello_ack";
|
|
754
787
|
sessions: {
|
|
755
788
|
mode: "ask" | "plan" | "auto" | "full";
|
|
756
789
|
agent: "CLAUDE" | "CODEX";
|
|
@@ -779,6 +812,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
779
812
|
agentProtectedBranches?: string[] | undefined;
|
|
780
813
|
agentAllowForcePush?: boolean | undefined;
|
|
781
814
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
815
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
782
816
|
};
|
|
783
817
|
tickets: {
|
|
784
818
|
number: number;
|
|
@@ -802,11 +836,11 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
802
836
|
baseSha?: string | undefined;
|
|
803
837
|
} | undefined;
|
|
804
838
|
}[];
|
|
805
|
-
type: "hello_ack";
|
|
806
839
|
serverName: string;
|
|
807
840
|
serverId: string;
|
|
808
841
|
maxSessions?: number | undefined;
|
|
809
842
|
}, {
|
|
843
|
+
type: "hello_ack";
|
|
810
844
|
sessions: {
|
|
811
845
|
agent: "CLAUDE" | "CODEX";
|
|
812
846
|
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
@@ -827,6 +861,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
827
861
|
agentProtectedBranches?: unknown;
|
|
828
862
|
agentAllowForcePush?: unknown;
|
|
829
863
|
agentAllowDestructiveGit?: unknown;
|
|
864
|
+
agentAllowOutsideFolder?: unknown;
|
|
830
865
|
};
|
|
831
866
|
tickets: {
|
|
832
867
|
number: number;
|
|
@@ -853,7 +888,6 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
853
888
|
branchHint?: unknown;
|
|
854
889
|
branchPlan?: unknown;
|
|
855
890
|
}[];
|
|
856
|
-
type: "hello_ack";
|
|
857
891
|
serverName: string;
|
|
858
892
|
serverId: string;
|
|
859
893
|
maxSessions?: unknown;
|
|
@@ -998,6 +1032,18 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
998
1032
|
agentProtectedBranches: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
999
1033
|
agentAllowForcePush: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1000
1034
|
agentAllowDestructiveGit: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1035
|
+
/**
|
|
1036
|
+
* #418: may the agent read and write OUTSIDE the project folder?
|
|
1037
|
+
*
|
|
1038
|
+
* `.optional().catch(undefined)` for the QA-100 MAJOR-1 reason above, and
|
|
1039
|
+
* safe here for the same reason as `agentPushBan` — though the polarity
|
|
1040
|
+
* runs the other way. `policy.ts` resolves this one with `=== true`, so a
|
|
1041
|
+
* value this schema throws away leaves the session confined to its folder:
|
|
1042
|
+
* strictly more restricted, never less. Rubbish in this field therefore
|
|
1043
|
+
* costs a project its permission, which is the direction a dropped value is
|
|
1044
|
+
* allowed to fail in.
|
|
1045
|
+
*/
|
|
1046
|
+
agentAllowOutsideFolder: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1001
1047
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
1002
1048
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1003
1049
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1013,6 +1059,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1013
1059
|
agentProtectedBranches?: string[] | undefined;
|
|
1014
1060
|
agentAllowForcePush?: boolean | undefined;
|
|
1015
1061
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
1062
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
1016
1063
|
}, {
|
|
1017
1064
|
path: string;
|
|
1018
1065
|
id: string;
|
|
@@ -1026,6 +1073,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1026
1073
|
agentProtectedBranches?: unknown;
|
|
1027
1074
|
agentAllowForcePush?: unknown;
|
|
1028
1075
|
agentAllowDestructiveGit?: unknown;
|
|
1076
|
+
agentAllowOutsideFolder?: unknown;
|
|
1029
1077
|
}>;
|
|
1030
1078
|
/**
|
|
1031
1079
|
* «Run this one without the project's agent prompt.» Absent means no — both
|
|
@@ -1133,6 +1181,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1133
1181
|
agentProtectedBranches?: string[] | undefined;
|
|
1134
1182
|
agentAllowForcePush?: boolean | undefined;
|
|
1135
1183
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
1184
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
1136
1185
|
};
|
|
1137
1186
|
tickets: {
|
|
1138
1187
|
number: number;
|
|
@@ -1175,6 +1224,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1175
1224
|
agentProtectedBranches?: unknown;
|
|
1176
1225
|
agentAllowForcePush?: unknown;
|
|
1177
1226
|
agentAllowDestructiveGit?: unknown;
|
|
1227
|
+
agentAllowOutsideFolder?: unknown;
|
|
1178
1228
|
};
|
|
1179
1229
|
tickets: {
|
|
1180
1230
|
number: number;
|
|
@@ -1230,6 +1280,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1230
1280
|
agentProtectedBranches?: string[] | undefined;
|
|
1231
1281
|
agentAllowForcePush?: boolean | undefined;
|
|
1232
1282
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
1283
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
1233
1284
|
};
|
|
1234
1285
|
tickets: {
|
|
1235
1286
|
number: number;
|
|
@@ -1275,6 +1326,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1275
1326
|
agentProtectedBranches?: unknown;
|
|
1276
1327
|
agentAllowForcePush?: unknown;
|
|
1277
1328
|
agentAllowDestructiveGit?: unknown;
|
|
1329
|
+
agentAllowOutsideFolder?: unknown;
|
|
1278
1330
|
};
|
|
1279
1331
|
tickets: {
|
|
1280
1332
|
number: number;
|
|
@@ -1457,6 +1509,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1457
1509
|
agentProtectedBranches: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1458
1510
|
agentAllowForcePush: z.ZodOptional<z.ZodBoolean>;
|
|
1459
1511
|
agentAllowDestructiveGit: z.ZodOptional<z.ZodBoolean>;
|
|
1512
|
+
agentAllowOutsideFolder: z.ZodOptional<z.ZodBoolean>;
|
|
1460
1513
|
}, "strip", z.ZodTypeAny, {
|
|
1461
1514
|
type: "workspace_settings";
|
|
1462
1515
|
workspaceId: string;
|
|
@@ -1466,6 +1519,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1466
1519
|
agentProtectedBranches?: string[] | undefined;
|
|
1467
1520
|
agentAllowForcePush?: boolean | undefined;
|
|
1468
1521
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
1522
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
1469
1523
|
}, {
|
|
1470
1524
|
type: "workspace_settings";
|
|
1471
1525
|
workspaceId: string;
|
|
@@ -1475,6 +1529,7 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
1475
1529
|
agentProtectedBranches?: string[] | undefined;
|
|
1476
1530
|
agentAllowForcePush?: boolean | undefined;
|
|
1477
1531
|
agentAllowDestructiveGit?: boolean | undefined;
|
|
1532
|
+
agentAllowOutsideFolder?: boolean | undefined;
|
|
1478
1533
|
}>, z.ZodObject<{
|
|
1479
1534
|
type: z.ZodLiteral<"session_settings">;
|
|
1480
1535
|
sessionId: z.ZodString;
|
package/dist/protocol.js
CHANGED
|
@@ -151,6 +151,18 @@ export const SessionDescriptorSchema = z.object({
|
|
|
151
151
|
.catch(undefined),
|
|
152
152
|
agentAllowForcePush: z.boolean().optional().catch(undefined),
|
|
153
153
|
agentAllowDestructiveGit: z.boolean().optional().catch(undefined),
|
|
154
|
+
/**
|
|
155
|
+
* #418: may the agent read and write OUTSIDE the project folder?
|
|
156
|
+
*
|
|
157
|
+
* `.optional().catch(undefined)` for the QA-100 MAJOR-1 reason above, and
|
|
158
|
+
* safe here for the same reason as `agentPushBan` — though the polarity
|
|
159
|
+
* runs the other way. `policy.ts` resolves this one with `=== true`, so a
|
|
160
|
+
* value this schema throws away leaves the session confined to its folder:
|
|
161
|
+
* strictly more restricted, never less. Rubbish in this field therefore
|
|
162
|
+
* costs a project its permission, which is the direction a dropped value is
|
|
163
|
+
* allowed to fail in.
|
|
164
|
+
*/
|
|
165
|
+
agentAllowOutsideFolder: z.boolean().optional().catch(undefined),
|
|
154
166
|
budgetUsd: z.number().nullable(),
|
|
155
167
|
budgetMinutes: z.number().nullable(),
|
|
156
168
|
}),
|
|
@@ -391,6 +403,9 @@ export const GatewayFrameSchema = z.discriminatedUnion('type', [
|
|
|
391
403
|
.optional(),
|
|
392
404
|
agentAllowForcePush: z.boolean().optional(),
|
|
393
405
|
agentAllowDestructiveGit: z.boolean().optional(),
|
|
406
|
+
// #418 — read on every file tool call, so it belongs in the live frame with
|
|
407
|
+
// its neighbours: switching it back off must not mean stopping the agent.
|
|
408
|
+
agentAllowOutsideFolder: z.boolean().optional(),
|
|
394
409
|
}),
|
|
395
410
|
z.object({
|
|
396
411
|
type: z.literal('session_settings'),
|
package/dist/supervisor.js
CHANGED
|
@@ -67,6 +67,12 @@ function gitPolicyOf(descriptor) {
|
|
|
67
67
|
...(w.agentAllowDestructiveGit !== undefined
|
|
68
68
|
? { agentAllowDestructiveGit: w.agentAllowDestructiveGit }
|
|
69
69
|
: {}),
|
|
70
|
+
// #418 — «may the agent work outside the project folder». Not a git
|
|
71
|
+
// question; it rides in this object because the object is the pipe (plan
|
|
72
|
+
// R8, and the comment on `AgentGitPolicy` in `policy.ts`).
|
|
73
|
+
...(w.agentAllowOutsideFolder !== undefined
|
|
74
|
+
? { agentAllowOutsideFolder: w.agentAllowOutsideFolder }
|
|
75
|
+
: {}),
|
|
70
76
|
};
|
|
71
77
|
}
|
|
72
78
|
function freshLevels() {
|
|
@@ -1759,7 +1765,11 @@ export class Supervisor {
|
|
|
1759
1765
|
const policyChanged = frame.agentPushBan !== undefined ||
|
|
1760
1766
|
frame.agentProtectedBranches !== undefined ||
|
|
1761
1767
|
frame.agentAllowForcePush !== undefined ||
|
|
1762
|
-
frame.agentAllowDestructiveGit !== undefined
|
|
1768
|
+
frame.agentAllowDestructiveGit !== undefined ||
|
|
1769
|
+
// #418 travels in the same frame and the same object: it is read on
|
|
1770
|
+
// every file tool call, so taking the permission away has to reach
|
|
1771
|
+
// a running agent without stopping it.
|
|
1772
|
+
frame.agentAllowOutsideFolder !== undefined;
|
|
1763
1773
|
if (policyChanged) {
|
|
1764
1774
|
const next = {
|
|
1765
1775
|
...(frame.agentPushBan !== undefined ? { agentPushBan: frame.agentPushBan } : {}),
|
|
@@ -1772,6 +1782,9 @@ export class Supervisor {
|
|
|
1772
1782
|
...(frame.agentAllowDestructiveGit !== undefined
|
|
1773
1783
|
? { agentAllowDestructiveGit: frame.agentAllowDestructiveGit }
|
|
1774
1784
|
: {}),
|
|
1785
|
+
...(frame.agentAllowOutsideFolder !== undefined
|
|
1786
|
+
? { agentAllowOutsideFolder: frame.agentAllowOutsideFolder }
|
|
1787
|
+
: {}),
|
|
1775
1788
|
};
|
|
1776
1789
|
Object.assign(running.descriptor.workspace, next);
|
|
1777
1790
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const RUNNER_VERSION = "0.
|
|
1
|
+
export declare const RUNNER_VERSION = "0.63.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
package/package.json
CHANGED