@artis-lab/cli 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @artis-lab/cli
2
2
 
3
- Agent-first CLI for publishing, reviewing, and revising self-contained HTML
4
- artifacts on an [Artis](https://github.com/xiispace/artis) server.
3
+ Agent-first CLI for creating, sharing and maintaining artifacts on
4
+ [Artis](https://github.com/xiispace/artis), an open-source, self-hostable place
5
+ for what AI agents build.
5
6
 
6
7
  Server commands default to the hosted instance at
7
8
  <https://artis.xiispace.eu.org>. Artis is also self-hostable — point the CLI at
@@ -20,8 +21,8 @@ Requires Node.js 20 or newer. Upgrade with
20
21
  ## Quick start
21
22
 
22
23
  Publishing requires authentication. `artis login` runs a device-code flow: it
23
- opens a browser for approval and stores the resulting API key at
24
- `~/.artis/config.json`.
24
+ opens a browser for approval and stores the resulting OAuth tokens at
25
+ `~/.artis/config.json`, refreshing them as they expire.
25
26
 
26
27
  ```bash
27
28
  artis login
@@ -41,35 +42,60 @@ Defaults:
41
42
  - Host: `--host`, then `ARTIS_URL`, then saved config, then
42
43
  `https://artis.xiispace.eu.org`
43
44
  - `visibility=unlisted`
44
- - `kind=custom-html`
45
45
  - `author=Artis CLI`
46
46
 
47
47
  ## Collaboration commands
48
48
 
49
+ An `<artifact>` argument is its Artis link, its short id (the last part of
50
+ the link, as below) or its uuid.
51
+
49
52
  ```bash
50
- artis artifact feedback artifact-slug
51
- artis revise artifact-slug revised.html --summary "Addressed review feedback" --base <revision-id>
52
- artis share artifact-slug --email reviewer@example.com --role commenter
53
- artis artifact visibility artifact-slug private
54
- artis artifact delete artifact-slug --yes # irreversible
55
- artis annotate artifact-slug --comment "Tighten this heading" --quote "Checkout latency"
53
+ artis artifact feedback 4kq9Zt2LmX8vRbP3nWc7Hy
54
+ artis revise 4kq9Zt2LmX8vRbP3nWc7Hy revised.html --summary "Addressed review feedback" --base <revision-id>
55
+ artis share 4kq9Zt2LmX8vRbP3nWc7Hy --email reviewer@example.com --role commenter
56
+ artis artifact visibility 4kq9Zt2LmX8vRbP3nWc7Hy private
57
+ artis artifact delete 4kq9Zt2LmX8vRbP3nWc7Hy --yes # irreversible
58
+ artis annotate 4kq9Zt2LmX8vRbP3nWc7Hy --comment "Tighten this heading" --quote "Checkout latency"
56
59
  artis reply annotation-123 --comment "Fixed in revision 2."
57
60
  ```
58
61
 
62
+ ## Assets
63
+
64
+ Images, fonts, media and other files an artifact keeps across revisions
65
+ (ADR 0023). A page shows one at `/_blob/<id>` on its own host.
66
+
67
+ ```bash
68
+ artis asset upload 4kq9Zt2LmX8vRbP3nWc7Hy chart.png # prints the asset, with its id and url
69
+ artis asset list 4kq9Zt2LmX8vRbP3nWc7Hy
70
+ artis asset get 4kq9Zt2LmX8vRbP3nWc7Hy <asset-id> --output chart.png
71
+ artis asset rm 4kq9Zt2LmX8vRbP3nWc7Hy <asset-id>
72
+ ```
73
+
59
74
  ## Check a page before publishing
60
75
 
61
76
  ```bash
62
- artis verify artifact.html # or a published artifact: artis verify artifact-slug
77
+ artis verify artifact.html # or a published artifact: artis verify 4kq9Zt2LmX8vRbP3nWc7Hy
63
78
  ```
64
79
 
65
80
  `verify` renders the page in your system Chrome (or Edge) at 1280 and 390 px
66
- in light and dark themes, served with the same Content-Security-Policy as
67
- Artis, and reports horizontal overflow, clipped SVG, console errors and CSP
81
+ in light and dark themes, served the way Artis serves it (on an artifact host
82
+ of its own, `<uuid>.localhost`, with the same Content-Security-Policy), and
83
+ reports horizontal overflow, clipped SVG, console errors and CSP
68
84
  violations. It exits 8 when it finds any. It needs the optional
69
85
  `playwright-core` dependency (installed with the CLI by default, about
70
86
  10 MB and no browser binaries) and a
71
87
  Chromium-based browser; set `ARTIS_CHROME_PATH` to use a specific one.
72
88
 
89
+ A slide deck is a directory of files, checked as its type:
90
+ `artis verify --root deck --type slides` (a published deck's revision already
91
+ names its type). It first runs the slides format check and lists each issue
92
+ with its level, rule, slide, file and line: errors exit 8, hints are reported
93
+ only. It then serves the files at the paths Artis serves them at, with the
94
+ slides entry page, runtime and the Google Fonts CSP a typed revision gets, in light
95
+ and dark themes, and reports every slide whose content runs past its
96
+ 1920×1080 (4:3: 1440×1080) canvas. The server never runs these checks, so
97
+ run `verify` before every publish and revise.
98
+
73
99
  Run `artis help` for the full command and flag reference.
74
100
 
75
101
  ## Install the agent skill
@@ -102,8 +128,9 @@ output in `dist/packages/cli` is exactly what gets published.
102
128
 
103
129
  The tracked `package.json` is the publishable manifest — `bin`, `files`,
104
130
  `engines`, and `publishConfig` all ship as written. Bump the version only here;
105
- the CLI reads it back at runtime, and the release workflow refuses to publish
106
- when the git tag and this version disagree.
131
+ the CLI reads it back at runtime, and merging a bump into `main` is what
132
+ releases it (the release workflow publishes, tags, and refuses to run without a
133
+ matching `CHANGELOG.md` section).
107
134
 
108
135
  `@artis/sdk` is a **devDependency**: the CLI imports only types from it, and a
109
136
  few trivial helpers are inlined rather than imported so nothing resolves the
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@artis-lab/cli",
3
- "version": "0.11.0",
4
- "description": "Agent-first CLI for publishing, reviewing, and revising self-contained HTML artifacts on an Artis server.",
3
+ "version": "0.13.0",
4
+ "description": "Agent-first CLI for creating, sharing and maintaining artifacts on Artis, an open-source, self-hostable place for what AI agents build.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "types": "./src/index.d.ts",
@@ -47,6 +47,8 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@artis/api-contract": "0.0.1",
50
- "@artis/sdk": "0.0.1"
50
+ "@artis/sdk": "0.0.1",
51
+ "@artis/slides-format": "0.0.1",
52
+ "@artis/types-slides": "0.0.1"
51
53
  }
52
54
  }
