@clocknext/sdk 0.16.0 → 0.17.0
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/README.md +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/types.ts +8 -3
package/README.md
CHANGED
|
@@ -727,7 +727,7 @@ const credit = await cnk.credits.create({
|
|
|
727
727
|
agentKey: "deep_research",
|
|
728
728
|
marginPercent: 20,
|
|
729
729
|
modelBundle: [
|
|
730
|
-
{
|
|
730
|
+
{ modelId: "claude-sonnet-4-5", averageTokensPerLLMCall: 100000, input: 60, output: 30, cache: 5, cacheWrite: 5 },
|
|
731
731
|
],
|
|
732
732
|
});
|
|
733
733
|
|
|
@@ -737,7 +737,7 @@ const outcome = await cnk.outcomes.create({
|
|
|
737
737
|
marginPercent: 100,
|
|
738
738
|
steps: [
|
|
739
739
|
{ name: "Extract clauses", agentKey: "contract_review.extract",
|
|
740
|
-
modelBundle: [{
|
|
740
|
+
modelBundle: [{ modelId: "claude-sonnet-4-5", averageTokensPerLLMCall: 50000, input: 70, output: 30, cache: 0 }] },
|
|
741
741
|
],
|
|
742
742
|
});
|
|
743
743
|
|
|
@@ -771,8 +771,8 @@ await cnk.units.archive(unit.id); // retire it
|
|
|
771
771
|
await cnk.units.unarchive(unit.id); // and bring it back
|
|
772
772
|
```
|
|
773
773
|
|
|
774
|
-
Models are enabled in the ClockNext dashboard
|
|
775
|
-
the
|
|
774
|
+
Models are enabled in the ClockNext dashboard. A bundle line names its model by
|
|
775
|
+
`modelId` — the same id you send as `usage.model` on a signal.
|
|
776
776
|
|
|
777
777
|
## Customer portal
|
|
778
778
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -713,8 +713,10 @@ interface CreatePlanInput {
|
|
|
713
713
|
type UpdatePlanInput = Partial<CreatePlanInput>;
|
|
714
714
|
/** One model line of a credit's / outcome step's pricing bundle, as returned. */
|
|
715
715
|
interface ModelBundleLine {
|
|
716
|
-
/** The
|
|
717
|
-
|
|
716
|
+
/** The model's id — the same one a usage signal sends as `usage.model`.
|
|
717
|
+
* `null` only when the model was removed from the workspace after this
|
|
718
|
+
* bundle was saved (the line keeps its name and stored price). */
|
|
719
|
+
modelId: string | null;
|
|
718
720
|
/** The model's display name, filled in by the server. */
|
|
719
721
|
modelName: string;
|
|
720
722
|
/** Average tokens one LLM call uses on this model. */
|
|
@@ -730,7 +732,10 @@ interface ModelBundleLine {
|
|
|
730
732
|
* the price is the sum of their costs, worked out on the server from the
|
|
731
733
|
* models' live prices. */
|
|
732
734
|
interface ModelBundleLineInput {
|
|
733
|
-
|
|
735
|
+
/** The model's id, e.g. `"gpt-4o"` — the same one a usage signal sends as
|
|
736
|
+
* `usage.model`. Matched ignoring case; it must be enabled in your
|
|
737
|
+
* workspace. */
|
|
738
|
+
modelId: string;
|
|
734
739
|
/** Above 0. */
|
|
735
740
|
averageTokensPerLLMCall: number;
|
|
736
741
|
input: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -713,8 +713,10 @@ interface CreatePlanInput {
|
|
|
713
713
|
type UpdatePlanInput = Partial<CreatePlanInput>;
|
|
714
714
|
/** One model line of a credit's / outcome step's pricing bundle, as returned. */
|
|
715
715
|
interface ModelBundleLine {
|
|
716
|
-
/** The
|
|
717
|
-
|
|
716
|
+
/** The model's id — the same one a usage signal sends as `usage.model`.
|
|
717
|
+
* `null` only when the model was removed from the workspace after this
|
|
718
|
+
* bundle was saved (the line keeps its name and stored price). */
|
|
719
|
+
modelId: string | null;
|
|
718
720
|
/** The model's display name, filled in by the server. */
|
|
719
721
|
modelName: string;
|
|
720
722
|
/** Average tokens one LLM call uses on this model. */
|
|
@@ -730,7 +732,10 @@ interface ModelBundleLine {
|
|
|
730
732
|
* the price is the sum of their costs, worked out on the server from the
|
|
731
733
|
* models' live prices. */
|
|
732
734
|
interface ModelBundleLineInput {
|
|
733
|
-
|
|
735
|
+
/** The model's id, e.g. `"gpt-4o"` — the same one a usage signal sends as
|
|
736
|
+
* `usage.model`. Matched ignoring case; it must be enabled in your
|
|
737
|
+
* workspace. */
|
|
738
|
+
modelId: string;
|
|
734
739
|
/** Above 0. */
|
|
735
740
|
averageTokensPerLLMCall: number;
|
|
736
741
|
input: number;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -785,8 +785,10 @@ export type UpdatePlanInput = Partial<CreatePlanInput>;
|
|
|
785
785
|
|
|
786
786
|
/** One model line of a credit's / outcome step's pricing bundle, as returned. */
|
|
787
787
|
export interface ModelBundleLine {
|
|
788
|
-
/** The
|
|
789
|
-
|
|
788
|
+
/** The model's id — the same one a usage signal sends as `usage.model`.
|
|
789
|
+
* `null` only when the model was removed from the workspace after this
|
|
790
|
+
* bundle was saved (the line keeps its name and stored price). */
|
|
791
|
+
modelId: string | null;
|
|
790
792
|
/** The model's display name, filled in by the server. */
|
|
791
793
|
modelName: string;
|
|
792
794
|
/** Average tokens one LLM call uses on this model. */
|
|
@@ -803,7 +805,10 @@ export interface ModelBundleLine {
|
|
|
803
805
|
* the price is the sum of their costs, worked out on the server from the
|
|
804
806
|
* models' live prices. */
|
|
805
807
|
export interface ModelBundleLineInput {
|
|
806
|
-
|
|
808
|
+
/** The model's id, e.g. `"gpt-4o"` — the same one a usage signal sends as
|
|
809
|
+
* `usage.model`. Matched ignoring case; it must be enabled in your
|
|
810
|
+
* workspace. */
|
|
811
|
+
modelId: string;
|
|
807
812
|
/** Above 0. */
|
|
808
813
|
averageTokensPerLLMCall: number;
|
|
809
814
|
input: number;
|