@moxxy/sdk 0.45.0 → 0.46.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/dist/provider-login-bridge.d.ts +1 -2
- package/dist/provider-login-bridge.d.ts.map +1 -1
- package/dist/provider-login-bridge.js +1 -2
- package/dist/provider-login-bridge.js.map +1 -1
- package/dist/provider.d.ts +1 -1
- package/package.json +5 -1
- package/src/package-root.test.ts +2 -2
- package/src/provider-login-bridge.ts +1 -2
- package/src/provider.ts +1 -1
- package/src/redact-subpath.test.ts +10 -0
- package/src/schemas.test.ts +4 -4
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* JSON marker on stdout. NUL never appears in normal terminal output, so the
|
|
9
9
|
* host can scan the byte stream for these markers, render the prompt, and
|
|
10
10
|
* write the user's answer back as one stdin line. Loopback flows that never
|
|
11
|
-
* call `ctx.prompt` (
|
|
12
|
-
* callback server) emit no markers — the host just streams their output and
|
|
11
|
+
* call `ctx.prompt` (they capture the code via a local callback server) emit no markers — the host just streams their output and
|
|
13
12
|
* waits for the process to exit.
|
|
14
13
|
*
|
|
15
14
|
* Living here (not in the CLI or the desktop contract) keeps the one wire
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-login-bridge.d.ts","sourceRoot":"","sources":["../src/provider-login-bridge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider-login-bridge.d.ts","sourceRoot":"","sources":["../src/provider-login-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAoCH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAEjE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAS5E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI;IAC1C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;CACrD,CA0CA"}
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* JSON marker on stdout. NUL never appears in normal terminal output, so the
|
|
9
9
|
* host can scan the byte stream for these markers, render the prompt, and
|
|
10
10
|
* write the user's answer back as one stdin line. Loopback flows that never
|
|
11
|
-
* call `ctx.prompt` (
|
|
12
|
-
* callback server) emit no markers — the host just streams their output and
|
|
11
|
+
* call `ctx.prompt` (they capture the code via a local callback server) emit no markers — the host just streams their output and
|
|
13
12
|
* waits for the process to exit.
|
|
14
13
|
*
|
|
15
14
|
* Living here (not in the CLI or the desktop contract) keeps the one wire
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-login-bridge.js","sourceRoot":"","sources":["../src/provider-login-bridge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider-login-bridge.js","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AAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7B,CAAC;YACD,uEAAuE;YACvE,kEAAkE;YAClE,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjC,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;gBACnB,IAAI,GAAG;oBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;gBACjD,GAAG,GAAG,EAAE,CAAC;YACX,CAAC;iBAAM,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;gBACvB,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;gBAC1D,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3B,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -332,7 +332,7 @@ export interface ProviderAuthContext {
|
|
|
332
332
|
* interactive TTY; absent in headless runs. Flows that need the user to
|
|
333
333
|
* paste something back — out-of-band / manual authorization-code flows,
|
|
334
334
|
* or an existing-token paste — call this; flows that capture the code via
|
|
335
|
-
* a loopback server
|
|
335
|
+
* a loopback server ignore it. Pass `{ mask: true }`
|
|
336
336
|
* for secrets so the host can hide the echoed characters.
|
|
337
337
|
*/
|
|
338
338
|
readonly prompt?: (question: string, opts?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Typed public surface for the moxxy framework: event types, define* factories, lifecycle hook signatures.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
"types": "./dist/tool-display.d.ts",
|
|
54
54
|
"import": "./dist/tool-display.js"
|
|
55
55
|
},
|
|
56
|
+
"./redact": {
|
|
57
|
+
"types": "./dist/redact.d.ts",
|
|
58
|
+
"import": "./dist/redact.js"
|
|
59
|
+
},
|
|
56
60
|
"./agent-account-limit": {
|
|
57
61
|
"types": "./dist/agent-account-limit.d.ts",
|
|
58
62
|
"import": "./dist/agent-account-limit.js"
|
package/src/package-root.test.ts
CHANGED
|
@@ -21,7 +21,7 @@ describe('@moxxy/sdk package root', () => {
|
|
|
21
21
|
it('exports requirement types through package root declarations', async () => {
|
|
22
22
|
const requirement: import('@moxxy/sdk').MoxxyRequirement = {
|
|
23
23
|
kind: 'runtime',
|
|
24
|
-
name: 'auth:provider:
|
|
24
|
+
name: 'auth:provider:codex-agent',
|
|
25
25
|
state: 'ready',
|
|
26
26
|
};
|
|
27
27
|
const check: import('@moxxy/sdk').RequirementCheck = {
|
|
@@ -35,7 +35,7 @@ describe('@moxxy/sdk package root', () => {
|
|
|
35
35
|
],
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
expect(check.issues[0]?.requirement.name).toBe('auth:provider:
|
|
38
|
+
expect(check.issues[0]?.requirement.name).toBe('auth:provider:codex-agent');
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
// The main barrel is the browser/RN-safe surface: a value import of any of
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* JSON marker on stdout. NUL never appears in normal terminal output, so the
|
|
9
9
|
* host can scan the byte stream for these markers, render the prompt, and
|
|
10
10
|
* write the user's answer back as one stdin line. Loopback flows that never
|
|
11
|
-
* call `ctx.prompt` (
|
|
12
|
-
* callback server) emit no markers — the host just streams their output and
|
|
11
|
+
* call `ctx.prompt` (they capture the code via a local callback server) emit no markers — the host just streams their output and
|
|
13
12
|
* waits for the process to exit.
|
|
14
13
|
*
|
|
15
14
|
* Living here (not in the CLI or the desktop contract) keeps the one wire
|
package/src/provider.ts
CHANGED
|
@@ -289,7 +289,7 @@ export interface ProviderAuthContext {
|
|
|
289
289
|
* interactive TTY; absent in headless runs. Flows that need the user to
|
|
290
290
|
* paste something back — out-of-band / manual authorization-code flows,
|
|
291
291
|
* or an existing-token paste — call this; flows that capture the code via
|
|
292
|
-
* a loopback server
|
|
292
|
+
* a loopback server ignore it. Pass `{ mask: true }`
|
|
293
293
|
* for secrets so the host can hide the echoed characters.
|
|
294
294
|
*/
|
|
295
295
|
readonly prompt?: (question: string, opts?: { readonly mask?: boolean }) => Promise<string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('@moxxy/sdk/redact', () => {
|
|
4
|
+
it('offers the shared redactor without loading the SDK barrel into a browser', async () => {
|
|
5
|
+
const { redactSecretText } = await import('@moxxy/sdk/redact');
|
|
6
|
+
const text = redactSecretText('curl -H "Authorization: Bearer private-credential"');
|
|
7
|
+
expect(text).toContain('curl');
|
|
8
|
+
expect(text).not.toContain('private-credential');
|
|
9
|
+
});
|
|
10
|
+
});
|
package/src/schemas.test.ts
CHANGED
|
@@ -83,9 +83,9 @@ describe('moxxyPackageSchema', () => {
|
|
|
83
83
|
requirements: [
|
|
84
84
|
{
|
|
85
85
|
kind: 'plugin',
|
|
86
|
-
name: '@moxxy/plugin-provider-
|
|
86
|
+
name: '@moxxy/plugin-provider-codex-agent',
|
|
87
87
|
state: 'registered',
|
|
88
|
-
hint: 'Enable @moxxy/plugin-provider-
|
|
88
|
+
hint: 'Enable @moxxy/plugin-provider-codex-agent.',
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
91
|
});
|
|
@@ -94,9 +94,9 @@ describe('moxxyPackageSchema', () => {
|
|
|
94
94
|
expect(parsed.requirements).toEqual([
|
|
95
95
|
{
|
|
96
96
|
kind: 'plugin',
|
|
97
|
-
name: '@moxxy/plugin-provider-
|
|
97
|
+
name: '@moxxy/plugin-provider-codex-agent',
|
|
98
98
|
state: 'registered',
|
|
99
|
-
hint: 'Enable @moxxy/plugin-provider-
|
|
99
|
+
hint: 'Enable @moxxy/plugin-provider-codex-agent.',
|
|
100
100
|
},
|
|
101
101
|
]);
|
|
102
102
|
});
|