agent-relay 4.0.18 → 4.0.20

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 (96) hide show
  1. package/dist/index.cjs +1407 -537
  2. package/dist/src/cli/commands/setup.d.ts +28 -10
  3. package/dist/src/cli/commands/setup.d.ts.map +1 -1
  4. package/dist/src/cli/commands/setup.js +103 -68
  5. package/dist/src/cli/commands/setup.js.map +1 -1
  6. package/node_modules/@agent-relay/cloud/package.json +2 -2
  7. package/node_modules/@agent-relay/config/package.json +1 -1
  8. package/node_modules/@agent-relay/hooks/package.json +4 -4
  9. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.d.ts +5 -35
  10. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.d.ts.map +1 -1
  11. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.js +158 -292
  12. package/node_modules/@agent-relay/sdk/dist/workflows/trajectory.js.map +1 -1
  13. package/node_modules/@agent-relay/sdk/package.json +3 -2
  14. package/node_modules/@agent-relay/telemetry/package.json +1 -1
  15. package/node_modules/@agent-relay/trajectory/package.json +2 -2
  16. package/node_modules/@agent-relay/user-directory/package.json +2 -2
  17. package/node_modules/@agent-relay/utils/package.json +2 -2
  18. package/node_modules/@clack/core/CHANGELOG.md +200 -0
  19. package/node_modules/@clack/core/LICENSE +9 -0
  20. package/node_modules/@clack/core/README.md +22 -0
  21. package/node_modules/@clack/core/dist/index.cjs +15 -0
  22. package/node_modules/@clack/core/dist/index.cjs.map +1 -0
  23. package/node_modules/@clack/core/dist/index.d.cts +151 -0
  24. package/node_modules/@clack/core/dist/index.d.mts +151 -0
  25. package/node_modules/@clack/core/dist/index.d.ts +151 -0
  26. package/node_modules/@clack/core/dist/index.mjs +15 -0
  27. package/node_modules/@clack/core/dist/index.mjs.map +1 -0
  28. package/node_modules/@clack/core/package.json +62 -0
  29. package/node_modules/@clack/prompts/CHANGELOG.md +256 -0
  30. package/node_modules/@clack/prompts/LICENSE +23 -0
  31. package/node_modules/@clack/prompts/README.md +158 -0
  32. package/node_modules/@clack/prompts/dist/index.cjs +77 -0
  33. package/node_modules/@clack/prompts/dist/index.d.ts +106 -0
  34. package/node_modules/@clack/prompts/dist/index.mjs +77 -0
  35. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/index.d.ts +12 -0
  36. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/index.js +17 -0
  37. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/license +9 -0
  38. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/package.json +43 -0
  39. package/node_modules/@clack/prompts/node_modules/is-unicode-supported/readme.md +35 -0
  40. package/node_modules/@clack/prompts/package.json +65 -0
  41. package/node_modules/agent-trajectories/README.md +562 -0
  42. package/node_modules/agent-trajectories/dist/chunk-W222QB6V.js +2036 -0
  43. package/node_modules/agent-trajectories/dist/chunk-W222QB6V.js.map +1 -0
  44. package/node_modules/agent-trajectories/dist/cli/index.d.ts +2 -0
  45. package/node_modules/agent-trajectories/dist/cli/index.js +4592 -0
  46. package/node_modules/agent-trajectories/dist/cli/index.js.map +1 -0
  47. package/node_modules/agent-trajectories/dist/index-7tzw_CMS.d.ts +1777 -0
  48. package/node_modules/agent-trajectories/dist/index.d.ts +90 -0
  49. package/node_modules/agent-trajectories/dist/index.js +73 -0
  50. package/node_modules/agent-trajectories/dist/index.js.map +1 -0
  51. package/node_modules/agent-trajectories/dist/sdk/index.d.ts +2 -0
  52. package/node_modules/agent-trajectories/dist/sdk/index.js +39 -0
  53. package/node_modules/agent-trajectories/dist/sdk/index.js.map +1 -0
  54. package/node_modules/agent-trajectories/package.json +72 -0
  55. package/node_modules/commander/LICENSE +22 -0
  56. package/node_modules/commander/Readme.md +1157 -0
  57. package/node_modules/commander/esm.mjs +16 -0
  58. package/node_modules/commander/index.js +24 -0
  59. package/node_modules/commander/lib/argument.js +149 -0
  60. package/node_modules/commander/lib/command.js +2509 -0
  61. package/node_modules/commander/lib/error.js +39 -0
  62. package/node_modules/commander/lib/help.js +520 -0
  63. package/node_modules/commander/lib/option.js +330 -0
  64. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  65. package/node_modules/commander/package-support.json +16 -0
  66. package/node_modules/commander/package.json +84 -0
  67. package/node_modules/commander/typings/esm.d.mts +3 -0
  68. package/node_modules/commander/typings/index.d.ts +969 -0
  69. package/node_modules/follow-redirects/README.md +7 -5
  70. package/node_modules/follow-redirects/index.js +24 -1
  71. package/node_modules/follow-redirects/package.json +1 -1
  72. package/node_modules/picocolors/LICENSE +15 -0
  73. package/node_modules/picocolors/README.md +21 -0
  74. package/node_modules/picocolors/package.json +25 -0
  75. package/node_modules/picocolors/picocolors.browser.js +4 -0
  76. package/node_modules/picocolors/picocolors.d.ts +5 -0
  77. package/node_modules/picocolors/picocolors.js +75 -0
  78. package/node_modules/picocolors/types.d.ts +51 -0
  79. package/node_modules/sisteransi/license +21 -0
  80. package/node_modules/sisteransi/package.json +34 -0
  81. package/node_modules/sisteransi/readme.md +113 -0
  82. package/node_modules/sisteransi/src/index.js +58 -0
  83. package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  84. package/package.json +10 -10
  85. package/packages/cloud/package.json +2 -2
  86. package/packages/config/package.json +1 -1
  87. package/packages/hooks/package.json +4 -4
  88. package/packages/sdk/dist/workflows/trajectory.d.ts +5 -35
  89. package/packages/sdk/dist/workflows/trajectory.d.ts.map +1 -1
  90. package/packages/sdk/dist/workflows/trajectory.js +158 -292
  91. package/packages/sdk/dist/workflows/trajectory.js.map +1 -1
  92. package/packages/sdk/package.json +3 -2
  93. package/packages/telemetry/package.json +1 -1
  94. package/packages/trajectory/package.json +2 -2
  95. package/packages/user-directory/package.json +2 -2
  96. package/packages/utils/package.json +2 -2
@@ -15,7 +15,7 @@ Drop-in replacement for Node's `http` and `https` modules that automatically fol
15
15
  ```javascript
16
16
  const { http, https } = require('follow-redirects');
17
17
 
18
- http.get('http://bit.ly/900913', response => {
18
+ http.get('http://en.wikipedia.org/', response => {
19
19
  response.on('data', chunk => {
20
20
  console.log(chunk);
21
21
  });
@@ -29,8 +29,8 @@ If no redirection happened, `responseUrl` is the original request URL.
29
29
 
30
30
  ```javascript
31
31
  const request = https.request({
32
- host: 'bitly.com',
33
- path: '/UHfDGO',
32
+ host: 'en.wikipedia.org',
33
+ path: '/',
34
34
  }, response => {
35
35
  console.log(response.responseUrl);
36
36
  // 'http://duckduckgo.com/robots.txt'
@@ -61,7 +61,7 @@ Per-request options are set by passing an `options` object:
61
61
  const url = require('url');
62
62
  const { http, https } = require('follow-redirects');
63
63
 
64
- const options = url.parse('http://bit.ly/900913');
64
+ const options = url.parse('http://en.wikipedia.org/');
65
65
  options.maxRedirects = 10;
66
66
  options.beforeRedirect = (options, response, request) => {
67
67
  // Use this to adjust the request options upon redirecting,
@@ -74,7 +74,7 @@ options.beforeRedirect = (options, response, request) => {
74
74
  // request.url = the requested URL that resulted in a redirect
75
75
  // request.headers = the headers in the request that resulted in a redirect
76
76
  // request.method = the method of the request that resulted in a redirect
77
- if (options.hostname === "example.com") {
77
+ if (options.hostname === "example.org") {
78
78
  options.auth = "user:password";
79
79
  }
80
80
  };
@@ -95,6 +95,8 @@ the following per-request options are supported:
95
95
 
96
96
  - `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object.
97
97
 
98
+ - `sensitiveHeaders` (default: `[]`) – names of headers to omit when making redirected requests (such as `X-API-Key`, `X-Auth-Token`…)
99
+
98
100
 
99
101
  ### Advanced usage
100
102
  By default, `follow-redirects` will use the Node.js default implementations
@@ -26,6 +26,13 @@ catch (error) {
26
26
  useNativeURL = error.code === "ERR_INVALID_URL";
27
27
  }
28
28
 
29
+ // HTTP headers to drop across HTTP/HTTPS and domain boundaries
30
+ var sensitiveHeaders = [
31
+ "Authorization",
32
+ "Proxy-Authorization",
33
+ "Cookie",
34
+ ];
35
+
29
36
  // URL fields to preserve in copy operations
30
37
  var preservedUrlFields = [
31
38
  "auth",
@@ -107,6 +114,11 @@ function RedirectableRequest(options, responseCallback) {
107
114
  }
108
115
  };
109
116
 
117
+ // Create filter for sensitive HTTP headers
118
+ this._headerFilter = new RegExp("^(?:" +
119
+ sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") +
120
+ ")$", "i");
121
+
110
122
  // Perform the first request
111
123
  this._performRequest();
112
124
  }
@@ -290,6 +302,9 @@ RedirectableRequest.prototype._sanitizeOptions = function (options) {
290
302
  if (!options.headers) {
291
303
  options.headers = {};
292
304
  }
305
+ if (!isArray(options.sensitiveHeaders)) {
306
+ options.sensitiveHeaders = [];
307
+ }
293
308
 
294
309
  // Since http.request treats host as an alias of hostname,
295
310
  // but the url module interprets host as hostname plus port,
@@ -472,7 +487,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
472
487
  redirectUrl.protocol !== "https:" ||
473
488
  redirectUrl.host !== currentHost &&
474
489
  !isSubdomain(redirectUrl.host, currentHost)) {
475
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
490
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
476
491
  }
477
492
 
478
493
  // Evaluate the beforeRedirect callback
@@ -665,6 +680,10 @@ function isSubdomain(subdomain, domain) {
665
680
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
666
681
  }
667
682
 
683
+ function isArray(value) {
684
+ return value instanceof Array;
685
+ }
686
+
668
687
  function isString(value) {
669
688
  return typeof value === "string" || value instanceof String;
670
689
  }
@@ -681,6 +700,10 @@ function isURL(value) {
681
700
  return URL && value instanceof URL;
682
701
  }
683
702
 
703
+ function escapeRegex(regex) {
704
+ return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
705
+ }
706
+
684
707
  // Exports
685
708
  module.exports = wrap({ http: http, https: https });
686
709
  module.exports.wrap = wrap;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "follow-redirects",
3
- "version": "1.15.11",
3
+ "version": "1.16.0",
4
4
  "description": "HTTP and HTTPS modules that follow redirects.",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # picocolors
2
+
3
+ The tiniest and the fastest library for terminal output formatting with ANSI colors.
4
+
5
+ ```javascript
6
+ import pc from "picocolors"
7
+
8
+ console.log(
9
+ pc.green(`How are ${pc.italic(`you`)} doing?`)
10
+ )
11
+ ```
12
+
13
+ - **No dependencies.**
14
+ - **14 times** smaller and **2 times** faster than chalk.
15
+ - Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
16
+ - Node.js v6+ & browsers support. Support for both CJS and ESM projects.
17
+ - TypeScript type declarations included.
18
+ - [`NO_COLOR`](https://no-color.org/) friendly.
19
+
20
+ ## Docs
21
+ Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "picocolors",
3
+ "version": "1.1.1",
4
+ "main": "./picocolors.js",
5
+ "types": "./picocolors.d.ts",
6
+ "browser": {
7
+ "./picocolors.js": "./picocolors.browser.js"
8
+ },
9
+ "sideEffects": false,
10
+ "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
11
+ "files": [
12
+ "picocolors.*",
13
+ "types.d.ts"
14
+ ],
15
+ "keywords": [
16
+ "terminal",
17
+ "colors",
18
+ "formatting",
19
+ "cli",
20
+ "console"
21
+ ],
22
+ "author": "Alexey Raspopov",
23
+ "repository": "alexeyraspopov/picocolors",
24
+ "license": "ISC"
25
+ }
@@ -0,0 +1,4 @@
1
+ var x=String;
2
+ var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
3
+ module.exports=create();
4
+ module.exports.createColors = create;
@@ -0,0 +1,5 @@
1
+ import { Colors } from "./types"
2
+
3
+ declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors }
4
+
5
+ export = picocolors
@@ -0,0 +1,75 @@
1
+ let p = process || {}, argv = p.argv || [], env = p.env || {}
2
+ let isColorSupported =
3
+ !(!!env.NO_COLOR || argv.includes("--no-color")) &&
4
+ (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
5
+
6
+ let formatter = (open, close, replace = open) =>
7
+ input => {
8
+ let string = "" + input, index = string.indexOf(close, open.length)
9
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
10
+ }
11
+
12
+ let replaceClose = (string, close, replace, index) => {
13
+ let result = "", cursor = 0
14
+ do {
15
+ result += string.substring(cursor, index) + replace
16
+ cursor = index + close.length
17
+ index = string.indexOf(close, cursor)
18
+ } while (~index)
19
+ return result + string.substring(cursor)
20
+ }
21
+
22
+ let createColors = (enabled = isColorSupported) => {
23
+ let f = enabled ? formatter : () => String
24
+ return {
25
+ isColorSupported: enabled,
26
+ reset: f("\x1b[0m", "\x1b[0m"),
27
+ bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
28
+ dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
29
+ italic: f("\x1b[3m", "\x1b[23m"),
30
+ underline: f("\x1b[4m", "\x1b[24m"),
31
+ inverse: f("\x1b[7m", "\x1b[27m"),
32
+ hidden: f("\x1b[8m", "\x1b[28m"),
33
+ strikethrough: f("\x1b[9m", "\x1b[29m"),
34
+
35
+ black: f("\x1b[30m", "\x1b[39m"),
36
+ red: f("\x1b[31m", "\x1b[39m"),
37
+ green: f("\x1b[32m", "\x1b[39m"),
38
+ yellow: f("\x1b[33m", "\x1b[39m"),
39
+ blue: f("\x1b[34m", "\x1b[39m"),
40
+ magenta: f("\x1b[35m", "\x1b[39m"),
41
+ cyan: f("\x1b[36m", "\x1b[39m"),
42
+ white: f("\x1b[37m", "\x1b[39m"),
43
+ gray: f("\x1b[90m", "\x1b[39m"),
44
+
45
+ bgBlack: f("\x1b[40m", "\x1b[49m"),
46
+ bgRed: f("\x1b[41m", "\x1b[49m"),
47
+ bgGreen: f("\x1b[42m", "\x1b[49m"),
48
+ bgYellow: f("\x1b[43m", "\x1b[49m"),
49
+ bgBlue: f("\x1b[44m", "\x1b[49m"),
50
+ bgMagenta: f("\x1b[45m", "\x1b[49m"),
51
+ bgCyan: f("\x1b[46m", "\x1b[49m"),
52
+ bgWhite: f("\x1b[47m", "\x1b[49m"),
53
+
54
+ blackBright: f("\x1b[90m", "\x1b[39m"),
55
+ redBright: f("\x1b[91m", "\x1b[39m"),
56
+ greenBright: f("\x1b[92m", "\x1b[39m"),
57
+ yellowBright: f("\x1b[93m", "\x1b[39m"),
58
+ blueBright: f("\x1b[94m", "\x1b[39m"),
59
+ magentaBright: f("\x1b[95m", "\x1b[39m"),
60
+ cyanBright: f("\x1b[96m", "\x1b[39m"),
61
+ whiteBright: f("\x1b[97m", "\x1b[39m"),
62
+
63
+ bgBlackBright: f("\x1b[100m", "\x1b[49m"),
64
+ bgRedBright: f("\x1b[101m", "\x1b[49m"),
65
+ bgGreenBright: f("\x1b[102m", "\x1b[49m"),
66
+ bgYellowBright: f("\x1b[103m", "\x1b[49m"),
67
+ bgBlueBright: f("\x1b[104m", "\x1b[49m"),
68
+ bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
69
+ bgCyanBright: f("\x1b[106m", "\x1b[49m"),
70
+ bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
71
+ }
72
+ }
73
+
74
+ module.exports = createColors()
75
+ module.exports.createColors = createColors
@@ -0,0 +1,51 @@
1
+ export type Formatter = (input: string | number | null | undefined) => string
2
+
3
+ export interface Colors {
4
+ isColorSupported: boolean
5
+
6
+ reset: Formatter
7
+ bold: Formatter
8
+ dim: Formatter
9
+ italic: Formatter
10
+ underline: Formatter
11
+ inverse: Formatter
12
+ hidden: Formatter
13
+ strikethrough: Formatter
14
+
15
+ black: Formatter
16
+ red: Formatter
17
+ green: Formatter
18
+ yellow: Formatter
19
+ blue: Formatter
20
+ magenta: Formatter
21
+ cyan: Formatter
22
+ white: Formatter
23
+ gray: Formatter
24
+
25
+ bgBlack: Formatter
26
+ bgRed: Formatter
27
+ bgGreen: Formatter
28
+ bgYellow: Formatter
29
+ bgBlue: Formatter
30
+ bgMagenta: Formatter
31
+ bgCyan: Formatter
32
+ bgWhite: Formatter
33
+
34
+ blackBright: Formatter
35
+ redBright: Formatter
36
+ greenBright: Formatter
37
+ yellowBright: Formatter
38
+ blueBright: Formatter
39
+ magentaBright: Formatter
40
+ cyanBright: Formatter
41
+ whiteBright: Formatter
42
+
43
+ bgBlackBright: Formatter
44
+ bgRedBright: Formatter
45
+ bgGreenBright: Formatter
46
+ bgYellowBright: Formatter
47
+ bgBlueBright: Formatter
48
+ bgMagentaBright: Formatter
49
+ bgCyanBright: Formatter
50
+ bgWhiteBright: Formatter
51
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Terkel Gjervig Nielsen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "sisteransi",
3
+ "version": "1.0.5",
4
+ "description": "ANSI escape codes for some terminal swag",
5
+ "main": "src/index.js",
6
+ "license": "MIT",
7
+ "author": {
8
+ "name": "Terkel Gjervig",
9
+ "email": "terkel@terkel.com",
10
+ "url": "https://terkel.com"
11
+ },
12
+ "scripts": {
13
+ "test": "tape test/*.js | tap-spec"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/terkelg/sisteransi"
18
+ },
19
+ "files": [
20
+ "src"
21
+ ],
22
+ "types": "./src/sisteransi.d.ts",
23
+ "keywords": [
24
+ "ansi",
25
+ "escape codes",
26
+ "escape",
27
+ "terminal",
28
+ "style"
29
+ ],
30
+ "devDependencies": {
31
+ "tap-spec": "^5.0.0",
32
+ "tape": "^4.13.2"
33
+ }
34
+ }
@@ -0,0 +1,113 @@
1
+ # sister ANSI [![Version](https://img.shields.io/npm/v/sisteransi.svg)](https://www.npmjs.com/package/sisteransi) [![Build Status](https://travis-ci.org/terkelg/sisteransi.svg?branch=master)](https://travis-ci.org/terkelg/sisteransi) [![Downloads](https://img.shields.io/npm/dm/sisteransi.svg)](https://www.npmjs.com/package/sisteransi)
2
+
3
+ > Ansi escape codes faster than you can say "[Bam bam](https://www.youtube.com/watch?v=OcaPu9JPenU)".
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ npm install sisteransi
9
+ ```
10
+
11
+
12
+ ## Usage
13
+
14
+ ```js
15
+ const ansi = require('sisteransi');
16
+ // or const { cursor } = require('sisteransi');
17
+
18
+ const p = str => process.stdout.write(str);
19
+
20
+ // move cursor to 2, 1
21
+ p(ansi.cursor.to(2, 1));
22
+
23
+ // to up, one down
24
+ p(ansi.cursor.up(2)+ansi.cursor.down(1));
25
+ ```
26
+
27
+ ## API
28
+
29
+ ### cursor
30
+
31
+ #### to(x, y)
32
+ Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
33
+
34
+ #### move(x, y)
35
+ Set the position of the cursor relative to its current position.
36
+
37
+ #### up(count = 1)
38
+ Move cursor up a specific amount of rows. Default is `1`.
39
+
40
+ #### down(count = 1)
41
+ Move cursor down a specific amount of rows. Default is `1`.
42
+
43
+ #### forward(count = 1)
44
+ Move cursor forward a specific amount of rows. Default is `1`.
45
+
46
+ #### backward(count = 1)
47
+ Move cursor backward a specific amount of rows. Default is `1`.
48
+
49
+ #### nextLine(count = 1)
50
+ Move cursor to the next line a specific amount of lines. Default is `1`.
51
+
52
+ #### prevLine(count = 1)
53
+ Move cursor to the previous a specific amount of lines. Default is `1`.
54
+
55
+ #### left
56
+ Move cursor to the left side.
57
+
58
+ #### hide
59
+ Hide cursor.
60
+
61
+ #### show
62
+ Show cursor.
63
+
64
+ #### save
65
+
66
+ Save cursor position.
67
+
68
+ #### restore
69
+
70
+ Restore cursor position.
71
+
72
+
73
+ ### scroll
74
+
75
+ #### up(count = 1)
76
+ Scroll display up a specific amount of lines. Default to `1`.
77
+
78
+ #### down(count = 1)
79
+ Scroll display down a specific amount of lines. Default to `1`.
80
+
81
+
82
+ ### erase
83
+
84
+ #### screen
85
+ Erase the screen and move the cursor the top left position.
86
+
87
+ #### up(count = 1)
88
+ Erase the screen from the current line up to the top of the screen. Default to `1`.
89
+
90
+ #### down(count = 2)
91
+ Erase the screen from the current line down to the bottom of the screen. Default to `1`.
92
+
93
+ #### line
94
+ Erase the entire current line.
95
+
96
+ #### lineEnd
97
+ Erase from the current cursor position to the end of the current line.
98
+
99
+ #### lineStart
100
+ Erase from the current cursor position to the start of the current line.
101
+
102
+ #### lines(count)
103
+ Erase from the current cursor position up the specified amount of rows.
104
+
105
+
106
+ ## Credit
107
+
108
+ This is a fork of [ansi-escapes](https://github.com/sindresorhus/ansi-escapes).
109
+
110
+
111
+ ## License
112
+
113
+ MIT © [Terkel Gjervig](https://terkel.com)
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ const ESC = '\x1B';
4
+ const CSI = `${ESC}[`;
5
+ const beep = '\u0007';
6
+
7
+ const cursor = {
8
+ to(x, y) {
9
+ if (!y) return `${CSI}${x + 1}G`;
10
+ return `${CSI}${y + 1};${x + 1}H`;
11
+ },
12
+ move(x, y) {
13
+ let ret = '';
14
+
15
+ if (x < 0) ret += `${CSI}${-x}D`;
16
+ else if (x > 0) ret += `${CSI}${x}C`;
17
+
18
+ if (y < 0) ret += `${CSI}${-y}A`;
19
+ else if (y > 0) ret += `${CSI}${y}B`;
20
+
21
+ return ret;
22
+ },
23
+ up: (count = 1) => `${CSI}${count}A`,
24
+ down: (count = 1) => `${CSI}${count}B`,
25
+ forward: (count = 1) => `${CSI}${count}C`,
26
+ backward: (count = 1) => `${CSI}${count}D`,
27
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
28
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
29
+ left: `${CSI}G`,
30
+ hide: `${CSI}?25l`,
31
+ show: `${CSI}?25h`,
32
+ save: `${ESC}7`,
33
+ restore: `${ESC}8`
34
+ }
35
+
36
+ const scroll = {
37
+ up: (count = 1) => `${CSI}S`.repeat(count),
38
+ down: (count = 1) => `${CSI}T`.repeat(count)
39
+ }
40
+
41
+ const erase = {
42
+ screen: `${CSI}2J`,
43
+ up: (count = 1) => `${CSI}1J`.repeat(count),
44
+ down: (count = 1) => `${CSI}J`.repeat(count),
45
+ line: `${CSI}2K`,
46
+ lineEnd: `${CSI}K`,
47
+ lineStart: `${CSI}1K`,
48
+ lines(count) {
49
+ let clear = '';
50
+ for (let i = 0; i < count; i++)
51
+ clear += this.line + (i < count - 1 ? cursor.up() : '');
52
+ if (count)
53
+ clear += cursor.left;
54
+ return clear;
55
+ }
56
+ }
57
+
58
+ module.exports = { cursor, scroll, erase, beep };
@@ -0,0 +1,35 @@
1
+ export const beep: string;
2
+ export const clear: string;
3
+
4
+ export namespace cursor {
5
+ export const left: string;
6
+ export const hide: string;
7
+ export const show: string;
8
+ export const save: string;
9
+ export const restore: string;
10
+
11
+ export function to(x: number, y?: number): string;
12
+ export function move(x: number, y: number): string;
13
+ export function up(count?: number): string;
14
+ export function down(count?: number): string;
15
+ export function forward(count?: number): string;
16
+ export function backward(count?: number): string;
17
+ export function nextLine(count?: number): string;
18
+ export function prevLine(count?: number): string;
19
+ }
20
+
21
+ export namespace scroll {
22
+ export function up(count?: number): string;
23
+ export function down(count?: number): string;
24
+ }
25
+
26
+ export namespace erase {
27
+ export const screen: string;
28
+ export const line: string;
29
+ export const lineEnd: string;
30
+ export const lineStart: string;
31
+
32
+ export function up(count?: number): string;
33
+ export function down(count?: number): string;
34
+ export function lines(count: number): string;
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay",
3
- "version": "4.0.18",
3
+ "version": "4.0.20",
4
4
  "description": "Real-time agent-to-agent communication system",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -195,14 +195,14 @@
195
195
  },
196
196
  "homepage": "https://github.com/AgentWorkforce/relay#readme",
197
197
  "dependencies": {
198
- "@agent-relay/cloud": "4.0.18",
199
- "@agent-relay/config": "4.0.18",
200
- "@agent-relay/hooks": "4.0.18",
201
- "@agent-relay/sdk": "4.0.18",
202
- "@agent-relay/telemetry": "4.0.18",
203
- "@agent-relay/trajectory": "4.0.18",
204
- "@agent-relay/user-directory": "4.0.18",
205
- "@agent-relay/utils": "4.0.18",
198
+ "@agent-relay/cloud": "4.0.20",
199
+ "@agent-relay/config": "4.0.20",
200
+ "@agent-relay/hooks": "4.0.20",
201
+ "@agent-relay/sdk": "4.0.20",
202
+ "@agent-relay/telemetry": "4.0.20",
203
+ "@agent-relay/trajectory": "4.0.20",
204
+ "@agent-relay/user-directory": "4.0.20",
205
+ "@agent-relay/utils": "4.0.20",
206
206
  "@aws-sdk/client-s3": "3.1020.0",
207
207
  "@modelcontextprotocol/sdk": "^1.0.0",
208
208
  "@relayauth/core": "^0.1.2",
@@ -211,6 +211,7 @@
211
211
  "@relaycast/sdk": "^1.1.0",
212
212
  "@relayfile/sdk": "^0.1.2",
213
213
  "@sinclair/typebox": "^0.34.14",
214
+ "agent-trajectories": "^0.5.4",
214
215
  "chalk": "^4.1.2",
215
216
  "chokidar": "^5.0.0",
216
217
  "commander": "^12.1.0",
@@ -247,7 +248,6 @@
247
248
  "@typescript-eslint/eslint-plugin": "^8.18.2",
248
249
  "@typescript-eslint/parser": "^8.18.2",
249
250
  "@vitest/coverage-v8": "^3.2.4",
250
- "agent-trajectories": "^0.4.1",
251
251
  "concurrently": "^9.2.1",
252
252
  "eslint": "^8.57.1",
253
253
  "husky": "^9.1.7",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/cloud",
3
- "version": "4.0.18",
3
+ "version": "4.0.20",
4
4
  "description": "Cloud SDK for Agent Relay — auth, workflow execution, and provider connections",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "test:watch": "vitest"
24
24
  },
25
25
  "dependencies": {
26
- "@agent-relay/config": "4.0.18",
26
+ "@agent-relay/config": "4.0.20",
27
27
  "@aws-sdk/client-s3": "3.1020.0",
28
28
  "ignore": "^7.0.5",
29
29
  "tar": "^7.5.10"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/config",
3
- "version": "4.0.18",
3
+ "version": "4.0.20",
4
4
  "description": "Shared configuration schemas and loaders for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",