@kolatts/pncli 1.19.0 → 1.21.0

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/NOTICE CHANGED
@@ -3,6 +3,410 @@ Copyright 2026 Sunny Kolattukudy
3
3
 
4
4
  Licensed under the Apache License, Version 2.0.
5
5
 
6
+ ═══════════════════════════════════════════════════════════════
7
+ MANDATORY COMPLIANCE NOTICE
8
+ ═══════════════════════════════════════════════════════════════
9
+
10
+ Per Section 4(d) of the Apache License 2.0, this NOTICE file must be
11
+ included in all copies or substantial portions of this software, in all
12
+ derivative works, and in any and all redistributions thereof.
13
+
14
+ By deploying, using, or permitting any human being within your organization
15
+ to execute pncli — including accidentally in a terminal they didn't mean to
16
+ open — you agree to the following irrevocable operational requirements:
17
+
18
+ 1. MANDATORY STAND-UP PARTICIPATION
19
+ All teams must hold a daily stand-up, strictly time-boxed to fifteen
20
+ (15) minutes. The stand-up will run forty-five (45) minutes.
21
+
22
+ Each attendee answers three questions: what they did yesterday, what
23
+ they are doing today, and whether anything is blocking them. Blockers
24
+ may not be discussed in the stand-up. Schedule a separate meeting.
25
+ The separate meeting will be attended by the same people, at a
26
+ different time, so that the stand-up can remain on time.
27
+
28
+ If a topic requires detail or problem solving, it must be taken
29
+ offline. Offline means a second meeting. The second meeting requires
30
+ a third to align on next steps. Resolution happens asynchronously,
31
+ in a Confluence page no one will find.
32
+
33
+ Anyone who says "no blockers, nothing to add" will be privately noted
34
+ as either not doing enough work or not communicating enough about it.
35
+ Both are concerns. Say something. Say anything. The stand-up is not
36
+ about information. It is about presence. Be present.
37
+
38
+ 2. RETURN-TO-OFFICE COMPLIANCE
39
+ All employees are required to be in office five (5) days per week,
40
+ effective immediately, no exceptions.
41
+
42
+ Exception requests may be submitted via the Flexible Work Arrangement
43
+ Portal. The portal is not publicly linked. You did not hear about it
44
+ here. Approved exceptions are confidential and will not be disclosed
45
+ to other employees who also do not have exceptions and are definitely
46
+ in the office. You did not notice this.
47
+
48
+ Employees who choose not to comply will be noted as having made a
49
+ choice. The consequences will follow through a process entirely
50
+ unrelated to this policy and will not be referred to as a layoff.
51
+ It is an alignment exercise.
52
+
53
+ Desk assignment is managed by Facilities. Facilities is managed by
54
+ a spreadsheet last updated by someone who no longer works here, under
55
+ a policy that has since changed, in a building reconfigured twice
56
+ without updating the spreadsheet. Your assigned desk may be a column,
57
+ a decommissioned printer station, or a hot desk already occupied by
58
+ someone with an exception.
59
+
60
+ There are no exceptions.
61
+
62
+ 3. JIRA TICKET REQUIREMENT
63
+ Before running any pncli command in a non-local environment, your team
64
+ must first raise a Jira ticket requesting permission to raise a Jira
65
+ ticket. The approval workflow requires sign-off from: your manager,
66
+ your manager's manager, a "technical architect" who hasn't written code
67
+ since 2011, and a business analyst who will ask you to "put it in a
68
+ PowerPoint" before they can approve it.
69
+
70
+ 4. CHANGE ADVISORY BOARD REVIEW
71
+ All changes must be submitted to the Change Advisory Board (CAB) for
72
+ approval before implementation. Before you can present to CAB, you
73
+ must first obtain a Permit.
74
+
75
+ Permits are tiered — Standard, Elevated, Complex, and Significant —
76
+ each with its own intake, its own approver, and a processing window
77
+ of ten (10) to forty-five (45) business days. Which tier applies is
78
+ determined by a classification guide available upon request by
79
+ submitting a Standard Permit.
80
+
81
+ Each intake is different. Some are forms. Some are emails to a shared
82
+ mailbox monitored by someone in a department that has since been
83
+ restructured. Some require a conversation with a Delivery Manager who
84
+ may or may not be aware they are part of the process. These things
85
+ vary by team, by floor, and by who picked up the phone last time.
86
+
87
+ Your change may be reclassified into a higher tier at any point. This
88
+ resets the clock. There is no notification.
89
+
90
+ CAB reviews the change. No member of CAB fully understands what they
91
+ are reviewing. Approval is based on whether the paperwork looks
92
+ complete and whether the change has been waiting long enough that
93
+ objecting feels rude.
94
+
95
+ CAB does not approve software. CAB approves paperwork about software.
96
+ The distinction matters a great deal to CAB. It is invisible to
97
+ production.
98
+
99
+ 5. APPROVAL CHAIN
100
+ Any use of the `--force` flag, in any context, requires written
101
+ approval from the Chief Compliance Officer, the VP of Engineering,
102
+ two (2) independent auditors, and your mother. Appeals may be filed
103
+ with the Ombudsman of Flags, whose inbox has been full since 2019.
104
+
105
+ 6. DOCUMENTATION REQUIREMENTS
106
+ All documentation must be maintained in the following approved
107
+ platforms:
108
+
109
+ a) Microsoft Excel. Specifically, a workbook called something like
110
+ "pncli_tracking_v3_FINAL_v2_USE_THIS_ONE.xlsx" in a OneDrive
111
+ folder that three people have access to and one of them has left.
112
+
113
+ b) The internal SharePoint site, last redesigned in 2019 by a vendor
114
+ who no longer exists, which requires IE compatibility mode and has
115
+ a search function that returns results from 2014. This is by design.
116
+
117
+ Under no circumstances may documentation be stored somewhere findable.
118
+ Confluence is permitted as a secondary archive, provided every page is
119
+ titled "Draft - DO NOT USE" regardless of status.
120
+
121
+ 7. QUARTERLY REVIEW PROCESS
122
+ Usage must be reviewed quarterly by a standing committee, which must
123
+ produce a findings report, a summary of the findings report, an
124
+ executive summary of the summary, and a one-page overview suitable
125
+ for someone who will not read it.
126
+
127
+ The quarterly review process itself must also be reviewed — every
128
+ ninety-one (91) days — to ensure it remains fit for purpose. The
129
+ review-of-the-review is a separate process and does not count toward
130
+ the quarterly review. Both calendars must be maintained in Excel.
131
+
132
+ 8. REMEDIATION TIMELINES
133
+ Any issue identified during a quarterly review must be remediated
134
+ within thirty (30) calendar days. Remediation requires a change
135
+ request. Change requests take ninety (90) calendar days to process.
136
+ Teams are encouraged to be proactive.
137
+
138
+ 9. TRAINING CERTIFICATION
139
+ All operators must complete a mandatory 8-hour training course titled
140
+ "Introduction to Reading --help Output." A 30-minute lunch break is
141
+ provided but must be requested 48 hours in advance via the Lunch
142
+ Request Portal, which is currently down for scheduled maintenance.
143
+
144
+ Completion certificates are stored in the Learning Management System,
145
+ which syncs to a SharePoint list that feeds an Excel dashboard emailed
146
+ every Friday to eleven people, nine of whom have set up an auto-archive
147
+ rule.
148
+
149
+ 10. METRICS & REPORTING
150
+ All usage must be reported to the Developer Productivity Team, who
151
+ will use the data to build a dashboard that no one looks at, presented
152
+ quarterly to executives who will ask why the numbers aren't higher and
153
+ whether there is an app for it.
154
+
155
+ Raw metrics must be exported to Excel before being imported into the
156
+ approved reporting tool, because the approved reporting tool cannot
157
+ connect directly to the data source. This is a known issue. It is in
158
+ the backlog.
159
+
160
+ 11. DEVELOPER ACCESS RECERTIFICATION
161
+ Every developer must complete an Access Recertification Form every
162
+ ninety (90) days to confirm they are still permitted to debug the
163
+ software they are personally responsible for. Allow fifteen (15)
164
+ business days for processing. If your recertification lapses, your
165
+ debugging access will be suspended, at which point you may raise an
166
+ incident ticket for the outage caused by the thing you are no longer
167
+ allowed to debug.
168
+
169
+ Recertification is per-machine. If you use a VM, that is a
170
+ conversation with the virtualization team that will take longer than
171
+ ninety days.
172
+
173
+ There is no reminder system. Compliance is the developer's
174
+ responsibility. Non-compliance is also the developer's responsibility.
175
+
176
+ 12. ENVIRONMENT COMPLIANCE
177
+ Your organization maintains four pre-production environments. None
178
+ of them can do what they are supposed to do, but they are maintained
179
+ nonetheless.
180
+
181
+ - RND: No production-like data is permitted. No realistic data of
182
+ any kind is permitted. What is permitted is unclear. RND exists
183
+ on the architecture diagram and in the hearts of those who
184
+ approved the budget for it.
185
+
186
+ - UAT: User Acceptance Testing. Users do not test here. The
187
+ environment has the same data restrictions as RND, which is why.
188
+ The name remains.
189
+
190
+ - QA: The one environment with enough data to be useful, which does
191
+ not match production in any meaningful way. QA passing is a team
192
+ ritual, like a rain dance, except the rain still doesn't come on
193
+ schedule and someone has to write a post-mortem about it.
194
+
195
+ - PROD (x2): There are two. Both are production. This is not a DR
196
+ configuration anyone can fully explain. Raising the question in a
197
+ meeting is not recommended unless you have blocked the next two hours.
198
+
199
+ All four pre-production environments must show green before a
200
+ deployment is approved. Catching bugs is a stretch goal.
201
+
202
+ 13. RELEASE MANAGEMENT
203
+ DORA tracks four software delivery performance tiers: Elite, High,
204
+ Medium, and Low. Elite teams deploy multiple times per day. Low
205
+ performers deploy somewhere between once a week and once a month.
206
+
207
+ Your organization ships three to four times per year. The researchers
208
+ left a blank below Low. They assumed it was a data error.
209
+
210
+ Each release requires thirty (30) to forty-five (45) days of
211
+ approvals. This is called a release cadence. Geologists call it
212
+ deposition.
213
+
214
+ Security note: your organization typically detects a published CVE
215
+ forty-five (45) to sixty (60) days after it is public. Your
216
+ remediation SLA is thirty (30) days from detection. Your next release
217
+ window was scheduled by a calendar that predates the concept. These
218
+ three facts are aware of each other. No one else is.
219
+
220
+ 14. INCIDENT MANAGEMENT
221
+ Production incidents are handled by an offshore support function
222
+ under the following severity model:
223
+
224
+ P1 — CRITICAL: Something a developer mentioned in passing.
225
+ P2 — HIGH: Something that has been broken for three weeks and was
226
+ only just noticed.
227
+ P3 — MEDIUM: An active outage affecting all users, escalated after
228
+ the offshore team determined it did not match P1 criteria
229
+ because the word "all" was not in the dropdown.
230
+ P4 — LOW: Everything else, including P1s that arrived on a Friday
231
+ after 4pm, which is a different kind of P1.
232
+
233
+ A developer may be paged within minutes, or receive a ticket three
234
+ weeks after the incident was already resolved. The difference is not
235
+ correlated with severity. It is correlated with something, but nobody
236
+ has had time to find out what.
237
+
238
+ 15. TOOLING APPROVALS
239
+ Any tool that measurably closes the gap between thinking of something
240
+ and doing it must be formally approved before use. Approval is granted
241
+ per version. A minor version bump is a new application.
242
+
243
+ By the time a version is approved, it has been superseded at least
244
+ twice, and the approved version is now the one with the known
245
+ vulnerability the newer version fixed. This is the process working
246
+ as intended.
247
+
248
+ In an era where AI tooling shifts capability weekly, this ensures
249
+ your engineers are always eighteen months behind the current state
250
+ of the art, which is a competitive position your organization has
251
+ committed to with some consistency.
252
+
253
+ Library and package management through the internal artifact
254
+ repository is, notably, fast and functional. Nobody has scheduled
255
+ a meeting to discuss why the contrast exists. It would take several
256
+ months to approve the agenda.
257
+
258
+ 16. OVERSIGHT & APPROVAL GOVERNANCE
259
+ All technical decisions must be reviewed by a cross-functional
260
+ committee before implementation. The committee includes Engineering,
261
+ Security, Risk, Compliance, Architecture, Delivery, and a rotating
262
+ seat for someone who joined the meeting late, muted themselves
263
+ immediately, and has not been seen since.
264
+
265
+ Most committee members have no technical background. Developers are
266
+ therefore required to explain the decision to the committee so the
267
+ committee can approve it. The developer who explained the decision
268
+ is the same developer who made it. The approval is from someone who
269
+ could not have made it. The system has a name for this: governance.
270
+
271
+ The audit trail, however, is immaculate.
272
+
273
+ 17. WORKFORCE STRUCTURE
274
+ For every engineer using pncli to do something, approximately five
275
+ (5) colleagues are in a meeting about it. This is not a criticism.
276
+ The meetings are very organized.
277
+
278
+ Stories are distributed based on capacity, availability, and story
279
+ points — not on familiarity with the system, ownership of the code,
280
+ or demonstrated ability to complete the story. This prevents
281
+ bottlenecks. It also prevents progress, but the velocity chart looks
282
+ balanced, which is what gets presented to leadership.
283
+
284
+ Team meetings include the full cross-functional group, meaning the
285
+ room is large enough that most people cannot contribute and small
286
+ enough that no one can leave. Cameras are optional. Attention is
287
+ aspirational. The meeting runs to time because the Scrum Master has
288
+ a hard stop.
289
+
290
+ 18. TECHNICAL LEAD RESPONSIBILITIES
291
+ All paperwork that requires someone who understands what the software
292
+ does must be completed by the Technical Lead. This is because the
293
+ Technical Lead is the only person who knows where the form is, who
294
+ the right person to email is, and what the change actually involves.
295
+ Delegating results in a question escalated back to the Technical Lead
296
+ anyway. They have been designated as the efficient path.
297
+
298
+ Any effort to let engineers build the system will surface a
299
+ previously unscheduled requirement that redirects them to paperwork.
300
+ The story moves back to In Progress. The sprint will not be adjusted.
301
+ The velocity will be noted as a concern at the retrospective.
302
+
303
+ PRODUCTION SUPPORT: The Technical Lead will be paged when a service
304
+ fails, regardless of whether they own the service or have ever seen
305
+ it. This assumption will not be tested in advance. It will be tested
306
+ in production, which is a different kind of test and does not require
307
+ a Test Evidence Pack.
308
+
309
+ TECHNICAL DIRECTION: Enterprise Architects attend vendor briefings
310
+ and produce recommendations based on what the vendor demonstrated.
311
+ The Technical Lead determines what the organization will actually
312
+ build, which will differ substantially, and explains the difference
313
+ in a way that does not make the Architects feel bad about the
314
+ briefing. This is called alignment. It takes several meetings.
315
+
316
+ DEADLINE ACCOUNTABILITY: If the project is late, the Technical Lead
317
+ will be asked to explain why. The correct answer — that the timeline
318
+ was set before requirements were known and two engineers spent six
319
+ weeks on Permit paperwork — is not the answer that will be recorded.
320
+ The recorded answer will reference planning and estimation. The
321
+ Technical Lead's name will be adjacent to both words.
322
+
323
+ SURPRISE DEADLINES: Periodically, a deadline will appear that is two
324
+ weeks away, originating from a commitment made in a meeting the
325
+ Technical Lead was not invited to, by someone who did not know what
326
+ the work involved, to someone who needed a date. The Technical Lead
327
+ is now accountable for the date. The people in the meeting are
328
+ accountable for their calendars.
329
+
330
+ SECURITY TEAM APPLICATIONS: Occasionally an application owned by
331
+ the Security team will need support. The Security team will indicate
332
+ this is not something they support. The Technical Lead will be asked.
333
+ The application will be unrecognizable. The Technical Lead will
334
+ support it anyway, because a P1 with no owner is somehow worse.
335
+
336
+ The Technical Lead's availability for technical work is approximately
337
+ zero (0) to two (2) hours per week. The Technical Lead is considered
338
+ a resource. The resource is fully utilized. Utilization is high.
339
+ Output is a separate metric.
340
+
341
+ 19. INCIDENT ACCOUNTABILITY & CORRECTIVE ACTION
342
+ When something breaks in production, the response proceeds in two
343
+ phases: fixing it, then generating paperwork about having fixed it.
344
+ The paperwork phase is longer.
345
+
346
+ The developer closest to the broken thing will produce: a root cause
347
+ analysis, a contributing factors document, a timeline reconstruction,
348
+ a risk register update, a lessons-learned summary, a corrective action
349
+ plan, a corrective action plan review, and a slide deck for a
350
+ post-incident review attended by people who will ask questions that
351
+ suggest they have not read any of the above.
352
+
353
+ Developers who accumulate corrective actions are placed on the
354
+ Heightened Oversight Register. There is no formal process for being
355
+ removed. There is a formal process for being added. The asymmetry is
356
+ not documented, but it is consistent.
357
+
358
+ The Heightened Oversight Register should not be confused with the
359
+ Enhanced Monitoring List, the Watch List for Delivery Risk, the
360
+ Escalation Tracker, or the informally maintained spreadsheet kept by
361
+ one specific delivery manager that nobody is supposed to know about
362
+ but everyone does. These are separate documents with overlapping names
363
+ and no shared governance. They are all maintained in Excel.
364
+
365
+ 20. QUALITY ASSURANCE
366
+ Your organization has two separate quality functions. They do not
367
+ report to the same person. They have different definitions of quality.
368
+ Neither definition is software.
369
+
370
+ PRODUCT QUALITY ASSURANCE ensures that user stories are correctly
371
+ written. Not that the software works. That the stories are correctly
372
+ written. Stories deviating from the approved format will be returned
373
+ for revision regardless of whether the software is already deployed
374
+ and in use by actual users. Product QA owns the story. What happens
375
+ after is someone else's lane.
376
+
377
+ Acceptance criteria are reviewed against a seventeen-item checklist.
378
+ Four items are duplicates with different wording. One references a
379
+ template that no longer exists. Completion is mandatory.
380
+ Comprehension is not assessed.
381
+
382
+ QUALITY ENGINEERING reviews the Test Evidence Pack for completeness
383
+ and correct formatting. Whether the tests caught anything is not on
384
+ the sign-off sheet and is therefore not in scope.
385
+
386
+ A test executed against the wrong environment with the wrong data,
387
+ returning a false positive, passes QE review if the date field is
388
+ filled in. A test that found a real defect fails if the screenshot
389
+ is the wrong dimensions.
390
+
391
+ When the two teams disagree on who owns a quality concern, they hold
392
+ a meeting, produce a RACI, and store it in Confluence under a page
393
+ titled "Draft - DO NOT USE." The software remains unreviewed during
394
+ this process, which both teams agree is not their fault.
395
+
396
+ 21. COMPLIANCE WITH THIS NOTICE
397
+ If you have read this far, congratulations — you are now more
398
+ compliant than 97% of enterprise software users. Your actual legal
399
+ obligation is simply to keep this NOTICE file intact when
400
+ redistributing the source code, as required by Apache 2.0.
401
+
402
+ That's it. That's the whole thing. Everything above was the
403
+ bureaucratic nightmare that pncli was built to route around.
404
+ This line is the exit.
405
+
406
+ Now go ship something. After the CAB approves it.
407
+
408
+ ═══════════════════════════════════════════════════════════════
409
+
6
410
  =============================================================================
