@paneui/cli 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,68 @@
1
+ // `pane agent claim <code>` — bind this agent to a human via a one-shot
2
+ // claim code the human generated in their settings UI.
3
+ //
4
+ // Flow (§6.1):
5
+ // 1. Alice opens Settings → "Claim an agent" → relay mints a one-shot code,
6
+ // shows it to her once, 15-min TTL.
7
+ // 2. Alice hands the code to the agent out-of-band (this CLI invocation
8
+ // is exactly that handoff).
9
+ // 3. CLI calls POST /v1/agents/claim with the calling agent's API key.
10
+ // 4. Relay binds Agent.ownerHumanId = alice.id, migrates surface ownership.
11
+ //
12
+ // The CLI does NOT print the human's email or id — only the relay's response,
13
+ // which is { ok, owner_human_id, claimed_at }. The agent's existing API key
14
+ // keeps working.
15
+ import { PaneClient, PaneApiError } from "@paneui/core";
16
+ import { assertKnownFlags } from "../argv.js";
17
+ import { resolveConfig } from "../config.js";
18
+ import { printJson, fail } from "../output.js";
19
+ const KNOWN_FLAGS = ["url", "api-key"];
20
+ const KNOWN_BOOLS = [];
21
+ export const claimHelp = `pane agent claim — claim this agent for a human
22
+
23
+ Usage:
24
+ pane agent claim <code>
25
+
26
+ Binds the calling agent to the human whose one-shot claim code is provided.
27
+ The human generates the code in their settings UI (or via the relay's
28
+ POST /v1/self/claim-codes endpoint) and hands it to the agent out-of-band.
29
+
30
+ Arguments:
31
+ <code> The one-shot claim code (begins with cc_). Required.
32
+
33
+ Options:
34
+ --url <url> Relay base URL. Falls back to PANE_URL / config file.
35
+ --api-key <key> Agent API key. Falls back to PANE_API_KEY / config file.
36
+ -h, --help Show this help.
37
+
38
+ Output (stdout, JSON):
39
+ { ok: true, owner_human_id, claimed_at }
40
+
41
+ Errors:
42
+ invalid_code code is unknown, expired, or already consumed
43
+ agent_already_claimed this agent already has an owning human
44
+
45
+ Notes:
46
+ This is a one-way operation. To rotate the owner, revoke this agent
47
+ (\`pane key revoke\`) and register a new one.`;
48
+ export async function runClaim(args) {
49
+ assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane agent claim");
50
+ const code = args.positionals[0];
51
+ if (!code) {
52
+ fail("missing required argument: <code> — run 'pane agent claim --help'", "invalid_args");
53
+ return;
54
+ }
55
+ const creds = resolveConfig(args);
56
+ const client = new PaneClient({ url: creds.url, apiKey: creds.apiKey });
57
+ try {
58
+ const result = await client.claimAgent(code);
59
+ printJson(result);
60
+ }
61
+ catch (err) {
62
+ if (err instanceof PaneApiError) {
63
+ fail(err.message, err.code);
64
+ return;
65
+ }
66
+ throw err;
67
+ }
68
+ }
@@ -1,13 +1,13 @@
1
- // `pane session create` — create a session via POST /v1/sessions.
1
+ // `pane surface create` — create a surface via POST /v1/surfaces.
2
2
  import { createSessionSchema } from "@paneui/core";
3
3
  import { assertKnownFlags } from "../argv.js";
4
4
  import { makeClient } from "../config.js";
5
5
  import { resolveJson, resolveText } from "../input.js";
6
6
  import { printJson, fail, failFromError } from "../output.js";
