chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
import type { DeploymentsDeployParams, DeploymentsDeployResponse } from '@/tools/deployments/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deploymentsDeployTool: ToolConfig<DeploymentsDeployParams, DeploymentsDeployResponse> =
|
||||
{
|
||||
id: 'deployments_deploy',
|
||||
name: 'Deploy Workflow',
|
||||
description:
|
||||
'Deploy a workflow’s current draft state, creating a new deployment version and making it live for API execution. Requires admin permission on the workflow’s workspace.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the workflow to deploy',
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Optional label for the new deployment version',
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Optional summary of what changed in this version',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/deployments/deploy',
|
||||
method: 'POST',
|
||||
headers: () => ({ 'Content-Type': 'application/json' }),
|
||||
body: (params) => {
|
||||
const workspaceId = params._context?.workspaceId
|
||||
if (!workspaceId) {
|
||||
throw new Error('workspaceId is required in execution context')
|
||||
}
|
||||
return {
|
||||
workflowId: params.workflowId,
|
||||
workspaceId,
|
||||
...(params.name ? { name: params.name } : {}),
|
||||
...(params.description ? { description: params.description } : {}),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response) => response.json(),
|
||||
|
||||
outputs: {
|
||||
workflowId: { type: 'string', description: 'ID of the deployed workflow' },
|
||||
isDeployed: { type: 'boolean', description: 'Whether the workflow is now deployed' },
|
||||
deployedAt: {
|
||||
type: 'string',
|
||||
description: 'ISO 8601 timestamp of the deployment (null if unavailable)',
|
||||
},
|
||||
version: {
|
||||
type: 'number',
|
||||
description: 'The deployment version that is now active',
|
||||
optional: true,
|
||||
},
|
||||
warnings: {
|
||||
type: 'array',
|
||||
description: 'Non-fatal warnings (e.g. trigger or schedule sync still in progress)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import type {
|
||||
DeploymentsGetVersionParams,
|
||||
DeploymentsGetVersionResponse,
|
||||
} from '@/tools/deployments/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deploymentsGetVersionTool: ToolConfig<
|
||||
DeploymentsGetVersionParams,
|
||||
DeploymentsGetVersionResponse
|
||||
> = {
|
||||
id: 'deployments_get_version',
|
||||
name: 'Get Deployment Version',
|
||||
description:
|
||||
'Fetch a single deployment version of a workflow, including its metadata and the full workflow state snapshot that was deployed.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the workflow',
|
||||
},
|
||||
version: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The deployment version number to fetch',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const workspaceId = params._context?.workspaceId
|
||||
if (!workspaceId) {
|
||||
throw new Error('workspaceId is required in execution context')
|
||||
}
|
||||
const qs = new URLSearchParams({
|
||||
workflowId: params.workflowId,
|
||||
workspaceId,
|
||||
version: String(params.version),
|
||||
})
|
||||
return `/api/tools/deployments/version?${qs.toString()}`
|
||||
},
|
||||
method: 'GET',
|
||||
headers: () => ({ 'Content-Type': 'application/json' }),
|
||||
},
|
||||
|
||||
transformResponse: async (response) => response.json(),
|
||||
|
||||
outputs: {
|
||||
workflowId: { type: 'string', description: 'ID of the workflow' },
|
||||
version: { type: 'number', description: 'The deployment version number' },
|
||||
name: { type: 'string', description: 'Version label', optional: true },
|
||||
description: { type: 'string', description: 'Version description', optional: true },
|
||||
isActive: { type: 'boolean', description: 'Whether this version is currently live' },
|
||||
createdAt: { type: 'string', description: 'When this version was deployed (ISO 8601)' },
|
||||
deployedState: {
|
||||
type: 'json',
|
||||
description: 'The full workflow state snapshot (blocks, edges, loops, parallels, variables)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { deploymentsDeployTool } from '@/tools/deployments/deploy'
|
||||
export { deploymentsGetVersionTool } from '@/tools/deployments/get_version'
|
||||
export { deploymentsListVersionsTool } from '@/tools/deployments/list_versions'
|
||||
export { deploymentsPromoteTool } from '@/tools/deployments/promote'
|
||||
export { deploymentsUndeployTool } from '@/tools/deployments/undeploy'
|
||||
@@ -0,0 +1,49 @@
|
||||
import type {
|
||||
DeploymentsListVersionsParams,
|
||||
DeploymentsListVersionsResponse,
|
||||
} from '@/tools/deployments/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deploymentsListVersionsTool: ToolConfig<
|
||||
DeploymentsListVersionsParams,
|
||||
DeploymentsListVersionsResponse
|
||||
> = {
|
||||
id: 'deployments_list_versions',
|
||||
name: 'List Deployment Versions',
|
||||
description:
|
||||
'List every deployment version of a workflow, newest first, including which version is currently live.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the workflow',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const workspaceId = params._context?.workspaceId
|
||||
if (!workspaceId) {
|
||||
throw new Error('workspaceId is required in execution context')
|
||||
}
|
||||
const qs = new URLSearchParams({ workflowId: params.workflowId, workspaceId })
|
||||
return `/api/tools/deployments/versions?${qs.toString()}`
|
||||
},
|
||||
method: 'GET',
|
||||
headers: () => ({ 'Content-Type': 'application/json' }),
|
||||
},
|
||||
|
||||
transformResponse: async (response) => response.json(),
|
||||
|
||||
outputs: {
|
||||
workflowId: { type: 'string', description: 'ID of the workflow' },
|
||||
versions: {
|
||||
type: 'array',
|
||||
description:
|
||||
'Deployment versions, newest first (id, version, name, description, isActive, createdAt, createdBy, deployedByName)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import type {
|
||||
DeploymentsPromoteParams,
|
||||
DeploymentsPromoteResponse,
|
||||
} from '@/tools/deployments/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deploymentsPromoteTool: ToolConfig<
|
||||
DeploymentsPromoteParams,
|
||||
DeploymentsPromoteResponse
|
||||
> = {
|
||||
id: 'deployments_promote',
|
||||
name: 'Promote Version to Live',
|
||||
description:
|
||||
'Make a specific deployment version the live one without creating a new version — the same operation as Promote to live in the deploy modal. Useful for rolling back to a known-good version. Also works on an undeployed workflow: it re-deploys the workflow live at that version. Requires admin permission on the workflow’s workspace.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the workflow',
|
||||
},
|
||||
version: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The deployment version number to promote to live',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/deployments/promote',
|
||||
method: 'POST',
|
||||
headers: () => ({ 'Content-Type': 'application/json' }),
|
||||
body: (params) => {
|
||||
const workspaceId = params._context?.workspaceId
|
||||
if (!workspaceId) {
|
||||
throw new Error('workspaceId is required in execution context')
|
||||
}
|
||||
return {
|
||||
workflowId: params.workflowId,
|
||||
workspaceId,
|
||||
version: Number(params.version),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response) => response.json(),
|
||||
|
||||
outputs: {
|
||||
workflowId: { type: 'string', description: 'ID of the workflow' },
|
||||
isDeployed: { type: 'boolean', description: 'Whether the workflow is now deployed' },
|
||||
deployedAt: {
|
||||
type: 'string',
|
||||
description: 'ISO 8601 timestamp of the active deployment (null if unavailable)',
|
||||
},
|
||||
version: { type: 'number', description: 'The deployment version that is now live' },
|
||||
warnings: {
|
||||
type: 'array',
|
||||
description: 'Non-fatal warnings (e.g. trigger or schedule sync still in progress)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import type { ToolResponse, WorkflowToolExecutionContext } from '@/tools/types'
|
||||
|
||||
export interface DeploymentsDeployParams {
|
||||
workflowId: string
|
||||
name?: string
|
||||
description?: string
|
||||
_context?: WorkflowToolExecutionContext
|
||||
}
|
||||
|
||||
export interface DeploymentsUndeployParams {
|
||||
workflowId: string
|
||||
_context?: WorkflowToolExecutionContext
|
||||
}
|
||||
|
||||
export interface DeploymentsPromoteParams {
|
||||
workflowId: string
|
||||
version: number
|
||||
_context?: WorkflowToolExecutionContext
|
||||
}
|
||||
|
||||
export interface DeploymentsListVersionsParams {
|
||||
workflowId: string
|
||||
_context?: WorkflowToolExecutionContext
|
||||
}
|
||||
|
||||
export interface DeploymentsGetVersionParams {
|
||||
workflowId: string
|
||||
version: number
|
||||
_context?: WorkflowToolExecutionContext
|
||||
}
|
||||
|
||||
export interface DeploymentVersionSummary {
|
||||
id: string
|
||||
version: number
|
||||
name: string | null
|
||||
description: string | null
|
||||
isActive: boolean
|
||||
createdAt: string
|
||||
createdBy: string | null
|
||||
deployedByName: string | null
|
||||
}
|
||||
|
||||
export interface DeploymentsDeployResponse extends ToolResponse {
|
||||
output: {
|
||||
workflowId: string
|
||||
isDeployed: boolean
|
||||
deployedAt: string | null
|
||||
version?: number
|
||||
warnings: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeploymentsUndeployResponse extends ToolResponse {
|
||||
output: {
|
||||
workflowId: string
|
||||
isDeployed: boolean
|
||||
deployedAt: null
|
||||
warnings: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeploymentsPromoteResponse extends ToolResponse {
|
||||
output: {
|
||||
workflowId: string
|
||||
isDeployed: boolean
|
||||
deployedAt: string | null
|
||||
version: number
|
||||
warnings: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeploymentsListVersionsResponse extends ToolResponse {
|
||||
output: {
|
||||
workflowId: string
|
||||
versions: DeploymentVersionSummary[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeploymentsGetVersionResponse extends ToolResponse {
|
||||
output: {
|
||||
workflowId: string
|
||||
version: number
|
||||
name: string | null
|
||||
description: string | null
|
||||
isActive: boolean
|
||||
createdAt: string
|
||||
deployedState: unknown
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import type {
|
||||
DeploymentsUndeployParams,
|
||||
DeploymentsUndeployResponse,
|
||||
} from '@/tools/deployments/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deploymentsUndeployTool: ToolConfig<
|
||||
DeploymentsUndeployParams,
|
||||
DeploymentsUndeployResponse
|
||||
> = {
|
||||
id: 'deployments_undeploy',
|
||||
name: 'Undeploy Workflow',
|
||||
description:
|
||||
'Take a deployed workflow offline. API execution stops and schedules, webhooks, and other deployment side effects are removed. Requires admin permission on the workflow’s workspace.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the workflow to undeploy',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/deployments/undeploy',
|
||||
method: 'POST',
|
||||
headers: () => ({ 'Content-Type': 'application/json' }),
|
||||
body: (params) => {
|
||||
const workspaceId = params._context?.workspaceId
|
||||
if (!workspaceId) {
|
||||
throw new Error('workspaceId is required in execution context')
|
||||
}
|
||||
return { workflowId: params.workflowId, workspaceId }
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response) => response.json(),
|
||||
|
||||
outputs: {
|
||||
workflowId: { type: 'string', description: 'ID of the undeployed workflow' },
|
||||
isDeployed: { type: 'boolean', description: 'Whether the workflow is still deployed (false)' },
|
||||
deployedAt: {
|
||||
type: 'string',
|
||||
description: 'Always null after an undeploy',
|
||||
optional: true,
|
||||
},
|
||||
warnings: {
|
||||
type: 'array',
|
||||
description: 'Non-fatal warnings (e.g. trigger or schedule cleanup still in progress)',
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user