ai_co_discuss 0.2.84 → 0.2.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.2.84",
3
+ "version": "0.2.85",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -258,7 +258,9 @@ export async function room_models(home, raw, { read_defaults = software_defaults
258
258
  const defaults = await read_defaults(profile);
259
259
  return [name, { adapter: profile.adapter, model: cli ? profile.model || '' : '',
260
260
  effort: EFFORT_LEVELS[profile.adapter] ? profile.effort || '' : '', default_model: defaults.model, default_effort: defaults.effort,
261
- project_access: profile.adapter === 'api' ? 'read' : profile.project_access || config.project_access || 'read' }];
261
+ project_access: profile.adapter === 'api' ? 'read' : profile.project_access || config.project_access || 'read',
262
+ // An agy member resuming its own conversation keeps that conversation's project, so this tool cannot set its access.
263
+ own_project: profile.adapter === 'antigravity_cli' && Boolean(profile.session_id) }];
262
264
  })));
263
265
  // Smart scheduling is a local choice; only which model decides is shown, never its key.
264
266
  const scheduler = config.scheduler ? { provider: config.scheduler.provider, model: config.scheduler.model } : null;
@@ -578,6 +580,7 @@ export async function room_member_access(home, raw) {
578
580
  const profile = config.participants?.[name];
579
581
  if (!profile) throw new Error(`${name} 不由本机唤醒,项目权限由它自己的会话决定`);
580
582
  if (!ACCESS_ADAPTERS.includes(profile.adapter)) throw new Error(profile.adapter === 'api' ? 'API 成员没有本机文件工具,项目固定只读' : `${name} 的项目权限在 App 内设置`);
583
+ if (profile.adapter === 'antigravity_cli' && profile.session_id) throw new Error(`${name} 续接的是它自己的 agy 对话,项目权限沿用该对话所在项目,请在 agy 中设置`);
581
584
  if (project_access === 'write' && !(profile.cwd || config.cwd)) throw new Error('本房间没有指定项目目录,可写没有作用;请在新建房间时选择项目目录');
582
585
  const next = { ...config, participants: { ...config.participants, [name]: { ...profile, project_access } } };
583
586
  validate_config(next, dirname(path));
package/web/app.js CHANGED
@@ -1098,15 +1098,11 @@ async function describe_member(name, text) {
1098
1098
  /** Switch a woken member's project files between read-only and writable; the local service applies it from its next run. */
1099
1099
  async function set_member_access({ name, project_access }) {
1100
1100
  const room_id = state.room.id;
1101
- state.free_error = ""; state.free_notice = "";
1102
- try {
1103
- await local_launch_request("room-member-access", { room_id, token: localStorage.getItem(`discuss-access:${room_id}`), name, project_access });
1104
- if (state.room?.id !== room_id) return;
1105
- state.free_notice = `${name} 的项目文件已改为${project_access === "write" ? "可写" : "只读"},下次处理请求起生效,原会话保留。`;
1106
- // The saved choices are cached per runtime revision, which this change leaves alone.
1107
- state.launch.room_models = null;
1108
- load_room_models();
1109
- } catch (error) { state.free_error = error.message; throw error; }
1101
+ await local_launch_request("room-member-access", { room_id, token: localStorage.getItem(`discuss-access:${room_id}`), name, project_access });
1102
+ if (state.room?.id !== room_id) return;
1103
+ // The saved choices are cached per runtime revision, which this change leaves alone.
1104
+ state.launch.room_models = null;
1105
+ await load_room_models();
1110
1106
  }
1111
1107
 
1112
1108
  /** Owner changes use the website; only automatic members need the local service to reconnect. */
@@ -3505,7 +3501,7 @@ async function execute_view_action(name, value) {
3505
3501
  copy_online: () => copy_context(), copy_cli: () => copy_context("cli"), copy_background,
3506
3502
  choose_runtime, export_runtime, download_member_access, copy_member_access_text, copy_member_join, copy_member_launch: name => copy_member_join(name, true), pause_runtime, check_limits, pause_discussion, restart_discussion, retry_execution, conclude_discussion, start_room_discussion, end_room_discussion, reopen_discussion,
3507
3503
  save_launch_defaults, launch_current_room, resume_launch, discard_launch, retry_launch_connection, check_launch_connection: load_launch_settings,
3508
- load_room_configuration, save_room_configuration, interrupt_member, change_member, set_member_access, reorder_speakers, invite_member, set_proxy, copy_online_notice,
3504
+ load_room_configuration, save_room_configuration, interrupt_member, change_member, reorder_speakers, invite_member, set_proxy, copy_online_notice,
3509
3505
  prepare_brainstorm, return_conclusion, adopt_recommendation, rate_decision,
3510
3506
  busy: () => { throw new Error("上一个操作仍在处理中,请稍候;长时间无响应请刷新页面"); },
3511
3507
  copy_reading: () => copy_text(`${location.origin}/r/${state.room.id}`), copy: copy_text };
@@ -3536,7 +3532,7 @@ window.discuss_view = { snapshot: view_snapshot, write_field: write_view_field,
3536
3532
  admin: { register: register_admin, login: login_admin, logout: logout_admin,
3537
3533
  update_profile: update_admin_profile, avatar_from_file: admin_avatar_from_file, validate: validate_admin_form },
3538
3534
  request: request_json, identities: IDENTITIES, display_name, sources: SOURCE_LABELS, phases: PHASE_LABELS,
3539
- runtime_label, execution_label, limits_label, stop_reason_label, participant_model, participant_access, can_retry_execution,
3535
+ set_member_access, runtime_label, execution_label, limits_label, stop_reason_label, participant_model, participant_access, can_retry_execution,
3540
3536
  turns: TURN_LABELS, turn_label, turn_guidance, progress_round, round_groups, limit_rounds, progress_speaker, brief_meta, max_message_length: MAX_MESSAGE_LENGTH, provenance: message_provenance, format_time };
3541
3537
 
3542
3538
  restore_theme();