agentful 0.4.43 → 0.4.44

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.cjs +12 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, tuiDesign, sym, ui;
3044
3044
  var init_branding = __esm({
3045
3045
  "src/branding.ts"() {
3046
3046
  "use strict";
3047
- VERSION = "0.4.43" ? "0.4.43" : null.version;
3047
+ VERSION = "0.4.44" ? "0.4.44" : null.version;
3048
3048
  brand = {
3049
3049
  name: "agentful",
3050
3050
  // the command users type
@@ -10896,6 +10896,14 @@ function writePulledBackendDeclaration(root, declaration) {
10896
10896
  (0, import_node_fs20.writeFileSync)(target, `${JSON.stringify(portableDeclaration, null, 2)}
10897
10897
  `, "utf8");
10898
10898
  }
10899
+ function explainPullRefusal(err2) {
10900
+ if (!(err2 instanceof ApiError) || err2.status !== 403) return err2;
10901
+ return new ApiError(
10902
+ 403,
10903
+ "pull_not_allowed",
10904
+ 'Only the person responsible for this project can pull it. If it is shared with you to view, `agentful open` shows the preview, and the app shows the code under "Shared with me".'
10905
+ );
10906
+ }
10899
10907
 
10900
10908
  // src/commands/pull.ts
10901
10909
  async function pullCommand(opts) {
@@ -10915,7 +10923,9 @@ async function pullCommand(opts) {
10915
10923
  request(
10916
10924
  `${PB_URL}/api/workspaces/${project.userId}/${project.projectId}`,
10917
10925
  { token: auth.pb_token, timeoutMs: 12e4 }
10918
- ),
10926
+ ).catch((err2) => {
10927
+ throw explainPullRefusal(err2);
10928
+ }),
10919
10929
  fetchBackendSessionState(auth, project.userId, project.projectId)
10920
10930
  ]);
10921
10931
  let written = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentful",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
4
4
  "description": "Agentful in your terminal — local development with push-to-cloud previews",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://agentful.dev",