@cat-factory/worker 0.81.10 → 0.82.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/dist/infrastructure/repositories/D1RiskPolicyRepository.d.ts.map +1 -1
- package/dist/infrastructure/repositories/D1RiskPolicyRepository.js +5 -3
- package/dist/infrastructure/repositories/D1RiskPolicyRepository.js.map +1 -1
- package/migrations/0049_merge_preset_fork_decision.sql +6 -0
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1RiskPolicyRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1RiskPolicyRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"D1RiskPolicyRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1RiskPolicyRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAuC,MAAM,wBAAwB,CAAA;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AA4C3D;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,oBAAoB;IACjE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAY;IAE/B,YAAY,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,UAAU,CAAA;KAAE,EAErC;IAEK,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAMrE;IAEK,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAQrD;IAEK,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAUhE;IAEK,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DnE;IAEK,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3D;CACF"}
|
|
@@ -13,6 +13,7 @@ function rowToPreset(row) {
|
|
|
13
13
|
releaseMaxAttempts: row.release_max_attempts,
|
|
14
14
|
humanReviewGraceMinutes: row.human_review_grace_minutes,
|
|
15
15
|
autoMergeEnabled: row.auto_merge_enabled === 1,
|
|
16
|
+
forkDecision: row.fork_decision ? JSON.parse(row.fork_decision) : null,
|
|
16
17
|
isDefault: row.is_default === 1,
|
|
17
18
|
...(row.version != null ? { version: row.version } : {}),
|
|
18
19
|
createdAt: row.created_at,
|
|
@@ -68,8 +69,8 @@ export class D1RiskPolicyRepository {
|
|
|
68
69
|
max_requirement_iterations, max_requirement_concern_allowed,
|
|
69
70
|
max_tester_quality_iterations,
|
|
70
71
|
release_watch_window_minutes, release_max_attempts, human_review_grace_minutes,
|
|
71
|
-
auto_merge_enabled, version, is_default, created_at)
|
|
72
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
72
|
+
auto_merge_enabled, fork_decision, version, is_default, created_at)
|
|
73
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
73
74
|
ON CONFLICT (workspace_id, id) DO UPDATE SET
|
|
74
75
|
name = excluded.name,
|
|
75
76
|
max_complexity = excluded.max_complexity,
|
|
@@ -83,9 +84,10 @@ export class D1RiskPolicyRepository {
|
|
|
83
84
|
release_max_attempts = excluded.release_max_attempts,
|
|
84
85
|
human_review_grace_minutes = excluded.human_review_grace_minutes,
|
|
85
86
|
auto_merge_enabled = excluded.auto_merge_enabled,
|
|
87
|
+
fork_decision = excluded.fork_decision,
|
|
86
88
|
version = excluded.version,
|
|
87
89
|
is_default = excluded.is_default`)
|
|
88
|
-
.bind(workspaceId, preset.id, preset.name, preset.maxComplexity, preset.maxRisk, preset.maxImpact, preset.ciMaxAttempts, preset.maxRequirementIterations, preset.maxRequirementConcernAllowed, preset.maxTesterQualityIterations, preset.releaseWatchWindowMinutes, preset.releaseMaxAttempts, preset.humanReviewGraceMinutes, preset.autoMergeEnabled ? 1 : 0, preset.version ?? null, preset.isDefault ? 1 : 0, preset.createdAt)
|
|
90
|
+
.bind(workspaceId, preset.id, preset.name, preset.maxComplexity, preset.maxRisk, preset.maxImpact, preset.ciMaxAttempts, preset.maxRequirementIterations, preset.maxRequirementConcernAllowed, preset.maxTesterQualityIterations, preset.releaseWatchWindowMinutes, preset.releaseMaxAttempts, preset.humanReviewGraceMinutes, preset.autoMergeEnabled ? 1 : 0, preset.forkDecision ? JSON.stringify(preset.forkDecision) : null, preset.version ?? null, preset.isDefault ? 1 : 0, preset.createdAt)
|
|
89
91
|
.run();
|
|
90
92
|
}
|
|
91
93
|
async remove(workspaceId, id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1RiskPolicyRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1RiskPolicyRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"D1RiskPolicyRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1RiskPolicyRepository.ts"],"names":[],"mappings":"AAwBA,SAAS,WAAW,CAAC,GAAkB;IACrC,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,aAAa,EAAE,GAAG,CAAC,cAAc;QACjC,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,aAAa,EAAE,GAAG,CAAC,eAAe;QAClC,wBAAwB,EAAE,GAAG,CAAC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AC,CAAC,CAAC,IAAI,EAChE,MAAM,CAAC,OAAO,IAAI,IAAI,EACtB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACxB,MAAM,CAAC,SAAS,CACjB;aACA,GAAG,EAAE,CAAA;IACV,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,EAAU;QAC1C,MAAM,IAAI,CAAC,EAAE;aACV,OAAO,CACN,0FAA0F,CAC3F;aACA,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;aACrB,GAAG,EAAE,CAAA;IACV,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Estimate gating for the optional implementation-fork decision phase on the Coder step,
|
|
2
|
+
-- stored on the workspace merge threshold preset as a JSON `StepGating` blob (the same shape
|
|
3
|
+
-- as the consensus/step gating). Nullable: absent/disabled ⇒ fork surfacing is off in `auto`
|
|
4
|
+
-- mode. Mirrored on Node by the `fork_decision` text column on the Drizzle
|
|
5
|
+
-- `merge_threshold_presets` table (both store the JSON blob as text).
|
|
6
|
+
ALTER TABLE merge_threshold_presets ADD COLUMN fork_decision TEXT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.0",
|
|
4
4
|
"description": "Reusable Cloudflare Worker library (Hono + D1) exposing the Agent Architecture Board core: the `createApp()` Hono factory, the default fetch/scheduled/queue handler, and the Durable Object + Workflow classes. Deployments (see deploy/backend) supply the wrangler.toml + config and re-export these.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,21 +42,21 @@
|
|
|
42
42
|
"pino": "^10.3.1",
|
|
43
43
|
"valibot": "^1.4.2",
|
|
44
44
|
"workers-ai-provider": "^3.3.1",
|
|
45
|
-
"@cat-factory/agents": "0.
|
|
46
|
-
"@cat-factory/caching": "0.6.
|
|
47
|
-
"@cat-factory/consensus": "0.10.
|
|
48
|
-
"@cat-factory/contracts": "0.
|
|
49
|
-
"@cat-factory/eks": "0.1.
|
|
50
|
-
"@cat-factory/gates": "0.5.
|
|
51
|
-
"@cat-factory/gitlab": "0.7.
|
|
52
|
-
"@cat-factory/integrations": "0.
|
|
53
|
-
"@cat-factory/kernel": "0.
|
|
54
|
-
"@cat-factory/observability-langfuse": "0.7.
|
|
55
|
-
"@cat-factory/orchestration": "0.
|
|
56
|
-
"@cat-factory/prompt-fragments": "0.13.
|
|
57
|
-
"@cat-factory/provider-cloudflare": "0.7.
|
|
58
|
-
"@cat-factory/server": "0.
|
|
59
|
-
"@cat-factory/spend": "0.12.
|
|
45
|
+
"@cat-factory/agents": "0.53.0",
|
|
46
|
+
"@cat-factory/caching": "0.6.29",
|
|
47
|
+
"@cat-factory/consensus": "0.10.29",
|
|
48
|
+
"@cat-factory/contracts": "0.125.0",
|
|
49
|
+
"@cat-factory/eks": "0.1.52",
|
|
50
|
+
"@cat-factory/gates": "0.5.14",
|
|
51
|
+
"@cat-factory/gitlab": "0.7.52",
|
|
52
|
+
"@cat-factory/integrations": "0.81.0",
|
|
53
|
+
"@cat-factory/kernel": "0.118.0",
|
|
54
|
+
"@cat-factory/observability-langfuse": "0.7.184",
|
|
55
|
+
"@cat-factory/orchestration": "0.105.0",
|
|
56
|
+
"@cat-factory/prompt-fragments": "0.13.11",
|
|
57
|
+
"@cat-factory/provider-cloudflare": "0.7.200",
|
|
58
|
+
"@cat-factory/server": "0.108.0",
|
|
59
|
+
"@cat-factory/spend": "0.12.10"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@cloudflare/vitest-pool-workers": "^0.18.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"typescript": "7.0.1-rc",
|
|
65
65
|
"vitest": "^4.1.9",
|
|
66
66
|
"wrangler": "^4.107.0",
|
|
67
|
-
"@cat-factory/conformance": "0.10.
|
|
67
|
+
"@cat-factory/conformance": "0.10.90"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsc -b tsconfig.build.json",
|