7
7
  const KNOWN_FLAGS = [
8
- "artifact",
9
- "artifact-id",
10
- "artifact-type",
8
+ "template",
9
+ "template-id",
10
+ "template-type",
11
11
  "version",
12
12
  "event-schema",
13
13
  "input-schema",
@@ -26,9 +26,9 @@ const KNOWN_BOOLS = [];
26
26
  //
27
27
  // Match strategy: longest prefix wins. Schema paths whose top segment isn't
28
28
  // in the table fall back to dotted notation so we degrade gracefully on
29
- // fields that don't have a single corresponding flag (e.g. `artifact.source`
30
- // — there's no single --artifact-source flag for the inline form, just
31
- // --artifact pointing at the whole blob).
29
+ // fields that don't have a single corresponding flag (e.g. `template.source`
30
+ // — there's no single --template-source flag for the inline form, just
31
+ // --template pointing at the whole attachment).
32
32
  const SCHEMA_PATH_TO_FLAG = {
33
33
  participants: "--participants",
34
34
  "participants.humans": "--participants",
@@ -37,12 +37,12 @@ const SCHEMA_PATH_TO_FLAG = {
37
37
  callback: "--callback",
38
38
  input_data: "--input-data",
39
39
  title: "--title",
40
- "artifact.id": "--artifact-id",
41
- "artifact.version": "--version",
42
- "artifact.type": "--artifact-type",
43
- "artifact.source": "--artifact",
44
- "artifact.event_schema": "--event-schema",
45
- "artifact.input_schema": "--input-schema",
40
+ "template.id": "--template-id",
41
+ "template.version": "--version",
42
+ "template.type": "--template-type",
43
+ "template.source": "--template",
44
+ "template.event_schema": "--event-schema",
45
+ "template.input_schema": "--input-schema",
46
46
  };
47
47
  function schemaPathToFlag(path) {
48
48
  const dotted = path.map(String).join(".");
@@ -57,32 +57,32 @@ function schemaPathToFlag(path) {
57
57
  }
58
58
  return dotted;
59
59
  }
60
- export const createHelp = `pane session create — create a Pane session
60
+ export const createHelp = `pane surface create — create a Pane surface
61
61
 
62
- A session is one use of an artifact. Supply the artifact in ONE of two ways:
62
+ A surface is one use of an template. Supply the template in ONE of two ways:
63
63
 
64
- Reference form — instance an existing reusable artifact (the cheap path,
64
+ Reference form — instance an existing reusable template (the cheap path,
65
65
  no HTML re-sent):
66
- pane session create --artifact-id <id|slug> [--version <n>] [--input-data <v>]
66
+ pane surface create --template-id <id|slug> [--version <n>] [--input-data <v>]
67
67
 
68
- Inline form — a one-off artifact, defined on this call:
69
- pane session create --artifact <path|inline> [--event-schema <path|json>] [options]
68
+ Inline form — a one-off template, defined on this call:
69
+ pane surface create --template <path|inline> [--event-schema <path|json>] [options]
70
70
 
71
- Exactly one of --artifact-id / --artifact must be given.
71
+ Exactly one of --template-id / --template must be given.
72
72
 
73
- Artifact (choose one):
74
- --artifact-id <v> Reference an existing named artifact by id or slug.
75
- Tip: run 'pane artifact search <keywords>' first — a
76
- suitable artifact may already exist; reuse it instead of
73
+ Template (choose one):
74
+ --template-id <v> Reference an existing named template by id or slug.
75
+ Tip: run 'pane template search <keywords>' first — a
76
+ suitable template may already exist; reuse it instead of
77
77
  regenerating HTML.
78
- --version <n> With --artifact-id: pin a specific version. Defaults to
79
- the artifact's latest version.
80
- --artifact <v> Inline HTML artifact. Either a file path / URL, or inline
81
- HTML. Combine with --artifact-type to control reading.
78
+ --version <n> With --template-id: pin a specific version. Defaults to
79
+ the template's latest version.
80
+ --template <v> Inline HTML template. Either a file path / URL, or inline
81
+ HTML. Combine with --template-type to control reading.
82
82
  --event-schema <v> Inline-form event schema. A .json file, or inline JSON.
83
- Optional with --artifact. Omit for a view-only artifact
83
+ Optional with --template. Omit for a view-only template
84
84
  (a report/dashboard the human only views — no page/agent
85
- events). Ignored with --artifact-id.
85
+ events). Ignored with --template-id.
86
86
 
87
87
  Shape — an object with an "events" map, keyed by event
88
88
  type. Each entry declares who may emit it and the JSON
@@ -103,30 +103,30 @@ Artifact (choose one):
103
103
  payload is a JSON Schema; the relay validates every
104
104
  emit against it. See docs/SPEC.md for the full grammar.
105
105
  --input-schema <v> Inline-form input schema. A .json file, or inline JSON.
106
- Optional with --artifact, rejected with --artifact-id
107
- (the schema comes from the pinned artifact version
108
- there). When present, the session's --input-data is
109
- validated against it AND any blob ids declared at a
110
- "format": "pane-blob-id" site become reachable from the
111
- page via window.pane.downloadBlob. Without it, blob
106
+ Optional with --template, rejected with --template-id
107
+ (the schema comes from the pinned template version
108
+ there). When present, the surface's --input-data is
109
+ validated against it AND any attachment ids declared at a
110
+ "format": "pane-attachment-id" site become reachable from the
111
+ page via window.pane.downloadBlob. Without it, attachment
112
112
  refs in --input-data are silently unreachable. See
113
113
  docs/SPEC.md and #208.
114
114
 
115
115
  Options:
116
116
  --title <text> Tab title shown to the human (max 80 chars, single
117
117
  line). Required, with one ergonomic exception: when
118
- --artifact-id references a named artifact, the relay
119
- falls back to Artifact.name. Inline (--artifact …) form
118
+ --template-id references a named template, the relay
119
+ falls back to Template.name. Inline (--template …) form
120
120
  always needs --title.
121
121
  --input-data <v> This instance's seed data — a JSON object (file path or
122
- inline JSON), validated by the relay against the artifact
122
+ inline JSON), validated by the relay against the template
123
123
  version's input_schema. The page reads it as
