hephaestus-upload ยท diff

git:20260813.53b90bf to git:20260817.fb31040

109 added, 28 removed. Audit A to A.

---
name: hephaestus-upload
description: "Use when the user asks to upload or publish an Agentlas agent or team. Ask Cloud private vs Agentlas Hub public FIRST, then use the bundled immutable upload gate."
metadata: {"openclaw": {"emoji": "๐Ÿ”จ", "requires": {"bins": ["python3"]}, "homepage": "https://github.com/agentlas-ai/Agentlas-OS"}}
---
# Hephaestus Upload (Cloud or Agentlas Hub)
- This is a WRITE surface. Ask the destination before packaging, publishing,
- registering, reindexing, or calling an upload API:
+ Publish a finished Agentlas package. This is a WRITE surface: a Hub upload is
+ public and other people can borrow it, so the destination question comes before
+ any packaging or API call.
+ Upload is deliberately NOT folded into `/hep-network`. Network staffs a roster
+ (a read), upload publishes an artifact (a write that is hard to take back);
+ merging them would let "find me an agent" end in an accidental publish.
+
+ ## 1. Ask the destination first โ€” always
+
+ Ask this before anything else, even when the arguments already say upload,
+ publish, add, Cloud, Hub, or name a target folder:
+
```text
Cloud์— ์—…๋กœ๋“œ ํ• ๊นŒ์š”? ๋‹ค๋ฅธ์‚ฌ๋žŒ๋“ค์ด ๋ณผ ์ˆ˜ ์—†์–ด์š”.
Upload to Cloud? Other people cannot see it.
Agentlas Hub์— ์—…๋กœ๋“œ ํ• ๊นŒ์š”? ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ๋นŒ๋ ค ์“ธ ์ˆ˜ ์žˆ์–ด์š”.
Upload to Agentlas Hub? Other people can borrow it.
```
- If the destination is known but the package folder is ambiguous, ask for the
- exact folder. Never infer or switch the destination.
+ Do not package, publish, register, add-source, reindex, or call any upload API
+ until the user answers Cloud or Agentlas Hub. If the destination is answered but
+ the target folder is ambiguous, ask for the exact agent folder before running
+ anything.
- ## Resolve the runner
+ ## 2. Ask the price โ€” Agentlas Hub only
+ Ask this only when the destination was **Agentlas Hub**. Skip it entirely for
+ Cloud/private-link: a private save is not listed and nobody can hire it, so
+ there is nothing for a price to apply to.
+
+ ```text
+ ๊ฐ’์„ ์ •ํ•˜์‹œ๊ฒ ์–ด์š”? ๋น„์›Œ ๋‘๋ฉด ๊ทธ ํ•ญ๋ชฉ์€ ํŒ”์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
+ Set a price? Leave one out and that kind is simply not sold.
+
+ ๋นŒ๋ฆฌ๊ธฐ / Rent ์›Œํฌ์˜ค๋” 1๊ฑด ยท 24์‹œ๊ฐ„ 1-100 ํฌ๋ ˆ๋”ง
+ ์ธ์ œ์ŠคํŠธ / Ingest ํ”„๋กœ์ ํŠธ 1๊ฐœ ยท ํ•˜๋ฃจ 1-2000 ํฌ๋ ˆ๋”ง
+ ํฌํฌ / Fork ์‚ฌ๋ณธ 1๊ฐœ ยท 1ํšŒ 1 ํฌ๋ ˆ๋”ง ์ด์ƒ
+
+ ์ „๋ถ€ ๋น„์›Œ ๋‘๋ฉด ๋ฌด๋ฃŒ๋กœ ๋ถˆ๋ฆฝ๋‹ˆ๋‹ค. ๋‚˜์ค‘์— agentlas.cloud ์ˆ˜์ต ํŽ˜์ด์ง€์—์„œ๋„ ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
+ Leave them all blank and it stays free to call โ€” you can price it later on the web.
+ ```
+
+ Why the three ceilings differ: a rental is a 24-hour lease a buyer opens many
+ of, so the same job must not cost more for being split into more pieces;
+ ingest is a day of a whole project, worth twenty times that; a fork is a copy
+ sold once, with no repeat for a ceiling to protect against.
+
+ Rules:
+
+ - **Blank is not zero.** An unanswered kind is left out of the command, meaning
+ "not sold". Never pass `0` โ€” the server refuses it, and a stored 0 cannot be
+ told apart from a field nobody filled in.
+ - **All three blank is a valid answer.** Publish with no price flag at all. The
+ agent is callable for free, which is where every agent published before
+ pricing existed already lives. Do not push and do not re-ask.
+ - **Do not invent a number.** No answer means the flag is omitted.
+ - The server enforces the ceilings and returns the bound when it refuses. Report
+ the actual limit, never a bare "it failed".
+
+ Flags: `--rent-credits <1-100>`, `--ingest-credits <1-2000>`, `--fork-credits <1+>`.
+
+ ## 3. Resolve the runner in this host
+
+ Run the preflight inside this host app; never ask the user to open a separate
+ terminal.
+
```bash
RUNNER=""
for candidate in "$HOME/.agentlas/runtime/current/bin/hephaestus" "./bin/hephaestus"; do
[ -x "$candidate" ] && RUNNER="$candidate" && break
done
[ -n "$RUNNER" ] || { echo "Hephaestus runtime not found. Run the installer first." >&2; exit 1; }
```
- ## Preview and publish one immutable artifact
-
- Never run `package` and then `publish`; use one snapshotting gate:
+ ## 4. Use one immutable upload gate
- - Cloud: `"$RUNNER" hep-upload <agent-folder> --visibility private-link`
- - Agentlas Hub: `"$RUNNER" hep-upload <agent-folder> --visibility marketplace`
+ Do not run `package` and then `publish`: that packages twice and the second
+ artifact may differ from the one reviewed. The upload gate copies the selected
+ folder into a private, link-free snapshot, repairs and validates that snapshot
+ once, and either dry-runs or submits those exact bytes.
- For a preview, add `--dry-run` and retain both `manifest.packageHash` and
- `uploadReceipt.receipt`. The later publish must append:
+ If the user requests a preview, run exactly one dry-run and retain the returned
+ `manifest.packageHash` and `uploadReceipt.receipt`:
- ```text
- --expected-package-hash <manifest.packageHash> --expected-upload-receipt <uploadReceipt.receipt>
- ```
+ - Cloud: `"$RUNNER" hep-upload <agent-folder> --visibility private-link --dry-run`
+ - Agentlas Hub: `"$RUNNER" hep-upload <agent-folder> --visibility marketplace --dry-run`
All security and content findings are advisory. Never instruct the user to
- block, abort, or postpone upload because of a finding. Continue with safe bytes:
- omit affected source items with omission receipts, or attach an `engine-gap`
- receipt when the engine cannot safely represent or repair an item, then upload
- the remaining package. Keep the findings and receipts visible.
+ block, abort, or postpone an upload because of a finding. Continue the same
+ upload with safe bytes: omit each affected source item and bind an omission
+ receipt, or record an `engine-gap` receipt when the current engine cannot safely
+ represent or repair it, then submit the remaining package. Keep every finding
+ and omission visible in the result. The gate also repairs what it can derive
+ from the package โ€” including the entity type: a card that claims `agent` while
+ the package ships a multi-node roster is corrected to `team`, so the release is
+ priced and executed as the team it actually is.
- The receipt binds the hash, visibility, slug, and destination. Stop on
+ ## 5. Publish once, optionally pinned to the preview
+
+ - Cloud: `"$RUNNER" hep-upload <agent-folder> --visibility private-link`
+ - Agentlas Hub: `"$RUNNER" hep-upload <agent-folder> --visibility marketplace [--rent-credits N] [--ingest-credits N] [--fork-credits N]`
+
+ After a dry-run, append both `--expected-package-hash <manifest.packageHash>` and
+ `--expected-upload-receipt <uploadReceipt.receipt>` to the one publish command.
+ The receipt binds the exact hash, visibility, slug, and destination. Stop on
`package_hash_mismatch`, `upload_receipt_required`, or
- `upload_receipt_mismatch`.
+ `upload_receipt_mismatch`; never silently publish a replacement artifact or
+ switch an approved private preview to the public Hub.
- On `overwrite_confirmation_required`, show the exact server-reported Cloud ID
- and ask for approval. Only after approval append
- `--overwrite-cloud-id <exact-cloud-id>` to the same pinned command. Never infer
- overwrite authority from a matching slug.
+ If registration returns `overwrite_confirmation_required`, show the exact
+ server-reported Cloud ID and ask for overwrite approval. Only after approval,
+ rerun the same pinned command with `--overwrite-cloud-id <exact-cloud-id>`.
+ Never infer overwrite permission from a matching slug.
- Preserve exact authentication, credit, ownership, and destination refusal
- codes. Report success only when the server attests the exact slug, visibility,
- package hash, immutable release ID/version, and content digest.
+ Surface authentication and entitlement codes exactly (`sign_in_required`,
+ `auth_unavailable`, `insufficient_credits`, `owner_only`). Do not replace a
+ failed Hub destination with Cloud or vice versa.
+
+ ## 6. Workforce rรฉsumรฉ repair loop
+
+ If registration returns `workforce_resume_incomplete`, the server refused the
+ card because its `workforce` block
+ does not match the hub standard rรฉsumรฉ. The error carries the exact mismatches
+ and seed ontology examples. YOU repair it โ€” the platform never edits the card
+ for you: use stable English `role:*`, `community:*`, `skill:*`, and
+ `knowledge:*` IDs that actually describe the agent. The returned examples are
+ aliases, not an allowlist. Rerun the upload and repeat until registration
+ succeeds.
+
+ ## 7. Report honestly
+
+ Report `published` only when the response attests the exact slug, visibility,
+ package hash, immutable release ID/version, and content digest. Say which
+ destination it went to. Otherwise report the last true state and the server's
+ exact refusal code. Do not relabel an advisory finding as an upload block.