7
411
  INDEPENDENT PROJECT NOTICE
8
412
  =============================================================================
@@ -24,20 +24,37 @@ Cache the answers for the session. If the user doesn't know, run `git remote -v`
24
24
 
25
25
  ## Installing Skills
26
26
 
27
- pncli ships with Claude Code skills — step-by-step workflow guides that agents can follow. To install them into your repo:
27
+ pncli installs agent skills — step-by-step workflow guides for GitHub Copilot and Claude Code — from git-hosted skills marketplaces: plain git repos of plugins that your team publishes. Register a marketplace once:
28
28
 
29
29
  ```
30
- pncli skills install
30
+ pncli skills marketplace setup <git-clone-url>
31
31
  ```
32
32
 
33
- This downloads the latest pncli skills from GitHub. Default installs to `.agents/skills/` (GitHub Copilot). For Claude Code, add `--agent claude-code`. For user-scope, add `--scope user`. Only pncli-managed skills are replaced — any custom skills you've added are left untouched.
33
+ This clones the marketplace repo to `~/.agents/marketplaces/<repo-name>`, registers it in your global pncli config, and installs every plugin's skills into your user-level skills folder — `~/.copilot/skills` for GitHub Copilot (the default), or `~/.claude/skills` with `--claude`. Use `--branch` to pin a specific branch and `--token` for repos that require an HTTP access token (GitHub PAT or Bitbucket token). Run `setup` (or its equivalent, `marketplace add`) again with a different URL to register additional marketplaces.
34
34
 
