@sente-labs/cli 0.6.0 → 0.8.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.
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.registerAppGraphCommands = registerAppGraphCommands;
37
+ const fs = __importStar(require("fs"));
38
+ const client_1 = require("../client");
39
+ const config_1 = require("../config");
40
+ const output_1 = require("../output");
41
+ /**
42
+ * App-graph commands. The app graph is a source-derived route map (routes +
43
+ * navigation edges) that the customer's coding agent generates from the repo at
44
+ * onboarding; the browser agent consults it to localize ("what page am I on,
45
+ * what's reachable, which controls leave this page"). The agent authors the JSON
46
+ * by reading the repo (see the skill's "Generating the app map" recipe); these
47
+ * commands upload and inspect it.
48
+ */
49
+ function registerAppGraphCommands(program, globalOpts) {
50
+ const appGraph = program.command('app-graph').description('App-graph: source-derived route map for the browser agent');
51
+ appGraph
52
+ .command('push')
53
+ .description('Upload a generated app-graph JSON for a project')
54
+ .requiredOption('--from <file>', 'JSON file containing the app graph')
55
+ .option('--project <id>', 'project id (overrides .sente/config.json)')
56
+ .action(async (cmdOpts) => {
57
+ const opts = globalOpts();
58
+ try {
59
+ const projectId = cmdOpts.project ?? (0, config_1.readLocalProjectId)();
60
+ if (!projectId) {
61
+ throw new Error('No project id found. Pass --project <id> or run `sente init` to create a .sente/config.json.');
62
+ }
63
+ let graph;
64
+ try {
65
+ graph = JSON.parse(fs.readFileSync(cmdOpts.from, 'utf8'));
66
+ }
67
+ catch {
68
+ throw new Error(`Could not read or parse JSON from ${cmdOpts.from}`);
69
+ }
70
+ const client = new client_1.GatewayClient();
71
+ const res = await client.request(`/api/projects/${projectId}/app-graph`, { method: 'PUT', body: graph });
72
+ (0, output_1.printSuccess)(res, () => process.stdout.write(`Uploaded app graph: ${res.nodeCount} route(s), ${res.edgeCount} edge(s).\n`), opts);
73
+ }
74
+ catch (err) {
75
+ process.exit((0, output_1.printError)(err, opts));
76
+ }
77
+ });
78
+ appGraph
79
+ .command('show')
80
+ .description('Show the stored app-graph for a project')
81
+ .option('--project <id>', 'project id (overrides .sente/config.json)')
82
+ .action(async (cmdOpts) => {
83
+ const opts = globalOpts();
84
+ try {
85
+ const projectId = cmdOpts.project ?? (0, config_1.readLocalProjectId)();
86
+ if (!projectId) {
87
+ throw new Error('No project id found. Pass --project <id> or run `sente init` to create a .sente/config.json.');
88
+ }
89
+ const client = new client_1.GatewayClient();
90
+ const res = await client.request(`/api/projects/${projectId}/app-graph`);
91
+ (0, output_1.printSuccess)(res, () => {
92
+ const g = res.appGraph;
93
+ if (!g) {
94
+ process.stdout.write('No app graph stored for this project. Ask Claude Code to "generate the Sente app map", then `sente app-graph push`.\n');
95
+ return;
96
+ }
97
+ const nodes = g.nodes ?? [];
98
+ const commit = g.commitSha ? `, commit ${g.commitSha.slice(0, 7)}` : '';
99
+ process.stdout.write(`App graph v${g.version}${g.framework ? ` (${g.framework})` : ''} — ${nodes.length} route(s), ${(g.edges ?? []).length} edge(s)${commit}\n`);
100
+ for (const n of nodes) {
101
+ process.stdout.write(` ${n.pathPattern} → ${n.componentName ?? ''} [${n.confidence}]\n`);
102
+ }
103
+ }, opts);
104
+ }
105
+ catch (err) {
106
+ process.exit((0, output_1.printError)(err, opts));
107
+ }
108
+ });
109
+ }
110
+ //# sourceMappingURL=appGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appGraph.js","sourceRoot":"","sources":["../../src/commands/appGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,4DA8EC;AApHD,uCAAyB;AAEzB,sCAA0C;AAC1C,sCAA+C;AAC/C,sCAAiE;AA0BjE;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,OAAgB,EAAE,UAA4B;IACrF,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,2DAA2D,CAAC,CAAC;IAEvH,QAAQ;SACL,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,iDAAiD,CAAC;SAC9D,cAAc,CAAC,eAAe,EAAE,oCAAoC,CAAC;SACrE,MAAM,CAAC,gBAAgB,EAAE,2CAA2C,CAAC;SACrE,MAAM,CAAC,KAAK,EAAE,OAA2C,EAAE,EAAE;QAC5D,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,IAAI,IAAA,2BAAkB,GAAE,CAAC;YAC1D,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAA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,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -39,6 +39,7 @@ const fs = __importStar(require("fs"));
39
39
  const path = __importStar(require("path"));
40
40
  const client_1 = require("../client");
41
41
  const output_1 = require("../output");
42
+ const workflow_1 = require("./workflow");
42
43
  /**
43
44
  * Read the local .sente/config.json (written by `sente init` in M4).
44
45
  * Walks up from the cwd looking for it -- same pattern as git/node_modules.
@@ -65,6 +66,78 @@ function readLocalProjectId() {
65
66
  }
66
67
  function registerProjectCommands(program, globalOpts) {
67
68
  const project = program.command('project').description('Project commands');
69
+ project
70
+ .command('list')
71
+ .description('List all projects in the current organization')
72
+ .action(async () => {
73
+ const opts = globalOpts();
74
+ try {
75
+ const client = new client_1.GatewayClient();
76
+ const res = await client.request('/api/projects');
77
+ (0, output_1.printSuccess)(
78
+ // Match the sibling list commands' --json shape (strip the envelope).
79
+ { projects: res.projects }, () => {
80
+ if (!res.projects.length) {
81
+ process.stdout.write('No projects.\n');
82
+ return;
83
+ }
84
+ for (const p of res.projects) {
85
+ const def = p.isDefault ? ' [default]' : '';
86
+ const url = p.baseUrl ? ` ${p.baseUrl}` : '';
87
+ process.stdout.write(`${p.id} ${p.name}${def}${url}\n`);
88
+ }
89
+ }, opts);
90
+ }
91
+ catch (err) {
92
+ process.exit((0, output_1.printError)(err, opts));
93
+ }
94
+ });
95
+ project
96
+ .command('set')
97
+ .description('Update the project server-side (e.g. its staging base URL); also syncs .sente/config.json')
98
+ .option('--id <projectId>', 'Project id (overrides .sente/config.json)')
99
+ .option('--url <baseUrl>', 'New staging base URL — where runs AND `sente auth login` seeding navigate')
100
+ .option('--name <name>', 'New project name')
101
+ .action(async (cmdOpts) => {
102
+ const opts = globalOpts();
103
+ try {
104
+ const projectId = cmdOpts.id ?? readLocalProjectId();
105
+ if (!projectId) {
106
+ throw new Error('No project id found. Pass --id <projectId> or run `sente init` to create a .sente/config.json.');
107
+ }
108
+ const body = {};
109
+ if (cmdOpts.url)
110
+ body.baseUrl = cmdOpts.url;
111
+ if (cmdOpts.name)
112
+ body.name = cmdOpts.name;
113
+ if (Object.keys(body).length === 0) {
114
+ throw new Error('Nothing to update. Pass --url <baseUrl> and/or --name <name>.');
115
+ }
116
+ const client = new client_1.GatewayClient();
117
+ const res = await client.request(`/api/projects/${projectId}`, {
118
+ method: 'PUT',
119
+ body,
120
+ });
121
+ // Keep the local authoring config in sync so `.sente/config.json` never
122
+ // diverges from the server (the server value is what runs/seeding use).
123
+ const localPath = cmdOpts.url ? updateLocalConfigBaseUrl(cmdOpts.url) : null;
124
+ (0, output_1.printSuccess)(res.project, () => {
125
+ const p = res.project;
126
+ process.stdout.write(`Updated project ${p.name} (${p.id}).\n`);
127
+ if (p.baseUrl)
128
+ process.stdout.write(`Base URL: ${p.baseUrl}\n`);
129
+ if (localPath)
130
+ process.stdout.write(`Synced ${localPath}\n`);
131
+ if (cmdOpts.url) {
132
+ process.stdout.write('\nThis URL is where runs AND `sente auth login` seeding navigate. If you changed the\n' +
133
+ 'domain, re-run `sente auth login` to re-seed auth — cookies are domain-scoped.\n');
134
+ }
135
+ }, opts);
136
+ }
137
+ catch (err) {
138
+ process.exit((0, output_1.printError)(err, opts));
139
+ }
140
+ });
68
141
  project
69
142
  .command('show')
70
143
  .description('Show the current project (from .sente/config.json or --id)')
@@ -93,6 +166,25 @@ function registerProjectCommands(program, globalOpts) {
93
166
  process.exit((0, output_1.printError)(err, opts));
94
167
  }
95
168
  });
169
+ project
170
+ .command('run')
171
+ .description('Queue a run for every task across all workflows in a project (sequential, against staging)')
172
+ .option('--id <projectId>', 'Project id (overrides .sente/config.json)')
173
+ .action(async (cmdOpts) => {
174
+ const opts = globalOpts();
175
+ try {
176
+ const projectId = cmdOpts.id ?? readLocalProjectId();
177
+ if (!projectId) {
178
+ throw new Error('No project id found. Pass --id <projectId> or run `sente init` to create a .sente/config.json.');
179
+ }
180
+ const client = new client_1.GatewayClient();
181
+ const res = await client.request(`/api/projects/${projectId}/run`, { method: 'POST', body: {} });
182
+ (0, output_1.printSuccess)(res, () => (0, workflow_1.printBulkRun)(res), opts);
183
+ }
184
+ catch (err) {
185
+ process.exit((0, output_1.printError)(err, opts));
186
+ }
187
+ });
96
188
  }
97
189
  function registerSyncCommand(program, globalOpts) {
98
190
  program
@@ -151,6 +243,29 @@ function findSenteDir() {
151
243
  dir = parent;
152
244
  }
153
245
  }
246
+ /**
247
+ * Update the `baseUrl` in the local .sente/config.json (if present), preserving
248
+ * all other fields. Keeps the local authoring config in sync with the server-side
249
+ * project after `sente project set --url`. Returns the file path written, or null
250
+ * if there is no local config (e.g. running with an explicit --id outside a repo).
251
+ */
252
+ function updateLocalConfigBaseUrl(baseUrl) {
253
+ const dir = findSenteDir();
254
+ if (!dir)
255
+ return null;
256
+ const configPath = path.join(dir, 'config.json');
257
+ if (!fs.existsSync(configPath))
258
+ return null;
259
+ try {
260
+ const cfg = JSON.parse(fs.readFileSync(configPath, 'utf8'));
261
+ cfg.baseUrl = baseUrl;
262
+ fs.writeFileSync(configPath, JSON.stringify(cfg, null, 2) + '\n');
263
+ return configPath;
264
+ }
265
+ catch {
266
+ return null;
267
+ }
268
+ }
154
269
  function readExistingTasksFile(p) {
155
270
  if (!fs.existsSync(p))
156
271
  return { projectId: '', tasks: [] };
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,0DAmCC;AAED,kDAqDC;AAjJD,uCAAyB;AACzB,2CAA6B;AAE7B,sCAA0C;AAC1C,sCAAiE;AA6BjE;;;GAGG;AACH,SAAS,kBAAkB;IACzB,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACxB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;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AC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAC3D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QACtD,OAAO;YACL,SAAS,EAAE,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;YACvE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;SACvD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACtC,CAAC;AACH,CAAC"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.printBulkRun = printBulkRun;
4
+ exports.registerWorkflowCommands = registerWorkflowCommands;
5
+ const client_1 = require("../client");
6
+ const config_1 = require("../config");
7
+ const output_1 = require("../output");
8
+ /** Print the per-task outcome of a bulk run (workflow or project). */
9
+ function printBulkRun(res) {
10
+ process.stdout.write(`${res.message}\n\n`);
11
+ for (const r of res.results) {
12
+ const tag = r.status.toUpperCase().padEnd(7);
13
+ const wf = r.workflowName ? `[${r.workflowName}] ` : '';
14
+ const detail = r.error ? ` -- ${r.error}` : r.sessionId ? ` (session ${r.sessionId})` : '';
15
+ process.stdout.write(` ${tag} ${wf}${r.taskName} (${r.taskId})${detail}\n`);
16
+ }
17
+ process.stdout.write('\nRuns are asynchronous. Track progress with `sente task results <taskId> --json` or the report URL in the dashboard.\n');
18
+ }
19
+ /**
20
+ * Workflow commands: list the workflows in a project, and run every task in a
21
+ * specific workflow with one call (`sente workflow run <id>`).
22
+ */
23
+ function registerWorkflowCommands(program, globalOpts) {
24
+ const workflow = program.command('workflow').description('Workflow commands');
25
+ workflow
26
+ .command('list')
27
+ .description('List the workflows in a project (from .sente/config.json or --project)')
28
+ .option('--project <id>', 'project id (overrides .sente/config.json)')
29
+ .action(async (cmdOpts) => {
30
+ const opts = globalOpts();
31
+ try {
32
+ const projectId = cmdOpts.project ?? (0, config_1.readLocalProjectId)();
33
+ if (!projectId) {
34
+ throw new Error('No project id found. Pass --project <id> or run `sente init` to create a .sente/config.json.');
35
+ }
36
+ const client = new client_1.GatewayClient();
37
+ const res = await client.request(`/api/projects/${projectId}/workflows`, { query: { includeTasks: 'true' } });
38
+ (0, output_1.printSuccess)(res, () => {
39
+ if (res.workflows.length === 0) {
40
+ process.stdout.write('No workflows in this project.\n');
41
+ return;
42
+ }
43
+ for (const w of res.workflows) {
44
+ const count = typeof w.taskCount === 'number' ? ` (${w.taskCount} task${w.taskCount === 1 ? '' : 's'})` : '';
45
+ process.stdout.write(`${w.id} ${w.name}${count}\n`);
46
+ }
47
+ }, opts);
48
+ }
49
+ catch (err) {
50
+ process.exit((0, output_1.printError)(err, opts));
51
+ }
52
+ });
53
+ workflow
54
+ .command('run')
55
+ .description('Queue a run for every task in a workflow (sequential, against staging)')
56
+ .argument('<workflowId>', 'workflow id')
57
+ .action(async (workflowId) => {
58
+ const opts = globalOpts();
59
+ try {
60
+ const client = new client_1.GatewayClient();
61
+ const res = await client.request(`/api/workflows/${workflowId}/run`, { method: 'POST', body: {} });
62
+ (0, output_1.printSuccess)(res, () => printBulkRun(res), opts);
63
+ }
64
+ catch (err) {
65
+ process.exit((0, output_1.printError)(err, opts));
66
+ }
67
+ });
68
+ }
69
+ //# sourceMappingURL=workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":";;AAkCA,oCAWC;AAMD,4DAyDC;AA3GD,sCA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C,CAAC;IAEL,QAAQ;SACL,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,wEAAwE,CAAC;SACrF,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;SACvC,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,sBAAa,EAAE,CAAC;YACnC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,kBAAkB,UAAU,MAAM,EAClC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAC7B,CAAC;YACF,IAAA,qBAAY,EAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/config.js CHANGED
@@ -36,12 +36,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.CREDENTIALS_PATH = exports.CREDENTIALS_DIR = exports.DEFAULT_GATEWAY_URL = void 0;
37
37
  exports.gatewayUrl = gatewayUrl;
38
38
  exports.envToken = envToken;
39
+ exports.readLocalProjectId = readLocalProjectId;
39
40
  /**
40
41
  * CLI runtime configuration. Env vars take precedence over defaults.
41
42
  *
42
43
  * SENTE_GATEWAY_URL -- override the gateway base URL
43
44
  * SENTE_API_TOKEN -- override the stored PAT (CI use)
44
45
  */
46
+ const fs = __importStar(require("fs"));
45
47
  const os = __importStar(require("os"));
46
48
  const path = __importStar(require("path"));
47
49
  exports.DEFAULT_GATEWAY_URL = 'https://api.sente.run';
@@ -53,4 +55,29 @@ function gatewayUrl() {
53
55
  function envToken() {
54
56
  return process.env.SENTE_API_TOKEN || undefined;
55
57
  }
58
+ /**
59
+ * Read the project id from the local .sente/config.json, walking up from the
60
+ * cwd (same discovery as git/node_modules). Returns null if none is found.
61
+ * Canonical home for this lookup; commands that need a project default to it.
62
+ */
63
+ function readLocalProjectId() {
64
+ let dir = process.cwd();
65
+ while (true) {
66
+ const candidate = path.join(dir, '.sente', 'config.json');
67
+ if (fs.existsSync(candidate)) {
68
+ try {
69
+ const parsed = JSON.parse(fs.readFileSync(candidate, 'utf8'));
70
+ if (typeof parsed.projectId === 'string')
71
+ return parsed.projectId;
72
+ }
73
+ catch {
74
+ return null;
75
+ }
76
+ }
77
+ const parent = path.dirname(dir);
78
+ if (parent === dir)
79
+ return null;
80
+ dir = parent;
81
+ }
82
+ }
56
83
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,gCAEC;AAED,4BAEC;AAnBD;;;;;GAKG;AACH,uCAAyB;AACzB,2CAA6B;AAEhB,QAAA,mBAAmB,GAAG,uBAAuB,CAAC;AAC9C,QAAA,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AACpD,QAAA,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAe,EAAE,aAAa,CAAC,CAAC;AAE1E,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,2BAAmB,CAAC;AAC9D,CAAC;AAED,SAAgB,QAAQ;IACtB,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,SAAS,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gCAEC;AAED,4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/dist/index.js CHANGED
@@ -5,6 +5,8 @@ const commander_1 = require("commander");
5
5
  const login_1 = require("./commands/login");
6
6
  const whoami_1 = require("./commands/whoami");
7
7
  const project_1 = require("./commands/project");
8
+ const workflow_1 = require("./commands/workflow");
9
+ const appGraph_1 = require("./commands/appGraph");
8
10
  const task_1 = require("./commands/task");
9
11
  const init_1 = require("./commands/init");
10
12
  const secret_1 = require("./commands/secret");
@@ -23,7 +25,7 @@ const program = new commander_1.Command();
23
25
  program
24
26
  .name('sente')
25
27
  .description('Sente CLI -- manage QA tests from the command line and Claude Code')
26
- .version('0.6.0')
28
+ .version('0.8.0')
27
29
  .option('--json', 'Emit machine-readable JSON instead of human output');
28
30
  /**
29
31
  * Global options aren't auto-propagated to subcommands by Commander, so we
@@ -37,6 +39,8 @@ const globalOpts = () => program.opts();
37
39
  (0, init_1.registerInstallSkillCommand)(program, globalOpts);
38
40
  (0, project_1.registerProjectCommands)(program, globalOpts);
39
41
  (0, project_1.registerSyncCommand)(program, globalOpts);
42
+ (0, workflow_1.registerWorkflowCommands)(program, globalOpts);
43
+ (0, appGraph_1.registerAppGraphCommands)(program, globalOpts);
40
44
  (0, task_1.registerTaskCommands)(program, globalOpts);
41
45
  (0, secret_1.registerSecretCommands)(program, globalOpts);
42
46
  (0, schedule_1.registerScheduleCommands)(program, globalOpts);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,4CAAwD;AACxD,8CAA0D;AAC1D,gDAAkF;AAClF,0CAAuD;AACvD,0CAAmF;AACnF,8CAA2D;AAC3D,kDAA+D;AAC/D,0CAAuD;AACvD,mDAA+E;AAG/E,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,IAAA,mCAAsB,GAAE,CAAC;AAEzB,wEAAwE;AACxE,uEAAuE;AACvE,6DAA6D;AAC7D,KAAK,IAAA,8BAAiB,GAAE,CA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AwB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC9C,IAAA,2BAAoB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAE1C,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC7C,wEAAwE;IACxE,+CAA+C;IAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -22,13 +22,15 @@ Sente runs QA tests against the user's deployed staging environment via a cloud-
22
22
  - Sente runs against **publicly-reachable URLs only** (cloud browser). Local dev / non-public PR previews are not supported. Always test against staging.
23
23
  - Tests run **after the next staging deploy**, not when you create them. **Do not call `sente task run` immediately after `sente task create`** — staging probably doesn't have the new code yet. If the user wants to run now, confirm the deploy landed.
24
24
  - Project context lives in `.sente/config.json` (`{ projectId, gatewayUrl, baseUrl }`). The task-to-paths map lives in `.sente/tasks.json`.
25
+ - **The staging `baseUrl` is authoritative server-side.** Runs and `sente auth login` seeding navigate to the *project's* `baseUrl`, not the local file. To change it, use **`sente project set --url <url>`** (updates the server and syncs `.sente/config.json`). **Never hand-edit `baseUrl` in `.sente/config.json`** — that only changes local authoring context, so runs and auth seeding would still hit the old URL.
26
+ - **Discover commands at runtime** with `sente --help` and `sente <command> --help` (e.g. `sente project --help`). The Command reference below is the canonical list — prefer it over guessing command names.
25
27
 
26
28
  ## Workflow recipes
27
29
 
28
30
  ### A. Creating a new test
29
31
 
30
32
  1. Read `.sente/config.json` and `.sente/tasks.json` to confirm the project exists and to learn the staging baseUrl.
31
- 2. Identify the workflow id to attach the task to — list with `sente workflow list --json` (when available; until then ask the user or `sente task list --json` to infer from existing tasks).
33
+ 2. Identify the workflow id to attach the task to — list with `sente workflow list --json` (defaults to the repo's project; pass `--project <id>` to target another).
32
34
  3. Draft steps following the **Test Authoring Rubric** below.
33
35
  4. Write the steps to a temp file (e.g., `/tmp/sente-steps-<timestamp>.json`).
34
36
  5. Call `sente task create --workflow <id> --name "..." --instruction "..." --steps-from <file> --json`.
@@ -61,14 +63,63 @@ If a flow needs login, first determine the auth type (check the app or its repo)
61
63
 
62
64
  - **Plain email/password form**: author login as normal steps with `{{secret.email}}` / `{{secret.password}}` placeholders (see Hard rules). The agent types them at runtime; you never see the values.
63
65
  - **SSO or 2FA** (e.g. "Continue with Google", Okta, magic link, any device/2-step prompt): do NOT author provider-login steps — automated provider logins are blocked (bot detection + 2FA device prompts). Seed the session once instead:
64
- 1. `sente auth login --project $(jq -r .projectId .sente/config.json)` returns a live browser URL.
65
- 2. Tell the user: "Open this URL and log in (complete any 2FA on your phone), then tell me when you're in." Give them the URL and wait. **Never ask for their password.**
66
- 3. `sente auth finish <sessionId> --project <id>` saves the login into the project's persistent browser profile.
67
- 4. Author the test to **start already authenticated**: no login steps navigate to an authenticated route and assert a logged-in-only element (top bar, account menu, etc.). The seeded profile makes runs start logged in.
68
- 5. If a later run fails at a login wall, the seeded session expired re-run `sente auth login` / `finish` to re-seed.
66
+ 1. **First confirm the project's staging URL is correct** with `sente project show --json` — the seed browser opens the project's `baseUrl`, and auth cookies are domain-scoped, so seeding the wrong domain means runs hit a login wall. If it's wrong, fix it with `sente project set --url <correct-url>` *before* seeding.
67
+ 2. `sente auth login --project $(jq -r .projectId .sente/config.json)` returns a live browser URL.
68
+ 3. Tell the user: "Open this URL and log in (complete any 2FA on your phone), then tell me when you're in." Give them the URL and wait. **Never ask for their password.**
69
+ 4. `sente auth finish <sessionId> --project <id>` saves the login into the project's persistent browser profile.
70
+ 5. Author the test to **start already authenticated**: no login steps navigate to an authenticated route and assert a logged-in-only element (top bar, account menu, etc.). The seeded profile makes runs start logged in.
71
+ 6. If a later run fails at a login wall, the seeded session expired (or the staging domain changed) — re-run `sente auth login` / `finish` to re-seed.
69
72
 
70
73
  **Never put a password in the chat.** Usernames/emails are fine; passwords go through `sente secret create` (hidden prompt) or the live `sente auth login` browser.
71
74
 
75
+ ### E. Running tests (one task, a workflow, or a whole project)
76
+
77
+ Runs execute against the **current staging URL**, so only run after confirming the deploy you want to test has landed (see Critical context).
78
+
79
+ - **One task**: `sente task run <taskId>`.
80
+ - **A whole workflow** (all its tasks, in order): `sente workflow run <workflowId>`. Get ids with `sente workflow list --json`.
81
+ - **A whole project** (every task across every workflow): `sente project run` (defaults to the repo's project; `--id <projectId>` to target another).
82
+
83
+ All runs are **asynchronous and fire-and-forget** — the command queues the run(s) and returns immediately with a per-task status (`running` / `queued` / `failed`) plus a session id. **Do not sit in a foreground polling loop.** To report outcomes, poll lightly with `sente task results <taskId> --json` (status flips to `passed`/`failed` only when a run finishes), or point the user at the report URL in the dashboard. Bulk runs are sequential and respect the org's concurrent-session limit (overflow shows as `queued` and starts as capacity frees). Authenticated tests work in bulk runs too — the seeded browser profile (Recipe D) is reused for every task.
84
+
85
+ ### F. Generating the app map (route graph)
86
+
87
+ Sente's browser agent runs better when it knows the app's route structure — what page it's on, what's reachable, and which controls navigate away. You can generate that map **from this repo** (something only you, with repo access, can do well) and upload it once at onboarding; refresh it when routes change.
88
+
89
+ Produce a JSON file with this exact shape and `sente app-graph push --from <file>`:
90
+
91
+ ```json
92
+ {
93
+ "version": 1,
94
+ "commitSha": "<short git HEAD sha, optional>",
95
+ "generatedAt": "<ISO 8601 timestamp>",
96
+ "framework": "next-app | react-router | vue-router | sveltekit | remix | ...",
97
+ "nodes": [
98
+ {
99
+ "id": "review-detail",
100
+ "pathPattern": "/public/review/:reviewId",
101
+ "pathParamNames": ["reviewId"],
102
+ "componentName": "ReviewDetail",
103
+ "componentPath": "src/pages/ReviewDetail.tsx",
104
+ "requiresAuth": false,
105
+ "isPublic": true,
106
+ "confidence": "high"
107
+ }
108
+ ],
109
+ "edges": [
110
+ { "from": "reviews-list", "to": "review-detail", "kind": "link", "label": "review card", "leavesRoute": true, "confidence": "high" }
111
+ ]
112
+ }
113
+ ```
114
+
115
+ How to build it:
116
+ 1. **Detect the framework and find the router config**: Next.js (`app/` / `pages/`), React Router (route objects or `<Route>` trees), Vue Router, SvelteKit (`routes/`), Remix (`routes/`).
117
+ 2. **Enumerate routes → `nodes`**: one per route. `pathPattern` uses `:param` for dynamic segments (`/review/:reviewId`); list those in `pathParamNames`. Fill `componentName` and a repo-relative `componentPath`. Set `requiresAuth`/`isPublic` only when a guard/layout makes it clear.
118
+ 3. **Find navigation → `edges`**: from `<Link to=…>`, `navigate()`/`router.push(…)`, internal `<a href>`, and redirects. Set `leavesRoute: true` when the target's `pathPattern` differs from the source's. `kind` is `link` for markup, `programmatic` for code-driven navigation.
119
+ 4. **Confidence, honestly**: `high` for literal, file-based routes and literal link targets; `low` for computed/indirect targets (e.g. `to={routes.review(id)}`) you had to infer. **Never invent routes** — omitting a route is fine; guessing one is not. A partial, correct map is better than a complete, wrong one.
120
+ 5. **Upload**: write the JSON to a temp file, `sente app-graph push --from /tmp/sente-appgraph.json`, then verify with `sente app-graph show`. The gateway rejects malformed maps (unknown edge targets, bad path patterns).
121
+ 6. **When to (re)generate**: once at onboarding, and again when you change routing — added/removed/renamed pages or navigation. A good moment is when preparing a commit/PR that touches the router.
122
+
72
123
  ## Test Authoring Rubric
73
124
 
74
125
  The agent that runs your tests enforces this style. Steps that follow it pass more reliably.
@@ -112,12 +163,20 @@ The top-level `--instruction` is consulted by the agent when step text is ambigu
112
163
  | Command | Purpose |
113
164
  |---|---|
114
165
  | `sente whoami --json` | Confirm auth and current org |
166
+ | `sente project list --json` | List all projects in the org (id, name, baseUrl, default) |
115
167
  | `sente project show --json` | Show the project bound to this repo |
168
+ | `sente project set [--id <id>] --url <baseUrl> \| --name <name> --json` | Update the project server-side (staging URL / name) and sync `.sente/config.json`. Use this to change the staging URL — never hand-edit the config file |
116
169
  | `sente task list --json` | List tasks (optionally `--project <id>`) |
117
170
  | `sente task show <id> --json` | Full task details + steps |
118
171
  | `sente task create --workflow <id> --name "..." --instruction "..." --steps-from <file> --json` | Create a new QA task |
119
172
  | `sente task update <id> --steps-from <file> --json` | Replace steps; also accepts `--name`, `--instruction`, `--description` |
120
173
  | `sente task delete <id> --json` | Delete a task |
174
+ | `sente task run <id> --json` | Queue a run for one task (async; against staging) |
175
+ | `sente workflow list [--project <id>] --json` | List the workflows in a project (id + task count) |
176
+ | `sente workflow run <workflowId> --json` | Queue a run for every task in a workflow (sequential) |
177
+ | `sente project run [--id <projectId>] --json` | Queue a run for every task across all workflows in a project |
178
+ | `sente app-graph push --from <file> [--project <id>] --json` | Upload a repo-derived route map (nodes=routes, edges=navigation) so the agent can localize. See Recipe F |
179
+ | `sente app-graph show [--project <id>] --json` | Show the stored route map |
121
180
  | `sente task results <id> --failed-step --json` | Focused failure payload for diagnosis |
122
181
  | `sente task results <id> --json` | Full step-by-step results |
123
182
  | `sente task push-recording <id> --from <file> --json` | Upload a hardened replay recording (per-step selectors + assertion predicates) for a task. Advanced — a deterministic-replay recipe, not action/assertion steps; produced by the recording pipeline, not hand-authored here. |
@@ -135,6 +194,8 @@ The top-level `--instruction` is consulted by the agent when step text is ambigu
135
194
 
136
195
  Use `--json` for every CLI call — outputs are stable JSON shaped for programmatic consumption.
137
196
 
197
+ This table is the canonical reference, but the CLI is also self-documenting: run `sente --help` for the full command list and `sente <command> --help` (e.g. `sente project --help`, `sente auth --help`) for a command's subcommands and flags. Prefer these over guessing command names.
198
+
138
199
  ## Error handling
139
200
 
140
201
  - `STEP_VALIDATION_FAILED` (HTTP 400): the `errors[]` array tells you exactly what to fix. Apply the fix to the steps file and retry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sente-labs/cli",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Sente CLI -- author and manage QA tests from your terminal and Claude Code. Tests run against your staging URL after each deploy.",
5
5
  "bin": {
6
6
  "sente": "dist/index.js"