@rippling/rippling-sdk 0.2.0-alpha.115 → 0.2.0-alpha.117
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/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/manifest/acp-agent-source-files.d.mts +2 -1
- package/lib/manifest/acp-agent-source-files.d.mts.map +1 -1
- package/lib/manifest/acp-agent-source-files.d.ts +2 -1
- package/lib/manifest/acp-agent-source-files.d.ts.map +1 -1
- package/lib/manifest/acp-agent-source-files.js +21 -2
- package/lib/manifest/acp-agent-source-files.js.map +1 -1
- package/lib/manifest/acp-agent-source-files.mjs +21 -2
- package/lib/manifest/acp-agent-source-files.mjs.map +1 -1
- package/lib/manifest/package-manifest.d.mts +39 -2
- package/lib/manifest/package-manifest.d.mts.map +1 -1
- package/lib/manifest/package-manifest.d.ts +39 -2
- package/lib/manifest/package-manifest.d.ts.map +1 -1
- package/lib/manifest/package-manifest.js +37 -0
- package/lib/manifest/package-manifest.js.map +1 -1
- package/lib/manifest/package-manifest.mjs +37 -0
- package/lib/manifest/package-manifest.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +70 -7
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +70 -7
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +20 -7
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +20 -7
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/sessions/messages.d.mts +16 -1
- package/resources/agents/sessions/messages.d.mts.map +1 -1
- package/resources/agents/sessions/messages.d.ts +16 -1
- package/resources/agents/sessions/messages.d.ts.map +1 -1
- package/resources/agents/sessions/messages.js +4 -1
- package/resources/agents/sessions/messages.js.map +1 -1
- package/resources/agents/sessions/messages.mjs +4 -1
- package/resources/agents/sessions/messages.mjs.map +1 -1
- package/resources/card-transactions.d.mts +759 -54
- package/resources/card-transactions.d.mts.map +1 -1
- package/resources/card-transactions.d.ts +759 -54
- package/resources/card-transactions.d.ts.map +1 -1
- package/resources/card-transactions.js +204 -0
- package/resources/card-transactions.js.map +1 -1
- package/resources/card-transactions.mjs +204 -0
- package/resources/card-transactions.mjs.map +1 -1
- package/resources/custom-apps.d.mts +6 -6
- package/resources/custom-apps.d.ts +6 -6
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/package-manifests/packages/versions.d.mts +10 -0
- package/resources/package-manifests/packages/versions.d.mts.map +1 -1
- package/resources/package-manifests/packages/versions.d.ts +10 -0
- package/resources/package-manifests/packages/versions.d.ts.map +1 -1
- package/resources/package-manifests/packages/versions.js +1 -0
- package/resources/package-manifests/packages/versions.js.map +1 -1
- package/resources/package-manifests/packages/versions.mjs +1 -0
- package/resources/package-manifests/packages/versions.mjs.map +1 -1
- package/resources/package-versions/package-versions.d.mts +35 -5
- package/resources/package-versions/package-versions.d.mts.map +1 -1
- package/resources/package-versions/package-versions.d.ts +35 -5
- package/resources/package-versions/package-versions.d.ts.map +1 -1
- package/resources/package-versions/package-versions.js +8 -5
- package/resources/package-versions/package-versions.js.map +1 -1
- package/resources/package-versions/package-versions.mjs +8 -5
- package/resources/package-versions/package-versions.mjs.map +1 -1
- package/resources/package-versions/publish.d.mts +10 -0
- package/resources/package-versions/publish.d.mts.map +1 -1
- package/resources/package-versions/publish.d.ts +10 -0
- package/resources/package-versions/publish.d.ts.map +1 -1
- package/resources/package-versions/publish.js +1 -0
- package/resources/package-versions/publish.js.map +1 -1
- package/resources/package-versions/publish.mjs +1 -0
- package/resources/package-versions/publish.mjs.map +1 -1
- package/resources/packages/next-versions.d.mts +10 -0
- package/resources/packages/next-versions.d.mts.map +1 -1
- package/resources/packages/next-versions.d.ts +10 -0
- package/resources/packages/next-versions.d.ts.map +1 -1
- package/resources/packages/next-versions.js +1 -0
- package/resources/packages/next-versions.js.map +1 -1
- package/resources/packages/next-versions.mjs +1 -0
- package/resources/packages/next-versions.mjs.map +1 -1
- package/resources/packages/versions.d.mts +20 -0
- package/resources/packages/versions.d.mts.map +1 -1
- package/resources/packages/versions.d.ts +20 -0
- package/resources/packages/versions.d.ts.map +1 -1
- package/resources/packages/versions.js +2 -0
- package/resources/packages/versions.js.map +1 -1
- package/resources/packages/versions.mjs +2 -0
- package/resources/packages/versions.mjs.map +1 -1
- package/resources/reimbursements.d.mts +1086 -44
- package/resources/reimbursements.d.mts.map +1 -1
- package/resources/reimbursements.d.ts +1086 -44
- package/resources/reimbursements.d.ts.map +1 -1
- package/resources/reimbursements.js +212 -0
- package/resources/reimbursements.js.map +1 -1
- package/resources/reimbursements.mjs +212 -0
- package/resources/reimbursements.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/lib/manifest/acp-agent-source-files.ts +17 -2
- package/src/lib/manifest/definitions/README.md +64 -0
- package/src/lib/manifest/package-manifest.ts +88 -2
- package/src/resources/agents/agents.ts +80 -7
- package/src/resources/agents/sessions/messages.ts +17 -1
- package/src/resources/card-transactions.ts +881 -40
- package/src/resources/custom-apps.ts +6 -6
- package/src/resources/index.ts +4 -0
- package/src/resources/package-manifests/packages/versions.ts +11 -0
- package/src/resources/package-versions/package-versions.ts +38 -5
- package/src/resources/package-versions/publish.ts +11 -0
- package/src/resources/packages/next-versions.ts +11 -0
- package/src/resources/packages/versions.ts +22 -0
- package/src/resources/reimbursements.ts +1266 -31
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/client.ts
CHANGED
|
@@ -193,6 +193,8 @@ import {
|
|
|
193
193
|
CardTransactionRetrieveResponse,
|
|
194
194
|
CardTransactionUpdateParams,
|
|
195
195
|
CardTransactionUpdateResponse,
|
|
196
|
+
CardTransactionUploadAttachmentParams,
|
|
197
|
+
CardTransactionUploadAttachmentResponse,
|
|
196
198
|
CardTransactionUploadReceiptParams,
|
|
197
199
|
CardTransactionUploadReceiptResponse,
|
|
198
200
|
CardTransactions,
|
|
@@ -647,6 +649,8 @@ import {
|
|
|
647
649
|
ReimbursementRetrieveResponse,
|
|
648
650
|
ReimbursementUpdateParams,
|
|
649
651
|
ReimbursementUpdateResponse,
|
|
652
|
+
ReimbursementUploadAttachmentParams,
|
|
653
|
+
ReimbursementUploadAttachmentResponse,
|
|
650
654
|
ReimbursementUploadReceiptParams,
|
|
651
655
|
ReimbursementUploadReceiptResponse,
|
|
652
656
|
Reimbursements,
|
|
@@ -2890,11 +2894,13 @@ export declare namespace RipplingSDK {
|
|
|
2890
2894
|
type CardTransactionListResponse as CardTransactionListResponse,
|
|
2891
2895
|
type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse,
|
|
2892
2896
|
type CardTransactionUpdateResponse as CardTransactionUpdateResponse,
|
|
2897
|
+
type CardTransactionUploadAttachmentResponse as CardTransactionUploadAttachmentResponse,
|
|
2893
2898
|
type CardTransactionUploadReceiptResponse as CardTransactionUploadReceiptResponse,
|
|
2894
2899
|
type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL,
|
|
2895
2900
|
type CardTransactionListParams as CardTransactionListParams,
|
|
2896
2901
|
type CardTransactionRetrieveParams as CardTransactionRetrieveParams,
|
|
2897
2902
|
type CardTransactionUpdateParams as CardTransactionUpdateParams,
|
|
2903
|
+
type CardTransactionUploadAttachmentParams as CardTransactionUploadAttachmentParams,
|
|
2898
2904
|
type CardTransactionUploadReceiptParams as CardTransactionUploadReceiptParams,
|
|
2899
2905
|
};
|
|
2900
2906
|
|
|
@@ -3294,11 +3300,13 @@ export declare namespace RipplingSDK {
|
|
|
3294
3300
|
type ReimbursementListResponse as ReimbursementListResponse,
|
|
3295
3301
|
type ReimbursementRetrieveResponse as ReimbursementRetrieveResponse,
|
|
3296
3302
|
type ReimbursementUpdateResponse as ReimbursementUpdateResponse,
|
|
3303
|
+
type ReimbursementUploadAttachmentResponse as ReimbursementUploadAttachmentResponse,
|
|
3297
3304
|
type ReimbursementUploadReceiptResponse as ReimbursementUploadReceiptResponse,
|
|
3298
3305
|
type ReimbursementListResponsesPageCursorURL as ReimbursementListResponsesPageCursorURL,
|
|
3299
3306
|
type ReimbursementListParams as ReimbursementListParams,
|
|
3300
3307
|
type ReimbursementRetrieveParams as ReimbursementRetrieveParams,
|
|
3301
3308
|
type ReimbursementUpdateParams as ReimbursementUpdateParams,
|
|
3309
|
+
type ReimbursementUploadAttachmentParams as ReimbursementUploadAttachmentParams,
|
|
3302
3310
|
type ReimbursementUploadReceiptParams as ReimbursementUploadReceiptParams,
|
|
3303
3311
|
};
|
|
3304
3312
|
|
|
@@ -8,12 +8,14 @@ import type { ACPAgentSourceFile } from './acp-agent';
|
|
|
8
8
|
*
|
|
9
9
|
* Paths in the returned source revision are relative to the current working
|
|
10
10
|
* directory. Run the manifest from its package root and pass the directory
|
|
11
|
-
* containing agent source, such as `src`.
|
|
11
|
+
* containing agent source, such as `src`. Root dependency files are included
|
|
12
|
+
* unchanged. Optional lockfiles and pnpm workspace settings may be absent.
|
|
12
13
|
*/
|
|
13
14
|
export async function discoverACPAgentSourceFiles(sourceDirectory: string): Promise<ACPAgentSourceFile[]> {
|
|
14
15
|
const root = process.cwd();
|
|
15
16
|
const sourceRoot = path.resolve(root, sourceDirectory);
|
|
16
17
|
const files: ACPAgentSourceFile[] = [];
|
|
18
|
+
const metadata = ['package.json', 'package-lock.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml'];
|
|
17
19
|
|
|
18
20
|
async function visit(directory: string): Promise<void> {
|
|
19
21
|
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
@@ -24,7 +26,8 @@ export async function discoverACPAgentSourceFiles(sourceDirectory: string): Prom
|
|
|
24
26
|
}
|
|
25
27
|
continue;
|
|
26
28
|
}
|
|
27
|
-
if (!entry.isFile()) continue;
|
|
29
|
+
if (!entry.isFile() || entry.name === '.npmrc') continue;
|
|
30
|
+
if (metadata.includes(path.relative(root, fullPath))) continue;
|
|
28
31
|
|
|
29
32
|
files.push({
|
|
30
33
|
path: path.relative(root, fullPath).split(path.sep).join('/'),
|
|
@@ -38,5 +41,17 @@ export async function discoverACPAgentSourceFiles(sourceDirectory: string): Prom
|
|
|
38
41
|
if (files.length === 0) {
|
|
39
42
|
throw new Error(`No source files found under ${sourceDirectory}.`);
|
|
40
43
|
}
|
|
44
|
+
for (const filename of metadata) {
|
|
45
|
+
if (files.some((file) => file.path === filename)) continue;
|
|
46
|
+
try {
|
|
47
|
+
files.push({
|
|
48
|
+
path: filename,
|
|
49
|
+
content: await readFile(path.join(root, filename), 'utf8'),
|
|
50
|
+
kind: 'typescript',
|
|
51
|
+
});
|
|
52
|
+
} catch (error) {
|
|
53
|
+
if (filename === 'package.json' || (error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
41
56
|
return files.sort((left, right) => left.path.localeCompare(right.path));
|
|
42
57
|
}
|
|
@@ -92,6 +92,70 @@ const run = await client.metadata.deploymentRuns.create({ components });
|
|
|
92
92
|
|
|
93
93
|
Poll `client.metadata.deploymentRuns.get(run.id)` until `terminal` is true, then inspect `status`, `result` and `error`. `client.metadata.components.deploy({ components })` is the synchronous alternative; inspect its `success` and `error`. Pass the compiled `components` array in either request. Deployment applies components to the authenticated company and enforces Composer permissions and update restrictions. Package publication remains a separate operation.
|
|
94
94
|
|
|
95
|
+
## Package manifests
|
|
96
|
+
|
|
97
|
+
Wrap a source manifest with `definePackageManifest` to configure package information
|
|
98
|
+
and optional post-install behavior:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import { definePackageManifest } from '@rippling/rippling-sdk';
|
|
102
|
+
import manifest from './rippling.manifest.js';
|
|
103
|
+
import { supportHub } from './components/support-hub.js';
|
|
104
|
+
import { initializeSupportHub } from './components/initialize-support-hub.js';
|
|
105
|
+
|
|
106
|
+
export default definePackageManifest({
|
|
107
|
+
package: { key: 'support_hub', name: 'Support Hub', type: 'managed' },
|
|
108
|
+
version: '1.0.0',
|
|
109
|
+
manifest,
|
|
110
|
+
postInstallFunction: initializeSupportHub,
|
|
111
|
+
postInstallLandingComponent: supportHub,
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`initializeSupportHub` is a `defineFunction` result, and `supportHub` is a
|
|
116
|
+
`defineApp` result. TypeScript rejects other landing component kinds,
|
|
117
|
+
and the SDK also checks the kind for JavaScript callers.
|
|
118
|
+
Both definitions must already belong to `manifest`;
|
|
119
|
+
these options never add components.
|
|
120
|
+
The SDK rejects references missing from that source manifest.
|
|
121
|
+
Wrap the original `defineManifest` result before compiling sources or exporting JSON;
|
|
122
|
+
definition references depend on its authoring bookkeeping.
|
|
123
|
+
The wrapper resolves each definition from the manifest's serialized snapshots:
|
|
124
|
+
the Function becomes its API-name string, and the landing component becomes
|
|
125
|
+
its primary component config in the serialized package metadata.
|
|
126
|
+
It preserves the source manifest without compiling its files.
|
|
127
|
+
The backend validates membership in the actual stored package version
|
|
128
|
+
and eligibility for the selected post-install behavior,
|
|
129
|
+
and stores only the canonical landing identifier.
|
|
130
|
+
|
|
131
|
+
Omitted options stay absent from the serialized package metadata.
|
|
132
|
+
For the package-version settings PATCH, omission preserves the current value;
|
|
133
|
+
`postInstallFunction: null` clears the hook,
|
|
134
|
+
and `postInstallLandingComponent: null` restores the default landing selection
|
|
135
|
+
(the first packaged Custom App, if any).
|
|
136
|
+
|
|
137
|
+
`rippling project package` consumes this package manifest.
|
|
138
|
+
Its `version` selects the target package version.
|
|
139
|
+
For a missing target, it packages the components and code,
|
|
140
|
+
then PATCHes the supplied post-install settings before any requested publication.
|
|
141
|
+
An existing target rejects packaging;
|
|
142
|
+
use `--bump` to create a new snapshot and apply its supplied settings,
|
|
143
|
+
or `--settings-only` to PATCH selections on an existing unpublished draft
|
|
144
|
+
without uploading components or publishing.
|
|
145
|
+
Published versions require a new version for changes.
|
|
146
|
+
|
|
147
|
+
```sh
|
|
148
|
+
# Create the selected version when absent.
|
|
149
|
+
rippling project package .
|
|
150
|
+
# Create the next patch version, then apply its settings.
|
|
151
|
+
rippling project package . --bump
|
|
152
|
+
# Apply selections to the selected existing unpublished draft.
|
|
153
|
+
rippling project package . --settings-only
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Publication is explicit: request `--force-publish` when creating a version,
|
|
157
|
+
or publish an existing draft through the package-version API or UI.
|
|
158
|
+
|
|
95
159
|
## Custom Settings and Function dependencies
|
|
96
160
|
|
|
97
161
|
`defineCustomSetting` can create a setting. Provide both `viewGroup` and `manageGroup` as `defineGroup` definitions with the intended audience rules; the backend creates those groups inline with the setting. Both groups are required for creation. Omitting them when updating an existing setting preserves its groups. The backend rejects a creation missing either group. Secret settings require destination secret setup when installed through packaging.
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { MetadataManifest } from './metadata-manifest';
|
|
2
|
+
import type { DefinedFunction } from './definitions/function/definition';
|
|
3
|
+
import type { App } from './definitions/app/definition';
|
|
4
|
+
import { registeredComponent } from './definitions/component';
|
|
5
|
+
|
|
6
|
+
const manifestDefinitionConfigs = Symbol.for('@rippling/sdk/manifest-definition-configs');
|
|
2
7
|
|
|
3
8
|
/** Publisher-owned package information, independent of component identities. */
|
|
4
9
|
export interface PackageInformation {
|
|
@@ -8,15 +13,82 @@ export interface PackageInformation {
|
|
|
8
13
|
description?: string;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Serialized metadata resolved from a packaged component definition.
|
|
18
|
+
* The backend validates the selection and stores its canonical identifier.
|
|
19
|
+
*/
|
|
20
|
+
export type PackageComponentIdentifier = Readonly<Record<string, unknown> & { type: string }>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Serialized package information and a reference to the project's source manifest.
|
|
24
|
+
* Post-install values resolve from that manifest's component snapshots.
|
|
25
|
+
*/
|
|
12
26
|
export interface PackageManifest {
|
|
13
27
|
package: PackageInformation;
|
|
14
28
|
version: string;
|
|
15
29
|
manifest: Readonly<MetadataManifest>;
|
|
30
|
+
/**
|
|
31
|
+
* Serialized API name resolved from the packaged Function definition.
|
|
32
|
+
* When applied through PATCH, omission preserves the hook; null clears it.
|
|
33
|
+
*/
|
|
34
|
+
postInstallFunction?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Serialized config resolved from the packaged Custom App definition.
|
|
37
|
+
* When applied through PATCH, omission preserves the selection;
|
|
38
|
+
* null restores the default landing selection.
|
|
39
|
+
*/
|
|
40
|
+
postInstallLandingComponent?: PackageComponentIdentifier | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Authoring options; definition references resolve against the original defineManifest result,
|
|
45
|
+
* before source compilation or JSON export.
|
|
46
|
+
* Selections never add components; missing source-manifest definitions are rejected locally.
|
|
47
|
+
* The backend validates membership and eligibility in the stored package version.
|
|
48
|
+
*/
|
|
49
|
+
export interface PackageManifestInput
|
|
50
|
+
extends Omit<PackageManifest, 'postInstallFunction' | 'postInstallLandingComponent'> {
|
|
51
|
+
/** A defineFunction definition already in the manifest, or null to clear the hook. */
|
|
52
|
+
postInstallFunction?: DefinedFunction<any, any> | null;
|
|
53
|
+
/**
|
|
54
|
+
* A defineApp definition already in the manifest, or null to restore the default landing.
|
|
55
|
+
*/
|
|
56
|
+
postInstallLandingComponent?: App | null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function componentConfig(
|
|
60
|
+
manifest: Readonly<MetadataManifest>,
|
|
61
|
+
definition: object,
|
|
62
|
+
option: string,
|
|
63
|
+
): PackageComponentIdentifier {
|
|
64
|
+
const registered = registeredComponent(definition);
|
|
65
|
+
if (registered == null) throw new Error(`${option} must reference a registered component definition.`);
|
|
66
|
+
const configs = (
|
|
67
|
+
manifest as Readonly<MetadataManifest> & {
|
|
68
|
+
readonly [manifestDefinitionConfigs]?: ReadonlyMap<object, readonly PackageComponentIdentifier[]>;
|
|
69
|
+
}
|
|
70
|
+
)[manifestDefinitionConfigs]?.get(definition);
|
|
71
|
+
if (configs == null)
|
|
72
|
+
throw new Error(`${option} definition must already be included in the supplied manifest.`);
|
|
73
|
+
const primary = configs.filter((config) => config.type === registered.type);
|
|
74
|
+
if (primary.length !== 1)
|
|
75
|
+
throw new Error(`${option} definition must resolve to exactly one primary component config.`);
|
|
76
|
+
return primary[0]!;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function landingComponentConfig(
|
|
80
|
+
manifest: Readonly<MetadataManifest>,
|
|
81
|
+
value: PackageManifestInput['postInstallLandingComponent'],
|
|
82
|
+
): PackageManifest['postInstallLandingComponent'] {
|
|
83
|
+
if (value == null) return value;
|
|
84
|
+
const config = componentConfig(manifest, value, 'Post-install landing component');
|
|
85
|
+
if (config.type !== 'CUSTOM_APP')
|
|
86
|
+
throw new Error('Post-install landing component must reference a Custom App definition.');
|
|
87
|
+
return Object.freeze({ ...config });
|
|
16
88
|
}
|
|
17
89
|
|
|
18
90
|
/** Define package information around an existing manifest without compiling its sources. */
|
|
19
|
-
export function definePackageManifest(input:
|
|
91
|
+
export function definePackageManifest(input: PackageManifestInput): Readonly<PackageManifest> {
|
|
20
92
|
if (!/^[a-z][a-z0-9_]{0,99}$/.test(input.package.key))
|
|
21
93
|
throw new Error(
|
|
22
94
|
'Package key must start with a lowercase letter and contain only lowercase letters, digits, or underscores (maximum 100 characters).',
|
|
@@ -32,9 +104,23 @@ export function definePackageManifest(input: PackageManifest): Readonly<PackageM
|
|
|
32
104
|
throw new Error('Package manifest requires metadata and components.');
|
|
33
105
|
if (input.manifest.components_to_delete != null && input.manifest.components_to_delete.length > 0)
|
|
34
106
|
throw new Error('Package snapshots cannot contain component deletions.');
|
|
107
|
+
let postInstallFunction: PackageManifest['postInstallFunction'];
|
|
108
|
+
if (input.postInstallFunction == null) {
|
|
109
|
+
postInstallFunction = input.postInstallFunction;
|
|
110
|
+
} else {
|
|
111
|
+
const config = componentConfig(input.manifest, input.postInstallFunction, 'Post-install Function');
|
|
112
|
+
if (config.type !== 'FUNCTION')
|
|
113
|
+
throw new Error('Post-install Function must reference a Function definition.');
|
|
114
|
+
if (typeof config['api_name'] !== 'string' || config['api_name'].trim() === '')
|
|
115
|
+
throw new Error('Post-install Function definition must have a nonempty API name.');
|
|
116
|
+
postInstallFunction = config['api_name'];
|
|
117
|
+
}
|
|
118
|
+
const landing = landingComponentConfig(input.manifest, input.postInstallLandingComponent);
|
|
35
119
|
return Object.freeze({
|
|
36
120
|
package: Object.freeze({ ...input.package }),
|
|
37
121
|
version: input.version,
|
|
38
122
|
manifest: input.manifest,
|
|
123
|
+
...(postInstallFunction === undefined ? {} : { postInstallFunction }),
|
|
124
|
+
...(landing === undefined ? {} : { postInstallLandingComponent: landing }),
|
|
39
125
|
});
|
|
40
126
|
}
|
|
@@ -46,7 +46,8 @@ export class Agents extends APIResource {
|
|
|
46
46
|
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* List locally created agents and company-installed global agents. Use the
|
|
50
|
+
* read-only is_global field to distinguish them.
|
|
50
51
|
*
|
|
51
52
|
* @example HTTP
|
|
52
53
|
* Representative request and response shapes.
|
|
@@ -68,7 +69,9 @@ export class Agents extends APIResource {
|
|
|
68
69
|
* "name": "string",
|
|
69
70
|
* "api_name": "string",
|
|
70
71
|
* "description": "string",
|
|
71
|
-
* "is_for_evals": false
|
|
72
|
+
* "is_for_evals": false,
|
|
73
|
+
* "is_callable_by_rai": false,
|
|
74
|
+
* "is_global": false
|
|
72
75
|
* }
|
|
73
76
|
* ],
|
|
74
77
|
* "next_link": "string"
|
|
@@ -109,7 +112,9 @@ export class Agents extends APIResource {
|
|
|
109
112
|
* "name": "string",
|
|
110
113
|
* "api_name": "string",
|
|
111
114
|
* "description": "string",
|
|
112
|
-
* "is_for_evals": false
|
|
115
|
+
* "is_for_evals": false,
|
|
116
|
+
* "is_callable_by_rai": false,
|
|
117
|
+
* "is_global": false
|
|
113
118
|
* }
|
|
114
119
|
* ```
|
|
115
120
|
*/
|
|
@@ -118,7 +123,8 @@ export class Agents extends APIResource {
|
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
/**
|
|
121
|
-
* Retrieve
|
|
126
|
+
* Retrieve a locally created agent or a company-installed global agent. Use the
|
|
127
|
+
* read-only is_global field to distinguish them.
|
|
122
128
|
*
|
|
123
129
|
* @example HTTP
|
|
124
130
|
* Representative request and response shapes.
|
|
@@ -138,7 +144,9 @@ export class Agents extends APIResource {
|
|
|
138
144
|
* "name": "string",
|
|
139
145
|
* "api_name": "string",
|
|
140
146
|
* "description": "string",
|
|
141
|
-
* "is_for_evals": false
|
|
147
|
+
* "is_for_evals": false,
|
|
148
|
+
* "is_callable_by_rai": false,
|
|
149
|
+
* "is_global": false
|
|
142
150
|
* }
|
|
143
151
|
* ```
|
|
144
152
|
*/
|
|
@@ -147,7 +155,10 @@ export class Agents extends APIResource {
|
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
/**
|
|
150
|
-
* Update an agent's name or
|
|
158
|
+
* Update an agent's name, description, or Rippling AI call setting. The
|
|
159
|
+
* `is_callable_by_rai` setting controls whether Rippling AI can find and run the
|
|
160
|
+
* agent for people with Runner access. The setting can be enabled or disabled, and
|
|
161
|
+
* repeating the same update is safe. Omitted fields remain unchanged.
|
|
151
162
|
*
|
|
152
163
|
* @example HTTP
|
|
153
164
|
* Representative request and response shapes.
|
|
@@ -170,7 +181,9 @@ export class Agents extends APIResource {
|
|
|
170
181
|
* "name": "string",
|
|
171
182
|
* "api_name": "string",
|
|
172
183
|
* "description": "string",
|
|
173
|
-
* "is_for_evals": false
|
|
184
|
+
* "is_for_evals": false,
|
|
185
|
+
* "is_callable_by_rai": false,
|
|
186
|
+
* "is_global": false
|
|
174
187
|
* }
|
|
175
188
|
* ```
|
|
176
189
|
*/
|
|
@@ -236,10 +249,22 @@ export interface AgentListResponse {
|
|
|
236
249
|
*/
|
|
237
250
|
description?: string;
|
|
238
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
254
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
255
|
+
*/
|
|
256
|
+
is_callable_by_rai?: boolean;
|
|
257
|
+
|
|
239
258
|
/**
|
|
240
259
|
* Whether the agent is used for evaluations
|
|
241
260
|
*/
|
|
242
261
|
is_for_evals?: boolean;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Whether the agent is a global agent installed in the company. Read-only; cannot
|
|
265
|
+
* be set on create or update.
|
|
266
|
+
*/
|
|
267
|
+
is_global?: boolean;
|
|
243
268
|
}
|
|
244
269
|
|
|
245
270
|
export interface AgentCreateResponse {
|
|
@@ -273,10 +298,22 @@ export interface AgentCreateResponse {
|
|
|
273
298
|
*/
|
|
274
299
|
description?: string;
|
|
275
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
303
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
304
|
+
*/
|
|
305
|
+
is_callable_by_rai?: boolean;
|
|
306
|
+
|
|
276
307
|
/**
|
|
277
308
|
* Whether the agent is used for evaluations
|
|
278
309
|
*/
|
|
279
310
|
is_for_evals?: boolean;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Whether the agent is a global agent installed in the company. Read-only; cannot
|
|
314
|
+
* be set on create or update.
|
|
315
|
+
*/
|
|
316
|
+
is_global?: boolean;
|
|
280
317
|
}
|
|
281
318
|
|
|
282
319
|
export interface AgentRetrieveResponse {
|
|
@@ -310,10 +347,22 @@ export interface AgentRetrieveResponse {
|
|
|
310
347
|
*/
|
|
311
348
|
description?: string;
|
|
312
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
352
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
353
|
+
*/
|
|
354
|
+
is_callable_by_rai?: boolean;
|
|
355
|
+
|
|
313
356
|
/**
|
|
314
357
|
* Whether the agent is used for evaluations
|
|
315
358
|
*/
|
|
316
359
|
is_for_evals?: boolean;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Whether the agent is a global agent installed in the company. Read-only; cannot
|
|
363
|
+
* be set on create or update.
|
|
364
|
+
*/
|
|
365
|
+
is_global?: boolean;
|
|
317
366
|
}
|
|
318
367
|
|
|
319
368
|
export interface AgentUpdateResponse {
|
|
@@ -347,10 +396,22 @@ export interface AgentUpdateResponse {
|
|
|
347
396
|
*/
|
|
348
397
|
description?: string;
|
|
349
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
401
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
402
|
+
*/
|
|
403
|
+
is_callable_by_rai?: boolean;
|
|
404
|
+
|
|
350
405
|
/**
|
|
351
406
|
* Whether the agent is used for evaluations
|
|
352
407
|
*/
|
|
353
408
|
is_for_evals?: boolean;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Whether the agent is a global agent installed in the company. Read-only; cannot
|
|
412
|
+
* be set on create or update.
|
|
413
|
+
*/
|
|
414
|
+
is_global?: boolean;
|
|
354
415
|
}
|
|
355
416
|
|
|
356
417
|
export interface AgentListParams {
|
|
@@ -386,6 +447,12 @@ export interface AgentCreateParams {
|
|
|
386
447
|
*/
|
|
387
448
|
description?: string;
|
|
388
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
452
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
453
|
+
*/
|
|
454
|
+
is_callable_by_rai?: boolean;
|
|
455
|
+
|
|
389
456
|
/**
|
|
390
457
|
* Whether the agent is used for evaluations
|
|
391
458
|
*/
|
|
@@ -398,6 +465,12 @@ export interface AgentUpdateParams {
|
|
|
398
465
|
*/
|
|
399
466
|
description?: string;
|
|
400
467
|
|
|
468
|
+
/**
|
|
469
|
+
* Whether Rippling AI can find and run this agent for people with Runner access.
|
|
470
|
+
* Defaults to false on create; unchanged when omitted from an update.
|
|
471
|
+
*/
|
|
472
|
+
is_callable_by_rai?: boolean;
|
|
473
|
+
|
|
401
474
|
/**
|
|
402
475
|
* The display name of the agent
|
|
403
476
|
*/
|
|
@@ -10,7 +10,10 @@ import { path } from '../../../internal/utils/path';
|
|
|
10
10
|
*/
|
|
11
11
|
export class Messages extends APIResource {
|
|
12
12
|
/**
|
|
13
|
-
* Append a user prompt to an existing agent session.
|
|
13
|
+
* Append a user prompt to an existing agent session. To retry without creating a
|
|
14
|
+
* new submission, provide the same idempotency_key and identical prompt. Omitting
|
|
15
|
+
* the key or sending null creates a distinct submission for each request. See the
|
|
16
|
+
* field description for replay limitations.
|
|
14
17
|
*
|
|
15
18
|
* @example HTTP
|
|
16
19
|
* Representative request and response shapes.
|
|
@@ -144,6 +147,19 @@ export interface MessageCreateParams {
|
|
|
144
147
|
* The next user prompt.
|
|
145
148
|
*/
|
|
146
149
|
prompt: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Optional append-message retry key. Reuse a supplied key only for the same
|
|
153
|
+
* session and an identical prompt, including retries while an earlier call is in
|
|
154
|
+
* flight. If the prompt differs, behavior is not guaranteed: the request may be
|
|
155
|
+
* rejected or the original submission may be returned without applying the changed
|
|
156
|
+
* prompt. Do not rely on changed-prompt retries to submit new instructions; use a
|
|
157
|
+
* new key. Omission or null generates a new key per HTTP request, so keyless
|
|
158
|
+
* retries are distinct submissions. The receipt confirms admission, not
|
|
159
|
+
* completion. Replay requires retained submission records and a valid session
|
|
160
|
+
* lifecycle; no fixed retention window is guaranteed.
|
|
161
|
+
*/
|
|
162
|
+
idempotency_key?: string | null;
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
export declare namespace Messages {
|