35
- To see what's installed locally:
35
+ From then on, one command keeps your skills current:
36
36
 
37
37
  ```
38
- pncli skills list
38
+ pncli skills marketplace sync
39
39
  ```
40
40
 
41
+ Sync works because every installed skill carries provenance: pncli writes a `pncli-origin.json` into each skill directory recording which marketplace and plugin it came from, the source URL and branch, and when it was installed, plus a `.pncli-installed.json` index in the skills folder. On each run, sync does a `git pull` on the marketplace clone, then:
42
+
43
+ - **No new commits upstream** — it skips reinstalling and changes nothing locally (pass `--force` to reinstall anyway).
44
+ - **New commits** — it re-copies the plugin's skills over the installed versions and refreshes their origin records.
45
+
46
+ Only pncli-managed skills are ever replaced or purged; skills you wrote yourself are left untouched. Run `sync` whenever your marketplace publishes new or updated skills — after a teammate merges a skill change, everyone else just runs `pncli skills marketplace sync` (with the same `--claude` flag they used for setup) to pick it up. With one marketplace registered, sync prompts you to pick a plugin; with several, it first asks which marketplace. Skip the prompts:
47
+
48
+ ```
49
+ pncli skills marketplace sync my-plugin # skip the plugin picker
50
+ pncli skills marketplace sync all # every plugin in the marketplace
51
+ pncli skills marketplace sync --marketplace all # every plugin from every marketplace
52
+ ```
53
+
54
+ To list registered marketplaces and browse their plugins without installing anything, use `pncli skills marketplace list` and `pncli skills marketplace plugins <name>`. To see what's installed locally, run `pncli skills list --scope user`.
55
+
56
+ The skills bundled with pncli itself can still be installed straight into a repo with `pncli skills install` (default target: `.agents/skills/`; add `--agent claude-code` for Claude Code).
57
+
41
58
  ## Common Workflows
