replicas-cli 0.3.224 → 0.3.226

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 +118 -99
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -18056,11 +18056,108 @@ Keep it under 250 words plus the lists. Do not paste the hooks or system prompt
18056
18056
  }
18057
18057
  });
18058
18058
 
18059
+ // ../shared/src/runtime-env.ts
18060
+ function shellQuotePosix(value) {
18061
+ return `'${value.split("'").join("'\\''")}'`;
18062
+ }
18063
+ function serializePosixEnvFile(env, unsetKeys = []) {
18064
+ return `${[
18065
+ ...[...unsetKeys].map((key) => `unset ${key}`),
18066
+ ...Object.entries(env).filter(([, value]) => value.length > 0).map(([key, value]) => `export ${key}=${shellQuotePosix(value)}`)
18067
+ ].join("\n")}
18068
+ `;
18069
+ }
18070
+ function parsePosixEnvUnsetKeys(content) {
18071
+ return content.split("\n").filter((line) => line.startsWith("unset ")).map((line) => line.slice("unset ".length).trim());
18072
+ }
18073
+ function parsePosixEnvFile(content) {
18074
+ const result = {};
18075
+ let pos = 0;
18076
+ while (pos < content.length) {
18077
+ let lineStart;
18078
+ if (pos === 0 || content[pos - 1] === "\n") {
18079
+ lineStart = pos;
18080
+ } else {
18081
+ const nl2 = content.indexOf("\n", pos);
18082
+ if (nl2 === -1) break;
18083
+ lineStart = nl2 + 1;
18084
+ }
18085
+ if (!content.startsWith("export ", lineStart)) {
18086
+ const nl2 = content.indexOf("\n", lineStart);
18087
+ if (nl2 === -1) break;
18088
+ pos = nl2 + 1;
18089
+ continue;
18090
+ }
18091
+ const nameStart = lineStart + "export ".length;
18092
+ const eqIdx = content.indexOf("=", nameStart);
18093
+ if (eqIdx === -1) break;
18094
+ const name = content.slice(nameStart, eqIdx).trim();
18095
+ let cursor = eqIdx + 1;
18096
+ if (content[cursor] !== "'") {
18097
+ const nl2 = content.indexOf("\n", cursor);
18098
+ pos = nl2 === -1 ? content.length : nl2 + 1;
18099
+ continue;
18100
+ }
18101
+ cursor += 1;
18102
+ let value = "";
18103
+ let closed = false;
18104
+ while (cursor < content.length) {
18105
+ const ch = content[cursor];
18106
+ if (ch === "'") {
18107
+ if (content.startsWith("\\''", cursor + 1)) {
18108
+ value += "'";
18109
+ cursor += 4;
18110
+ continue;
18111
+ }
18112
+ cursor += 1;
18113
+ closed = true;
18114
+ break;
18115
+ }
18116
+ value += ch;
18117
+ cursor += 1;
18118
+ }
18119
+ if (closed && name) {
18120
+ result[name] = value;
18121
+ }
18122
+ const nl = content.indexOf("\n", cursor);
18123
+ pos = nl === -1 ? content.length : nl + 1;
18124
+ }
18125
+ return result;
18126
+ }
18127
+ var init_runtime_env = __esm({
18128
+ "../shared/src/runtime-env.ts"() {
18129
+ "use strict";
18130
+ }
18131
+ });
18132
+
18133
+ // ../shared/src/engine/environment.ts
18134
+ var ENGINE_PORT;
18135
+ var init_environment2 = __esm({
18136
+ "../shared/src/engine/environment.ts"() {
18137
+ "use strict";
18138
+ init_type_guards();
18139
+ ENGINE_PORT = 3737;
18140
+ }
18141
+ });
18142
+
18143
+ // ../shared/src/git.ts
18144
+ var GIT_CREDENTIAL_HELPER_FILENAME;
18145
+ var init_git = __esm({
18146
+ "../shared/src/git.ts"() {
18147
+ "use strict";
18148
+ init_url();
18149
+ init_runtime_env();
18150
+ init_environment2();
18151
+ GIT_CREDENTIAL_HELPER_FILENAME = ".git-credential-replicas";
18152
+ }
18153
+ });
18154
+
18059
18155
  // ../shared/src/default-skills/replicas-agent/abilities/github.ts
18060
18156
  var SECTION4, REFERENCE4, GITHUB_ABILITY;
