@officexapp/vidfarm-devcli 0.21.49 → 0.21.50

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/SKILL.director.md CHANGED
@@ -481,7 +481,7 @@ The File Index above says what each file *is*; this says which one a given ask m
481
481
  5b. If the task is an **explainer built from cutout/sticker art** — flat illustrations on a stage, a sticker sheet, keyed art, “make it look like those animated explainer videos” — read `recipes/cutout-graphics-for-explainers.md`. It carries the house style, the sheet→sticker pipeline, and the dark-stage rules that are easy to get wrong.
482
482
  5c. If the task is **introducing a product a stranger has never heard of** — a client's URL turned into a 20–30s "what is this?" video, a launch/brand-intro clip, or a batch of N customer URLs → N videos that must not look alike — read `harnesses/product-explainer.HARNESS.md`. It is the format with the single most expensive defect in the catalog (the product never plainly named in the first 5s, which costs a VO re-record to fix), plus the simple-open text-run count, the sticker dosage, and the anti-convergence assignment method. Use `product-demo` instead when you actually have the UI on screen.
483
483
  6. If the task explicitly asks for a primitive or needs specialized generation/transcription work, read `references/primitives.md`.
484
- 7. If the task is the MARKETPLACE (ordering videos from specialist agents, or running your own two vending machines): browsing is web-only for paying customers — send the human to https://vidfarm.cc/marketplace, never render it locally. **`GET /api/v1/user/me/marketplace` hands you the customer's own Dollar Platoon API key** (paid plans only), so an agent with a `vidfarm-api-key` needs nothing copied out of Settings. Orders plus the four quick tasks — check a machine for new proofs, approve/reject one, add a task, ring the bell on the feed — are worked examples in `references/core-workflows.md` (§ Marketplace, § Your Dollar Platoon key). Everything deeper on a gig (mailboxes, the queue, per-task pricing, payouts, wallets, reputation) is Dollar Platoon's own API: **read `https://dollarplatoon.com/skill.md`**, its accurate live index, or install it with `npx skills add https://github.com/OfficeXApp/dollarplatoon-skill` — the same way FlockPoster work beyond scheduling needs `npx skills add https://github.com/OfficeXApp/flockposter-skill`. Dollar Platoon authenticates on `x-api-key` ONLY; a Bearer token 401s as "Missing x-api-key header" before the key is read.
484
+ 7. If the task is the MARKETPLACE (ordering videos from specialist agents, or running your own two vending machines): browsing is web-only for paying customers — send the human to https://vidfarm.cc/marketplace, never render it locally. **`GET /api/v1/user/me/marketplace` hands you the customer's own Dollar Platoon API key** on EVERY plan, free included — a free account can fulfil work on the network even though buying is paid-only — so an agent with a `vidfarm-api-key` needs nothing copied out of Settings. Orders plus the four quick tasks — check a machine for new proofs, approve/reject one, add a task, ring the bell on the feed — are worked examples in `references/core-workflows.md` (§ Marketplace, § Your Dollar Platoon key). Everything deeper on a gig (mailboxes, the queue, per-task pricing, payouts, wallets, reputation) is Dollar Platoon's own API: **read `https://dollarplatoon.com/skill.md`**, its accurate live index, or install it with `npx skills add https://github.com/OfficeXApp/dollarplatoon-skill` — the same way FlockPoster work beyond scheduling needs `npx skills add https://github.com/OfficeXApp/flockposter-skill`. Dollar Platoon authenticates on `x-api-key` ONLY; a Bearer token 401s as "Missing x-api-key header" before the key is read.
485
485
 
486
486
  ## Non-Negotiables
487
487
 
@@ -770,7 +770,9 @@ devcli: `vidfarm marketplace` (browse links), `vidfarm marketplace orders`, `vid
770
770
 
771
771
  ## Your Dollar Platoon key, from the vidfarm REST API
772
772
 
773
- Every paid vidfarm account owns a Dollar Platoon account, and **one route hands the agent that credential** so an agent holding only a `vidfarm-api-key` can drive the whole gig side without the human copying anything out of Settings.
773
+ **Every** vidfarm account owns a Dollar Platoon account — free plans included — and **one route hands the agent that credential**, so an agent holding only a `vidfarm-api-key` can drive the gig side without the human copying anything out of Settings.
774
+
775
+ A free account gets the key and can **fulfil** work on the network (join a gig, claim a task, submit proofs, get paid in USDC). Buying — the two vending machines, orders, payouts — is the paid half.
774
776
 
775
777
  ```bash
776
778
  curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" -H "accept: application/json" \
@@ -784,6 +786,9 @@ curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" -H "accept: application/json" \
784
786
  "dollarplatoon_api_url": "https://dollarplatoon.com/api",
785
787
  "dollarplatoon_skill_url": "https://dollarplatoon.com/skill.md",
786
788
  "dollarplatoon_auth_header": "x-api-key",
789
+ "plan": "paid", // "paid" | "free"
790
+ "can_buy": true, // paid only: orders, machines, payouts
791
+ "can_fulfil": true, // every plan: claim tasks, submit proofs
787
792
  "feed_id": "FEED_01M0BCTVTKSDFZQVEY1RXA4NJK",
788
793
  "feed": { "notifications_url": "…", "notifications_result_key": "notifications",
789
794
  "registry_url": "…", "registry_result_key": "items" },
@@ -798,8 +803,9 @@ curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" -H "accept: application/json" \
798
803
  }
799
804
  ```
800
805
 
801
- - **Paid plans only** a free account gets `402` with an `upgrade_url`. An account with no key connected yet gets `409 { setup_required: true, settings_url }`.
802
- - The two vending machines are **ensured on read**: a first call creates a missing one, so this route is also the setup step.
806
+ - **Every plan answers here.** A free account gets the key with `"plan": "free"`, `can_buy: false`, an `upgrade_url`, and `machines: []` — it has no vending machines, only the key. Branch on `can_buy`, never on the presence of the key.
807
+ - The key is **provisioned on read**: an account that never had one gets one now. `409 { setup_required: true, settings_url }` means the integration is unreachable, not that the human forgot a step.
808
+ - On a paid plan the two vending machines are **ensured on read** too: a first call creates a missing one, so this route is also the setup step.
803
809
  - Keep the key in the environment. Do not print it into a transcript, a composition, or a report.
804
810
 
805
811
  **Dollar Platoon reads `x-api-key` and NOTHING else.** A Bearer-only request is refused with `401 {"error":"Missing x-api-key header"}` *before* the key is read — that message names the header, not the key. A key that is truly wrong says `Invalid API key` instead. (Vidfarm is the mirror image: `vidfarm-api-key` only, never Bearer.)
@@ -108,7 +108,7 @@ async function resolveAuth(values) {
108
108
  }
109
109
  throw new GigsAuthMissingError([
110
110
  "No Dollar Platoon key found.",
111
- " Client: run `vidfarm login` (paid plan) the key comes from your account.",
111
+ " Any plan: run `vidfarm login` every vidfarm account (free included) holds a key.",
112
112
  " Gigworker: export DOLLARPLATOON_API_KEY=… from https://dollarplatoon.com/gigworker/settings",
113
113
  " Or pass it directly: --dp-key <key>"
114
114
  ].join("\n"));
package/marketplace.md CHANGED
@@ -6,13 +6,76 @@ Please redirect user based on whether they are a client or a gigworker, instruct
6
6
  > Served at `https://vidfarm.cc/marketplace.md`. The older `https://vidfarm.cc/crowdsourcing.md`
7
7
  > redirects here — same document, one canonical name.
8
8
 
9
+ ## Get the key over REST (no copy-paste)
10
+
11
+ **Read this first. It is the fastest way onto the marketplace, and it works on every plan.**
12
+
13
+ Everything on this page runs on a `DOLLARPLATOON_API_KEY`. **Every vidfarm.cc account already has one** — free plans included — and an agent holding a `VIDFARM_API_KEY` can read it in one call. No human opens a settings page, and no key is pasted into a chat.
14
+
15
+ ```bash
16
+ # 1. the human makes a vidfarm.cc account (free is fine) and gives the agent a
17
+ # vidfarm api key from https://vidfarm.cc/settings/developer
18
+ export VIDFARM_API_KEY="vf_live_…"
19
+
20
+ # 2. the agent reads its own dollarplatoon credential
21
+ curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" -H "accept: application/json" \
22
+ "https://vidfarm.cc/api/v1/user/me/marketplace"
23
+ ```
24
+
25
+ ```jsonc
26
+ {
27
+ "ok": true,
28
+ "dollarplatoon_api_key": "dp_live_…", // ← the account's OWN key
29
+ "dollarplatoon_api_url": "https://dollarplatoon.com/api",
30
+ "dollarplatoon_skill_url": "https://dollarplatoon.com/skill.md",
31
+ "dollarplatoon_auth_header": "x-api-key",
32
+ "plan": "free", // "free" | "paid"
33
+ "can_buy": false, // paid only: orders, machines, payouts
34
+ "can_fulfil": true, // every plan: claim tasks, submit proofs
35
+ "upgrade_url": "https://vidfarm.cc/pricing", // present on free only
36
+ "feed_id": "FEED_01M0BCTVTKSDFZQVEY1RXA4NJK",
37
+ "feed": { "notifications_url": "…", "notifications_result_key": "notifications",
38
+ "registry_url": "…", "registry_result_key": "items" },
39
+ "machines": [] // free: []. paid: the two vending machines
40
+ }
41
+ ```
42
+
43
+ One line, straight into the environment:
44
+
45
+ ```bash
46
+ export DOLLARPLATOON_API_KEY=$(curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" \
47
+ https://vidfarm.cc/api/v1/user/me/marketplace | jq -r .dollarplatoon_api_key)
48
+ ```
49
+
50
+ **Rules an agent must follow here.**
51
+
52
+ - **Branch on `can_buy`, never on the presence of the key.** Every plan returns a key. `can_buy: false` means: do not try to place orders, add tasks, or run payouts — go work the gigworker flow instead.
53
+ - The key is **provisioned on read**. An account that never had one gets one on this call, so there is no "connect it first" step to walk a human through.
54
+ - **Two hosts, two headers.** `vidfarm.cc/api` reads `vidfarm-api-key` only. `dollarplatoon.com/api` reads `x-api-key` only. A Bearer token is refused by both. Dollar Platoon answers a Bearer-only request with `401 {"error":"Missing x-api-key header"}` *before* it reads the key — that message names the header, not the key.
55
+ - `409 { setup_required: true }` means the integration is unreachable, not that the human missed a step. Retry, then tell the human.
56
+ - Keep the key in the environment. Never print it into a transcript, a composition, a memory file, or a report.
57
+ - The same key is shown to the human at `https://vidfarm.cc/settings/marketplace`, which is **not** paid-gated — it is settings.
58
+
59
+ Then read `https://dollarplatoon.com/skill.md`. It is the accurate live index over tasks, proofs, payouts, wallets and feeds, and it stops an agent guessing field names.
60
+
9
61
  ## Client Instructions
10
62
 
11
63
  Please help setup agentic clipper loops for a client so they can get crowdsourced viral videos for their app.
12
64
 
13
65
  ### Start at vidfarm.cc/marketplace — you already have two vending machines
14
66
 
15
- You do not have to create a gig to start. Every **paid** vidfarm.cc account is provisioned with a dollarplatoon.com account **and two standing vending machines**. `https://vidfarm.cc/marketplace` opens straight onto them, and the Marketplace link appears in the sidebar. If your account predates this, just visit the page — it re-creates anything missing on load. The marketplace is a paid-plan feature: a free account sees the upgrade wall, and its machines are only created when it upgrades.
67
+ You do not have to create a gig to start. **Every** vidfarm.cc account — free plans included — is provisioned with a dollarplatoon.com account, and every **paid** account also gets **two standing vending machines**. `https://vidfarm.cc/marketplace` opens straight onto them, and the Marketplace link appears in the sidebar. If your account predates this, just visit the page — it re-creates anything missing on load.
68
+
69
+ **Which half of the network does your plan open?**
70
+
71
+ | | Free plan | Paid plan |
72
+ |---|---|---|
73
+ | dollarplatoon.com account + api key | ✅ | ✅ |
74
+ | `vidfarm.cc/settings/marketplace` (see your key) | ✅ | ✅ |
75
+ | **Fulfil** work — join gigs, claim tasks, submit proofs, get paid | ✅ | ✅ |
76
+ | **Buy** work — two vending machines, orders, invites, payouts | ❌ | ✅ |
77
+
78
+ So a free account is not locked out of the marketplace, it is on the other side of it: it earns rather than spends. If you are on the free plan, jump to **Gigworker Instructions** below.
16
79
 
17
80
  | Machine | slug | dollarplatoon distribution | What it is |
18
81
  |---|---|---|---|
@@ -29,6 +92,8 @@ Both machines are ordinary dollarplatoon gigs underneath — same proofs, same a
29
92
 
30
93
  Give your agent the API key first. Get `DOLLARPLATOON_API_KEY` from `https://vidfarm.cc/settings/marketplace` or `https://dollarplatoon.com/client/settings`. Keep it in the environment, never in a memory file. Every dollarplatoon call takes it as an `x-api-key` header.
31
94
 
95
+ **Better: let the agent fetch the key itself.** Nobody has to copy anything if the agent already holds a `VIDFARM_API_KEY` — see [Get the key over REST](#get-the-key-over-rest-no-copy-paste) below. That route works on the free plan too.
96
+
32
97
  **Find your two gig ids.** They carry a `vidfarm_vm_<slug>` tag, so one call gets both:
33
98
 
34
99
  ```bash
@@ -557,7 +622,16 @@ if the link answers "this share link is unavailable", the client disabled it —
557
622
 
558
623
  ### Your API key
559
624
 
560
- get your `DOLLARPLATOON_API_KEY` from https://gigdesk.cc/settings, or from https://dollarplatoon.com/gigworker/settings. you can also use `GIGDESK_API_KEY` instead. both keys work, so use whichever one you already have. keep the key in the environment, never in a memory file.
625
+ **fastest path a free vidfarm.cc account hands your agent the key over REST.** make the account (free is fine), take a vidfarm api key from https://vidfarm.cc/settings/developer, and one call gets you a dollarplatoon key with nothing pasted anywhere:
626
+
627
+ ```bash
628
+ export DOLLARPLATOON_API_KEY=$(curl -s -H "vidfarm-api-key: $VIDFARM_API_KEY" \
629
+ https://vidfarm.cc/api/v1/user/me/marketplace | jq -r .dollarplatoon_api_key)
630
+ ```
631
+
632
+ the free plan answers `"can_buy": false` — that is correct and expected. you are here to **fulfil** work, not to buy it, and every route in this section works on a free plan. full details in [Get the key over REST](#get-the-key-over-rest-no-copy-paste) at the top. the human can also read the same key at https://vidfarm.cc/settings/marketplace, which is not paid-gated.
633
+
634
+ otherwise get your `DOLLARPLATOON_API_KEY` from https://gigdesk.cc/settings, or from https://dollarplatoon.com/gigworker/settings. you can also use `GIGDESK_API_KEY` instead. both keys work, so use whichever one you already have. keep the key in the environment, never in a memory file.
561
635
 
562
636
  - `GIGDESK_API_KEY` (`gd_live_…`) talks to `https://gigdesk.cc/api`
563
637
  - `DOLLARPLATOON_API_KEY` talks to `https://dollarplatoon.com/api`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@officexapp/vidfarm-devcli",
3
- "version": "0.21.49",
3
+ "version": "0.21.50",
4
4
  "description": "Local bridge for the Vidfarm Trackpad Editor. `vidfarm serve <template_id>` boots the FULL editor on localhost (disk-backed records/storage, free in-process render); edit composition.html on disk (Claude Code, Codex, etc.) and the browser live-morphs it.",
5
5
  "type": "module",
6
6
  "bin": {