patchwork-os 0.2.0-beta.1 → 0.2.0-beta.10.canary.95
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.bridge.md +14 -14
- package/README.md +201 -34
- package/deploy/README.md +1 -1
- package/deploy/bootstrap-vps.sh +14 -9
- package/deploy/deploy-dashboard.sh +25 -1
- package/deploy/macos/README.md +153 -0
- package/deploy/macos/com.patchwork.bridge.plist.template +54 -0
- package/deploy/macos/com.patchwork.tunnel.plist.template +76 -0
- package/deploy/macos/install-mac-bridge.sh +244 -0
- package/deploy/macos/uninstall-mac-bridge.sh +22 -0
- package/dist/activityLog.d.ts +6 -0
- package/dist/activityLog.js +63 -26
- package/dist/activityLog.js.map +1 -1
- package/dist/adapters/claude.js +22 -16
- package/dist/adapters/claude.js.map +1 -1
- package/dist/adapters/gemini.js +15 -11
- package/dist/adapters/gemini.js.map +1 -1
- package/dist/adapters/openai.js +9 -9
- package/dist/adapters/openai.js.map +1 -1
- package/dist/ajv2020.d.ts +25 -0
- package/dist/ajv2020.js +33 -0
- package/dist/ajv2020.js.map +1 -0
- package/dist/analyticsAggregator.js +1 -1
- package/dist/analyticsAggregator.js.map +1 -1
- package/dist/analyticsConfig.d.ts +29 -0
- package/dist/analyticsConfig.js +102 -0
- package/dist/analyticsConfig.js.map +1 -0
- package/dist/analyticsPrefs.d.ts +38 -2
- package/dist/analyticsPrefs.js +148 -23
- package/dist/analyticsPrefs.js.map +1 -1
- package/dist/analyticsSend.d.ts +17 -1
- package/dist/analyticsSend.js +67 -5
- package/dist/analyticsSend.js.map +1 -1
- package/dist/approvalHttp.d.ts +14 -0
- package/dist/approvalHttp.js +212 -9
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalInsights.js +13 -5
- package/dist/approvalInsights.js.map +1 -1
- package/dist/approvalQueue.d.ts +97 -3
- package/dist/approvalQueue.js +193 -19
- package/dist/approvalQueue.js.map +1 -1
- package/dist/approvalSignals.js +19 -11
- package/dist/approvalSignals.js.map +1 -1
- package/dist/automation.d.ts +35 -10
- package/dist/automation.js +133 -37
- package/dist/automation.js.map +1 -1
- package/dist/automationSuggestions.js +10 -8
- package/dist/automationSuggestions.js.map +1 -1
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.js +202 -25
- package/dist/bridge.js.map +1 -1
- package/dist/bridgeLockDiscovery.d.ts +27 -1
- package/dist/bridgeLockDiscovery.js +38 -11
- package/dist/bridgeLockDiscovery.js.map +1 -1
- package/dist/bridgeToken.js +3 -2
- package/dist/bridgeToken.js.map +1 -1
- package/dist/claudeDriver.js +23 -8
- package/dist/claudeDriver.js.map +1 -1
- package/dist/claudeOrchestrator.d.ts +1 -1
- package/dist/claudeOrchestrator.js +87 -44
- package/dist/claudeOrchestrator.js.map +1 -1
- package/dist/commands/analytics.d.ts +8 -0
- package/dist/commands/analytics.js +134 -0
- package/dist/commands/analytics.js.map +1 -0
- package/dist/commands/auditEnv.d.ts +36 -0
- package/dist/commands/auditEnv.js +202 -0
- package/dist/commands/auditEnv.js.map +1 -0
- package/dist/commands/dashboard.js +8 -1
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/doctor.d.ts +35 -0
- package/dist/commands/doctor.js +51 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/install.js +3 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/launchd.js +15 -16
- package/dist/commands/launchd.js.map +1 -1
- package/dist/commands/patchworkInit.d.ts +5 -0
- package/dist/commands/patchworkInit.js +89 -7
- package/dist/commands/patchworkInit.js.map +1 -1
- package/dist/commands/recipe.d.ts +110 -0
- package/dist/commands/recipe.js +512 -9
- package/dist/commands/recipe.js.map +1 -1
- package/dist/commands/recipeInstall.js +11 -4
- package/dist/commands/recipeInstall.js.map +1 -1
- package/dist/commands/shadowScan.d.ts +34 -0
- package/dist/commands/shadowScan.js +142 -0
- package/dist/commands/shadowScan.js.map +1 -0
- package/dist/commands/task.js +2 -2
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tools.d.ts +20 -1
- package/dist/commands/tools.js +112 -3
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/tracesImport.js +21 -4
- package/dist/commands/tracesImport.js.map +1 -1
- package/dist/commitIssueLinkLog.d.ts +16 -0
- package/dist/commitIssueLinkLog.js +110 -24
- package/dist/commitIssueLinkLog.js.map +1 -1
- package/dist/companions/registry.js +15 -7
- package/dist/companions/registry.js.map +1 -1
- package/dist/config.d.ts +47 -3
- package/dist/config.js +111 -21
- package/dist/config.js.map +1 -1
- package/dist/connectorRoutes.js +866 -57
- package/dist/connectorRoutes.js.map +1 -1
- package/dist/connectors/airtable.d.ts +230 -0
- package/dist/connectors/airtable.js +700 -0
- package/dist/connectors/airtable.js.map +1 -0
- package/dist/connectors/asana.js +13 -9
- package/dist/connectors/asana.js.map +1 -1
- package/dist/connectors/baseConnector.js +25 -3
- package/dist/connectors/baseConnector.js.map +1 -1
- package/dist/connectors/caldiy.d.ts +137 -0
- package/dist/connectors/caldiy.js +424 -0
- package/dist/connectors/caldiy.js.map +1 -0
- package/dist/connectors/circleci.d.ts +162 -0
- package/dist/connectors/circleci.js +576 -0
- package/dist/connectors/circleci.js.map +1 -0
- package/dist/connectors/cloudflare.d.ts +132 -0
- package/dist/connectors/cloudflare.js +622 -0
- package/dist/connectors/cloudflare.js.map +1 -0
- package/dist/connectors/confluence.js +35 -0
- package/dist/connectors/confluence.js.map +1 -1
- package/dist/connectors/connectorRedirectUri.d.ts +30 -0
- package/dist/connectors/connectorRedirectUri.js +38 -0
- package/dist/connectors/connectorRedirectUri.js.map +1 -0
- package/dist/connectors/connectorRegistry.d.ts +63 -0
- package/dist/connectors/connectorRegistry.js +354 -0
- package/dist/connectors/connectorRegistry.js.map +1 -0
- package/dist/connectors/datadog.js +33 -4
- package/dist/connectors/datadog.js.map +1 -1
- package/dist/connectors/discord.js +14 -10
- package/dist/connectors/discord.js.map +1 -1
- package/dist/connectors/elasticsearch.d.ts +141 -0
- package/dist/connectors/elasticsearch.js +601 -0
- package/dist/connectors/elasticsearch.js.map +1 -0
- package/dist/connectors/figma.d.ts +130 -0
- package/dist/connectors/figma.js +387 -0
- package/dist/connectors/figma.js.map +1 -0
- package/dist/connectors/github.d.ts +17 -0
- package/dist/connectors/github.js +53 -2
- package/dist/connectors/github.js.map +1 -1
- package/dist/connectors/gitlab.js +12 -6
- package/dist/connectors/gitlab.js.map +1 -1
- package/dist/connectors/gmail.js +72 -21
- package/dist/connectors/gmail.js.map +1 -1
- package/dist/connectors/googleCalendar.js +8 -8
- package/dist/connectors/googleCalendar.js.map +1 -1
- package/dist/connectors/googleDocs.d.ts +103 -0
- package/dist/connectors/googleDocs.js +409 -0
- package/dist/connectors/googleDocs.js.map +1 -0
- package/dist/connectors/googleDrive.d.ts +12 -0
- package/dist/connectors/googleDrive.js +35 -8
- package/dist/connectors/googleDrive.js.map +1 -1
- package/dist/connectors/grafana.d.ts +133 -0
- package/dist/connectors/grafana.js +478 -0
- package/dist/connectors/grafana.js.map +1 -0
- package/dist/connectors/jira.d.ts +25 -0
- package/dist/connectors/jira.js +227 -1
- package/dist/connectors/jira.js.map +1 -1
- package/dist/connectors/linear.js +1 -1
- package/dist/connectors/linear.js.map +1 -1
- package/dist/connectors/mcpOAuth.js +78 -16
- package/dist/connectors/mcpOAuth.js.map +1 -1
- package/dist/connectors/monday.d.ts +217 -0
- package/dist/connectors/monday.js +655 -0
- package/dist/connectors/monday.js.map +1 -0
- package/dist/connectors/mongodb.d.ts +139 -0
- package/dist/connectors/mongodb.js +455 -0
- package/dist/connectors/mongodb.js.map +1 -0
- package/dist/connectors/oauthStateStore.d.ts +20 -0
- package/dist/connectors/oauthStateStore.js +94 -4
- package/dist/connectors/oauthStateStore.js.map +1 -1
- package/dist/connectors/obsidian.d.ts +83 -0
- package/dist/connectors/obsidian.js +441 -0
- package/dist/connectors/obsidian.js.map +1 -0
- package/dist/connectors/paystack.d.ts +159 -0
- package/dist/connectors/paystack.js +607 -0
- package/dist/connectors/paystack.js.map +1 -0
- package/dist/connectors/pipedrive.d.ts +189 -0
- package/dist/connectors/pipedrive.js +559 -0
- package/dist/connectors/pipedrive.js.map +1 -0
- package/dist/connectors/postgres.d.ts +127 -0
- package/dist/connectors/postgres.js +512 -0
- package/dist/connectors/postgres.js.map +1 -0
- package/dist/connectors/posthog.d.ts +119 -0
- package/dist/connectors/posthog.js +479 -0
- package/dist/connectors/posthog.js.map +1 -0
- package/dist/connectors/redis.d.ts +140 -0
- package/dist/connectors/redis.js +571 -0
- package/dist/connectors/redis.js.map +1 -0
- package/dist/connectors/resend.d.ts +131 -0
- package/dist/connectors/resend.js +529 -0
- package/dist/connectors/resend.js.map +1 -0
- package/dist/connectors/salesforce.d.ts +136 -0
- package/dist/connectors/salesforce.js +603 -0
- package/dist/connectors/salesforce.js.map +1 -0
- package/dist/connectors/secrets.d.ts +51 -0
- package/dist/connectors/secrets.js +102 -0
- package/dist/connectors/secrets.js.map +1 -0
- package/dist/connectors/sendgrid.d.ts +102 -0
- package/dist/connectors/sendgrid.js +423 -0
- package/dist/connectors/sendgrid.js.map +1 -0
- package/dist/connectors/shopify.d.ts +145 -0
- package/dist/connectors/shopify.js +502 -0
- package/dist/connectors/shopify.js.map +1 -0
- package/dist/connectors/slack.d.ts +1 -1
- package/dist/connectors/slack.js +61 -9
- package/dist/connectors/slack.js.map +1 -1
- package/dist/connectors/snowflake.d.ts +119 -0
- package/dist/connectors/snowflake.js +615 -0
- package/dist/connectors/snowflake.js.map +1 -0
- package/dist/connectors/supabase.d.ts +92 -0
- package/dist/connectors/supabase.js +630 -0
- package/dist/connectors/supabase.js.map +1 -0
- package/dist/connectors/todoist.d.ts +117 -0
- package/dist/connectors/todoist.js +485 -0
- package/dist/connectors/todoist.js.map +1 -0
- package/dist/connectors/tokenStorage.js +56 -14
- package/dist/connectors/tokenStorage.js.map +1 -1
- package/dist/connectors/twilio.d.ts +118 -0
- package/dist/connectors/twilio.js +475 -0
- package/dist/connectors/twilio.js.map +1 -0
- package/dist/connectors/vercel.d.ts +110 -0
- package/dist/connectors/vercel.js +479 -0
- package/dist/connectors/vercel.js.map +1 -0
- package/dist/connectors/webflow.d.ts +118 -0
- package/dist/connectors/webflow.js +393 -0
- package/dist/connectors/webflow.js.map +1 -0
- package/dist/connectors/woocommerce.d.ts +220 -0
- package/dist/connectors/woocommerce.js +464 -0
- package/dist/connectors/woocommerce.js.map +1 -0
- package/dist/crypto.js +7 -2
- package/dist/crypto.js.map +1 -1
- package/dist/decisionReplay.js +15 -6
- package/dist/decisionReplay.js.map +1 -1
- package/dist/decisionTraceLog.d.ts +28 -0
- package/dist/decisionTraceLog.js +156 -29
- package/dist/decisionTraceLog.js.map +1 -1
- package/dist/drivers/claude/api.js +5 -4
- package/dist/drivers/claude/api.js.map +1 -1
- package/dist/drivers/claude/envSanitizer.d.ts +0 -6
- package/dist/drivers/claude/envSanitizer.js +17 -2
- package/dist/drivers/claude/envSanitizer.js.map +1 -1
- package/dist/drivers/claude/streamParser.js +5 -4
- package/dist/drivers/claude/streamParser.js.map +1 -1
- package/dist/drivers/claude/subprocess.js +22 -3
- package/dist/drivers/claude/subprocess.js.map +1 -1
- package/dist/drivers/gemini/index.d.ts +22 -0
- package/dist/drivers/gemini/index.js +256 -129
- package/dist/drivers/gemini/index.js.map +1 -1
- package/dist/drivers/local/index.d.ts +17 -0
- package/dist/drivers/local/index.js +99 -0
- package/dist/drivers/local/index.js.map +1 -1
- package/dist/drivers/openai/index.js +30 -2
- package/dist/drivers/openai/index.js.map +1 -1
- package/dist/extensionClient.d.ts +37 -4
- package/dist/extensionClient.js +58 -16
- package/dist/extensionClient.js.map +1 -1
- package/dist/featureFlags.d.ts +91 -0
- package/dist/featureFlags.js +174 -3
- package/dist/featureFlags.js.map +1 -1
- package/dist/fileLock.js +21 -12
- package/dist/fileLock.js.map +1 -1
- package/dist/fileLockSync.d.ts +67 -0
- package/dist/fileLockSync.js +126 -0
- package/dist/fileLockSync.js.map +1 -0
- package/dist/fp/activityAnalytics.js +26 -12
- package/dist/fp/activityAnalytics.js.map +1 -1
- package/dist/fp/automationInterpreter.d.ts +15 -1
- package/dist/fp/automationInterpreter.js +217 -82
- package/dist/fp/automationInterpreter.js.map +1 -1
- package/dist/fp/automationProgram.d.ts +30 -0
- package/dist/fp/automationProgram.js.map +1 -1
- package/dist/fp/automationState.d.ts +24 -5
- package/dist/fp/automationState.js +56 -9
- package/dist/fp/automationState.js.map +1 -1
- package/dist/fp/automationUtils.js +1 -1
- package/dist/fp/automationUtils.js.map +1 -1
- package/dist/fp/commandDescription.js +7 -1
- package/dist/fp/commandDescription.js.map +1 -1
- package/dist/fp/extensionSnapshot.js +8 -2
- package/dist/fp/extensionSnapshot.js.map +1 -1
- package/dist/fp/interpreterContext.d.ts +66 -1
- package/dist/fp/interpreterContext.js +91 -1
- package/dist/fp/interpreterContext.js.map +1 -1
- package/dist/fp/policyParser.js +29 -1
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/fsWatchWithFallback.d.ts +36 -0
- package/dist/fsWatchWithFallback.js +128 -0
- package/dist/fsWatchWithFallback.js.map +1 -0
- package/dist/haltPushDispatch.d.ts +33 -0
- package/dist/haltPushDispatch.js +103 -0
- package/dist/haltPushDispatch.js.map +1 -0
- package/dist/httpBodyValidation.d.ts +41 -0
- package/dist/httpBodyValidation.js +45 -0
- package/dist/httpBodyValidation.js.map +1 -0
- package/dist/inboxRoutes.d.ts +22 -0
- package/dist/inboxRoutes.js +61 -1
- package/dist/inboxRoutes.js.map +1 -1
- package/dist/index.js +1053 -76
- package/dist/index.js.map +1 -1
- package/dist/installGuard.js +6 -2
- package/dist/installGuard.js.map +1 -1
- package/dist/lockfile.js +31 -4
- package/dist/lockfile.js.map +1 -1
- package/dist/oauth.d.ts +9 -0
- package/dist/oauth.js +33 -0
- package/dist/oauth.js.map +1 -1
- package/dist/oauthRoutes.d.ts +1 -1
- package/dist/oauthRoutes.js +5 -3
- package/dist/oauthRoutes.js.map +1 -1
- package/dist/orchestrator/childBridgeRegistry.js +29 -11
- package/dist/orchestrator/childBridgeRegistry.js.map +1 -1
- package/dist/patchworkConfig.d.ts +44 -1
- package/dist/patchworkConfig.js +28 -3
- package/dist/patchworkConfig.js.map +1 -1
- package/dist/pluginLoader.js +10 -1
- package/dist/pluginLoader.js.map +1 -1
- package/dist/pluginWatcher.js +12 -14
- package/dist/pluginWatcher.js.map +1 -1
- package/dist/preToolUseHook.js +3 -2
- package/dist/preToolUseHook.js.map +1 -1
- package/dist/processTree.d.ts +34 -0
- package/dist/processTree.js +105 -0
- package/dist/processTree.js.map +1 -0
- package/dist/prompts.js +3 -3
- package/dist/prompts.js.map +1 -1
- package/dist/recipeOrchestration.d.ts +9 -0
- package/dist/recipeOrchestration.js +341 -24
- package/dist/recipeOrchestration.js.map +1 -1
- package/dist/recipeRoutes.d.ts +58 -2
- package/dist/recipeRoutes.js +744 -115
- package/dist/recipeRoutes.js.map +1 -1
- package/dist/recipes/RecipeOrchestrator.d.ts +2 -0
- package/dist/recipes/RecipeOrchestrator.js +6 -1
- package/dist/recipes/RecipeOrchestrator.js.map +1 -1
- package/dist/recipes/agentExecutor.d.ts +25 -5
- package/dist/recipes/agentExecutor.js.map +1 -1
- package/dist/recipes/chainedRunner.d.ts +2 -0
- package/dist/recipes/chainedRunner.js +142 -5
- package/dist/recipes/chainedRunner.js.map +1 -1
- package/dist/recipes/connectorPreflight.d.ts +66 -0
- package/dist/recipes/connectorPreflight.js +169 -0
- package/dist/recipes/connectorPreflight.js.map +1 -0
- package/dist/recipes/dependencyGraph.js +13 -5
- package/dist/recipes/dependencyGraph.js.map +1 -1
- package/dist/recipes/githubInstallSource.d.ts +128 -0
- package/dist/recipes/githubInstallSource.js +206 -0
- package/dist/recipes/githubInstallSource.js.map +1 -0
- package/dist/recipes/haltCategory.d.ts +119 -0
- package/dist/recipes/haltCategory.js +188 -0
- package/dist/recipes/haltCategory.js.map +1 -0
- package/dist/recipes/idempotencyKey.d.ts +134 -0
- package/dist/recipes/idempotencyKey.js +322 -0
- package/dist/recipes/idempotencyKey.js.map +1 -0
- package/dist/recipes/installer.js +48 -2
- package/dist/recipes/installer.js.map +1 -1
- package/dist/recipes/judgeSummary.d.ts +50 -0
- package/dist/recipes/judgeSummary.js +47 -0
- package/dist/recipes/judgeSummary.js.map +1 -0
- package/dist/recipes/judgeVerdict.d.ts +48 -0
- package/dist/recipes/judgeVerdict.js +174 -0
- package/dist/recipes/judgeVerdict.js.map +1 -0
- package/dist/recipes/migrations/index.d.ts +9 -0
- package/dist/recipes/migrations/index.js +133 -0
- package/dist/recipes/migrations/index.js.map +1 -1
- package/dist/recipes/names.d.ts +20 -0
- package/dist/recipes/names.js +25 -0
- package/dist/recipes/names.js.map +1 -1
- package/dist/recipes/parser.js +88 -5
- package/dist/recipes/parser.js.map +1 -1
- package/dist/recipes/replayRun.js +1 -1
- package/dist/recipes/replayRun.js.map +1 -1
- package/dist/recipes/runBudget.d.ts +70 -0
- package/dist/recipes/runBudget.js +109 -0
- package/dist/recipes/runBudget.js.map +1 -0
- package/dist/recipes/scheduler.d.ts +30 -0
- package/dist/recipes/scheduler.js +69 -19
- package/dist/recipes/scheduler.js.map +1 -1
- package/dist/recipes/schema.d.ts +36 -0
- package/dist/recipes/schemaGenerator.js +103 -5
- package/dist/recipes/schemaGenerator.js.map +1 -1
- package/dist/recipes/stepObservation.js +9 -0
- package/dist/recipes/stepObservation.js.map +1 -1
- package/dist/recipes/toolRegistry.js +20 -3
- package/dist/recipes/toolRegistry.js.map +1 -1
- package/dist/recipes/tools/fanOut.d.ts +20 -0
- package/dist/recipes/tools/fanOut.js +199 -0
- package/dist/recipes/tools/fanOut.js.map +1 -0
- package/dist/recipes/tools/file.js +5 -2
- package/dist/recipes/tools/file.js.map +1 -1
- package/dist/recipes/tools/github.d.ts +1 -1
- package/dist/recipes/tools/github.js +75 -1
- package/dist/recipes/tools/github.js.map +1 -1
- package/dist/recipes/tools/gmail.js +27 -5
- package/dist/recipes/tools/gmail.js.map +1 -1
- package/dist/recipes/tools/googleDrive.js +64 -0
- package/dist/recipes/tools/googleDrive.js.map +1 -1
- package/dist/recipes/tools/http.d.ts +10 -0
- package/dist/recipes/tools/http.js +176 -0
- package/dist/recipes/tools/http.js.map +1 -0
- package/dist/recipes/tools/index.d.ts +2 -0
- package/dist/recipes/tools/index.js +2 -0
- package/dist/recipes/tools/index.js.map +1 -1
- package/dist/recipes/tools/slack.js +1 -1
- package/dist/recipes/validation.d.ts +17 -0
- package/dist/recipes/validation.js +29 -11
- package/dist/recipes/validation.js.map +1 -1
- package/dist/recipes/workspaceRoot.d.ts +37 -0
- package/dist/recipes/workspaceRoot.js +73 -0
- package/dist/recipes/workspaceRoot.js.map +1 -0
- package/dist/recipes/yamlPositions.d.ts +56 -0
- package/dist/recipes/yamlPositions.js +183 -0
- package/dist/recipes/yamlPositions.js.map +1 -0
- package/dist/recipes/yamlRunner.d.ts +182 -8
- package/dist/recipes/yamlRunner.js +877 -217
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +19 -3
- package/dist/recipesHttp.js +67 -11
- package/dist/recipesHttp.js.map +1 -1
- package/dist/resources.js +21 -13
- package/dist/resources.js.map +1 -1
- package/dist/runLog.d.ts +58 -5
- package/dist/runLog.js +98 -21
- package/dist/runLog.js.map +1 -1
- package/dist/sanitizeParsedJson.d.ts +39 -0
- package/dist/sanitizeParsedJson.js +55 -0
- package/dist/sanitizeParsedJson.js.map +1 -0
- package/dist/schemas/recipe.v1.json +885 -196
- package/dist/server.d.ts +160 -3
- package/dist/server.js +1099 -122
- package/dist/server.js.map +1 -1
- package/dist/sessionCheckpoint.d.ts +8 -0
- package/dist/sessionCheckpoint.js +33 -3
- package/dist/sessionCheckpoint.js.map +1 -1
- package/dist/ssrfGuard.d.ts +16 -0
- package/dist/ssrfGuard.js +87 -4
- package/dist/ssrfGuard.js.map +1 -1
- package/dist/streamableHttp.d.ts +9 -4
- package/dist/streamableHttp.js +76 -20
- package/dist/streamableHttp.js.map +1 -1
- package/dist/telemetry.js +19 -12
- package/dist/telemetry.js.map +1 -1
- package/dist/testing/shadowRun.d.ts +52 -0
- package/dist/testing/shadowRun.js +71 -0
- package/dist/testing/shadowRun.js.map +1 -0
- package/dist/tools/batchLsp.d.ts +3 -0
- package/dist/tools/bridgeDoctor.d.ts +11 -0
- package/dist/tools/bridgeDoctor.js +48 -2
- package/dist/tools/bridgeDoctor.js.map +1 -1
- package/dist/tools/bridgeStatus.d.ts +0 -12
- package/dist/tools/bridgeStatus.js +2 -28
- package/dist/tools/bridgeStatus.js.map +1 -1
- package/dist/tools/cancelClaudeTask.d.ts +1 -0
- package/dist/tools/clipboard.d.ts +2 -0
- package/dist/tools/closeTabs.d.ts +1 -0
- package/dist/tools/codeLens.d.ts +1 -0
- package/dist/tools/createIssueFromAIComment.d.ts +1 -0
- package/dist/tools/ctxGetTaskContext.d.ts +9 -0
- package/dist/tools/ctxGetTaskContext.js +50 -2
- package/dist/tools/ctxGetTaskContext.js.map +1 -1
- package/dist/tools/ctxQueryTraces.js +32 -24
- package/dist/tools/ctxQueryTraces.js.map +1 -1
- package/dist/tools/ctxSaveTrace.d.ts +1 -0
- package/dist/tools/debug.d.ts +4 -0
- package/dist/tools/decorations.d.ts +2 -0
- package/dist/tools/detectUnusedCode.js +9 -7
- package/dist/tools/detectUnusedCode.js.map +1 -1
- package/dist/tools/documentLinks.d.ts +1 -0
- package/dist/tools/editText.d.ts +1 -0
- package/dist/tools/editText.js +2 -1
- package/dist/tools/editText.js.map +1 -1
- package/dist/tools/enrichCommit.d.ts +1 -0
- package/dist/tools/enrichStackTrace.js +11 -5
- package/dist/tools/enrichStackTrace.js.map +1 -1
- package/dist/tools/explainDiagnostic.d.ts +1 -0
- package/dist/tools/explainSymbol.d.ts +1 -0
- package/dist/tools/fileOperations.d.ts +3 -0
- package/dist/tools/fileOperations.js +2 -1
- package/dist/tools/fileOperations.js.map +1 -1
- package/dist/tools/fileWatcher.d.ts +2 -0
- package/dist/tools/fileWatcher.js +8 -2
- package/dist/tools/fileWatcher.js.map +1 -1
- package/dist/tools/findFiles.d.ts +1 -0
- package/dist/tools/fixAllLintErrors.d.ts +1 -0
- package/dist/tools/fixAllLintErrors.js +10 -5
- package/dist/tools/fixAllLintErrors.js.map +1 -1
- package/dist/tools/foldingRanges.d.ts +1 -0
- package/dist/tools/formatDocument.d.ts +1 -0
- package/dist/tools/formatDocument.js +10 -5
- package/dist/tools/formatDocument.js.map +1 -1
- package/dist/tools/generateTests.d.ts +1 -0
- package/dist/tools/getAIComments.d.ts +1 -0
- package/dist/tools/getAnalyticsReport.js +5 -1
- package/dist/tools/getAnalyticsReport.js.map +1 -1
- package/dist/tools/getBufferContent.d.ts +1 -0
- package/dist/tools/getChangeImpact.d.ts +1 -0
- package/dist/tools/getChangeImpact.js +23 -14
- package/dist/tools/getChangeImpact.js.map +1 -1
- package/dist/tools/getClaudeTaskStatus.d.ts +1 -0
- package/dist/tools/getCodeCoverage.d.ts +1 -0
- package/dist/tools/getCodeCoverage.js +32 -14
- package/dist/tools/getCodeCoverage.js.map +1 -1
- package/dist/tools/getCommitsForIssue.d.ts +1 -0
- package/dist/tools/getDebugState.d.ts +1 -0
- package/dist/tools/getDiagnostics.js +32 -29
- package/dist/tools/getDiagnostics.js.map +1 -1
- package/dist/tools/getDiffFromHandoff.js +8 -2
- package/dist/tools/getDiffFromHandoff.js.map +1 -1
- package/dist/tools/getDocumentSymbols.d.ts +1 -0
- package/dist/tools/getGitHotspots.d.ts +1 -0
- package/dist/tools/getImportedSignatures.d.ts +1 -0
- package/dist/tools/getImportedSignatures.js +18 -14
- package/dist/tools/getImportedSignatures.js.map +1 -1
- package/dist/tools/getPRTemplate.d.ts +1 -0
- package/dist/tools/getProjectContext.js +23 -10
- package/dist/tools/getProjectContext.js.map +1 -1
- package/dist/tools/getSymbolHistory.d.ts +1 -0
- package/dist/tools/getToolCapabilities.d.ts +10 -5
- package/dist/tools/getToolCapabilities.js +79 -202
- package/dist/tools/getToolCapabilities.js.map +1 -1
- package/dist/tools/getTypeSignature.d.ts +1 -0
- package/dist/tools/getWorkspaceSettings.d.ts +1 -0
- package/dist/tools/gitWrite.d.ts +11 -0
- package/dist/tools/github/actions.d.ts +2 -0
- package/dist/tools/github/composite.d.ts +3 -0
- package/dist/tools/github/issues.d.ts +4 -0
- package/dist/tools/github/pr.d.ts +7 -0
- package/dist/tools/handoffNote.d.ts +1 -0
- package/dist/tools/handoffNote.js +2 -1
- package/dist/tools/handoffNote.js.map +1 -1
- package/dist/tools/headless/lspClient.js +3 -0
- package/dist/tools/headless/lspClient.js.map +1 -1
- package/dist/tools/hoverAtCursor.d.ts +1 -0
- package/dist/tools/httpClient.d.ts +2 -0
- package/dist/tools/httpClient.js +38 -71
- package/dist/tools/httpClient.js.map +1 -1
- package/dist/tools/inlayHints.d.ts +1 -0
- package/dist/tools/launchQuickTask.d.ts +1 -0
- package/dist/tools/listClaudeTasks.d.ts +1 -0
- package/dist/tools/listClaudeTasks.js +10 -8
- package/dist/tools/listClaudeTasks.js.map +1 -1
- package/dist/tools/listTerminals.d.ts +1 -0
- package/dist/tools/lsp.d.ts +15 -0
- package/dist/tools/lsp.js +17 -0
- package/dist/tools/lsp.js.map +1 -1
- package/dist/tools/navigateToSymbolByName.d.ts +1 -0
- package/dist/tools/openDiff.d.ts +1 -0
- package/dist/tools/openDiff.js +4 -1
- package/dist/tools/openDiff.js.map +1 -1
- package/dist/tools/openFile.d.ts +1 -0
- package/dist/tools/openFile.js +4 -1
- package/dist/tools/openFile.js.map +1 -1
- package/dist/tools/openInBrowser.js +6 -1
- package/dist/tools/openInBrowser.js.map +1 -1
- package/dist/tools/organizeImports.d.ts +1 -0
- package/dist/tools/organizeImports.js +5 -3
- package/dist/tools/organizeImports.js.map +1 -1
- package/dist/tools/performanceReport.js +5 -3
- package/dist/tools/performanceReport.js.map +1 -1
- package/dist/tools/planPersistence.d.ts +3 -0
- package/dist/tools/planPersistence.js +4 -1
- package/dist/tools/planPersistence.js.map +1 -1
- package/dist/tools/previewEdit.d.ts +1 -0
- package/dist/tools/previewEdit.js +15 -4
- package/dist/tools/previewEdit.js.map +1 -1
- package/dist/tools/recentTracesDigest.js +54 -11
- package/dist/tools/recentTracesDigest.js.map +1 -1
- package/dist/tools/refactorAnalyze.d.ts +1 -0
- package/dist/tools/refactorExtractFunction.js +4 -1
- package/dist/tools/refactorExtractFunction.js.map +1 -1
- package/dist/tools/refactorPreview.d.ts +1 -0
- package/dist/tools/refactorPreview.js +10 -2
- package/dist/tools/refactorPreview.js.map +1 -1
- package/dist/tools/replaceBlock.d.ts +1 -0
- package/dist/tools/replaceBlock.js +2 -1
- package/dist/tools/replaceBlock.js.map +1 -1
- package/dist/tools/resumeClaudeTask.d.ts +1 -0
- package/dist/tools/runClaudeTask.d.ts +1 -0
- package/dist/tools/runTests.js +15 -4
- package/dist/tools/runTests.js.map +1 -1
- package/dist/tools/screenshot.d.ts +1 -0
- package/dist/tools/screenshotAndAnnotate.js +6 -2
- package/dist/tools/screenshotAndAnnotate.js.map +1 -1
- package/dist/tools/searchAndReplace.d.ts +1 -0
- package/dist/tools/searchAndReplace.js +17 -7
- package/dist/tools/searchAndReplace.js.map +1 -1
- package/dist/tools/searchTools.js +20 -19
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/searchWorkspace.d.ts +1 -0
- package/dist/tools/selectionRanges.d.ts +1 -0
- package/dist/tools/semanticTokens.d.ts +1 -0
- package/dist/tools/signatureHelp.d.ts +1 -0
- package/dist/tools/spawnWorkspace.js +15 -7
- package/dist/tools/spawnWorkspace.js.map +1 -1
- package/dist/tools/terminal.d.ts +6 -0
- package/dist/tools/testRunners/pytest.js +6 -2
- package/dist/tools/testRunners/pytest.js.map +1 -1
- package/dist/tools/testRunners/vitestJest.js +3 -1
- package/dist/tools/testRunners/vitestJest.js.map +1 -1
- package/dist/tools/testTraceToSource.d.ts +1 -0
- package/dist/tools/transaction.d.ts +4 -0
- package/dist/tools/transaction.js +4 -1
- package/dist/tools/transaction.js.map +1 -1
- package/dist/tools/typeHierarchy.d.ts +1 -0
- package/dist/tools/utils.d.ts +18 -0
- package/dist/tools/utils.js +103 -18
- package/dist/tools/utils.js.map +1 -1
- package/dist/tools/vscodeCommands.d.ts +2 -0
- package/dist/tools/vscodeTasks.d.ts +2 -0
- package/dist/tools/workspaceSettings.d.ts +1 -0
- package/dist/transport.d.ts +3 -1
- package/dist/transport.js +103 -52
- package/dist/transport.js.map +1 -1
- package/dist/winShim.d.ts +34 -0
- package/dist/winShim.js +94 -0
- package/dist/winShim.js.map +1 -0
- package/dist/wireHaltPushDispatch.d.ts +38 -0
- package/dist/wireHaltPushDispatch.js +71 -0
- package/dist/wireHaltPushDispatch.js.map +1 -0
- package/dist/writeFileAtomic.d.ts +23 -0
- package/dist/writeFileAtomic.js +121 -0
- package/dist/writeFileAtomic.js.map +1 -0
- package/package.json +23 -7
- package/scripts/postinstall.mjs +42 -2
- package/scripts/smoke/run-all.mjs +213 -0
- package/scripts/start-all.mjs +572 -0
- package/scripts/start-all.ps1 +209 -0
- package/scripts/start-all.sh +73 -17
- package/scripts/start-orchestrator.ps1 +158 -0
- package/scripts/start-remote.mjs +122 -0
- package/templates/automation-policies/recipe-authoring.json +1 -1
- package/templates/automation-policies/security-first.json +1 -1
- package/templates/automation-policies/strict-lint.json +1 -1
- package/templates/automation-policies/test-driven.json +1 -1
- package/templates/automation-policy.example.json +1 -1
- package/templates/co.patchwork-os.bridge.plist +2 -2
- package/templates/recipes/approval-queue-ui-test.yaml +1 -1
- package/templates/recipes/ctx-loop-test.yaml +1 -1
- package/templates/recipes/fix-errors-on-save.yaml +71 -0
- package/templates/recipes/morning-brief.yaml +5 -2
- package/templates/recipes/project-health-check.yaml +4 -1
- package/templates/recipes/sentry-to-linear.yaml +72 -38
- package/templates/recipes/webhook/apple-watch-health-log.yaml +145 -0
- package/templates/recipes/webhook/customer-escalation.yaml +8 -9
- package/templates/recipes/webhook/meeting-prep.yaml +11 -5
- package/dist/commands/marketplace.d.ts +0 -16
- package/dist/commands/marketplace.js +0 -32
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/recipes/legacyRecipeCompat.d.ts +0 -10
- package/dist/recipes/legacyRecipeCompat.js +0 -131
- package/dist/recipes/legacyRecipeCompat.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "Example automation policy with LSP-aware prompts. Copy to automation-policy.json and adjust as needed.",
|
|
3
|
-
"_usage": "Start bridge with: claude-ide-bridge --automation --automation-policy ./automation-policy.json --
|
|
3
|
+
"_usage": "Start bridge with: claude-ide-bridge --automation --automation-policy ./automation-policy.json --driver subprocess",
|
|
4
4
|
|
|
5
5
|
"onFileChanged": {
|
|
6
6
|
"enabled": true,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<key>ProgramArguments</key>
|
|
9
9
|
<array>
|
|
10
10
|
<string>__BINARY_PATH__</string>
|
|
11
|
-
<string>--
|
|
11
|
+
<string>--driver</string>
|
|
12
12
|
<string>subprocess</string>
|
|
13
13
|
</array>
|
|
14
14
|
<key>RunAtLoad</key>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<key>HOME</key>
|
|
25
25
|
<string>__HOME__</string>
|
|
26
26
|
<key>PATH</key>
|
|
27
|
-
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
27
|
+
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
|
28
28
|
</dict>
|
|
29
29
|
<key>WorkingDirectory</key>
|
|
30
30
|
<string>__HOME__</string>
|
|
@@ -19,7 +19,7 @@ description: |
|
|
|
19
19
|
Keyboard — J / K (focus), E / X (decide)
|
|
20
20
|
|
|
21
21
|
PREREQUISITES
|
|
22
|
-
1. Bridge running with --
|
|
22
|
+
1. Bridge running with --driver subprocess so the agent has MCP
|
|
23
23
|
access to the Playwright server.
|
|
24
24
|
2. Dashboard reachable at DASHBOARD_URL (defaults to localhost:3000;
|
|
25
25
|
Patchwork's Next.js dev typically mounts under /dashboard, so the
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
appears in the result. Output lands in ~/.patchwork/inbox/ for manual inspection.
|
|
6
6
|
Run this after deploying a new bridge build to confirm the memory moat is live.
|
|
7
7
|
|
|
8
|
-
NOTE: requires --
|
|
8
|
+
NOTE: requires --driver subprocess and a running bridge with HTTP port
|
|
9
9
|
so the agent subprocess has MCP access. Running via `patchwork recipe run`
|
|
10
10
|
(local yamlRunner) will fail at Step 1 — the local claude -p subprocess has
|
|
11
11
|
no bridge MCP context. Trigger from the dashboard Recipes page instead.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
apiVersion: patchwork.sh/v1
|
|
2
|
+
name: fix-errors-on-save
|
|
3
|
+
description: |
|
|
4
|
+
On every save of a .ts/.tsx file, check for TypeScript errors. If errors exist,
|
|
5
|
+
an agent reads the broken code, navigates to the relevant type definitions, and
|
|
6
|
+
applies a minimal targeted fix — without refactoring surrounding code.
|
|
7
|
+
|
|
8
|
+
Requires: bridge running with --driver subprocess so the agent subprocess has
|
|
9
|
+
MCP access to getBufferContent, goToDefinition, getHover, getDiagnostics, editText.
|
|
10
|
+
|
|
11
|
+
trigger:
|
|
12
|
+
type: on_file_save
|
|
13
|
+
glob: "**/*.{ts,tsx}"
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- tool: diagnostics.get
|
|
17
|
+
uri: "{{file}}"
|
|
18
|
+
filter: error
|
|
19
|
+
into: errors
|
|
20
|
+
|
|
21
|
+
- agent:
|
|
22
|
+
prompt: |
|
|
23
|
+
A TypeScript file was just saved: {{file}}
|
|
24
|
+
|
|
25
|
+
Current errors reported by the language server:
|
|
26
|
+
{{errors}}
|
|
27
|
+
|
|
28
|
+
If there are NO errors (empty list above), output nothing (empty string) and stop.
|
|
29
|
+
|
|
30
|
+
Otherwise, fix the errors by following these steps IN ORDER:
|
|
31
|
+
|
|
32
|
+
## Step 1 — Read the file
|
|
33
|
+
Call getBufferContent for {{file}} to see the current code. Note the line
|
|
34
|
+
numbers of each error.
|
|
35
|
+
|
|
36
|
+
## Step 2 — Understand the types involved
|
|
37
|
+
For each error, use getHover at the error location to read the type information.
|
|
38
|
+
If the error references a symbol whose definition you need (e.g. "Property X does
|
|
39
|
+
not exist on type Y"), call goToDefinition on that symbol and then getBufferContent
|
|
40
|
+
on the definition file to read the actual shape of the type.
|
|
41
|
+
|
|
42
|
+
## Step 3 — Apply a minimal fix
|
|
43
|
+
Call editText to fix each error at its exact line. Rules:
|
|
44
|
+
- Fix only what the error points to — do not refactor surrounding code
|
|
45
|
+
- If fixing one error would require restructuring multiple files, stop and report
|
|
46
|
+
why instead of applying a partial fix
|
|
47
|
+
- Prefer adding a missing property/cast over restructuring the type
|
|
48
|
+
|
|
49
|
+
## Step 4 — Verify
|
|
50
|
+
Call getDiagnostics for {{file}} after your edits. If new errors appeared, revert
|
|
51
|
+
your change with another editText call and report the failure.
|
|
52
|
+
|
|
53
|
+
## Step 5 — Report
|
|
54
|
+
Output a concise markdown summary:
|
|
55
|
+
```
|
|
56
|
+
## fix-errors-on-save — {{file}}
|
|
57
|
+
**Errors found:** <count>
|
|
58
|
+
**Fixed:** <list each fix: "line N: <what was wrong> → <what was done>">
|
|
59
|
+
**Remaining:** <count, or "none">
|
|
60
|
+
**Skipped:** <any errors you couldn't safely fix, and why>
|
|
61
|
+
```
|
|
62
|
+
driver: claude-code
|
|
63
|
+
model: claude-haiku-4-5-20251001
|
|
64
|
+
into: result
|
|
65
|
+
|
|
66
|
+
# Only append to the inbox when fixes were applied. When no errors exist
|
|
67
|
+
# the agent outputs nothing (empty string) and {{result}} is empty → falsy → skip.
|
|
68
|
+
- tool: file.append
|
|
69
|
+
path: ~/.patchwork/inbox/auto-fixes.md
|
|
70
|
+
content: "{{result}}\n\n"
|
|
71
|
+
when: "{{result}}"
|
|
@@ -61,8 +61,11 @@ steps:
|
|
|
61
61
|
6. **Linear** — list in-progress and unstarted issues by priority; omit this section entirely if the list is empty or returned an error
|
|
62
62
|
|
|
63
63
|
Be concise. Skip newsletters and automated notifications.
|
|
64
|
-
# Use claude (
|
|
65
|
-
|
|
64
|
+
# Use the claude-code driver (subprocess `claude -p`) — runs under
|
|
65
|
+
# your existing Claude Code subscription, no ANTHROPIC_API_KEY
|
|
66
|
+
# required. Switch to `driver: claude` only if you have an API key
|
|
67
|
+
# set and want the Anthropic API path (different billing).
|
|
68
|
+
driver: claude-code
|
|
66
69
|
into: brief
|
|
67
70
|
- tool: file.write
|
|
68
71
|
path: ~/.patchwork/inbox/morning-brief-{{date}}.md
|
|
@@ -38,7 +38,10 @@ steps:
|
|
|
38
38
|
2. **Issues** — issues needing attention today; omit if empty
|
|
39
39
|
3. **PRs** — PRs waiting on review or action; omit if empty
|
|
40
40
|
4. **Health** — one-sentence overall assessment (on track / needs attention / blocked)
|
|
41
|
-
driver
|
|
41
|
+
# Use the claude-code driver (subprocess `claude -p`) — runs under
|
|
42
|
+
# your existing Claude Code subscription. Switch to `driver: claude`
|
|
43
|
+
# only if you have ANTHROPIC_API_KEY set and prefer the API path.
|
|
44
|
+
driver: claude-code
|
|
42
45
|
awaits: [gather]
|
|
43
46
|
- id: write
|
|
44
47
|
tool: file.write
|
|
@@ -1,77 +1,111 @@
|
|
|
1
|
+
apiVersion: patchwork.sh/v1
|
|
1
2
|
name: sentry-to-linear
|
|
2
3
|
description: |
|
|
3
|
-
Fetch a Sentry issue, enrich
|
|
4
|
+
Fetch a Sentry issue, enrich its stack trace with git blame (via
|
|
5
|
+
enrichStackTrace built into fetchSentryIssue), and create a triage-ready
|
|
4
6
|
Linear ticket. Requires both Sentry and Linear connectors connected.
|
|
5
7
|
Run ad-hoc or trigger via webhook / automation policy.
|
|
6
8
|
|
|
7
|
-
#
|
|
8
|
-
# patchwork
|
|
9
|
+
# Manual run:
|
|
10
|
+
# patchwork recipe run sentry-to-linear --var SENTRY_ISSUE_ID=12345678
|
|
9
11
|
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
+
# Webhook trigger (convert this recipe to webhook type after install):
|
|
13
|
+
# trigger:
|
|
14
|
+
# type: webhook
|
|
15
|
+
# path: /hooks/sentry-to-linear
|
|
16
|
+
# Then POST from a Sentry alert rule to https://<bridge-url>/hooks/sentry-to-linear
|
|
12
17
|
|
|
13
18
|
trigger:
|
|
14
19
|
type: manual
|
|
15
20
|
vars:
|
|
16
21
|
- name: SENTRY_ISSUE_ID
|
|
17
|
-
description: "Sentry issue ID or URL (e.g. '12345678' or 'https://sentry.io
|
|
22
|
+
description: "Sentry issue ID or URL (e.g. '12345678' or 'https://sentry.io/organizations/my-org/issues/12345678/')"
|
|
18
23
|
required: true
|
|
19
24
|
- name: LINEAR_TEAM_KEY
|
|
20
|
-
description: "Linear team key
|
|
25
|
+
description: "Linear team key (e.g. 'ENG'). Leave blank to use your first team."
|
|
21
26
|
required: false
|
|
22
27
|
- name: LINEAR_PRIORITY
|
|
23
|
-
description: "Linear priority: 1=urgent
|
|
28
|
+
description: "Linear priority: 1=urgent 2=high 3=medium 4=low"
|
|
24
29
|
required: false
|
|
25
30
|
default: "2"
|
|
26
31
|
|
|
27
32
|
steps:
|
|
28
33
|
- agent:
|
|
29
34
|
prompt: |
|
|
30
|
-
You are a triage assistant.
|
|
31
|
-
1. Fetch the Sentry issue using fetchSentryIssue with issueId "{{SENTRY_ISSUE_ID}}"
|
|
32
|
-
2. Create a Linear issue using createLinearIssue with the data you received
|
|
35
|
+
You are a triage assistant. Follow these steps exactly — do not skip any.
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
- title: Use the Sentry issue title verbatim
|
|
36
|
-
- description: Write a structured Markdown body with these sections:
|
|
37
|
-
## Error
|
|
38
|
-
(one-line error type + message from the Sentry title)
|
|
37
|
+
## Step 1 — Fetch Sentry issue with git blame enrichment
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
Call `fetchSentryIssue` with:
|
|
40
|
+
issueId: "{{SENTRY_ISSUE_ID}}"
|
|
41
|
+
maxFrames: 15
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
`fetchSentryIssue` automatically runs git blame on every stack frame and
|
|
44
|
+
returns `topSuspect` (the commit most likely to have introduced the bug),
|
|
45
|
+
`confidence` (high/medium/low), and per-frame `commit` attribution.
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
(the confidence field value + a one-sentence explanation of what it means)
|
|
47
|
+
## Step 2 — Create the Linear issue
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
Call `createLinearIssue` with:
|
|
50
|
+
title: The Sentry issue title verbatim
|
|
51
|
+
teamKey: "{{LINEAR_TEAM_KEY}}" (omit the key entirely if the value is blank)
|
|
52
|
+
priority: {{LINEAR_PRIORITY}} (integer — not a string)
|
|
53
|
+
labelNames: ["bug"]
|
|
54
|
+
description: A Markdown body structured exactly as follows:
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
56
|
+
---
|
|
57
|
+
## Error
|
|
58
|
+
<one-line error type + message from the Sentry title>
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
## Stack trace
|
|
61
|
+
```
|
|
62
|
+
<top 10 frames from the stackTrace field>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Suspect commit
|
|
66
|
+
<If topSuspect is non-null, format as:>
|
|
67
|
+
- **SHA:** `<sha>`
|
|
68
|
+
- **Author:** <author>
|
|
69
|
+
- **Date:** <date>
|
|
70
|
+
- **Subject:** <subject>
|
|
71
|
+
- **Frames blamed:** <frameCount> of <framesBlamed> workspace frames
|
|
72
|
+
- **Confidence:** <confidence>
|
|
73
|
+
|
|
74
|
+
<If topSuspect is null, write:>
|
|
75
|
+
No suspect commit identified (confidence: <confidence>).
|
|
76
|
+
Git blame ran on <framesBlamed> frames; none resolved to a workspace commit.
|
|
77
|
+
|
|
78
|
+
## Sentry link
|
|
79
|
+
<full Sentry URL — use issueId to construct: https://sentry.io/issues/{{SENTRY_ISSUE_ID}}/>
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 3 — Respond with JSON
|
|
83
|
+
|
|
84
|
+
After both tool calls succeed, respond with ONLY this JSON object
|
|
85
|
+
(no markdown fences, no extra text):
|
|
57
86
|
{
|
|
58
|
-
"sentryIssueId": "<
|
|
59
|
-
"sentryTitle": "<
|
|
60
|
-
"linearIdentifier": "<e.g. ENG-101>",
|
|
61
|
-
"linearUrl": "<
|
|
87
|
+
"sentryIssueId": "<issueId from fetchSentryIssue>",
|
|
88
|
+
"sentryTitle": "<title from fetchSentryIssue>",
|
|
89
|
+
"linearIdentifier": "<identifier from createLinearIssue, e.g. ENG-101>",
|
|
90
|
+
"linearUrl": "<url from createLinearIssue>",
|
|
62
91
|
"confidence": "<high|medium|low>",
|
|
63
|
-
"suspectCommit": "<sha or null>"
|
|
92
|
+
"suspectCommit": "<sha or null>",
|
|
93
|
+
"framesBlamed": <integer>,
|
|
94
|
+
"gitAvailable": <boolean>
|
|
64
95
|
}
|
|
65
96
|
|
|
66
|
-
If
|
|
67
|
-
|
|
68
|
-
|
|
97
|
+
If `sentryConnected` is false in the fetchSentryIssue response, stop and respond:
|
|
98
|
+
{"error": "Sentry connector not connected — visit /connections to authenticate"}
|
|
99
|
+
|
|
100
|
+
If `linearConnected` is false in the createLinearIssue response, stop and respond:
|
|
101
|
+
{"error": "Linear connector not connected — visit /connections to authenticate"}
|
|
69
102
|
driver: claude-code
|
|
70
103
|
model: claude-haiku-4-5-20251001
|
|
71
104
|
into: result
|
|
105
|
+
|
|
72
106
|
- tool: file.write
|
|
73
|
-
path: ~/.patchwork/inbox/sentry-
|
|
107
|
+
path: ~/.patchwork/inbox/sentry-{{SENTRY_ISSUE_ID}}-{{date}}.md
|
|
74
108
|
content: |
|
|
75
|
-
# Sentry → Linear
|
|
109
|
+
# Sentry → Linear: {{SENTRY_ISSUE_ID}} ({{date}})
|
|
76
110
|
|
|
77
111
|
{{result}}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
apiVersion: patchwork.sh/v1
|
|
2
|
+
name: apple-watch-health-log
|
|
3
|
+
description: |
|
|
4
|
+
Logs Apple Watch sleep duration, quality, and activity rings from an iOS
|
|
5
|
+
Shortcut. Each fire writes a daily journal entry, generates a warm AI Coach
|
|
6
|
+
insight (Fitbit-Gemini style) via Claude, appends the insight to the
|
|
7
|
+
journal, and pushes it to your phone via ntfy.sh. Two conditional nudges
|
|
8
|
+
fire only when the payload looks off:
|
|
9
|
+
|
|
10
|
+
- "Short night" — separate priority-5 push when sleep_hours_under_6 is set
|
|
11
|
+
- "Watch off your wrist" — different topic when move_percent is 0
|
|
12
|
+
|
|
13
|
+
Conditional steps are gated by `when:` and read precomputed boolean fields
|
|
14
|
+
from the iOS Shortcut payload (template substitution can't do arithmetic).
|
|
15
|
+
|
|
16
|
+
Suggested triggers:
|
|
17
|
+
- iOS Shortcut ("Log my watch" — pulls Health stats + POSTs JSON)
|
|
18
|
+
- Stream Deck button for manual end-of-day log
|
|
19
|
+
- NFC tag on your nightstand
|
|
20
|
+
- curl from any device that can POST HTTP
|
|
21
|
+
|
|
22
|
+
Payload conventions (all optional — missing fields render blank):
|
|
23
|
+
sleep_hours numeric, e.g. 7.4
|
|
24
|
+
sleep_quality "deep" | "restful" | "light" | "restless" | free text
|
|
25
|
+
sleep_hours_under_6 "1" if sleep_hours < 6 (Shortcut precomputes)
|
|
26
|
+
move_percent 0-100+ (rings can exceed 100%)
|
|
27
|
+
move_percent_zero "1" if move_percent == 0 (likely watch was off)
|
|
28
|
+
move_calories active kcal burned
|
|
29
|
+
exercise_percent 0-100+
|
|
30
|
+
exercise_min exercise minutes recorded
|
|
31
|
+
stand_percent 0-100+
|
|
32
|
+
notes free-form journal text
|
|
33
|
+
|
|
34
|
+
Setup:
|
|
35
|
+
1. Replace NTFY_TOPIC, NTFY_NUDGE_TOPIC, and NTFY_ALERT_TOPIC with your
|
|
36
|
+
own unguessable ntfy topics and subscribe to all three in the app.
|
|
37
|
+
2. Drop this file in ~/.patchwork/recipes/.
|
|
38
|
+
3. Start the bridge with `--driver subprocess` so /hooks/* is live.
|
|
39
|
+
|
|
40
|
+
Example request:
|
|
41
|
+
curl -X POST http://localhost:3101/hooks/apple-watch-health \
|
|
42
|
+
-H 'Content-Type: application/json' \
|
|
43
|
+
-d '{"sleep_hours":7.4,"sleep_quality":"restful","move_percent":112,"move_calories":645,"exercise_percent":150,"exercise_min":45,"stand_percent":100,"notes":"Closed all three rings."}'
|
|
44
|
+
|
|
45
|
+
trigger:
|
|
46
|
+
type: webhook
|
|
47
|
+
path: /apple-watch-health
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- id: write_journal
|
|
51
|
+
tool: file.append
|
|
52
|
+
path: ~/.patchwork/health-journal/{{date}}.md
|
|
53
|
+
content: |
|
|
54
|
+
## {{date}} Apple Watch Summary
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
SLEEP {{payload.sleep_hours}}h {{payload.sleep_quality}}
|
|
58
|
+
MOVE {{payload.move_percent}}% {{payload.move_calories}} kcal
|
|
59
|
+
EXER {{payload.exercise_percent}}% {{payload.exercise_min}} min
|
|
60
|
+
STAND {{payload.stand_percent}}%
|
|
61
|
+
NOTE {{payload.notes}}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
- id: coach_insight
|
|
67
|
+
agent:
|
|
68
|
+
driver: claude-code
|
|
69
|
+
model: claude-haiku-4-5-20251001
|
|
70
|
+
into: insight
|
|
71
|
+
prompt: |
|
|
72
|
+
Read the Apple Watch numbers below and write a short, warm coaching note in the voice of a friend who knows health data well. The tone should celebrate something specific, name one pattern, and end with one small doable tip for today. No preamble, no markdown headers, no bullets, no sign-off, no emojis. Plain prose, 80-150 words, 2-3 short paragraphs.
|
|
73
|
+
|
|
74
|
+
Hard rules (response is rejected if any are broken):
|
|
75
|
+
- Anchor every compliment in a number from the data. No generic "great job".
|
|
76
|
+
- Never lecture, never list ideal ranges, never use clinical jargon.
|
|
77
|
+
- Never start with "Sure," "Here's," "Of course," or any preamble.
|
|
78
|
+
- End with one concrete tip for today, framed as a tiny win — not a lifestyle overhaul.
|
|
79
|
+
|
|
80
|
+
Tone reference (match the register, not the content):
|
|
81
|
+
|
|
82
|
+
Hey there. Your sleep performance hit 87/100 last night — solid 7 hours 45 minutes with a nice chunk of deep sleep. Recovery is looking strong at 82/100 thanks to that solid HRV of 62 ms. The pattern I notice: when you wrap exercise before 6pm your sleep lands in the high 80s pretty reliably. One small win for today: try wrapping up screens 30 minutes earlier tonight. You've got this.
|
|
83
|
+
|
|
84
|
+
Apple Watch numbers for today:
|
|
85
|
+
Sleep: {{payload.sleep_hours}} hours, {{payload.sleep_quality}}
|
|
86
|
+
Move ring: {{payload.move_percent}}% closed, {{payload.move_calories}} active calories
|
|
87
|
+
Exercise ring: {{payload.exercise_percent}}% closed, {{payload.exercise_min}} minutes
|
|
88
|
+
Stand ring: {{payload.stand_percent}}% closed
|
|
89
|
+
User's notes for the day: {{payload.notes}}
|
|
90
|
+
|
|
91
|
+
Write the coaching note now. Output only the prose, nothing else.
|
|
92
|
+
silentFailDetection: false
|
|
93
|
+
|
|
94
|
+
- id: append_insight
|
|
95
|
+
tool: file.append
|
|
96
|
+
when: "{{insight}}"
|
|
97
|
+
path: ~/.patchwork/health-journal/{{date}}.md
|
|
98
|
+
content: |
|
|
99
|
+
### Coach's note
|
|
100
|
+
|
|
101
|
+
{{insight}}
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
- id: push_to_phone
|
|
106
|
+
tool: http.post
|
|
107
|
+
when: "{{insight}}"
|
|
108
|
+
url: https://ntfy.sh/NTFY_TOPIC
|
|
109
|
+
contentType: text/plain
|
|
110
|
+
headers:
|
|
111
|
+
Title: "{{date}} - the body report"
|
|
112
|
+
Tags: watch,zzz,fire
|
|
113
|
+
body: |
|
|
114
|
+
{{insight}}
|
|
115
|
+
|
|
116
|
+
# Fires only when payload.sleep_hours_under_6 is truthy ("1", "true", etc.)
|
|
117
|
+
- id: short_night_nudge
|
|
118
|
+
tool: http.post
|
|
119
|
+
when: "{{payload.sleep_hours_under_6}}"
|
|
120
|
+
url: https://ntfy.sh/NTFY_NUDGE_TOPIC
|
|
121
|
+
contentType: text/plain
|
|
122
|
+
headers:
|
|
123
|
+
Title: Short night - go easy today
|
|
124
|
+
Tags: sleeping_face,warning
|
|
125
|
+
Priority: "5"
|
|
126
|
+
body: |
|
|
127
|
+
You logged {{payload.sleep_hours}}h ({{payload.sleep_quality}}).
|
|
128
|
+
No PR attempts. Hydrate. Move at half-throttle.
|
|
129
|
+
|
|
130
|
+
# Fires only when payload.move_percent_zero is truthy — likely the watch
|
|
131
|
+
# was off your wrist all day, not that you genuinely moved 0%.
|
|
132
|
+
- id: watch_off_alert
|
|
133
|
+
tool: http.post
|
|
134
|
+
when: "{{payload.move_percent_zero}}"
|
|
135
|
+
url: https://ntfy.sh/NTFY_ALERT_TOPIC
|
|
136
|
+
contentType: text/plain
|
|
137
|
+
headers:
|
|
138
|
+
Title: Watch reported 0% move
|
|
139
|
+
Tags: warning,watch
|
|
140
|
+
body: |
|
|
141
|
+
Move ring at 0% for {{date}}. Battery dead? Forgot the watch?
|
|
142
|
+
Today's journal entry may not reflect actual activity.
|
|
143
|
+
|
|
144
|
+
output:
|
|
145
|
+
path: ~/.patchwork/health-journal/{{date}}.md
|
|
@@ -25,22 +25,21 @@ trigger:
|
|
|
25
25
|
path: /customer-escalation
|
|
26
26
|
|
|
27
27
|
steps:
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
# Look the contact up by email. HubSpot's search API accepts a free-form
|
|
29
|
+
# query string (matches name / email / company) — the email itself is a
|
|
30
|
+
# specific enough literal that we get a one-row hit when the email is on
|
|
31
|
+
# file. If you need stricter matching, post-filter in the agent step.
|
|
32
|
+
- tool: hubspot.searchContacts
|
|
33
|
+
query: "{{payload.customer_email}}"
|
|
30
34
|
into: contact
|
|
31
|
-
- tool: hubspot.list_recent_deals
|
|
32
|
-
contact_id: "{{contact.id}}"
|
|
33
|
-
max: 3
|
|
34
|
-
into: deals
|
|
35
35
|
- agent:
|
|
36
36
|
prompt: |
|
|
37
37
|
Compose a Slack alert for the customer-success team. Keep it under
|
|
38
38
|
12 lines. Include: customer name + company, tier (from contact.tier
|
|
39
|
-
if present),
|
|
40
|
-
|
|
39
|
+
if present), what they said, and the ticket link. End with a single
|
|
40
|
+
suggested first move.
|
|
41
41
|
|
|
42
42
|
Contact: {{contact}}
|
|
43
|
-
Deals: {{deals}}
|
|
44
43
|
Summary: {{payload.summary}}
|
|
45
44
|
Ticket: {{payload.ticket_url}}
|
|
46
45
|
into: alert
|
|
@@ -19,13 +19,18 @@ trigger:
|
|
|
19
19
|
path: /meeting-prep
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
|
-
- tool: gmail.
|
|
22
|
+
- tool: gmail.search
|
|
23
23
|
query: "from:({{payload.attendees}}) newer_than:7d"
|
|
24
24
|
max: 10
|
|
25
25
|
into: recent_threads
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
# linear.list_issues filters by assignee / team / state — there is no
|
|
27
|
+
# free-text topic search in the connector. We pull the user's own
|
|
28
|
+
# started/unstarted issues and let the agent correlate them to the
|
|
29
|
+
# meeting topic. Lossier than a real search, but useful + works
|
|
30
|
+
# without a Linear MCP setup.
|
|
31
|
+
- tool: linear.list_issues
|
|
32
|
+
state: "started,unstarted"
|
|
33
|
+
max: 10
|
|
29
34
|
into: related_issues
|
|
30
35
|
- agent:
|
|
31
36
|
prompt: |
|
|
@@ -34,7 +39,8 @@ steps:
|
|
|
34
39
|
Topic: {{payload.topic}}
|
|
35
40
|
Attendees: {{payload.attendees}}
|
|
36
41
|
Recent email threads with attendees: {{recent_threads}}
|
|
37
|
-
|
|
42
|
+
My in-flight Linear issues: {{related_issues}}
|
|
43
|
+
— only mention issues that look related to the topic above.
|
|
38
44
|
|
|
39
45
|
Output sections: Context, Open questions, Suggested first move.
|
|
40
46
|
into: brief
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `patchwork marketplace` — DEPRECATED.
|
|
3
|
-
*
|
|
4
|
-
* This subcommand previously fetched a hand-curated registry of "skills" and
|
|
5
|
-
* shelled out to `npm install -g <skill-package>`. As of 0.2.0-beta.0 the
|
|
6
|
-
* registry contained only built-in skills that already ship inside the bridge,
|
|
7
|
-
* pointed at a stale npm package name (`claude-ide-bridge`, not
|
|
8
|
-
* `patchwork-os`), and had zero third-party authors. See issue #279 for the
|
|
9
|
-
* decision rationale.
|
|
10
|
-
*
|
|
11
|
-
* The stub is preserved (rather than removed wholesale) so anyone with tooling
|
|
12
|
-
* that calls `patchwork marketplace …` gets a clear migration message instead
|
|
13
|
-
* of a "unknown subcommand" error. It will be removed in a future major
|
|
14
|
-
* release.
|
|
15
|
-
*/
|
|
16
|
-
export declare function runMarketplace(argv: string[]): Promise<void>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `patchwork marketplace` — DEPRECATED.
|
|
3
|
-
*
|
|
4
|
-
* This subcommand previously fetched a hand-curated registry of "skills" and
|
|
5
|
-
* shelled out to `npm install -g <skill-package>`. As of 0.2.0-beta.0 the
|
|
6
|
-
* registry contained only built-in skills that already ship inside the bridge,
|
|
7
|
-
* pointed at a stale npm package name (`claude-ide-bridge`, not
|
|
8
|
-
* `patchwork-os`), and had zero third-party authors. See issue #279 for the
|
|
9
|
-
* decision rationale.
|
|
10
|
-
*
|
|
11
|
-
* The stub is preserved (rather than removed wholesale) so anyone with tooling
|
|
12
|
-
* that calls `patchwork marketplace …` gets a clear migration message instead
|
|
13
|
-
* of a "unknown subcommand" error. It will be removed in a future major
|
|
14
|
-
* release.
|
|
15
|
-
*/
|
|
16
|
-
const DEPRECATION_MESSAGE = `The 'marketplace' command is deprecated and no longer maintained.
|
|
17
|
-
|
|
18
|
-
Built-in skills (tdd-loop, ide-coverage, ide-diagnostics-board, ide-explore,
|
|
19
|
-
ide-deps) ship inside the bridge package — no installation needed.
|
|
20
|
-
|
|
21
|
-
For community content, use the recipe-bundle install path instead:
|
|
22
|
-
patchwork recipe install github:<org>/<repo>
|
|
23
|
-
|
|
24
|
-
To discover plugins on npm:
|
|
25
|
-
npm search keywords:claude-ide-bridge-plugin
|
|
26
|
-
|
|
27
|
-
This subcommand will be removed in a future major release. See issue #279.`;
|
|
28
|
-
export async function runMarketplace(argv) {
|
|
29
|
-
void argv; // intentionally ignored — every subcommand prints the same notice
|
|
30
|
-
console.log(DEPRECATION_MESSAGE);
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=marketplace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.js","sourceRoot":"","sources":["../../src/commands/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,mBAAmB,GAAG;;;;;;;;;;;2EAW+C,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,KAAK,IAAI,CAAC,CAAC,kEAAkE;IAC7E,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type WarnFn = (msg: string) => void;
|
|
2
|
-
/**
|
|
3
|
-
* Default deprecation-warning sink for the runtime/validation/fmt callers.
|
|
4
|
-
* Forwards to `console.warn` outside of tests so users see migration
|
|
5
|
-
* prompts in CLI output, but stays silent under vitest so the dozens of
|
|
6
|
-
* intentional legacy-shape regression fixtures don't flood stderr. Tests
|
|
7
|
-
* that need to assert warnings still pass their own `vi.fn()` directly.
|
|
8
|
-
*/
|
|
9
|
-
export declare const defaultDeprecationWarn: WarnFn;
|
|
10
|
-
export declare function normalizeRecipeForRuntime(recipe: unknown, warn?: WarnFn): unknown;
|