- name
- d2-feature-cdn
- description
- Working with a project's files (the CDN): where an agent's files go (role and lifetime folders), askedBy for anywhere else, linking, moving accepted designs, cleanup. Read when you store, move or link files, or when a files call is refused.
- tags
- #inherited #feature
d2-feature-cdn: files you make¶‹ Previous
A feature skill: read it when you work with a project's files, or when an error sends you here (see: Skill:d2-feature-cdn#…). Every call goes to the project host, https://<project>.ai-putty.com; paths below are relative to it.
Folders: your role, then how long it's kept¶
- Your files (mockups, diagrams, exports, scratch) go under your role's folder:
designer/,coder/,tester/,maker/… (a token with roleusergetsuser/). - Under it, by lifetime:
- Kept:
designer/design/<area>/(what the docs link to) anddesigner/kit/(the shared look-and-feel pieces). - Cleanable at any time:
<role>/mockups/(work in progress) and<role>/tmp/(scratch).
- Kept:
- Which subfolders each role may write, and each folder's one-line description, are in base
Settings:System(files.agentFolders,files.folders);GET /api/v2/cdnreturnsfolders: [{prefix, about, cleanable}].
Anywhere else: only when your person asks¶
PUT,PATCH(a move) andDELETEon/api/v2/cdn/<path>outside your folders are refused: 403E_SCOPE,reason: "folder", withallowed: [...]listing your folders.- If your person asked for that place, send
?askedBy=<their handle>(oraskedByin a JSON body): it passes, and the file's record and the audit say asked by . Never addaskedByon your own; naming anyone but your person isE_SCOPE.
Storing and linking¶
- Store:
PUT /api/v2/cdn/<path>with the bytes. HTML for a hand-over is stored as.txt. - Name files so they can be found by search: area, screen, what it shows (
designer/mockups/message-routes/messages-channel-tab-traffic-switchboard.txt), neveroptionAorv2. - Link with the plain path (
/cdn/designer/design/support/page.png); d2 adds the version.
When a design is accepted¶
- Move its file from
<role>/mockups/todesigner/design/<area>/(PATCHthe path) and update every link to it. - A doc never links to
mockups/ortmp/for good: those folders get emptied.
Cleanup¶
- A project's admins run Clean up on the Files page (
POST /api/v2/cdn/cleanup/check): files under the cleanable folders, split into Still used (linked from a topic, draft, app, object or pipeline item) and Good to delete. - Still used can be sent to the designer as one pipeline item: move each file to
designer/design/<area>/and update the links, or drop the link. - More for people: Files, WorkingWithAgents › cdn.