poe-code 3.0.186 → 3.0.188

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 (90) hide show
  1. package/dist/cli/commands/experiment.js +1 -1
  2. package/dist/cli/commands/experiment.js.map +1 -1
  3. package/dist/cli/commands/pipeline-init.js +1 -1
  4. package/dist/cli/commands/pipeline-init.js.map +1 -1
  5. package/dist/cli/commands/pipeline.js +1 -1
  6. package/dist/cli/commands/pipeline.js.map +1 -1
  7. package/dist/cli/commands/spawn.js +2 -1
  8. package/dist/cli/commands/spawn.js.map +1 -1
  9. package/dist/cli/program.js +6 -6
  10. package/dist/cli/program.js.map +1 -1
  11. package/dist/index.js +122 -225
  12. package/dist/index.js.map +4 -4
  13. package/dist/providers/claude-code.js +2 -76
  14. package/dist/providers/claude-code.js.map +4 -4
  15. package/dist/providers/codex.js +2 -76
  16. package/dist/providers/codex.js.map +4 -4
  17. package/dist/providers/goose.js +2 -76
  18. package/dist/providers/goose.js.map +4 -4
  19. package/dist/providers/kimi.js +2 -76
  20. package/dist/providers/kimi.js.map +4 -4
  21. package/dist/providers/opencode.js +2 -76
  22. package/dist/providers/opencode.js.map +4 -4
  23. package/dist/providers/poe-agent.js +23 -107
  24. package/dist/providers/poe-agent.js.map +4 -4
  25. package/dist/sdk/experiment.js +1 -1
  26. package/dist/sdk/experiment.js.map +1 -1
  27. package/package.json +10 -30
  28. package/packages/design-system/dist/prompts/primitives/cancel.d.ts +1 -1
  29. package/packages/design-system/dist/prompts/primitives/cancel.js +1 -1
  30. package/packages/cmdkit/dist/cli.compile-check.d.ts +0 -1
  31. package/packages/cmdkit/dist/cli.compile-check.js +0 -26
  32. package/packages/cmdkit/dist/cli.d.ts +0 -12
  33. package/packages/cmdkit/dist/cli.js +0 -2331
  34. package/packages/cmdkit/dist/cli.js.map +0 -7
  35. package/packages/cmdkit/dist/index.compile-check.d.ts +0 -1
  36. package/packages/cmdkit/dist/index.compile-check.js +0 -50
  37. package/packages/cmdkit/dist/index.d.ts +0 -164
  38. package/packages/cmdkit/dist/index.js +0 -561
  39. package/packages/cmdkit/dist/index.js.map +0 -7
  40. package/packages/cmdkit/dist/mcp.compile-check.d.ts +0 -1
  41. package/packages/cmdkit/dist/mcp.compile-check.js +0 -26
  42. package/packages/cmdkit/dist/mcp.d.ts +0 -31
  43. package/packages/cmdkit/dist/mcp.js +0 -1254
  44. package/packages/cmdkit/dist/mcp.js.map +0 -7
  45. package/packages/cmdkit/dist/number-schema.d.ts +0 -3
  46. package/packages/cmdkit/dist/number-schema.js +0 -8
  47. package/packages/cmdkit/dist/renderer.d.ts +0 -5
  48. package/packages/cmdkit/dist/renderer.js +0 -164
  49. package/packages/cmdkit/dist/renderer.js.map +0 -7
  50. package/packages/cmdkit/dist/schema-scope.d.ts +0 -4
  51. package/packages/cmdkit/dist/schema-scope.js +0 -34
  52. package/packages/cmdkit/dist/sdk.compile-check.d.ts +0 -1
  53. package/packages/cmdkit/dist/sdk.compile-check.js +0 -79
  54. package/packages/cmdkit/dist/sdk.d.ts +0 -63
  55. package/packages/cmdkit/dist/sdk.js +0 -369
  56. package/packages/cmdkit/dist/sdk.js.map +0 -7
  57. package/packages/cmdkit-openapi/dist/api-command.d.ts +0 -7
  58. package/packages/cmdkit-openapi/dist/api-command.js +0 -4
  59. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.d.ts +0 -8
  60. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.js +0 -216
  61. package/packages/cmdkit-openapi/dist/auth/types.d.ts +0 -9
  62. package/packages/cmdkit-openapi/dist/auth/types.js +0 -1
  63. package/packages/cmdkit-openapi/dist/bin/generate.d.ts +0 -40
  64. package/packages/cmdkit-openapi/dist/bin/generate.js +0 -248
  65. package/packages/cmdkit-openapi/dist/define-client.d.ts +0 -20
  66. package/packages/cmdkit-openapi/dist/define-client.js +0 -148
  67. package/packages/cmdkit-openapi/dist/generate.d.ts +0 -210
  68. package/packages/cmdkit-openapi/dist/generate.js +0 -1091
  69. package/packages/cmdkit-openapi/dist/group-by-noun.d.ts +0 -6
  70. package/packages/cmdkit-openapi/dist/group-by-noun.js +0 -17
  71. package/packages/cmdkit-openapi/dist/http.d.ts +0 -26
  72. package/packages/cmdkit-openapi/dist/http.js +0 -123
  73. package/packages/cmdkit-openapi/dist/index.d.ts +0 -12
  74. package/packages/cmdkit-openapi/dist/index.js +0 -6
  75. package/packages/cmdkit-openapi/dist/interpreter.d.ts +0 -6
  76. package/packages/cmdkit-openapi/dist/interpreter.js +0 -289
  77. package/packages/cmdkit-openapi/dist/lock.d.ts +0 -14
  78. package/packages/cmdkit-openapi/dist/lock.js +0 -48
  79. package/packages/cmdkit-openapi/dist/naming.d.ts +0 -24
  80. package/packages/cmdkit-openapi/dist/naming.js +0 -218
  81. package/packages/cmdkit-openapi/dist/request-shape.d.ts +0 -15
  82. package/packages/cmdkit-openapi/dist/request-shape.js +0 -5
  83. package/packages/cmdkit-openapi/dist/runtime.d.ts +0 -13
  84. package/packages/cmdkit-openapi/dist/runtime.js +0 -94
  85. package/packages/cmdkit-openapi/dist/spec-source.d.ts +0 -11
  86. package/packages/cmdkit-openapi/dist/spec-source.js +0 -63
  87. package/packages/cmdkit-schema/dist/index.compile-check.d.ts +0 -1
  88. package/packages/cmdkit-schema/dist/index.compile-check.js +0 -12
  89. package/packages/cmdkit-schema/dist/index.d.ts +0 -124
  90. package/packages/cmdkit-schema/dist/index.js +0 -175