18061
18157
  var init_github2 = __esm({
18062
18158
  "../shared/src/default-skills/replicas-agent/abilities/github.ts"() {
18063
18159
  "use strict";
18160
+ init_git();
18064
18161
  SECTION4 = `### GitHub
18065
18162
  Use the pre-authenticated \`gh\` CLI for repository workflows and the workspace-scoped TypeScript SDK for GitHub API calls.
18066
18163
 
@@ -18071,7 +18168,8 @@ Use this when:
18071
18168
  - You're opening pull requests that build on each other (a stack)
18072
18169
  - You need to interact with GitHub issues or actions
18073
18170
  - You need to use the GitHub API for advanced operations
18074
- - You need to include images in PR descriptions`;
18171
+ - You need to include images in PR descriptions
18172
+ - Pushing or opening a pull request failed`;
18075
18173
  REFERENCE4 = `# GitHub Integration
18076
18174
 
18077
18175
  This guide covers how to interact with GitHub from within your Replicas workspace. Prefer \`@replicas/sdk\` for API calls so batching and data processing stay in one TypeScript program. The \`gh\` CLI remains useful for ergonomic pull request and git-adjacent workflows.
@@ -18111,6 +18209,14 @@ gh pr checks 123
18111
18209
  gh pr merge 123
18112
18210
  \`\`\`
18113
18211
 
18212
+ ### When pushing or opening a pull request fails
18213
+
18214
+ Tell the person the real cause and the real fix, not a guess. Check \`git remote -v\`, \`git config --show-origin --get-all credential.helper\`, and \`gh auth status\` first.
18215
+
18216
+ - **The Replicas credential helper says this workspace has no credentials for the repository:** the repository isn't in the workspace's environment, so this workspace can't push to it even if you cloned it yourself. Say so, and that a workspace on an environment that includes the repository can make the change. When it says it has no credentials for the whole host, check \`~/.replicas/logs\` for a failed GitHub token refresh before choosing a cause.
18217
+ - **\`Resource not accessible by integration\`, or a 403 or 404 that isn't a rate limit:** the token in use can't write to that repository. When it isn't the workspace's own (Replicas configures \`gh\` and the \`~/${GIT_CREDENTIAL_HELPER_FILENAME}\` credential helper), it came from the environment, such as a start hook or variable: say that token lacks access and retry with the workspace's own credentials. Otherwise the Replicas GitHub App can't reach the repository: an organization admin has to install it there or grant it access. A rate limit (\`API rate limit exceeded\`, \`x-ratelimit-remaining: 0\`) only needs a wait and a retry.
18218
+ - Say to reconnect GitHub only when the error itself says so, which happens when PR user attribution is on and the person's GitHub account is missing or expired.
18219
+
18114
18220
  ### Stacked Pull Requests
18115
18221
 
18116
18222
  When a change spans pull requests that build on each other, open each one with \`--base\` set to the branch below it, then link them into a GitHub stack. GitHub then shows the whole stack on every pull request in it. The \`gh stack\` extension is pre-installed.
@@ -20118,7 +20224,7 @@ function defaultReplicasAgentAbilities() {
20118
20224
  function hasAllReplicasAgentAbilities(abilities) {
20119
20225
  return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
20120
20226
  }
20121
- var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS;
20227
+ var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS;
20122
20228
  var init_preferences = __esm({
20123
20229
  "../shared/src/routes/preferences.ts"() {
20124
20230
  "use strict";
@@ -20132,6 +20238,11 @@ var init_preferences = __esm({
20132
20238
  fast_mode: null
20133
20239
  };
20134
20240
  DEFAULT_SUBAGENT_MCP_PROVIDERS = [...VALID_AGENT_PROVIDERS];
20241
+ ALERT_SOUND_FAMILIES = {
20242
+ glass: ["glint", "tap", "ripple", "halo"],
20243
+ wood: ["ready", "pluck", "knock", "bloom", "steps"]
20244
+ };
20245
+ ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
20135
20246
  DEFAULT_USER_PREFERENCES = {
20136
20247
  default_agent: null,
20137
20248
  default_model: null,
@@ -20167,7 +20278,9 @@ var init_preferences = __esm({
20167
20278
  default_fast_mode: false,
20168
20279
  auto_compact_tokens: null,
20169
20280
  agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
20170
- fallback_chains: null
20281
+ fallback_chains: null,
20282
+ alert_sound: null,
20283
+ workspace_alerts: {}
20171
20284
  };
20172
20285
  DEFAULT_DEFAULT_SKILLS = {
20173
20286
  replicas_agent: {
@@ -31071,80 +31184,6 @@ var init_egress = __esm({
31071
31184
  }
31072
31185
  });
31073
31186
 
31074
- // ../shared/src/runtime-env.ts
31075
- function shellQuotePosix(value) {
31076
- return `'${value.split("'").join("'\\''")}'`;
31077
- }
31078
- function serializePosixEnvFile(env, unsetKeys = []) {
31079
- return `${[
31080
- ...[...unsetKeys].map((key) => `unset ${key}`),
31081
- ...Object.entries(env).filter(([, value]) => value.length > 0).map(([key, value]) => `export ${key}=${shellQuotePosix(value)}`)
31082
- ].join("\n")}
31083
- `;
31084
- }
31085
- function parsePosixEnvUnsetKeys(content) {
31086
- return content.split("\n").filter((line) => line.startsWith("unset ")).map((line) => line.slice("unset ".length).trim());
31087
- }
31088
- function parsePosixEnvFile(content) {
31089
- const result = {};
31090
- let pos = 0;
31091
- while (pos < content.length) {
31092
- let lineStart;
31093
- if (pos === 0 || content[pos - 1] === "\n") {
31094
- lineStart = pos;
31095
- } else {
31096
- const nl2 = content.indexOf("\n", pos);
31097
- if (nl2 === -1) break;
31098
- lineStart = nl2 + 1;
31099
- }
31100
- if (!content.startsWith("export ", lineStart)) {
31101
- const nl2 = content.indexOf("\n", lineStart);
31102
- if (nl2 === -1) break;
31103
- pos = nl2 + 1;
31104
- continue;
31105
- }
31106
- const nameStart = lineStart + "export ".length;
31107
- const eqIdx = content.indexOf("=", nameStart);
31108
- if (eqIdx === -1) break;
31109
- const name = content.slice(nameStart, eqIdx).trim();
31110
- let cursor = eqIdx + 1;
31111
- if (content[cursor] !== "'") {
31112
- const nl2 = content.indexOf("\n", cursor);
31113
- pos = nl2 === -1 ? content.length : nl2 + 1;
31114
- continue;
31115
- }
31116
- cursor += 1;
31117
- let value = "";
31118
- let closed = false;
31119
- while (cursor < content.length) {
31120
- const ch = content[cursor];
31121
- if (ch === "'") {
31122
- if (content.startsWith("\\''", cursor + 1)) {
31123
- value += "'";
31124
- cursor += 4;
31125
- continue;
31126
- }
31127
- cursor += 1;
31128
- closed = true;
31129
- break;
31130
- }
31131
- value += ch;
31132
- cursor += 1;
31133
- }
31134
- if (closed && name) {
31135
- result[name] = value;
31136
- }
31137
- const nl = content.indexOf("\n", cursor);
31138
- pos = nl === -1 ? content.length : nl + 1;
31139
- }
31140
- return result;
31141
- }
31142
- var init_runtime_env = __esm({
31143
- "../shared/src/runtime-env.ts"() {
31144
- "use strict";
31145
- }
31146
- });
31147
-
31148
31187
  // ../shared/src/dotenv.ts
31149
31188
  var init_dotenv = __esm({
31150
31189
  "../shared/src/dotenv.ts"() {
@@ -31152,26 +31191,6 @@ var init_dotenv = __esm({
31152
31191
  }
31153
31192
  });
31154
31193
 
31155
- // ../shared/src/engine/environment.ts
31156
- var ENGINE_PORT;
31157
- var init_environment2 = __esm({
31158
- "../shared/src/engine/environment.ts"() {
31159
- "use strict";
31160
- init_type_guards();
31161
- ENGINE_PORT = 3737;
31162
- }
31163
- });
31164
-
31165
- // ../shared/src/git.ts
31166
- var init_git = __esm({
31167
- "../shared/src/git.ts"() {
31168
- "use strict";
31169
- init_url();
31170
- init_runtime_env();
31171
- init_environment2();
31172
- }
31173
- });
31174
-
31175
31194
  // ../shared/src/code-host.ts
31176
31195
  var init_code_host = __esm({
31177
31196
  "../shared/src/code-host.ts"() {
@@ -31380,7 +31399,7 @@ var CLI_VERSION;
31380
31399
  var init_cli_version = __esm({
31381
31400
  "../shared/src/cli-version.ts"() {
31382
31401
  "use strict";
31383
- CLI_VERSION = "0.3.224";
31402
+ CLI_VERSION = "0.3.226";
31384
31403
  }
31385
31404
  });
31386
31405
 
@@ -32625,7 +32644,6 @@ var init_mobile_testing = __esm({
32625
32644
  var init_desktop = __esm({
32626
32645
  "../shared/src/desktop.ts"() {
32627
32646
  "use strict";
32628
- init_workspace_attention();
32629
32647
  init_composer_voice_input();
32630
32648
  }
32631
32649
  });
@@ -33000,6 +33018,7 @@ var init_src = __esm({
33000
33018
  init_compute();
33001
33019
  init_display_message();
33002
33020
  init_desktop();
33021
+ init_workspace_attention();
33003
33022
  init_user_message_parser();
33004
33023
  init_placeholder_names();
33005
33024
  init_workspace_groups();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.224",
3
+ "version": "0.3.226",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {