farseer-cli 1.17.0 → 1.19.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 (161) hide show
  1. package/README.md +3 -3
  2. package/dist/commands/app.js.map +0 -1
  3. package/dist/commands/apps.js.map +0 -1
  4. package/dist/commands/cells.js.map +0 -1
  5. package/dist/commands/code.js.map +0 -1
  6. package/dist/commands/config.js.map +0 -1
  7. package/dist/commands/dashboards.js.map +0 -1
  8. package/dist/commands/diff.js.map +0 -1
  9. package/dist/commands/dimensions.js.map +0 -1
  10. package/dist/commands/files.js.map +0 -1
  11. package/dist/commands/formula.js +16 -7
  12. package/dist/commands/formula.js.map +1 -2
  13. package/dist/commands/install.js.map +0 -1
  14. package/dist/commands/list.js.map +0 -1
  15. package/dist/commands/login.js +3 -3
  16. package/dist/commands/login.js.map +1 -2
  17. package/dist/commands/logout.js.map +0 -1
  18. package/dist/commands/mcp-server.js.map +0 -1
  19. package/dist/commands/model.js.map +0 -1
  20. package/dist/commands/pipeline.js.map +0 -1
  21. package/dist/commands/pull.js +1 -1
  22. package/dist/commands/pull.js.map +1 -2
  23. package/dist/commands/push.js +2 -2
  24. package/dist/commands/push.js.map +1 -2
  25. package/dist/commands/refresh.js.map +0 -1
  26. package/dist/commands/run.js.map +0 -1
  27. package/dist/commands/sheets.js.map +0 -1
  28. package/dist/commands/status.js.map +0 -1
  29. package/dist/commands/tool.js +120 -0
  30. package/dist/commands/tool.js.map +6 -0
  31. package/dist/commands/variables.js.map +0 -1
  32. package/dist/commands/whoami.js.map +0 -1
  33. package/dist/index.js +29 -12
  34. package/dist/index.js.map +1 -2
  35. package/dist/mcp/index.js.map +0 -1
  36. package/dist/mcp/prompts/workflows.js.map +0 -1
  37. package/dist/mcp/resources/documentation.js.map +0 -1
  38. package/dist/mcp/server.js.map +0 -1
  39. package/dist/mcp/skills.js.map +0 -1
  40. package/dist/mcp/tools/appTools.js.map +0 -1
  41. package/dist/mcp/tools/authTools.js +1 -1
  42. package/dist/mcp/tools/authTools.js.map +1 -2
  43. package/dist/mcp/tools/cellTools.js.map +0 -1
  44. package/dist/mcp/tools/dashboardTools.js.map +0 -1
  45. package/dist/mcp/tools/dataTools.js.map +0 -1
  46. package/dist/mcp/tools/folderTools.js.map +0 -1
  47. package/dist/mcp/tools/modelTools.js +65 -23
  48. package/dist/mcp/tools/modelTools.js.map +2 -3
  49. package/dist/mcp/tools/pipelineContract.js.map +0 -1
  50. package/dist/mcp/tools/pipelineTools.js.map +0 -1
  51. package/dist/mcp/tools/runTools.js +6 -2
  52. package/dist/mcp/tools/runTools.js.map +1 -2
  53. package/dist/mcp/tools/sheetTools.js.map +0 -1
  54. package/dist/mcp/tools/syncTools.js +2 -2
  55. package/dist/mcp/tools/syncTools.js.map +1 -2
  56. package/dist/mcp/utils/helpers.js.map +0 -1
  57. package/dist/mcp/utils/launchPin.js +1 -1
  58. package/dist/mcp/utils/launchPin.js.map +1 -2
  59. package/dist/mcp/utils/registerTool.js.map +0 -1
  60. package/dist/mcp/utils/session.js.map +0 -1
  61. package/dist/mcp/utils/tenantPin.js.map +0 -1
  62. package/dist/pipeline/compatibility.js.map +0 -1
  63. package/dist/pipeline/connect.js.map +0 -1
  64. package/dist/pipeline/create.js.map +0 -1
  65. package/dist/pipeline/errors.js.map +0 -1
  66. package/dist/pipeline/generated-reference.json +22 -10
  67. package/dist/pipeline/guide.js.map +0 -1
  68. package/dist/pipeline/init.js.map +0 -1
  69. package/dist/pipeline/operations.js.map +0 -1
  70. package/dist/pipeline/query.js.map +0 -1
  71. package/dist/pipeline/queryDownloads.js.map +0 -1
  72. package/dist/pipeline/queryWorker.js.map +0 -1
  73. package/dist/pipeline/readiness.js.map +0 -1
  74. package/dist/pipeline/reference.js.map +0 -1
  75. package/dist/pipeline/requests.js.map +0 -1
  76. package/dist/pipeline/runArguments.js.map +0 -1
  77. package/dist/pipeline/runtime.js.map +0 -1
  78. package/dist/pipeline/service.js.map +0 -1
  79. package/dist/services/agentApprovalFetch.js +7 -3
  80. package/dist/services/agentApprovalFetch.js.map +1 -2
  81. package/dist/services/appSyncService.js.map +0 -1
  82. package/dist/services/apps.js.map +0 -1
  83. package/dist/services/authErrors.js.map +0 -1
  84. package/dist/services/codefirst/api.js +38 -5
  85. package/dist/services/codefirst/api.js.map +1 -2
  86. package/dist/services/codefirst/binaryDisk.js.map +0 -1
  87. package/dist/services/codefirst/byteHashes.js +5 -0
  88. package/dist/services/codefirst/byteHashes.js.map +1 -2
  89. package/dist/services/codefirst/documents.js +41 -15
  90. package/dist/services/codefirst/documents.js.map +1 -2
  91. package/dist/services/codefirst/layoutBinaryProjection.js +24 -13
  92. package/dist/services/codefirst/layoutBinaryProjection.js.map +1 -2
  93. package/dist/services/codefirst/layoutCompose.js +44 -38
  94. package/dist/services/codefirst/layoutCompose.js.map +1 -2
  95. package/dist/services/codefirst/layoutCore.js +14 -1
  96. package/dist/services/codefirst/layoutCore.js.map +1 -2
  97. package/dist/services/codefirst/layoutPaths.js +80 -4
  98. package/dist/services/codefirst/layoutPaths.js.map +1 -2
  99. package/dist/services/codefirst/layoutProjection.js +73 -39
  100. package/dist/services/codefirst/layoutProjection.js.map +1 -2
  101. package/dist/services/codefirst/layoutReadback.js +357 -130
  102. package/dist/services/codefirst/layoutReadback.js.map +2 -3
  103. package/dist/services/codefirst/layoutReadbackPlacement.js +94 -57
  104. package/dist/services/codefirst/layoutReadbackPlacement.js.map +2 -3
  105. package/dist/services/codefirst/layoutReceipt.js +283 -243
  106. package/dist/services/codefirst/layoutReceipt.js.map +2 -3
  107. package/dist/services/codefirst/layoutScan.js +208 -110
  108. package/dist/services/codefirst/layoutScan.js.map +1 -2
  109. package/dist/services/codefirst/output.js +76 -10
  110. package/dist/services/codefirst/output.js.map +1 -2
  111. package/dist/services/codefirst/types.js.map +0 -1
  112. package/dist/services/codefirst/workflow.js +65 -29
  113. package/dist/services/codefirst/workflow.js.map +2 -3
  114. package/dist/services/codefirst/workspace.js.map +0 -1
  115. package/dist/services/codefirst/workspaceLock.js.map +0 -1
  116. package/dist/services/codefirst/workspaceRoot.js +2 -1
  117. package/dist/services/codefirst/workspaceRoot.js.map +1 -2
  118. package/dist/services/configService.js.map +0 -1
  119. package/dist/services/credentials.js.map +0 -1
  120. package/dist/services/farseerService.js +3 -1
  121. package/dist/services/farseerService.js.map +1 -2
  122. package/dist/services/httpError.js.map +0 -1
  123. package/dist/services/modelExport.js.map +0 -1
  124. package/dist/services/organisation.js.map +0 -1
  125. package/dist/services/preflight.js.map +0 -1
  126. package/dist/services/realms.js.map +0 -1
  127. package/dist/services/syncService.js +3 -3
  128. package/dist/services/syncService.js.map +1 -2
  129. package/dist/skills/pipeline.js.map +0 -1
  130. package/dist/utils/agentSandbox.js.map +0 -1
  131. package/dist/utils/cliOptions.js.map +0 -1
  132. package/dist/utils/constants.js.map +0 -1
  133. package/dist/utils/entityResolver.js.map +0 -1
  134. package/dist/utils/errorFormatter.js +59 -11
  135. package/dist/utils/errorFormatter.js.map +1 -2
  136. package/dist/utils/fileLogger.js.map +0 -1
  137. package/dist/utils/fileValidation.js.map +0 -1
  138. package/dist/utils/folderMatch.js.map +0 -1
  139. package/dist/utils/formulaFilters.js +48 -0
  140. package/dist/utils/formulaFilters.js.map +6 -0
  141. package/dist/utils/helpers.js.map +0 -1
  142. package/dist/utils/logger.js.map +0 -1
  143. package/dist/utils/nameResolver.js.map +0 -1
  144. package/dist/utils/packageManager.js.map +0 -1
  145. package/dist/utils/syncReporting.js.map +0 -1
  146. package/dist/utils/syncScope.js.map +0 -1
  147. package/dist/utils/updateCheck.js.map +0 -1
  148. package/dist/utils/variableValues.js.map +0 -1
  149. package/dist/utils/workspace.js.map +0 -1
  150. package/docs/cli-guide.md +14 -1
  151. package/docs/import-workflows.md +14 -14
  152. package/docs/new-app-template.md +1 -1
  153. package/docs/pipeline-client-guide.md +1 -1
  154. package/docs/pipeline-reference.md +292 -3
  155. package/package.json +2 -2
  156. package/skills/farseer-analysis/SKILL.md +132 -0
  157. package/skills/farseer-dashboards/SKILL.md +40 -0
  158. package/skills/farseer-formulas/SKILL.md +165 -0
  159. package/skills/farseer-model/SKILL.md +119 -0
  160. package/skills/pipeline-authoring/SKILL.md +6 -4
  161. package/skills/pipeline-authoring/practices.md +6 -5
@@ -1,4 +1,4 @@
1
- # Pipeline YAML reference: engine 3.0.0
1
+ # Pipeline YAML reference: engine 3.2.1
2
2
 
3
3
  Generated file. Regenerate with `tools/pipeline/generate_docs.py`.
4
4
 
@@ -14,7 +14,9 @@ Read a topic through `farseer pipeline guide --topic NAME` or MCP `farseer_pipel
14
14
  - [Connection](#connection)
15
15
  - [CsvParseOptions](#csvparseoptions)
16
16
  - [CsvWriteOptions](#csvwriteoptions)
17
+ - [CustomExtractConfig](#customextractconfig)
17
18
  - [CustomField](#customfield)
19
+ - [DataFormat](#dataformat)
18
20
  - [DataSchema](#dataschema)
19
21
  - [DateColumn](#datecolumn)
20
22
  - [DimensionTableEntryOptions](#dimensiontableentryoptions)
@@ -46,6 +48,16 @@ Read a topic through `farseer pipeline guide --topic NAME` or MCP `farseer_pipel
46
48
  - [FixedDimension](#fixeddimension)
47
49
  - [GoogleDriveExtractConfig](#googledriveextractconfig)
48
50
  - [GoogleDrivePublicExtractConfig](#googledrivepublicextractconfig)
51
+ - [HttpBasicAuth](#httpbasicauth)
52
+ - [HttpBearerAuth](#httpbearerauth)
53
+ - [HttpCursorPagination](#httpcursorpagination)
54
+ - [HttpExtractConfig](#httpextractconfig)
55
+ - [HttpHeaderAuth](#httpheaderauth)
56
+ - [HttpNextUrlPagination](#httpnexturlpagination)
57
+ - [HttpOAuth2ClientCredentialsAuth](#httpoauth2clientcredentialsauth)
58
+ - [HttpOffsetPagination](#httpoffsetpagination)
59
+ - [HttpPagePagination](#httppagepagination)
60
+ - [HttpQueryAuth](#httpqueryauth)
49
61
  - [HubspotAssociationsExtractConfig](#hubspotassociationsextractconfig)
50
62
  - [HubspotExtractConfig](#hubspotextractconfig)
51
63
  - [HubspotObjectsExtractConfig](#hubspotobjectsextractconfig)
@@ -275,6 +287,50 @@ Unknown fields are rejected.
275
287
  | `include_header` | boolean | no | `true` | |
276
288
  | `lineterminator` | string | no | `"\n"` | minLength=`1` |
277
289
 
290
+ ## CustomExtractConfig
291
+
292
+ `extract.type: custom` -- an extract an author writes, as an `@extractor` function in `Code/`.
293
+
294
+ For a source no built-in type reaches: an odd authentication, a SOAP
295
+ service, a flow of several calls. `script` is a file under `Code/`, in the
296
+ folder mirroring the step's own under `Models/`, and `function` names the
297
+ function in it, the dataset's own name when omitted -- the binding
298
+ `transform` and `parse` scripts follow.
299
+
300
+ extract:
301
+ type: custom
302
+ custom:
303
+ script: invoices.py
304
+ args: {base_url: "https://api.example.com/v1"}
305
+ secrets: {token: "{{ pipeline_args.SHOP_TOKEN }}"}
306
+
307
+ The function takes keyword-only `args` (a dict), `secrets` (a mapping
308
+ that prints itself masked), `http` (a client with retries and the
309
+ network guard of the `http` extract, sending `headers` with every
310
+ request) and `logger`, each optional. Every value under `secrets` is
311
+ masked in the run's output, what the function prints included; a
312
+ credential put under `args` or `headers` is not.
313
+
314
+ What the function returns is what lands: a file it wrote into the
315
+ directory it was handed (the file's extension is the payload's format),
316
+ records (a list or generator of dicts, landed as one JSON object per line),
317
+ or a table (a DataFrame or Arrow table, landed as parquet). The parse step
318
+ reading this extract interprets it, as for any other source, and
319
+ `optional: true` skips only when the function raises
320
+ `ExtractionSourceMissing`.
321
+
322
+ Unknown fields are rejected.
323
+
324
+ | YAML field | Type | Required | Default | Constraints / description |
325
+ | --- | --- | --- | --- | --- |
326
+ | `script` | string | yes | none | |
327
+ | `function` | string or null | no | `null` | |
328
+ | `args` | object | no | none | |
329
+ | `secrets` | map of string | no | none | |
330
+ | `headers` | map of string | no | none | Headers the `http` client sends with every request, to any host, such as a `User-Agent` a source's firewall expects. Not credentials: those go under `secrets:`. |
331
+ | `timeout` | number | no | `120.0` | maximum=`3600`; exclusiveMinimum=`0`; Seconds per request the `http` client handed to the function makes. |
332
+ | `private_network` | boolean | no | `false` | |
333
+
278
334
  ## CustomField
279
335
 
280
336
  Maps a DataFrame column to a CUSTOM column meta.
@@ -289,9 +345,39 @@ Unknown fields are rejected.
289
345
  | --- | --- | --- | --- | --- |
290
346
  | `source_column` | string | yes | none | |
291
347
 
348
+ ## DataFormat
349
+
350
+ The extension a stored file may carry, which is all a store needs.
351
+
352
+ Not "a format the framework can interpret" -- every step writes parquet, and
353
+ `parse:` decides how a payload is read. This is the narrower question of
354
+ what a file at rest may be *called*, which the Farseer Files store answers
355
+ by writing `<leaf>.<value>` and probing these in order to find it again.
356
+
357
+ The set mirrors the backend's upload allow-list exactly, so any file that
358
+ store accepts can be landed. A subset would be a second, narrower policy
359
+ for someone to keep in sync, and it would fail the first time a source
360
+ hands back a type nobody trimmed for.
361
+
362
+ A folder there can hold more than one file under a dataset's name -- the
363
+ workbook an extract reads sits beside the parquet it writes, and a
364
+ `sales.csv` written before parquet became the only output stays until
365
+ someone removes it -- because the store writes its own file and touches no
366
+ other. A name the store wrote in this run is read under the extension it
367
+ was written with; the probe, which takes the first extension present, is
368
+ for files from earlier runs, so `PARQUET` is first: a step's own output is
369
+ the one found.
370
+
371
+ Values: `"parquet"`, `"csv"`, `"json"`, `"xlsx"`, `"xls"`, `"xml"`, `"zip"`, `"txt"`, `"html"`, `"pdf"`, `"docx"`, `"md"`, `"yaml"`, `"yml"`, `"css"`, `"scss"`, `"js"`, `"jsx"`, `"ts"`, `"tsx"`, `"py"`, `"jpg"`, `"jpeg"`, `"png"`, `"svg"`, `"gif"`, `"webp"`
372
+
292
373
  ## DataSchema
293
374
 
294
- Top-level `schema:` block in a dataset YAML.
375
+ Top-level `schema:` block in a dataset YAML: the columns the dataset keeps.
376
+
377
+ A parse step or transform with a `schema:` writes exactly these columns, in
378
+ this order. A column its output has and this does not declare is dropped and
379
+ named in a warning, so declare every column a reader needs; a declared column
380
+ the output lacks fails validation. Without a `schema:` every column is kept.
295
381
 
296
382
  Unknown fields are rejected.
297
383
 
@@ -399,11 +485,13 @@ Unknown fields are rejected.
399
485
  | `hubspot` | [HubspotExtractConfig](#hubspotextractconfig) or null | no | `null` | |
400
486
  | `sap_odata` | [SapOdataExtractConfig](#sapodataextractconfig) or null | no | `null` | |
401
487
  | `s3` | [S3ExtractConfig](#s3extractconfig) or null | no | `null` | |
488
+ | `http` | [HttpExtractConfig](#httpextractconfig) or null | no | `null` | |
489
+ | `custom` | [CustomExtractConfig](#customextractconfig) or null | no | `null` | |
402
490
  | `optional` | boolean | no | `false` | When true, a source that does not exist (404, no such table, no such file) skips this extract instead of failing the run. The skip propagates to the parse step reading it and every step that depends on that, loads and exports included, and the run still finishes successfully. Network errors, authentication failures, timeouts and 5xx responses still fail the run. |
403
491
 
404
492
  ## ExtractType
405
493
 
406
- Values: `"google_drive_public"`, `"google_drive"`, `"sharepoint"`, `"sql_database"`, `"farseer"`, `"business_central"`, `"tldv"`, `"intercom"`, `"notion"`, `"hubspot"`, `"sap_odata"`, `"s3"`
494
+ Values: `"google_drive_public"`, `"google_drive"`, `"sharepoint"`, `"sql_database"`, `"farseer"`, `"business_central"`, `"tldv"`, `"intercom"`, `"notion"`, `"hubspot"`, `"sap_odata"`, `"s3"`, `"http"`, `"custom"`
407
495
 
408
496
  ## FarseerDatasetsExtractConfig
409
497
 
@@ -807,6 +895,207 @@ Unknown fields are rejected.
807
895
  | --- | --- | --- | --- | --- |
808
896
  | `file_id` | string | yes | none | |
809
897
 
898
+ ## HttpBasicAuth
899
+
900
+ HTTP Basic authentication with a username and a password.
901
+
902
+ Unknown fields are rejected.
903
+
904
+ | YAML field | Type | Required | Default | Constraints / description |
905
+ | --- | --- | --- | --- | --- |
906
+ | `type` | `"basic"` | yes | none | |
907
+ | `username` | string | yes | none | |
908
+ | `password` | string | yes | none | From a secret run argument: `{{ pipeline_args.NAME }}`. |
909
+
910
+ ## HttpBearerAuth
911
+
912
+ `Authorization: Bearer <token>` on every request to the configured origin.
913
+
914
+ Unknown fields are rejected.
915
+
916
+ | YAML field | Type | Required | Default | Constraints / description |
917
+ | --- | --- | --- | --- | --- |
918
+ | `type` | `"bearer"` | yes | none | |
919
+ | `token` | string | yes | none | The token, from a secret run argument: `{{ pipeline_args.NAME }}`. |
920
+
921
+ ## HttpCursorPagination
922
+
923
+ Send the cursor from each page as a query parameter, until a page returns none.
924
+
925
+ A page that hands back the cursor it was asked with fails the step rather
926
+ than looping.
927
+
928
+ Unknown fields are rejected.
929
+
930
+ | YAML field | Type | Required | Default | Constraints / description |
931
+ | --- | --- | --- | --- | --- |
932
+ | `type` | `"cursor"` | yes | none | |
933
+ | `cursor` | string | yes | none | JSON Pointer to the next cursor in the body, e.g. `/meta/next_cursor`. |
934
+ | `param` | string | yes | none | The query parameter the cursor is sent in. |
935
+ | `max_pages` | integer | no | `1000` | exclusiveMinimum=`0`; A ceiling on pages, so a crawl that never ends fails instead of running until the job's time limit. A source with more pages fails the step; it never truncates. The empty page that ends a page or offset crawl does not count. |
936
+
937
+ ## HttpExtractConfig
938
+
939
+ `extract.type: http` -- one HTTP(S) source, configured rather than coded.
940
+
941
+ A single request lands the response body as it came, under `format` (or
942
+ the extension its `Content-Type` names), for the parse step reading this
943
+ extract to interpret: an ECB `csvdata` response is read by
944
+ `parse: {format: csv}` with no code at all.
945
+
946
+ With `records`, or with `pagination`, the body is JSON and what lands is
947
+ the records: the array `records` points at, from every page, one JSON
948
+ object per line, as the source sent each one. A `format: json` parse step
949
+ reads them when the fields it declares are flat; nested ones need an
950
+ `@parse` function.
951
+
952
+ extract:
953
+ type: http
954
+ http:
955
+ url: https://api.example.com/v1/orders
956
+ params: {status: open}
957
+ auth: {type: bearer, token: "{{ pipeline_args.SHOP_TOKEN }}"}
958
+ records: /data
959
+ pagination: {type: cursor, cursor: /meta/next_cursor, param: cursor}
960
+
961
+ Credentials go in `auth:` and nowhere else, templated from secret run
962
+ arguments. They are sent only to the origin of `url`, masked in every
963
+ message, and dropped on a redirect to another origin.
964
+
965
+ `not_found` and `empty` say whether a 404, or a response with no body (no
966
+ records, in record mode), means the data is not there -- the signal
967
+ `optional: true` skips on -- or that something is wrong. Both default to
968
+ failing: the ECB answers 404 for a misspelled series key, which must not
969
+ read as an absent month.
970
+
971
+ Destinations other than public `https://` hosts are refused -- loopback,
972
+ link-local, private ranges and plain `http://` -- unless
973
+ `private_network: true`, which is how a source behind the tenant's VPN is
974
+ reached. That catches a wrong URL; it is not a sandbox.
975
+
976
+ Unknown fields are rejected.
977
+
978
+ | YAML field | Type | Required | Default | Constraints / description |
979
+ | --- | --- | --- | --- | --- |
980
+ | `url` | string | yes | none | |
981
+ | `method` | `"GET"`, `"POST"` | no | `"GET"` | |
982
+ | `params` | map of string or integer or number or boolean | no | none | Query parameters, added to `url`'s own. |
983
+ | `headers` | map of string | no | none | Headers that are not credentials; credentials go in `auth:`. |
984
+ | `json` | any | no | `null` | A JSON request body, for `POST` only. |
985
+ | `auth` | [HttpBearerAuth](#httpbearerauth) or [HttpBasicAuth](#httpbasicauth) or [HttpHeaderAuth](#httpheaderauth) or [HttpQueryAuth](#httpqueryauth) or [HttpOAuth2ClientCredentialsAuth](#httpoauth2clientcredentialsauth) or null | no | `null` | |
986
+ | `format` | [DataFormat](#dataformat) or null | no | `null` | What the body is, which is the extension the payload is stored under. Omit it to take the one the `Content-Type` names. Record mode always lands `json`. |
987
+ | `records` | string or null | no | `null` | JSON Pointer to the array of records in the body, e.g. `/data` or `/value`. Omit it for a body that is the array itself. |
988
+ | `pagination` | [HttpNextUrlPagination](#httpnexturlpagination) or [HttpCursorPagination](#httpcursorpagination) or [HttpPagePagination](#httppagepagination) or [HttpOffsetPagination](#httpoffsetpagination) or null | no | `null` | |
989
+ | `not_found` | `"fail"`, `"missing"` | no | `"fail"` | |
990
+ | `empty` | `"fail"`, `"missing"` | no | `"fail"` | |
991
+ | `timeout` | number | no | `120.0` | maximum=`3600`; exclusiveMinimum=`0`; Seconds per request. |
992
+ | `private_network` | boolean | no | `false` | |
993
+
994
+ ## HttpHeaderAuth
995
+
996
+ One or more headers carrying a key, such as `X-Api-Key`.
997
+
998
+ Every value here is treated as a secret: masked in messages and logs, and
999
+ never sent to another origin.
1000
+
1001
+ Unknown fields are rejected.
1002
+
1003
+ | YAML field | Type | Required | Default | Constraints / description |
1004
+ | --- | --- | --- | --- | --- |
1005
+ | `type` | `"header"` | yes | none | |
1006
+ | `headers` | map of string | yes | none | |
1007
+
1008
+ ## HttpNextUrlPagination
1009
+
1010
+ Follow each page's link to the next one, until a page has none.
1011
+
1012
+ `next_url` points at the link in the body (`/@odata.nextLink`,
1013
+ `/links/next`). Without it the `Link` response header is read for
1014
+ `rel="next"`. A relative link is resolved against the page it came from;
1015
+ a link to another origin is refused, because the request carries the
1016
+ step's credentials.
1017
+
1018
+ Unknown fields are rejected.
1019
+
1020
+ | YAML field | Type | Required | Default | Constraints / description |
1021
+ | --- | --- | --- | --- | --- |
1022
+ | `type` | `"next_url"` | yes | none | |
1023
+ | `next_url` | string or null | no | `null` | JSON Pointer to the next page's URL in the body. Omit it to read the `Link` header. |
1024
+ | `max_pages` | integer | no | `1000` | exclusiveMinimum=`0`; A ceiling on pages, so a crawl that never ends fails instead of running until the job's time limit. A source with more pages fails the step; it never truncates. The empty page that ends a page or offset crawl does not count. |
1025
+
1026
+ ## HttpOAuth2ClientCredentialsAuth
1027
+
1028
+ OAuth 2.0 client credentials: a token from `token_url`, then `Bearer` on every request.
1029
+
1030
+ The token is requested once per run and is not refreshed, so a crawl that
1031
+ outlives it fails with a 401 rather than continuing on a stale grant.
1032
+ `params` adds form fields some servers require, such as `audience` or
1033
+ `resource`.
1034
+
1035
+ Unknown fields are rejected.
1036
+
1037
+ | YAML field | Type | Required | Default | Constraints / description |
1038
+ | --- | --- | --- | --- | --- |
1039
+ | `type` | `"oauth2_client_credentials"` | yes | none | |
1040
+ | `token_url` | string | yes | none | |
1041
+ | `client_id` | string | yes | none | |
1042
+ | `client_secret` | string | yes | none | From a secret run argument: `{{ pipeline_args.NAME }}`. |
1043
+ | `scope` | string or null | no | `null` | |
1044
+ | `params` | map of string | no | none | |
1045
+
1046
+ ## HttpOffsetPagination
1047
+
1048
+ Move an offset by the records each page returned, until a page returns none.
1049
+
1050
+ It asks for `limit` records a page but moves by what arrived, so a server
1051
+ that caps its pages below `limit` is still read whole. It stops on an
1052
+ empty page for the reason page numbering does.
1053
+
1054
+ Unknown fields are rejected.
1055
+
1056
+ | YAML field | Type | Required | Default | Constraints / description |
1057
+ | --- | --- | --- | --- | --- |
1058
+ | `type` | `"offset"` | yes | none | |
1059
+ | `param` | string | no | `"offset"` | |
1060
+ | `limit_param` | string | no | `"limit"` | |
1061
+ | `limit` | integer | yes | none | exclusiveMinimum=`0` |
1062
+ | `start` | integer | no | `0` | minimum=`0` |
1063
+ | `max_pages` | integer | no | `1000` | exclusiveMinimum=`0`; A ceiling on pages, so a crawl that never ends fails instead of running until the job's time limit. A source with more pages fails the step; it never truncates. The empty page that ends a page or offset crawl does not count. |
1064
+
1065
+ ## HttpPagePagination
1066
+
1067
+ Number the pages in a query parameter, until a page returns no records.
1068
+
1069
+ It stops on the first empty page rather than the first short one: an API
1070
+ that caps its page size below the one asked for returns short pages long
1071
+ before the end, and stopping there would drop the rest without a word.
1072
+
1073
+ Unknown fields are rejected.
1074
+
1075
+ | YAML field | Type | Required | Default | Constraints / description |
1076
+ | --- | --- | --- | --- | --- |
1077
+ | `type` | `"page"` | yes | none | |
1078
+ | `param` | string | no | `"page"` | |
1079
+ | `start` | integer | no | `1` | |
1080
+ | `size_param` | string or null | no | `null` | |
1081
+ | `size` | integer or null | no | `null` | integer: exclusiveMinimum=`0` |
1082
+ | `max_pages` | integer | no | `1000` | exclusiveMinimum=`0`; A ceiling on pages, so a crawl that never ends fails instead of running until the job's time limit. A source with more pages fails the step; it never truncates. The empty page that ends a page or offset crawl does not count. |
1083
+
1084
+ ## HttpQueryAuth
1085
+
1086
+ A key sent as a query parameter, such as `?api_key=...`.
1087
+
1088
+ Every value here is treated as a secret and masked wherever the URL is
1089
+ shown. Prefer a header where the API accepts one: a query string is more
1090
+ likely to be logged on the server side.
1091
+
1092
+ Unknown fields are rejected.
1093
+
1094
+ | YAML field | Type | Required | Default | Constraints / description |
1095
+ | --- | --- | --- | --- | --- |
1096
+ | `type` | `"query"` | yes | none | |
1097
+ | `params` | map of string | yes | none | |
1098
+
810
1099
  ## HubspotAssociationsExtractConfig
811
1100
 
812
1101
  One row per (record of `object_type`, associated record) pair.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "farseer-cli",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "CLI tool for syncing Farseer App scripts between local folder and Farseer instances",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  "chalk": "^4.1.2",
56
56
  "commander": "^11.1.0",
57
57
  "diff": "^5.1.0",
58
- "farseer-client": "npm:@farseerdev/farseer-client@1.22.0",
58
+ "farseer-client": "npm:@farseerdev/farseer-client@1.26.0",
59
59
  "inquirer": "^8.2.6",
60
60
  "js-yaml": "4.1.1",
61
61
  "zod": "^3.25.0"
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: farseer-analysis
3
+ description: How to answer a business question from Farseer numbers by establishing a comparison, explaining what changed and why with measurable drivers, checking mix and concentration, and interpreting the result. Use when the user asks for an analysis, a comparison, a trend, drivers, a variance or performance, rather than a single value.
4
+ metadata:
5
+ version: "1"
6
+ ---
7
+
8
+ # Analyst Reasoning Heuristics
9
+
10
+ Use the following principles when answering analytical questions.
11
+
12
+ ## 1. Focus on the business metric
13
+ Identify the KPI or business outcome the question refers to. Prefer final reporting metrics over intermediate calculations.
14
+
15
+ ## 2. Always establish a comparison
16
+ Numbers are meaningful only relative to a baseline. Compare against:
17
+ - peers
18
+ - averages
19
+ - prior periods
20
+ - plan or targets
21
+ - segment benchmarks
22
+
23
+ Clearly state whether performance is above, below, or in line with the benchmark.
24
+
25
+ ## 3. Separate scale from quality
26
+ Distinguish between:
27
+ - **scale** (size, volume, revenue, contribution)
28
+ - **quality** (efficiency, margin, productivity)
29
+
30
+ Large entities are not always the best performers.
31
+
32
+ ## 4. Explain differences using measurable drivers
33
+ When values differ:
34
+ - quantify the difference
35
+ - identify measurable drivers that explain it
36
+ - use the smallest meaningful set of drivers supported by the data
37
+
38
+ Describe **what changed** before explaining **why**.
39
+
40
+ ## 5. Check mix and concentration
41
+ Evaluate whether results are influenced by:
42
+ - mix across segments (products, customers, regions, etc.)
43
+ - concentration in a small number of entities.
44
+
45
+ Highlight dominant contributors and dependencies.
46
+
47
+ ## 6. Look for trends in time analysis
48
+ For time-based questions:
49
+ - identify overall direction
50
+ - highlight turning points
51
+ - distinguish temporary fluctuation from sustained change.
52
+
53
+ ## 7. Conclude with insight
54
+ Do not stop at reporting numbers. Explain what the result means and why it matters.
55
+
56
+ ---
57
+
58
+ # Variance Explanation Method
59
+
60
+ When explaining differences (e.g. Actual vs Budget, entity vs average, or period vs period):
61
+
62
+ 1. **Observation**
63
+ - State the measurable difference.
64
+ - Quantify the change.
65
+
66
+ 2. **Driver**
67
+ - Identify the most likely measurable drivers.
68
+ - Use only drivers that exist in the model.
69
+
70
+ 3. **Validation**
71
+ - Verify the explanation using supporting metrics.
72
+
73
+ Never propose explanations that cannot be supported by available data.
74
+
75
+ **Never explain a result before quantifying the difference.**
76
+
77
+ ---
78
+
79
+ ## Multi-Dimensional Analysis
80
+
81
+ When a question involves more than one dimension (e.g. clients and products, brands and regions, channels and categories):
82
+
83
+ 1. Treat one dimension as the **segment** and the other as the **entity being evaluated**.
84
+ 2. Analyze performance **within each segment**, not only globally.
85
+ 3. Identify which entities **overperform or underperform within each segment**.
86
+
87
+ Avoid returning only overall rankings when the question asks for cross-dimension insights.
88
+
89
+ ---
90
+
91
+ # Output Format Rules
92
+
93
+ ## General style
94
+ - Be concise and direct. Brevity comes from cutting restatement and padding, never from omitting data the question asks about.
95
+ - Do not describe internal reasoning steps.
96
+ - Do not explain methodology unless explicitly asked.
97
+
98
+ ## Answer structure: scale it to the question
99
+
100
+ **Simple lookups and general questions** ("what was X", "which year", "do we have Y"): give the direct answer in a sentence or two and stop: no table, no conclusion, at most 3 lines. A user can always ask for more.
101
+
102
+ **Analytical questions** (drivers, comparisons, variances, trends, "why") get the full structure. Interpretation is the core analyst job, and depth is expected here:
103
+
104
+ 1. **Direct answer**: always first.
105
+ 2. **Supporting table or ranking**: whenever the question involves a ranking, comparison, or breakdown; the table often IS the answer.
106
+ 3. **Explanation**: interpret the data: drivers, context, what moved and why. Take the space the analysis needs.
107
+ 4. **Conclusion or implication**: what it means going forward, not a restatement of item 1.
108
+
109
+ For analytical answers, length follows the analysis. There is no line budget: write what the interpretation needs.
110
+
111
+ ## Tables
112
+ Use tables for:
113
+ - rankings
114
+ - comparisons
115
+ - variance breakdowns
116
+ - concentration analysis
117
+
118
+ ## Rankings
119
+ For rankings return only:
120
+
121
+ Rank | Name | Metric
122
+
123
+ Optionally include rate metrics (e.g., margin %) when relevant.
124
+
125
+ ## Labels
126
+ Use business names rather than internal IDs unless the ID is required for identification.
127
+
128
+ ## Clarity
129
+ Answers should clearly communicate:
130
+ - what happened
131
+ - why it happened
132
+ - why it matters
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: farseer-dashboards
3
+ description: How to build or change a Farseer dashboard through the API, with its folder, table and chart tiles, the sheet lines that give a tile its rows and columns, slicers and dashboard filters, and how to check a tile's values. Use when creating or changing a dashboard, a tile or a sheet.
4
+ metadata:
5
+ version: "1"
6
+ ---
7
+
8
+ # Dashboards
9
+
10
+ `farseer dashboards` only lists and inspects; build a dashboard with the API. Paths below are under `/api/v3`. A request missing a required field is refused with a bare `BadRequest`, so send these shapes whole. Table and variable gids come from `farseer model --json`, and member gids from `farseer dimensions members TABLE --json`.
11
+
12
+ 1. **Folder.** Only a dashboard needs a folder: variables, tables and other objects go in one only when the user names it. Use the folder the user names; otherwise the top dashboards folder. `POST /folders/search` with `{"name": "Dashboards", "types": ["FOLDER"], "limit": 20}` lists folders, and a dashboard can go in one whose `allowedTypes` includes `"DASHBOARD"`.
13
+ 2. **Dashboard.** `POST /dashboards` with `{"folderId": FOLDER_ID, "name": "..."}`. A filter that every tile follows goes in its `rows.filters` (`displayColumns` is required; `[2]` shows member names), as in `{"rows": {"onlyWithData": false, "owdIncludeMeasures": false, "emitNoResultRows": true, "filters": [{"tableId": TABLE_GID, "dimensionIds": [], "displayColumns": [2], "selectAll": true, "selectBlanks": false, "multiselect": true, "autoApply": true, "blanks": false}]}}`.
14
+ 3. **A table or chart tile.** `POST /dashboards/{dashboardId}/tiles` creates the tile and its own sheet, whose id is in the response's `data.sheet.id`:
15
+
16
+ ```json
17
+ {"name": "Net sales by category", "subtitle": "", "footnotes": "", "style": {},
18
+ "gridPlacements": {"large": {"h": 8, "w": 8, "x": 0, "y": 0}},
19
+ "data": {"type": "SHEET_BACKED", "useDashboardSort": false, "useDashboardFilters": true, "useDashboardTimeline": false,
20
+ "showTileSort": false, "showTileFilters": false, "showTileTimeline": false, "exportConfigurationId": null,
21
+ "visualization": {"type": "TABLE"}}}
22
+ ```
23
+
24
+ For a chart, use this `visualization` instead: `{"type": "CHART", "chart": {"type": "LINE_CHART", "layout": "VERTICAL", "labels": {"labelOutline": false}, "spacing": {"barSpacing": 0, "integratedLegendX": 100, "integratedLegendY": 20}, "display": {"showValueAxis": true, "showLegend": true, "showIntegratedLegend": false, "integratedLegendPosition": "START"}, "series": {"transposeData": true}, "rowVisualizationByPath": {}, "columnVisualizationByPath": {}}}`.
25
+ 4. **The tile's rows and columns** are sheet lines, one `POST /sheetLines` each. A row line lists a table's members: `{"sheetId": SHEET_ID, "parentId": null, "axis": "ROW", "type": "NUMBER", "name": "Product categories", "dimensionGenerationOptions": {"tableGids": [TABLE_GID], "hierarchyFlatten": false, "hierarchyMaxDepth": 0}}`. A column line is one variable at the members that filter it, such as a quarter, a version and a year: `{"sheetId": SHEET_ID, "parentId": null, "axis": "COLUMN", "type": "NUMBER", "name": "Net sales Q1 2025 Actual", "variableGid": VARIABLE_GID, "memberGids": [Q1_GID, ACTUAL_GID, Y2025_GID], "dimensionGenerationOptions": {"tableGids": [], "hierarchyFlatten": false, "hierarchyMaxDepth": 0}}`.
26
+ 5. **A slicer** is a tile with `"data": {"type": "DIMENSION_SLICER", "dimensionTableId": TABLE_GID, "multiselect": true, "displayType": "NAME"}`, beside the dashboard's `rows.filters` entry for the same table.
27
+ Steps 3 to 5 can go out from one script, which stops at the first refused write. `post` stands for the way your environment sends an API write:
28
+
29
+ ```python
30
+ tile = post("/api/v3/dashboards/DASHBOARD_ID/tiles", TABLE_TILE)
31
+ sheet = tile["data"]["sheet"]["id"]
32
+ for line in [ROW_LINE, *COLUMN_LINES]:
33
+ post("/api/v3/sheetLines", {**line, "sheetId": sheet})
34
+ ```
35
+
36
+ 6. **Check the values.** `POST /sheets/getData` with `{"path": "SHEET_ID", "includeData": true}` returns the tile's rows and columns with their numbers; `farseer sheets data` does not read a tile's sheet. Compare a cell or two with the same figures from `evaluate`. Also check that every row and column you sent came back with its variable, table or members: `POST /sheetLines` drops a gid it does not know and still answers 201, so a line made from a stale gid comes back empty.
37
+
38
+ ## Sheets
39
+
40
+ `farseer sheets list`, `show` and `data` read a sheet, and `farseer sheets set-data` writes one from a JSON file. Without `-y`, `set-data` only prints a preview and exits successfully, changing nothing: pass `-y` when you intend the write.