package/src/bin.js CHANGED
@@ -1,16 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runArtisCli
4
- } from "./lib/chunk-AEVC3USN.js";
5
- import "./lib/chunk-IKP5TJZP.js";
4
+ } from "./lib/chunk-2M77TQDV.js";
5
+ import "./lib/chunk-JYMG2Y6C.js";
6
+ import "./lib/chunk-JYLA7E3H.js";
7
+ import "./lib/chunk-QZFIUZXT.js";
6
8
  import "./lib/chunk-IZYFOV2K.js";
9
+ import "./lib/chunk-U3ZF6SRR.js";
10
+ import "./lib/chunk-46DMRA3V.js";
11
+ import "./lib/chunk-MEPQKMK5.js";
7
12
  import {
8
13
  exitCodeFor
9
- } from "./lib/chunk-WQDTNA6L.js";
10
- import "./lib/chunk-Q4UVVKZI.js";
11
- import "./lib/chunk-QNS7GLAA.js";
12
- import "./lib/chunk-MX2ASLZR.js";
13
- import "./lib/chunk-U3ZF6SRR.js";
14
+ } from "./lib/chunk-H32QAUSA.js";
15
+ import "./lib/chunk-43WVFZLO.js";
14
16
 
15
17
  // packages/cli/src/bin.ts
