farseer-cli 1.14.1 → 1.15.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.
- package/dist/commands/config.js +4 -3
- package/dist/commands/config.js.map +2 -2
- package/dist/commands/install.js +5 -0
- package/dist/commands/install.js.map +2 -2
- package/dist/commands/login.js +2 -2
- package/dist/commands/login.js.map +2 -2
- package/dist/commands/pull.js +9 -3
- package/dist/commands/pull.js.map +2 -2
- package/dist/commands/run.js +9 -0
- package/dist/commands/run.js.map +2 -2
- package/dist/index.js +7 -2
- package/dist/index.js.map +2 -2
- package/dist/mcp/tools/appTools.js.map +2 -2
- package/dist/mcp/tools/authTools.js +5 -3
- package/dist/mcp/tools/authTools.js.map +2 -2
- package/dist/mcp/tools/cellTools.js +3 -2
- package/dist/mcp/tools/cellTools.js.map +2 -2
- package/dist/mcp/tools/dashboardTools.js +23 -18
- package/dist/mcp/tools/dashboardTools.js.map +2 -2
- package/dist/mcp/tools/dataTools.js +13 -11
- package/dist/mcp/tools/dataTools.js.map +2 -2
- package/dist/mcp/tools/folderTools.js +5 -4
- package/dist/mcp/tools/folderTools.js.map +2 -2
- package/dist/mcp/tools/modelTools.js +27 -17
- package/dist/mcp/tools/modelTools.js.map +2 -2
- package/dist/mcp/tools/pipelineContract.js +5 -2
- package/dist/mcp/tools/pipelineContract.js.map +2 -2
- package/dist/mcp/tools/runTools.js +8 -3
- package/dist/mcp/tools/runTools.js.map +2 -2
- package/dist/mcp/tools/sheetTools.js +21 -17
- package/dist/mcp/tools/sheetTools.js.map +2 -2
- package/dist/mcp/tools/syncTools.js +11 -5
- package/dist/mcp/tools/syncTools.js.map +2 -2
- package/dist/mcp/utils/registerTool.js +32 -0
- package/dist/mcp/utils/registerTool.js.map +7 -0
- package/dist/pipeline/generated-reference.json +3 -3
- package/dist/pipeline/operations.js +4 -1
- package/dist/pipeline/operations.js.map +2 -2
- package/dist/pipeline/query.js +58 -40
- package/dist/pipeline/query.js.map +2 -2
- package/dist/pipeline/queryDownloads.js +72 -0
- package/dist/pipeline/queryDownloads.js.map +7 -0
- package/dist/pipeline/queryWorker.js +8 -31
- package/dist/pipeline/queryWorker.js.map +2 -2
- package/dist/pipeline/readiness.js +15 -8
- package/dist/pipeline/readiness.js.map +2 -2
- package/dist/pipeline/reference.js +2 -1
- package/dist/pipeline/reference.js.map +2 -2
- package/dist/pipeline/runtime.js +4 -3
- package/dist/pipeline/runtime.js.map +2 -2
- package/dist/pipeline/service.js +110 -50
- package/dist/pipeline/service.js.map +2 -2
- package/dist/services/appSyncService.js.map +1 -1
- package/dist/services/configService.js +11 -4
- package/dist/services/configService.js.map +2 -2
- package/dist/services/farseerService.js +23 -0
- package/dist/services/farseerService.js.map +2 -2
- package/dist/services/modelExport.js.map +1 -1
- package/dist/utils/agentSandbox.js +35 -0
- package/dist/utils/agentSandbox.js.map +7 -0
- package/dist/utils/constants.js +4 -7
- package/dist/utils/constants.js.map +2 -2
- package/dist/utils/packageManager.js +40 -11
- package/dist/utils/packageManager.js.map +2 -2
- package/dist/utils/updateCheck.js +4 -2
- package/dist/utils/updateCheck.js.map +2 -2
- package/docs/pipeline-client-guide.md +4 -4
- package/package.json +2 -2
- package/skills/pipeline-authoring/SKILL.md +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/packageManager.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Package Manager Utilities\n *\n * Shared logic for managing tenant package.json files and farseer-client dependency.\n * Used by
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAoB;AACpB,WAAsB;AACtB,
|
|
4
|
+
"sourcesContent": ["/**\n * Package Manager Utilities\n *\n * Shared logic for managing tenant package.json files and farseer-client dependency.\n * Used by the CLI install and pull commands and the MCP farseer_install tool.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { FARSEER_CLIENT_DEPENDENCY, FARSEER_CLIENT_VERSION } from './constants';\nimport { isNewerVersion } from './updateCheck';\n\n// Tarballs in this bucket are not an install source, so a dependency pointing\n// into it is always replaced, whoever wrote it.\nconst BUCKET_URL_PREFIX = 'https://storage.googleapis.com/farseer-remote-jobs-results/';\n\nconst CLI_MANAGED_NPM_VERSION = /^npm:@farseerdev\\/farseer-client@(\\d+\\.\\d+\\.\\d+)$/;\n\n// The CLI only overwrites a farseer-client dependency it wrote itself (a bucket\n// tarball or an exact npm version) and only moves it forward, so a user who\n// pinned a newer version, a fork, a local path or a version range keeps it.\nfunction isOutdatedCliManagedClient(dependency: unknown): boolean {\n if (typeof dependency !== 'string') return false;\n if (dependency.startsWith(`${BUCKET_URL_PREFIX}farseer-client/`)) return true;\n const pinned = CLI_MANAGED_NPM_VERSION.exec(dependency)?.[1];\n return pinned !== undefined && isNewerVersion(FARSEER_CLIENT_VERSION, pinned);\n}\n\n/**\n * Move an outdated CLI-managed farseer-client dependency to FARSEER_CLIENT_DEPENDENCY\n * and drop farseer-client-axios when it comes from the bucket. Returns the changes.\n */\nfunction updateClientDependencies(dependencies: Record<string, unknown>): string[] {\n const changes: string[] = [];\n\n const client = dependencies['farseer-client'];\n if (isOutdatedCliManagedClient(client)) {\n dependencies['farseer-client'] = FARSEER_CLIENT_DEPENDENCY;\n changes.push('farseer-client (upgraded)');\n }\n\n const axiosClient = dependencies['farseer-client-axios'];\n if (typeof axiosClient === 'string' && axiosClient.startsWith(BUCKET_URL_PREFIX)) {\n delete dependencies['farseer-client-axios'];\n changes.push('farseer-client-axios (removed)');\n }\n\n return changes;\n}\n\n/**\n * Ensure the tenant directory has a package.json with the current farseer-client\n * dependency. Creates package.json if missing; adds farseer-client if missing;\n * upgrades a CLI-managed farseer-client and removes the bucket's\n * farseer-client-axios. Returns the list of dependency changes performed.\n */\nexport function ensurePackageJson(tenantDir: string, tenant: string): string[] {\n const packageJsonPath = path.join(tenantDir, 'package.json');\n const changes: string[] = [];\n\n let pkg: any;\n if (fs.existsSync(packageJsonPath)) {\n pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));\n } else {\n pkg = {\n name: `farseer-apps-${tenant}`,\n version: '1.0.0',\n private: true,\n description: `Farseer scripts for tenant ${tenant}`,\n dependencies: {},\n };\n changes.push('package.json (created)');\n }\n\n pkg.dependencies = pkg.dependencies || {};\n\n if (!pkg.dependencies['farseer-client']) {\n pkg.dependencies['farseer-client'] = FARSEER_CLIENT_DEPENDENCY;\n changes.push('farseer-client');\n }\n changes.push(...updateClientDependencies(pkg.dependencies));\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + '\\n');\n return changes;\n}\n\n/**\n * Upgrade the farseer-client dependency of an existing tenant package.json and\n * remove the bucket's farseer-client-axios, without adding anything. The file\n * is only rewritten when something changed. Returns the changes.\n */\nexport function updatePackageJson(tenantDir: string): string[] {\n const packageJsonPath = path.join(tenantDir, 'package.json');\n if (!fs.existsSync(packageJsonPath)) return [];\n\n const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));\n const changes = pkg.dependencies ? updateClientDependencies(pkg.dependencies) : [];\n if (changes.length > 0) {\n fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + '\\n');\n }\n return changes;\n}\n\n/**\n * Parse an npm package specifier into name and version.\n * Handles scoped packages: @scope/name@version \u2192 { name: \"@scope/name\", version: \"version\" }\n */\nexport function parsePackageSpec(spec: string): { name: string; version: string } {\n const isScoped = spec.startsWith('@');\n const lastAt = spec.lastIndexOf('@');\n const hasVersion = lastAt > 0 && (!isScoped || lastAt > spec.indexOf('/'));\n\n return {\n name: hasVersion ? spec.substring(0, lastAt) : spec,\n version: hasVersion ? spec.substring(lastAt + 1) : '*',\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SA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KAAK,gBAAgB;AAAA,EACjC;AACA,UAAQ,KAAK,GAAG,yBAAyB,IAAI,YAAY,CAAC;AAE1D,KAAG,cAAc,iBAAiB,KAAK,UAAU,KAAK,MAAM,CAAC,IAAI,IAAI;AACrE,SAAO;AACX;AAOO,SAAS,kBAAkB,WAA6B;AAC3D,QAAM,kBAAkB,KAAK,KAAK,WAAW,cAAc;AAC3D,MAAI,CAAC,GAAG,WAAW,eAAe,EAAG,QAAO,CAAC;AAE7C,QAAM,MAAM,KAAK,MAAM,GAAG,aAAa,iBAAiB,OAAO,CAAC;AAChE,QAAM,UAAU,IAAI,eAAe,yBAAyB,IAAI,YAAY,IAAI,CAAC;AACjF,MAAI,QAAQ,SAAS,GAAG;AACpB,OAAG,cAAc,iBAAiB,KAAK,UAAU,KAAK,MAAM,CAAC,IAAI,IAAI;AAAA,EACzE;AACA,SAAO;AACX;AAMO,SAAS,iBAAiB,MAAiD;AAC9E,QAAM,WAAW,KAAK,WAAW,GAAG;AACpC,QAAM,SAAS,KAAK,YAAY,GAAG;AACnC,QAAM,aAAa,SAAS,MAAM,CAAC,YAAY,SAAS,KAAK,QAAQ,GAAG;AAExE,SAAO;AAAA,IACH,MAAM,aAAa,KAAK,UAAU,GAAG,MAAM,IAAI;AAAA,IAC/C,SAAS,aAAa,KAAK,UAAU,SAAS,CAAC,IAAI;AAAA,EACvD;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,7 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var updateCheck_exports = {};
|
|
30
30
|
__export(updateCheck_exports, {
|
|
31
|
-
checkForUpdates: () => checkForUpdates
|
|
31
|
+
checkForUpdates: () => checkForUpdates,
|
|
32
|
+
isNewerVersion: () => isNewerVersion
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(updateCheck_exports);
|
|
34
35
|
var https = __toESM(require("https"));
|
|
@@ -127,6 +128,7 @@ async function checkForUpdates() {
|
|
|
127
128
|
}
|
|
128
129
|
// Annotate the CommonJS export names for ESM import in node:
|
|
129
130
|
0 && (module.exports = {
|
|
130
|
-
checkForUpdates
|
|
131
|
+
checkForUpdates,
|
|
132
|
+
isNewerVersion
|
|
131
133
|
});
|
|
132
134
|
//# sourceMappingURL=updateCheck.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/updateCheck.ts"],
|
|
4
|
-
"sourcesContent": ["import * as https from 'https';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as os from 'os';\nimport chalk from 'chalk';\nimport { CLI_VERSION } from './constants';\n\nconst CONFIG_DIR = path.join(os.homedir(), '.farseer');\nconst CACHE_FILE = path.join(CONFIG_DIR, 'update-check.json');\nconst CACHE_TTL_MS = 4 * 60 * 60 * 1000; // 4 hours\nconst FETCH_TIMEOUT_MS = 3000;\nconst REGISTRY_URL = 'https://registry.npmjs.org/farseer-cli/latest';\n\ninterface UpdateCache {\n lastCheck: number;\n latestVersion: string;\n}\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,SAAoB;AACpB,WAAsB;AACtB,SAAoB;AACpB,mBAAkB;AAClB,uBAA4B;AAE5B,MAAM,aAAa,KAAK,KAAK,GAAG,QAAQ,GAAG,UAAU;AACrD,MAAM,aAAa,KAAK,KAAK,YAAY,mBAAmB;AAC5D,MAAM,eAAe,IAAI,KAAK,KAAK;AACnC,MAAM,mBAAmB;AACzB,MAAM,eAAe;
|
|
4
|
+
"sourcesContent": ["import * as https from 'https';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as os from 'os';\nimport chalk from 'chalk';\nimport { CLI_VERSION } from './constants';\n\nconst CONFIG_DIR = path.join(os.homedir(), '.farseer');\nconst CACHE_FILE = path.join(CONFIG_DIR, 'update-check.json');\nconst CACHE_TTL_MS = 4 * 60 * 60 * 1000; // 4 hours\nconst FETCH_TIMEOUT_MS = 3000;\nconst REGISTRY_URL = 'https://registry.npmjs.org/farseer-cli/latest';\n\ninterface UpdateCache {\n lastCheck: number;\n latestVersion: string;\n}\n\nexport function isNewerVersion(latest: string, current: string): boolean {\n const latestParts = latest.split('.').map(Number);\n const currentParts = current.split('.').map(Number);\n for (let i = 0; i < 3; i++) {\n const l = latestParts[i] || 0;\n const c = currentParts[i] || 0;\n if (l > c) return true;\n if (l < c) return false;\n }\n return false;\n}\n\nfunction readCache(): UpdateCache | null {\n try {\n const data = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf-8'));\n if (typeof data.lastCheck === 'number' && typeof data.latestVersion === 'string') {\n return data as UpdateCache;\n }\n } catch {\n // Cache missing or corrupt \u2014 ignore\n }\n return null;\n}\n\nfunction writeCache(latestVersion: string): void {\n try {\n if (!fs.existsSync(CONFIG_DIR)) {\n fs.mkdirSync(CONFIG_DIR, { recursive: true });\n }\n const data: UpdateCache = { lastCheck: Date.now(), latestVersion };\n fs.writeFileSync(CACHE_FILE, JSON.stringify(data), 'utf-8');\n } catch {\n // Non-critical \u2014 ignore write errors\n }\n}\n\nfunction fetchLatestVersion(): Promise<string | null> {\n return new Promise((resolve) => {\n const req = https.get(REGISTRY_URL, { timeout: FETCH_TIMEOUT_MS }, (res) => {\n if (res.statusCode !== 200) {\n res.resume(); // drain response\n resolve(null);\n return;\n }\n let body = '';\n res.setEncoding('utf-8');\n res.on('data', (chunk) => (body += chunk));\n res.on('end', () => {\n try {\n const json = JSON.parse(body);\n resolve(typeof json.version === 'string' ? json.version : null);\n } catch {\n resolve(null);\n }\n });\n });\n req.on('error', () => resolve(null));\n req.on('timeout', () => {\n req.destroy();\n resolve(null);\n });\n });\n}\n\nexport async function checkForUpdates(): Promise<string | null> {\n try {\n let latestVersion: string | null = null;\n\n const cache = readCache();\n if (cache && Date.now() - cache.lastCheck < CACHE_TTL_MS) {\n latestVersion = cache.latestVersion;\n } else {\n latestVersion = await fetchLatestVersion();\n if (latestVersion) {\n writeCache(latestVersion);\n }\n }\n\n if (latestVersion && isNewerVersion(latestVersion, CLI_VERSION)) {\n return [\n '',\n chalk.yellow(` Update available: ${CLI_VERSION} \u2192 ${chalk.green(latestVersion)}`),\n chalk.yellow(` Run ${chalk.cyan('npm install -g farseer-cli@latest')} to update`),\n '',\n ].join('\\n');\n }\n\n return null;\n } catch {\n // Graceful failure \u2014 never let update check break the CLI\n return null;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,SAAoB;AACpB,WAAsB;AACtB,SAAoB;AACpB,mBAAkB;AAClB,uBAA4B;AAE5B,MAAM,aAAa,KAAK,KAAK,GAAG,QAAQ,GAAG,UAAU;AACrD,MAAM,aAAa,KAAK,KAAK,YAAY,mBAAmB;AAC5D,MAAM,eAAe,IAAI,KAAK,KAAK;AACnC,MAAM,mBAAmB;AACzB,MAAM,eAAe;AAOd,SAAS,eAAe,QAAgB,SAA0B;AACrE,QAAM,cAAc,OAAO,MAAM,GAAG,EAAE,IAAI,MAAM;AAChD,QAAM,eAAe,QAAQ,MAAM,GAAG,EAAE,IAAI,MAAM;AAClD,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AACxB,UAAM,IAAI,YAAY,CAAC,KAAK;AAC5B,UAAM,IAAI,aAAa,CAAC,KAAK;AAC7B,QAAI,IAAI,EAAG,QAAO;AAClB,QAAI,IAAI,EAAG,QAAO;AAAA,EACtB;AACA,SAAO;AACX;AAEA,SAAS,YAAgC;AACrC,MAAI;AACA,UAAM,OAAO,KAAK,MAAM,GAAG,aAAa,YAAY,OAAO,CAAC;AAC5D,QAAI,OAAO,KAAK,cAAc,YAAY,OAAO,KAAK,kBAAkB,UAAU;AA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AAM,mBAAmB;AACzC,UAAI,eAAe;AACf,mBAAW,aAAa;AAAA,MAC5B;AAAA,IACJ;AAEA,QAAI,iBAAiB,eAAe,eAAe,4BAAW,GAAG;AAC7D,aAAO;AAAA,QACH;AAAA,QACA,aAAAA,QAAM,OAAO,uBAAuB,4BAAW,WAAM,aAAAA,QAAM,MAAM,aAAa,CAAC,EAAE;AAAA,QACjF,aAAAA,QAAM,OAAO,SAAS,aAAAA,QAAM,KAAK,mCAAmC,CAAC,YAAY;AAAA,QACjF;AAAA,MACJ,EAAE,KAAK,IAAI;AAAA,IACf;AAEA,WAAO;AAAA,EACX,QAAQ;AAEJ,WAAO;AAAA,EACX;AACJ;",
|
|
6
6
|
"names": ["chalk"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This page is for the tenant admin and IT team of a Farseer customer who want analysts to build data pipelines with an AI assistant. The assistant's own instructions are in the pipeline skill (`farseer pipeline guide`); this page covers what you decide and what you are agreeing to.
|
|
4
4
|
|
|
5
|
-
New repeatable pipelines use Simple Pipelines. Existing TypeScript apps remain supported through the app tools for inspection, execution, debugging and targeted fixes. A request to fix or extend an existing import does not authorize replacing or migrating it, changing its runner or schedule, or creating a duplicate pipeline. Migration requires an explicit migration request. Pipeline init, source sync and run refuse unrelated or unknown runner images;
|
|
5
|
+
New repeatable pipelines use Simple Pipelines. Existing TypeScript apps remain supported through the app tools for inspection, execution, debugging and targeted fixes. A request to fix or extend an existing import does not authorize replacing or migrating it, changing its runner or schedule, or creating a duplicate pipeline. Migration requires an explicit migration request. Pipeline init, source sync and run refuse unrelated or unknown runner images; a new pipeline is pinned to the CLI's image when init creates it, and an existing Simple Pipelines job moves to a newer image only through `farseer pipeline upgrade-runtime`.
|
|
6
6
|
|
|
7
7
|
## What data leaves your tenant
|
|
8
8
|
|
|
@@ -32,11 +32,11 @@ Before it reads any source, the engine checks a pipeline's shape (valid YAML, sc
|
|
|
32
32
|
| Create a pipeline and its job (`init`) | the remote jobs feature (FEATURE.REMOTE_JOBS, which makes the Apps folder visible), create remote jobs in the tenant folder, write files |
|
|
33
33
|
| Run, list runs, inspect | run remote jobs, read run history |
|
|
34
34
|
| Read what a load imported (`inspect-import`) | the import feature (FEATURE.IMPORT) and FEATURE.SEE_ALL_IMPORT_JOBS, because the runner creates the import, not the analyst |
|
|
35
|
-
| Read datasets and versions (`query`, `versions`) |
|
|
35
|
+
| Read datasets and versions (`init`, `check`, `query`, `versions`) | update remote jobs, or the Data Hub permission (FEATURE.DATA_HUB) |
|
|
36
36
|
| Restore an earlier dataset version | update remote jobs |
|
|
37
37
|
| Create or delete datasets | super user |
|
|
38
38
|
|
|
39
|
-
These are the remote job, file and feature permissions you
|
|
39
|
+
These are the remote job, file and feature permissions you manage in the web app. The Data Hub permission and the right to update remote jobs both read every dataset in the tenant, payroll included, so grant them on purpose. Super user does not stand in for the feature permissions: grant them explicitly. The job itself runs as the tenant's runner identity, which needs the import feature (FEATURE.IMPORT) for a load to commit.
|
|
40
40
|
|
|
41
41
|
The permissions alone are not enough for an analyst who is not a super user: Farseer shows such a user only the folders and model items shared with them. Give the analyst access to the `Files` folder (where `init` creates the pipeline's folder) and to the dimension tables and variables the pipeline loads, or make them a tenant admin. Without that access, `init` fails with `Folder not found: Files` and reading the model's members fails, even though every permission above is granted.
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ The permissions alone are not enough for an analyst who is not a super user: Far
|
|
|
44
44
|
|
|
45
45
|
The CLI authors for exactly one engine version: the one inside the runner image it was released with. When Farseer releases a new runner image it also releases a CLI, and for a while the backend accepts both. `check` reports a newer CLI as available; below the minimum, pipeline commands stop with "update the CLI". IT should expect to update `farseer-cli` on analysts' laptops a few times a year.
|
|
46
46
|
|
|
47
|
-
A job on an older image
|
|
47
|
+
The CLI never changes which engine a job runs on its own. A job on an older image keeps running on it. To edit it with a newer CLI, someone runs `farseer pipeline upgrade-runtime`, which moves the job to the CLI's image and says what it moved from; until then the CLI refuses to push to it. That includes pipelines Farseer consultants built for you earlier: the assistant asks before upgrading one, and if the newer engine rejects something it will say so and offer to fix it. A job set to follow `latest` is left alone.
|
|
48
48
|
|
|
49
49
|
## Moving to production
|
|
50
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "farseer-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.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": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"chalk": "^4.1.2",
|
|
55
55
|
"commander": "^11.1.0",
|
|
56
56
|
"diff": "^5.1.0",
|
|
57
|
-
"farseer-client": "
|
|
57
|
+
"farseer-client": "npm:@farseerdev/farseer-client@1.18.1",
|
|
58
58
|
"inquirer": "^8.2.6",
|
|
59
59
|
"js-yaml": "4.1.1",
|
|
60
60
|
"zod": "^3.25.0"
|
|
@@ -3,7 +3,7 @@ name: pipeline-authoring
|
|
|
3
3
|
description: Author all new repeatable Farseer data pipelines with Simple Pipelines, and maintain existing Simple Pipelines. Preserve existing TypeScript apps through the app tools; migration requires an explicit migration request.
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1"
|
|
6
|
-
minimum-cli: "1.14.
|
|
6
|
+
minimum-cli: "1.14.2"
|
|
7
7
|
engine-profile: "2.9"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -46,15 +46,15 @@ Submit once after sync and save the UUID receipt. Inspect that UUID after reconn
|
|
|
46
46
|
|
|
47
47
|
`runs` lists the profile job's runs from the job history, newest first, 20 by default (`limit`). Each entry carries the run `uuid`, `status`, `startedAt`, `finishedAt` when the backend reports it, and `receipt: true` when a local receipt names that UUID. Use it to find the UUID to inspect or recover after a lost response; it never chooses a run for you.
|
|
48
48
|
|
|
49
|
-
`query` takes bindings `[{name, datasetId, versionId}]` and a single SELECT (WITH allowed); bind complete manifests to read immutable dataset versions, while a file binding `{name, file}` reads the current mutable Farseer File under `Data/` and is labeled as such, with no history guarantee. The worker downloads fixed signed HTTPS inputs to private temporary files (256 MiB total across all bindings), then runs DuckDB with 256 MB memory, 256 MB spill, two threads, 30 seconds total, at most 1,000 rows and 256 KiB of results; it gets no tenant credentials, loads no HTTP extension, cannot reach other files or URLs or change settings, is killed on cancellation or timeout, and these engine limits (not an OS memory sandbox) are fixed in this build. SQL filters do not reduce the full download, so use a smaller admitted output when capacity or network speed is insufficient; truncated results are samples, so use COUNT or SUM for whole-input claims.
|
|
49
|
+
`query` takes bindings `[{name, datasetId, versionId}]` and a single SELECT (WITH allowed); bind complete manifests to read immutable dataset versions, while a file binding `{name, file}` reads the current mutable Farseer File under `Data/` and is labeled as such, with no history guarantee. The worker downloads fixed signed HTTPS inputs to private temporary files (with an agent turn key the CLI fetches them through the API instead, because an agent sandbox can reach only the API; 256 MiB total across all bindings), then runs DuckDB with 256 MB memory, 256 MB spill, two threads, 30 seconds total, at most 1,000 rows and 256 KiB of results; it gets no tenant credentials, loads no HTTP extension, cannot reach other files or URLs or change settings, is killed on cancellation or timeout, and these engine limits (not an OS memory sandbox) are fixed in this build. SQL filters do not reduce the full download, so use a smaller admitted output when capacity or network speed is insufficient; truncated results are samples, so use COUNT or SUM for whole-input claims.
|
|
50
50
|
|
|
51
51
|
`inspect-import` reads the owning import service for a load's import ID: CREATED can still have a commit in flight, and COMMITED confirms completion. `versions` lists a dataset's retained versions. `restore(datasetId, versionId, expectedCurrentVersionId)` repairs a wrong publication of a dataset: first inspect versions and run effects, coordinate with colleagues and confirm the run has stopped. Restore selects an eligible retained publication and moves its reading position in the same transaction, cancels outstanding unpublished candidates, and refuses a stale expected current version; if its response is lost, inspect dataset state before any next action. Restore covers datasets only, not model loads: it does not reverse imports, recalculation or exports, so reconcile model results separately through existing model access. For an incremental recipe, fix the definition and reprocess from the restored cursor, then verify counts, duplicate keys and totals; historical source replay must be supported and unchanged.
|
|
52
52
|
|
|
53
53
|
## Setup facts
|
|
54
54
|
|
|
55
|
-
The backend records each run before dispatch and answers with its run UUID. The tenant's jobrunner must be 3.6.0 or newer: an older one cannot keep the run id the backend assigns, so the backend refuses to send it the run and says so, and no run starts. Reading datasets, their versions and download links needs the right to
|
|
55
|
+
The backend records each run before dispatch and answers with its run UUID. The tenant's jobrunner must be 3.6.0 or newer: an older one cannot keep the run id the backend assigns, so the backend refuses to send it the run and says so, and no run starts. Reading datasets, their versions and download links needs the right to update jobs (CLASS.REMOTE_JOB.UPDATE) or the Data Hub permission (FEATURE.DATA_HUB); `init`, `check`, `query` and `versions` rely on it. `restore` needs the right to update jobs; creating or deleting datasets stays with super users and the runner. Download links, restores and other dataset changes made by a person are recorded in the audit log. A permission refusal from `check` is a setup issue to report to the setup owner.
|
|
56
56
|
|
|
57
|
-
`check` reads the prepared job, its runner image, whether a newer CLI was released with the tenant's runner image (`cli-version`, pending means update before authoring), and the output manifests, then probes the first Parquet file using signed HTTPS access. This CLI authors for exactly one engine: the one inside the runner image it was released with. Only jobs already using a Simple Pipelines runner are eligible for image pinning. TypeScript, other runner families and an unknown or inherited image are refused by init, source sync and run; use the existing app tools and preserve the app. A Simple Pipelines job on an older image
|
|
57
|
+
`check` reads the prepared job, its runner image, whether a newer CLI was released with the tenant's runner image (`cli-version`, pending means update before authoring), and the output manifests, then probes the first Parquet file using signed HTTPS access, or through the API when the CLI runs with an agent turn key, because an agent sandbox can reach only the API. This CLI authors for exactly one engine: the one inside the runner image it was released with. Only jobs already using a Simple Pipelines runner are eligible for image pinning. TypeScript, other runner families and an unknown or inherited image are refused by init, source sync and run; use the existing app tools and preserve the app. The CLI never changes a job's image on its own. A Simple Pipelines job on an older released image is reported as failed: `run`, `pull` and reads still work on its own image, but `push` is refused (`RUNTIME_UPGRADE_REQUIRED`) until the job is upgraded with `upgrade-runtime` (CLI: `farseer pipeline upgrade-runtime`), which moves it to this CLI's image and reports where it moved from. Upgrading changes the engine for everyone on that tenant and, on a scheduled job, for the next scheduled run, so ask the user before upgrading, then `run` once and fix whatever the newer engine's preflight rejects. A job on a moving tag such as `latest`, or on a digest, is reported as pending and left as it is: `upgrade-runtime` refuses it, and each run reports the engine it started on (`engine` in `inspect`). A job on a newer released image is reported as pending: it runs and accepts pushes, but update the CLI to author what the newer engine added. No job is ever moved down. A dataset declared under `Models/` is created by the engine on the first run, so init and check report a dataset that does not exist yet as pending, not as an error; after the first run, rerun `init jobId=<id> force=true` to record the new dataset IDs (a rerun for the same job and folder keeps the setup record, declared config files and author), and the profile's `datasetIds` lists the outputs recorded so far. No published version means read verification stays pending until the first prepared run. The setup record (owner, evidence, checkedAt, retentionDays, otherWritersExcluded=true, runtimeVerified=true) is the owner's statement, not an API-verified fact: do not invent it, and reconfirm it after setup changes. `readyForAcceptance` does not establish source replay, reconciliation or real-client acceptance.
|
|
58
58
|
|
|
59
59
|
## Authoring rules
|
|
60
60
|
|
|
@@ -90,6 +90,6 @@ A pipeline is promoted the way every tenant file is: copied, then set up on the
|
|
|
90
90
|
5. `run`, then `inspect`, then `init jobId=<id> force=true` so the profile records the datasets the first run created.
|
|
91
91
|
6. Set a schedule (in the web app or with `farseer_configure_app`) once the first run is verified, then run `init jobId=<id> force=true` so the profile records it.
|
|
92
92
|
|
|
93
|
-
On a production tenant, state the effects of step 5 before running: real cells, real members if `create_missing_members` is set
|
|
93
|
+
On a production tenant, state the effects of step 5 before running: real cells, and real members if `create_missing_members` is set. A run never changes the job's image; only `upgrade-runtime` does, as its own step.
|
|
94
94
|
|
|
95
95
|
Source provisioning, self-service job creation beyond init, broad runtime compatibility, mutable Farseer Files history, automatic whole-run rollback, tenant editing sessions, mutation guards, abandoned-session recovery, finer locks and a fair or durable queue remain deferred. The legacy separate-workspace experiment is retained only for regression tests.
|