poe-code 3.0.187 → 3.0.189

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 (95) 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/prompts/github-issue-comment-created.md +1 -0
  14. package/dist/prompts/github-issue-opened.md +1 -0
  15. package/dist/prompts/github-pull-request-comment-created.md +1 -0
  16. package/dist/prompts/github-pull-request-opened.md +1 -0
  17. package/dist/prompts/github-pull-request-synchronized.md +1 -0
  18. package/dist/providers/claude-code.js +2 -76
  19. package/dist/providers/claude-code.js.map +4 -4
  20. package/dist/providers/codex.js +2 -76
  21. package/dist/providers/codex.js.map +4 -4
  22. package/dist/providers/goose.js +2 -76
  23. package/dist/providers/goose.js.map +4 -4
  24. package/dist/providers/kimi.js +2 -76
  25. package/dist/providers/kimi.js.map +4 -4
  26. package/dist/providers/opencode.js +2 -76
  27. package/dist/providers/opencode.js.map +4 -4
  28. package/dist/providers/poe-agent.js +23 -107
  29. package/dist/providers/poe-agent.js.map +4 -4
  30. package/dist/sdk/experiment.js +1 -1
  31. package/dist/sdk/experiment.js.map +1 -1
  32. package/package.json +10 -30
  33. package/packages/design-system/dist/prompts/primitives/cancel.d.ts +1 -1
  34. package/packages/design-system/dist/prompts/primitives/cancel.js +1 -1
  35. package/packages/cmdkit/dist/cli.compile-check.d.ts +0 -1
  36. package/packages/cmdkit/dist/cli.compile-check.js +0 -26
  37. package/packages/cmdkit/dist/cli.d.ts +0 -12
  38. package/packages/cmdkit/dist/cli.js +0 -2331
  39. package/packages/cmdkit/dist/cli.js.map +0 -7
  40. package/packages/cmdkit/dist/index.compile-check.d.ts +0 -1
  41. package/packages/cmdkit/dist/index.compile-check.js +0 -50
  42. package/packages/cmdkit/dist/index.d.ts +0 -164
  43. package/packages/cmdkit/dist/index.js +0 -561
  44. package/packages/cmdkit/dist/index.js.map +0 -7
  45. package/packages/cmdkit/dist/mcp.compile-check.d.ts +0 -1
  46. package/packages/cmdkit/dist/mcp.compile-check.js +0 -26
  47. package/packages/cmdkit/dist/mcp.d.ts +0 -31
  48. package/packages/cmdkit/dist/mcp.js +0 -1254
  49. package/packages/cmdkit/dist/mcp.js.map +0 -7
  50. package/packages/cmdkit/dist/number-schema.d.ts +0 -3
  51. package/packages/cmdkit/dist/number-schema.js +0 -8
  52. package/packages/cmdkit/dist/renderer.d.ts +0 -5
  53. package/packages/cmdkit/dist/renderer.js +0 -164
  54. package/packages/cmdkit/dist/renderer.js.map +0 -7
  55. package/packages/cmdkit/dist/schema-scope.d.ts +0 -4
  56. package/packages/cmdkit/dist/schema-scope.js +0 -34
  57. package/packages/cmdkit/dist/sdk.compile-check.d.ts +0 -1
  58. package/packages/cmdkit/dist/sdk.compile-check.js +0 -79
  59. package/packages/cmdkit/dist/sdk.d.ts +0 -63
  60. package/packages/cmdkit/dist/sdk.js +0 -369
  61. package/packages/cmdkit/dist/sdk.js.map +0 -7
  62. package/packages/cmdkit-openapi/dist/api-command.d.ts +0 -7
  63. package/packages/cmdkit-openapi/dist/api-command.js +0 -4
  64. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.d.ts +0 -8
  65. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.js +0 -216
  66. package/packages/cmdkit-openapi/dist/auth/types.d.ts +0 -9
  67. package/packages/cmdkit-openapi/dist/auth/types.js +0 -1
  68. package/packages/cmdkit-openapi/dist/bin/generate.d.ts +0 -40
  69. package/packages/cmdkit-openapi/dist/bin/generate.js +0 -248
  70. package/packages/cmdkit-openapi/dist/define-client.d.ts +0 -20
  71. package/packages/cmdkit-openapi/dist/define-client.js +0 -148
  72. package/packages/cmdkit-openapi/dist/generate.d.ts +0 -210
  73. package/packages/cmdkit-openapi/dist/generate.js +0 -1131
  74. package/packages/cmdkit-openapi/dist/group-by-noun.d.ts +0 -6
  75. package/packages/cmdkit-openapi/dist/group-by-noun.js +0 -17
  76. package/packages/cmdkit-openapi/dist/http.d.ts +0 -26
  77. package/packages/cmdkit-openapi/dist/http.js +0 -123
  78. package/packages/cmdkit-openapi/dist/index.d.ts +0 -12
  79. package/packages/cmdkit-openapi/dist/index.js +0 -6
  80. package/packages/cmdkit-openapi/dist/interpreter.d.ts +0 -6
  81. package/packages/cmdkit-openapi/dist/interpreter.js +0 -289
  82. package/packages/cmdkit-openapi/dist/lock.d.ts +0 -14
  83. package/packages/cmdkit-openapi/dist/lock.js +0 -48
  84. package/packages/cmdkit-openapi/dist/naming.d.ts +0 -24
  85. package/packages/cmdkit-openapi/dist/naming.js +0 -218
  86. package/packages/cmdkit-openapi/dist/request-shape.d.ts +0 -15
  87. package/packages/cmdkit-openapi/dist/request-shape.js +0 -5
  88. package/packages/cmdkit-openapi/dist/runtime.d.ts +0 -13
  89. package/packages/cmdkit-openapi/dist/runtime.js +0 -94
  90. package/packages/cmdkit-openapi/dist/spec-source.d.ts +0 -11
  91. package/packages/cmdkit-openapi/dist/spec-source.js +0 -63
  92. package/packages/cmdkit-schema/dist/index.compile-check.d.ts +0 -1
  93. package/packages/cmdkit-schema/dist/index.compile-check.js +0 -12
  94. package/packages/cmdkit-schema/dist/index.d.ts +0 -124
  95. 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
- }