@todoforai/cli 0.1.50 → 0.1.51

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.
@@ -42926,6 +42926,15 @@ class ApiClient {
42926
42926
  upsertProjectGroup(projectId, slug, fields) {
42927
42927
  return this.request("PUT", `/api/v1/projects/${projectId}/groups/${encodeURIComponent(slug)}`, { projectId, slug, ...fields });
42928
42928
  }
42929
+ listProjectSurfaces(projectId) {
42930
+ return this.request("GET", `/api/v1/projects/${projectId}/surfaces`);
42931
+ }
42932
+ upsertProjectSurface(projectId, surfaceId, fields) {
42933
+ return this.request("PUT", `/api/v1/projects/${projectId}/surfaces/${encodeURIComponent(surfaceId)}`, { projectId, surfaceId, ...fields });
42934
+ }
42935
+ deleteProjectSurface(projectId, surfaceId) {
42936
+ return this.request("DELETE", `/api/v1/projects/${projectId}/surfaces/${encodeURIComponent(surfaceId)}`, { projectId, surfaceId });
42937
+ }
42929
42938
  reorderProjectGroups(projectId, slugs) {
42930
42939
  return this.request("PUT", `/api/v1/projects/${projectId}/groups-order`, { projectId, slugs });
42931
42940
  }
@@ -43729,6 +43738,9 @@ var SERVER_TO_FRONTENDS = {
43729
43738
  hexGrid: {
43730
43739
  updated: (projectId) => `${"hexgrid:updated" /* HEXGRID_UPDATED */}:${projectId}`
43731
43740
  },
43741
+ surfaces: {
43742
+ updated: (projectId) => `${"project:surfaces_updated" /* PROJECT_SURFACES_UPDATED */}:${projectId}`
43743
+ },
43732
43744
  killSwitch: {
43733
43745
  changed: (projectId) => `${"project:kill_switch" /* KILL_SWITCH */}:${projectId}`
43734
43746
  },
@@ -44393,6 +44405,10 @@ var TOPICS = {
44393
44405
  channel: (p) => SERVER_TO_FRONTENDS.hexGrid.updated(p.projectId),
44394
44406
  audience: "frontend"
44395
44407
  },
44408
+ ["project:surfaces_updated" /* PROJECT_SURFACES_UPDATED */]: {
44409
+ channel: (p) => SERVER_TO_FRONTENDS.surfaces.updated(p.projectId),
44410
+ audience: "frontend"
44411
+ },
44396
44412
  ["project:kill_switch" /* KILL_SWITCH */]: {
44397
44413
  channel: (p) => SERVER_TO_FRONTENDS.killSwitch.changed(p.projectId),
44398
44414
  audience: "frontend"
@@ -44533,7 +44549,7 @@ import { parseArgs } from "util";
44533
44549
  // package.json
44534
44550
  var package_default = {
44535
44551
  name: "@todoforai/cli",
44536
- version: "0.1.50",
44552
+ version: "0.1.51",
44537
44553
  type: "module",
44538
44554
  bin: {
44539
44555
  "todoforai-cli": "bin/todoforai-cli.js",
@@ -47853,11 +47869,18 @@ Usage:
47853
47869
  tfa-cli project groups List todo groups
47854
47870
  tfa-cli project groups set <slug> <field=value>… Create/update a group: name description pinned archived order
47855
47871
  tfa-cli project groups reorder <slug>… Set wall order
47872
+ tfa-cli project surfaces List the board's card surfaces (live refs shown as cards)
47873
+ tfa-cli project surfaces set <id> ref=<ref> [title=…] [group=<slug>] [order=N]
47874
+ Show a ref on the board: a todo id, <todoId>:<alias>
47875
+ (shown artifact) or an http(s) url. group= puts it
47876
+ inside that group's card; group="" makes it standalone.
47877
+ tfa-cli project surfaces rm <id> Take it off the board
47856
47878
 
47857
47879
  Examples:
47858
47880
  tfa-cli project set name="Q4 launch"
47859
47881
  tfa-cli project groups set marketing name=Marketing description="Top-of-funnel work"
47860
47882
  tfa-cli project groups reorder marketing sales ops
47883
+ tfa-cli project surfaces set weekly-kpis ref=$TODOFORAI_TODO_ID:kpi title="Weekly KPIs" group=marketing
47861
47884
  `);
47862
47885
  }
47863
47886
  var TODO_ALIASES = {
@@ -48010,6 +48033,43 @@ async function projectCommand(api, positionals, args) {
48010
48033
  }
48011
48034
  fail(`Unknown 'project groups' verb: ${verb}`);
48012
48035
  }
48036
+ if (sub === "surfaces") {
48037
+ const [verb, ...sargs] = rest;
48038
+ if (!verb) {
48039
+ const surfaces = await api.listProjectSurfaces(projectId);
48040
+ if (args.json) {
48041
+ console.log(JSON.stringify(surfaces, null, 2));
48042
+ return;
48043
+ }
48044
+ for (const s of surfaces)
48045
+ process.stderr.write(`${s.id} ${s.ref} ${DIM}${[s.title, s.group && `in ${s.group}`].filter(Boolean).join(" ")}${RESET}
48046
+ `);
48047
+ return;
48048
+ }
48049
+ if (verb === "set") {
48050
+ const [id, ...fields] = sargs;
48051
+ if (!id)
48052
+ fail("Usage: tfa-cli project surfaces set <id> ref=<ref> [title=…] [group=<slug>] [order=N]");
48053
+ const surface = await api.upsertProjectSurface(projectId, id, parseAssignments2(fields));
48054
+ if (args.json) {
48055
+ console.log(JSON.stringify(surface, null, 2));
48056
+ return;
48057
+ }
48058
+ process.stderr.write(`${GREEN}✅ surface ${id} shows ${surface.ref}${surface.group ? ` in ${surface.group}` : ""}${RESET}
48059
+ `);
48060
+ return;
48061
+ }
48062
+ if (verb === "rm") {
48063
+ const [id] = sargs;
48064
+ if (!id)
48065
+ fail("Usage: tfa-cli project surfaces rm <id>");
48066
+ await api.deleteProjectSurface(projectId, id);
48067
+ process.stderr.write(`${GREEN}✅ surface ${id} removed${RESET}
48068
+ `);
48069
+ return;
48070
+ }
48071
+ fail(`Unknown 'project surfaces' verb: ${verb}`);
48072
+ }
48013
48073
  fail(`Unknown 'project' subcommand: ${sub}`);
48014
48074
  }
48015
48075
  function printBrandHelp() {
@@ -69765,6 +69825,22 @@ var zUsageUpdate = object({
69765
69825
  return;
69766
69826
  })
69767
69827
  });
69828
+ var zNoticeSeverity = union([
69829
+ literal("info"),
69830
+ literal("warning"),
69831
+ literal("error"),
69832
+ string2()
69833
+ ]);
69834
+ var zNotice = object({
69835
+ severity: zNoticeSeverity,
69836
+ title: string2().min(1),
69837
+ description: defaultOnError(string2().nullish(), () => {
69838
+ return;
69839
+ }),
69840
+ _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
69841
+ return;
69842
+ })
69843
+ });
69768
69844
  var zCompactionId = string2();
69769
69845
  var zCompactionStatus = union([
69770
69846
  literal("in_progress"),
@@ -69833,6 +69909,9 @@ var zSessionUpdate = union([
69833
69909
  zUsageUpdate.and(object({
69834
69910
  sessionUpdate: literal("usage_update")
69835
69911
  })),
69912
+ zNotice.and(object({
69913
+ sessionUpdate: literal("notice")
69914
+ })),
69836
69915
  zCompactionUpdate.and(object({
69837
69916
  sessionUpdate: literal("compaction_update")
69838
69917
  })),
@@ -69894,6 +69973,7 @@ var zSessionConfigOptionsCapabilities = object({
69894
69973
  return;
69895
69974
  })
69896
69975
  });
69976
+ var zNoticeCapabilities = record(string2(), unknown());
69897
69977
  var zClientSessionCapabilities = object({
69898
69978
  compaction: defaultOnError(zCompactionCapabilities.nullish(), () => {
69899
69979
  return;
@@ -69901,6 +69981,9 @@ var zClientSessionCapabilities = object({
69901
69981
  configOptions: defaultOnError(zSessionConfigOptionsCapabilities.nullish(), () => {
69902
69982
  return;
69903
69983
  }),
69984
+ notices: defaultOnError(zNoticeCapabilities.nullish(), () => {
69985
+ return;
69986
+ }),
69904
69987
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
69905
69988
  return;
69906
69989
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/cli",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "todoforai-cli": "bin/todoforai-cli.js",