@artis-lab/cli 0.10.0 → 0.12.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/src/lib/cli.d.ts CHANGED
@@ -2,17 +2,13 @@ import { installSkillFromCli } from './skill-install.js';
2
2
  import { artisCliVersion } from './version.js';
3
3
  export { artisCliVersion };
4
4
  export { installSkillFromCli };
5
- export declare const commands: readonly ["annotate", "annotation", "artifact", "guidelines", "help", "install-skill", "login", "publish", "reply", "revise", "share", "version", "watch", "whoami"];
5
+ export declare const commands: readonly ["annotate", "annotation", "artifact", "data", "guidelines", "help", "install-skill", "login", "publish", "reply", "revise", "share", "types", "version", "watch", "whoami"];
6
6
  export type ArtisCommand = (typeof commands)[number];
7
7
  /**
8
8
  * Mirrors the sdk's `ArtifactVisibility`, deliberately re-declared instead of
9
9
  * imported: this union reaches the published `.d.ts`, and `@artis/sdk` is a
10
10
  * workspace-only package that consumers of `@artis-lab/cli` cannot resolve.
11
11
  * `packages/sdk/src/lib/sdk.ts` stays the source of truth for these values.
12
- *
13
- * Importing sdk types is fine wherever they stay out of exported declarations;
14
- * `scripts/cli-unit.mjs` fails the build if any of them reach the emitted
15
- * `.d.ts`, so that boundary is enforced rather than remembered.
16
12
  */
17
13
  declare const cliVisibilityOptions: readonly ["public", "unlisted", "private"];
18
14
  export type CliArtifactVisibility = (typeof cliVisibilityOptions)[number];
@@ -22,6 +18,10 @@ export interface PublishedArtifactResult {
22
18
  title: string;
23
19
  url: string;
24
20
  visibility: CliArtifactVisibility;
21
+ /** The artifact's type (ADR 0021) and its format version: `html` with a
22
+ * null format for one HTML document (type null from an older server). */
23
+ type: string | null;
24
+ typeFormat: number | null;
25
25
  }
26
26
  /**
27
27
  * Print the server's agent guidelines: the section index by default, or one
@@ -39,6 +39,12 @@ export declare function assertSafeLoginUrl(url: string, baseUrl: string): void;
39
39
  export declare function getCliHelp(): string;
40
40
  export declare function publishArtifactFromCli(args: string[]): Promise<PublishedArtifactResult>;
41
41
  export declare function loginFromCli(args: string[]): Promise<void>;
42
+ /**
43
+ * `artis types`: the types the server can publish (ADR 0015). With a name,
44
+ * the type's guidance (its package's SKILL.md) and its reference paths;
45
+ * with a name and a reference path, that reference. Needs no credentials.
46
+ */
47
+ export declare function typesFromCli(args: string[]): Promise<void>;
42
48
  export declare function whoamiFromCli(args: string[]): Promise<void>;
43
49
  export declare function getArtifactFromCli(args: string[]): Promise<void>;
44
50
  /**
@@ -46,32 +52,75 @@ export declare function getArtifactFromCli(args: string[]): Promise<void>;
46
52
  * document, so this is the way to edit an artifact that is no longer on disk:
47
53
  * `artis artifact html <id> --output report.html`, edit, then `artis revise`.
48
54
  */
55
+ /**
56
+ * `artis artifact files <id> [path]`: a files revision's paths, one file's
57
+ * text, or with `--output <dir>` every file written under the directory
58
+ * (and its revision remembered as the base of the next `revise --root`).
59
+ */
60
+ export declare function getArtifactFilesFromCli(args: string[]): Promise<void>;
49
61
  export declare function getArtifactHtmlFromCli(args: string[]): Promise<void>;
50
62
  /**
51
63
  * Render a local HTML file, or a published artifact's stored HTML, in the
52
64
  * system Chrome at 1280 and 390 px in light and dark themes, and report
53
65
  * horizontal overflow, clipped SVG, console errors and CSP violations.
54
- * Exits 8 when it finds any.
66
+ * A slides deck (`--type slides`, or a published revision of that type) is
67
+ * format-checked first, then every slide is checked for content past its
68
+ * canvas. Exits 8 when it finds any problem; format hints do not count.
55
69
  */
