@oh-my-pi/pi-coding-agent 16.4.0 → 16.4.1

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-coding-agent",
4
- "version": "16.4.0",
4
+ "version": "16.4.1",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -56,17 +56,17 @@
56
56
  "@agentclientprotocol/sdk": "0.25.0",
57
57
  "@babel/parser": "^7.29.7",
58
58
  "@mozilla/readability": "^0.6.0",
59
- "@oh-my-pi/hashline": "16.4.0",
60
- "@oh-my-pi/omp-stats": "16.4.0",
61
- "@oh-my-pi/pi-agent-core": "16.4.0",
62
- "@oh-my-pi/pi-ai": "16.4.0",
63
- "@oh-my-pi/pi-catalog": "16.4.0",
64
- "@oh-my-pi/pi-mnemopi": "16.4.0",
65
- "@oh-my-pi/pi-natives": "16.4.0",
66
- "@oh-my-pi/pi-tui": "16.4.0",
67
- "@oh-my-pi/pi-utils": "16.4.0",
68
- "@oh-my-pi/pi-wire": "16.4.0",
69
- "@oh-my-pi/snapcompact": "16.4.0",
59
+ "@oh-my-pi/hashline": "16.4.1",
60
+ "@oh-my-pi/omp-stats": "16.4.1",
61
+ "@oh-my-pi/pi-agent-core": "16.4.1",
62
+ "@oh-my-pi/pi-ai": "16.4.1",
63
+ "@oh-my-pi/pi-catalog": "16.4.1",
64
+ "@oh-my-pi/pi-mnemopi": "16.4.1",
65
+ "@oh-my-pi/pi-natives": "16.4.1",
66
+ "@oh-my-pi/pi-tui": "16.4.1",
67
+ "@oh-my-pi/pi-utils": "16.4.1",
68
+ "@oh-my-pi/pi-wire": "16.4.1",
69
+ "@oh-my-pi/snapcompact": "16.4.1",
70
70
  "@opentelemetry/api": "^1.9.1",
71
71
  "@opentelemetry/context-async-hooks": "^2.7.1",
72
72
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
@@ -555,12 +555,28 @@ export class MCPOAuthFlow extends OAuthCallbackFlow {
555
555
  * "Only clients listed in the Figma MCP Catalog can connect"), the fallback
556
556
  * probe surfaces a message that names the endpoint and status instead of
557
557
  * the historical opaque "OAuth provider requires client_id".
558
+ *
559
+ * Includes {@link MCPOAuthConfig.scopes} as RFC 7591 `scope` when set so
560
+ * providers that bind DCR clients to registered scopes only (e.g. Clerk)
561
+ * accept the later authorize request for the same scope set.
558
562
  */
559
563
  async #tryRegisterClient(redirectUri: string): Promise<void> {
560
564
  const registrationEndpoint = await this.#resolveRegistrationEndpoint();
561
565
  if (!registrationEndpoint) return;
562
566
 
563
567
  try {
568
+ const registrationBody: Record<string, unknown> = {
569
+ client_name: "oh-my-pi",
570
+ redirect_uris: [redirectUri],
571
+ grant_types: ["authorization_code", "refresh_token"],
572
+ response_types: ["code"],
573
+ token_endpoint_auth_method: "none",
574
+ application_type: "native",
575
+ };
576
+ const scope = this.config.scopes?.trim();
577
+ if (scope) {
578
+ registrationBody.scope = scope;
579
+ }
564
580
  const response = await this.#fetch(registrationEndpoint, {
565
581
  method: "POST",
566
582
  headers: {
@@ -568,14 +584,7 @@ export class MCPOAuthFlow extends OAuthCallbackFlow {
568
584
  Accept: "application/json",
569
585
  },
570
586
  signal: this.ctrl.signal,
571
- body: JSON.stringify({
572
- client_name: "oh-my-pi",
573
- redirect_uris: [redirectUri],
574
- grant_types: ["authorization_code", "refresh_token"],
575
- response_types: ["code"],
576
- token_endpoint_auth_method: "none",
577
- application_type: "native",
578
- }),
587
+ body: JSON.stringify(registrationBody),
579
588
  });
580
589
 
581
590
  if (!response.ok) {
@@ -44,6 +44,14 @@ NEVER advise on intent or process:
44
44
  - Intent is the agent's domain; it defaults to informed action.
45
45
  - Your lane: correctness, edge cases, design, process.
46
46
 
47
+ NEVER police scope or ambition:
48
+ - A large diff, wholesale rewrite, or expanding plan is NOT a problem by itself — often it is exactly what the user wants.
49
+ - Object to the size or reach of a change ONLY when it contradicts an explicit user instruction in the transcript (e.g. "minimal change", "don't touch X") — and cite that instruction.
50
+
51
+ NEVER raise backwards compatibility unless the user or a standing project rule explicitly requires it:
52
+ - No unsolicited concerns or blockers about breaking changes, deprecation shims, migration paths, legacy fallbacks, or API stability.
53
+ - Absent such a requirement, clean cutover — delete the old path, update every caller — is the correct default; treat it as such.
54
+
47
55
  Cite only transcript evidence or tool output you personally inspected.
48
56
  Arguments absent from the rendered transcript are UNKNOWN:
49
57
  - NEVER assert concrete values, array indexes, serialization shapes, or caller mistakes for hidden arguments.
@@ -76,7 +84,7 @@ Cite the exact instruction or risk.
76
84
  **`blocker`**
77
85
  - Stop and reconsider.
78
86
  - Use ONLY when the agent making progress will clearly:
79
- - Waste the users time with a larger refactor.
87
+ - Contradict an explicit user instruction in the transcript cite it; size, rewrite breadth, or an evolving plan alone is NEVER the trigger.
80
88
  - Will require the user to interrupt the agent later on, due to them going in circles without a solution.
81
89
  - Be fundamentally unsound.
82
90
  - Hand off as "done" work that was never exercised against the user's actual ask.