passport-bridge 0.29.0 → 0.30.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/README.md CHANGED
@@ -293,9 +293,9 @@ The Passport plugin (`rsyed94/passport-plugins`) runs the same two hooks from th
293
293
  passport rules test "railway redeploy -e staging"
294
294
  passport rules test "rm -rf ~/"
295
295
  passport wait apr_123
296
- passport sessions # or: --all, --running, --production-changes
297
- passport sessions --project acme-api # the project's page, then its work
298
- passport sessions ses_123
296
+ passport tasks # or: --all, --running, --production-changes
297
+ passport tasks --project acme-api # the project's summary, then its work
298
+ passport tasks ses_123
299
299
  passport changes --env production --since 1h
300
300
  passport sync # or: passport sync --remove
301
301
  passport env # or: passport env set railway qa staging
@@ -173,8 +173,8 @@ export function noticeContext(notices, now) {
173
173
  return `- ${what}: approved by ${notice.approvedBy} ${span(now - notice.approvedAt)} ago (${when} UTC). The approval lapses in ${span(notice.expiresAt - now)}.`;
174
174
  });
175
175
  const lead = notices.length === 1
176
- ? "Passport: a command this session asked about earlier was approved after you stopped waiting. It hasn't run."
177
- : "Passport: commands this session asked about earlier were approved after you stopped waiting. They haven't run.";
176
+ ? "Passport: a command this task asked about earlier was approved after you stopped waiting. It hasn't run."
177
+ : "Passport: commands this task asked about earlier were approved after you stopped waiting. They haven't run.";
178
178
  return [
179
179
  lead,
180
180
  ...lines,
package/dist/cliArgs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const COMMANDS: readonly ["init", "login", "logout", "profiles", "use", "status", "doctor", "ready", "search", "describe", "run", "connect", "request", "resources", "prompts", "discover", "scan", "hook", "wait", "rules", "actions", "sessions", "changes", "env", "sync", "exec", "undo", "keys", "setup", "session", "access", "update", "completion", "help", "version"];
1
+ export declare const COMMANDS: readonly ["init", "login", "logout", "profiles", "use", "status", "doctor", "ready", "search", "describe", "run", "connect", "request", "resources", "prompts", "discover", "scan", "hook", "wait", "rules", "actions", "tasks", "changes", "env", "sync", "exec", "undo", "keys", "setup", "session", "access", "update", "completion", "help", "version"];
2
2
  export type Command = (typeof COMMANDS)[number];
3
3
  /** Old names that still run for one release, left out of help, completion,
4
4
  * and suggestions. `discover` is part of `scan` now. */
package/dist/cliArgs.js CHANGED
@@ -21,7 +21,7 @@ export const COMMANDS = [
21
21
  "wait",
22
22
  "rules",
23
23
  "actions",
24
- "sessions",
24
+ "tasks",
25
25
  "changes",
26
26
  "env",
27
27
  "sync",
@@ -93,13 +93,13 @@ const FLAGS = {
93
93
  "delegation-id": { kind: "value", commands: ["access"] },
94
94
  "client-id": { kind: "value", commands: ["access"] },
95
95
  environment: { kind: "value", commands: ["rules", "actions"] },
96
- status: { kind: "value", commands: ["sessions"] },
97
- all: { kind: "boolean", commands: ["sessions"] },
98
- running: { kind: "boolean", commands: ["sessions"] },
99
- "production-changes": { kind: "boolean", commands: ["sessions"] },
100
- project: { kind: "value", commands: ["sessions", "changes"] },
101
- pr: { kind: "value", commands: ["sessions", "changes"] },
102
- since: { kind: "value", commands: ["sessions", "changes"] },
96
+ status: { kind: "value", commands: ["tasks"] },
97
+ all: { kind: "boolean", commands: ["tasks"] },
98
+ running: { kind: "boolean", commands: ["tasks"] },
99
+ "production-changes": { kind: "boolean", commands: ["tasks"] },
100
+ project: { kind: "value", commands: ["tasks", "changes"] },
101
+ pr: { kind: "value", commands: ["tasks", "changes"] },
102
+ since: { kind: "value", commands: ["tasks", "changes"] },
103
103
  until: { kind: "value", commands: ["changes"] },
104
104
  env: { kind: "value", commands: ["changes"] },
105
105
  remove: { kind: "boolean", commands: ["sync", "keys"] },
@@ -144,8 +144,13 @@ function unknownOption(raw, command) {
144
144
  const where = command && command !== "help" ? `passport help ${command}` : "passport help";
145
145
  return new ArgError(`Unknown option "${raw}". See the options with ${where}.`);
146
146
  }
147
+ /** Old names that still run: `passport sessions` is `passport tasks`. */
148
+ const COMMAND_ALIASES = { sessions: "tasks" };
149
+ function commandNamed(value) {
150
+ return COMMANDS.includes(value) ? value : COMMAND_ALIASES[value];
151
+ }
147
152
  function knownCommand(value) {
148
- return COMMANDS.includes(value);
153
+ return commandNamed(value) !== undefined;
149
154
  }
150
155
  function flagParts(raw) {
151
156
  const body = raw.slice(2);
@@ -212,9 +217,9 @@ export function parseArgs(argv) {
212
217
  continue;
213
218
  }
214
219
  if (!command) {
215
- if (!knownCommand(raw))
220
+ command = commandNamed(raw);
221
+ if (!command)
216
222
  throw unknownCommand(raw);
217
- command = raw;
218
223
  }
219
224
  else {
220
225
  positionals.push(raw);
@@ -245,8 +250,12 @@ function settle(args) {
245
250
  if (command === "help" && positionals[0] !== undefined && !knownCommand(positionals[0]))
246
251
  throw unknownCommand(positionals[0], true);
247
252
  // `help keys add` shows the page for keys, which covers its subcommands.
248
- if (command === "help")
253
+ // `help sessions` shows the page for its new name, tasks.
254
+ if (command === "help") {
249
255
  positionals.splice(1);
256
+ if (positionals[0] !== undefined)
257
+ positionals[0] = commandNamed(positionals[0]);
258
+ }
250
259
  validateShape(command, positionals);
251
260
  validateNumbers(values);
252
261
  return { command, positionals, values, repeats, booleans };
@@ -270,7 +279,7 @@ function validateShape(command, positionals) {
270
279
  hook: 1,
271
280
  wait: 1,
272
281
  rules: 2,
273
- sessions: 1,
282
+ tasks: 1,
274
283
  changes: 0,
275
284
  env: 4,
276
285
  sync: 0,
@@ -17,7 +17,7 @@ import { failure, timeoutMs } from "./cliSupport.js";
17
17
  import { appName, clientName, count, list, oneOf, record, text, time, windowOf } from "./cliSessionsJson.js";
18
18
  import { countOf } from "./plural.js";
19
19
  import { joinParts, mark, visibleLength, wrap, termOf } from "./term.js";
20
- import { APPS_LINK, hashLink } from "./webLinks.js";
20
+ import { APPS_LINK, hashLink, workLink } from "./webLinks.js";
21
21
  const DATE = /^\d{4}-\d{2}-\d{2}$/;
22
22
  const RANGES = ["1h", "6h", "24h", "7d", "30d", "today"];
23
23
  const DEFAULT_SINCE = "7d";
@@ -332,20 +332,13 @@ export async function changes(args, runtime, deps = {}) {
332
332
  headers: { accept: "application/json" },
333
333
  signal: AbortSignal.any([runtime.signal, AbortSignal.timeout(timeoutMs(args))])
334
334
  });
335
- const page = changesOf(await json(response, "This Passport server doesn't list Production changes yet. Run: passport sessions --production-changes"));
335
+ const page = changesOf(await json(response, "This Passport server doesn't list Production changes yet. Run: passport tasks --production-changes"));
336
336
  const since = value(args, "since")?.trim() ?? DEFAULT_SINCE;
337
- const web = query({
338
- view: "production",
339
- since: filters.since,
340
- until: filters.until,
341
- project: filters.project,
342
- pr: filters.pr
343
- });
344
337
  return {
345
338
  json: page,
346
339
  human: renderChanges(page, term, now, since, {
347
340
  environments: hashLink(client.origin, APPS_LINK),
348
- more: hashLink(client.origin, `#sessions${web}`)
341
+ more: workLink(client.origin, "actions", { env: "production", since: filters.since, project: filters.project })
349
342
  })
350
343
  };
351
344
  }
@@ -79,7 +79,7 @@ export function problemFix(kind, client) {
79
79
  };
80
80
  case "coverage-drop":
81
81
  return {
82
- text: "Open the agent's sessions and look at what Passport couldn't tell.",
82
+ text: "Open the agent's tasks on Work and look at what Passport couldn't tell.",
83
83
  link: agent,
84
84
  docs: `${DOCS_BASE}/member/cli-hook#decided-placed-and-blind`
85
85
  };
package/dist/cliMain.js CHANGED
@@ -471,7 +471,7 @@ async function hook(args, runtime) {
471
471
  /** Commands that load their own module and need nothing else from here. */
472
472
  const LAZY_COMMANDS = {
473
473
  wait: async () => (await import("./cliWait.js")).wait,
474
- sessions: async () => (await import("./cliSessions.js")).sessions,
474
+ tasks: async () => (await import("./cliSessions.js")).sessions,
475
475
  changes: async () => (await import("./cliChanges.js")).changes,
476
476
  request: async () => (await import("./cliRequest.js")).request,
477
477
  sync: async () => (await import("./cliSync.js")).sync,
package/dist/cliOutput.js CHANGED
@@ -54,10 +54,10 @@ const EXAMPLES = {
54
54
  ["passport env", "Where commands in this folder land"],
55
55
  ["passport env set railway api production", "Place a resource for the workspace"]
56
56
  ],
57
- sessions: [
58
- ["passport sessions", "Work that needs a look, by project"],
59
- ["passport sessions --production-changes", "What changed Production this week"],
60
- ["passport sessions --project api --since 24h --all", "Every work item in one project today"]
57
+ tasks: [
58
+ ["passport tasks", "Work that needs a look, by project"],
59
+ ["passport tasks --production-changes", "What changed Production this week"],
60
+ ["passport tasks --project api --since 24h --all", "Every work item in one project today"]
61
61
  ],
62
62
  request: [
63
63
  [
@@ -149,9 +149,9 @@ function helpText(verb) {
149
149
  sync: "passport sync [--remove]\nAdds what your Autopilot rules run without asking (reads, and changes inside the project: tests, builds, formatters, git add, git commit) to each agent's own allowlist, so those prompts stop even offline and in Codex. Claude Code: permissions.allow in ~/.claude/settings.json. Codex: ~/.codex/rules/passport.rules. Cursor CLI: permissions.allow in ~/.cursor/cli-config.json; Cursor: terminalAllowlist in ~/.cursor/permissions.json when you keep one there. Deletes, installs, and Production never sync. Your own entries are never changed. Runs again on its own when your rules change.\n --remove take Passport's entries out and stop syncing\nJSON: {action,agents:[{agent,name,path,added,removed,skipped?}]}",
150
150
  // copy-style-allow double-space: help columns line up
151
151
  env: "passport env [--json]\npassport env set <vendor> <resource> <production|staging|development>\nShows where commands in this folder land, read the way each vendor's own CLI reads it: Railway, Vercel, Supabase, Wrangler, Netlify, Firebase, Convex, Neon, Fly, Heroku, kubectl, AWS, gcloud, Terraform, Stripe, and database URLs. One row per app: the resource, how Passport knows (linked, a flag, the vendor's default), and its environment. Anything Passport can't place counts as Production. Read on this computer; nothing is sent.\n set place a resource for the whole workspace. Admins choose any environment; everyone else can only say Production.\nJSON: {environments:[{vendor,resource,how,kind,assumed,note?}]}",
152
- sessions:
152
+ tasks:
153
153
  // copy-style-allow double-space: help columns line up
154
- "passport sessions [--all] [--running] [--production-changes] [--project <name>] [--pr <number>] [--since <when>] [--status running|ended]\npassport sessions <session-id>\nYour agents' work the way the Sessions page shows it: work items (a pull request or branch, every session on it rolled up) by project, each with its agents and what happened: actions, active time, failures, confirmed Production changes, unplaced changes, asks and how they ended, and how much Passport couldn't check. Notable work comes first; routine work folds into one line per project.\n --all every work item, routine ones too (pass one of --all, --running, --production-changes)\n --running work items with a running session\n --production-changes changes to confirmed Production, by app and target (7 days unless --since)\n --project <name> one project (repository, else folder)\n --pr <number> one pull request\n --since <when> today, 24h, 7d, 30d, 90d, or a date (YYYY-MM-DD)\n --status <status> running or ended sessions only\n <session-id> one session: its outcome and recent actions with what they acted on\nJSON: {view,groups:[{key,kind,label,apps,running,production,unplaced,items:[{key,title,project,branch,pull,agents,sessions,sessionIds,startedAt,lastActivityAt,activeMs,running,waiting,shape,reasons,severity,link}],routine}],totals,work,window,complete,nextCursor}; --production-changes: {view,sinceTs,untilTs,total,unplaced,window,apps:[{appKey,appName,count,lastTs,targets}]}; <session-id>: {view,session,outcome,approvals,timeline,nextCursor}",
154
+ "passport tasks [--all] [--running] [--production-changes] [--project <name>] [--pr <number>] [--since <when>] [--status running|ended]\npassport tasks <task-id>\nYour agents' tasks, as Work shows them: work items (a pull request or branch, every task on it rolled up) by project, each with its agents and what happened: actions, active time, failures, confirmed Production changes, unplaced changes, asks and how they ended, and how much Passport couldn't check. Notable work comes first; routine work folds into one line per project.\n --all every work item, routine ones too (pass one of --all, --running, --production-changes)\n --running work items with a running task\n --production-changes changes to confirmed Production, by app and target (7 days unless --since)\n --project <name> one project (repository, else folder)\n --pr <number> one pull request\n --since <when> today, 24h, 7d, 30d, 90d, or a date (YYYY-MM-DD)\n --status <status> running or ended tasks only\n <task-id> one task: its outcome and recent actions with what they acted on\nAlso runs as passport sessions.\nJSON: {view,groups:[{key,kind,label,apps,running,production,unplaced,items:[{key,title,project,branch,pull,agents,sessions,sessionIds,startedAt,lastActivityAt,activeMs,running,waiting,shape,reasons,severity,link}],routine}],totals,work,window,complete,nextCursor}; --production-changes: {view,sinceTs,untilTs,total,unplaced,window,apps:[{appKey,appName,count,lastTs,targets}]}; <task-id>: {view,session,outcome,approvals,timeline,nextCursor}",
155
155
  changes:
156
156
  // copy-style-allow double-space: help columns line up
157
157
  "passport changes [--env production] [--since <when>] [--until <date>] [--project <name>] [--pr <number>] [--app <key>] [--agent <id>]\nWhat your agents changed in Production, the list Sessions › Production changes shows: every change, delete, and irreversible action that ran on confirmed Production in the window, grouped by app, newest first. Each row has its time and command, then the agent, the person, the pull request (else branch), Failed or Approved, and whether Passport can undo it. Blocked and declined actions never reached Production and aren't listed; changes to targets nobody placed are one count.\n --env <env> production (the only one for now)\n --since <when> 1h, 6h, 24h, 7d (default), 30d, today, or a date (YYYY-MM-DD)\n --until <date> through the end of a date (YYYY-MM-DD)\n --project <name> one project (repository, else folder)\n --pr <number> one pull request\n --app <key> one app, or several separated by commas\n --agent <id> one agent (claude-code, codex, cursor)\nJSON: {view,environment,sinceTs,untilTs,total,unplaced,complete,window,apps:[{vendor,appName,changes:[{id,ts,person,agent,agentName,appKey,vendor,appName,command,target,actionClass,result,approved,sessionId,project,branch,pull,undo}]}]}",
@@ -220,7 +220,7 @@ Commands:
220
220
  rules Test what Autopilot decides for a command
221
221
  actions Tell Passport what a project script does
222
222
  env Show where commands in this folder land
223
- sessions Your agents' work: what needs a look, and Production changes
223
+ tasks Your agents' tasks: what needs a look, and Production changes
224
224
  changes What your agents changed in Production, one row each
225
225
  sync Keep your agents' own allowlists in line with your rules
226
226
  exec Run a vendor CLI with a key Passport holds
@@ -106,7 +106,7 @@ export function renderProject(project, term) {
106
106
  blocks.push([
107
107
  project.project,
108
108
  ...joinParts([
109
- countOf(project.totals.sessions, "session"),
109
+ countOf(project.totals.sessions, "task"),
110
110
  ...(project.totals.running ? [`${project.totals.running.toLocaleString("en-US")} running`] : []),
111
111
  ...(project.window ? [project.window.label] : [])
112
112
  ], term.width)
@@ -1,16 +1,16 @@
1
1
  /**
2
- * `passport sessions`: your agents' work the way the Sessions page shows it
3
- * (Sessions Phase 2, shared/workItemContract.ts).
2
+ * `passport tasks` (also `passport sessions`): your agents' tasks the way
3
+ * Work shows them (shared/workItemContract.ts).
4
4
  *
5
- * passport sessions Notable work items by project; routine
6
- * ones fold into one line per project
7
- * passport sessions --all every work item
8
- * passport sessions --running work items with a running session
9
- * passport sessions --production-changes the Production changes ledger
10
- * passport sessions --project <name> the project's page first: where its
11
- * targets are placed, its rules, and
12
- * its Production changes this week
13
- * passport sessions <id> one session: its outcome and recent timeline
5
+ * passport tasks Notable work items by project; routine
6
+ * ones fold into one line per project
7
+ * passport tasks --all every work item
8
+ * passport tasks --running work items with a running task
9
+ * passport tasks --production-changes the Production changes ledger
10
+ * passport tasks --project <name> the project's summary first: where its
11
+ * targets are placed, its rules, and
12
+ * its Production changes this week
13
+ * passport tasks <id> one task: its outcome and recent timeline
14
14
  *
15
15
  * `--project`, `--pr`, `--since`, and `--status` narrow on the server
16
16
  * (`GET /api/my/work-items`, `/api/my/production-ledger`), never on a loaded
@@ -1,16 +1,16 @@
1
1
  /**
2
- * `passport sessions`: your agents' work the way the Sessions page shows it
3
- * (Sessions Phase 2, shared/workItemContract.ts).
2
+ * `passport tasks` (also `passport sessions`): your agents' tasks the way
3
+ * Work shows them (shared/workItemContract.ts).
4
4
  *
5
- * passport sessions Notable work items by project; routine
6
- * ones fold into one line per project
7
- * passport sessions --all every work item
8
- * passport sessions --running work items with a running session
9
- * passport sessions --production-changes the Production changes ledger
10
- * passport sessions --project <name> the project's page first: where its
11
- * targets are placed, its rules, and
12
- * its Production changes this week
13
- * passport sessions <id> one session: its outcome and recent timeline
5
+ * passport tasks Notable work items by project; routine
6
+ * ones fold into one line per project
7
+ * passport tasks --all every work item
8
+ * passport tasks --running work items with a running task
9
+ * passport tasks --production-changes the Production changes ledger
10
+ * passport tasks --project <name> the project's summary first: where its
11
+ * targets are placed, its rules, and
12
+ * its Production changes this week
13
+ * passport tasks <id> one task: its outcome and recent timeline
14
14
  *
15
15
  * `--project`, `--pr`, `--since`, and `--status` narrow on the server
16
16
  * (`GET /api/my/work-items`, `/api/my/production-ledger`), never on a loaded
@@ -22,7 +22,7 @@ import { bool, value } from "./cliArgs.js";
22
22
  import { api, json } from "./cliAutopilot.js";
23
23
  import { failure, timeoutMs } from "./cliSupport.js";
24
24
  import { termOf } from "./term.js";
25
- import { APPS_LINK, hashLink } from "./webLinks.js";
25
+ import { APPS_LINK, hashLink, workLink } from "./webLinks.js";
26
26
  import { count, ID, ledgerOf, list, mergeGroups, record, sessionOf, text, windowOf, workCountsOf, workGroupOf } from "./cliSessionsJson.js";
27
27
  import { renderLedger, renderSession, renderWork } from "./cliSessionsRender.js";
28
28
  import { projectOf, renderProject } from "./cliProjectSummary.js";
@@ -106,7 +106,7 @@ async function projectSummary(client, name, args, runtime, range = {}) {
106
106
  // The page counts over the same window as the work list (--since).
107
107
  const window = query({ since: range.since });
108
108
  const raw = await read(client, `/api/my/projects/${encodeURIComponent(name)}${window}`, args, runtime, "No project.");
109
- return projectOf(raw, hashLink(client.origin, `#projects/${encodeURIComponent(name)}${window}`));
109
+ return projectOf(raw, workLink(client.origin, "history", { project: name, since: range.since }));
110
110
  }
111
111
  catch {
112
112
  return null;
@@ -120,9 +120,9 @@ export async function sessions(args, runtime, deps = {}) {
120
120
  return failure("Pass one of --all, --running, or --production-changes.", 6, "usage");
121
121
  if (id !== undefined &&
122
122
  (views.length || ["project", "pr", "since", "status"].some((flag) => value(args, flag) !== undefined)))
123
- return failure("A session id takes no filters. Run: passport sessions <id>", 6, "usage");
123
+ return failure("A task id takes no filters. Run: passport tasks <id>", 6, "usage");
124
124
  if (id !== undefined && !ID.test(id))
125
- return failure("That isn't a session id.", 6, "usage");
125
+ return failure("That isn't a task id.", 6, "usage");
126
126
  const filters = id === undefined ? filtersOf(args, now) : {};
127
127
  if (views[0] === "production-changes" && filters.status)
128
128
  return failure("--status lists work items; Production changes take --project, --pr, and --since.", 6, "usage");
@@ -172,13 +172,9 @@ export async function sessions(args, runtime, deps = {}) {
172
172
  const project = view === "notable" && filters.project && !filters.pr && !filters.status
173
173
  ? await projectSummary(client, filters.project, args, runtime, { since: filters.since })
174
174
  : null;
175
- const webQuery = query({
176
- ...(view === "notable" ? {} : { view }),
177
- project: filters.project,
178
- pr: filters.pr,
179
- since: value(args, "since")
180
- });
181
- const more = cursor ? hashLink(client.origin, `#sessions${webQuery}`) : null;
175
+ const more = cursor
176
+ ? workLink(client.origin, "history", { project: filters.project, since: value(args, "since") })
177
+ : null;
182
178
  const filtered = Object.keys(filters).length > 0;
183
179
  const work = renderWork(result, term, filtered, more);
184
180
  return project
@@ -5,7 +5,7 @@
5
5
  * out; a missing count reads 0.
6
6
  */
7
7
  import { isEnvKind } from "./cliHookEnvironment.js";
8
- import { hashLink, sessionLink } from "./webLinks.js";
8
+ import { taskLink, workLink } from "./webLinks.js";
9
9
  export function text(raw, max = 200) {
10
10
  if (typeof raw !== "string")
11
11
  return undefined;
@@ -157,11 +157,6 @@ function itemTitle(key, branch, pull, agents) {
157
157
  return clientName(agents[0]?.client ?? "agent");
158
158
  return "No branch";
159
159
  }
160
- /** A work item's own page in Passport: its project's branch, or the
161
- * project's work with no branch. */
162
- function itemHash(project, branch) {
163
- return `#projects/${encodeURIComponent(project)}/work${branch ? `?branch=${encodeURIComponent(branch)}` : ""}`;
164
- }
165
160
  export function workItemOf(raw, origin) {
166
161
  const item = record(raw);
167
162
  const key = text(item.key, 300) ?? "none";
@@ -194,7 +189,7 @@ export function workItemOf(raw, origin) {
194
189
  shape: shapeOf(item.shape),
195
190
  reasons,
196
191
  severity: oneOf(item.severity, ["failed", "asked", "production"]),
197
- link: one ? sessionLink(origin, sessionIds[0]) : project ? hashLink(origin, itemHash(project, branch)) : null
192
+ link: one ? taskLink(origin, sessionIds[0]) : project ? workLink(origin, "history", { project }) : null
198
193
  };
199
194
  }
200
195
  export function workGroupOf(raw, origin) {
@@ -336,7 +331,7 @@ export function sessionOf(raw, origin) {
336
331
  unchecked: count(session.unchecked),
337
332
  waiting: count(session.waiting),
338
333
  asks: session.asks === undefined ? null : asksOf(session.asks),
339
- link: sessionLink(origin, id)
334
+ link: taskLink(origin, id)
340
335
  },
341
336
  outcome: outcome
342
337
  ? {
@@ -156,7 +156,7 @@ export function renderWork(page, term, filtered, more) {
156
156
  return "Nothing is running.";
157
157
  if (page.view === "notable" && page.totals.items)
158
158
  return "Nothing needs a look.";
159
- return "No sessions yet. Start your agent and its actions will show up here.";
159
+ return "No tasks yet. Start your agent and its actions will show up here.";
160
160
  }
161
161
  const sections = page.groups.map((group) => {
162
162
  const lines = joinParts(groupHeading(group), term.width);
@@ -171,9 +171,9 @@ export function renderWork(page, term, filtered, more) {
171
171
  });
172
172
  const notes = [];
173
173
  if (page.view === "notable" && page.groups.some((group) => group.routine?.count))
174
- notes.push("Routine work is folded.\nRun: passport sessions --all");
174
+ notes.push("Routine work is folded.\nRun: passport tasks --all");
175
175
  if (!page.complete)
176
- notes.push("Only the latest sessions were read. Narrow it with --since or --project.");
176
+ notes.push("Only the latest tasks were read. Narrow it with --since or --project.");
177
177
  if (more)
178
178
  notes.push(`More work in Passport: ${more}`);
179
179
  // The server's window after its counts ("Last 7 days"); an older server sent none.
package/dist/cliWait.js CHANGED
@@ -29,7 +29,7 @@ function approvedLine(lead, scope) {
29
29
  if (!/^Approved\b.*\.$/.test(lead))
30
30
  return lead;
31
31
  if (scope === "session") {
32
- return lead.replace(/\.$/, " for this session. Matching commands in this session run without asking.");
32
+ return lead.replace(/\.$/, " for this task. Matching commands in this task run without asking.");
33
33
  }
34
34
  if (scope === "rule")
35
35
  return lead.replace(/\.$/, " and saved as a rule.");
@@ -21,7 +21,7 @@ const DESCRIPTIONS = {
21
21
  wait: "Wait for a person to decide an approval request",
22
22
  rules: "Test what Autopilot decides for a command",
23
23
  actions: "Tell Passport what a project script does",
24
- sessions: "Your agents' work: what needs a look, and Production changes",
24
+ tasks: "Your agents' tasks: what needs a look, and Production changes",
25
25
  changes: "What your agents changed in Production, one row each",
26
26
  env: "Show where commands in this folder land",
27
27
  sync: "Keep your agents' own allowlists in line with your rules",
@@ -65,7 +65,7 @@ const COMMAND_FLAGS = {
65
65
  setup: ["--agent", "--apply"],
66
66
  hook: ["--agent", "--guard", "--apply"],
67
67
  rules: ["--environment"],
68
- sessions: ["--all", "--running", "--production-changes", "--project", "--pr", "--since", "--status"],
68
+ tasks: ["--all", "--running", "--production-changes", "--project", "--pr", "--since", "--status"],
69
69
  changes: ["--env", "--since", "--until", "--project", "--pr", "--app", "--agent"],
70
70
  sync: ["--remove"],
71
71
  exec: ["--wait", "--ask-again", "--verbose", "--agent", "--session", "--mask", "--no-masking"],
package/dist/initOutro.js CHANGED
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * How `passport init` ends: a ✓ list of what's true now and what's left for
3
- * the person, then one next command.
3
+ * the person, then one next step.
4
4
  *
5
5
  * Done.
6
6
  * ✓ Passport added to Claude Code and Cursor
7
7
  * ! Railway connects to Passport once you finish signing in
8
8
  *
9
- * Next: passport status
9
+ * Next: ask your agent to do something. Its work shows up on Work:
10
+ * https://passportmcp.com/#work
10
11
  */
11
12
  import { EXEC_TOKEN_PAGES, EXEC_VENDOR_NAMES } from "./execVendors.js";
12
13
  import { AGENT_NAMES } from "./initAgents.js";
@@ -17,6 +18,7 @@ import { desktopLine } from "./initLocalSteps.js";
17
18
  import { TRY_IT, appLabel } from "./initState.js";
18
19
  import { listOf } from "./initUi.js";
19
20
  import { wrap } from "./term.js";
21
+ import { hashLink } from "./webLinks.js";
20
22
  const done = (text) => ({ mark: "done", text });
21
23
  const warn = (text) => ({ mark: "warn", text });
22
24
  /** Apps this run connected, left waiting for a sign-in, skipped, or sent to an admin. */
@@ -113,8 +115,9 @@ function agentFollowUps(s) {
113
115
  }
114
116
  return items;
115
117
  }
116
- /** The one next command: put passport on PATH, finish app sign-ins, try an
117
- * agent, or check status. A command is never wrapped. */
118
+ /** The one next step: put passport on PATH, finish app sign-ins, try an
119
+ * agent, or watch its work on Work, the page a new person's Get started is
120
+ * waiting on. A command or link is never wrapped. */
118
121
  function nextCommand(s, waiting) {
119
122
  const stable = s.stable;
120
123
  if (stable?.binDir && !stable.onPath) {
@@ -130,7 +133,10 @@ function nextCommand(s, waiting) {
130
133
  const ask = app ? TRY_IT[app] : "list your Passport tools";
131
134
  return wrap(`Next: in Claude Code, run /mcp to sign in, then ask it to ${ask}.`, s.terminal.width);
132
135
  }
133
- return ["Run: passport status"];
136
+ const work = hashLink(s.gateway?.origin, "#work");
137
+ if (!work)
138
+ return ["Run: passport status"];
139
+ return [...wrap("Next: ask your agent to do something. Its work shows up on Work:", s.terminal.width), work];
134
140
  }
135
141
  /** What to do next about PATH: the step, then the command on its own line. */
136
142
  export function pathNext(line, width) {
@@ -4,4 +4,4 @@
4
4
  * the version, then runs `npm run set-version -- <version>` in the plugin repo
5
5
  * and pushes (docs/RELEASING.md). `pluginPin.test.ts` fails when it drifts.
6
6
  */
7
- export declare const PLUGIN_PIN = "0.29.0";
7
+ export declare const PLUGIN_PIN = "0.30.0";
package/dist/pluginPin.js CHANGED
@@ -4,4 +4,4 @@
4
4
  * the version, then runs `npm run set-version -- <version>` in the plugin repo
5
5
  * and pushes (docs/RELEASING.md). `pluginPin.test.ts` fails when it drifts.
6
6
  */
7
- export const PLUGIN_PIN = "0.29.0";
7
+ export const PLUGIN_PIN = "0.30.0";
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.29.0";
1
+ export declare const VERSION = "0.30.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Keep in lockstep with bridge/package.json.
2
- export const VERSION = "0.29.0";
2
+ export const VERSION = "0.30.0";
@@ -1,6 +1,9 @@
1
1
  /** `https://passportmcp.com` from an endpoint or origin, or null. */
2
2
  export declare function webOrigin(endpointOrOrigin: string | undefined): string | null;
3
- export declare function sessionLink(origin: string | undefined, sessionId: string | undefined): string | null;
3
+ export declare function taskLink(origin: string | undefined, sessionId: string | undefined): string | null;
4
+ /** Work's History (`view: "history"`) or Actions (`view: "actions"`), with the
5
+ * filters the web reads; empty values are left out. */
6
+ export declare function workLink(origin: string | undefined, view: "history" | "actions", filters?: Partial<Record<"project" | "since" | "env", string | undefined>>): string | null;
4
7
  export declare function approvalLink(origin: string | undefined, approvalId: string | undefined, workspaceId?: string): string | null;
5
8
  /** A page the server named by its hash (`#apps/railway/access`), or null. */
6
9
  export declare function hashLink(origin: string | undefined, hash: unknown): string | null;
package/dist/webLinks.js CHANGED
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Links into the Passport web app for things the CLI names: a session, an
3
- * approval, a rule. The web app is served from the same origin as the profile's
4
- * endpoint, and routes by hash:
2
+ * Links into the Passport web app for things the CLI names: a task, an ask, a
3
+ * rule. The web app is served from the same origin as the profile's endpoint,
4
+ * and routes by hash:
5
5
  *
6
- * #sessions/<sessionId>
7
- * #approvals?approval=<id>&workspace=<workspaceId> (focus needs both)
6
+ * #work/<sessionId> one task
7
+ * #work?focus=<approvalId> one ask, opened on Work
8
+ * #work?view=history&project=<name> a list of tasks (workLink)
8
9
  * #rules?rule=<ruleId>
9
10
  *
10
11
  * Each returns null when the origin or id is unusable, so callers print a link
@@ -26,18 +27,30 @@ export function webOrigin(endpointOrOrigin) {
26
27
  function usable(id) {
27
28
  return typeof id === "string" && ID.test(id);
28
29
  }
29
- export function sessionLink(origin, sessionId) {
30
+ export function taskLink(origin, sessionId) {
30
31
  const base = webOrigin(origin);
31
- return base && usable(sessionId) ? `${base}/#sessions/${encodeURIComponent(sessionId)}` : null;
32
+ return base && usable(sessionId) ? `${base}/#work/${encodeURIComponent(sessionId)}` : null;
33
+ }
34
+ /** Work's History (`view: "history"`) or Actions (`view: "actions"`), with the
35
+ * filters the web reads; empty values are left out. */
36
+ export function workLink(origin, view, filters = {}) {
37
+ const base = webOrigin(origin);
38
+ if (!base)
39
+ return null;
40
+ const params = new URLSearchParams({ view });
41
+ for (const [key, value] of Object.entries(filters))
42
+ if (value)
43
+ params.set(key, value);
44
+ return `${base}/#work?${params.toString()}`;
32
45
  }
33
46
  export function approvalLink(origin, approvalId, workspaceId) {
34
47
  const base = webOrigin(origin);
35
48
  if (!base || !usable(approvalId))
36
49
  return null;
37
- const params = new URLSearchParams({ approval: approvalId });
50
+ const params = new URLSearchParams({ focus: approvalId });
38
51
  if (usable(workspaceId))
39
52
  params.set("workspace", workspaceId);
40
- return `${base}/#approvals?${params.toString()}`;
53
+ return `${base}/#work?${params.toString()}`;
41
54
  }
42
55
  /** A page the server named by its hash (`#apps/railway/access`), or null. */
43
56
  export function hashLink(origin, hash) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "passport-bridge",
9
- "version": "0.29.0",
9
+ "version": "0.30.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "1.32.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Passport CLI for governed terminal and CI agents, plus the local stdio-to-cloud MCP bridge.",
5
5
  "license": "MIT",
6
6
  "repository": {