56
70
  export declare function verifyFromCli(args: string[]): Promise<void>;
57
71
  /**
58
72
  * List your own artifacts, newest first, optionally searched by title and
59
- * description and filtered by kind and tag.
73
+ * description and filtered by tag. One page per call: when more
74
+ * follow, the last line names the `--cursor` that continues the listing.
60
75
  */
61
76
  export declare function listArtifactsFromCli(args: string[]): Promise<void>;
62
77
  export declare function getArtifactFeedbackFromCli(args: string[]): Promise<void>;
63
78
  export declare function shareArtifactFromCli(args: string[]): Promise<void>;
79
+ /** Change who can open an artifact (owner only). */
80
+ export declare function setArtifactVisibilityFromCli(args: string[]): Promise<void>;
81
+ /**
82
+ * Permanently delete an artifact with every revision, annotation and share
83
+ * (owner only). There is no trash, so it takes `--yes`.
84
+ */
85
+ export declare function deleteArtifactFromCli(args: string[]): Promise<void>;
64
86
  export declare function reviseArtifactFromCli(args: string[]): Promise<void>;
65
87
  export declare function createAnnotationFromCli(args: string[]): Promise<void>;
66
88
  export declare function replyFromCli(args: string[]): Promise<void>;
67
89
  export declare function editAnnotationFromCli(args: string[]): Promise<void>;
68
90
  export declare function retractAnnotationFromCli(args: string[]): Promise<void>;
69
91
  /**
70
- * Wait for annotation events on one artifact caused by anyone but this API
71
- * key, by long-polling `GET /api/artifacts/:id/events` from a feedback
72
- * cursor. Streams one JSON line per event until stopped; `--once` prints the
73
- * first batch as `{events, cursor}` and exits 0. Network drops and rate
74
- * limits are retried from the last cursor, so no event is lost or repeated.
92
+ * Wait for events on one artifact caused by anyone but this API key, by
93
+ * long-polling `GET /api/artifacts/:id/events` from a feedback cursor: new
94
+ * annotations, replies, edits, retractions and status changes, and new
95
+ * revisions (`--types` narrows it; the server validates the list). Streams one JSON line per event until
96
+ * stopped; `--once` prints the first batch as `{events, cursor}` and exits 0.
97
+ * Network drops and rate limits are retried from the last cursor, so no event
98
+ * is lost or repeated.
75
99
  */
76
100
  export declare function watchArtifactFromCli(args: string[]): Promise<void>;
101
+ declare const dataActions: readonly ["get", "list", "set", "update", "delete", "batch", "export", "usage"];
102
+ type DataAction = (typeof dataActions)[number];
103
+ declare const dataAsRoles: readonly ["viewer", "commenter", "contributor"];
104
+ type DataAsRole = (typeof dataAsRoles)[number];
105
+ /** Parsed `artis data …` arguments, before anything is read or sent. */
106
+ export interface DataCommand {
107
+ action: DataAction;
108
+ artifactId: string;
109
+ path?: string;
110
+ asRole?: DataAsRole;
111
+ ifMatch?: {
112
+ id: string;
113
+ version: number;
114
+ };
115
+ ifAbsent?: true;
116
+ idempotencyKey?: string;
117
+ }
118
+ /** Which flags an `artis data` action takes, checked before any request. */
119
+ export declare function parseDataCommand(args: string[]): DataCommand;
120
+ /**
121
+ * `artis data …`: read and write an artifact's storage, the JSON documents
122
+ * its page keeps. Contributors and above write, within the latest
123
+ * revision's path rules. Output is JSON; `export` is NDJSON.
124
+ */
125
+ export declare function dataFromCli(args: string[]): Promise<void>;
77
126
  export declare function runArtisCli(args?: string[]): Promise<void>;