@agentic-surfaces/cli 0.1.26 → 0.1.28

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 (2) hide show
  1. package/dist/index.js +14 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFileSync, readdirSync, existsSync } from "node:fs";
2
2
  import { join, dirname, resolve } from "node:path";
3
3
  import { spawn } from "node:child_process";
4
- import { loadWorkflow, runWorkflowOnce, Scheduler, loadProjectConfig, buildWorkflowRunner, defaultRegistry, parseAgentFile } from "@agentic-surfaces/core";
4
+ import { loadWorkflow, runWorkflowOnce, Scheduler, loadProjectConfig, buildWorkflowRunner, defaultRegistry, parseAgentFile, FilePauseState } from "@agentic-surfaces/core";
5
5
  import { serve, StreamingObserver } from "@agentic-surfaces/server";
6
6
  import { buildServices } from "./services.js";
7
7
  const CONFIG = "agentic-surfaces.config.yaml";
@@ -105,7 +105,8 @@ function launchUi(opts) {
105
105
  agents: [...opts.agents.values()],
106
106
  onRun: opts.onRun,
107
107
  cache: opts.cache,
108
- config: { dryRun: opts.dryRun, agent: opts.agentDefaults, version: VERSION },
108
+ pause: opts.pause,
109
+ config: { dryRun: opts.dryRun, agent: opts.agentDefaults, version: VERSION, atlassianSite: opts.atlassianSite },
109
110
  });
110
111
  const url = `http://127.0.0.1:${p}`;
111
112
  openBrowser(url);
@@ -164,8 +165,10 @@ export async function run(argv) {
164
165
  const services = buildServices({ projectConfig: pc, projectDir: dir });
165
166
  const runWorkflowFn = buildWorkflowRunner({ workflows: allWorkflows, registry, services: { ...services, agents }, observer });
166
167
  const servicesWithRunner = { ...services, agents, runWorkflow: runWorkflowFn };
168
+ // Platform-wide play/pause (file-backed so it survives a --watch restart).
169
+ const pause = new FilePauseState();
167
170
  // Cron-triggered workflows fire on schedule too.
168
- const sched = new Scheduler(servicesWithRunner, registry, observer);
171
+ const sched = new Scheduler(servicesWithRunner, registry, observer, pause);
169
172
  for (const [, w] of allWorkflows)
170
173
  sched.add(w);
171
174
  sched.start();
@@ -173,8 +176,10 @@ export async function run(argv) {
173
176
  observer, workflows: allWorkflows, agents,
174
177
  onRun: (name, payload) => runWorkflowFn(name, payload),
175
178
  cache: services.cache,
179
+ pause,
176
180
  dryRun: pc?.dryRun,
177
181
  agentDefaults: { model: pc?.agent?.model, effort: pc?.agent?.effort },
182
+ atlassianSite: pc?.atlassianSite,
178
183
  });
179
184
  console.log(`\n▶ agentic-surfaces ${VERSION} — ${url}`);
180
185
  console.log(` project: ${dir} · ${allWorkflows.size} workflow(s) · Ctrl-C to exit`);
@@ -218,6 +223,7 @@ export async function run(argv) {
218
223
  cache: services.cache,
219
224
  dryRun: pc?.dryRun,
220
225
  agentDefaults: { model: pc?.agent?.model, effort: pc?.agent?.effort },
226
+ atlassianSite: pc?.atlassianSite,
221
227
  }) : undefined;
222
228
  // A run error must NOT tear down the --ui server: the failure is already
223
229
  // streamed to the dashboard (the failed node + run), so keep serving so it
@@ -257,18 +263,21 @@ export async function run(argv) {
257
263
  const observer = ui ? new StreamingObserver() : undefined;
258
264
  const runWorkflowFn = buildWorkflowRunner({ workflows: allWorkflows, registry, services: { ...services, agents }, observer });
259
265
  const servicesWithRunner = { ...services, agents, runWorkflow: runWorkflowFn };
260
- const sched = new Scheduler(servicesWithRunner, registry, observer);
266
+ const pause = new FilePauseState();
267
+ const sched = new Scheduler(servicesWithRunner, registry, observer, pause);
261
268
  for (const [, w] of allWorkflows)
262
269
  sched.add(w);
263
270
  sched.start();
264
- console.log("scheduler started; watching", workflowsDir);
271
+ console.log(`scheduler started; watching ${workflowsDir}${pause.isPaused() ? " (PAUSED)" : ""}`);
265
272
  if (ui) {
266
273
  const url = launchUi({
267
274
  observer: observer, workflows: allWorkflows, agents,
268
275
  onRun: (name, payload) => runWorkflowFn(name, payload),
269
276
  cache: services.cache,
277
+ pause,
270
278
  dryRun: pc?.dryRun,
271
279
  agentDefaults: { model: pc?.agent?.model, effort: pc?.agent?.effort },
280
+ atlassianSite: pc?.atlassianSite,
272
281
  });
273
282
  console.log(`▶ agentic-surfaces ${VERSION} — ${url}`);
274
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-surfaces/cli",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -22,9 +22,9 @@
22
22
  "README.md"
23
23
  ],
24
24
  "dependencies": {
25
- "@agentic-surfaces/core": "0.1.26",
26
- "@agentic-surfaces/server": "0.1.26",
27
- "@agentic-surfaces/agent": "0.1.26"
25
+ "@agentic-surfaces/core": "0.1.28",
26
+ "@agentic-surfaces/agent": "0.1.28",
27
+ "@agentic-surfaces/server": "0.1.28"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",