@oxy-hq/cli 0.12.1 → 0.13.0

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.
Files changed (33) hide show
  1. package/README.md +605 -68
  2. package/dist/main.mjs +12125 -3088
  3. package/dist/main.mjs.map +1 -1
  4. package/dist/{mcp-CJWQm-yd.mjs → mcp-vlYd5Bms.mjs} +2 -2
  5. package/dist/{mcp-CJWQm-yd.mjs.map → mcp-vlYd5Bms.mjs.map} +1 -1
  6. package/json-schemas/agent-test.json +47 -2
  7. package/json-schemas/agentic.json +77 -0
  8. package/json-schemas/config.json +2 -1
  9. package/json-schemas/topic.json +252 -0
  10. package/json-schemas/view.json +473 -0
  11. package/package.json +2 -2
  12. package/skills/oxy-agents/SKILL.md +29 -26
  13. package/skills/oxy-agents/references/quick-reference.md +4 -6
  14. package/skills/oxy-agents/templates/agentic-template.yml +2 -1
  15. package/skills/oxy-airway-pipelines/SKILL.md +27 -2
  16. package/skills/oxy-automations/SKILL.md +42 -28
  17. package/skills/oxy-cli/SKILL.md +15 -7
  18. package/skills/oxy-custom-apps/SKILL.md +293 -7
  19. package/skills/oxy-custom-apps/references/app-calls.md +98 -0
  20. package/skills/oxy-custom-apps/references/phone-layout.md +16 -2
  21. package/skills/oxy-custom-apps/references/sandbox-agent-loop.md +8 -8
  22. package/skills/oxy-evals/SKILL.md +60 -36
  23. package/skills/oxy-evals/references/diagnosis.md +7 -5
  24. package/skills/oxy-evals/references/results-json.md +23 -15
  25. package/skills/oxy-evals/references/writing-expected.md +3 -2
  26. package/skills/oxy-experiments/SKILL.md +4 -3
  27. package/skills/oxy-semantic-modeling/SKILL.md +14 -12
  28. package/template/.claude/hooks/oxyc-cloud-session.sh +40 -8
  29. package/template/.github/workflows/publish.yaml +5 -5
  30. package/template/.github/workflows/validate.yaml +125 -199
  31. package/template/README.md +50 -21
  32. package/template/_gitignore +4 -4
  33. package/template/config.yml +2 -2
