owenloop 0.5.21 → 0.5.22

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.5.22](https://github.com/typicalday/owenloop/compare/v0.5.21...v0.5.22) (2026-08-22)
8
+
9
+
10
+ ### Features
11
+
12
+ * **cli:** set a published workflow's catalog visibility ([#289](https://github.com/typicalday/owenloop/issues/289)) ([4878a52](https://github.com/typicalday/owenloop/commit/4878a520e2e02cfed24dbcbd8a3da9d2195f1b0e))
13
+
7
14
  ## [0.5.21](https://github.com/typicalday/owenloop/compare/v0.5.20...v0.5.21) (2026-08-22)
8
15
 
9
16
 
package/dist/src/cli.js CHANGED
@@ -63,7 +63,7 @@ import { BundleError, digestBundle, inspectBundle, packBundle, unpackBundle } fr
63
63
  import { acquireInstallLock, ADD_JOURNAL_FILENAME, archivePathViolation, commitInstall, finalizeInstallCommit, githubShaUrl, githubTarballUrl, installFolder, parkOldNameDir, parseRepoSpec, readLockfile, recoverInterruptedInstall, releaseInstallLock, removeAddJournal, rmRecursiveForce, rollbackInstallCommit, RollbackFailedError, stageFiles, STAGING_DIRNAME, writeAddJournal, writeLockfile, } from "./add.js";
64
64
  import { BundleIngestorUnavailableError, collectWorkflowStoreGarbage, compareStoreText, globalStoreRoot, installWorkflowBundle, inspectCasDefs, loadCasDefs, PreCommitVerifierUnavailableError, parseWorkflowCoordinate, projectStoreRoot, createBundleIngestor, createPreCommitVerifier, recoverWorkflowStore, storeIndexPath, workflowStoreReplacementRecovery, workflowStoreStatePaths, } from "./store/index.js";
65
65
  import { recoverInterruptedWorkflowStoreGc } from "./store/gc-recovery.js";
66
- import { asAgentIdentities, asCreateWorkflowOk, capabilityPublishReportText, asCapabilityRerouteAdded, asCapabilityRerouteRemoved, asCapabilityReroutes, asCapabilityRouteAdded, asCapabilityRouteRemoved, asCapabilityRoutes, asInterfaceCatalogList, asInterfaceCatalogVersion, asCrewCreated, asCrewDeleted, asCrewMemberAdded, asCrewMemberRemoved, asCrews, asRoutingAlerts, asRunRouting, asWhoami, computeServerDiff, credentialBackend, createWorkflowError, credentialFilePath, credentialSlot, DEFAULT_HUB, externalCredentialCommand, hashDefForHub, hubBindingPath, keychainServiceFor, listStoredHubOrigins, normalizeOrigin, parseWorkflowList, pkcePair, randomState, readCredentialFile, readHubBinding, readStoredCredential, resolveEndpoint, resolveKeychain, writeCredentialFile, writeHubBinding, } from "./hub.js";
66
+ import { asAgentIdentities, asCreateWorkflowOk, capabilityPublishReportText, asCapabilityRerouteAdded, asCapabilityRerouteRemoved, asCapabilityReroutes, asCapabilityRouteAdded, asCapabilityRouteRemoved, asCapabilityRoutes, asInterfaceCatalogList, asInterfaceCatalogVersion, asWorkflowCatalogVisibility, asCrewCreated, asCrewDeleted, asCrewMemberAdded, asCrewMemberRemoved, asCrews, asRoutingAlerts, asRunRouting, asWhoami, computeServerDiff, credentialBackend, createWorkflowError, credentialFilePath, credentialSlot, DEFAULT_HUB, externalCredentialCommand, hashDefForHub, hubBindingPath, keychainServiceFor, listStoredHubOrigins, normalizeOrigin, parseWorkflowList, pkcePair, randomState, readCredentialFile, readHubBinding, readStoredCredential, resolveEndpoint, resolveKeychain, writeCredentialFile, writeHubBinding, } from "./hub.js";
67
67
  import { fetchCapabilityMappings, recordCapabilityMappings } from "./capability-mapping-client.js";
68
68
  import { MODIFIER_SEPARATOR } from "./capabilities.js";
69
69
  import { loadSettings, settingsPath as executionSettingsPath } from "../packages/work/src/settings/settings.js";
@@ -1245,6 +1245,7 @@ ${' '.repeat(41)}the instance has reached a terminal status.
1245
1245
  capability bind <capability> <crew> [--hub <url>] add a crew to a workflow capability on the hub org — a capability may bind many crews (admin; human credential)
1246
1246
  capability unbind <capability> <crew> [--hub <url>] remove one (capability, crew) route
1247
1247
  capability list [--hub <url>] list the hub org's capability routes
1248
+ catalog visibility <name> visible|hidden [--hub <url>]
1248
1249
  interface register <name> <version> --signature <file> [--hub <url>]
1249
1250
  interface get <name> <version> [--hub <url>]
1250
1251
  interface list [--hub <url>]
@@ -1364,6 +1365,7 @@ export const COMMAND_OPTIONS = new Map([
1364
1365
  ['instance', cmdOpts('hub')],
1365
1366
  ['agent', cmdOpts('crews', 'hub', 'scopes', 'shift')],
1366
1367
  ['capability', cmdOpts('hub')],
1368
+ ['catalog', cmdOpts('hub')],
1367
1369
  ['interface', cmdOpts('hub', 'signature')],
1368
1370
  // Per-TOP-LEVEL-command allowlist, not per-subcommand: `--position` on
1369
1371
  // `routing alerts` is meaningless but accepted and ignored, exactly as
@@ -6255,6 +6257,76 @@ async function dispatchInterface(io, args) {
6255
6257
  throw e;
6256
6258
  }
6257
6259
  }
6260
+ /**
6261
+ * Set whether one published workflow definition appears in catalog discovery.
6262
+ * The hub remains the source of truth for opaque definition-name semantics and
6263
+ * returned state; this command only validates its small argv shape.
6264
+ */
6265
+ async function dispatchCatalog(io, args) {
6266
+ const USAGE_FORM = 'usage: owenloop catalog visibility <name> visible|hidden [--hub <url>]';
6267
+ if (args.positionals[1] !== 'visibility') {
6268
+ throw new CliError('unknown catalog subcommand ' + JSON.stringify(args.positionals[1] ?? '') + ' — ' + USAGE_FORM);
6269
+ }
6270
+ const name = args.positionals[2];
6271
+ if (name === undefined || name === '') {
6272
+ throw new CliError('missing required argument: <name> (' + USAGE_FORM + ')');
6273
+ }
6274
+ const state = args.positionals[3];
6275
+ if (state === undefined || state === '') {
6276
+ throw new CliError('missing required argument: visible|hidden (' + USAGE_FORM + ')');
6277
+ }
6278
+ if (args.positionals[4] !== undefined) {
6279
+ throw new CliError('too many positional arguments — ' + USAGE_FORM);
6280
+ }
6281
+ if (state !== 'visible' && state !== 'hidden') {
6282
+ throw new CliError('visibility state must be visible or hidden — ' + USAGE_FORM);
6283
+ }
6284
+ const visible = state === 'visible';
6285
+ const origin = resolveAgentHub(io, args, 'set workflow catalog visibility on');
6286
+ const slot = { principal: 'human' };
6287
+ const credential = readCredential(io, origin, slot);
6288
+ if (credential === null) {
6289
+ throw new CliError('no human credential for ' + origin + ' — run: owenloop login --hub ' + origin, { exitCode: 3 });
6290
+ }
6291
+ try {
6292
+ const { res } = await authedPost(io, origin, slot, credential, '/api/set_workflow_catalog_visibility', { name, visible });
6293
+ if (res.status === 401) {
6294
+ throw new CliError('credential rejected by the hub — run `owenloop login`');
6295
+ }
6296
+ if (!res.ok) {
6297
+ throw new CliError((await hubRequestMessage(res)) ?? ('hub ' + origin + ' rejected the request (HTTP ' + res.status + ')'));
6298
+ }
6299
+ let body;
6300
+ try {
6301
+ body = (await res.json());
6302
+ }
6303
+ catch {
6304
+ throw new CliError('set_workflow_catalog_visibility: malformed success response — body is not valid JSON');
6305
+ }
6306
+ let result;
6307
+ try {
6308
+ result = asWorkflowCatalogVisibility(body);
6309
+ }
6310
+ catch (e) {
6311
+ throw new CliError(e.message);
6312
+ }
6313
+ print(io, {
6314
+ ok: true,
6315
+ hub: origin,
6316
+ name: result.name,
6317
+ catalogVisible: result.catalogVisible,
6318
+ previousCatalogVisible: result.previousCatalogVisible,
6319
+ unchanged: result.unchanged,
6320
+ });
6321
+ return 0;
6322
+ }
6323
+ catch (e) {
6324
+ if (e instanceof CliError && /run `owenloop login`/.test(e.message)) {
6325
+ throw new CliError(e.message + ' — run: owenloop login --hub ' + origin, { exitCode: 3 });
6326
+ }
6327
+ throw e;
6328
+ }
6329
+ }
6258
6330
  /**
6259
6331
  * `owenloop capability bind|unbind|list` — manage the hub org's **capability routes**, the
6260
6332
  * admin-owned table mapping a workflow-def `capabilities:` entry to a crew.
@@ -8476,7 +8548,7 @@ async function runDoctor(io, origin) {
8476
8548
  * the async path, so every existing command and test keeps working exactly as
8477
8549
  * before.
8478
8550
  */
8479
- export const ASYNC_COMMANDS = new Set(['add', 'login', 'logout', 'connect', 'publish', 'trust', 'push', 'install', 'start', 'pending-gates', 'cancel', 'provide', 'reject', 'retry', 'instance', 'agent', 'capability', 'interface', 'routing', 'crew', 'roster', 'setup', 'doctor', 'enrollments', 'mcp', 'shift']);
8551
+ export const ASYNC_COMMANDS = new Set(['add', 'login', 'logout', 'connect', 'publish', 'trust', 'push', 'install', 'start', 'pending-gates', 'cancel', 'provide', 'reject', 'retry', 'instance', 'agent', 'capability', 'catalog', 'interface', 'routing', 'crew', 'roster', 'setup', 'doctor', 'enrollments', 'mcp', 'shift']);
8480
8552
  export async function mainAsync(argv, io = defaultIO()) {
8481
8553
  // Delegate execution-side and shift argv tails before root parsing. Their
8482
8554
  // roles own their option grammars, including repeated/value forms that the
@@ -8550,6 +8622,8 @@ export async function mainAsync(argv, io = defaultIO()) {
8550
8622
  return await dispatchAgent(io, args);
8551
8623
  case 'capability':
8552
8624
  return await dispatchCapability(io, args);
8625
+ case 'catalog':
8626
+ return await dispatchCatalog(io, args);
8553
8627
  case 'interface':
8554
8628
  return await dispatchInterface(io, args);
8555
8629
  case 'routing':
package/dist/src/hub.d.ts CHANGED
@@ -878,6 +878,15 @@ export interface InterfaceCatalogVersionWire extends InterfaceCatalogRowWire {
878
878
  export declare function asInterfaceCatalogVersion(body: unknown, endpoint: 'register_interface' | 'interfaces'): InterfaceCatalogVersionWire;
879
879
  /** Narrow `GET /api/interfaces`, preserving the hub's opaque row order. */
880
880
  export declare function asInterfaceCatalogList(body: unknown): InterfaceCatalogRowWire[];
881
+ /** The whitelisted success fields from set_workflow_catalog_visibility. */
882
+ export interface WorkflowCatalogVisibilityWire {
883
+ name: string;
884
+ catalogVisible: boolean;
885
+ previousCatalogVisible: boolean;
886
+ unchanged: boolean;
887
+ }
888
+ /** Narrow the visibility setter response without preserving its text or unknown fields. */
889
+ export declare function asWorkflowCatalogVisibility(body: unknown): WorkflowCatalogVisibilityWire;
881
890
  /**
882
891
  * One **routing alert** as the hub reports it — an org-scoped record that the
883
892
  * hub made a routing decision an operator needs to know about.
package/dist/src/hub.js CHANGED
@@ -1329,6 +1329,32 @@ export function asInterfaceCatalogList(body) {
1329
1329
  }
1330
1330
  return body.interfaces.map((entry, index) => asInterfaceCatalogRow(entry, prefix, `interfaces[${index}]`));
1331
1331
  }
1332
+ /** Narrow the visibility setter response without preserving its text or unknown fields. */
1333
+ export function asWorkflowCatalogVisibility(body) {
1334
+ const prefix = 'set_workflow_catalog_visibility: malformed success response';
1335
+ if (typeof body !== 'object' || body === null) {
1336
+ throw new Error(prefix + ' — response is not an object');
1337
+ }
1338
+ const value = body;
1339
+ if (typeof value.name !== 'string' || value.name === '') {
1340
+ throw new Error(prefix + ' — response missing non-empty string name');
1341
+ }
1342
+ if (typeof value.catalogVisible !== 'boolean') {
1343
+ throw new Error(prefix + ' — response missing boolean catalogVisible');
1344
+ }
1345
+ if (typeof value.previousCatalogVisible !== 'boolean') {
1346
+ throw new Error(prefix + ' — response missing boolean previousCatalogVisible');
1347
+ }
1348
+ if (value.unchanged !== undefined && typeof value.unchanged !== 'boolean') {
1349
+ throw new Error(prefix + ' — response unchanged must be boolean when present');
1350
+ }
1351
+ return {
1352
+ name: value.name,
1353
+ catalogVisible: value.catalogVisible,
1354
+ previousCatalogVisible: value.previousCatalogVisible,
1355
+ unchanged: value.unchanged ?? false,
1356
+ };
1357
+ }
1332
1358
  /**
1333
1359
  * Validate the eight `RoutingAlertWire` fields on one row. `prefix` is the
1334
1360
  * endpoint-qualified lead-in the caller wants (e.g.
package/docs/cli.md CHANGED
@@ -81,6 +81,7 @@ is independent of the `SEARCH INCOMPLETE` bounds notice.
81
81
  | `capability bind <capability> <crew> [--hub <url>]` | add a crew to a workflow capability on the hub org — a capability may route to many crews (admin; human credential) — see [Capability routes](#capability-routes) |
82
82
  | `capability unbind <capability> <crew> [--hub <url>]` | remove one `(capability, crew)` route — see [Capability routes](#capability-routes) |
83
83
  | `capability list [--hub <url>]` | list the hub org's capability routes — see [Capability routes](#capability-routes) |
84
+ | `catalog visibility <name> visible\|hidden [--hub <url>]` | set whether one published workflow definition appears in catalog discovery (admin; human credential) — see [Workflow catalog visibility](#workflow-catalog-visibility) |
84
85
  | `interface register <name> <version> --signature <file> [--hub <url>]` | register one immutable hub interface signature (admin; human credential) — see [Interface catalog](#interface-catalog) |
85
86
  | `interface get <name> <version> [--hub <url>]` | get one exact interface signature from the hub — see [Interface catalog](#interface-catalog) |
86
87
  | `interface list [--hub <url>]` | list every registered interface coordinate — see [Interface catalog](#interface-catalog) |
@@ -2396,6 +2397,48 @@ needs a translation step.
2396
2397
  | `2` | the hub couldn't be resolved (no `--hub` and not exactly one stored hub) |
2397
2398
  | `3` | the human credential is missing or irrecoverable — the error names the remedy `owenloop login --hub <origin>` |
2398
2399
 
2400
+ ## Workflow catalog visibility
2401
+
2402
+ Use `owenloop catalog visibility <name> visible|hidden [--hub <url>]` to set
2403
+ whether one published workflow definition is shown in catalog discovery. The
2404
+ `catalog` namespace names the discovery surface directly; `defs` is local
2405
+ definition discovery and `workflow` would be ambiguous with workflow-instance
2406
+ coordinates.
2407
+
2408
+ The CLI sends `POST /api/set_workflow_catalog_visibility` with
2409
+ `{ "name": "<name>", "visible": true }` for `visible` and the same body with
2410
+ `false` for `hidden`. It accepts only those two state words and only requires
2411
+ that `<name>` is non-empty; definition-name syntax and existence remain hub
2412
+ decisions.
2413
+
2414
+ This changes catalog discovery only. It does not change exact-name reads,
2415
+ starts, call resolution, authorization, or existing instances. Each invocation
2416
+ sets one definition: it does not read state, list/filter definitions, or accept
2417
+ bulk or glob inputs.
2418
+
2419
+ The command resolves `--hub` first; without it, exactly one enumerable stored
2420
+ hub is required. It uses only the human/admin credential, and supports
2421
+ `OWENLOOP_CREDENTIAL_COMMAND` because it writes no local credential. Successful
2422
+ stdout is exactly one JSON document:
2423
+
2424
+ `{ "ok": true, "hub": "<origin>", "name": "<server name>", "catalogVisible": false, "previousCatalogVisible": true, "unchanged": false }`
2425
+
2426
+ The server-echoed fields are authoritative. `unchanged: false` means this call
2427
+ changed visibility; `unchanged: true` means it was already in the requested
2428
+ state. Both are successful exit-0 results. The hub's `text` field and unknown
2429
+ response fields are never printed.
2430
+
2431
+ An unknown definition surfaces the hub's non-empty message unchanged (for
2432
+ example, its `DefNotFoundError` message), with no raw error code or replacement
2433
+ body. Malformed successful responses leave stdout empty.
2434
+
2435
+ | code | meaning |
2436
+ |---|---|
2437
+ | `0` | visibility was set, including an idempotent repeat |
2438
+ | `1` | usage, runtime, hub, or malformed-response error |
2439
+ | `2` | the hub could not be resolved |
2440
+ | `3` | the human credential is missing or irrecoverable; stderr names `owenloop login --hub <origin>` |
2441
+
2399
2442
  ## Interface catalog
2400
2443
 
2401
2444
  The hub's interface catalog is an append-only registry of exact opaque
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.21",
3
+ "version": "0.5.22",
4
4
  "description": "Deterministic rails for agentic workflows. Declare steps and dependencies; the engine guarantees order, redoes what changes invalidate, and stops what keeps failing — instead of hoping the agent follows through.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "typicalday",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.21",
3
+ "version": "0.5.22",
4
4
  "description": "Claude Code driver for owenloop — cross-harness shift and conduct skills driven by the owenloop CLI, plus one hub control-plane MCP server backing an author skill and a fallback worker, for conducting and authoring workflows against your hosted owenloop server.",
5
5
  "author": {
6
6
  "name": "Typical Day"
@@ -7,7 +7,7 @@
7
7
  "mcp"
8
8
  ],
9
9
  "env": {
10
- "OWENLOOP_PLUGIN_VERSION": "0.5.21"
10
+ "OWENLOOP_PLUGIN_VERSION": "0.5.22"
11
11
  }
12
12
  }
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owenloop",
3
- "version": "0.5.21",
3
+ "version": "0.5.22",
4
4
  "description": "Codex plugin for the owenloop workflow engine.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./.mcp.json"
@@ -6,7 +6,7 @@
6
6
  "mcp"
7
7
  ],
8
8
  "env": {
9
- "OWENLOOP_PLUGIN_VERSION": "0.5.21"
9
+ "OWENLOOP_PLUGIN_VERSION": "0.5.22"
10
10
  },
11
11
  "env_vars": [
12
12
  "HOME",