runwork 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19272 -116
- package/package.json +4 -4
- package/dist/__tests__/curl-parser.test.d.ts +0 -1
- package/dist/__tests__/curl-parser.test.js +0 -250
- package/dist/__tests__/install-scripts.test.d.ts +0 -1
- package/dist/__tests__/install-scripts.test.js +0 -280
- package/dist/__tests__/types-manager.test.d.ts +0 -1
- package/dist/__tests__/types-manager.test.js +0 -89
- package/dist/agents/__tests__/chatgpt-registry.test.d.ts +0 -1
- package/dist/agents/__tests__/chatgpt-registry.test.js +0 -61
- package/dist/agents/__tests__/claude-code-managed-block.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-code-managed-block.test.js +0 -97
- package/dist/agents/__tests__/claude-code-plugin.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-code-plugin.test.js +0 -47
- package/dist/agents/__tests__/claude-code-stats.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-code-stats.test.js +0 -390
- package/dist/agents/__tests__/claude-desktop-memory.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-desktop-memory.test.js +0 -154
- package/dist/agents/__tests__/claude-desktop-plugin-tree.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-desktop-plugin-tree.test.js +0 -161
- package/dist/agents/__tests__/claude-desktop-plugin.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-desktop-plugin.test.js +0 -117
- package/dist/agents/__tests__/claude-desktop-rpm.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-desktop-rpm.test.js +0 -126
- package/dist/agents/__tests__/claude-desktop-stats.test.d.ts +0 -1
- package/dist/agents/__tests__/claude-desktop-stats.test.js +0 -280
- package/dist/agents/__tests__/codex-instructions.test.d.ts +0 -1
- package/dist/agents/__tests__/codex-instructions.test.js +0 -57
- package/dist/agents/__tests__/codex-minimum-permissions.test.d.ts +0 -1
- package/dist/agents/__tests__/codex-minimum-permissions.test.js +0 -82
- package/dist/agents/__tests__/codex-stats.test.d.ts +0 -1
- package/dist/agents/__tests__/codex-stats.test.js +0 -370
- package/dist/agents/__tests__/cursor-merge.test.d.ts +0 -1
- package/dist/agents/__tests__/cursor-merge.test.js +0 -66
- package/dist/agents/__tests__/cursor-stats.test.d.ts +0 -1
- package/dist/agents/__tests__/cursor-stats.test.js +0 -183
- package/dist/agents/__tests__/defaults-merge.test.d.ts +0 -1
- package/dist/agents/__tests__/defaults-merge.test.js +0 -268
- package/dist/agents/__tests__/detection.test.d.ts +0 -1
- package/dist/agents/__tests__/detection.test.js +0 -89
- package/dist/agents/__tests__/graceful-degradation.test.d.ts +0 -1
- package/dist/agents/__tests__/graceful-degradation.test.js +0 -129
- package/dist/agents/__tests__/instruction-hint.test.d.ts +0 -1
- package/dist/agents/__tests__/instruction-hint.test.js +0 -69
- package/dist/agents/__tests__/intro-skill.test.d.ts +0 -1
- package/dist/agents/__tests__/intro-skill.test.js +0 -193
- package/dist/agents/__tests__/schema-validation.test.d.ts +0 -1
- package/dist/agents/__tests__/schema-validation.test.js +0 -212
- package/dist/agents/__tests__/skill-slug.test.d.ts +0 -1
- package/dist/agents/__tests__/skill-slug.test.js +0 -77
- package/dist/agents/claude-code.d.ts +0 -53
- package/dist/agents/claude-code.js +0 -754
- package/dist/agents/claude-desktop-plugin-tree.d.ts +0 -59
- package/dist/agents/claude-desktop-plugin-tree.js +0 -143
- package/dist/agents/claude-desktop.d.ts +0 -47
- package/dist/agents/claude-desktop.js +0 -684
- package/dist/agents/cline.d.ts +0 -15
- package/dist/agents/cline.js +0 -130
- package/dist/agents/codex.d.ts +0 -44
- package/dist/agents/codex.js +0 -453
- package/dist/agents/conversation-skills.d.ts +0 -18
- package/dist/agents/conversation-skills.js +0 -229
- package/dist/agents/cursor.d.ts +0 -48
- package/dist/agents/cursor.js +0 -324
- package/dist/agents/default-config.d.ts +0 -30
- package/dist/agents/default-config.js +0 -67
- package/dist/agents/defaults-merge.d.ts +0 -72
- package/dist/agents/defaults-merge.js +0 -131
- package/dist/agents/detect.d.ts +0 -4
- package/dist/agents/detect.js +0 -67
- package/dist/agents/detection.d.ts +0 -18
- package/dist/agents/detection.js +0 -94
- package/dist/agents/gemini.d.ts +0 -15
- package/dist/agents/gemini.js +0 -122
- package/dist/agents/generic-adapter.d.ts +0 -25
- package/dist/agents/generic-adapter.js +0 -151
- package/dist/agents/intro-skill.d.ts +0 -45
- package/dist/agents/intro-skill.js +0 -447
- package/dist/agents/registry-data.d.ts +0 -192
- package/dist/agents/registry-data.js +0 -669
- package/dist/agents/registry.d.ts +0 -13
- package/dist/agents/registry.js +0 -36
- package/dist/agents/runtime-detection.d.ts +0 -82
- package/dist/agents/runtime-detection.js +0 -271
- package/dist/agents/session-start-hook.d.ts +0 -37
- package/dist/agents/session-start-hook.js +0 -159
- package/dist/agents/types.d.ts +0 -171
- package/dist/agents/types.js +0 -75
- package/dist/agents/utils/instruction-hint.d.ts +0 -21
- package/dist/agents/utils/instruction-hint.js +0 -108
- package/dist/agents/utils/json-config.d.ts +0 -19
- package/dist/agents/utils/json-config.js +0 -69
- package/dist/agents/utils/toml-config.d.ts +0 -8
- package/dist/agents/utils/toml-config.js +0 -27
- package/dist/agents/windsurf.d.ts +0 -14
- package/dist/agents/windsurf.js +0 -102
- package/dist/api/__tests__/client.test.d.ts +0 -1
- package/dist/api/__tests__/client.test.js +0 -272
- package/dist/api/client.d.ts +0 -326
- package/dist/api/client.js +0 -427
- package/dist/auth/__tests__/login-flow.test.d.ts +0 -1
- package/dist/auth/__tests__/login-flow.test.js +0 -101
- package/dist/auth/__tests__/store.test.d.ts +0 -1
- package/dist/auth/__tests__/store.test.js +0 -132
- package/dist/auth/login-flow.d.ts +0 -26
- package/dist/auth/login-flow.js +0 -137
- package/dist/auth/store.d.ts +0 -5
- package/dist/auth/store.js +0 -62
- package/dist/commands/__tests__/clone-args.test.d.ts +0 -1
- package/dist/commands/__tests__/clone-args.test.js +0 -51
- package/dist/commands/__tests__/clone-source-result.test.d.ts +0 -1
- package/dist/commands/__tests__/clone-source-result.test.js +0 -45
- package/dist/commands/__tests__/info-merge.test.d.ts +0 -1
- package/dist/commands/__tests__/info-merge.test.js +0 -55
- package/dist/commands/__tests__/mcp-entries.test.d.ts +0 -1
- package/dist/commands/__tests__/mcp-entries.test.js +0 -48
- package/dist/commands/__tests__/setup-persona.test.d.ts +0 -1
- package/dist/commands/__tests__/setup-persona.test.js +0 -31
- package/dist/commands/__tests__/setup.test.d.ts +0 -1
- package/dist/commands/__tests__/setup.test.js +0 -81
- package/dist/commands/__tests__/sync-redetect.test.d.ts +0 -1
- package/dist/commands/__tests__/sync-redetect.test.js +0 -96
- package/dist/commands/__tests__/sync-telemetry.test.d.ts +0 -1
- package/dist/commands/__tests__/sync-telemetry.test.js +0 -281
- package/dist/commands/__tests__/upgrade.test.d.ts +0 -1
- package/dist/commands/__tests__/upgrade.test.js +0 -157
- package/dist/commands/agents.d.ts +0 -2
- package/dist/commands/agents.js +0 -160
- package/dist/commands/api-keys.d.ts +0 -2
- package/dist/commands/api-keys.js +0 -95
- package/dist/commands/apps.d.ts +0 -2
- package/dist/commands/apps.js +0 -82
- package/dist/commands/build-plugin.d.ts +0 -2
- package/dist/commands/build-plugin.js +0 -135
- package/dist/commands/clone.d.ts +0 -60
- package/dist/commands/clone.js +0 -271
- package/dist/commands/components.d.ts +0 -2
- package/dist/commands/components.js +0 -43
- package/dist/commands/deploy.d.ts +0 -2
- package/dist/commands/deploy.js +0 -279
- package/dist/commands/dev.d.ts +0 -11
- package/dist/commands/dev.js +0 -1011
- package/dist/commands/doctor.d.ts +0 -2
- package/dist/commands/doctor.js +0 -230
- package/dist/commands/endpoints.d.ts +0 -2
- package/dist/commands/endpoints.js +0 -189
- package/dist/commands/entities.d.ts +0 -2
- package/dist/commands/entities.js +0 -198
- package/dist/commands/files.d.ts +0 -2
- package/dist/commands/files.js +0 -193
- package/dist/commands/inbox.d.ts +0 -11
- package/dist/commands/inbox.js +0 -60
- package/dist/commands/info.d.ts +0 -178
- package/dist/commands/info.js +0 -455
- package/dist/commands/init.d.ts +0 -21
- package/dist/commands/init.js +0 -185
- package/dist/commands/integrations.d.ts +0 -2
- package/dist/commands/integrations.js +0 -233
- package/dist/commands/login.d.ts +0 -2
- package/dist/commands/login.js +0 -44
- package/dist/commands/logout.d.ts +0 -2
- package/dist/commands/logout.js +0 -13
- package/dist/commands/logs.d.ts +0 -2
- package/dist/commands/logs.js +0 -232
- package/dist/commands/mcp-entries.d.ts +0 -13
- package/dist/commands/mcp-entries.js +0 -26
- package/dist/commands/mcp.d.ts +0 -2
- package/dist/commands/mcp.js +0 -245
- package/dist/commands/open.d.ts +0 -2
- package/dist/commands/open.js +0 -53
- package/dist/commands/resume.d.ts +0 -2
- package/dist/commands/resume.js +0 -289
- package/dist/commands/save-convo.d.ts +0 -8
- package/dist/commands/save-convo.js +0 -20
- package/dist/commands/schedules.d.ts +0 -2
- package/dist/commands/schedules.js +0 -221
- package/dist/commands/setup.d.ts +0 -27
- package/dist/commands/setup.js +0 -177
- package/dist/commands/share-convo.d.ts +0 -24
- package/dist/commands/share-convo.js +0 -167
- package/dist/commands/skills.d.ts +0 -2
- package/dist/commands/skills.js +0 -352
- package/dist/commands/sync-telemetry.d.ts +0 -33
- package/dist/commands/sync-telemetry.js +0 -186
- package/dist/commands/sync.d.ts +0 -37
- package/dist/commands/sync.js +0 -702
- package/dist/commands/uninstall.d.ts +0 -2
- package/dist/commands/uninstall.js +0 -145
- package/dist/commands/upgrade.d.ts +0 -14
- package/dist/commands/upgrade.js +0 -217
- package/dist/commands/validate.d.ts +0 -2
- package/dist/commands/validate.js +0 -89
- package/dist/commands/welcome.d.ts +0 -1
- package/dist/commands/welcome.js +0 -86
- package/dist/commands/workflows.d.ts +0 -2
- package/dist/commands/workflows.js +0 -187
- package/dist/deploy/__tests__/deploy-state.test.d.ts +0 -1
- package/dist/deploy/__tests__/deploy-state.test.js +0 -80
- package/dist/deploy/__tests__/deploy-status.test.d.ts +0 -1
- package/dist/deploy/__tests__/deploy-status.test.js +0 -41
- package/dist/deploy/__tests__/detach-args.test.d.ts +0 -1
- package/dist/deploy/__tests__/detach-args.test.js +0 -30
- package/dist/deploy/deploy-state.d.ts +0 -36
- package/dist/deploy/deploy-state.js +0 -63
- package/dist/deploy/deploy-status.d.ts +0 -21
- package/dist/deploy/deploy-status.js +0 -36
- package/dist/deploy/detach.d.ts +0 -32
- package/dist/deploy/detach.js +0 -71
- package/dist/dev/__tests__/attach.test.d.ts +0 -1
- package/dist/dev/__tests__/attach.test.js +0 -296
- package/dist/dev/__tests__/detach.test.d.ts +0 -1
- package/dist/dev/__tests__/detach.test.js +0 -404
- package/dist/dev/__tests__/preview-url-poller.test.d.ts +0 -1
- package/dist/dev/__tests__/preview-url-poller.test.js +0 -149
- package/dist/dev/__tests__/session.test.d.ts +0 -1
- package/dist/dev/__tests__/session.test.js +0 -446
- package/dist/dev/__tests__/startup-sync.test.d.ts +0 -1
- package/dist/dev/__tests__/startup-sync.test.js +0 -32
- package/dist/dev/__tests__/stop.test.d.ts +0 -1
- package/dist/dev/__tests__/stop.test.js +0 -172
- package/dist/dev/attach.d.ts +0 -120
- package/dist/dev/attach.js +0 -269
- package/dist/dev/detach.d.ts +0 -187
- package/dist/dev/detach.js +0 -292
- package/dist/dev/preview-url-poller.d.ts +0 -35
- package/dist/dev/preview-url-poller.js +0 -50
- package/dist/dev/session.d.ts +0 -175
- package/dist/dev/session.js +0 -258
- package/dist/dev/startup-sync.d.ts +0 -23
- package/dist/dev/startup-sync.js +0 -14
- package/dist/dev/stop.d.ts +0 -52
- package/dist/dev/stop.js +0 -101
- package/dist/devtools/registry-data.d.ts +0 -46
- package/dist/devtools/registry-data.js +0 -40
- package/dist/generated/bundled-types.d.ts +0 -1
- package/dist/generated/bundled-types.js +0 -46
- package/dist/generated/version.d.ts +0 -1
- package/dist/generated/version.js +0 -2
- package/dist/git/__tests__/auto-commit.test.d.ts +0 -1
- package/dist/git/__tests__/auto-commit.test.js +0 -431
- package/dist/git/__tests__/classify-sync-error.test.d.ts +0 -1
- package/dist/git/__tests__/classify-sync-error.test.js +0 -57
- package/dist/git/__tests__/credential-helper-e2e.test.d.ts +0 -21
- package/dist/git/__tests__/credential-helper-e2e.test.js +0 -195
- package/dist/git/__tests__/credentials.test.d.ts +0 -1
- package/dist/git/__tests__/credentials.test.js +0 -141
- package/dist/git/__tests__/deploy-guard.test.d.ts +0 -1
- package/dist/git/__tests__/deploy-guard.test.js +0 -61
- package/dist/git/__tests__/ensure-git-credential-helper.test.d.ts +0 -1
- package/dist/git/__tests__/ensure-git-credential-helper.test.js +0 -133
- package/dist/git/__tests__/ensure-runwork-remote.test.d.ts +0 -1
- package/dist/git/__tests__/ensure-runwork-remote.test.js +0 -109
- package/dist/git/__tests__/identity.test.d.ts +0 -1
- package/dist/git/__tests__/identity.test.js +0 -146
- package/dist/git/__tests__/manifest.test.d.ts +0 -1
- package/dist/git/__tests__/manifest.test.js +0 -446
- package/dist/git/__tests__/preflight-resolution.test.d.ts +0 -1
- package/dist/git/__tests__/preflight-resolution.test.js +0 -366
- package/dist/git/__tests__/preflight.test.d.ts +0 -1
- package/dist/git/__tests__/preflight.test.js +0 -36
- package/dist/git/__tests__/repo-config.test.d.ts +0 -1
- package/dist/git/__tests__/repo-config.test.js +0 -26
- package/dist/git/__tests__/sync.test.d.ts +0 -1
- package/dist/git/__tests__/sync.test.js +0 -405
- package/dist/git/auto-commit.d.ts +0 -35
- package/dist/git/auto-commit.js +0 -293
- package/dist/git/classify-sync-error.d.ts +0 -21
- package/dist/git/classify-sync-error.js +0 -111
- package/dist/git/credentials.d.ts +0 -75
- package/dist/git/credentials.js +0 -164
- package/dist/git/critical-files.d.ts +0 -20
- package/dist/git/critical-files.js +0 -68
- package/dist/git/deploy-guard.d.ts +0 -53
- package/dist/git/deploy-guard.js +0 -78
- package/dist/git/identity.d.ts +0 -44
- package/dist/git/identity.js +0 -133
- package/dist/git/preflight.d.ts +0 -57
- package/dist/git/preflight.js +0 -276
- package/dist/git/remote.d.ts +0 -37
- package/dist/git/remote.js +0 -75
- package/dist/git/repo-config.d.ts +0 -8
- package/dist/git/repo-config.js +0 -29
- package/dist/git/sync.d.ts +0 -15
- package/dist/git/sync.js +0 -159
- package/dist/health/__tests__/checks.test.d.ts +0 -1
- package/dist/health/__tests__/checks.test.js +0 -357
- package/dist/health/__tests__/cli-distribution-checks.test.d.ts +0 -1
- package/dist/health/__tests__/cli-distribution-checks.test.js +0 -196
- package/dist/health/__tests__/fix.test.d.ts +0 -1
- package/dist/health/__tests__/fix.test.js +0 -72
- package/dist/health/__tests__/runner-filter.test.d.ts +0 -1
- package/dist/health/__tests__/runner-filter.test.js +0 -61
- package/dist/health/checks.d.ts +0 -42
- package/dist/health/checks.js +0 -636
- package/dist/health/fix.d.ts +0 -22
- package/dist/health/fix.js +0 -62
- package/dist/health/runner.d.ts +0 -8
- package/dist/health/runner.js +0 -47
- package/dist/health/types.d.ts +0 -12
- package/dist/health/types.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/logs/__tests__/tailer-format.test.d.ts +0 -1
- package/dist/logs/__tests__/tailer-format.test.js +0 -43
- package/dist/logs/tailer.d.ts +0 -17
- package/dist/logs/tailer.js +0 -217
- package/dist/sync/__tests__/change-detect.test.d.ts +0 -1
- package/dist/sync/__tests__/change-detect.test.js +0 -123
- package/dist/sync/__tests__/hash.test.d.ts +0 -1
- package/dist/sync/__tests__/hash.test.js +0 -18
- package/dist/sync/change-detect.d.ts +0 -19
- package/dist/sync/change-detect.js +0 -136
- package/dist/sync/conflict-ui.d.ts +0 -5
- package/dist/sync/conflict-ui.js +0 -78
- package/dist/sync/executor.d.ts +0 -23
- package/dist/sync/executor.js +0 -102
- package/dist/sync/hash.d.ts +0 -1
- package/dist/sync/hash.js +0 -4
- package/dist/sync/types.d.ts +0 -24
- package/dist/sync/types.js +0 -1
- package/dist/template/manifest.d.ts +0 -17
- package/dist/template/manifest.js +0 -145
- package/dist/tools/types.d.ts +0 -52
- package/dist/tools/types.js +0 -8
- package/dist/types-manager.d.ts +0 -1
- package/dist/types-manager.js +0 -35
- package/dist/types.d.ts +0 -349
- package/dist/types.js +0 -1
- package/dist/ui/__tests__/banner.test.d.ts +0 -1
- package/dist/ui/__tests__/banner.test.js +0 -98
- package/dist/ui/__tests__/colors.test.d.ts +0 -1
- package/dist/ui/__tests__/colors.test.js +0 -22
- package/dist/ui/__tests__/keyboard.test.d.ts +0 -1
- package/dist/ui/__tests__/keyboard.test.js +0 -34
- package/dist/ui/__tests__/status-line.test.d.ts +0 -1
- package/dist/ui/__tests__/status-line.test.js +0 -54
- package/dist/ui/banner.d.ts +0 -29
- package/dist/ui/banner.js +0 -153
- package/dist/ui/colors.d.ts +0 -4
- package/dist/ui/colors.js +0 -7
- package/dist/ui/keyboard.d.ts +0 -12
- package/dist/ui/keyboard.js +0 -61
- package/dist/ui/status-line.d.ts +0 -6
- package/dist/ui/status-line.js +0 -53
- package/dist/utils/__tests__/format-error.test.d.ts +0 -1
- package/dist/utils/__tests__/format-error.test.js +0 -43
- package/dist/utils/__tests__/help-json.test.d.ts +0 -1
- package/dist/utils/__tests__/help-json.test.js +0 -39
- package/dist/utils/__tests__/http.test.d.ts +0 -1
- package/dist/utils/__tests__/http.test.js +0 -381
- package/dist/utils/__tests__/ignore-matcher.test.d.ts +0 -1
- package/dist/utils/__tests__/ignore-matcher.test.js +0 -205
- package/dist/utils/__tests__/output.test.d.ts +0 -1
- package/dist/utils/__tests__/output.test.js +0 -38
- package/dist/utils/__tests__/prompt.test.d.ts +0 -1
- package/dist/utils/__tests__/prompt.test.js +0 -27
- package/dist/utils/__tests__/resolve.test.d.ts +0 -1
- package/dist/utils/__tests__/resolve.test.js +0 -95
- package/dist/utils/__tests__/sqlite.test.d.ts +0 -1
- package/dist/utils/__tests__/sqlite.test.js +0 -89
- package/dist/utils/agent-guidance.d.ts +0 -47
- package/dist/utils/agent-guidance.js +0 -128
- package/dist/utils/app-info.d.ts +0 -70
- package/dist/utils/app-info.js +0 -167
- package/dist/utils/curl-parser.d.ts +0 -12
- package/dist/utils/curl-parser.js +0 -162
- package/dist/utils/data-input.d.ts +0 -1
- package/dist/utils/data-input.js +0 -38
- package/dist/utils/format-error.d.ts +0 -10
- package/dist/utils/format-error.js +0 -38
- package/dist/utils/fs.d.ts +0 -5
- package/dist/utils/fs.js +0 -23
- package/dist/utils/help-json.d.ts +0 -70
- package/dist/utils/help-json.js +0 -88
- package/dist/utils/http.d.ts +0 -46
- package/dist/utils/http.js +0 -421
- package/dist/utils/ignore-matcher.d.ts +0 -47
- package/dist/utils/ignore-matcher.js +0 -132
- package/dist/utils/output.d.ts +0 -17
- package/dist/utils/output.js +0 -27
- package/dist/utils/prompt.d.ts +0 -5
- package/dist/utils/prompt.js +0 -42
- package/dist/utils/resolve.d.ts +0 -12
- package/dist/utils/resolve.js +0 -52
- package/dist/utils/setup-state.d.ts +0 -3
- package/dist/utils/setup-state.js +0 -19
- package/dist/utils/sqlite-adapter.d.ts +0 -48
- package/dist/utils/sqlite-adapter.js +0 -147
- package/dist/utils/sqlite.d.ts +0 -14
- package/dist/utils/sqlite.js +0 -14
- package/dist/utils/subprocess.d.ts +0 -19
- package/dist/utils/subprocess.js +0 -27
- package/dist/utils/which.d.ts +0 -14
- package/dist/utils/which.js +0 -47
- package/dist/utils/zip.d.ts +0 -7
- package/dist/utils/zip.js +0 -42
- package/dist/validate/__tests__/validate.test.d.ts +0 -1
- package/dist/validate/__tests__/validate.test.js +0 -42
- package/dist/validate/freshness.d.ts +0 -28
- package/dist/validate/freshness.js +0 -48
- package/dist/validate/preview.d.ts +0 -21
- package/dist/validate/preview.js +0 -39
- package/dist/workspace/resolve.d.ts +0 -19
- package/dist/workspace/resolve.js +0 -100
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
// HTTP goes through our `httpFetch` wrapper (single seam for diagnostics
|
|
3
|
-
// and the optional `curl` transport). Tests mock that wrapper directly so
|
|
4
|
-
// they exercise the same code path the production CLI uses.
|
|
5
|
-
const mockFetch = vi.fn();
|
|
6
|
-
vi.mock('../../utils/http.js', () => ({
|
|
7
|
-
httpFetch: (...args) => mockFetch(...args),
|
|
8
|
-
}));
|
|
9
|
-
const { ApiClient } = await import('../client.js');
|
|
10
|
-
function createJsonResponse(data, status = 200) {
|
|
11
|
-
return {
|
|
12
|
-
ok: status >= 200 && status < 300,
|
|
13
|
-
status,
|
|
14
|
-
statusText: '',
|
|
15
|
-
url: '',
|
|
16
|
-
headers: new Headers(),
|
|
17
|
-
json: () => Promise.resolve(data),
|
|
18
|
-
text: () => Promise.resolve(JSON.stringify(data)),
|
|
19
|
-
arrayBuffer: () => Promise.resolve(new ArrayBuffer(8)),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const defaultCreds = {
|
|
23
|
-
apiKey: 'test-key-abc',
|
|
24
|
-
email: 'user@test.com',
|
|
25
|
-
baseUrl: 'https://custom.runwork.dev',
|
|
26
|
-
};
|
|
27
|
-
describe('ApiClient', () => {
|
|
28
|
-
beforeEach(() => {
|
|
29
|
-
vi.clearAllMocks();
|
|
30
|
-
});
|
|
31
|
-
describe('constructor', () => {
|
|
32
|
-
it('uses default base URL when baseUrl is empty', () => {
|
|
33
|
-
const client = new ApiClient({
|
|
34
|
-
apiKey: 'key',
|
|
35
|
-
email: 'e@e.com',
|
|
36
|
-
baseUrl: '',
|
|
37
|
-
});
|
|
38
|
-
// Verify by calling a method and checking the URL
|
|
39
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
40
|
-
client.listWorkspaces();
|
|
41
|
-
expect(mockFetch).toHaveBeenCalledWith(expect.stringContaining('https://runwork.ai'), expect.anything());
|
|
42
|
-
});
|
|
43
|
-
it('uses custom base URL when provided', () => {
|
|
44
|
-
const client = new ApiClient(defaultCreds);
|
|
45
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
46
|
-
client.listWorkspaces();
|
|
47
|
-
expect(mockFetch).toHaveBeenCalledWith(expect.stringContaining('https://custom.runwork.dev'), expect.anything());
|
|
48
|
-
});
|
|
49
|
-
it('uses provided API key for authorization', async () => {
|
|
50
|
-
const client = new ApiClient(defaultCreds);
|
|
51
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
52
|
-
await client.listWorkspaces();
|
|
53
|
-
const callArgs = mockFetch.mock.calls[0];
|
|
54
|
-
expect(callArgs[1].headers['Authorization']).toBe('Bearer test-key-abc');
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('request() - via methods', () => {
|
|
58
|
-
it('adds Authorization header when API key is set', async () => {
|
|
59
|
-
const client = new ApiClient(defaultCreds);
|
|
60
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
61
|
-
await client.listWorkspaces();
|
|
62
|
-
const headers = mockFetch.mock.calls[0][1].headers;
|
|
63
|
-
expect(headers['Authorization']).toBe('Bearer test-key-abc');
|
|
64
|
-
});
|
|
65
|
-
it('omits Authorization header when API key is empty', async () => {
|
|
66
|
-
const client = new ApiClient({
|
|
67
|
-
apiKey: '',
|
|
68
|
-
email: 'e@e.com',
|
|
69
|
-
baseUrl: 'https://runwork.ai',
|
|
70
|
-
});
|
|
71
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
72
|
-
await client.listWorkspaces();
|
|
73
|
-
const headers = mockFetch.mock.calls[0][1].headers;
|
|
74
|
-
expect(headers['Authorization']).toBeUndefined();
|
|
75
|
-
});
|
|
76
|
-
it('throws on non-ok response with status and body', async () => {
|
|
77
|
-
const client = new ApiClient(defaultCreds);
|
|
78
|
-
mockFetch.mockResolvedValue(createJsonResponse({ error: 'forbidden' }, 403));
|
|
79
|
-
await expect(client.listWorkspaces()).rejects.toThrow('API error 403');
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
describe('listWorkspaces()', () => {
|
|
83
|
-
it('calls correct endpoint and unwraps data', async () => {
|
|
84
|
-
const workspaces = [{ id: 'ws-1', name: 'My Workspace' }];
|
|
85
|
-
const client = new ApiClient(defaultCreds);
|
|
86
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: workspaces }));
|
|
87
|
-
const result = await client.listWorkspaces();
|
|
88
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/workspaces', expect.anything());
|
|
89
|
-
expect(result).toEqual(workspaces);
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
describe('listApps()', () => {
|
|
93
|
-
it('calls correct endpoint without workspace filter', async () => {
|
|
94
|
-
const apps = [{ id: 'app-1', name: 'App' }];
|
|
95
|
-
const client = new ApiClient(defaultCreds);
|
|
96
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: apps }));
|
|
97
|
-
const result = await client.listApps();
|
|
98
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/apps', expect.anything());
|
|
99
|
-
expect(result).toEqual(apps);
|
|
100
|
-
});
|
|
101
|
-
it('includes workspaceId query param when provided', async () => {
|
|
102
|
-
const client = new ApiClient(defaultCreds);
|
|
103
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: [] }));
|
|
104
|
-
await client.listApps('ws-123');
|
|
105
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/apps?workspaceId=ws-123', expect.anything());
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe('getApp()', () => {
|
|
109
|
-
it('calls correct endpoint with appId', async () => {
|
|
110
|
-
const app = { id: 'app-42', name: 'Test App' };
|
|
111
|
-
const client = new ApiClient(defaultCreds);
|
|
112
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: app }));
|
|
113
|
-
const result = await client.getApp('app-42');
|
|
114
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/apps/app-42', expect.anything());
|
|
115
|
-
expect(result).toEqual(app);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
describe('initApp()', () => {
|
|
119
|
-
it('sends POST with correct body', async () => {
|
|
120
|
-
const app = { id: 'new-app', name: 'New App' };
|
|
121
|
-
const client = new ApiClient(defaultCreds);
|
|
122
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: app }));
|
|
123
|
-
const result = await client.initApp('ws-1', 'New App');
|
|
124
|
-
const callArgs = mockFetch.mock.calls[0];
|
|
125
|
-
expect(callArgs[1].method).toBe('POST');
|
|
126
|
-
expect(JSON.parse(callArgs[1].body)).toEqual({
|
|
127
|
-
workspaceId: 'ws-1',
|
|
128
|
-
appName: 'New App',
|
|
129
|
-
});
|
|
130
|
-
expect(result).toEqual(app);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
describe('startDevSession()', () => {
|
|
134
|
-
it('sends POST with appId', async () => {
|
|
135
|
-
const session = {
|
|
136
|
-
sessionId: 's-1',
|
|
137
|
-
previewUrl: 'https://preview.test',
|
|
138
|
-
appId: 'app-1',
|
|
139
|
-
};
|
|
140
|
-
const client = new ApiClient(defaultCreds);
|
|
141
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: session }));
|
|
142
|
-
const result = await client.startDevSession('app-1');
|
|
143
|
-
const callArgs = mockFetch.mock.calls[0];
|
|
144
|
-
expect(callArgs[1].method).toBe('POST');
|
|
145
|
-
expect(JSON.parse(callArgs[1].body)).toEqual({ appId: 'app-1' });
|
|
146
|
-
expect(result).toEqual(session);
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
describe('getDevStatus()', () => {
|
|
150
|
-
it('calls correct endpoint', async () => {
|
|
151
|
-
const status = {
|
|
152
|
-
sessionId: 's-1',
|
|
153
|
-
previewUrl: 'https://preview.test',
|
|
154
|
-
appId: 'app-99',
|
|
155
|
-
};
|
|
156
|
-
const client = new ApiClient(defaultCreds);
|
|
157
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: status }));
|
|
158
|
-
const result = await client.getDevStatus('app-99');
|
|
159
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/status/app-99', expect.anything());
|
|
160
|
-
expect(result).toEqual(status);
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
describe('triggerDeploy()', () => {
|
|
164
|
-
it('sends POST and returns deploymentUrl', async () => {
|
|
165
|
-
const client = new ApiClient(defaultCreds);
|
|
166
|
-
mockFetch.mockResolvedValue(createJsonResponse({
|
|
167
|
-
data: { deploymentUrl: 'https://deployed.test' },
|
|
168
|
-
}));
|
|
169
|
-
const result = await client.triggerDeploy('app-1');
|
|
170
|
-
const callArgs = mockFetch.mock.calls[0];
|
|
171
|
-
expect(callArgs[0]).toBe('https://custom.runwork.dev/api/dev/deploy/app-1');
|
|
172
|
-
expect(callArgs[1].method).toBe('POST');
|
|
173
|
-
expect(result).toEqual({ deploymentUrl: 'https://deployed.test' });
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
describe('initiateLogin()', () => {
|
|
177
|
-
it('sends POST to auth/login', async () => {
|
|
178
|
-
const loginData = {
|
|
179
|
-
sessionId: 'sess-123',
|
|
180
|
-
loginUrl: 'https://runwork.ai/cli-auth?session=sess-123',
|
|
181
|
-
};
|
|
182
|
-
const client = new ApiClient(defaultCreds);
|
|
183
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: loginData }));
|
|
184
|
-
const result = await client.initiateLogin();
|
|
185
|
-
const callArgs = mockFetch.mock.calls[0];
|
|
186
|
-
expect(callArgs[0]).toBe('https://custom.runwork.dev/api/dev/auth/login');
|
|
187
|
-
expect(callArgs[1].method).toBe('POST');
|
|
188
|
-
expect(result).toEqual(loginData);
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
describe('pollLogin()', () => {
|
|
192
|
-
it('returns credentials when available', async () => {
|
|
193
|
-
const creds = {
|
|
194
|
-
apiKey: 'new-key',
|
|
195
|
-
email: 'new@test.com',
|
|
196
|
-
baseUrl: 'https://runwork.ai',
|
|
197
|
-
};
|
|
198
|
-
const client = new ApiClient(defaultCreds);
|
|
199
|
-
mockFetch.mockResolvedValue(createJsonResponse({ data: creds }));
|
|
200
|
-
const result = await client.pollLogin('sess-123');
|
|
201
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/auth/poll/sess-123', expect.anything());
|
|
202
|
-
expect(result).toEqual(creds);
|
|
203
|
-
});
|
|
204
|
-
it('returns null on error', async () => {
|
|
205
|
-
const client = new ApiClient(defaultCreds);
|
|
206
|
-
mockFetch.mockResolvedValue(createJsonResponse({ error: 'pending' }, 404));
|
|
207
|
-
const result = await client.pollLogin('sess-123');
|
|
208
|
-
expect(result).toBeNull();
|
|
209
|
-
});
|
|
210
|
-
it('returns null when fetch throws', async () => {
|
|
211
|
-
const client = new ApiClient(defaultCreds);
|
|
212
|
-
mockFetch.mockRejectedValue(new Error('network error'));
|
|
213
|
-
const result = await client.pollLogin('sess-123');
|
|
214
|
-
expect(result).toBeNull();
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
describe('downloadSkeleton()', () => {
|
|
218
|
-
it('makes raw fetch call to skeleton endpoint', async () => {
|
|
219
|
-
const client = new ApiClient(defaultCreds);
|
|
220
|
-
const buffer = new ArrayBuffer(16);
|
|
221
|
-
mockFetch.mockResolvedValue({
|
|
222
|
-
ok: true,
|
|
223
|
-
arrayBuffer: () => Promise.resolve(buffer),
|
|
224
|
-
});
|
|
225
|
-
const result = await client.downloadSkeleton();
|
|
226
|
-
expect(mockFetch).toHaveBeenCalledWith('https://custom.runwork.dev/api/dev/skeleton', expect.objectContaining({
|
|
227
|
-
headers: expect.objectContaining({
|
|
228
|
-
Authorization: 'Bearer test-key-abc',
|
|
229
|
-
}),
|
|
230
|
-
}));
|
|
231
|
-
expect(result).toBe(buffer);
|
|
232
|
-
});
|
|
233
|
-
it('throws on non-ok response', async () => {
|
|
234
|
-
const client = new ApiClient(defaultCreds);
|
|
235
|
-
mockFetch.mockResolvedValue({
|
|
236
|
-
ok: false,
|
|
237
|
-
status: 500,
|
|
238
|
-
});
|
|
239
|
-
await expect(client.downloadSkeleton()).rejects.toThrow('Failed to download skeleton: 500');
|
|
240
|
-
});
|
|
241
|
-
it('omits Authorization when apiKey is empty', async () => {
|
|
242
|
-
const client = new ApiClient({
|
|
243
|
-
apiKey: '',
|
|
244
|
-
email: 'e@e.com',
|
|
245
|
-
baseUrl: 'https://runwork.ai',
|
|
246
|
-
});
|
|
247
|
-
mockFetch.mockResolvedValue({
|
|
248
|
-
ok: true,
|
|
249
|
-
arrayBuffer: () => Promise.resolve(new ArrayBuffer(0)),
|
|
250
|
-
});
|
|
251
|
-
await client.downloadSkeleton();
|
|
252
|
-
const headers = mockFetch.mock.calls[0][1].headers;
|
|
253
|
-
expect(headers['Authorization']).toBeUndefined();
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
describe('getGitRemoteUrl()', () => {
|
|
257
|
-
it('returns correct URL format', () => {
|
|
258
|
-
const client = new ApiClient(defaultCreds);
|
|
259
|
-
const url = client.getGitRemoteUrl('ws-1', 'app-1');
|
|
260
|
-
expect(url).toBe('https://custom.runwork.dev/api/git/ws-1/app-1');
|
|
261
|
-
});
|
|
262
|
-
it('uses default base URL when none provided', () => {
|
|
263
|
-
const client = new ApiClient({
|
|
264
|
-
apiKey: 'key',
|
|
265
|
-
email: 'e@e.com',
|
|
266
|
-
baseUrl: '',
|
|
267
|
-
});
|
|
268
|
-
const url = client.getGitRemoteUrl('ws-2', 'app-2');
|
|
269
|
-
expect(url).toBe('https://runwork.ai/api/git/ws-2/app-2');
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
});
|
package/dist/api/client.d.ts
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
import type { Credentials, AppInfo, WorkspaceInfo, DevSession, WorkspaceAllData, WorkspaceSkill, ExternalSkillRegistration, McpServerConfig, RegistryEntity, WorkflowInfo, TriggerWorkflowResponse, WorkflowInstancesData, WorkflowInstanceDetailData, ScheduleInfo, TriggerScheduleResponse, ScheduleHistoryData, WorkspaceEndpoint, FileStorageInfo, ListBucketFilesData, ComponentInfo, ApiKeyInfo, ApiKeyCreateResponse, AgentInfo, AgentStatusResponse, AgentExecutionRecord } from '../types.js';
|
|
2
|
-
export interface AgentConfigOverride {
|
|
3
|
-
extraInstructions?: string;
|
|
4
|
-
modelPreference?: string;
|
|
5
|
-
permissionRules?: {
|
|
6
|
-
allow?: string[];
|
|
7
|
-
deny?: string[];
|
|
8
|
-
defaultMode?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface OnboardingConfigResponse {
|
|
12
|
-
config: {
|
|
13
|
-
teamInstructions: string | null;
|
|
14
|
-
agentConfigs: Record<string, AgentConfigOverride> | null;
|
|
15
|
-
} | null;
|
|
16
|
-
}
|
|
17
|
-
export declare class ApiClient {
|
|
18
|
-
private baseUrl;
|
|
19
|
-
private apiKey;
|
|
20
|
-
constructor(credentials: Credentials);
|
|
21
|
-
private request;
|
|
22
|
-
listWorkspaces(): Promise<WorkspaceInfo[]>;
|
|
23
|
-
listApps(workspaceId?: string): Promise<AppInfo[]>;
|
|
24
|
-
getApp(appId: string): Promise<AppInfo>;
|
|
25
|
-
initApp(workspaceId: string, appName: string): Promise<AppInfo>;
|
|
26
|
-
startDevSession(appId: string): Promise<DevSession>;
|
|
27
|
-
getDevStatus(appId: string): Promise<DevSession>;
|
|
28
|
-
triggerDeploy(appId: string): Promise<{
|
|
29
|
-
deploymentUrl: string;
|
|
30
|
-
}>;
|
|
31
|
-
initiateLogin(): Promise<{
|
|
32
|
-
sessionId: string;
|
|
33
|
-
loginUrl: string;
|
|
34
|
-
}>;
|
|
35
|
-
pollLogin(sessionId: string): Promise<Credentials | null>;
|
|
36
|
-
getAppSkill(appId: string): Promise<{
|
|
37
|
-
skill: string;
|
|
38
|
-
appName: string;
|
|
39
|
-
}>;
|
|
40
|
-
getPreviewLogs(appId: string): Promise<{
|
|
41
|
-
stdout: string;
|
|
42
|
-
stderr: string;
|
|
43
|
-
}>;
|
|
44
|
-
getProductionLogs(appId: string, options?: {
|
|
45
|
-
limit?: number;
|
|
46
|
-
level?: string;
|
|
47
|
-
search?: string;
|
|
48
|
-
startTime?: string;
|
|
49
|
-
endTime?: string;
|
|
50
|
-
}): Promise<{
|
|
51
|
-
logs: Array<Record<string, unknown>>;
|
|
52
|
-
pagination?: {
|
|
53
|
-
total?: number;
|
|
54
|
-
hasMore?: boolean;
|
|
55
|
-
};
|
|
56
|
-
}>;
|
|
57
|
-
getAppEvents(appId: string, options?: {
|
|
58
|
-
limit?: number;
|
|
59
|
-
type?: string;
|
|
60
|
-
source?: string;
|
|
61
|
-
before?: string;
|
|
62
|
-
}): Promise<{
|
|
63
|
-
events: Array<{
|
|
64
|
-
id: string;
|
|
65
|
-
source: string;
|
|
66
|
-
type: string;
|
|
67
|
-
content: string;
|
|
68
|
-
summary?: string;
|
|
69
|
-
metadata?: Record<string, unknown>;
|
|
70
|
-
appId?: string;
|
|
71
|
-
timestamp: string;
|
|
72
|
-
}>;
|
|
73
|
-
totalCount: number;
|
|
74
|
-
hasMore: boolean;
|
|
75
|
-
}>;
|
|
76
|
-
downloadSkeleton(): Promise<ArrayBuffer>;
|
|
77
|
-
syncFiles(appId: string, files: Array<{
|
|
78
|
-
filePath: string;
|
|
79
|
-
fileContents: string;
|
|
80
|
-
}>, deletedFiles?: string[]): Promise<void>;
|
|
81
|
-
searchIntegrations(query: string, limit?: number, workspaceId?: string): Promise<{
|
|
82
|
-
results: Array<{
|
|
83
|
-
id: string;
|
|
84
|
-
name: string;
|
|
85
|
-
provider: string;
|
|
86
|
-
connectedByUser?: boolean;
|
|
87
|
-
usedByTeammates?: boolean;
|
|
88
|
-
docs?: {
|
|
89
|
-
name: string;
|
|
90
|
-
baseUrl: string;
|
|
91
|
-
pathFormat: string;
|
|
92
|
-
examples: string[];
|
|
93
|
-
notes?: string[];
|
|
94
|
-
requiredSetup?: string;
|
|
95
|
-
};
|
|
96
|
-
}>;
|
|
97
|
-
}>;
|
|
98
|
-
listConnectedIntegrations(workspaceId: string): Promise<Array<{
|
|
99
|
-
integrationId: string;
|
|
100
|
-
canonicalId?: string;
|
|
101
|
-
provider: string;
|
|
102
|
-
status?: string;
|
|
103
|
-
createdAt?: string;
|
|
104
|
-
}>>;
|
|
105
|
-
getTeamIntegrationUsage(workspaceId: string): Promise<Array<{
|
|
106
|
-
canonicalId: string;
|
|
107
|
-
integrationId: string;
|
|
108
|
-
userCount: number;
|
|
109
|
-
users: Array<{
|
|
110
|
-
id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
avatarUrl?: string | null;
|
|
113
|
-
}>;
|
|
114
|
-
connectedByMe: boolean;
|
|
115
|
-
}>>;
|
|
116
|
-
/**
|
|
117
|
-
* Get git remote URL for an app.
|
|
118
|
-
* Both canonical ({baseUrl}/api/git/{workspaceId}/{appId}) and
|
|
119
|
-
* subdomain ({slug}.runwork.ai/api/git/{appId}) formats are supported.
|
|
120
|
-
*/
|
|
121
|
-
getWorkspaceAll(workspaceId: string): Promise<WorkspaceAllData>;
|
|
122
|
-
getGitRemoteUrl(workspaceId: string, appId: string): string;
|
|
123
|
-
listWorkspaceSkills(workspaceId: string, includeContent?: boolean): Promise<WorkspaceSkill[]>;
|
|
124
|
-
listExternalSkills(workspaceId: string): Promise<ExternalSkillRegistration[]>;
|
|
125
|
-
importExternalSkill(workspaceId: string, skill: {
|
|
126
|
-
name: string;
|
|
127
|
-
description: string;
|
|
128
|
-
content: string;
|
|
129
|
-
importedFrom: string;
|
|
130
|
-
}): Promise<ExternalSkillRegistration>;
|
|
131
|
-
updateExternalSkill(workspaceId: string, skillId: string, skill: {
|
|
132
|
-
name: string;
|
|
133
|
-
description: string;
|
|
134
|
-
content: string;
|
|
135
|
-
}): Promise<ExternalSkillRegistration>;
|
|
136
|
-
getAppSkillContent(workspaceId: string, appId: string): Promise<string>;
|
|
137
|
-
listMcpServers(workspaceId: string): Promise<McpServerConfig[]>;
|
|
138
|
-
addMcpServer(workspaceId: string, server: {
|
|
139
|
-
name: string;
|
|
140
|
-
url: string;
|
|
141
|
-
transport: 'sse' | 'streamable-http';
|
|
142
|
-
}): Promise<McpServerConfig>;
|
|
143
|
-
removeMcpServer(workspaceId: string, serverId: string): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* Resolve decrypted auth headers for header-auth MCP servers, scoped to the
|
|
146
|
-
* authenticated user (their own + workspace-wide credentials). Keyed by server id.
|
|
147
|
-
*/
|
|
148
|
-
resolveMcpCredentials(workspaceId: string): Promise<Record<string, Record<string, string>>>;
|
|
149
|
-
searchCommunitySkills(query: string, limit?: number, includeContent?: boolean): Promise<{
|
|
150
|
-
query: string;
|
|
151
|
-
count: number;
|
|
152
|
-
skills: Array<{
|
|
153
|
-
id: string;
|
|
154
|
-
title: string;
|
|
155
|
-
description: string | null;
|
|
156
|
-
source: string;
|
|
157
|
-
refs: {
|
|
158
|
-
skills_sh: string;
|
|
159
|
-
github: string;
|
|
160
|
-
raw: string | null;
|
|
161
|
-
};
|
|
162
|
-
install_count: number;
|
|
163
|
-
relevance_score: number;
|
|
164
|
-
content: string | null;
|
|
165
|
-
}>;
|
|
166
|
-
}>;
|
|
167
|
-
getCommunitySkillContent(source: string, skillId: string): Promise<{
|
|
168
|
-
id: string;
|
|
169
|
-
title: string;
|
|
170
|
-
description: string | null;
|
|
171
|
-
source: string;
|
|
172
|
-
content: string | null;
|
|
173
|
-
refs: {
|
|
174
|
-
skills_sh: string;
|
|
175
|
-
github: string;
|
|
176
|
-
raw: string | null;
|
|
177
|
-
};
|
|
178
|
-
install_count: number;
|
|
179
|
-
}>;
|
|
180
|
-
searchCommunityMcpServers(query: string, limit?: number): Promise<{
|
|
181
|
-
servers: Array<{
|
|
182
|
-
name: string;
|
|
183
|
-
description: string;
|
|
184
|
-
title: string | null;
|
|
185
|
-
version: string;
|
|
186
|
-
websiteUrl: string | null;
|
|
187
|
-
remotes: Array<{
|
|
188
|
-
type: 'sse' | 'streamable-http';
|
|
189
|
-
url: string;
|
|
190
|
-
}>;
|
|
191
|
-
keywords: string[];
|
|
192
|
-
publisher: string | null;
|
|
193
|
-
}>;
|
|
194
|
-
nextCursor: string | null;
|
|
195
|
-
count: number;
|
|
196
|
-
}>;
|
|
197
|
-
listEntities(workspaceId: string): Promise<RegistryEntity[]>;
|
|
198
|
-
listEntityRecords(workspaceId: string, entityName: string, opts?: {
|
|
199
|
-
limit?: number;
|
|
200
|
-
cursor?: string;
|
|
201
|
-
deploymentMode?: string;
|
|
202
|
-
}): Promise<{
|
|
203
|
-
items: unknown[];
|
|
204
|
-
next: string | null;
|
|
205
|
-
}>;
|
|
206
|
-
getEntityRecord(workspaceId: string, entityName: string, recordId: string): Promise<{
|
|
207
|
-
item: unknown;
|
|
208
|
-
}>;
|
|
209
|
-
createEntityRecord(workspaceId: string, entityName: string, data: Record<string, unknown>): Promise<{
|
|
210
|
-
item: unknown;
|
|
211
|
-
}>;
|
|
212
|
-
updateEntityRecord(workspaceId: string, entityName: string, recordId: string, data: Record<string, unknown>): Promise<{
|
|
213
|
-
item: unknown;
|
|
214
|
-
}>;
|
|
215
|
-
deleteEntityRecord(workspaceId: string, entityName: string, recordId: string): Promise<{
|
|
216
|
-
success: boolean;
|
|
217
|
-
}>;
|
|
218
|
-
listWorkflows(workspaceId: string): Promise<WorkflowInfo[]>;
|
|
219
|
-
triggerWorkflow(workspaceId: string, opts: {
|
|
220
|
-
workflowName: string;
|
|
221
|
-
appId: string;
|
|
222
|
-
params?: Record<string, unknown>;
|
|
223
|
-
instanceId?: string;
|
|
224
|
-
}): Promise<TriggerWorkflowResponse>;
|
|
225
|
-
listWorkflowInstances(workspaceId: string, appId: string, opts?: {
|
|
226
|
-
workflowName?: string;
|
|
227
|
-
status?: string;
|
|
228
|
-
limit?: number;
|
|
229
|
-
}): Promise<WorkflowInstancesData>;
|
|
230
|
-
getWorkflowInstance(workspaceId: string, instanceId: string, appId?: string): Promise<WorkflowInstanceDetailData>;
|
|
231
|
-
listSchedules(workspaceId: string): Promise<ScheduleInfo[]>;
|
|
232
|
-
triggerSchedule(workspaceId: string, opts: {
|
|
233
|
-
scheduleName: string;
|
|
234
|
-
appId: string;
|
|
235
|
-
deploymentMode?: string;
|
|
236
|
-
}): Promise<TriggerScheduleResponse>;
|
|
237
|
-
getScheduleHistory(workspaceId: string, appId: string): Promise<ScheduleHistoryData>;
|
|
238
|
-
getScheduleStatus(workspaceId: string, appId: string): Promise<Record<string, unknown>>;
|
|
239
|
-
pauseSchedule(workspaceId: string, scheduleName: string, appId: string): Promise<void>;
|
|
240
|
-
resumeSchedule(workspaceId: string, scheduleName: string, appId: string): Promise<void>;
|
|
241
|
-
listEndpoints(workspaceId: string): Promise<WorkspaceEndpoint[]>;
|
|
242
|
-
listFileStorages(workspaceId: string): Promise<FileStorageInfo[]>;
|
|
243
|
-
listBucketFiles(workspaceId: string, bucketName: string, opts?: {
|
|
244
|
-
prefix?: string;
|
|
245
|
-
delimiter?: string;
|
|
246
|
-
}): Promise<ListBucketFilesData>;
|
|
247
|
-
getPresignedUrl(workspaceId: string, bucketName: string, opts: {
|
|
248
|
-
action: 'read' | 'write';
|
|
249
|
-
key: string;
|
|
250
|
-
expiresIn?: number;
|
|
251
|
-
}): Promise<{
|
|
252
|
-
url: string;
|
|
253
|
-
}>;
|
|
254
|
-
deleteBucketFile(workspaceId: string, bucketName: string, key: string): Promise<void>;
|
|
255
|
-
listComponents(workspaceId: string): Promise<ComponentInfo[]>;
|
|
256
|
-
listApiKeys(workspaceId: string): Promise<ApiKeyInfo[]>;
|
|
257
|
-
createApiKey(workspaceId: string, opts: {
|
|
258
|
-
name: string;
|
|
259
|
-
appId?: string;
|
|
260
|
-
allowedEndpoints?: string[];
|
|
261
|
-
scopes?: string[];
|
|
262
|
-
}): Promise<ApiKeyCreateResponse>;
|
|
263
|
-
listAgents(workspaceId: string): Promise<AgentInfo[]>;
|
|
264
|
-
getAgentStatus(workspaceId: string, agentName: string, appId: string): Promise<AgentStatusResponse>;
|
|
265
|
-
listAgentExecutions(workspaceId: string): Promise<AgentExecutionRecord[]>;
|
|
266
|
-
getAgentExecutionStream(workspaceId: string, sessionId: string): Promise<string>;
|
|
267
|
-
getOnboardingConfig(workspaceId: string): Promise<OnboardingConfigResponse>;
|
|
268
|
-
reportTelemetry(workspaceId: string, events: Array<{
|
|
269
|
-
eventType: string;
|
|
270
|
-
agentSlug?: string;
|
|
271
|
-
metadata?: Record<string, unknown>;
|
|
272
|
-
timestamp: string;
|
|
273
|
-
}>): Promise<void>;
|
|
274
|
-
createSharedConversation(workspaceId: string, body: {
|
|
275
|
-
recipients?: string[];
|
|
276
|
-
isPersonal?: boolean;
|
|
277
|
-
sourceAgent: string;
|
|
278
|
-
title: string;
|
|
279
|
-
note?: string;
|
|
280
|
-
bundles: Array<{
|
|
281
|
-
format: string;
|
|
282
|
-
content: string;
|
|
283
|
-
sizeBytes: number;
|
|
284
|
-
sha256: string;
|
|
285
|
-
}>;
|
|
286
|
-
metadata?: Record<string, unknown>;
|
|
287
|
-
ttlDays?: number;
|
|
288
|
-
}): Promise<{
|
|
289
|
-
share: {
|
|
290
|
-
id: string;
|
|
291
|
-
title: string;
|
|
292
|
-
expiresAt: string;
|
|
293
|
-
};
|
|
294
|
-
sharedCount: number;
|
|
295
|
-
invitedCount: number;
|
|
296
|
-
skipped: Array<{
|
|
297
|
-
identifier: string;
|
|
298
|
-
reason: string;
|
|
299
|
-
}>;
|
|
300
|
-
}>;
|
|
301
|
-
listSharedConversations(workspaceId: string, opts?: {
|
|
302
|
-
scope?: 'all' | 'received' | 'sent' | 'saved';
|
|
303
|
-
limit?: number;
|
|
304
|
-
offset?: number;
|
|
305
|
-
}): Promise<{
|
|
306
|
-
shares: Array<Record<string, unknown>>;
|
|
307
|
-
total: number;
|
|
308
|
-
}>;
|
|
309
|
-
getSharedConversation(workspaceId: string, shareId: string): Promise<{
|
|
310
|
-
share: Record<string, unknown>;
|
|
311
|
-
}>;
|
|
312
|
-
downloadSharedConversationBundle(workspaceId: string, shareId: string, format: string): Promise<{
|
|
313
|
-
format: string;
|
|
314
|
-
content: string;
|
|
315
|
-
sizeBytes: number;
|
|
316
|
-
sha256: string;
|
|
317
|
-
}>;
|
|
318
|
-
markSharedConversationResumed(workspaceId: string, shareId: string): Promise<{
|
|
319
|
-
success: boolean;
|
|
320
|
-
}>;
|
|
321
|
-
callIntegrationProxy(integrationDbId: string, method: string, path: string, opts?: {
|
|
322
|
-
body?: unknown;
|
|
323
|
-
headers?: Record<string, string>;
|
|
324
|
-
query?: string;
|
|
325
|
-
}): Promise<unknown>;
|
|
326
|
-
}
|