@khoavu882/doflow 2.0.0-beta.3 → 2.0.0-beta.5
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/bin/doflow.js +2 -2
- package/core/.antigravity-plugin/plugin.json +0 -1
- package/core/.claude-plugin/plugin.json +1 -1
- package/core/.codex-plugin/plugin.json +1 -1
- package/core/.plugin/plugin.json +1 -1
- package/core/harnesses/claude/hooks/mcp-tool-guard.sh +7 -17
- package/core/harnesses/claude/hooks/pre-bash-guard.sh +7 -17
- package/core/harnesses/claude/hooks/pre-implement-gate.sh +7 -18
- package/core/harnesses/claude/hooks/session-start.sh +5 -3
- package/core/harnesses/claude/hooks/stop-check.sh +5 -3
- package/core/harnesses/claude/hooks/subagent-audit.sh +5 -5
- package/core/harnesses/claude/hooks/user-prompt-submit.sh +5 -3
- package/core/harnesses/codex/hooks/mcp-tool-guard.sh +7 -15
- package/core/harnesses/codex/hooks/pre-bash-guard.sh +7 -15
- package/core/harnesses/codex/hooks/pre-implement-gate.sh +7 -16
- package/core/harnesses/codex/hooks/session-start.sh +5 -3
- package/core/harnesses/codex/hooks/stop-check.sh +6 -5
- package/core/harnesses/codex/hooks/subagent-audit.sh +17 -6
- package/core/harnesses/codex/hooks/user-prompt-submit.sh +5 -4
- package/core/harnesses/gemini/hooks/mcp-tool-guard.sh +7 -18
- package/core/harnesses/gemini/hooks/pre-bash-guard.sh +7 -18
- package/core/harnesses/gemini/hooks/pre-implement-gate.sh +7 -19
- package/core/harnesses/gemini/hooks/session-start.sh +5 -3
- package/core/harnesses/kiro/hooks/mcp-tool-guard.sh +20 -5
- package/core/harnesses/kiro/hooks/pre-bash-guard.sh +20 -5
- package/core/harnesses/kiro/hooks/pre-implement-gate.sh +20 -5
- package/core/harnesses/kiro/hooks/session-start.sh +11 -5
- package/core/harnesses/kiro/hooks/stop-check.sh +21 -30
- package/core/harnesses/pi/extensions/doflow-guard.js +159 -0
- package/core/harnesses/shared/hooks/ENVELOPE_MIGRATION.md +27 -11
- package/core/harnesses/shared/hooks/adapters/antigravity.js +14 -57
- package/core/harnesses/shared/hooks/bridge/bridge.sh +184 -0
- package/core/harnesses/shared/hooks/bridge/envelope.jq +60 -0
- package/core/harnesses/shared/hooks/bridge/respond.sh +62 -0
- package/core/harnesses/shared/hooks/policies/capture-failure.sh +4 -2
- package/core/harnesses/shared/hooks/policies/contract.sh +75 -0
- package/core/harnesses/shared/hooks/policies/deny-json.sh +39 -4
- package/core/harnesses/shared/hooks/policies/lib.sh +4 -2
- package/core/harnesses/shared/hooks/policies/mcp-tool-guard.sh +46 -34
- package/core/harnesses/shared/hooks/policies/pre-bash-guard.sh +75 -25
- package/core/harnesses/shared/hooks/policies/pre-implementation-gate.sh +67 -73
- package/core/harnesses/shared/hooks/policies/session-context.sh +37 -7
- package/core/harnesses/shared/hooks/policies/stop-check.sh +42 -15
- package/core/harnesses/shared/hooks/policies/subagent-audit.sh +35 -5
- package/core/harnesses/shared/hooks/policies/user-prompt-submit.sh +40 -7
- package/core/harnesses/shared/hooks/stream-hook-runner.js +69 -181
- package/core/registry/assets.json +19 -0
- package/core/registry/contracts.json +2 -2
- package/core/registry/harnesses.json +196 -10
- package/core/registry/lifecycle.json +2626 -7
- package/core/registry/storage.json +110 -83
- package/core/registry/verification.json +1 -1
- package/core/shared/scripts/doflow/bash/render-puml.sh +2 -2
- package/core/shared/scripts/doflow/bin/doflow-run +10 -6
- package/core/shared/skills/do-design/SKILL.md +6 -6
- package/core/shared/skills/do-execute-plan/SKILL.md +11 -10
- package/core/shared/skills/do-execute-plan/references/readiness_gate.md +2 -0
- package/core/shared/skills/do-execute-plan/references/scaffold.md +2 -2
- package/core/shared/skills/do-implement/SKILL.md +3 -2
- package/core/shared/skills/do-plan/SKILL.md +7 -8
- package/package.json +4 -2
- package/src/adapters/antigravity/{index.ts → index.js} +141 -105
- package/src/adapters/claude/{index.ts → index.js} +63 -49
- package/src/adapters/claude/{mcp.ts → mcp.js} +16 -16
- package/src/adapters/codex/{agents.ts → agents.js} +24 -24
- package/src/adapters/codex/{config.ts → config.js} +49 -49
- package/src/adapters/codex/{hooks.ts → hooks.js} +62 -27
- package/src/adapters/codex/{index.ts → index.js} +148 -105
- package/src/adapters/codex/{mcp.ts → mcp.js} +38 -38
- package/src/adapters/codex/{native-projection.ts → native-projection.js} +5 -5
- package/src/adapters/copilot/{index.ts → index.js} +42 -42
- package/src/adapters/{copy-tree.ts → copy-tree.js} +74 -74
- package/src/adapters/gemini/{hooks.ts → hooks.js} +78 -37
- package/src/adapters/gemini/{index.ts → index.js} +96 -57
- package/src/adapters/{hook-commands.ts → hook-commands.js} +8 -8
- package/src/adapters/{index.ts → index.js} +13 -13
- package/src/adapters/kiro/{index.ts → index.js} +49 -35
- package/src/adapters/{mcp-entries.ts → mcp-entries.js} +55 -55
- package/src/adapters/opencode/{index.ts → index.js} +52 -52
- package/src/adapters/pi/hooks.js +119 -0
- package/src/adapters/pi/{index.ts → index.js} +64 -39
- package/src/adapters/pi/{json-members.ts → json-members.js} +23 -23
- package/src/adapters/pi/{mcp.ts → mcp.js} +70 -70
- package/src/adapters/{resolve-source.ts → resolve-source.js} +1 -1
- package/src/cli/commands/{install.ts → install.js} +25 -25
- package/src/cli/commands/{list-backups.ts → list-backups.js} +4 -4
- package/src/cli/commands/{reconcile.ts → reconcile.js} +19 -19
- package/src/cli/commands/{remove.ts → remove.js} +10 -10
- package/src/cli/commands/{rollback.ts → rollback.js} +17 -17
- package/src/cli/commands/{self-update.ts → self-update.js} +3 -3
- package/src/cli/commands/{status.ts → status.js} +24 -24
- package/src/cli/commands/{tools.ts → tools.js} +16 -16
- package/src/cli/commands/{update.ts → update.js} +20 -20
- package/src/cli/{index.ts → index.js} +43 -31
- package/src/cli/{runtime-commands.ts → runtime-commands.js} +97 -58
- package/src/cli/{shared.ts → shared.js} +40 -40
- package/src/helper/{bash-helper.ts → bash-helper.js} +7 -7
- package/src/helper/{git.ts → git.js} +2 -2
- package/src/helper/{guardrails.ts → guardrails.js} +10 -10
- package/src/helper/{harness-paths.ts → harness-paths.js} +24 -24
- package/src/helper/{marker-merge.ts → marker-merge.js} +4 -4
- package/src/helper/{prompt.ts → prompt.js} +5 -5
- package/src/helper/{repo-root.ts → repo-root.js} +2 -2
- package/src/helper/{settings-merge.ts → settings-merge.js} +27 -27
- package/src/helper/{settings-scope.ts → settings-scope.js} +3 -3
- package/src/helper/{toml.ts → toml.js} +48 -48
- package/src/install/{backup-set.ts → backup-set.js} +16 -16
- package/src/install/{backup.ts → backup.js} +65 -65
- package/src/install/{context.ts → context.js} +15 -15
- package/src/install/{manifest.ts → manifest.js} +27 -27
- package/src/install/{mcp.ts → mcp.js} +30 -30
- package/src/install/{paths.ts → paths.js} +15 -15
- package/src/install/{targets.ts → targets.js} +10 -10
- package/src/install/{tool-lifecycle.ts → tool-lifecycle.js} +20 -20
- package/src/lifecycle/{bash-availability.ts → bash-availability.js} +1 -1
- package/src/lifecycle/coverage.js +57 -0
- package/src/lifecycle/hook-step.js +61 -0
- package/src/lifecycle/{index.ts → index.js} +160 -146
- package/src/lifecycle/{mcp-index.ts → mcp-index.js} +1 -1
- package/src/lifecycle/{policies.ts → policies.js} +11 -11
- package/src/lifecycle/{view.ts → view.js} +28 -28
- package/src/registry/{index.ts → index.js} +195 -66
- package/src/release/build-package.js +91 -0
- package/src/release/changelog-section.js +70 -0
- package/src/release/{sync-plugin-versions.ts → sync-plugin-versions.js} +4 -4
- package/src/runtime/advice/{cli.ts → cli.js} +31 -31
- package/src/runtime/advice/{client.ts → client.js} +44 -44
- package/src/runtime/advice/{config.ts → config.js} +16 -16
- package/src/runtime/advice/{doctor.ts → doctor.js} +32 -32
- package/src/runtime/advice/{endpoint-guard.ts → endpoint-guard.js} +20 -20
- package/src/runtime/advice/{kinds.ts → kinds.js} +16 -16
- package/src/runtime/advice/providers/{ollama-systemone.ts → ollama-systemone.js} +21 -21
- package/src/runtime/advice/{record.ts → record.js} +19 -19
- package/src/runtime/advice/{registry.ts → registry.js} +16 -16
- package/src/runtime/advice/{strength.ts → strength.js} +7 -7
- package/src/runtime/{brief-tools.ts → brief-tools.js} +50 -50
- package/src/runtime/{c4-project.ts → c4-project.js} +27 -27
- package/src/runtime/candidate.js +505 -0
- package/src/runtime/{capability-router.ts → capability-router.js} +39 -39
- package/src/runtime/{checkouts.ts → checkouts.js} +21 -21
- package/src/runtime/{claims.ts → claims.js} +44 -35
- package/src/runtime/{cli-result.ts → cli-result.js} +15 -8
- package/src/runtime/{cli.ts → cli.js} +59 -292
- package/src/runtime/{command-detect.ts → command-detect.js} +47 -47
- package/src/runtime/context/budget.js +203 -0
- package/src/runtime/context/compose.js +1367 -0
- package/src/runtime/context/delivery-store.js +102 -0
- package/src/runtime/context/mandatory.js +594 -0
- package/src/runtime/context/pointer.js +142 -0
- package/src/runtime/context-pack.js +1277 -0
- package/src/runtime/{decision-register.ts → decision-register.js} +67 -67
- package/src/runtime/evidence-fields.js +39 -0
- package/src/runtime/{evidence-ledger.ts → evidence-ledger.js} +32 -25
- package/src/runtime/failure/{capture.ts → capture.js} +29 -29
- package/src/runtime/failure/{classifier.ts → classifier.js} +4 -4
- package/src/runtime/failure/{cli.ts → cli.js} +30 -30
- package/src/runtime/failure/{home.ts → home.js} +6 -6
- package/src/runtime/failure/{store.ts → store.js} +32 -32
- package/src/runtime/{feature-resolve.ts → feature-resolve.js} +6 -6
- package/src/runtime/{freshness.ts → freshness.js} +59 -22
- package/src/runtime/{health.ts → health.js} +72 -72
- package/src/runtime/{history-compactor.ts → history-compactor.js} +25 -25
- package/src/runtime/{implementation-gate.ts → implementation-gate.js} +30 -30
- package/src/runtime/inventory/{coverage.ts → coverage.js} +10 -10
- package/src/runtime/inventory/{identity.ts → identity.js} +2 -2
- package/src/runtime/inventory/{index.ts → index.js} +36 -36
- package/src/runtime/inventory/{precedence.ts → precedence.js} +2 -2
- package/src/runtime/inventory/{read-scopes.ts → read-scopes.js} +9 -9
- package/src/runtime/inventory/{siblings.ts → siblings.js} +15 -15
- package/src/runtime/knowledge/{chunker.ts → chunker.js} +12 -12
- package/src/runtime/knowledge/{hybrid.ts → hybrid.js} +17 -17
- package/src/runtime/knowledge/{index-store.ts → index-store.js} +23 -23
- package/src/runtime/knowledge/{retrieval.ts → retrieval.js} +27 -27
- package/src/runtime/{leak-scan.ts → leak-scan.js} +12 -12
- package/src/runtime/lifecycle/{cli.ts → cli.js} +32 -32
- package/src/runtime/lifecycle/{event-store.ts → event-store.js} +48 -48
- package/src/runtime/lifecycle/{fold.ts → fold.js} +41 -41
- package/src/runtime/lifecycle/{followup.ts → followup.js} +54 -54
- package/src/runtime/lifecycle/{goal.ts → goal.js} +50 -50
- package/src/runtime/lifecycle/{intent-writer.ts → intent-writer.js} +5 -5
- package/src/runtime/lifecycle/{overview.ts → overview.js} +47 -47
- package/src/runtime/lifecycle/{release.ts → release.js} +29 -29
- package/src/runtime/lifecycle/{report-store.ts → report-store.js} +25 -25
- package/src/runtime/lifecycle/{retention.ts → retention.js} +37 -37
- package/src/runtime/lifecycle/{root.ts → root.js} +9 -9
- package/src/runtime/lifecycle/{status.ts → status.js} +64 -64
- package/src/runtime/lifecycle/{store-upkeep.ts → store-upkeep.js} +46 -46
- package/src/runtime/{locator-resolve.ts → locator-resolve.js} +7 -7
- package/src/runtime/{mask.ts → mask.js} +22 -22
- package/src/runtime/{mcp-consultations.ts → mcp-consultations.js} +54 -54
- package/src/runtime/{mcp-reach.ts → mcp-reach.js} +24 -24
- package/src/runtime/{model-router.ts → model-router.js} +20 -20
- package/src/runtime/{outcome.ts → outcome.js} +27 -27
- package/src/runtime/{reach.ts → reach.js} +21 -21
- package/src/runtime/{readiness-record.ts → readiness-record.js} +12 -12
- package/src/runtime/{readiness.ts → readiness.js} +113 -43
- package/src/runtime/{recovery.ts → recovery.js} +15 -15
- package/src/runtime/{research-request.ts → research-request.js} +34 -34
- package/src/runtime/{retrieval-plan.ts → retrieval-plan.js} +453 -104
- package/src/runtime/retrieval-record.js +223 -0
- package/src/runtime/scaffold/{artifacts.ts → artifacts.js} +22 -19
- package/src/runtime/scaffold/{fingerprint.ts → fingerprint.js} +3 -3
- package/src/runtime/scaffold/{generate.ts → generate.js} +109 -109
- package/src/runtime/scaffold/{languages.ts → languages.js} +34 -34
- package/src/runtime/source-version.js +289 -0
- package/src/runtime/storage/{cli.ts → cli.js} +9 -9
- package/src/runtime/storage/{engine.ts → engine.js} +37 -37
- package/src/runtime/storage/{registry.ts → registry.js} +19 -19
- package/src/runtime/storage/{roots.ts → roots.js} +8 -8
- package/src/runtime/storage/{rules.ts → rules.js} +26 -26
- package/src/runtime/storage/{upkeep.ts → upkeep.js} +35 -35
- package/src/runtime/storage/{work-status.ts → work-status.js} +39 -39
- package/src/runtime/{task-attempts.ts → task-attempts.js} +62 -62
- package/src/runtime/{task-classifier.ts → task-classifier.js} +34 -34
- package/src/runtime/{task-scope.ts → task-scope.js} +40 -15
- package/src/runtime/{task-state.ts → task-state.js} +86 -21
- package/src/runtime/trace/{indicators.ts → indicators.js} +22 -22
- package/src/runtime/trace/{ledger.ts → ledger.js} +42 -42
- package/src/runtime/trace/{render.ts → render.js} +7 -7
- package/src/runtime/trace/{views.ts → views.js} +40 -40
- package/src/runtime/verification/{contract-runner.ts → contract-runner.js} +23 -23
- package/src/runtime/verification/{engine.ts → engine.js} +143 -143
- package/src/runtime/verification/{registry.ts → registry.js} +6 -6
- package/src/runtime/verification/{scope-bound.ts → scope-bound.js} +50 -50
- package/src/runtime/verification/{test-selection.ts → test-selection.js} +28 -28
- package/src/runtime/{workflow-engine.ts → workflow-engine.js} +50 -50
- package/src/runtime/{workflow-orchestrator.ts → workflow-orchestrator.js} +91 -91
- package/src/runtime/{worktree.ts → worktree.js} +31 -31
- package/src/state/{index.ts → index.js} +26 -26
- package/src/state/{lockfile.ts → lockfile.js} +20 -20
- package/src/state/{run-lock.ts → run-lock.js} +44 -44
- package/core/.antigravity-plugin/hooks.json +0 -39
- package/core/harnesses/shared/hooks/adapters/arg-fields.js +0 -19
- package/core/harnesses/shared/hooks/adapters/gemini.js +0 -114
- package/core/harnesses/shared/hooks/hooks.json +0 -47
- package/src/runtime/context-pack.ts +0 -492
package/bin/doflow.js
CHANGED
|
@@ -31,7 +31,7 @@ if (typeof nodeModule.enableCompileCache === 'function') {
|
|
|
31
31
|
// error thrown while it loads is recorded under the command name `unknown`.
|
|
32
32
|
let cli = null;
|
|
33
33
|
try {
|
|
34
|
-
const { captureError } = require('../src/runtime/failure/capture.
|
|
34
|
+
const { captureError } = require('../src/runtime/failure/capture.js');
|
|
35
35
|
process.on('uncaughtExceptionMonitor', (error) => {
|
|
36
36
|
try {
|
|
37
37
|
const argv = process.argv.slice(2);
|
|
@@ -40,5 +40,5 @@ try {
|
|
|
40
40
|
} catch { /* best-effort */ }
|
|
41
41
|
});
|
|
42
42
|
} catch { /* best-effort */ }
|
|
43
|
-
cli = require('../src/cli/index.
|
|
43
|
+
cli = require('../src/cli/index.js');
|
|
44
44
|
cli.main(process.argv.slice(2));
|
package/core/.plugin/plugin.json
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude front door:
|
|
3
|
-
# Library, then translates it into Claude Code's verified deny contract.
|
|
4
|
-
#
|
|
5
|
-
# Schema verified (Phase 8.3, 2026-04-17): hookSpecificOutput.permissionDecision
|
|
6
|
-
# "deny" is correctly recognized by Claude Code and blocks execution — exit code
|
|
7
|
-
# alone is not sufficient here, so this front door is a translator, not a bare
|
|
8
|
-
# exec (unlike session-context/stop-check, which never need this translation).
|
|
2
|
+
# Claude front door: mcp-tool-guard through the shared lifecycle bridge.
|
|
9
3
|
set -uo pipefail
|
|
10
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CODE=$?
|
|
18
|
-
|
|
19
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-MCP tool call blocked by mcp-tool-guard}"
|
|
20
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t claude"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge claude PreToolUse mcp-tool-guard
|
|
10
|
+
exit $?
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude front door:
|
|
3
|
-
# Library, then translates it into Claude Code's verified deny contract.
|
|
4
|
-
#
|
|
5
|
-
# Schema verified (Phase 8.3, 2026-04-17): hookSpecificOutput.permissionDecision
|
|
6
|
-
# "deny" is correctly recognized by Claude Code and blocks execution — exit code
|
|
7
|
-
# alone is not sufficient here, so this front door is a translator, not a bare
|
|
8
|
-
# exec (unlike session-context/stop-check, which never need this translation).
|
|
2
|
+
# Claude front door: pre-bash-guard through the shared lifecycle bridge.
|
|
9
3
|
set -uo pipefail
|
|
10
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CODE=$?
|
|
18
|
-
|
|
19
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-Command blocked by pre-bash-guard}"
|
|
20
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t claude"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge claude PreToolUse pre-bash-guard
|
|
10
|
+
exit $?
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude front door:
|
|
3
|
-
# Canonical Policy Library, then translates it into Claude Code's verified deny
|
|
4
|
-
# contract.
|
|
5
|
-
#
|
|
6
|
-
# Schema verified (Phase 8.3, 2026-04-17): hookSpecificOutput.permissionDecision
|
|
7
|
-
# "deny" is correctly recognized by Claude Code and blocks execution — exit code
|
|
8
|
-
# alone is not sufficient here, so this front door is a translator, not a bare
|
|
9
|
-
# exec (unlike session-context/stop-check, which never need this translation).
|
|
2
|
+
# Claude front door: pre-implementation-gate through the shared lifecycle bridge.
|
|
10
3
|
set -uo pipefail
|
|
11
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
CODE=$?
|
|
19
|
-
|
|
20
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-Implementation requires an approved plan.md}"
|
|
21
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t claude"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge claude PreToolUse pre-implementation-gate
|
|
10
|
+
exit $?
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude
|
|
3
|
-
set -
|
|
2
|
+
# Claude front door: session-context through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
5
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge claude SessionStart session-context
|
|
7
|
+
exit $?
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude
|
|
3
|
-
set -
|
|
2
|
+
# Claude front door: stop-check through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
5
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge claude Stop stop-check
|
|
7
|
+
exit $?
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude front door:
|
|
3
|
-
|
|
4
|
-
# (022-hooks-remaining-duplication).
|
|
5
|
-
set -euo pipefail
|
|
2
|
+
# Claude front door: subagent-audit through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
6
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
7
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge claude SubagentStart subagent-audit
|
|
7
|
+
exit $?
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Claude front door:
|
|
3
|
-
set -
|
|
2
|
+
# Claude front door: user-prompt-submit through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-claude}"
|
|
5
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge claude UserPromptSubmit user-prompt-submit
|
|
7
|
+
exit $?
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex front door:
|
|
3
|
-
# Library, then translates it into the hookSpecificOutput.permissionDecision deny
|
|
4
|
-
# contract this script's Codex/Claude originals both used — exit code alone is
|
|
5
|
-
# not sufficient here, so this front door is a translator, not a bare exec
|
|
6
|
-
# (unlike session-context/stop-check, which never need this translation).
|
|
2
|
+
# Codex front door: mcp-tool-guard through the shared lifecycle bridge.
|
|
7
3
|
set -uo pipefail
|
|
8
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CODE=$?
|
|
16
|
-
|
|
17
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-MCP tool call blocked by mcp-tool-guard}"
|
|
18
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t codex"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge codex PreToolUse mcp-tool-guard
|
|
10
|
+
exit $?
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex front door:
|
|
3
|
-
# Library, then translates it into the hookSpecificOutput.permissionDecision deny
|
|
4
|
-
# contract this script's Codex/Claude originals both used — exit code alone is
|
|
5
|
-
# not sufficient here, so this front door is a translator, not a bare exec
|
|
6
|
-
# (unlike session-context/stop-check, which never need this translation).
|
|
2
|
+
# Codex front door: pre-bash-guard through the shared lifecycle bridge.
|
|
7
3
|
set -uo pipefail
|
|
8
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CODE=$?
|
|
16
|
-
|
|
17
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-Command blocked by pre-bash-guard}"
|
|
18
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t codex"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge codex PreToolUse pre-bash-guard
|
|
10
|
+
exit $?
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex front door:
|
|
3
|
-
# Canonical Policy Library, then translates it into the
|
|
4
|
-
# hookSpecificOutput.permissionDecision deny contract this script's Codex/Claude
|
|
5
|
-
# originals both used — exit code alone is not sufficient here, so this front
|
|
6
|
-
# door is a translator, not a bare exec (unlike session-context/stop-check,
|
|
7
|
-
# which never need this translation).
|
|
2
|
+
# Codex front door: pre-implementation-gate through the shared lifecycle bridge.
|
|
8
3
|
set -uo pipefail
|
|
9
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
CODE=$?
|
|
17
|
-
|
|
18
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_nested "${REASON:-Implementation requires an approved plan.md}"
|
|
19
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[doflow] shared hooks lack the bridge; run: doflow update -t codex"}}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge codex PreToolUse pre-implementation-gate
|
|
10
|
+
exit $?
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex
|
|
3
|
-
set -
|
|
2
|
+
# Codex front door: session-context through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
5
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge codex SessionStart session-context
|
|
7
|
+
exit $?
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex
|
|
3
|
-
set -
|
|
2
|
+
# Codex front door: stop-check through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then printf '{}\n'; exit 0; fi
|
|
5
6
|
rc=0
|
|
6
|
-
|
|
7
|
-
[ "$rc" -eq
|
|
8
|
-
|
|
7
|
+
output="$(doflow_bridge codex Stop stop-check)" || rc=$?
|
|
8
|
+
if [ "$rc" -eq 0 ]; then printf '%s\n' "$output"; fi
|
|
9
|
+
exit "$rc"
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex front door:
|
|
3
|
-
|
|
4
|
-
# copies were byte-identical; only this trailing JSON requirement is Codex-specific).
|
|
5
|
-
set -euo pipefail
|
|
2
|
+
# Codex front door: subagent-audit through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
6
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
payload=$(cat)
|
|
7
|
+
event=$(printf '%s' "$payload" | jq -r '.hook_event_name // "SubagentStart"' 2>/dev/null || printf 'SubagentStart')
|
|
8
|
+
has_jq=1
|
|
9
|
+
command -v jq >/dev/null 2>&1 || has_jq=0
|
|
10
|
+
rc=0
|
|
11
|
+
doflow_bridge codex "$event" subagent-audit <<<"$payload" || rc=$?
|
|
12
|
+
if [ "$has_jq" -eq 0 ]; then
|
|
13
|
+
printf '{}\n'
|
|
14
|
+
exit 0
|
|
15
|
+
fi
|
|
16
|
+
if [ "$rc" -eq 0 ]; then
|
|
17
|
+
case "$DF_BRIDGE_OUTCOME" in allow|advisory) printf '{}\n' ;; esac
|
|
18
|
+
fi
|
|
19
|
+
exit "$rc"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Codex front door:
|
|
3
|
-
|
|
4
|
-
set -euo pipefail
|
|
2
|
+
# Codex front door: user-prompt-submit through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
5
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-codex}"
|
|
6
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge codex UserPromptSubmit user-prompt-submit
|
|
7
|
+
exit $?
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Gemini front door:
|
|
3
|
-
# Policy Library, then translates it into Gemini's verified deny contract.
|
|
4
|
-
#
|
|
5
|
-
# Gemini's hook output schema (packages/core/src/hooks/types.ts, confirmed this
|
|
6
|
-
# session) is a top-level {"decision": "deny", "reason": "..."} — NOT nested
|
|
7
|
-
# under hookSpecificOutput.permissionDecision like Claude/Codex. Exit code alone
|
|
8
|
-
# is not sufficient here, so this front door is a translator, not a bare exec
|
|
9
|
-
# (unlike session-context, which never needs this translation).
|
|
2
|
+
# Gemini front door: mcp-tool-guard through the shared lifecycle bridge.
|
|
10
3
|
set -uo pipefail
|
|
11
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-gemini}"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
CODE=$?
|
|
19
|
-
|
|
20
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_flat "${REASON:-MCP tool call blocked by mcp-tool-guard}"
|
|
21
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"decision":"deny","reason":"[doflow] shared hooks lack the bridge; run: doflow update -t gemini"}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge gemini BeforeTool mcp-tool-guard
|
|
10
|
+
exit $?
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Gemini front door:
|
|
3
|
-
# Policy Library, then translates it into Gemini's verified deny contract.
|
|
4
|
-
#
|
|
5
|
-
# Gemini's hook output schema (packages/core/src/hooks/types.ts, confirmed this
|
|
6
|
-
# session) is a top-level {"decision": "deny", "reason": "..."} — NOT nested
|
|
7
|
-
# under hookSpecificOutput.permissionDecision like Claude/Codex. Exit code alone
|
|
8
|
-
# is not sufficient here, so this front door is a translator, not a bare exec
|
|
9
|
-
# (unlike session-context, which never needs this translation).
|
|
2
|
+
# Gemini front door: pre-bash-guard through the shared lifecycle bridge.
|
|
10
3
|
set -uo pipefail
|
|
11
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-gemini}"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
CODE=$?
|
|
19
|
-
|
|
20
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_flat "${REASON:-Command blocked by pre-bash-guard}"
|
|
21
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"decision":"deny","reason":"[doflow] shared hooks lack the bridge; run: doflow update -t gemini"}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge gemini BeforeTool pre-bash-guard
|
|
10
|
+
exit $?
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Gemini front door:
|
|
3
|
-
# Canonical Policy Library, then translates it into Gemini's verified deny
|
|
4
|
-
# contract.
|
|
5
|
-
#
|
|
6
|
-
# Gemini's hook output schema (packages/core/src/hooks/types.ts, confirmed this
|
|
7
|
-
# session) is a top-level {"decision": "deny", "reason": "..."} — NOT nested
|
|
8
|
-
# under hookSpecificOutput.permissionDecision like Claude/Codex. Exit code alone
|
|
9
|
-
# is not sufficient here, so this front door is a translator, not a bare exec
|
|
10
|
-
# (unlike session-context, which never needs this translation).
|
|
2
|
+
# Gemini front door: pre-implementation-gate through the shared lifecycle bridge.
|
|
11
3
|
set -uo pipefail
|
|
12
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-gemini}"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
CODE=$?
|
|
20
|
-
|
|
21
|
-
[ "$CODE" -ne 0 ] && emit_pretooluse_deny_flat "${REASON:-Implementation requires an approved plan.md}"
|
|
22
|
-
exit 0
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then
|
|
6
|
+
printf '%s\n' '{"decision":"deny","reason":"[doflow] shared hooks lack the bridge; run: doflow update -t gemini"}'
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
doflow_bridge gemini BeforeTool pre-implementation-gate
|
|
10
|
+
exit $?
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Gemini
|
|
3
|
-
set -
|
|
2
|
+
# Gemini front door: session-context through the shared lifecycle bridge.
|
|
3
|
+
set -uo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-gemini}"
|
|
5
|
-
|
|
5
|
+
if ! . "$(dirname "$0")/../../.doflow/shared/hooks/bridge/bridge.sh" 2>/dev/null; then exit 0; fi
|
|
6
|
+
doflow_bridge gemini SessionStart session-context
|
|
7
|
+
exit $?
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Kiro
|
|
2
|
+
# Kiro front door: mcp-tool-guard through the shared lifecycle bridge.
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-kiro}"
|
|
5
|
+
here="$(dirname "$0")"
|
|
5
6
|
# shellcheck source=lib.sh
|
|
6
|
-
source "$
|
|
7
|
-
|
|
8
|
-
payload=$(kiro_bridge_payload)
|
|
9
|
-
|
|
7
|
+
source "$here/lib.sh"
|
|
8
|
+
raw=$(cat)
|
|
9
|
+
payload=$(kiro_bridge_payload <<<"$raw")
|
|
10
|
+
event="PreToolUse"
|
|
11
|
+
if command -v jq >/dev/null 2>&1; then event=$(printf '%s' "$raw" | jq -r '.hook_event_name // "PreToolUse"' 2>/dev/null) || event="PreToolUse"; fi
|
|
12
|
+
bridge="$here/../../.doflow/shared/hooks/bridge/bridge.sh"
|
|
13
|
+
if [ ! -f "$bridge" ]; then
|
|
14
|
+
printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2
|
|
15
|
+
exit 2
|
|
16
|
+
fi
|
|
17
|
+
. "$bridge" 2>/dev/null || { printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2; exit 2; }
|
|
18
|
+
if doflow_bridge kiro "$event" mcp-tool-guard <<<"$payload"; then
|
|
19
|
+
status=0
|
|
20
|
+
else
|
|
21
|
+
status=$?
|
|
22
|
+
fi
|
|
23
|
+
if [ "$status" -eq 2 ]; then printf '\n' >&2; fi
|
|
24
|
+
exit "$status"
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Kiro
|
|
2
|
+
# Kiro front door: pre-bash-guard through the shared lifecycle bridge.
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-kiro}"
|
|
5
|
+
here="$(dirname "$0")"
|
|
5
6
|
# shellcheck source=lib.sh
|
|
6
|
-
source "$
|
|
7
|
-
|
|
8
|
-
payload=$(kiro_bridge_payload)
|
|
9
|
-
|
|
7
|
+
source "$here/lib.sh"
|
|
8
|
+
raw=$(cat)
|
|
9
|
+
payload=$(kiro_bridge_payload <<<"$raw")
|
|
10
|
+
event="PreToolUse"
|
|
11
|
+
if command -v jq >/dev/null 2>&1; then event=$(printf '%s' "$raw" | jq -r '.hook_event_name // "PreToolUse"' 2>/dev/null) || event="PreToolUse"; fi
|
|
12
|
+
bridge="$here/../../.doflow/shared/hooks/bridge/bridge.sh"
|
|
13
|
+
if [ ! -f "$bridge" ]; then
|
|
14
|
+
printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2
|
|
15
|
+
exit 2
|
|
16
|
+
fi
|
|
17
|
+
. "$bridge" 2>/dev/null || { printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2; exit 2; }
|
|
18
|
+
if doflow_bridge kiro "$event" pre-bash-guard <<<"$payload"; then
|
|
19
|
+
status=0
|
|
20
|
+
else
|
|
21
|
+
status=$?
|
|
22
|
+
fi
|
|
23
|
+
if [ "$status" -eq 2 ]; then printf '\n' >&2; fi
|
|
24
|
+
exit "$status"
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Kiro
|
|
2
|
+
# Kiro front door: pre-implementation-gate through the shared lifecycle bridge.
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-kiro}"
|
|
5
|
+
here="$(dirname "$0")"
|
|
5
6
|
# shellcheck source=lib.sh
|
|
6
|
-
source "$
|
|
7
|
-
|
|
8
|
-
payload=$(kiro_bridge_payload)
|
|
9
|
-
|
|
7
|
+
source "$here/lib.sh"
|
|
8
|
+
raw=$(cat)
|
|
9
|
+
payload=$(kiro_bridge_payload <<<"$raw")
|
|
10
|
+
event="PreToolUse"
|
|
11
|
+
if command -v jq >/dev/null 2>&1; then event=$(printf '%s' "$raw" | jq -r '.hook_event_name // "PreToolUse"' 2>/dev/null) || event="PreToolUse"; fi
|
|
12
|
+
bridge="$here/../../.doflow/shared/hooks/bridge/bridge.sh"
|
|
13
|
+
if [ ! -f "$bridge" ]; then
|
|
14
|
+
printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2
|
|
15
|
+
exit 2
|
|
16
|
+
fi
|
|
17
|
+
. "$bridge" 2>/dev/null || { printf '%s\n' '[doflow] shared hooks lack the bridge; run: doflow update -t kiro' >&2; exit 2; }
|
|
18
|
+
if doflow_bridge kiro "$event" pre-implementation-gate <<<"$payload"; then
|
|
19
|
+
status=0
|
|
20
|
+
else
|
|
21
|
+
status=$?
|
|
22
|
+
fi
|
|
23
|
+
if [ "$status" -eq 2 ]; then printf '\n' >&2; fi
|
|
24
|
+
exit "$status"
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Kiro
|
|
2
|
+
# Kiro front door: session-context through the shared lifecycle bridge.
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
export DOFLOW_AGENT="${DOFLOW_AGENT:-kiro}"
|
|
5
|
+
here="$(dirname "$0")"
|
|
5
6
|
# shellcheck source=lib.sh
|
|
6
|
-
source "$
|
|
7
|
-
|
|
8
|
-
payload=$(kiro_bridge_payload)
|
|
9
|
-
|
|
7
|
+
source "$here/lib.sh"
|
|
8
|
+
raw=$(cat)
|
|
9
|
+
payload=$(kiro_bridge_payload <<<"$raw")
|
|
10
|
+
event="SessionStart"
|
|
11
|
+
if command -v jq >/dev/null 2>&1; then event=$(printf '%s' "$raw" | jq -r '.hook_event_name // "SessionStart"' 2>/dev/null) || event="SessionStart"; fi
|
|
12
|
+
bridge="$here/../../.doflow/shared/hooks/bridge/bridge.sh"
|
|
13
|
+
if [ ! -f "$bridge" ]; then exit 0; fi
|
|
14
|
+
. "$bridge" 2>/dev/null || exit 0
|
|
15
|
+
doflow_bridge kiro "$event" session-context <<<"$payload"
|