Skip to content
Ona Docs

Automations

CancelWorkflowExecution
client.automations.cancelExecution(AutomationCancelExecutionParams { workflowExecutionId } body, RequestOptionsoptions?): AutomationCancelExecutionResponse
POST/gitpod.v1.WorkflowService/CancelWorkflowExecution
CancelWorkflowExecutionAction
client.automations.cancelExecutionAction(AutomationCancelExecutionActionParams { workflowExecutionActionId } body, RequestOptionsoptions?): AutomationCancelExecutionActionResponse
POST/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction
CreateWorkflow
client.automations.create(AutomationCreateParams { action, description, executor, 3 more } body, RequestOptionsoptions?): AutomationCreateResponse { workflow }
POST/gitpod.v1.WorkflowService/CreateWorkflow
DeleteWorkflow
client.automations.delete(AutomationDeleteParams { force, workflowId } body, RequestOptionsoptions?): AutomationDeleteResponse
POST/gitpod.v1.WorkflowService/DeleteWorkflow
ListWorkflows
client.automations.list(AutomationListParams { token, pageSize, filter, 2 more } params, RequestOptionsoptions?): WorkflowsPage<Workflow { id, metadata, spec, webhookUrl } >
POST/gitpod.v1.WorkflowService/ListWorkflows
ListWorkflowExecutionActions
client.automations.listExecutionActions(AutomationListExecutionActionsParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): WorkflowExecutionActionsPage<WorkflowExecutionAction { id, metadata, spec, status } >
POST/gitpod.v1.WorkflowService/ListWorkflowExecutionActions
ListWorkflowExecutionOutputs
client.automations.listExecutionOutputs(AutomationListExecutionOutputsParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): OutputsPage<AutomationListExecutionOutputsResponse { actionId, values } >
POST/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs
ListWorkflowExecutions
client.automations.listExecutions(AutomationListExecutionsParams { token, pageSize, filter, 2 more } params, RequestOptionsoptions?): WorkflowExecutionsPage<WorkflowExecution { id, metadata, spec, status } >
POST/gitpod.v1.WorkflowService/ListWorkflowExecutions
GetWorkflow
client.automations.retrieve(AutomationRetrieveParams { workflowId } body, RequestOptionsoptions?): AutomationRetrieveResponse { workflow }
POST/gitpod.v1.WorkflowService/GetWorkflow
GetWorkflowExecution
client.automations.retrieveExecution(AutomationRetrieveExecutionParams { workflowExecutionId } body, RequestOptionsoptions?): AutomationRetrieveExecutionResponse { workflowExecution }
POST/gitpod.v1.WorkflowService/GetWorkflowExecution
GetWorkflowExecutionAction
client.automations.retrieveExecutionAction(AutomationRetrieveExecutionActionParams { workflowExecutionActionId } body, RequestOptionsoptions?): AutomationRetrieveExecutionActionResponse { workflowExecutionAction }
POST/gitpod.v1.WorkflowService/GetWorkflowExecutionAction
StartWorkflow
client.automations.startExecution(AutomationStartExecutionParams { contextOverride, parameters, workflowId } body, RequestOptionsoptions?): AutomationStartExecutionResponse { workflowExecution }
POST/gitpod.v1.WorkflowService/StartWorkflow
UpdateWorkflow
client.automations.update(AutomationUpdateParams { action, description, disabled, 5 more } body, RequestOptionsoptions?): AutomationUpdateResponse { workflow }
POST/gitpod.v1.WorkflowService/UpdateWorkflow
ModelsExpand Collapse
Workflow { id, metadata, spec, webhookUrl }

Workflow represents a workflow configuration.

id?: string
formatuuid
metadata?: Metadata { createdAt, creator, description, 3 more }

WorkflowMetadata contains workflow metadata.

createdAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description?: string
maxLength500
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name?: string
maxLength80
minLength1
updatedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
spec?: Spec { action, report, triggers }
action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers?: Array<WorkflowTrigger { context, manual, pullRequest, time } >
context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pullRequest?: PullRequest { events, integrationId, webhookId }

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events?: Array<"PULL_REQUEST_EVENT_UNSPECIFIED" | "PULL_REQUEST_EVENT_OPENED" | "PULL_REQUEST_EVENT_UPDATED" | 4 more>
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integrationId?: string | null

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhookId?: string | null

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time?: Time { cronExpression }

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cronExpression?: string

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhookUrl?: string

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
WorkflowExecution { id, metadata, spec, status }

WorkflowExecution represents a workflow execution instance.

id?: string
formatuuid
metadata?: Metadata { creator, executor, finishedAt, 2 more }

WorkflowExecutionMetadata contains workflow execution metadata.

creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
workflowId?: string
formatuuid
spec?: Spec { action, report, trigger }

WorkflowExecutionSpec contains the specification used for this execution.

action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger?: Trigger { context, manual, pullRequest, time }

WorkflowExecutionTrigger represents a workflow execution trigger instance.

context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - empty message since no additional data needed

pullRequest?: PullRequest { id, author, draft, 6 more }

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id?: string

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

author?: string

Author name as provided by the SCM system

draft?: boolean

Whether this is a draft pull request

fromBranch?: string

Source branch name (the branch being merged from)

repository?: Repository { cloneUrl, host, name, owner }

Repository information

cloneUrl?: string
host?: string
name?: string
owner?: string
state?: State

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title?: string

Pull request title

toBranch?: string

Target branch name (the branch being merged into)

url?: string

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

time?: Time { triggeredAt }

Time trigger - just the timestamp when it was triggered

triggeredAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
status?: Status { doneActionCount, failedActionCount, failures, 5 more }

WorkflowExecutionStatus contains the current status of a workflow execution.

doneActionCount?: number
formatint32
failedActionCount?: number
formatint32
failures?: Array<Failure>

Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
pendingActionCount?: number
formatint32
phase?: "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" | "WORKFLOW_EXECUTION_PHASE_PENDING" | "WORKFLOW_EXECUTION_PHASE_RUNNING" | 5 more
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
runningActionCount?: number
formatint32
stoppedActionCount?: number
formatint32
warnings?: Array<Warning>

Structured warnings about the workflow execution. Provides detailed warning codes and messages.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
WorkflowExecutionAction { id, metadata, spec, status }

WorkflowExecutionAction represents a workflow execution action instance.

id?: string
formatuuid
metadata?: Metadata { actionName, finishedAt, startedAt, 2 more }

WorkflowExecutionActionMetadata contains workflow execution action metadata.

actionName?: string

Human-readable name for this action based on its context. Examples: “gitpod-io/gitpod-next” for repository context, “My Project” for project context. Will be empty string for actions created before this field was added.

finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
workflowExecutionId?: string
formatuuid
workflowId?: string
formatuuid
spec?: Spec { context, limits }

WorkflowExecutionActionSpec contains the specification for this execution action.

context?: AgentCodeContext { contextUrl, environmentId, projectId, pullRequest }

Context for the execution action - specifies where and how the action executes. This is resolved from the workflow trigger context and contains the specific project, repository, or agent context for this execution instance.

contextUrl?: ContextURL { environmentClassId, url }
environmentClassId?: string
formatuuid
url?: string
formaturi
environmentId?: string
formatuuid
projectId?: string
formatuuid
pullRequest?: PullRequest | null

Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension

id?: string

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

author?: string

Author name as provided by the SCM system

draft?: boolean

Whether this is a draft pull request

fromBranch?: string

Source branch name (the branch being merged from)

repository?: Repository { cloneUrl, host, name, owner }

Repository information

cloneUrl?: string
host?: string
name?: string
owner?: string
state?: State

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title?: string

Pull request title

toBranch?: string

Target branch name (the branch being merged into)

url?: string

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

limits?: Limits { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
status?: Status { agentExecutionId, environmentId, failures, 3 more }

WorkflowExecutionActionStatus contains the current status of a workflow execution action.

agentExecutionId?: string
environmentId?: string
formatuuid
failures?: Array<Failure>

Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
phase?: "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED" | "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING" | "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING" | 5 more

WorkflowExecutionActionPhase defines the phases of workflow execution action.

One of the following:
"WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
stepStatuses?: Array<StepStatus>

Step-level progress tracking

error?: Error { code, message, meta, 2 more }

Structured error that caused the step to fail. Provides detailed error code, message, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
phase?: "STEP_PHASE_UNSPECIFIED" | "STEP_PHASE_PENDING" | "STEP_PHASE_RUNNING" | 3 more
One of the following:
"STEP_PHASE_UNSPECIFIED"
"STEP_PHASE_PENDING"
"STEP_PHASE_RUNNING"
"STEP_PHASE_DONE"
"STEP_PHASE_FAILED"
"STEP_PHASE_CANCELLED"
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
step?: WorkflowStep { agent, pullRequest, task }

The step definition captured at execution time for immutability. This ensures the UI shows the correct step even if the workflow definition changes.

agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
stepIndex?: number

Index of the step in the workflow action steps array

formatint32
warnings?: Array<Warning>

Structured warnings about the workflow execution action. Provides detailed warning codes and messages.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
WorkflowStep { agent, pullRequest, task }

WorkflowStep defines a single step in a workflow action.

agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
WorkflowTrigger { context, manual, pullRequest, time }

WorkflowTrigger defines when a workflow should be executed.

Each trigger type defines a specific condition that will cause the workflow to execute:

  • Manual: Triggered explicitly by user action via StartWorkflow RPC
  • Time: Triggered automatically based on cron schedule
  • PullRequest: Triggered automatically when specified PR events occur

Trigger Semantics:

  • Each trigger instance can create multiple workflow executions
  • Multiple triggers of the same workflow can fire simultaneously
  • Each trigger execution is independent and tracked separately
  • Triggers are evaluated in the context specified by WorkflowTriggerContext
context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pullRequest?: PullRequest { events, integrationId, webhookId }

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events?: Array<"PULL_REQUEST_EVENT_UNSPECIFIED" | "PULL_REQUEST_EVENT_OPENED" | "PULL_REQUEST_EVENT_UPDATED" | 4 more>
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integrationId?: string | null

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhookId?: string | null

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time?: Time { cronExpression }

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cronExpression?: string

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
AutomationCancelExecutionResponse = unknown
AutomationCancelExecutionActionResponse = unknown
AutomationCreateResponse { workflow }
workflow?: Workflow { id, metadata, spec, webhookUrl }

Workflow represents a workflow configuration.

id?: string
formatuuid
metadata?: Metadata { createdAt, creator, description, 3 more }

WorkflowMetadata contains workflow metadata.

createdAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description?: string
maxLength500
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name?: string
maxLength80
minLength1
updatedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
spec?: Spec { action, report, triggers }
action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers?: Array<WorkflowTrigger { context, manual, pullRequest, time } >
context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pullRequest?: PullRequest { events, integrationId, webhookId }

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events?: Array<"PULL_REQUEST_EVENT_UNSPECIFIED" | "PULL_REQUEST_EVENT_OPENED" | "PULL_REQUEST_EVENT_UPDATED" | 4 more>
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integrationId?: string | null

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhookId?: string | null

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time?: Time { cronExpression }

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cronExpression?: string

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhookUrl?: string

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

AutomationDeleteResponse = unknown
AutomationListExecutionOutputsResponse { actionId, values }
actionId?: string
values?: Record<string, Values>
boolValue?: boolean
floatValue?: number
formatdouble
intValue?: string
stringValue?: string
maxLength4096
AutomationRetrieveResponse { workflow }
workflow?: Workflow { id, metadata, spec, webhookUrl }

Workflow represents a workflow configuration.

id?: string
formatuuid
metadata?: Metadata { createdAt, creator, description, 3 more }

WorkflowMetadata contains workflow metadata.

createdAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description?: string
maxLength500
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name?: string
maxLength80
minLength1
updatedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
spec?: Spec { action, report, triggers }
action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers?: Array<WorkflowTrigger { context, manual, pullRequest, time } >
context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pullRequest?: PullRequest { events, integrationId, webhookId }

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events?: Array<"PULL_REQUEST_EVENT_UNSPECIFIED" | "PULL_REQUEST_EVENT_OPENED" | "PULL_REQUEST_EVENT_UPDATED" | 4 more>
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integrationId?: string | null

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhookId?: string | null

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time?: Time { cronExpression }

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cronExpression?: string

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhookUrl?: string

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

AutomationRetrieveExecutionResponse { workflowExecution }
workflowExecution?: WorkflowExecution { id, metadata, spec, status }

WorkflowExecution represents a workflow execution instance.

id?: string
formatuuid
metadata?: Metadata { creator, executor, finishedAt, 2 more }

WorkflowExecutionMetadata contains workflow execution metadata.

creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
workflowId?: string
formatuuid
spec?: Spec { action, report, trigger }

WorkflowExecutionSpec contains the specification used for this execution.

action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger?: Trigger { context, manual, pullRequest, time }

WorkflowExecutionTrigger represents a workflow execution trigger instance.

context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - empty message since no additional data needed

pullRequest?: PullRequest { id, author, draft, 6 more }

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id?: string

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

author?: string

Author name as provided by the SCM system

draft?: boolean

Whether this is a draft pull request

fromBranch?: string

Source branch name (the branch being merged from)

repository?: Repository { cloneUrl, host, name, owner }

Repository information

cloneUrl?: string
host?: string
name?: string
owner?: string
state?: State

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title?: string

Pull request title

toBranch?: string

Target branch name (the branch being merged into)

url?: string

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

time?: Time { triggeredAt }

Time trigger - just the timestamp when it was triggered

triggeredAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
status?: Status { doneActionCount, failedActionCount, failures, 5 more }

WorkflowExecutionStatus contains the current status of a workflow execution.

doneActionCount?: number
formatint32
failedActionCount?: number
formatint32
failures?: Array<Failure>

Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
pendingActionCount?: number
formatint32
phase?: "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" | "WORKFLOW_EXECUTION_PHASE_PENDING" | "WORKFLOW_EXECUTION_PHASE_RUNNING" | 5 more
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
runningActionCount?: number
formatint32
stoppedActionCount?: number
formatint32
warnings?: Array<Warning>

Structured warnings about the workflow execution. Provides detailed warning codes and messages.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
AutomationRetrieveExecutionActionResponse { workflowExecutionAction }
workflowExecutionAction?: WorkflowExecutionAction { id, metadata, spec, status }

WorkflowExecutionAction represents a workflow execution action instance.

id?: string
formatuuid
metadata?: Metadata { actionName, finishedAt, startedAt, 2 more }

WorkflowExecutionActionMetadata contains workflow execution action metadata.

actionName?: string

Human-readable name for this action based on its context. Examples: “gitpod-io/gitpod-next” for repository context, “My Project” for project context. Will be empty string for actions created before this field was added.

finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
workflowExecutionId?: string
formatuuid
workflowId?: string
formatuuid
spec?: Spec { context, limits }

WorkflowExecutionActionSpec contains the specification for this execution action.

context?: AgentCodeContext { contextUrl, environmentId, projectId, pullRequest }

Context for the execution action - specifies where and how the action executes. This is resolved from the workflow trigger context and contains the specific project, repository, or agent context for this execution instance.

contextUrl?: ContextURL { environmentClassId, url }
environmentClassId?: string
formatuuid
url?: string
formaturi
environmentId?: string
formatuuid
projectId?: string
formatuuid
pullRequest?: PullRequest | null

Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension

id?: string

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

author?: string

Author name as provided by the SCM system

draft?: boolean

Whether this is a draft pull request

fromBranch?: string

Source branch name (the branch being merged from)

repository?: Repository { cloneUrl, host, name, owner }

Repository information

cloneUrl?: string
host?: string
name?: string
owner?: string
state?: State

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title?: string

Pull request title

toBranch?: string

Target branch name (the branch being merged into)

url?: string

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

limits?: Limits { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
status?: Status { agentExecutionId, environmentId, failures, 3 more }

WorkflowExecutionActionStatus contains the current status of a workflow execution action.

agentExecutionId?: string
environmentId?: string
formatuuid
failures?: Array<Failure>

Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
phase?: "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED" | "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING" | "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING" | 5 more

WorkflowExecutionActionPhase defines the phases of workflow execution action.

One of the following:
"WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
stepStatuses?: Array<StepStatus>

Step-level progress tracking

error?: Error { code, message, meta, 2 more }

Structured error that caused the step to fail. Provides detailed error code, message, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
phase?: "STEP_PHASE_UNSPECIFIED" | "STEP_PHASE_PENDING" | "STEP_PHASE_RUNNING" | 3 more
One of the following:
"STEP_PHASE_UNSPECIFIED"
"STEP_PHASE_PENDING"
"STEP_PHASE_RUNNING"
"STEP_PHASE_DONE"
"STEP_PHASE_FAILED"
"STEP_PHASE_CANCELLED"
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
step?: WorkflowStep { agent, pullRequest, task }

The step definition captured at execution time for immutability. This ensures the UI shows the correct step even if the workflow definition changes.

agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
stepIndex?: number

Index of the step in the workflow action steps array

formatint32
warnings?: Array<Warning>

Structured warnings about the workflow execution action. Provides detailed warning codes and messages.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
AutomationStartExecutionResponse { workflowExecution }
workflowExecution?: WorkflowExecution { id, metadata, spec, status }

WorkflowExecution represents a workflow execution instance.

id?: string
formatuuid
metadata?: Metadata { creator, executor, finishedAt, 2 more }

WorkflowExecutionMetadata contains workflow execution metadata.

creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finishedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
startedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
workflowId?: string
formatuuid
spec?: Spec { action, report, trigger }

WorkflowExecutionSpec contains the specification used for this execution.

action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger?: Trigger { context, manual, pullRequest, time }

WorkflowExecutionTrigger represents a workflow execution trigger instance.

context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - empty message since no additional data needed

pullRequest?: PullRequest { id, author, draft, 6 more }

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id?: string

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

author?: string

Author name as provided by the SCM system

draft?: boolean

Whether this is a draft pull request

fromBranch?: string

Source branch name (the branch being merged from)

repository?: Repository { cloneUrl, host, name, owner }

Repository information

cloneUrl?: string
host?: string
name?: string
owner?: string
state?: State

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title?: string

Pull request title

toBranch?: string

Target branch name (the branch being merged into)

url?: string

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

time?: Time { triggeredAt }

Time trigger - just the timestamp when it was triggered

triggeredAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
status?: Status { doneActionCount, failedActionCount, failures, 5 more }

WorkflowExecutionStatus contains the current status of a workflow execution.

doneActionCount?: number
formatint32
failedActionCount?: number
formatint32
failures?: Array<Failure>

Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
pendingActionCount?: number
formatint32
phase?: "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" | "WORKFLOW_EXECUTION_PHASE_PENDING" | "WORKFLOW_EXECUTION_PHASE_RUNNING" | 5 more
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
runningActionCount?: number
formatint32
stoppedActionCount?: number
formatint32
warnings?: Array<Warning>

Structured warnings about the workflow execution. Provides detailed warning codes and messages.

code?: "WORKFLOW_ERROR_CODE_UNSPECIFIED" | "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" | "WORKFLOW_ERROR_CODE_AGENT_ERROR"

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message?: string

Human-readable error message.

meta?: Record<string, string>

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
reason?: string

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

retry?: Retry | null

Retry configuration. If not set, the error is considered non-retriable.

retriable?: boolean

Whether the error is retriable.

retryAfter?: string

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
AutomationUpdateResponse { workflow }
workflow?: Workflow { id, metadata, spec, webhookUrl }

Workflow represents a workflow configuration.

id?: string
formatuuid
metadata?: Metadata { createdAt, creator, description, 3 more }

WorkflowMetadata contains workflow metadata.

createdAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description?: string
maxLength500
executor?: Subject { id, principal }
id?: string

id is the UUID of the subject

formatuuid
principal?: Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name?: string
maxLength80
minLength1
updatedAt?: string

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
spec?: Spec { action, report, triggers }
action?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report?: WorkflowAction { limits, steps }

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits { maxParallel, maxTotal, perExecution }

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
maxParallel?: number

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
maxTotal?: number

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
perExecution?: PerExecution { maxTime }

PerExecution defines limits per execution action.

maxTime?: string

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
steps?: Array<WorkflowStep { agent, pullRequest, task } >

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent?: Agent { prompt }

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt?: string

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pullRequest?: PullRequest { branch, description, draft, title }

WorkflowPullRequestStep represents a pull request creation step.

branch?: string

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description?: string

Description must be at most 20,000 characters:

size(this) <= 20000
draft?: boolean
title?: string

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task?: Task { command }

WorkflowTaskStep represents a task step that executes a command.

command?: string

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers?: Array<WorkflowTrigger { context, manual, pullRequest, time } >
context: WorkflowTriggerContext { agent, fromTrigger, projects, repositories }

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent?: Agent { prompt }

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt?: string

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
fromTrigger?: unknown

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects?: Projects { projectIds }

Execute workflow in specific project environments. Creates environments for each specified project.

projectIds?: Array<string>
repositories?: Repositories { environmentClassId, repoSelector, repositoryUrls }

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environmentClassId?: string
formatuuid
repoSelector?: RepoSelector { repoSearchString, scmHost }

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repoSearchString?: string

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scmHost?: string

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repositoryUrls?: RepositoryURLs { repoUrls }

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repoUrls?: Array<string>
manual?: unknown

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pullRequest?: PullRequest { events, integrationId, webhookId }

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events?: Array<"PULL_REQUEST_EVENT_UNSPECIFIED" | "PULL_REQUEST_EVENT_OPENED" | "PULL_REQUEST_EVENT_UPDATED" | 4 more>
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integrationId?: string | null

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhookId?: string | null

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time?: Time { cronExpression }

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cronExpression?: string

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhookUrl?: string

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks