ArtifactInput
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| dict builtins dict() -> new empty dictionary |
|
⋔ Inheritance diagram¶
graph TD
637298216["input_types.ArtifactInput"]
2645524081["builtins.dict"]
2751680898["builtins.object"]
2645524081 --> 637298216
2751680898 --> 2645524081
🛈 DocStrings¶
Bases: TypedDict
Input for the Artifact tool.
Source code in src/clawd_code_sdk/models/input_types.py
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | |
action
instance-attribute
¶
action: NotRequired[
Literal[
"publish",
"list",
"read",
"list_types",
"watch",
"unwatch",
"status",
"upload_asset",
"list_assets",
"read_asset",
"delete_asset",
"pin",
"unpin",
]
]
Omit (or 'publish') to publish file_path.
'list' enumerates artifacts — the user's own by default, see scope; only limit, scope and
page_token may accompany it. 'read' returns the content of the published artifact at url
(raw HTML for the user's own; an isolated summary, steered by the optional prompt, for one
someone else owns, though a page published in this session's own Slack channel can come back in
full as untrusted content) — see Calls. 'watch', 'unwatch', and 'status' manage live-update
subscriptions through which a session keeps track of new versions of an artifact published
elsewhere, and those aren't available in this session: 'watch' only reports that — this session
does not keep track of new versions — and 'status' lists this session's artifact watches (pass
url to check one). 'upload_asset' adds one local media, PDF, font, or text file to an existing
artifact — pass url and file_path (or file_paths for several in one call). 'list_assets'
lists the files in an artifact's asset store (pass url; after continues a listing),
'read_asset' saves one of them to a local file named by its id (pass url and asset_id,
optionally out_dir), and 'delete_asset' permanently removes one (pass url and asset_id).
See Artifact assets above. 'pin' adds the artifact at url to the user's pinned list in
their claude.ai sidebar and 'unpin' removes it (nothing else may accompany either) — private to
the user, reversible, and no change to who can see the artifact.
after
instance-attribute
¶
list_assets only: the next value from a previous list_assets result, to continue that
listing.
asset_id
instance-attribute
¶
read_asset and delete_asset: the asset's id (32 hex characters), from a list_assets or upload_asset result.
capabilities
instance-attribute
¶
Runtime capabilities this page declares, as {name: config}.
The control plane is the authority on valid names and config shapes. An empty object clears any
previously stored declaration; omit the field on a redeploy to carry the stored declaration
forward unchanged. Before declaring any capability, load the artifact-capabilities skill for
the current contract and per-capability guidance.
contract
instance-attribute
¶
The artifact's runtime version.
Omit to keep its current version (the default); 'latest' to upgrade; a specific version to pin or roll back. Changing it changes how the published page behaves — pass only when the author explicitly intends the change, never as a side effect of editing.
description
instance-attribute
¶
One-sentence subtitle shown on the gallery card. Say what the page is or does.
file_path
instance-attribute
¶
Path to the .html file to render.
Required to publish (the default action). Use a short, distinctive basename — it is the last-
resort title when the HTML has no <title> and no title parameter is given. For
'upload_asset', the local image, video, PDF, font, stylesheet (CSS), script (JS), or text (CSV,
Markdown, JSON, plain text) file to upload.
file_paths
instance-attribute
¶
upload_asset: several local image, video, PDF, font, stylesheet or script files in place of
file_path, up to 25 in one call, all into the artifact that url names; one approval
covers the call, and the result lists each file's id and url, or why it was not uploaded.
A CSV, Markdown, JSON or plain-text file, a symbolic or hard link, and a file outside the
working directory each go in a call of their own with file_path. @minItems 1 @maxItems 25
force
instance-attribute
¶
Last-resort overwrite that DISCARDS the newer published version's page — another session's publish, or someone's save from a page that can publish new versions of itself.
On a conflict the fix is to merge your changes onto the newer content (handed to you in the rejection, or re-read) and publish again — not force. Pass force:true only when the user has explicitly said to discard that specific version; never to get past a conflict on your own judgment. The tracked baseVersion is still sent; with force:true the server treats it as informational and overwrites, unless it refuses force over a version saved from inside the page. Omit (or false) so a concurrent write conflicts instead of being silently clobbered.
icon
instance-attribute
¶
One short generic word for the artifact's browser-tab icon, such as chart, calendar, recipe, code or map — a plain signifier, not a product or brand name.
Include it on every page's first publish; omit when republishing to keep the current icon, and pass a new one only when the user asks.
label
instance-attribute
¶
A short name for this publish, max 60 chars (e.g.
"Draft to legal"). Optional — a few words, not a description.
limit
instance-attribute
¶
list only: maximum artifacts to return (default 25).
out_dir
instance-attribute
¶
read_asset: directory to save into — default: this artifact's folder in your scratchpad directory, where saving needs no approval and which you can Read from.
read_asset names the file by the asset id plus the extension for its type; saving to any directory other than the default is an ordinary file save the user may be asked to approve.
page_token
instance-attribute
¶
list only: the next_page_token a listing of the same scope gave, to list the artifacts
after it.
pin
instance-attribute
¶
publish only: true also pins the published artifact to the user's claude.ai sidebar once it is published — pass it only when the user asked for that; a pin that fails never fails the publish (the result says so).
prompt
instance-attribute
¶
read only: what to extract from an artifact shared with the user — its content reaches you as an isolated summary answering this.
Ignored for artifacts the user owns and for a page published in this session's own Slack channel (raw content is returned); optional.
scope
instance-attribute
¶
list only: 'mine' (default) lists artifacts the user owns; 'shared' lists artifacts other people shared with the user; 'all' lists both.
Rows are labeled (mine)/(shared) whenever scope is not 'mine'.
title
instance-attribute
¶
Title for the artifact — the name shown in the browser tab and gallery.
A short, distinctive noun-phrase name — not a generic label, a summary, or a name with an
appended explainer. Prefer a <title> tag at the top of the HTML itself; this parameter fills
in only when the file lacks one in the first 8KB of the file, and never overrides the tag. HTML
publishes only — Markdown pages keep their filename identity. Content always comes from
file_path — there is no inline content parameter.
url
instance-attribute
¶
An existing artifact's claude.ai link (claude.ai/artifact/{id} or claude.ai/code/artifact/{uuid}; a chat, project or session link is not one) to update in place.
Pass whenever the user wants to update an artifact this conversation did not publish — "update my artifact", "keep the same link", a pasted artifact URL — and find the URL with action: "list" or ask the user for the link if you don't have it; without this, the publish creates a separate artifact instead of updating the existing one. Omit for new artifacts and same-conversation redeploys. Must be an artifact the user owns or was given edit access to (a read of it says "writer"). Before publishing to an artifact this conversation has neither read nor published, read it (action: "read") and build on what comes back; a publish sent without that read is refused. A refusal that hands you the live version counts as that read: merge your edits into that version and publish that; never resend the refused content unchanged. For 'read' and the other url-addressed actions: the artifact to act on.