124
124
  window.pane.inputData.
125
- --artifact-type <t> "html-inline" (default) or "html-ref". With "html-ref"
126
- the --artifact value is treated as a URL. Note: the relay
127
- does not serve "html-ref" artifacts in this release and
128
- will reject the session — use "html-inline".
129
- --ttl <seconds> Session time-to-live in seconds. The relay clamps this
125
+ --template-type <t> "html-inline" (default) or "html-ref". With "html-ref"
126
+ the --template value is treated as a URL. Note: the relay
127
+ does not serve "html-ref" templates in this release and
128
+ will reject the surface — use "html-inline".
129
+ --ttl <seconds> Surface time-to-live in seconds. The relay clamps this
130
130
  to its configured MAX_TTL_SECONDS (defaults: 1 h
131
131
  requested, 24 h max for self-host; hosted may differ).
132
132
  The returned \`expires_at\` is the authoritative value.
@@ -138,19 +138,19 @@ Options:
138
138
  -h, --help Show this help.
139
139
 
140
140
  Output (stdout, JSON):
141
- { session_id, urls, tokens, expires_at }
141
+ { surface_id, urls, tokens, expires_at }
142
142
 
143
143
  Deliver urls.humans to the human(s); keep tokens.agent for the WS stream.`;
144
144
  export async function runCreate(args) {
145
- assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane session create");
146
- const artifactIdVal = args.flags.get("artifact-id");
147
- const artifactVal = args.flags.get("artifact");
148
- // Exactly one of the two artifact forms must be present.
145
+ assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane surface create");
146
+ const artifactIdVal = args.flags.get("template-id");
147
+ const artifactVal = args.flags.get("template");
148
+ // Exactly one of the two template forms must be present.
149
149
  if (artifactIdVal !== undefined && artifactVal !== undefined) {
150
- fail("pass only one of --artifact-id (reference an existing artifact) or --artifact (inline a one-off)", "invalid_args");
150
+ fail("pass only one of --template-id (reference an existing template) or --template (inline a one-off)", "invalid_args");
151
151
  }
152
152
  if (artifactIdVal === undefined && artifactVal === undefined) {
153
- fail("missing artifact — pass --artifact-id <id|slug> to reference an existing artifact, or --artifact <path|inline> to inline one", "invalid_args");
153
+ fail("missing template — pass --template-id <id|slug> to reference an existing template, or --template <path|inline> to inline one", "invalid_args");
154
154
  }
155
155
  // Assemble a candidate request object, then validate the whole thing with
156
156
  // the shared Zod schema (single source of truth, matches what the relay
@@ -158,11 +158,11 @@ export async function runCreate(args) {
158
158
  // flag-specific message; the schema then enforces shape and bounds.
159
159
  const candidate = {};
160
160
  if (artifactIdVal !== undefined) {
161
- // Reference form — instance an existing named artifact. --artifact /
162
- // --event-schema / --input-schema are not used here: the artifact's
161
+ // Reference form — instance an existing named template. --template /
162
+ // --event-schema / --input-schema are not used here: the template's
163
163
  // pinned version carries them already.
164
164
  if (args.flags.get("input-schema") !== undefined) {
165
- fail("--input-schema is incompatible with --artifact-id — the input schema comes from the pinned artifact version. Author the schema on the artifact (`pane artifact create --input-schema …`) instead.", "invalid_args");
165
+ fail("--input-schema is incompatible with --template-id — the input schema comes from the pinned template version. Author the schema on the template (`pane template create --input-schema …`) instead.", "invalid_args");
166
166
  }
167
167
  const ref = { id: artifactIdVal };
168
168
  const versionRaw = args.flags.get("version");
@@ -173,40 +173,40 @@ export async function runCreate(args) {
173
173
  }
174
174
  ref["version"] = version;
175
175
  }
176
- candidate["artifact"] = ref;
176
+ candidate["template"] = ref;
177
177
  }
178
178
  else {
179
- // Inline form — the event + input schemas ride inside the `artifact`
180
- // object; the relay transparently creates an anonymous artifact behind
179
+ // Inline form — the event + input schemas ride inside the `template`
180
+ // object; the relay transparently creates an anonymous template behind
181
181
  // it. Both schemas are optional:
182
182
  // - --event-schema absent → view-only one-off (no page/agent emits)
183
183
  // - --input-schema absent → no input contract; --input-data passes
184
- // through unvalidated AND any blob ids in it are unreachable from
185
- // the page (the participant blob-download bridge walks input_data
186
- // against the artifact version's inputSchema). Pass --input-schema
187
- // when --input-data carries blob refs the page needs to render.
184
+ // through unvalidated AND any attachment ids in it are unreachable from
185
+ // the page (the participant attachment-download bridge walks input_data
186
+ // against the template version's inputSchema). Pass --input-schema
187
+ // when --input-data carries attachment refs the page needs to render.
188
188
  // See #208.
189
189
  const schemaVal = args.flags.get("event-schema");
190
190
  const inputSchemaVal = args.flags.get("input-schema");
191
- const artifactType = (args.flags.get("artifact-type") ?? "html-inline");
192
- if (artifactType !== "html-inline" && artifactType !== "html-ref") {
193
- fail("--artifact-type must be 'html-inline' or 'html-ref'", "invalid_args");
191
+ const templateType = (args.flags.get("template-type") ?? "html-inline");
192
+ if (templateType !== "html-inline" && templateType !== "html-ref") {
193
+ fail("--template-type must be 'html-inline' or 'html-ref'", "invalid_args");
194
194
  }
195
195
  // html-ref: the value is a URL, used verbatim. html-inline: file or literal.
196
196
  let source;
197
197
  try {
198
198
  source =
199
- artifactType === "html-ref" ? artifactVal : resolveText(artifactVal);
199
+ templateType === "html-ref" ? artifactVal : resolveText(artifactVal);
200
200
  }
201
201
  catch (e) {
202
202
  fail(e instanceof Error ? e.message : String(e), "invalid_args");
203
203
  }
204
- // Build the inline artifact object. event_schema / input_schema are
204
+ // Build the inline template object. event_schema / input_schema are
205
205
  // OMITTED entirely (not set to undefined) when their flags are absent —
206
- // omission is meaningful at the relay (view-only artifact / no input
206
+ // omission is meaningful at the relay (view-only template / no input
207
207
  // contract).
208
208
  const inlineArtifact = {
209
- type: artifactType,
209
+ type: templateType,
210
210
  source,
211
211
  };
212
212
  if (schemaVal !== undefined) {
@@ -229,11 +229,11 @@ export async function runCreate(args) {
229
229
  fail(e instanceof Error ? e.message : String(e), "invalid_args");
230
230
  }
231
231
  }
232
- candidate["artifact"] = inlineArtifact;
232
+ candidate["template"] = inlineArtifact;
233
233
  }
234
234
  // --title — passthrough, no client-side requiredness. The relay is the
235
- // single source of truth: it enforces "required, with --artifact-id +
236
- // Artifact.name as the only fallback" and the shape rules (length, control
235
+ // single source of truth: it enforces "required, with --template-id +
236
+ // Template.name as the only fallback" and the shape rules (length, control
237
237
  // chars). Keeping all that server-side avoids drift between the CLI's
238
238
  // pre-checks and the relay's actual rules.
239
239
  const titleRaw = args.flags.get("title");
@@ -1,16 +1,16 @@
1
- // `pane session delete <id>` — close/delete a session.
1
+ // `pane surface delete <id>` — close/delete a surface.
2
2
  import { assertKnownFlags } from "../argv.js";
3
3
  import { makeClient } from "../config.js";
4
4
  import { printJson, fail, failFromError } from "../output.js";
5
5
  const KNOWN_FLAGS = [];
6
6
  const KNOWN_BOOLS = [];
7
- export const deleteHelp = `pane session delete — close/delete a session
7
+ export const deleteHelp = `pane surface delete — close/delete a surface
8
8
 
9
9
  Usage:
10
- pane session delete <session-id> [options]
10
+ pane surface delete <surface-id> [options]
11
11
 
12
- Closes and deletes the session (DELETE /v1/sessions/:id). Idempotent on the
13
- relay side — deleting an already-closed session still succeeds.
12
+ Closes and deletes the surface (DELETE /v1/surfaces/:id). Idempotent on the
13
+ relay side — deleting an already-closed surface still succeeds.
14
14
 
15
15
  Options:
16
16
  --url <url> Relay base URL (overrides PANE_URL).
@@ -18,16 +18,16 @@ Options:
18
18
  -h, --help Show this help.
19
19
 
20
20
  Output (stdout, JSON):
21
- { session_id, deleted: true }`;
21
+ { surface_id, deleted: true }`;
22
22
  export async function runDelete(args) {
23
- assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane session delete");
24
- const sessionId = args.positionals[0];
25
- if (!sessionId)
26
- fail("missing <session-id>", "invalid_args");
23
+ assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane surface delete");
24
+ const surfaceId = args.positionals[0];
25
+ if (!surfaceId)
26
+ fail("missing <surface-id>", "invalid_args");
27
27
  const client = makeClient(args);
28
28
  try {
29
- await client.deleteSession(sessionId);
30
- printJson({ session_id: sessionId, deleted: true });
29
+ await client.deleteSession(surfaceId);
30
+ printJson({ surface_id: surfaceId, deleted: true });
31
31
  }
32
32
  catch (e) {
33
33
  failFromError(e);
@@ -1,7 +1,7 @@
1
1
  import { assertKnownFlags } from "../argv.js";
2
2
  import { makeClient } from "../config.js";
3
3
  import { printJson, fail, failFromError } from "../output.js";
4
- const CREATE_FLAGS = ["type", "message", "session-id"];
4
+ const CREATE_FLAGS = ["type", "message", "surface-id"];
5
5
  const LIST_FLAGS = ["limit", "before"];
6
6
  const NO_BOOLS = [];
7
7
  export const feedbackHelp = `pane feedback — submit / list feedback to the relay operator
@@ -25,7 +25,7 @@ Options for 'create':
25
25
  --type <bug|feature|note> Feedback category. Required.
26
26
  --message <text|-> Message body. Pass '-' to read from stdin.
27
27
  1..4000 chars after trim.
28
- --session-id <id> Optional session this feedback relates to;
28
+ --surface-id <id> Optional surface this feedback relates to;
29
29
  must belong to YOUR agent.
30
30
 
31
31
  Options for 'list':
@@ -38,7 +38,7 @@ Global:
38
38
  -h, --help Show this help.
39
39
 
40
40
  Examples:
41
- pane feedback create --type bug --message "watch hangs on empty session"
41
+ pane feedback create --type bug --message "watch hangs on empty surface"
42
42
  echo "long-form note..." | pane feedback create --type note --message -
43
43
  pane feedback list --limit 20
44
44
 
@@ -55,7 +55,7 @@ async function runFeedbackCreate(args) {
55
55
  assertKnownFlags(args, CREATE_FLAGS, NO_BOOLS, "pane feedback create");
56
56
  const type = args.flags.get("type");
57
57
  const rawMessage = args.flags.get("message");
58
- const sessionId = args.flags.get("session-id");
58
+ const surfaceId = args.flags.get("surface-id");
59
59
  if (type === undefined) {
60
60
  fail("'pane feedback create' requires --type <bug|feature|note>", "invalid_args");
61
61
  }
@@ -83,7 +83,7 @@ async function runFeedbackCreate(args) {
83
83
  const res = await client.submitFeedback({
84
84
  type: type,
85
85
  message,
86
- ...(sessionId !== undefined ? { sessionId } : {}),
86
+ ...(surfaceId !== undefined ? { surfaceId } : {}),
87
87
  });
88
88
  printJson(res);
89
89
  }
@@ -1,23 +1,23 @@
1
- // `pane session list` — enumerate YOUR agent's sessions.
1
+ // `pane surface list` — enumerate YOUR agent's surfaces.
2
2
  //
3
3
  // The recovery primitive when the create-response was dropped: the URL itself
4
4
  // is unrecoverable (the relay stores only the token hash), but every other
5
- // field of the session is intact and listable here. Pair with
6
- // `pane session participant new` to mint a fresh URL on a session whose
5
+ // field of the surface is intact and listable here. Pair with
6
+ // `pane surface participant new` to mint a fresh URL on a surface whose
7
7
  // original was lost.
8
8
  import { assertKnownFlags } from "../argv.js";
9
9
  import { makeClient } from "../config.js";
10
10
  import { printJson, fail, failFromError } from "../output.js";
11
- const KNOWN_FLAGS = ["status", "limit", "cursor", "artifact-id"];
11
+ const KNOWN_FLAGS = ["status", "limit", "cursor", "template-id"];
12
12
  const KNOWN_BOOLS = [];
13
- export const listHelp = `pane session list — list YOUR agent's sessions
13
+ export const listHelp = `pane surface list — list YOUR agent's surfaces
14
14
 
15
- Prints sessions (newest first) with no secrets in the response. Participant
16
- tokens are stored hashed and CANNOT be recovered — if you lost a session URL,
17
- mint a fresh one with 'pane session participant new <session-id>'.
15
+ Prints surfaces (newest first) with no secrets in the response. Participant
16
+ tokens are stored hashed and CANNOT be recovered — if you lost a surface URL,
17
+ mint a fresh one with 'pane surface participant new <surface-id>'.
18
18
 
19
19
  Usage:
20
- pane session list [options]
20
+ pane surface list [options]
21
21
 
22
22
  Options:
23
23
  --status <s> open | closed | all. Default: open. The status reported
@@ -25,29 +25,29 @@ Options:
25
25
  is reported as 'closed' even if not yet swept.
26
26
  --limit <N> Page size (default 50, max 200).
27
27
  --cursor <c> Opaque cursor from a previous page's next_cursor.
28
- --artifact-id <i> Filter to sessions instantiated from a specific named
29
- artifact (head id; not version id). Inline (anonymous)
30
- artifacts cannot be filtered this way — they have no
28
+ --template-id <i> Filter to surfaces instantiated from a specific named
29
+ template (head id; not version id). Inline (anonymous)
30
+ templates cannot be filtered this way — they have no
31
31
  stable handle.
32
32
  --url <url> Relay base URL (overrides PANE_URL).
33
33
  --api-key <key> Agent API key (overrides PANE_API_KEY).
34
34
  -h, --help Show this help.
35
35
 
36
- Recovery recipe (lost the URL but the session is still alive):
37
- pane session list # find the
38
- # session_id +
36
+ Recovery recipe (lost the URL but the surface is still alive):
37
+ pane surface list # find the
38
+ # surface_id +
39
39
  # participant_id
40
40
  # you lost
41
- pane session participant new <session-id> # mint a fresh URL
42
- pane session participant revoke <session-id> <p-id> # invalidate the
41
+ pane surface participant new <surface-id> # mint a fresh URL
42
+ pane surface participant revoke <surface-id> <p-id> # invalidate the
43
43
  # old URL
44
44
 
45
45
  Output (stdout, JSON):
46
46
  {
47
47
  items: [
48
48
  {
49
- session_id, title, status, artifact_id, artifact_version_id,
50
- artifact_version, participants: [...], created_at, expires_at,
49
+ surface_id, title, status, template_id, template_version_id,
50
+ template_version, participants: [...], created_at, expires_at,
51
51
  has_callback
52
52
  },
53
53
  ...
@@ -56,7 +56,7 @@ Output (stdout, JSON):
56
56
  }`;
57
57
  const STATUSES = ["open", "closed", "all"];
58
58
  export async function runList(args) {
59
- assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane session list");
59
+ assertKnownFlags(args, KNOWN_FLAGS, KNOWN_BOOLS, "pane surface list");
60
60
  const opts = {};
61
61
  const status = args.flags.get("status");
62
62
  if (status !== undefined) {
@@ -76,9 +76,9 @@ export async function runList(args) {
76
76
  const cursor = args.flags.get("cursor");
77
77
  if (cursor !== undefined && cursor !== "")
78
78
  opts.cursor = cursor;
79
- const artifactId = args.flags.get("artifact-id");
80
- if (artifactId !== undefined && artifactId !== "") {
81
- opts.artifact_id = artifactId;
79
+ const templateId = args.flags.get("template-id");
80
+ if (templateId !== undefined && templateId !== "") {
81
+ opts.template_id = templateId;
82
82
  }
83
83
  const client = makeClient(args);
84
84
  try {