toolcraft 0.0.117 → 0.0.119

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 (45) hide show
  1. package/composition.json +2 -17
  2. package/dist/composition.json +2 -17
  3. package/node_modules/@poe-code/agent-defs/package.json +0 -2
  4. package/node_modules/@poe-code/agent-human-in-loop/package.json +0 -2
  5. package/node_modules/@poe-code/agent-mcp-config/package.json +0 -2
  6. package/node_modules/@poe-code/config-mutations/package.json +0 -2
  7. package/node_modules/@poe-code/frontmatter/package.json +0 -2
  8. package/node_modules/@poe-code/process-runner/package.json +0 -2
  9. package/node_modules/@poe-code/task-list/package.json +0 -2
  10. package/node_modules/auth-store/package.json +0 -2
  11. package/node_modules/tiny-mcp-client/package.json +0 -2
  12. package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
  13. package/node_modules/tiny-stdio-mcp-server/dist/server.js +9 -21
  14. package/node_modules/tiny-stdio-mcp-server/dist/uri-template.d.ts +6 -0
  15. package/node_modules/tiny-stdio-mcp-server/dist/uri-template.js +363 -0
  16. package/node_modules/toolcraft-design/package.json +0 -2
  17. package/node_modules/toolcraft-schema/package.json +3 -2
  18. package/package.json +5 -9
  19. package/node_modules/pct-encode/.travis.yml +0 -7
  20. package/node_modules/pct-encode/AUTHORS +0 -2
  21. package/node_modules/pct-encode/LICENSE +0 -11
  22. package/node_modules/pct-encode/README.md +0 -20
  23. package/node_modules/pct-encode/index.js +0 -23
  24. package/node_modules/pct-encode/package.json +0 -23
  25. package/node_modules/pct-encode/test.js +0 -10
  26. package/node_modules/uri-template/AUTHORS +0 -2
  27. package/node_modules/uri-template/LICENSE +0 -19
  28. package/node_modules/uri-template/README.md +0 -34
  29. package/node_modules/uri-template/dist/ast.d.ts +0 -28
  30. package/node_modules/uri-template/dist/ast.js +0 -27
  31. package/node_modules/uri-template/dist/expander.d.ts +0 -3
  32. package/node_modules/uri-template/dist/expander.js +0 -165
  33. package/node_modules/uri-template/dist/grammar.d.ts +0 -13
  34. package/node_modules/uri-template/dist/grammar.js +0 -749
  35. package/node_modules/uri-template/dist/index.d.ts +0 -19
  36. package/node_modules/uri-template/dist/index.js +0 -43
  37. package/node_modules/uri-template/lib/ast.ts +0 -59
  38. package/node_modules/uri-template/lib/expander.ts +0 -175
  39. package/node_modules/uri-template/lib/grammar.js +0 -773
  40. package/node_modules/uri-template/lib/grammar.pegjs +0 -33
  41. package/node_modules/uri-template/lib/index.ts +0 -33
  42. package/node_modules/uri-template/package.json +0 -33
  43. package/node_modules/uri-template-lite/README.md +0 -86
  44. package/node_modules/uri-template-lite/index.js +0 -140
  45. package/node_modules/uri-template-lite/package.json +0 -43