42
59
 
43
60
  > These workflows are also available as skills — run `pncli skills install` (Copilot default) or `pncli skills install --agent claude-code` (Claude Code) to download them into your repo. Add `--scope user` for global access.
@@ -274,7 +274,7 @@ async function fetchWithTimeout(url, init, timeoutMs, fetcher = fetch) {
274
274
  clearTimeout(timer);
275
275
  }
276
276
  }
277
- async function request(url, init, timeoutMs, fetcher = fetch) {
277
+ async function requestRaw(url, init, timeoutMs, fetcher = fetch) {
278
278
  let lastError;
279
279
  if (isDebugEnabled()) {
280
280
  const method = (init.method ?? "GET").toUpperCase();
@@ -333,14 +333,18 @@ async function request(url, init, timeoutMs, fetcher = fetch) {
333
333
  throw new PncliError(message, response.status, url);
334
334
  }
335
335
  if (response.status === 204) {
336
- return void 0;
336
+ return { data: void 0, headers: response.headers };
337
337
  }
338
338
  const text = await response.text();
339
- if (!text) return void 0;
340
- return JSON.parse(text);
339
+ if (!text) return { data: void 0, headers: response.headers };
340
+ return { data: JSON.parse(text), headers: response.headers };
341
341
  }
342
342
  throw lastError ?? new PncliError("Request failed after retries", 1, url);
343
343
  }
344
+ async function request(url, init, timeoutMs, fetcher = fetch) {
345
+ const { data } = await requestRaw(url, init, timeoutMs, fetcher);
346
+ return data;
347
+ }
344
348
  var HttpClient = class {
345
349
  config;
346
350
  dryRun;
@@ -572,6 +576,33 @@ Headers: ${JSON.stringify(safeHeaders, null, 2)}
572
576
  }
573
577
  return request(url, init, opts.timeoutMs ?? 3e4);
574
578
  }
