@alpic-ai/tracks 0.4.0 → 0.4.1
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/main.js +24 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -154,14 +154,15 @@ const RunId = Schema.String.pipe(Schema.brand("RunId")).annotate({
|
|
|
154
154
|
const Harness = Schema.Literals([
|
|
155
155
|
"claude-code",
|
|
156
156
|
"codex",
|
|
157
|
-
"codex-app"
|
|
157
|
+
"codex-app",
|
|
158
|
+
"cursor"
|
|
158
159
|
]).annotate({
|
|
159
160
|
identifier: "Harness",
|
|
160
|
-
description: "The coding agent to run: `claude-code` (Claude Code), `codex` (OpenAI's Codex CLI)
|
|
161
|
+
description: "The coding agent to run: `claude-code` (Claude Code), `codex` (OpenAI's Codex CLI), `codex-app` (the Codex mode of OpenAI's ChatGPT desktop app, with its browser, computer-use and document tools) or `cursor` (Cursor's CLI)."
|
|
161
162
|
});
|
|
162
163
|
const Agent = Schema.Struct({
|
|
163
164
|
harness: Harness,
|
|
164
|
-
model: Schema.NonEmptyString.annotate({ description: "Model the agent uses, such as `claude-sonnet-5-5`." })
|
|
165
|
+
model: Schema.NonEmptyString.annotate({ description: "Model the agent uses, such as `claude-sonnet-5-5`, or a Cursor model id such as `gpt-5.6-luna-low`." })
|
|
165
166
|
}).annotate({
|
|
166
167
|
identifier: "Agent",
|
|
167
168
|
description: "The coding agent and the model it uses."
|
|
@@ -390,6 +391,10 @@ var ModelNotOffered = class extends Schema.TaggedError()("ModelNotOffered", { me
|
|
|
390
391
|
httpApiStatus: 422,
|
|
391
392
|
description: "The agent cannot use this model. The message lists the models it can use."
|
|
392
393
|
}) {};
|
|
394
|
+
var ModelProviderUnavailable = class extends Schema.TaggedError()("ModelProviderUnavailable", { message: Schema.String }, {
|
|
395
|
+
httpApiStatus: 503,
|
|
396
|
+
description: "The model provider could not be reached to check the model. Retry later."
|
|
397
|
+
}) {};
|
|
393
398
|
var RunNotIdle = class extends Schema.TaggedError()("RunNotIdle", { message: Schema.String }, {
|
|
394
399
|
httpApiStatus: 409,
|
|
395
400
|
description: "The run accepts no prompt now: it is one-shot, has ended, or is still working on a prompt."
|
|
@@ -533,7 +538,11 @@ var RunsApi = class extends HttpApiGroup.make("runs").add(HttpApiEndpoint.post("
|
|
|
533
538
|
headers: { "idempotency-key": Schema.OptionFromOptionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(255)).annotate({ description: "A unique value you choose, up to 255 characters, to retry safely: a request with a key already used in your organization returns the run the first request created, without starting another, whatever its body." })) },
|
|
534
539
|
payload: CreateRunInput,
|
|
535
540
|
success: Run.pipe(HttpApiSchema.status(201)),
|
|
536
|
-
error: [
|
|
541
|
+
error: [
|
|
542
|
+
ModelNotOffered,
|
|
543
|
+
ModelProviderUnavailable,
|
|
544
|
+
ConnectionUnusable
|
|
545
|
+
]
|
|
537
546
|
}).annotateMerge(OpenApi.annotations({
|
|
538
547
|
summary: "Create a run",
|
|
539
548
|
description: "Starts a coding agent on your prompt in a fresh sandbox. A one-shot run, the default, ends when the agent finishes; otherwise the run waits `idle` for follow-up prompts until you end it or it times out. Send an `Idempotency-Key` header to retry without creating a second run."
|
|
@@ -572,7 +581,8 @@ var RunsApi = class extends HttpApiGroup.make("runs").add(HttpApiEndpoint.post("
|
|
|
572
581
|
error: [
|
|
573
582
|
RunNotFound,
|
|
574
583
|
RunNotIdle,
|
|
575
|
-
ModelNotOffered
|
|
584
|
+
ModelNotOffered,
|
|
585
|
+
ModelProviderUnavailable
|
|
576
586
|
]
|
|
577
587
|
}).annotateMerge(OpenApi.annotations({
|
|
578
588
|
summary: "Send a follow-up prompt",
|
|
@@ -685,6 +695,8 @@ const Secrets = Schema.Struct({
|
|
|
685
695
|
E2B_API_KEY: Secret,
|
|
686
696
|
ANTHROPIC_API_KEY: Secret,
|
|
687
697
|
OPENAI_API_KEY: Secret,
|
|
698
|
+
CURSOR_API_KEY: Secret,
|
|
699
|
+
CURSOR_ADMIN_KEY: Secret,
|
|
688
700
|
TYPESAFE_API_KEY: Secret,
|
|
689
701
|
DATABASE_PASSWORD: Secret,
|
|
690
702
|
CONNECTION_ENCRYPTION_KEY: EncryptionKey,
|
|
@@ -731,7 +743,12 @@ const DATABASE_ENV = [
|
|
|
731
743
|
];
|
|
732
744
|
const DAYTONA_ENV = ["DAYTONA_API_KEY", "DAYTONA_API_URL"];
|
|
733
745
|
const E2B_ENV = ["E2B_API_KEY"];
|
|
734
|
-
const GATEWAY_ENV = [
|
|
746
|
+
const GATEWAY_ENV = [
|
|
747
|
+
"ANTHROPIC_API_KEY",
|
|
748
|
+
"OPENAI_API_KEY",
|
|
749
|
+
"CURSOR_API_KEY",
|
|
750
|
+
"CURSOR_ADMIN_KEY"
|
|
751
|
+
];
|
|
735
752
|
const CONNECTIONS_ENV = [
|
|
736
753
|
"AGENT_RUNNER_URL",
|
|
737
754
|
"CONNECTION_RETURN_ORIGINS",
|
|
@@ -768,7 +785,7 @@ SERVICE_ENV.flatMap((name) => isSecret(name) && !isDatabaseVariable(name) ? [nam
|
|
|
768
785
|
const readEnv = (...names) => Config.schema(Env.mapFields(Struct.pick(names)));
|
|
769
786
|
//#endregion
|
|
770
787
|
//#region package.json
|
|
771
|
-
var version = "0.4.
|
|
788
|
+
var version = "0.4.1";
|
|
772
789
|
//#endregion
|
|
773
790
|
//#region src/connections.ts
|
|
774
791
|
const encodeConnection = Schema.encodeEffect(Schema.fromJsonString(Connection, { space: 2 }));
|