16
18
  runArtisCli().catch((error) => {
package/src/index.js CHANGED
@@ -1,16 +1,20 @@
1
1
  import {
2
2
  assertSafeLoginUrl,
3
+ assetFromCli,
4
+ capabilitiesFromCli,
3
5
  commands,
4
6
  createAnnotationFromCli,
7
+ dataFromCli,
5
8
  deleteArtifactFromCli,
6
9
  editAnnotationFromCli,
7
10
  getArtifactFeedbackFromCli,
11
+ getArtifactFilesFromCli,
8
12
  getArtifactFromCli,
9
- getArtifactHtmlFromCli,
10
13
  getCliHelp,
11
14
  guidelinesFromCli,
12
15
  listArtifactsFromCli,
13
16
  loginFromCli,
17
+ parseDataCommand,
14
18
  publishArtifactFromCli,
15
19
  replyFromCli,
16
20
  retractAnnotationFromCli,
@@ -18,36 +22,43 @@ import {
18
22
  runArtisCli,
19
23
  setArtifactVisibilityFromCli,
20
24
  shareArtifactFromCli,
25
+ typesFromCli,
21
26
  verifyFromCli,
22
27
  watchArtifactFromCli,
23
28
  whoamiFromCli
24
- } from "./lib/chunk-AEVC3USN.js";
25
- import "./lib/chunk-IKP5TJZP.js";
29
+ } from "./lib/chunk-2M77TQDV.js";
30
+ import "./lib/chunk-JYMG2Y6C.js";
31
+ import {
32
+ installSkillFromCli
33
+ } from "./lib/chunk-JYLA7E3H.js";
34
+ import "./lib/chunk-QZFIUZXT.js";
26
35
  import {
27
36
  artisCliVersion
28
37
  } from "./lib/chunk-IZYFOV2K.js";
29
- import "./lib/chunk-WQDTNA6L.js";
30
- import "./lib/chunk-Q4UVVKZI.js";
31
- import "./lib/chunk-QNS7GLAA.js";
32
- import {
33
- installSkillFromCli
34
- } from "./lib/chunk-MX2ASLZR.js";
35
38
  import "./lib/chunk-U3ZF6SRR.js";
39
+ import "./lib/chunk-46DMRA3V.js";
40
+ import "./lib/chunk-MEPQKMK5.js";
41
+ import "./lib/chunk-H32QAUSA.js";
42
+ import "./lib/chunk-43WVFZLO.js";
36
43
  export {
37
44
  artisCliVersion,
38
45
  assertSafeLoginUrl,
46
+ assetFromCli,
47
+ capabilitiesFromCli,
39
48
  commands,
40
49
  createAnnotationFromCli,
50
+ dataFromCli,
41
51
  deleteArtifactFromCli,
42
52
  editAnnotationFromCli,
43
53
  getArtifactFeedbackFromCli,
54
+ getArtifactFilesFromCli,
44
55
  getArtifactFromCli,
45
- getArtifactHtmlFromCli,
46
56
  getCliHelp,
47
57
  guidelinesFromCli,
48
58
  installSkillFromCli,
49
59
  listArtifactsFromCli,
50
60
  loginFromCli,
61
+ parseDataCommand,
51
62
  publishArtifactFromCli,
52
63
  replyFromCli,
53
64
  retractAnnotationFromCli,
@@ -55,6 +66,7 @@ export {
55
66
  runArtisCli,
56
67
  setArtifactVisibilityFromCli,
57
68
  shareArtifactFromCli,
69
+ typesFromCli,
58
70
  verifyFromCli,
59
71
  watchArtifactFromCli,
60
72
  whoamiFromCli