@@ -1,175 +0,0 @@
1
- function withMetadata(schema, jsonSchema) {
2
- if (schema.description !== undefined) {
3
- jsonSchema.description = schema.description;
4
- }
5
- if (schema.default !== undefined) {
6
- jsonSchema.default = schema.default;
7
- }
8
- if (schema.nullable === true) {
9
- jsonSchema.nullable = true;
10
- }
11
- return jsonSchema;
12
- }
13
- function withStringMetadata(schema, jsonSchema) {
14
- if (schema.minLength !== undefined) {
15
- jsonSchema.minLength = schema.minLength;
16
- }
17
- if (schema.maxLength !== undefined) {
18
- jsonSchema.maxLength = schema.maxLength;
19
- }
20
- if (schema.pattern !== undefined) {
21
- jsonSchema.pattern = schema.pattern;
22
- }
23
- if (schema.format !== undefined) {
24
- jsonSchema.format = schema.format;
25
- }
26
- return withMetadata(schema, jsonSchema);
27
- }
28
- function withNumberMetadata(schema, jsonSchema) {
29
- if (schema.minimum !== undefined) {
30
- jsonSchema.minimum = schema.minimum;
31
- }
32
- if (schema.maximum !== undefined) {
33
- jsonSchema.maximum = schema.maximum;
34
- }
35
- return withMetadata(schema, jsonSchema);
36
- }
37
- function withArrayMetadata(schema, jsonSchema) {
38
- if (schema.minItems !== undefined) {
39
- jsonSchema.minItems = schema.minItems;
40
- }
41
- if (schema.maxItems !== undefined) {
42
- jsonSchema.maxItems = schema.maxItems;
43
- }
44
- return withMetadata(schema, jsonSchema);
45
- }
46
- function withObjectMetadata(schema, jsonSchema) {
47
- if (schema.additionalProperties !== undefined) {
48
- jsonSchema.additionalProperties = schema.additionalProperties;
49
- }
50
- return withMetadata(schema, jsonSchema);
51
- }
52
- function getEnumJsonType(values) {
53
- const [firstValue] = values;
54
- if (firstValue === undefined) {
55
- return undefined;
56
- }
57
- const firstType = typeof firstValue;
58
- const isSinglePrimitiveType = values.every((value) => typeof value === firstType);
59
- if (!isSinglePrimitiveType) {
60
- return undefined;
61
- }
62
- if (firstType === "string" || firstType === "number" || firstType === "boolean") {
63
- return firstType;
64
- }
65
- return undefined;
66
- }
67
- function isOptionalSchema(schema) {
68
- return schema.kind === "optional";
69
- }
70
- function assertValidEnumValues(values) {
71
- if (values.length === 0) {
72
- throw new Error("Enum schema requires at least one value");
73
- }
74
- const uniqueValues = new Set(values);
75
- if (uniqueValues.size !== values.length) {
76
- throw new Error("Enum schema values must be unique");
77
- }
78
- }
79
- function unwrapOptional(schema) {
80
- if (isOptionalSchema(schema)) {
81
- return unwrapOptional(schema.inner);
82
- }
83
- return schema;
84
- }
85
- export const S = {
86
- String(options = {}) {
87
- return {
88
- kind: "string",
89
- ...options,
90
- };
91
- },
92
- Number(options = {}) {
93
- return {
94
- kind: "number",
95
- ...options,
96
- };
97
- },
98
- Boolean(options = {}) {
99
- return {
100
- kind: "boolean",
101
- ...options,
102
- };
103
- },
104
- Enum(values, options = {}) {
105
- assertValidEnumValues(values);
106
- return {
107
- kind: "enum",
108
- values,
109
- ...options,
110
- };
111
- },
112
- Array(item, options = {}) {
113
- return {
114
- kind: "array",
115
- item,
116
- ...options,
117
- };
118
- },
119
- Object(shape, options = {}) {
120
- return {
121
- kind: "object",
122
- shape,
123
- ...options,
124
- };
125
- },
126
- Optional(inner) {
127
- return {
128
- kind: "optional",
129
- inner,
130
- };
131
- },
132
- };
133
- export function toJsonSchema(schema) {
134
- const unwrappedSchema = unwrapOptional(schema);
135
- switch (unwrappedSchema.kind) {
136
- case "string":
137
- return withStringMetadata(unwrappedSchema, { type: "string" });
138
- case "number":
139
- return withNumberMetadata(unwrappedSchema, { type: unwrappedSchema.jsonType ?? "number" });
140
- case "boolean":
141
- return withMetadata(unwrappedSchema, { type: "boolean" });
142
- case "enum": {
143
- const jsonSchema = {
144
- enum: unwrappedSchema.nullable === true
145
- ? [...unwrappedSchema.values, null]
146
- : [...unwrappedSchema.values],
147
- };
148
- const enumType = unwrappedSchema.jsonType ?? getEnumJsonType(unwrappedSchema.values);
149
- if (enumType !== undefined) {
150
- jsonSchema.type = enumType;
151
- }
152
- return withMetadata(unwrappedSchema, jsonSchema);
153
- }
154
- case "array":
155
- return withArrayMetadata(unwrappedSchema, {
156
- type: "array",
157
- items: toJsonSchema(unwrappedSchema.item),
158
- });
159
- case "object": {
160
- const properties = {};
161
- const required = [];
162
- for (const [key, propertySchema] of Object.entries(unwrappedSchema.shape)) {
163
- properties[key] = toJsonSchema(propertySchema);
164
- if (!isOptionalSchema(propertySchema)) {
165
- required.push(key);
166
- }
167
- }
168
- return withObjectMetadata(unwrappedSchema, {
169
- type: "object",
170
- properties,
171
- required,
172
- });
173
- }
174
- }
175
- }