@@ -1,7 +0,0 @@
1
- language: node_js
2
-
3
- node_js:
4
- - "0.11"
5
- - "0.10"
6
- - "0.8"
7
- - "0.6"
@@ -1,2 +0,0 @@
1
- Andrei Neculau <andrei.neculau@gmail.com>
2
- Stephen Sugden <me@stephensugden.com>
@@ -1,11 +0,0 @@
1
- Copyright (c) 2013, Stephen Sugden
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
-
7
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
-
9
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,20 +0,0 @@
1
- # pct-encode
2
-
3
- Create versions of strings where characters that match a regular expression are percent encoded.
4
-
5
- ## Synopsis
6
-
7
- ```javascript
8
- var pctEncode = require("pct-encode");
9
-
10
- var encode = pctEncode(/\W/g);
11
-
12
- console.log(encode("UTF-8 in your URIs: ✓")); // UTF-8%20in%20your%20URIs%3A%20%E2%9C%93
13
- ```
14
-
15
- ## API
16
-
17
- ### module.exports = function (regexp) -> function encode(string)
18
-
19
- Given a regular expression, this returns a function that takes a string and
20
- returns a copy with characters that match `regexp` percent-encoded.
@@ -1,23 +0,0 @@
1
- module.exports = function pctEncode(regexp) {
2
- regexp = regexp || /\W/g;
3
- return function encode(string) {
4
- string = String(string);
5
- return string.replace(regexp, function (m) {
6
- var c = m[0].charCodeAt(0)
7
- , encoded = [];
8
- if (c < 128) {
9
- encoded.push(c);
10
- } else if ((128 <= c && c < 2048)) {
11
- encoded.push((c >> 6) | 192);
12
- encoded.push((c & 63) | 128);
13
- } else {
14
- encoded.push((c >> 12) | 224);
15
- encoded.push(((c >> 6) & 63) | 128);
16
- encoded.push((c & 63) | 128);
17
- }
18
- return encoded.map(function (c) {
19
- return '%' + c.toString(16).toUpperCase();
20
- }).join('');
21
- })
22
- }
23
- }
@@ -1,23 +0,0 @@
1
- {
2
- "name": "pct-encode",
3
- "version": "1.0.3",
4
- "description": "Percent-encode characters in strings matching a regular expression",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "node test.js"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/grncdr/pct-encode"
12
- },
13
- "keywords": [
14
- "uri",
15
- "url",
16
- "pct",
17
- "encode"
18
- ],
19
- "license": "BSD-2-Clause",
20
- "devDependencies": {
21
- "tape": "~2.0.0"
22
- }
23
- }
@@ -1,10 +0,0 @@
1
- var test = require('tape')
2
- var pctEncode = require('./index.js')
3
-
4
- test('Does it work?', function (t) {
5
- t.plan(1)
6
- var encode = pctEncode(/[^\w~.\-]/g);
7
-
8
- t.equal(encode("UTF-8 in your URIs: ✓✓"),
9
- "UTF-8%20in%20your%20URIs%3A%20%E2%9C%93%E2%9C%93");
10
- })
@@ -1,2 +0,0 @@
1
- Stephen Sugden <me@stephensugden.com> (http://stephensugden.com)
2
- Andrei Neculau <andrei.neculau@gmail.com> (http://andreineculau.com)
@@ -1,19 +0,0 @@
1
- Copyright (c) 2013 Stephen Sugden
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
@@ -1,34 +0,0 @@
1
- # URI Template
2
-
3
- [![Node.js CI](https://github.com/grncdr/uri-template/actions/workflows/nodejs.yml/badge.svg)](https://github.com/grncdr/uri-template/actions/workflows/nodejs.yml)
4
-
5
- This is a node.js implementation of the URI template draft standard
6
- defined at http://tools.ietf.org/html/rfc6570
7
-
8
- ## Example
9
-
10
- ```javascript
11
- var parser = require("uri-template");
12
-
13
- var tpl = parser.parse("/{year}/{month}/{day}{?orderBy,direction}");
14
-
15
- tpl.expand({ year: 2006, month: 6, day: 6 });
16
- // /2006/6/6
17
-
18
- tpl.expand({ year: 2006, month: 6, day: 6, orderBy: "size" });
19
- // /2006/6/6?orderBy=size
20
-
21
- tpl.expand({ year: 2006, month: 6, day: 6, orderBy: "time", direction: "asc" });
22
- // /2006/6/6?orderBy=time&direction=asc
23
-
24
- var queryTpl = parser.parse("/search{?q,otherParams*}");
25
- queryTpl.expand({
26
- q: "Bigger office",
27
- otherParams: { prefer: "Sterling's office", accept: "Crane's office" },
28
- });
29
- // /search?q=Bigger%20office&prefer=Sterling%27s%20office&accept=Crane%27s%20office
30
- ```
31
-
32
- For more thorough coverage of the syntax, see the [RFC](https://datatracker.ietf.org/doc/html/rfc6570).
33
-
34
- ##
@@ -1,28 +0,0 @@
1
- export interface Template {
2
- type: "template";
3
- parts: (Literal | Expression)[];
4
- }
5
- export interface Literal {
6
- type: "literal";
7
- value: string;
8
- }
9
- export interface Expression {
10
- type: "expression";
11
- operator: Operator;
12
- variables: Variable[];
13
- }
14
- export declare type Operator = "/" | ";" | "." | "?" | "&" | "+" | "#" | "";
15
- export interface Variable {
16
- type: "variable";
17
- name: string;
18
- modifier?: SubstrModifier | ExplodeModifier;
19
- extension?: string;
20
- }
21
- export interface ExplodeModifier {
22
- type: "explode";
23
- }
24
- export interface SubstrModifier {
25
- type: "substr";
26
- length: number;
27
- }
28
- export declare function toString(node: Template | Literal | Expression | Variable): string;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.toString = void 0;
4
- function toString(node) {
5
- var _a, _b;
6
- switch (node.type) {
7
- case "template":
8
- return node.parts.map(toString).join("");
9
- case "literal":
10
- return node.value;
11
- case "expression":
12
- return "{" + node.operator + node.variables.map(toString).join(",") + "}";
13
- case "variable":
14
- var out = node.name;
15
- if (((_a = node.modifier) === null || _a === void 0 ? void 0 : _a.type) == "explode") {
16
- out += "*";
17
- }
18
- else if (((_b = node.modifier) === null || _b === void 0 ? void 0 : _b.type) == "substr") {
19
- out += ":" + node.modifier.length;
20
- }
21
- if (node.extension) {
22
- out += "(" + node.extension + ")";
23
- }
24
- return out;
25
- }
26
- }
27
- exports.toString = toString;
@@ -1,3 +0,0 @@
1
- import { Template, Expression } from "./ast";
2
- export declare function expandTemplate(ast: Template, values: Record<string, unknown>): string;
3
- export declare function expandExpression(expression: Expression, values: Record<string, unknown>): string;
@@ -1,165 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- exports.__esModule = true;
17
- exports.expandExpression = exports.expandTemplate = void 0;
18
- var pct_encode_1 = __importDefault(require("pct-encode"));
19
- var encoders = {
20
- UrlSafe: (0, pct_encode_1["default"])(/[^\w~.-]/g),
21
- Restricted: (0, pct_encode_1["default"])(/[^\w.~:\/\?#\[\]@!\$&'()*+,;=%-]|%(?!\d\d)/g)
22
- };
23
- function expandTemplate(ast, values) {
24
- var strings = ast.parts.map(function (part) {
25
- switch (part.type) {
26
- case "literal":
27
- return part.value;
28
- case "expression":
29
- return expandExpression(part, values);
30
- }
31
- });
32
- return strings.join("");
33
- }
34
- exports.expandTemplate = expandTemplate;
35
- var defaults = {
36
- first: "",
37
- sep: ",",
38
- empty: "",
39
- encode: encoders.UrlSafe,
40
- named: false
41
- };
42
- var OperatorConfigs = {
43
- "": __assign({}, defaults),
44
- "+": __assign(__assign({}, defaults), { encode: encoders.Restricted }),
45
- "#": __assign(__assign({}, defaults), { encode: encoders.Restricted, first: "#", empty: "#" }),
46
- "/": __assign(__assign({}, defaults), { first: "/", sep: "/" }),
47
- ".": __assign(__assign({}, defaults), { first: ".", sep: ".", empty: "." }),
48
- ";": __assign(__assign({}, defaults), { first: ";", sep: ";", named: true }),
49
- "?": __assign(__assign({}, defaults), { first: "?", sep: "&", empty: "=", named: true }),
50
- "&": __assign(__assign({}, defaults), { first: "&", sep: "&", empty: "=", named: true })
51
- };
52
- function expandExpression(expression, values) {
53
- var config = OperatorConfigs[expression.operator];
54
- var strings = [];
55
- expression.variables.forEach(function (variable) {
56
- var value = values[variable.name];
57
- if (!present(value))
58
- return;
59
- var string = expandVariable(variable, value, config);
60
- strings.push(string || "");
61
- });
62
- if (strings.length === 0) {
63
- return "";
64
- }
65
- var expanded = strings.join(config.sep);
66
- if (expanded.length === 0) {
67
- return config.empty;
68
- }
69
- return config.first + expanded;
70
- }
71
- exports.expandExpression = expandExpression;
72
- function expandVariable(variable, value, config) {
73
- var _a;
74
- if (value == null) {
75
- throw new TypeError("tried to expand null value for variable " + variable.name + ", this is a bug in uri-template");
76
- }
77
- if (((_a = variable.modifier) === null || _a === void 0 ? void 0 : _a.type) === "explode") {
78
- return expandValueExplode(variable, value, config);
79
- }
80
- else {
81
- return expandValueSingle(variable, value, config);
82
- }
83
- }
84
- function expandValueSingle(variable, value, _a) {
85
- var _b, _c;
86
- var empty = _a.empty, encode = _a.encode, named = _a.named;
87
- if (typeof value === "object" && ((_b = variable.modifier) === null || _b === void 0 ? void 0 : _b.type) === "substr") {
88
- throw new Error("Prefixed variables do not support lists/maps. Check " + variable.name);
89
- }
90
- var out;
91
- if (Array.isArray(value)) {
92
- out = value.map(encode).join(",");
93
- }
94
- else if (typeof value === "object") {
95
- out = Object.entries(value)
96
- .map(function (entry) { return entry.map(encode).join(","); })
97
- .join(",");
98
- }
99
- else {
100
- out = value.toString();
101
- if (((_c = variable.modifier) === null || _c === void 0 ? void 0 : _c.type) === "substr") {
102
- out = out.substring(0, variable.modifier.length);
103
- }
104
- out = encode(out);
105
- }
106
- if (named) {
107
- if (out) {
108
- out = variable.name + "=" + out;
109
- }
110
- else {
111
- out = "" + variable.name + empty;
112
- }
113
- }
114
- return out;
115
- }
116
- function expandValueExplode(variable, value, _a) {
117
- var encode = _a.encode, named = _a.named, sep = _a.sep;
118
- if (Array.isArray(value)) {
119
- var items = value.map(encode);
120
- if (named) {
121
- items = items.map(function (item) { return variable.name + "=" + item; });
122
- }
123
- return items.join(sep);
124
- }
125
- else if (typeof value === "object") {
126
- var pairs_1 = [];
127
- Object.entries(value).forEach(function (_a) {
128
- var k = _a[0], v = _a[1];
129
- k = encode(k);
130
- if (Array.isArray(v)) {
131
- v.forEach(function (item) {
132
- pairs_1.push(k + "=" + encode(item));
133
- });
134
- }
135
- else {
136
- pairs_1.push(k + "=" + encode(v));
137
- }
138
- });
139
- return pairs_1.join(sep);
140
- }
141
- else {
142
- var s = value.toString();
143
- return encode(s);
144
- }
145
- }
146
- function present(v) {
147
- switch (typeof v) {
148
- case "undefined":
149
- return false;
150
- case "object":
151
- if (v == null) {
152
- return false;
153
- }
154
- if (Array.isArray(v)) {
155
- return v.length > 0;
156
- }
157
- for (var k in v) {
158
- if (v[k] != null)
159
- return true;
160
- }
161
- return false;
162
- default:
163
- return true;
164
- }
165
- }
@@ -1,13 +0,0 @@
1
- declare function peg$SyntaxError(message: any, expected: any, found: any, location: any): Error;
2
- declare class peg$SyntaxError {
3
- constructor(message: any, expected: any, found: any, location: any);
4
- format(sources: any): string;
5
- }
6
- declare namespace peg$SyntaxError {
7
- function buildMessage(expected: any, found: any): string;
8
- }
9
- declare function peg$parse(input: any, options: any): {
10
- type: string;
11
- parts: any;
12
- };
13
- export { peg$SyntaxError as SyntaxError, peg$parse as parse };