apex-code 0.0.1-alpha.6 → 0.0.1-alpha.7

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 (29) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/core/agent-session.d.ts +17 -0
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +28 -0
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/permissions/gate.d.ts +7 -0
  7. package/dist/core/permissions/gate.d.ts.map +1 -1
  8. package/dist/core/permissions/gate.js.map +1 -1
  9. package/dist/core/permissions/startup.d.ts +12 -0
  10. package/dist/core/permissions/startup.d.ts.map +1 -1
  11. package/dist/core/permissions/startup.js +12 -4
  12. package/dist/core/permissions/startup.js.map +1 -1
  13. package/dist/main.d.ts.map +1 -1
  14. package/dist/main.js +1 -0
  15. package/dist/main.js.map +1 -1
  16. package/dist/modes/interactive/components/footer.d.ts +3 -0
  17. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  18. package/dist/modes/interactive/components/footer.js +13 -0
  19. package/dist/modes/interactive/components/footer.js.map +1 -1
  20. package/dist/modes/interactive/components/settings-selector.d.ts +13 -0
  21. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  22. package/dist/modes/interactive/components/settings-selector.js +96 -0
  23. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  24. package/dist/modes/interactive/interactive-mode.d.ts +11 -0
  25. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  26. package/dist/modes/interactive/interactive-mode.js +62 -3
  27. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  28. package/npm-shrinkwrap.json +5 -5
  29. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Apex Code changelog
2
2
 
3
+ ## [0.0.1-alpha.7] - 2026-08-21
4
+
5
+ - The permission mode is now switchable from `/settings` instead of only at launch through
6
+ `--permission-mode`. Every mode already existed and worked; there was simply no way to
7
+ reach one from a running session, so `bypassPermissions` in particular was documented but
8
+ effectively unreachable for anyone who had already started typing. The row writes to user
9
+ scope (`~/.apex-code/agent/permissions.json`) and applies to the next tool call, because
10
+ the gate re-reads the store on every decision. Choosing `bypassPermissions` takes a
11
+ confirm step first, since the row is arrow-cyclable like every other setting and
12
+ "allow every tool call" should not be one stray keypress away. `--permission-mode`,
13
+ `.apex-code/permissions.json`, and `permissions.local.json` all still outrank a user-scope
14
+ write, so when one of them is in force the setting reports what actually applies rather
15
+ than appearing to save and doing nothing. Any mode other than `default` is now named in
16
+ the footer: `bypassPermissions` and `plan` both look like the agent misbehaving rather
17
+ than a mode being on. Shift+Tab still cycles the thinking level and is unchanged.
18
+
3
19
  ## [0.0.1-alpha.6] - 2026-08-21
4
20
 
5
21
  - Fixed skills being invisible in every sandboxed session. The OS sandbox hides the host
@@ -20,6 +20,8 @@ import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionE
20
20
  import type { CustomMessage } from "./messages.ts";
21
21
  import type { ModelRuntime } from "./model-runtime.ts";
22
22
  import { type PermissionGateOptions } from "./permissions/gate.ts";
23
+ import { type EffectiveModeResolution } from "./permissions/startup.ts";
24
+ import type { PermissionMode } from "./permissions/store.ts";
23
25
  import { type PromptTemplate } from "./prompt-templates.ts";
24
26
  import type { ResourceLoader } from "./resource-loader.ts";
25
27
  import type { BranchSummaryEntry, SessionEntry, SessionManager } from "./session-manager.ts";
@@ -494,6 +496,21 @@ export declare class AgentSession {
494
496
  abort(): Promise<void>;
495
497
  waitForIdle(): Promise<void>;
496
498
  private _emitModelSelect;
499
+ /** True when this session runs behind a permission gate at all. */
500
+ get hasPermissionGate(): boolean;
501
+ /**
502
+ * The mode in force right now, and which source won. `getMode` in the gate
503
+ * config re-reads the store on every decision, so a mode written here applies
504
+ * to the next tool call with no restart.
505
+ */
506
+ getPermissionMode(): Promise<EffectiveModeResolution | undefined>;
507
+ /**
508
+ * Persist a permission mode to user scope (`~/.apex-code/agent/permissions.json`).
509
+ * Returns the resolution that is actually in force afterwards, which is *not*
510
+ * necessarily `mode`: `flag`, `local`, and `project` all outrank `user`, so the
511
+ * caller has to be able to tell the user their choice was recorded but shadowed.
512
+ */
513
+ setPermissionMode(mode: PermissionMode): Promise<EffectiveModeResolution | undefined>;
497
514
  /**
498
515
  * Set model directly.
499
516
  * Validates that auth is configured, saves to session and settings.