Skip to content

Commit 141c04d

Browse files
authored
chore(automation): remove automation commands (#89)
1 parent 31ba9a7 commit 141c04d

22 files changed

Lines changed: 25 additions & 570 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# polylane
22

33
<p><strong>Agent-focused CLI for the <a href="https://polylane.com">Polylane</a> platform.</strong><br>
4-
Investigate production issues, explore cloud infrastructure, search code, run automations, and drive threads — from any agent or terminal.</p>
4+
Investigate production issues, explore cloud infrastructure, search code, and drive threads — from any agent or terminal.</p>
55

66
<p>Your coding agent writes the code. It can't see production. Polylane is the missing sense.</p>
77

‎codegen/parse-spec.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,23 @@ import { schemaToTypescript, type TypeGenOptions } from './type-utils';
1010

1111
const CLIENT_OPTS: TypeGenOptions = { refPrefix: 'T.' };
1212

13+
// The automations feature is retired; drop its endpoints and schemas from the
14+
// generated client even while the API still serves them.
15+
const EXCLUDED_PATH = /\/automations(\/|$)/;
16+
const EXCLUDED_SCHEMAS = new Set([
17+
'Automation',
18+
'AutomationExecution',
19+
'AutomationNotification',
20+
'AutomationActionExecution',
21+
'TriggerAutomationBody',
22+
'CreateAutomationFromTemplateBody',
23+
]);
24+
1325
export function parseSpec(spec: OpenAPISpec): ParsedSpec {
1426
const schemas = new Map<string, SchemaObject>();
1527
if (spec.components?.schemas) {
1628
for (const [name, schema] of Object.entries(spec.components.schemas)) {
29+
if (EXCLUDED_SCHEMAS.has(name)) continue;
1730
schemas.set(name, schema);
1831
}
1932
}
@@ -22,7 +35,7 @@ export function parseSpec(spec: OpenAPISpec): ParsedSpec {
2235
const methods: Array<keyof typeof HTTP_METHOD_MAP> = ['get', 'post', 'put', 'patch', 'delete'];
2336

2437
for (const [path, pathItem] of Object.entries(spec.paths)) {
25-
if (!pathItem) continue;
38+
if (!pathItem || EXCLUDED_PATH.test(path)) continue;
2639
for (const method of methods) {
2740
const op = pathItem[method];
2841
if (!op) continue;

‎skill/SKILL.md‎

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: polylane-cli
3-
description: Use `polylane` to investigate production issues, explore cloud infrastructure (logs / metrics / dependency graphs), search code, save memories, run automations from a catalog, connect observability tools and cloud accounts, and drive threads with the Polylane agent. Use when the user wants to debug a production issue, look up a service, search their codebase, manage integrations, connect a cloud provider, or talk to the Polylane agent from the terminal.
3+
description: Use `polylane` to investigate production issues, explore cloud infrastructure (logs / metrics / dependency graphs), search code, save memories, connect observability tools and cloud accounts, and drive threads with the Polylane agent. Use when the user wants to debug a production issue, look up a service, search their codebase, manage integrations, connect a cloud provider, or talk to the Polylane agent from the terminal.
44
---
55

66
# Polylane CLI — Agent Skill Guide
@@ -10,8 +10,7 @@ description: Use `polylane` to investigate production issues, explore cloud infr
1010
> **Full docs: <https://docs.polylane.com>** (model-readable, no auth required). Start at
1111
> <https://docs.polylane.com/getting-started>, and see <https://docs.polylane.com/llms.txt> for an
1212
> agent-oriented index. This skill is the quick reference; the docs are the source of truth for
13-
> concepts, the automation schema (triggers / actions / destinations), and the full API. When a task
14-
> goes beyond what's below, read the docs rather than guessing.
13+
> concepts and the full API. When a task goes beyond what's below, read the docs rather than guessing.
1514
1615
## Prerequisites
1716

@@ -137,15 +136,10 @@ polylane integration catalog --category cloud
137136
polylane integration connect --type <type> # see --help for that type
138137
polylane cloud connect --provider <provider> # see --help for that provider
139138

140-
# 5. Add automations from templates
141-
polylane automation catalog
142-
polylane automation from-template <slug>
143-
144-
# 6. Verify
139+
# 5. Verify
145140
polylane integration list
146141
polylane cloud list
147142
polylane service list # cloud infra discovered from connected accounts
148-
polylane automation list
149143
```
150144

151145
`integration connect` and `cloud connect` dispatch on `--type` / `--provider`. Some options open a browser for an install URL; others take API credentials directly. Use `--help` on each to see the required flags and optional `--no-browser`. Browser flows wait in the terminal until the connection appears (interactive TTY only); with `--output json` or in non-interactive runs they print the URL and exit, so poll `integration list` / `cloud list` to confirm.
@@ -215,59 +209,6 @@ polylane thread continue <thread-id> "<prompt>"
215209

216210
Attach resources as context by passing their IDs — the CLI infers the resource type from the ID prefix.
217211

218-
### Automations
219-
220-
An automation is **trigger → instructions → tools → actions**: a typed event fires, an agent runs
221-
with your instructions and a set of skills (tools), and optional actions apply side-effects (open an
222-
issue, roll back a deploy, open a PR) — each gated by a `mode` (`smart` = act only when warranted,
223-
`always`). Full schema and every trigger/action type: <https://docs.polylane.com/fix-and-automate/automations>.
224-
225-
```bash
226-
polylane automation catalog # browse prebuilt templates
227-
polylane automation from-template <slug> # create from a template
228-
polylane automation from-template <slug> --pass-count 2 --provider cloudflare
229-
polylane automation create ... # create an ARBITRARY automation (see below)
230-
231-
polylane automation list
232-
polylane automation trigger <automation-id> # manual run
233-
polylane automation executions <automation-id> # list runs
234-
polylane automation execution <automation-id> <execution-id> # one run + result
235-
polylane automation rerun <automation-id> <execution-id>
236-
```
237-
238-
**Templates vs. custom.** Use `from-template` when a catalog entry matches as-is. Use
239-
`automation create` for anything else — a scoped trigger, custom instructions, a combination no
240-
template covers. `automation create` is a first-class command; you do **not** need `polylane api call`.
241-
242-
```bash
243-
# Build from flags. --trigger/--action take JSON, or a bare type for filterless ones (e.g. `webhook`).
244-
# --tool attaches a skill by slug (repeatable); see `polylane skill list`.
245-
polylane automation create \
246-
--name "Triage Datadog alerts" \
247-
--trigger '{"type":"alert","filters":{"sources":["datadog"]}}' \
248-
--instructions "Correlate the alert with recent deploys and open an issue with the findings." \
249-
--tool investigate-errors --tool investigate-latency \
250-
--action '{"type":"openIssue","mode":"smart","defaultSeverity":"high"}' \
251-
--delay 600000 # wait 10m (e.g. let a deploy settle) before the run
252-
253-
# Or pass a full JSON body (--body-file '-' reads stdin); flags layer on top.
254-
polylane automation create --body-file automation.json
255-
256-
# Scope a template's broad trigger: crib its body, then narrow the trigger.
257-
polylane automation catalog --output json # find the slug + shape
258-
polylane automation create --body-file template.json \
259-
--trigger '{"type":"cloudflare.deployment","filters":{"environments":["production"]}}'
260-
```
261-
262-
Run `polylane automation create --help` for every flag. Common trigger types: `alert`, `cron`
263-
(`{"type":"cron","expression":"0 9 * * *"}`), `webhook`, `github.*` (push/pull_request/deployment/…),
264-
`{cloudflare,vercel,render,fly}.deployment`, `slack.message`, `polylane.*` (issue.triaged,
265-
cloud_account.synced, codebase.synced, …). Actions include `openIssue`,
266-
`rollback{Cloudflare,Vercel,Render,Fly}Deployment`, `submitPr`, `commentPr`, `mergePr`,
267-
`commentGithubIssue`, `createGithubIssue`, `autofix`, `handoffTo{Devin,Cursor,Factory,Conductor}`. The
268-
authoritative, always-current list of types and filters is in the docs and in
269-
`polylane api describe automations.post`.
270-
271212
---
272213

273214
## Piping patterns

‎src/auth/oauth.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ export const DEFAULT_SCOPES = [
4747
'autofixes:delete',
4848
'autofixes:read',
4949
'autofixes:write',
50-
'automations:delete',
51-
'automations:read',
52-
'automations:write',
5350
'billing:read',
5451
'billing:write',
5552
'cloud_accounts:delete',

‎src/commands/auth/signup.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,10 @@ export function nextSteps(landing?: Landing): string {
123123
` 4. Connect a cloud account`,
124124
` polylane cloud connect --provider <provider> # see --help`,
125125
``,
126-
` 5. Add an automation from the catalog`,
127-
` polylane automation catalog`,
128-
` polylane automation from-template <slug>`,
129-
``,
130-
` 6. Verify what's wired up`,
126+
` 5. Verify what's wired up`,
131127
` polylane integration list`,
132128
` polylane cloud list`,
133129
` polylane service list`,
134-
` polylane automation list`,
135130
``,
136131
`Once things are connected, try:`,
137132
` polylane thread ask "summarise production"`,

‎src/commands/autofix/list.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const autofixListCommand: Command = {
1313
operationId: 'autofixes.list',
1414
options: [
1515
{ flag: '--status <s>', description: 'Filter by status (started, branch_pushed, pr_opened, merged, failed, no_fix_needed)', type: 'string' },
16-
{ flag: '--origin <o>', description: 'Filter by origin (automation, chat, investigation, system)', type: 'string' },
16+
{ flag: '--origin <o>', description: 'Filter by origin (chat, investigation, system)', type: 'string' },
1717
{ flag: '--repo <r>', description: 'Filter by repo name', type: 'string' },
1818
{ flag: '--limit <n>', description: 'Max items (default 20)', type: 'number' },
1919
{ flag: '--full', description: 'Return full objects', type: 'boolean' },

‎src/commands/automation/catalog.ts‎

Lines changed: 0 additions & 51 deletions
This file was deleted.

‎src/commands/automation/create.ts‎

Lines changed: 0 additions & 142 deletions
This file was deleted.

‎src/commands/automation/execution.ts‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)