@@ -0,0 +1,473 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "Dimension": {
5
+ "description": "Represents a dimension in the semantic model",
6
+ "properties": {
7
+ "description": {
8
+ "description": "Human-readable description of what this dimension represents",
9
+ "type": [
10
+ "string",
11
+ "null"
12
+ ]
13
+ },
14
+ "expr": {
15
+ "description": "SQL expression that defines how to calculate this dimension",
16
+ "type": "string"
17
+ },
18
+ "name": {
19
+ "description": "Unique identifier for the dimension within the view",
20
+ "type": "string"
21
+ },
22
+ "original_expr": {
23
+ "description": "Original expression before variable encoding (if variables were used)",
24
+ "type": [
25
+ "string",
26
+ "null"
27
+ ]
28
+ },
29
+ "samples": {
30
+ "description": "Example values to help users understand the dimension content",
31
+ "items": {
32
+ "type": "string"
33
+ },
34
+ "type": [
35
+ "array",
36
+ "null"
37
+ ]
38
+ },
39
+ "synonyms": {
40
+ "description": "Alternative names or terms that refer to this dimension",
41
+ "items": {
42
+ "type": "string"
43
+ },
44
+ "type": [
45
+ "array",
46
+ "null"
47
+ ]
48
+ },
49
+ "type": {
50
+ "allOf": [
51
+ {
52
+ "$ref": "#/definitions/DimensionType"
53
+ }
54
+ ],
55
+ "description": "Data type of the dimension"
56
+ }
57
+ },
58
+ "required": [
59
+ "expr",
60
+ "name",
61
+ "type"
62
+ ],
63
+ "type": "object"
64
+ },
65
+ "DimensionType": {
66
+ "description": "Represents the data type of a dimension",
67
+ "enum": [
68
+ "string",
69
+ "number",
70
+ "date",
71
+ "datetime",
72
+ "boolean"
73
+ ],
74
+ "type": "string"
75
+ },
76
+ "Driver": {
77
+ "description": "A driver relationship: a measure that influences this measure's value.\n\nSupports two modes: qualitative (`direction`/`strength`/`confidence`) and quantitative (`coefficient`/`form`/`intercept`/`lag`).",
78
+ "properties": {
79
+ "coefficient": {
80
+ "description": "Marginal effect coefficient (quantitative mode).",
81
+ "format": "double",
82
+ "type": [
83
+ "number",
84
+ "null"
85
+ ]
86
+ },
87
+ "confidence": {
88
+ "allOf": [
89
+ {
90
+ "$ref": "#/definitions/DriverConfidence"
91
+ }
92
+ ],
93
+ "default": "medium",
94
+ "description": "Confidence in the relationship."
95
+ },
96
+ "description": {
97
+ "description": "Human-readable description of the relationship.",
98
+ "type": [
99
+ "string",
100
+ "null"
101
+ ]
102
+ },
103
+ "direction": {
104
+ "allOf": [
105
+ {
106
+ "$ref": "#/definitions/DriverDirection"
107
+ }
108
+ ],
109
+ "default": "unknown",
110
+ "description": "Direction of the relationship."
111
+ },
112
+ "form": {
113
+ "allOf": [
114
+ {
115
+ "$ref": "#/definitions/DriverForm"
116
+ }
117
+ ],
118
+ "default": "linear",
119
+ "description": "Functional form of the relationship."
120
+ },
121
+ "intercept": {
122
+ "description": "Intercept term (quantitative mode).",
123
+ "format": "double",
124
+ "type": [
125
+ "number",
126
+ "null"
127
+ ]
128
+ },
129
+ "lag": {
130
+ "description": "Lag in days before a change in the driver affects the target.",
131
+ "format": "uint64",
132
+ "minimum": 0.0,
133
+ "type": [
134
+ "integer",
135
+ "null"
136
+ ]
137
+ },
138
+ "measure": {
139
+ "description": "Fully qualified measure reference (e.g., \"marketing.ad_spend\").",
140
+ "type": "string"
141
+ },
142
+ "refs": {
143
+ "description": "Links to supporting research, experiments, or documentation.",
144
+ "items": {
145
+ "type": "string"
146
+ },
147
+ "type": [
148
+ "array",
149
+ "null"
150
+ ]
151
+ },
152
+ "strength": {
153
+ "allOf": [
154
+ {
155
+ "$ref": "#/definitions/DriverStrength"
156
+ }
157
+ ],
158
+ "default": "moderate",
159
+ "description": "Strength of the relationship."
160
+ }
161
+ },
162
+ "required": [
163
+ "measure"
164
+ ],
165
+ "type": "object"
166
+ },
167
+ "DriverConfidence": {
168
+ "enum": [
169
+ "high",
170
+ "medium",
171
+ "low"
172
+ ],
173
+ "type": "string"
174
+ },
175
+ "DriverDirection": {
176
+ "enum": [
177
+ "positive",
178
+ "negative",
179
+ "unknown"
180
+ ],
181
+ "type": "string"
182
+ },
183
+ "DriverForm": {
184
+ "description": "Functional form of a quantitative driver relationship.\n\nThis mirrors `oxy_airlayer_compat::schema::models::DriverForm`, which is where the shape is actually defined (a basis plus a link, in `oxy_airlayer_compat::engine::response`). The copy exists because this crate parses `.view.yml` itself, so a form the engine accepts and this enum does not is a deserialization failure on a perfectly valid file — keep the two variant lists in step.\n\nNote the multi-term shapes (`quadratic`, `cubic`, `linear-log-quadratic`) cannot be given their coefficients through this crate's [`Driver`], which carries only the scalar `coefficient`. Declared here they are fit-only: the shape is honoured, the magnitude comes from history.",
185
+ "enum": [
186
+ "linear",
187
+ "log-log",
188
+ "log-linear",
189
+ "linear-log",
190
+ "quadratic",
191
+ "cubic",
192
+ "sqrt",
193
+ "inverse",
194
+ "linear-log-quadratic"
195
+ ],
196
+ "type": "string"
197
+ },
198
+ "DriverStrength": {
199
+ "enum": [
200
+ "strong",
201
+ "moderate",
202
+ "weak"
203
+ ],
204
+ "type": "string"
205
+ },
206
+ "Entity": {
207
+ "description": "Represents an entity in the semantic model",
208
+ "properties": {
209
+ "description": {
210
+ "default": null,
211
+ "description": "Human-readable description of what this entity represents",
212
+ "type": [
213
+ "string",
214
+ "null"
215
+ ]
216
+ },
217
+ "key": {
218
+ "description": "The dimension(s) that should be used as the key for the entity Can be a single key or multiple keys for composite primary keys",
219
+ "type": [
220
+ "string",
221
+ "null"
222
+ ]
223
+ },
224
+ "keys": {
225
+ "description": "Multiple keys for composite primary keys",
226
+ "items": {
227
+ "type": "string"
228
+ },
229
+ "type": [
230
+ "array",
231
+ "null"
232
+ ]
233
+ },
234
+ "name": {
235
+ "description": "Unique identifier for the entity within the view",
236
+ "type": "string"
237
+ },
238
+ "type": {
239
+ "allOf": [
240
+ {
241
+ "$ref": "#/definitions/EntityType"
242
+ }
243
+ ],
244
+ "description": "Type of entity (primary or foreign)"
245
+ }
246
+ },
247
+ "required": [
248
+ "name",
249
+ "type"
250
+ ],
251
+ "type": "object"
252
+ },
253
+ "EntityType": {
254
+ "description": "Represents the type of an entity in the semantic model",
255
+ "oneOf": [
256
+ {
257
+ "description": "Primary entity representing the main subject of a view",
258
+ "enum": [
259
+ "primary"
260
+ ],
261
+ "type": "string"
262
+ },
263
+ {
264
+ "description": "Foreign entity representing a reference to an entity defined in another view",
265
+ "enum": [
266
+ "foreign"
267
+ ],
268
+ "type": "string"
269
+ }
270
+ ]
271
+ },
272
+ "Measure": {
273
+ "description": "Represents a measure in the semantic model",
274
+ "properties": {
275
+ "description": {
276
+ "description": "Human-readable description of what this measure represents",
277
+ "type": [
278
+ "string",
279
+ "null"
280
+ ]
281
+ },
282
+ "drivers": {
283
+ "description": "Driver relationships: measures that influence this measure's value",
284
+ "items": {
285
+ "$ref": "#/definitions/Driver"
286
+ },
287
+ "type": [
288
+ "array",
289
+ "null"
290
+ ]
291
+ },
292
+ "expr": {
293
+ "description": "SQL expression for the measure (required for most types, not for count)",
294
+ "type": [
295
+ "string",
296
+ "null"
297
+ ]
298
+ },
299
+ "filters": {
300
+ "description": "List of filters to apply to the measure calculation",
301
+ "items": {
302
+ "$ref": "#/definitions/MeasureFilter"
303
+ },
304
+ "type": [
305
+ "array",
306
+ "null"
307
+ ]
308
+ },
309
+ "name": {
310
+ "description": "Unique identifier for the measure within the view",
311
+ "type": "string"
312
+ },
313
+ "original_expr": {
314
+ "description": "Original expression before variable encoding (if variables were used)",
315
+ "type": [
316
+ "string",
317
+ "null"
318
+ ]
319
+ },
320
+ "samples": {
321
+ "description": "Sample values or example outputs to help users understand the measure",
322
+ "items": {
323
+ "type": "string"
324
+ },
325
+ "type": [
326
+ "array",
327
+ "null"
328
+ ]
329
+ },
330
+ "synonyms": {
331
+ "description": "Alternative names or terms that refer to this measure",
332
+ "items": {
333
+ "type": "string"
334
+ },
335
+ "type": [
336
+ "array",
337
+ "null"
338
+ ]
339
+ },
340
+ "type": {
341
+ "allOf": [
342
+ {
343
+ "$ref": "#/definitions/MeasureType"
344
+ }
345
+ ],
346
+ "description": "Type of measure aggregation"
347
+ }
348
+ },
349
+ "required": [
350
+ "name",
351
+ "type"
352
+ ],
353
+ "type": "object"
354
+ },
355
+ "MeasureFilter": {
356
+ "description": "Represents a filter condition for measures",
357
+ "properties": {
358
+ "description": {
359
+ "description": "Human-readable description of the filter",
360
+ "type": [
361
+ "string",
362
+ "null"
363
+ ]
364
+ },
365
+ "expr": {
366
+ "description": "SQL expression for the filter condition",
367
+ "type": "string"
368
+ },
369
+ "original_expr": {
370
+ "description": "Original expression before variable encoding (if variables were used)",
371
+ "type": [
372
+ "string",
373
+ "null"
374
+ ]
375
+ }
376
+ },
377
+ "required": [
378
+ "expr"
379
+ ],
380
+ "type": "object"
381
+ },
382
+ "MeasureType": {
383
+ "description": "Represents the type of a measure aggregation. `number` is a pass-through: `expr` must already contain its own aggregation.",
384
+ "enum": [
385
+ "count",
386
+ "sum",
387
+ "average",
388
+ "min",
389
+ "max",
390
+ "count_distinct",
391
+ "count_distinct_approx",
392
+ "median",
393
+ "custom",
394
+ "number"
395
+ ],
396
+ "type": "string"
397
+ }
398
+ },
399
+ "description": "Represents a view in the semantic model",
400
+ "properties": {
401
+ "datasource": {
402
+ "description": "Name of the datasource to use for this view",
403
+ "type": [
404
+ "string",
405
+ "null"
406
+ ]
407
+ },
408
+ "description": {
409
+ "default": null,
410
+ "description": "Human-readable description of what this view represents",
411
+ "type": [
412
+ "string",
413
+ "null"
414
+ ]
415
+ },
416
+ "dimensions": {
417
+ "description": "List of dimensions (attributes) available in this view",
418
+ "items": {
419
+ "$ref": "#/definitions/Dimension"
420
+ },
421
+ "type": "array"
422
+ },
423
+ "entities": {
424
+ "description": "List of entities that define the core objects in this view",
425
+ "items": {
426
+ "$ref": "#/definitions/Entity"
427
+ },
428
+ "type": "array"
429
+ },
430
+ "label": {
431
+ "description": "Display name for the view (defaults to name if not specified)",
432
+ "type": [
433
+ "string",
434
+ "null"
435
+ ]
436
+ },
437
+ "measures": {
438
+ "description": "List of measures (aggregations) available in this view",
439
+ "items": {
440
+ "$ref": "#/definitions/Measure"
441
+ },
442
+ "type": [
443
+ "array",
444
+ "null"
445
+ ]
446
+ },
447
+ "name": {
448
+ "description": "Unique identifier for the view within the semantic model",
449
+ "type": "string"
450
+ },
451
+ "sql": {
452
+ "description": "Custom SQL query (required if table not specified)",
453
+ "type": [
454
+ "string",
455
+ "null"
456
+ ]
457
+ },
458
+ "table": {
459
+ "description": "Database table reference (required if sql not specified)",
460
+ "type": [
461
+ "string",
462
+ "null"
463
+ ]
464
+ }
465
+ },
466
+ "required": [
467
+ "dimensions",
468
+ "entities",
469
+ "name"
470
+ ],
471
+ "title": "View",
472
+ "type": "object"
473
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy-hq/cli",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "oxyc — the Oxy CLI: a gh-api-style client for the Oxy HTTP API, plus the customer-account tooling that scopes a session to one customer.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,7 +59,7 @@
59
59
  "@types/node": "^26.6.6",