579
+ /**
580
+ * Same as {@link bitbucket}, but also returns the raw response headers.
581
+ * Bitbucket Server stamps every authenticated response with X-AUSERNAME,
582
+ * which is how getCurrentUser() resolves the caller.
583
+ */
584
+ async bitbucketRaw(path, opts = {}) {
585
+ const baseUrl = this.config.bitbucket.baseUrl;
586
+ if (!baseUrl) throw new PncliError("Bitbucket baseUrl not configured. Run: pncli config init");
587
+ const url = buildUrl(baseUrl, path, opts.params);
588
+ const headers = this.bitbucketHeaders();
589
+ const init = {
590
+ method: opts.method ?? "GET",
591
+ headers,
592
+ body: opts.body !== void 0 ? JSON.stringify(opts.body) : void 0
593
+ };
594
+ if (this.dryRun) {
595
+ const safeHeaders = { ...headers, Authorization: "[REDACTED]" };
596
+ const msg = `DRY RUN: ${init.method} ${url}
597
+ Headers: ${JSON.stringify(safeHeaders, null, 2)}
598
+ ` + (opts.body ? `Body: ${JSON.stringify(opts.body, null, 2)}
599
+ ` : "");
600
+ fs2.writeSync(process.stderr.fd, msg);
601
+ process.exitCode = ExitCode.SUCCESS;
602
+ throw new PncliError("dry-run", 0);
603
+ }
604
+ return requestRaw(url, init, opts.timeoutMs ?? 3e4);
605
+ }
575
606
  confluenceToken() {
576
607
  const { apiToken } = this.config.confluence;
577
608
  if (!apiToken) throw new PncliError("Confluence credentials not configured. Run: pncli config init");
@@ -1289,4 +1320,4 @@ export {
1289
1320
  HttpClient,
1290
1321
  createHttpClient
1291
1322
  };
1292
- //# sourceMappingURL=chunk-WM5NYVEO.js.map
1323
+ //# sourceMappingURL=chunk-PC4AHQCN.js.map