@cogfoundry/loomloom 0.7.0 → 0.8.0-beta.2

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  npm distribution for the LoomLoom Go CLI.
4
4
 
5
5
  ```sh
6
- npm install -g @cogfoundry/loomloom
6
+ npm install -g @cogfoundry/loomloom@beta
7
7
  loomloom --version
8
8
  ```
9
9
 
@@ -12,5 +12,5 @@ GitHub Release assets remain the binary source of truth. The launcher selects an
12
12
  To install the matching general LoomLoom Skill for one explicit Agent, run:
13
13
 
14
14
  ```sh
15
- npx @cogfoundry/loomloom@0.7.0 install --agent codex --yes
15
+ npx @cogfoundry/loomloom@0.8.0-beta.2 install --agent codex --yes
16
16
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogfoundry/loomloom",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-beta.2",
4
4
  "description": "LoomLoom CLI for defining, compiling, executing, and managing AI work as software",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -22,12 +22,12 @@
22
22
  "LICENSE"
23
23
  ],
24
24
  "optionalDependencies": {
25
- "@cogfoundry/loomloom-linux-x64": "0.7.0",
26
- "@cogfoundry/loomloom-linux-arm64": "0.7.0",
27
- "@cogfoundry/loomloom-darwin-x64": "0.7.0",
28
- "@cogfoundry/loomloom-darwin-arm64": "0.7.0",
29
- "@cogfoundry/loomloom-win32-x64": "0.7.0",
30
- "@cogfoundry/loomloom-win32-arm64": "0.7.0"
25
+ "@cogfoundry/loomloom-linux-x64": "0.8.0-beta.2",
26
+ "@cogfoundry/loomloom-linux-arm64": "0.8.0-beta.2",
27
+ "@cogfoundry/loomloom-darwin-x64": "0.8.0-beta.2",
28
+ "@cogfoundry/loomloom-darwin-arm64": "0.8.0-beta.2",
29
+ "@cogfoundry/loomloom-win32-x64": "0.8.0-beta.2",
30
+ "@cogfoundry/loomloom-win32-arm64": "0.8.0-beta.2"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
package/platforms.json CHANGED
@@ -1,48 +1,48 @@
1
1
  {
2
- "releaseTag": "v0.7.0",
3
- "version": "0.7.0",
2
+ "releaseTag": "v0.8.0-beta.2",
3
+ "version": "0.8.0-beta.2",
4
4
  "platforms": {
5
5
  "linux-x64": {
6
6
  "package": "@cogfoundry/loomloom-linux-x64",
7
7
  "binary": "bin/loomloom",
8
- "binarySHA256": "e1f5d4fc4bc15a96058a14b6bb82dda361d6b7512d81499aa1a0092204462d11",
8
+ "binarySHA256": "605dfab78516e2e3f9ca69894e1403ac3c55fb8f58498caf4462a289f843952b",
9
9
  "archive": "loomloom-linux-amd64.tar.gz",
10
- "archiveSHA256": "e514969118e06d1ad4de958bf68e44b955c90169a032b80eca0f0eaa61ec9a27"
10
+ "archiveSHA256": "ea3da8c6c3b6fdfe7d175ea8f671f446a0a0fb149978253c9c5b715c5e6bcca9"
11
11
  },
12
12
  "linux-arm64": {
13
13
  "package": "@cogfoundry/loomloom-linux-arm64",
14
14
  "binary": "bin/loomloom",
15
- "binarySHA256": "da8ed1b1a41e80357d8b6104ba11efa3665608658c9097e6be84ca98d9642fcb",
15
+ "binarySHA256": "1f2c810546348f2c5ca5df7cb1865255b014db4bfe31bc52fa17c0eeb2e380aa",
16
16
  "archive": "loomloom-linux-arm64.tar.gz",
17
- "archiveSHA256": "e424070a91704b6acfcac27fd5a8a96f9ef3ac740146e246c0f5fa8b8563d7f1"
17
+ "archiveSHA256": "fda9f66ee4240218a53e7bf09c61864dca9bdad9aa88ae86f45d9de582daf10d"
18
18
  },
19
19
  "darwin-x64": {
20
20
  "package": "@cogfoundry/loomloom-darwin-x64",
21
21
  "binary": "bin/loomloom",
22
- "binarySHA256": "13da1b3c45fcb3c5e5f01a88876f613af244310e8af1596abff2d3b703f5799d",
22
+ "binarySHA256": "b4b7d57898180211e52876c589a3e59312f8365295a36e8438b494e0746322ba",
23
23
  "archive": "loomloom-darwin-amd64.tar.gz",
24
- "archiveSHA256": "6efbdc4f2eaa88da249ff829cc4ad6529fe03ff384889a1764ce09ad1fd644b2"
24
+ "archiveSHA256": "09d4086620ba853f2ab8da2d3747a6c8a8865d1b33ef52c8b163bceabbf504d5"
25
25
  },
26
26
  "darwin-arm64": {
27
27
  "package": "@cogfoundry/loomloom-darwin-arm64",
28
28
  "binary": "bin/loomloom",
29
- "binarySHA256": "7593a627e95f406877fcc84f7152e241b81e8fd57d659d13a734499338385882",
29
+ "binarySHA256": "e34a63a4ab32ccb6aee5ed7827908cecba810f091c2cd70fc48c27041ee50a9c",
30
30
  "archive": "loomloom-darwin-arm64.tar.gz",
31
- "archiveSHA256": "68202f433063472159a3e5a39311fa7aebfc92af683d5b4adc702430f28a8d67"
31
+ "archiveSHA256": "e05d9c6eaf11868b860f54534fa854751efb847a7eeeaec03b8bb3dbd6b42f9e"
32
32
  },
33
33
  "win32-x64": {
34
34
  "package": "@cogfoundry/loomloom-win32-x64",
35
35
  "binary": "bin/loomloom.exe",
36
- "binarySHA256": "49500ecc47bc89e3da4c7a22653d693e81319d8a4a8758f8c7b606cc739e9e1f",
36
+ "binarySHA256": "f336a9e1bce1ac20972cb5e81d01f2a4d89fa2bf697da6806bbb5ddc62ef2670",
37
37
  "archive": "loomloom-windows-amd64.zip",
38
- "archiveSHA256": "1e9cc10ac7d4b50eb172c2f7041f4b610d9d9316c84c0bba8319953cff91d87c"
38
+ "archiveSHA256": "b44f7f8c788219a501dce190c9cf14e8ed20f4ff35ae4ca1b436b6732ae14bbd"
39
39
  },
40
40
  "win32-arm64": {
41
41
  "package": "@cogfoundry/loomloom-win32-arm64",
42
42
  "binary": "bin/loomloom.exe",
43
- "binarySHA256": "0a5c2793148f29e82636ac32921f6f45a5d2fb697d5864f84683634deb5116e5",
43
+ "binarySHA256": "05b83489710e0ec1f332a2b30f6ddef232299a95a9fbc2a6d2a3658f08af6a35",
44
44
  "archive": "loomloom-windows-arm64.zip",
45
- "archiveSHA256": "808fffb560424fa3cc36f16757c22500f5bfc9adf8578cb0cc082c3a82d3f26a"
45
+ "archiveSHA256": "a4dc99e5fc9e543055c844b5147abe3617166e484cd24fa2f697ce459f563fbb"
46
46
  }
47
47
  }
48
48
  }
@@ -74,7 +74,7 @@ When the user asks to accomplish a task with a Market SkillApp or official templ
74
74
 
75
75
  ### Official template
76
76
 
77
- When the user requests use of an official template, identify the target and automatically install its Skill Package into the current Agent's Skill root. For template execution, prepare and validate the input, obtain the current estimate through precheck, and present the estimated cost for confirmation before submission, following `billing.md`. Briefly explain any installation failure.
77
+ When the user requests use of an official template, identify the target and automatically install its Skill Package into the current Agent's Skill root. For template execution, prepare and validate the input, run precheck, and obtain confirmation before submission, following `billing.md`. Briefly explain any installation failure.
78
78
 
79
79
  Default workbook flow:
80
80
 
@@ -226,11 +226,11 @@ a new immutable version only after explicit confirmation. Do not promise a lossl
226
226
  ```text
227
227
  Discover Listing → Inspect public schema → Select Listing → Explicit use request
228
228
  → Check/install public Skill Package → Prepare public input → Quote
229
- → Show Market fee confirmation
229
+ → Check call-fee balance → Read historical model fee range → Show Market fee confirmation
230
230
  → User confirms → Run through Listing → Usage/results
231
231
  ```
232
232
 
233
- When the user requests use of a Market SkillApp, identify the Listing and automatically install its Skill Package into the current Agent's Skill root. For Market execution, prepare input according to the Listing's public schema, obtain a quote, and present the estimated cost for confirmation before running through the Listing, following `billing.md`. Briefly explain any installation failure.
233
+ When the user requests use of a Market SkillApp, identify the Listing and automatically install its Skill Package into the current Agent's Skill root. For Market execution, prepare input according to the Listing's public schema, obtain a quote, and obtain confirmation before running through the Listing, following `billing.md`. Briefly explain any installation failure.
234
234
 
235
235
  ### Market creator
236
236
 
@@ -270,8 +270,8 @@ Determine the current platform only from the user's explicit selection or a succ
270
270
  1. **Protect credentials.** Send a token only over HTTPS to the explicitly configured host. Never expose it, follow it across domains, or reuse it across platforms/environments.
271
271
  2. **Default to Excel.** Use JSON/JSONL only when the user explicitly requests programmatic input or supplies a compatible request file.
272
272
  3. **Separate preparation from execution.** Downloads, uploads, validation, quote, and precheck do not authorize a hosted run.
273
- 4. **Confirm every run by default.** Show the current server-provided estimate and obtain explicit confirmation in the current conversation before creating a hosted run, except during an explicitly activated Test Execution Mode defined below.
274
- 5. **Reconfirm changed input.** If input changes after validation, estimate, or confirmation, validate and estimate again and obtain a new confirmation. Tell the user that the changed input must be re-estimated and reconfirmed.
273
+ 4. **Confirm every run by default.** Obtain explicit confirmation in the current conversation before creating a hosted run, except during an explicitly activated Test Execution Mode defined below.
274
+ 5. **Reconfirm changed input.** If input changes after validation or confirmation, validate again and obtain a new confirmation. Tell the user that the changed input must be validated and reconfirmed.
275
275
  6. **Use execution IDs safely.** Every newly confirmed execution gets a new `client-request-id`. Reuse one only for an identical retry of the same confirmed request after an ambiguous failure.
276
276
  7. **Do not bypass Market.** Execute a SkillApp through its Listing and public schema. Never expose or reconstruct hidden prompts, steps, mappings, TemplateSpec, or private execution logic.
277
277
  8. **Respect order locking.** Market resolves the current sellable Listing Version when creating the order and locks that version and price for the order.
@@ -299,10 +299,10 @@ Activate it only when the user explicitly says they do not need a confirmation b
299
299
  - target environment / Server;
300
300
  - permitted template, private-template version, or Listing scope;
301
301
  - maximum tasks per run;
302
- - maximum cost per run and total cost, with currency;
302
+ - maximum creator call fee per run and total creator call fees, with currency;
303
303
  - expiry (default: the current conversation only).
304
304
 
305
- On activation, restate the limits once and record that Test Execution Mode is active. Within those exact limits, the Agent may validate, precheck, submit, watch, and retrieve results without requesting another per-run confirmation. However, a missing, zero, or currency-unknown precheck estimate is not eligible for automatic submission: stop and obtain a fresh explicit confirmation before creating that run. Each run must still use a new `client-request-id` and report its run ID, status, and actual cost when returned.
305
+ On activation, restate the limits once, explain that model fees are pending settlement and excluded from these limits, and record that Test Execution Mode is active. Within those exact limits, the Agent may validate, precheck, submit, watch, and retrieve results without requesting another per-run confirmation. Each run must still use a new `client-request-id` and report its run ID, status, and actual cost when returned.
306
306
 
307
307
  Test Execution Mode immediately stops and normal per-run confirmation resumes when any limit is exceeded, the input scope changes, the Server/platform changes, the mode expires, or the user withdraws it. Never infer activation from a testing context or from an earlier conversation.
308
308
 
@@ -8,6 +8,7 @@ Use this reference whenever a task involves precheck, quote, balance, currency,
8
8
  - [Fee and currency rules](#fee-and-currency-rules)
9
9
  - [Confirmation content](#confirmation-content)
10
10
  - [Confirmation templates](#confirmation-templates)
11
+ - [Actual fees after execution](#actual-fees-after-execution)
11
12
  - [Market settlement](#market-settlement)
12
13
  - [Persistent remote changes](#persistent-remote-changes)
13
14
  - [Creator earnings](#creator-earnings)
@@ -19,28 +20,27 @@ Installation, configuration, discovery, downloads, uploads, workbook filling, va
19
20
  Treat the interaction as:
20
21
 
21
22
  1. **Preparation**: prepare, validate, quote, and precheck only.
22
- 2. **Execution requested**: still prepare and show the current fee estimate; do not run yet.
23
- 3. **Confirmed execution**: run only after the user explicitly confirms the estimate in the current conversation.
23
+ 2. **Execution requested**: prepare for confirmation; do not run yet.
24
+ 3. **Confirmed execution**: run only after the user explicitly confirms the execution in the current conversation.
24
25
 
25
26
  Every run requires a fresh confirmation unless the active LoomLoom Skill Test Execution Mode explicitly covers that run. Confirmation for a different input, file, template, version, Listing, or conversation is not reusable.
26
27
 
27
- Test Execution Mode is a conversation-scoped Agent prompt authorization, not a server-side billing control. It may skip repeated confirmation only within the user-approved Server, execution scope, task limits, per-run and total cost limits, and expiry. A missing, zero, or currency-unknown precheck estimate is never eligible for automatic submission: obtain a fresh confirmation before submission. If any other condition changes or is exceeded, also obtain a fresh confirmation before submission.
28
+ Test Execution Mode is a conversation-scoped Agent prompt authorization, not a server-side billing control. It may skip repeated confirmation only within the user-approved Server, execution scope, task limits, per-run and total creator call fee limits, and expiry. If any other condition changes or is exceeded, also obtain a fresh confirmation before submission.
28
29
 
29
- If input changes after validation, quote/precheck, or confirmation, validate and estimate again, show the new estimate, and obtain a new confirmation. Tell the user in their language that the changed input must be re-estimated and reconfirmed.
30
+ If input changes after validation, quote/precheck, or confirmation, validate and quote/precheck again and obtain a new confirmation. Tell the user in their language that the changed input must be validated and reconfirmed.
30
31
 
31
32
  Use natural confirmation wording. In English, use `Reply: Confirm`. In other languages, use the natural localized equivalent. Do not ask ordinary users to reply with a raw CLI phrase such as `confirm submit`.
32
33
 
33
- Create a new client request ID for each newly confirmed execution. Reuse the original ID only for an identical retry of the same confirmed request after an ambiguous failure. A changed input, re-estimate, or new confirmation requires a new ID, even when values later happen to match an earlier request.
34
+ Create a new client request ID for each newly confirmed execution. Reuse the original ID only for an identical retry of the same confirmed request after an ambiguous failure. A changed input or new confirmation requires a new ID, even when values later happen to match an earlier request.
34
35
 
35
36
  ## Fee And Currency Rules
36
37
 
37
38
  `loomloom balance` displays one LoomLoom available balance. Wallet assets, applicable vouchers and pending charges are internal calculation inputs, not user-facing CLI fields. Gateway still makes the final request-admission decision.
38
39
 
39
- - For official and private precheck, use `estimatedTotalCostT` and the currency returned by the service.
40
- - For Market quote, use `estimatedBuyerPayableT` as the estimated pre-authorization.
41
- - Compute the creator call fee from `taskCount × taskFixedFeeT` only when both fields are returned.
40
+ If a backend check or submission returns `insufficient_balance` or an explicit insufficient-balance message, stop execution, convey the backend message in the user's language, and add the platform recharge link from `setup.md`. An HTTP status alone does not establish insufficient balance; report other errors normally.
41
+
42
+ - Use the quote's `effectiveCreatorFee` as the total call fee; it accounts for the applicable payment mode, including subscription coverage. Pass its amount and currency to `market check-balance` before Market confirmation.
42
43
  - Do not invent a missing fee field.
43
- - If a Market quote does not separately return model/API cost, say that it was not returned separately. Do not infer zero, subtract other fields to manufacture a value, or claim it is included in another field.
44
44
  - Preserve the server-provided currency. Do not locally convert USD and CNY.
45
45
 
46
46
  All `*FeeT`, `*CostT`, `*AmountT`, and `*PayableT` values use backend units:
@@ -65,9 +65,8 @@ Before a hosted run, show:
65
65
  - input source
66
66
  - row count or task size
67
67
  - action to be performed
68
- - estimated model/API cost or buyer payable amount
69
68
  - currency
70
- - available balance and sufficiency when returned
69
+ - creator call fee, model fee pending settlement, and current available balance in the three-line format below
71
70
  - a clear confirmation request
72
71
 
73
72
  Show the buyer-facing Market fee summary only. Do not show platform commission, creator net earnings, or revenue-sharing details to a buyer.
@@ -76,23 +75,25 @@ Do not show raw CLI commands, raw JSON bodies, generated request filenames, or t
76
75
 
77
76
  ## Confirmation Templates
78
77
 
78
+ Present these templates in the user's language. For official/private templates, use the precheck's available balance; if absent, query `loomloom balance` before confirmation. For Market, use the call fee and balance returned by `market check-balance` after a successful check.
79
+
79
80
  ### Official template
80
81
 
81
82
  ```text
82
- This will execute an official template. Please confirm the fee before execution.
83
+ This will execute an official template. Please confirm the execution details.
83
84
 
84
85
  Template: <template_display_name>
85
86
  Call type: official template
86
87
  Template ID: <template_id>
88
+ Template version: <version>
87
89
 
88
90
  Input:
89
91
  - Source: <input_source>
90
92
  - Task count: <task_count> task(s)
91
93
 
92
- Fee estimate:
93
- - Estimated model/API cost: <estimated_model_api_cost>
94
- - Estimated pre-authorization: <estimated_model_api_cost>
95
- - Available balance: <available_balance_if_returned>
94
+ 1. Creator call fee: None
95
+ 2. Model fee: Pending settlement; historical model fee per task: <minModelFee>–<maxModelFee> (reference only; actual usage applies)
96
+ 3. Current balance: <available_balance>
96
97
 
97
98
  Final billing rules:
98
99
  - Final charge is based on actual model/API usage
@@ -104,10 +105,12 @@ Please confirm whether to execute.
104
105
  Reply: Confirm
105
106
  ```
106
107
 
108
+ Use the returned official-template range when `availability` is `available`. For `no_data` or a failed lookup, show "Model fee: Pending settlement; no historical data available for reference" and continue confirmation.
109
+
107
110
  ### Private template
108
111
 
109
112
  ```text
110
- This will execute a private template. Please confirm the fee before execution.
113
+ This will execute a private template. Please confirm the execution details.
111
114
 
112
115
  Template: <template_display_name>
113
116
  Call type: private template
@@ -117,9 +120,9 @@ Template version: <version_id>
117
120
  Input:
118
121
  - Task count: <task_count> task(s)
119
122
 
120
- Fee estimate:
121
- - Estimated model/API cost: <estimated_model_api_cost>
122
- - Estimated pre-authorization: <estimated_model_api_cost>
123
+ 1. Creator call fee: None
124
+ 2. Model fee: Pending settlement
125
+ 3. Current balance: <available_balance>
123
126
 
124
127
  Final billing rules:
125
128
  - Final charge = actual model/API cost
@@ -134,7 +137,7 @@ Reply: Confirm
134
137
  ### Public Market template / SkillApp
135
138
 
136
139
  ```text
137
- This will make a paid call to a public Market template. Please confirm the fee before execution.
140
+ This will make a paid call to a public Market template. Please confirm the execution details.
138
141
 
139
142
  Template: <template_display_name>
140
143
  Call type: public Market template
@@ -145,28 +148,43 @@ Input:
145
148
  - Task count: <task_count> task(s)
146
149
  - Pricing rule: creator call fee is quoted per task
147
150
 
148
- Fee estimate:
149
- - Creator call fee: <creator_call_fee> (<task_count> task(s) x <task_fixed_fee>)
150
- - Estimated model/API cost: <estimated_model_api_cost_or_not_returned_separately>
151
- - Estimated pre-authorization: <estimated_buyer_payable>
151
+ 1. Creator call fee: <creator_call_fee> (<task_count> task(s) x <task_fixed_fee>)
152
+ 2. Model fee: Pending settlement; historical actual model fee per task for this SkillApp: <minModelFee>–<maxModelFee> (reference only; billed by actual usage, which may exceed this range)
153
+ 3. Current balance: <available_balance>
152
154
 
153
155
  Final billing rules:
154
156
  - The Listing Version and price are locked when the order is created
155
157
  - For a completed run, final charge = applicable creator call fee + actual model/API cost
156
- - For a failed or cancelled run, the buyer's final charge is zero, the reserved amount is released, and the creator receives no earning
157
- - For a partially failed or partially cancelled run, the current implementation leaves the reserved amount and creator settlement pending resolution
158
+ - Use the returned transaction amounts for failed, cancelled, or partially completed runs; a run's status alone does not determine its final charge
158
159
 
159
160
  Please confirm whether to execute.
160
161
  Reply: Confirm
161
162
  ```
162
163
 
164
+ For Market, take `effectiveCreatorFee` from the output of `market quote` or `market workbook quote`. Include the task-count calculation only when it matches that total. When subscription coverage applies, show the returned applicable call fee and explain the coverage.
165
+
166
+ Read the historical range with `market model-cost-range <listing-id> --listing-version-id <quote.listingVersionId>`. Use `minModelFee` and `maxModelFee` when `availability` is `available`. For `no_data` or a failed lookup, replace line 2 with "Model fee: Pending settlement; no historical data available for reference" and continue confirmation. If the quoted version changes, query that version again. Historical fees are per-task reference only; balance checks and Test Execution Mode limits use creator call fees.
167
+
168
+ ## Actual Fees After Execution
169
+
170
+ For Market, use `usage get <run-transaction-id>` (`usage list` for history) and present in the user's language:
171
+
172
+ ```text
173
+ Actual amount: <finalBuyerPayable>
174
+ Creator call fee: <actualCreatorFee>
175
+ Model fee: <actualExecutionCost>
176
+ ```
177
+
178
+ For `feeStatus: pending`, show "Pending settlement". For `unavailable`, show known amounts and mark missing ones as unavailable; never substitute zero.
179
+
180
+ For official/private templates, use the actual cost from `run get` or the final `run watch` result for both total and model fee; creator call fee is "None". If absent, show "Pending settlement".
181
+
163
182
  ## Market Settlement
164
183
 
165
184
  Interpret Market settlement from the returned transaction state:
166
185
 
167
- - **Completed**: settle the buyer's actual model/API cost plus the applicable creator call fee, and credit the creator.
168
- - **Failed or cancelled**: buyer final charge is zero, reserved amount is released, and creator earning is zero.
169
- - **Partially failed or partially cancelled**: the current implementation does not capture or release the reserved amount and does not credit the creator; the transaction remains pending resolution.
186
+ - **Succeeded, failed, or cancelled transaction**: use the actual amounts returned by the usage record. Partial completion can still incur model and creator call fees; do not infer zero from cancellation alone.
187
+ - **Transaction still running or awaiting resolution**: fees are pending settlement, even if the run has finished.
170
188
 
171
189
  Do not claim that a human or manual review process exists unless the service explicitly reports one.
172
190
 
@@ -47,6 +47,7 @@ For execution commands, pass an explicit `--client-request-id`. Reuse it only fo
47
47
 
48
48
  ## Error Recovery
49
49
 
50
+ - Failed `market model-cost-range` lookup: use the unavailable-history fallback in `billing.md` and continue confirmation.
50
51
  - Local flag, file, JSON, workbook, or schema error: correct the input and retry; do not run `doctor` automatically.
51
52
  - Authentication, endpoint, network, service-version, or unexpected service error: run `loomloom doctor`.
52
53
  - Ambiguous paid or remote-state-changing failure: query the relevant run, Listing, usage transaction, or review state before retrying.
@@ -87,6 +88,7 @@ On successful `login --output json`, the `token` field is masked and is not a re
87
88
 
88
89
  - `loomloom template list`
89
90
  - `loomloom template schema <template-id>`
91
+ - `loomloom template model-cost-range <template-id> [--version <vN>]`
90
92
  - `loomloom template download <template-id>`
91
93
  - `loomloom template validate-file <template-id> <xlsx-path>`
92
94
  - `loomloom template precheck-file <template-id> <xlsx-path>`
@@ -115,7 +117,6 @@ On successful `login --output json`, the `token` field is masked and is not a re
115
117
  - `loomloom template-spec validate-workbook <template-id> <version-id> <xlsx-path>`
116
118
  - `loomloom template-spec precheck-workbook <template-id> <version-id> <xlsx-path>`
117
119
  - `loomloom template-spec submit-workbook <template-id> <version-id> <xlsx-path> --client-request-id <id>`
118
- - `loomloom template-spec estimate <template-id> --version-id <version-id> --input-file-id <input_file_id>`
119
120
  - `loomloom template-spec precheck <template-id> --version-id <version-id> --input-file-id <input_file_id>`
120
121
  - `loomloom template-spec run <template-id> --version-id <version-id> --input-file-id <input_file_id> --client-request-id <id>`
121
122
 
@@ -188,6 +189,8 @@ the historical version.
188
189
  - `loomloom market list [--keyword <text>] [--category <code>] [--sort-by default|usage|newest] [--page <n>] [--page-size <1-15>]`
189
190
  - `loomloom market show <resource-id> [--source market|official]`
190
191
  - `loomloom market quote <listing-id> --input-file <request.json>`
192
+ - `loomloom market check-balance --call-fee <amount> --currency <currency>`
193
+ - `loomloom market model-cost-range <listing-id> [--listing-version-id <version-id>]`
191
194
  - `loomloom market run <listing-id> --input-file <request.json> --confirm --client-request-id <id>`
192
195
  - `loomloom market workbook download <listing-id> --output-file <xlsx>`
193
196
  - `loomloom market workbook validate <listing-id> --file <xlsx>`
@@ -24,16 +24,17 @@ If input changes after validation, precheck, or confirmation:
24
24
 
25
25
  1. Validate again.
26
26
  2. Precheck again.
27
- 3. Show the new estimate.
28
- 4. Obtain a new confirmation.
29
- 5. Use a new client request ID.
27
+ 3. Obtain a new confirmation.
28
+ 4. Use a new client request ID.
30
29
 
31
- Tell the user in their language that the changed input must be re-estimated and reconfirmed.
30
+ Tell the user in their language that the changed input must be checked and reconfirmed.
32
31
 
33
32
  ## Official Templates
34
33
 
35
34
  Use official templates unless the user explicitly asks to create or execute their own private template.
36
35
 
36
+ Before fee confirmation, run `loomloom template model-cost-range <template-id> --version <schema.version>` using the version returned by `template schema`. Show the per-task history as described in `billing.md`; missing history or a failed lookup does not block confirmation. Refresh the lookup and confirmation if the template version changes.
37
+
37
38
  Discover and inspect:
38
39
 
39
40
  ```bash
@@ -84,15 +85,12 @@ Use only for an explicit JSONL/API/programmatic request:
84
85
  1. Prepare the JSONL rows.
85
86
  2. `loomloom orchestration-input upload <file.jsonl>`
86
87
  3. Preserve the returned `inputFileId`.
87
- 4. Optionally run `loomloom template-spec estimate <template-id> --version-id <version-id> --input-file-id <input_file_id>` for a fast budget reference. This does not validate referenced resources.
88
- 5. `loomloom template-spec precheck <template-id> --version-id <version-id> --input-file-id <input_file_id>`
89
- 6. Show the private-template fee confirmation and wait for explicit confirmation.
90
- 7. `loomloom template-spec run <template-id> --version-id <version-id> --input-file-id <input_file_id> --client-request-id <id>`
88
+ 4. `loomloom template-spec precheck <template-id> --version-id <version-id> --input-file-id <input_file_id>`
89
+ 5. Show the private-template fee confirmation and wait for explicit confirmation.
90
+ 6. `loomloom template-spec run <template-id> --version-id <version-id> --input-file-id <input_file_id> --client-request-id <id>`
91
91
 
92
92
  For common single-root workflows, each non-empty JSONL line may be a flat object with string values. Unified rows using `steps.<step-id>.executions[]` are also supported when exact step mappings are known. Parameter values must be strings and supported by the selected version. Never guess step IDs.
93
93
 
94
- If a requested path cannot return an estimate before submission, do not submit. Choose an equivalent precheck-capable path or explain what compatible input is required.
95
-
96
94
  ## Runs And Results
97
95
 
98
96
  Use:
@@ -72,7 +72,7 @@ personal entitlement. Preserve `subscriptionOffersStatus` (`available`,
72
72
  `unavailable`, or `notApplicable`) and nullable `payPerUseEnabled`; null does not
73
73
  mean payment is disabled. Subscription purchase waives creator call fees,
74
74
  while model fees remain billed by actual usage. Use `market quote` or workbook
75
- quote for the actual user's execution estimate.
75
+ quote for the applicable call fee, payment mode, and version.
76
76
 
77
77
  ## Buyer Flow
78
78
 
@@ -114,8 +114,10 @@ Do not show raw request JSON unless the user explicitly asks for JSON/API detail
114
114
  2. Collect input through an Excel-style experience or the user's natural-language values.
115
115
  3. Build public `inputRows` internally.
116
116
  4. `loomloom market quote <listing-id> --input-file <request.json>`
117
- 5. Show the Market confirmation template and wait for explicit confirmation.
118
- 6. `loomloom market run <listing-id> --input-file <request.json> --confirm --client-request-id <id>`
117
+ 5. `loomloom market check-balance --call-fee <effectiveCreatorFee.amount> --currency <effectiveCreatorFee.currency>` using the quote's total applicable call fee.
118
+ 6. If the balance check succeeds, run `loomloom market model-cost-range <listing-id> --listing-version-id <quote.listingVersionId>`.
119
+ 7. Show the Market confirmation template using the historical range or unavailable-history fallback in `billing.md`, then wait for explicit confirmation.
120
+ 8. `loomloom market run <listing-id> --input-file <request.json> --confirm --client-request-id <id>`
119
121
 
120
122
  ### Workbook flow
121
123
 
@@ -124,8 +126,18 @@ Do not show raw request JSON unless the user explicitly asks for JSON/API detail
124
126
  3. Let the user fill or approve the workbook.
125
127
  4. `loomloom market workbook validate <listing-id> --file <xlsx>`
126
128
  5. `loomloom market workbook quote <listing-id> --file <xlsx>`
127
- 6. Show the Market confirmation template and wait for explicit confirmation.
128
- 7. `loomloom market workbook run <listing-id> --file <xlsx> --confirm --client-request-id <id>`
129
+ 6. `loomloom market check-balance --call-fee <effectiveCreatorFee.amount> --currency <effectiveCreatorFee.currency>` using the workbook quote's total applicable call fee.
130
+ 7. If the balance check succeeds, run `loomloom market model-cost-range <listing-id> --listing-version-id <quote.listingVersionId>` using the workbook quote's version.
131
+ 8. Show the Market confirmation template using the historical range or unavailable-history fallback in `billing.md`, then wait for explicit confirmation.
132
+ 9. `loomloom market workbook run <listing-id> --file <xlsx> --confirm --client-request-id <id>`
133
+
134
+ If `check-balance` fails, stop before confirmation and submission. For insufficient
135
+ balance, show the returned balance, call fee, and shortfall, and provide a clickable
136
+ recharge link following the platform guidance in `setup.md`. Do not submit even
137
+ if the user insists. After recharge, run `check-balance` again before continuing.
138
+ For a failed balance query, report the
139
+ error and retry the check before proceeding. If inputs, version, or payment mode
140
+ change, obtain a fresh quote and repeat the balance check and confirmation.
129
141
 
130
142
  Use `usage list` and `usage get <run-transaction-id>` for the buyer's own calls and settlement.
131
143
 
@@ -273,13 +273,13 @@ Reported names are cleanup candidates and may not currently be configured. Do no
273
273
  When ShengSuanYun reports insufficient balance, convey:
274
274
 
275
275
  ```text
276
- The current ShengSuanYun account has insufficient balance. Recharge in the ShengSuanYun console before continuing:
277
- https://console.shengsuanyun.com/user/recharge
276
+ Your balance is insufficient to continue this execution. Please recharge and retry.
277
+ [Recharge in ShengSuanYun](https://console.shengsuanyun.com/user/recharge)
278
278
  ```
279
279
 
280
280
  When CogFoundry reports insufficient balance, convey:
281
281
 
282
282
  ```text
283
- The current CogFoundry account has insufficient balance. Recharge in the CogFoundry console before continuing:
284
- https://console.cogfoundry.ai/credits
283
+ Your balance is insufficient to continue this execution. Please recharge and retry.
284
+ [Recharge in CogFoundry](https://console.cogfoundry.ai/credits)
285
285
  ```
@@ -10,6 +10,7 @@ Use this reference when creating, modifying, versioning, or explaining a private
10
10
  - [Usage mode](#usage-mode)
11
11
  - [TemplatePlan](#templateplan)
12
12
  - [Modeling and input rules](#modeling-and-input-rules)
13
+ - [Final delivery outputs](#final-delivery-outputs)
13
14
  - [Code and Loop Steps](#code-and-loop-steps)
14
15
  - [Legacy v1 semantic preservation](#legacy-v1-semantic-preservation)
15
16
  - [Creation and versioning](#creation-and-versioning)
@@ -240,6 +241,35 @@ both a Profile and Fixed Model Contracts for the same standard capability,
240
241
  choose from the user's model policy rather than assuming multimedia always
241
242
  means fixed model.
242
243
 
244
+ ## Final Delivery Outputs
245
+
246
+ When the author wants to identify final deliverables, add the optional top-level
247
+ `deliveryOutputs` declaration. Use `schemaVersion: 1` and an ordered, non-empty
248
+ `items` list (at most 128). Each item has a unique stable `key`, a user-visible
249
+ `label` (1–128 characters without control characters), and a root `stepId` plus
250
+ its exact output `portId`. Source ports must also be unique. Select the complete
251
+ port, including all its files; never invent file selectors or Artifact IDs.
252
+ Read `template-spec docs spec` and the bundled `delivery-code-outputs.json`
253
+ example before drafting.
254
+
255
+ Use `steps[].displayName` for step names. Final delivery labels name the chosen
256
+ business results, not every intermediate output. Code file/value outputs, model
257
+ outputs, and public Loop export aliases are allowed; Loop body Steps, private
258
+ iterations, diagnostics, and input attachments are not. Resolve actual model
259
+ ports from the target Server's contracts rather than guessing them.
260
+
261
+ Omit the field when no final delivery is intended; do not send an empty object
262
+ or empty items, and do not infer the final result from the last Step. Preserve
263
+ the declaration when exporting, previewing, editing, and creating another
264
+ version. Changes require a new immutable version and do not alter existing
265
+ Runs. Run `template-spec check` against the intended Server before saving;
266
+ server validation owns port and contract checks.
267
+
268
+ This author declaration adds no required input for ordinary template execution.
269
+ Local preview serves the JSON draft and does not provide a delivery editor.
270
+ `run result-rows`, `run result-workbook` (XLSX), and `artifact` commands retain
271
+ their existing behavior; Console download scopes are a separate interface.
272
+
243
273
  ## Code And Loop Steps
244
274
 
245
275
  Use a hosted Code Step for deterministic work between model Steps: reshaping or
@@ -1,19 +1,19 @@
1
1
  {
2
- "releaseTag": "v0.7.0",
3
- "version": "0.7.0",
2
+ "releaseTag": "v0.8.0-beta.2",
3
+ "version": "0.8.0-beta.2",
4
4
  "source": "agent-guidance/loomloom",
5
5
  "files": [
6
6
  {
7
7
  "path": "references/billing.md",
8
- "sha256": "41a86a510154d5813d6a30c6a67440699f8a76629e3dbd430be05c60b056f735"
8
+ "sha256": "b64b7db23a97964fb5cbb4d769f36d086ddfcb5c91f5931c7e031bf892c54f11"
9
9
  },
10
10
  {
11
11
  "path": "references/cli.md",
12
- "sha256": "12f56197e8d4af19ccbd35772947b506a0a36cda515219814ca1adba49d99f5b"
12
+ "sha256": "9f6944fe522f7640bdc63c7e0d22a02298e481797e8fa6f3f20e6d3bd1b4b7bb"
13
13
  },
14
14
  {
15
15
  "path": "references/execution.md",
16
- "sha256": "bbb626ce282f13e567efa2558dfa6de523364678f3581de647c70708b66fbc43"
16
+ "sha256": "b6494769144e9b43bd4cdfee6df8cc190848ad2a9a6c79f25cfa5df9fb39ee7c"
17
17
  },
18
18
  {
19
19
  "path": "references/local-skills.md",
@@ -21,15 +21,15 @@
21
21
  },
22
22
  {
23
23
  "path": "references/market.md",
24
- "sha256": "bfa7ffc7a958029277955215da1ad017577fbf72cb09a86883958dad8b574b2e"
24
+ "sha256": "d5f775f0f3e2c1c63df2583544ffe46ec1ad6f85b8dce9e63e9c1bda9d06f0b9"
25
25
  },
26
26
  {
27
27
  "path": "references/setup.md",
28
- "sha256": "ceae1d8e3fbe62a9dd4d8388cf3828da186b0ecadc0fc70fb71e6921dc0a4757"
28
+ "sha256": "0e5ecbdca82d8bafe7aa17e523ae86edc07f90a347b6754c2d85507d4d636d8e"
29
29
  },
30
30
  {
31
31
  "path": "references/template-spec.md",
32
- "sha256": "0a4a3966b77ca5c1c3891cca315c8790cf9ef522a9ea5ead623cf14b91c12093"
32
+ "sha256": "2108fb2323851fd937f22b838c31505a985d19fb77e96101548384568b8ad71f"
33
33
  },
34
34
  {
35
35
  "path": "references/workflow-preview.md",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  {
39
39
  "path": "SKILL.md",
40
- "sha256": "b5cb0552ccc663ce7407102b1df24155f39fa9dd88e05d376218fbaad89c3ce4"
40
+ "sha256": "94a03dfb1b2b309a0fb85b8426fd9940b3979564527053f087c245483f2e5f5a"
41
41
  }
42
42
  ]
43
43
  }