60
60
  "tsdown": "^0.23.7",
61
61
  "typescript": "^7.0.2",
62
- "vitest": "^5.1.0"
62
+ "vitest": "^5.1.1"
63
63
  },
64
64
  "engines": {
65
65
  "node": ">=20"
@@ -8,7 +8,7 @@ description: >-
8
8
  agent can't see a database", "which tools can a state call", "set thinking, effort,
9
9
  budget_tokens or extended thinking", "per-state model or max_retries", "validation rules",
10
10
  "Cube or Looker semantic_engine", "analytics vs app-builder agent", "`.agent.yml` or
11
- `.agentic.yml`", and validating, running (`oxy agentic run`) or testing (`oxy test`) an agent.
11
+ `.agentic.yml`", and validating, running (`oxyc agentic run`) or testing (`oxyc evals run`) an agent.
12
12
  Not for writing the semantic model itself (views, topics) or automations.
13
13
  ---
14
14
 
@@ -37,9 +37,10 @@ the pipeline. You do not define its states or its tools.
37
37
  Jinja (`{{ databases.x.dialect }}`) is passed to the model literally, and a
38
38
  classic `name:` is dropped, so the agent's id becomes its file stem.
39
39
  - **There is no `kind:` field.** Every `.agentic.yml` runs the same analytics
40
- pipeline. A file named `app_builder.agentic.yml` is not special. Generating
41
- views or agent files is the in-product **Builder Agent** (chat Build mode),
42
- and no `.agentic.yml` configures it.
40
+ pipeline. A file named `app_builder.agentic.yml` is not special, and no
41
+ `.agentic.yml` writes views or agent files: those are edited in the
42
+ workspace's repository (`oxyc workspace clone`, or the Factory's "Work in
43
+ your editor" panel) and pushed, which compiles them.
43
44
  - **Automations are a different file.** Deterministic multi-step work is an
44
45
  automation, `.automation.yml` (`.procedure.yml` still works). `.workflow.yml`
45
46
  is no longer recognised at all. An agent can *run* an automation it finds in
@@ -267,30 +268,32 @@ thinking. A value you set is used as-is, and thinking tokens count against it.
267
268
  ## Validate, run, test
268
269
 
269
270
  ```bash
270
- oxyc validate --file agents/sales.agentic.yml # offline schema check, no server
271
- oxy validate --file agents/sales.agentic.yml # the runtime's own parser
272
- oxy agentic run agents/sales.agentic.yml -q "Revenue by region last quarter?"
273
- oxy test agents/sales.agentic.test.yml # LLM-judged evals
271
+ oxyc validate --file agents/sales.agentic.yml # offline: shape, databases:, llm.ref
272
+ oxyc agentic run agents/sales.agentic.yml -q "Revenue by region last quarter?" --workspace <id>
273
+ oxyc evals run agents/sales.agentic.test.yml --workspace <id> # LLM-judged evals, on the deployment
274
274
  ```
275
275
 
276
- - **Both validators are structural only.** They catch a bad shape (a
277
- malformed `thinking`, a wrong type, a duplicate key). `oxyc validate` also
278
- rejects the vendor spellings `openai` and `openai_compat`, which the runtime
279
- accepts, so write `open_ai` and `open_ai_compat` to satisfy both. Neither
280
- validator resolves `databases:` or `llm.ref`, expands globs, reads `${VAR}`
281
- placeholders, checks rule names or timezones, or notices unknown keys.
282
- - **The first full check is a run.** `oxy agentic run <path> -q "<question>"`
283
- builds the agent exactly as the server does and streams each state. It runs
284
- in a workspace directory and needs Oxy's Postgres database (`OXY_DATABASE_URL`),
285
- like `oxy serve`. Add `--json` for JSONL events, or `--thinking-mode
286
- extended_thinking`. A CLI run that pauses to ask the user something can't be
287
- usefully resumed from the CLI, because `oxy agentic answer` only marks the
288
- run as running and does not deliver the text. Ask a more specific question,
289
- or continue in the app.
290
- - **`oxy build` does not check agents.** It does nothing any more.
291
- - **`oxy test`** runs `.test.yml` evals against an agent and scores each case
292
- with an LLM judge. The format and flags are in
293
- [references/quick-reference.md](references/quick-reference.md).
276
+ - **`oxyc validate` checks the shape and the references.** It catches a bad
277
+ shape (a malformed `thinking`, a wrong type, a duplicate key) and a
278
+ `databases:` entry or `llm.ref` that names nothing in `config.yml`. It does
279
+ not expand globs, read `${VAR}` placeholders, check rule names or timezones,
280
+ or notice unknown keys (the runtime ignores them too). `oxy validate` is a
281
+ stub now that prints the `oxyc` command.
282
+ - **The first full check is a run.** `oxyc agentic run <path> -q "<question>"
283
+ --workspace <id>` runs the agent on the deployment and streams each state. It
284
+ runs what the workspace has compiled (push first), not your checkout, and
285
+ each run opens a chat thread in your history. Add `--json` for JSONL events,
286
+ or `--thinking-mode extended_thinking`. A run that stops to ask something
287
+ exits `0` with the question; answer it with `oxyc agentic answer <run_id>
288
+ --answer "..."` and follow the rest with `oxyc agentic events <run_id>`. An
289
+ `error` or `cancelled` run exits `1`. (The Rust `oxy agentic run` ran a local
290
+ file against `OXY_DATABASE_URL`; it is a stub that prints this command.)
291
+ - **`oxyc evals run`** runs `.test.yml` evals against an agent on the
292
+ deployment and scores each case with an LLM judge. It runs what the workspace
293
+ has compiled (push first), not your checkout, and exits `9` under
294
+ `--min-accuracy`. The format and flags are in
295
+ [references/quick-reference.md](references/quick-reference.md) and the
296
+ `oxy-evals` skill.
294
297
 
295
298
  To point an editor at the schema, start the file with:
296
299
 
@@ -38,7 +38,7 @@ An instruction-only agent (`instructions`, and no `databases`, `context` or
38
38
  | --- | --- | --- |
39
39
  | `ref` | none | A `name:` under config.yml `models:`. Supplies the vendor, key (a workspace secret in the cloud), base URL, Azure settings and headers |
40
40
  | `model` | from `ref`, else the first config.yml model | A provider model ID. Setting `model` without `ref` skips config.yml entirely, so the key must come from `api_key` or the server environment |
41
- | `vendor` | from `ref`, else `anthropic` | `anthropic`, `open_ai` (Responses API) or `open_ai_compat` (`/chat/completions`). The runtime also accepts `openai` and `openai_compat`; `oxyc validate` does not |
41
+ | `vendor` | from `ref`, else `anthropic` | `anthropic`, `open_ai` (Responses API) or `open_ai_compat` (`/chat/completions`). The runtime also accepts `openai` and `openai_compat`, and so does `oxyc validate` |
42
42
  | `api_key` | from `ref`, else `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` on the server | Prefer `ref` |
43
43
  | `base_url` | from `ref`, else the provider default | `open_ai_compat` defaults to `http://localhost:11434/v1` |
44
44
  | `max_tokens` | 4,096 without thinking; 16,384 (or budget + 4,096) with thinking | A value you set is used as-is, and thinking tokens count against it |
@@ -180,11 +180,9 @@ or the engine is unreachable at run start, the run fails.
180
180
 
181
181
  | Command | Checks |
182
182
  | --- | --- |
183
- | `oxyc validate --file <path>` | JSON-schema shape, offline. Catches wrong types, a malformed `thinking` and vendor spelling. Misses unknown keys, `ref`, databases, globs, rule names, env vars |
184
- | `oxy validate --file <path>` | parses with the runtime's own parser. Structural only, with the same blind spots |
185
- | `oxy agentic run <path> -q "<question>"` | the real build and run, streamed by state. `--json`, `--thinking-mode extended_thinking`. Needs Oxy's Postgres (`OXY_DATABASE_URL`) |
186
- | `oxy test [<file>.test.yml]` | LLM-judged evals; with no file, every `*.test.yml` in the workspace |
187
- | `oxy build` | not an agent check: it does nothing any more |
183
+ | `oxyc validate --file <path>` | offline: the shape (wrong types, a malformed `thinking`), and `databases:` / `llm.ref` against `config.yml`. Misses unknown keys (the runtime ignores them too), globs, rule names, env vars. Exit `9` on a finding. (`oxy validate` is a stub that prints this command) |
184
+ | `oxyc agentic run <path> -q "<question>" --workspace <id>` | the real build and run on the deployment, of what it has compiled (push first), streamed by state. `--json`, `--thinking-mode extended_thinking`. A question exits `0` (answer with `oxyc agentic answer <run_id> -a "..."`); `error` / `cancelled` exit `1` |
185
+ | `oxyc evals run [<file>.test.yml] --workspace <id>` | LLM-judged evals on the deployment, against the compiled (pushed) test files and agents; with no file, every compiled `*.test.yml`; exit `9` under `--min-accuracy` |
188
186
 
189
187
  ## `.test.yml` (evals)
190
188
 
@@ -5,7 +5,8 @@
5
5
  # `.test.` in the file name; those paths are not deployed.
6
6
  #
7
7
  # Check the shape offline: oxyc validate --file <path>
8
- # First real check is a run: oxy agentic run <path> -q "<question>"
8
+ # First real check is a run: oxyc agentic run <path> -q "<question>" --workspace <id>
9
+ # (on the deployment, so push first)
9
10
  #
10
11
  # Every key is optional. Unknown keys, at any level, are ignored without a
11
12
  # warning by the runtime and by both validators, so spell them exactly.
@@ -50,9 +50,10 @@ the run's `unsupported source kind` error is the authority.
50
50
 
51
51
  ## Source kinds: what is wired
52
52
 
53
- **Wired (16):** `rest_api`, `http_file`, `filesystem`, `google_sheets`,
53
+ **Wired (17):** `rest_api`, `http_file`, `filesystem`, `google_sheets`,
54
54
  `sql_database`, `postgres_cdc`, `clickhouse`, `toast`, `ubereats`, `sp_api`,
55
- `quickbooks`, `netsuite`, `weather`, `besttime`, `overture`, `overpass`.
55
+ `amazon_ads`, `quickbooks`, `netsuite`, `weather`, `besttime`, `overture`,
56
+ `overpass`.
56
57
 
57
58
  **Shipped by the engine but not wired — unavailable in Oxy:** `shopify`,
58
59
  `stripe`, `github`, `hubspot`, `salesforce`, `slack`, `jira`, `notion`,
@@ -127,6 +128,29 @@ provisioned under.
127
128
  nothing and refuses every named resource. A business with both accounts
128
129
  needs two pipelines.
129
130
 
131
+ ### `amazon_ads` (Amazon Ads): reports only, and slow
132
+
133
+ - **Resources:** `sp_search_term` (Sponsored Products search terms) and
134
+ `sp_placement` (campaigns by placement: `top_of_search`, `rest_of_search`,
135
+ `product_pages`, `off_amazon`), and `sp_advertised_product` (spend,
136
+ clicks and attributed sales per advertised SKU, merged on date, campaign,
137
+ ad group and SKU; airway 0.1.66 or later), all daily. List the ones you
138
+ need under `resources:`: each is its own report, and a report can take
139
+ 30 minutes or more to build. The source only requests and
140
+ downloads reports; it never changes a bid, budget or campaign.
141
+ - **Required:** `client_id`, `profile_id` (the advertiser profile, digits
142
+ only; a number or a string), and `default_start` (`YYYY-MM-DD`). A config
143
+ without `default_start` is refused. Amazon keeps about 90 days of these
144
+ reports, so an earlier date is clamped to that, and a later one loses
145
+ history silently.
146
+ - **`region` is `NA` only** today; another value is refused.
147
+ - **A report takes 10–50 minutes to build.** `poll_budget_minutes` (at most
148
+ 240) bounds how long one run waits. A report still pending when the run
149
+ ends is picked up by the next run, but only on a destination that commits
150
+ per write (Airhouse).
151
+ - **Previews refuse this kind:** a sample would create report jobs in the
152
+ advertiser's account.
153
+
130
154
  ## Credentials: per-kind `*_var` keys
131
155
 
132
156
  A `*_var` key names a secret **key**, never a value; the run resolves it from
@@ -139,6 +163,7 @@ not overlap — read the row for your kind, never borrow from another:**
139
163
  | `toast` | `client_id_var`, `client_secret_var` |
140
164
  | `quickbooks` | `client_secret_var`, `refresh_token_var`, `client_id_var` — or `access_token_var` alone (read-only custody) |
141
165
  | `sp_api` | `client_secret_var`, `refresh_token_var` |
166
+ | `amazon_ads` | `client_secret_var`, `refresh_token_var` |
142
167
  | `netsuite` | `private_key_var` — a multi-line PEM; the secret store must keep its newlines |
143
168
  | `clickhouse` | `password_var` |
144
169
  | `sql_database`, `postgres_cdc` | `connection_string_var` (a whole DSN) |