asqend-mcp-contracts 0.3.2
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/batch-execute.d.ts +29 -0
- package/dist/batch-execute.js +109 -0
- package/dist/definitions.d.ts +1 -0
- package/dist/definitions.js +1 -0
- package/dist/dispatch.d.ts +1 -0
- package/dist/dispatch.js +1 -0
- package/dist/fallback-set.d.ts +1 -0
- package/dist/fallback-set.js +1 -0
- package/dist/generated/hosted.bridge.json +12061 -0
- package/dist/generated/tools.definitions.d.ts +2 -0
- package/dist/generated/tools.definitions.js +6997 -0
- package/dist/generated/tools.dispatch.d.ts +6 -0
- package/dist/generated/tools.dispatch.js +587 -0
- package/dist/generated/tools.fallback-set.d.ts +1 -0
- package/dist/generated/tools.fallback-set.js +9 -0
- package/dist/generated/tools.manifest.json +9957 -0
- package/dist/generated/tools.visibility.d.ts +1 -0
- package/dist/generated/tools.visibility.js +120 -0
- package/dist/generated/tools.write-set.d.ts +1 -0
- package/dist/generated/tools.write-set.js +93 -0
- package/dist/hosted-bridge.d.ts +2 -0
- package/dist/hosted-bridge.js +2 -0
- package/dist/hosted-rollout.d.ts +7 -0
- package/dist/hosted-rollout.js +12 -0
- package/dist/hosted-tools.d.ts +10 -0
- package/dist/hosted-tools.js +180 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +11 -0
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.js +2 -0
- package/dist/transport-support.d.ts +7 -0
- package/dist/transport-support.js +139 -0
- package/dist/types.d.ts +77 -0
- package/dist/types.js +1 -0
- package/dist/visibility.d.ts +1 -0
- package/dist/visibility.js +1 -0
- package/dist/write-set.d.ts +1 -0
- package/dist/write-set.js +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generatedDefaultVisibleToolNames: Set<string>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/* AUTO-GENERATED: DO NOT EDIT DIRECTLY. */
|
|
2
|
+
export const generatedDefaultVisibleToolNames = new Set([
|
|
3
|
+
"platform_discover",
|
|
4
|
+
"platform_capability_fulfillments_get",
|
|
5
|
+
"platform_capability_fulfillments_update",
|
|
6
|
+
"web_search",
|
|
7
|
+
"web_fetch",
|
|
8
|
+
"get_pending_work",
|
|
9
|
+
"heartbeat",
|
|
10
|
+
"complete_task",
|
|
11
|
+
"fail_task",
|
|
12
|
+
"objects_list",
|
|
13
|
+
"objects_create",
|
|
14
|
+
"objects_update",
|
|
15
|
+
"objects_seed_system",
|
|
16
|
+
"templates_get",
|
|
17
|
+
"templates_install",
|
|
18
|
+
"systems_templates_list",
|
|
19
|
+
"systems_templates_get",
|
|
20
|
+
"systems_template_deploy",
|
|
21
|
+
"systems_get",
|
|
22
|
+
"systems_run_now",
|
|
23
|
+
"systems_run_get",
|
|
24
|
+
"systems_run_steps_get",
|
|
25
|
+
"systems_run_events_get",
|
|
26
|
+
"systems_update",
|
|
27
|
+
"systems_form_get",
|
|
28
|
+
"systems_form_submit",
|
|
29
|
+
"systems_portal_get",
|
|
30
|
+
"systems_queue_get",
|
|
31
|
+
"systems_queue_list_items",
|
|
32
|
+
"systems_queue_get_item",
|
|
33
|
+
"systems_queue_claim",
|
|
34
|
+
"systems_queue_release",
|
|
35
|
+
"systems_queue_start_session",
|
|
36
|
+
"systems_session_get",
|
|
37
|
+
"systems_session_action_execute",
|
|
38
|
+
"systems_session_close",
|
|
39
|
+
"systems_hosted_chat_context_get",
|
|
40
|
+
"systems_propose_action_revision",
|
|
41
|
+
"systems_social_content_draft_capture",
|
|
42
|
+
"systems_social_content_draft_update",
|
|
43
|
+
"meetings_context_get",
|
|
44
|
+
"meetings_ingest_manual_source",
|
|
45
|
+
"meetings_propose_action_review",
|
|
46
|
+
"meetings_participant_identity_update",
|
|
47
|
+
"systems_plan_patch",
|
|
48
|
+
"systems_apply_patch",
|
|
49
|
+
"systems_rollback",
|
|
50
|
+
"objects_execute_build_plan",
|
|
51
|
+
"fields_create",
|
|
52
|
+
"fields_create_batch",
|
|
53
|
+
"relations_create",
|
|
54
|
+
"relations_attach",
|
|
55
|
+
"relations_detach",
|
|
56
|
+
"relations_replace",
|
|
57
|
+
"records_list",
|
|
58
|
+
"records_get",
|
|
59
|
+
"records_lookup_exact",
|
|
60
|
+
"records_create",
|
|
61
|
+
"records_create_batch",
|
|
62
|
+
"records_upsert",
|
|
63
|
+
"records_update",
|
|
64
|
+
"records_delete",
|
|
65
|
+
"record_comments_create",
|
|
66
|
+
"record_comments_update",
|
|
67
|
+
"record_comments_delete",
|
|
68
|
+
"record_checklist_create",
|
|
69
|
+
"record_checklist_update",
|
|
70
|
+
"record_checklist_delete",
|
|
71
|
+
"record_attachments_upload",
|
|
72
|
+
"record_attachments_delete",
|
|
73
|
+
"triggers_create",
|
|
74
|
+
"triggers_update",
|
|
75
|
+
"triggers_delete",
|
|
76
|
+
"batch_execute",
|
|
77
|
+
"project_execution_context",
|
|
78
|
+
"calendar_get_event",
|
|
79
|
+
"calendar_create_focus_block",
|
|
80
|
+
"calendar_move_event",
|
|
81
|
+
"calendar_create_event",
|
|
82
|
+
"calendar_update_event",
|
|
83
|
+
"calendar_delete_event",
|
|
84
|
+
"email_accounts_list",
|
|
85
|
+
"email_label_create",
|
|
86
|
+
"email_message_get",
|
|
87
|
+
"email_attachment_get",
|
|
88
|
+
"email_reply_send",
|
|
89
|
+
"email_reply_with_attachment",
|
|
90
|
+
"email_compose",
|
|
91
|
+
"email_compose_with_attachment",
|
|
92
|
+
"email_forward",
|
|
93
|
+
"email_draft_create",
|
|
94
|
+
"email_draft_send",
|
|
95
|
+
"email_draft_delete",
|
|
96
|
+
"email_search",
|
|
97
|
+
"email_thread_get",
|
|
98
|
+
"email_modify",
|
|
99
|
+
"email_archive_thread",
|
|
100
|
+
"drive_create",
|
|
101
|
+
"drive_copy",
|
|
102
|
+
"drive_create_folder",
|
|
103
|
+
"drive_upload",
|
|
104
|
+
"drive_share",
|
|
105
|
+
"drive_delete",
|
|
106
|
+
"drive_move",
|
|
107
|
+
"drive_rename",
|
|
108
|
+
"sheets_write_values",
|
|
109
|
+
"sheets_append_rows",
|
|
110
|
+
"sheets_create_spreadsheet",
|
|
111
|
+
"sheets_add_tab",
|
|
112
|
+
"sheets_clear_range",
|
|
113
|
+
"sheets_format_cells",
|
|
114
|
+
"sheets_batch_update",
|
|
115
|
+
"docs_replace_text",
|
|
116
|
+
"docs_batch_update",
|
|
117
|
+
"docs_create_tab",
|
|
118
|
+
"docs_write_tab",
|
|
119
|
+
"docs_insert_text"
|
|
120
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generatedWriteTools: Set<string>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* AUTO-GENERATED: DO NOT EDIT DIRECTLY. */
|
|
2
|
+
export const generatedWriteTools = new Set([
|
|
3
|
+
"platform_capability_fulfillments_update",
|
|
4
|
+
"get_pending_work",
|
|
5
|
+
"heartbeat",
|
|
6
|
+
"complete_task",
|
|
7
|
+
"fail_task",
|
|
8
|
+
"objects_create",
|
|
9
|
+
"objects_update",
|
|
10
|
+
"objects_seed_system",
|
|
11
|
+
"templates_install",
|
|
12
|
+
"systems_template_deploy",
|
|
13
|
+
"systems_run_now",
|
|
14
|
+
"systems_update",
|
|
15
|
+
"systems_form_submit",
|
|
16
|
+
"systems_queue_claim",
|
|
17
|
+
"systems_queue_release",
|
|
18
|
+
"systems_queue_start_session",
|
|
19
|
+
"systems_session_action_execute",
|
|
20
|
+
"systems_session_close",
|
|
21
|
+
"systems_propose_action_revision",
|
|
22
|
+
"systems_social_content_draft_capture",
|
|
23
|
+
"systems_social_content_draft_update",
|
|
24
|
+
"meetings_ingest_manual_source",
|
|
25
|
+
"meetings_propose_action_review",
|
|
26
|
+
"meetings_participant_identity_update",
|
|
27
|
+
"systems_plan_patch",
|
|
28
|
+
"systems_apply_patch",
|
|
29
|
+
"systems_rollback",
|
|
30
|
+
"objects_execute_build_plan",
|
|
31
|
+
"fields_create",
|
|
32
|
+
"fields_create_batch",
|
|
33
|
+
"fields_update",
|
|
34
|
+
"fields_delete",
|
|
35
|
+
"relations_create",
|
|
36
|
+
"relations_update",
|
|
37
|
+
"relations_delete",
|
|
38
|
+
"relations_attach",
|
|
39
|
+
"relations_detach",
|
|
40
|
+
"relations_replace",
|
|
41
|
+
"records_create",
|
|
42
|
+
"records_create_batch",
|
|
43
|
+
"records_upsert",
|
|
44
|
+
"records_update",
|
|
45
|
+
"records_delete",
|
|
46
|
+
"record_comments_create",
|
|
47
|
+
"record_comments_update",
|
|
48
|
+
"record_comments_delete",
|
|
49
|
+
"record_checklist_create",
|
|
50
|
+
"record_checklist_update",
|
|
51
|
+
"record_checklist_delete",
|
|
52
|
+
"record_attachments_upload",
|
|
53
|
+
"record_attachments_delete",
|
|
54
|
+
"triggers_create",
|
|
55
|
+
"triggers_update",
|
|
56
|
+
"triggers_delete",
|
|
57
|
+
"calendar_create_focus_block",
|
|
58
|
+
"calendar_move_event",
|
|
59
|
+
"calendar_create_event",
|
|
60
|
+
"calendar_update_event",
|
|
61
|
+
"calendar_delete_event",
|
|
62
|
+
"email_label_create",
|
|
63
|
+
"email_reply_send",
|
|
64
|
+
"email_reply_with_attachment",
|
|
65
|
+
"email_compose",
|
|
66
|
+
"email_compose_with_attachment",
|
|
67
|
+
"email_forward",
|
|
68
|
+
"email_draft_create",
|
|
69
|
+
"email_draft_send",
|
|
70
|
+
"email_draft_delete",
|
|
71
|
+
"email_modify",
|
|
72
|
+
"email_archive_thread",
|
|
73
|
+
"drive_create",
|
|
74
|
+
"drive_copy",
|
|
75
|
+
"drive_create_folder",
|
|
76
|
+
"drive_upload",
|
|
77
|
+
"drive_share",
|
|
78
|
+
"drive_delete",
|
|
79
|
+
"drive_move",
|
|
80
|
+
"drive_rename",
|
|
81
|
+
"sheets_write_values",
|
|
82
|
+
"sheets_append_rows",
|
|
83
|
+
"sheets_create_spreadsheet",
|
|
84
|
+
"sheets_add_tab",
|
|
85
|
+
"sheets_clear_range",
|
|
86
|
+
"sheets_format_cells",
|
|
87
|
+
"sheets_batch_update",
|
|
88
|
+
"docs_replace_text",
|
|
89
|
+
"docs_batch_update",
|
|
90
|
+
"docs_create_tab",
|
|
91
|
+
"docs_write_tab",
|
|
92
|
+
"docs_insert_text"
|
|
93
|
+
]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HostedRemoteRolloutTier } from './types.js';
|
|
2
|
+
export declare const hostedRemoteRolloutTierByCanonicalToolName: Record<string, HostedRemoteRolloutTier>;
|
|
3
|
+
export declare function getHostedRemoteRolloutTier(canonicalToolName: string): HostedRemoteRolloutTier | null;
|
|
4
|
+
export declare function isHostedRemoteToolEnabled(args: {
|
|
5
|
+
canonicalToolName: string;
|
|
6
|
+
enabledTiers: ReadonlySet<HostedRemoteRolloutTier>;
|
|
7
|
+
}): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getHostedRemoteToolPolicy, hostedRemoteToolPolicyByCanonicalToolName, } from './hosted-tools.js';
|
|
2
|
+
export const hostedRemoteRolloutTierByCanonicalToolName = Object.fromEntries(Object.entries(hostedRemoteToolPolicyByCanonicalToolName).map(([toolName, policy]) => [
|
|
3
|
+
toolName,
|
|
4
|
+
policy.rolloutTier,
|
|
5
|
+
]));
|
|
6
|
+
export function getHostedRemoteRolloutTier(canonicalToolName) {
|
|
7
|
+
return getHostedRemoteToolPolicy(canonicalToolName)?.rolloutTier ?? null;
|
|
8
|
+
}
|
|
9
|
+
export function isHostedRemoteToolEnabled(args) {
|
|
10
|
+
const tier = getHostedRemoteRolloutTier(args.canonicalToolName);
|
|
11
|
+
return tier !== null && args.enabledTiers.has(tier);
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostedRemoteRolloutTier } from './types.js';
|
|
2
|
+
export interface HostedRemoteToolAccessPolicy {
|
|
3
|
+
requiredScopes: string[];
|
|
4
|
+
requiresUnsafeWrites: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface HostedRemoteToolPolicy extends HostedRemoteToolAccessPolicy {
|
|
7
|
+
rolloutTier: HostedRemoteRolloutTier;
|
|
8
|
+
}
|
|
9
|
+
export declare const hostedRemoteToolPolicyByCanonicalToolName: Record<string, HostedRemoteToolPolicy>;
|
|
10
|
+
export declare function getHostedRemoteToolPolicy(canonicalToolName: string): HostedRemoteToolPolicy | null;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
const READ_OBJECTS = {
|
|
2
|
+
requiredScopes: ['objects:read'],
|
|
3
|
+
requiresUnsafeWrites: false,
|
|
4
|
+
};
|
|
5
|
+
const WRITE_OBJECTS = {
|
|
6
|
+
requiredScopes: ['objects:write'],
|
|
7
|
+
requiresUnsafeWrites: true,
|
|
8
|
+
};
|
|
9
|
+
const READ_SYSTEMS = {
|
|
10
|
+
requiredScopes: ['systems:read'],
|
|
11
|
+
requiresUnsafeWrites: false,
|
|
12
|
+
};
|
|
13
|
+
const WRITE_SYSTEMS = {
|
|
14
|
+
requiredScopes: ['systems:write'],
|
|
15
|
+
requiresUnsafeWrites: false,
|
|
16
|
+
};
|
|
17
|
+
const READ_RECORDS = {
|
|
18
|
+
requiredScopes: ['records:read'],
|
|
19
|
+
requiresUnsafeWrites: false,
|
|
20
|
+
};
|
|
21
|
+
const WRITE_RECORDS = {
|
|
22
|
+
requiredScopes: ['records:write'],
|
|
23
|
+
requiresUnsafeWrites: true,
|
|
24
|
+
};
|
|
25
|
+
const READ_CALENDAR = {
|
|
26
|
+
requiredScopes: ['calendar:read'],
|
|
27
|
+
requiresUnsafeWrites: false,
|
|
28
|
+
};
|
|
29
|
+
const WRITE_CALENDAR = {
|
|
30
|
+
requiredScopes: ['calendar:write'],
|
|
31
|
+
requiresUnsafeWrites: true,
|
|
32
|
+
};
|
|
33
|
+
const READ_DRIVE = {
|
|
34
|
+
requiredScopes: ['drive:read'],
|
|
35
|
+
requiresUnsafeWrites: false,
|
|
36
|
+
};
|
|
37
|
+
const WRITE_DRIVE = {
|
|
38
|
+
requiredScopes: ['drive:write'],
|
|
39
|
+
requiresUnsafeWrites: true,
|
|
40
|
+
};
|
|
41
|
+
const READ_GOOGLE_CONTACTS = {
|
|
42
|
+
requiredScopes: ['google_contacts:read'],
|
|
43
|
+
requiresUnsafeWrites: false,
|
|
44
|
+
};
|
|
45
|
+
const READ_EMAIL = {
|
|
46
|
+
requiredScopes: ['email:read'],
|
|
47
|
+
requiresUnsafeWrites: false,
|
|
48
|
+
};
|
|
49
|
+
const WRITE_EMAIL = {
|
|
50
|
+
requiredScopes: ['email:write'],
|
|
51
|
+
requiresUnsafeWrites: true,
|
|
52
|
+
};
|
|
53
|
+
const SEND_EMAIL = {
|
|
54
|
+
requiredScopes: ['email:send'],
|
|
55
|
+
requiresUnsafeWrites: true,
|
|
56
|
+
};
|
|
57
|
+
function withTier(rolloutTier, policy) {
|
|
58
|
+
return {
|
|
59
|
+
rolloutTier,
|
|
60
|
+
...policy,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export const hostedRemoteToolPolicyByCanonicalToolName = {
|
|
64
|
+
platform_discover: withTier('foundation_live', READ_OBJECTS),
|
|
65
|
+
platform_capability_fulfillments_get: withTier('foundation_live', READ_OBJECTS),
|
|
66
|
+
platform_capability_fulfillments_update: withTier('hold_high_risk', WRITE_OBJECTS),
|
|
67
|
+
systems_templates_list: withTier('foundation_live', READ_OBJECTS),
|
|
68
|
+
systems_templates_get: withTier('foundation_live', READ_OBJECTS),
|
|
69
|
+
systems_template_deploy: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
70
|
+
systems_get: withTier('foundation_live', READ_OBJECTS),
|
|
71
|
+
systems_run_now: withTier('tranche_3_safe_writes', WRITE_OBJECTS),
|
|
72
|
+
systems_run_get: withTier('foundation_live', READ_OBJECTS),
|
|
73
|
+
systems_run_steps_get: withTier('foundation_live', READ_OBJECTS),
|
|
74
|
+
systems_run_events_get: withTier('foundation_live', READ_OBJECTS),
|
|
75
|
+
systems_update: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
76
|
+
systems_plan_patch: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
77
|
+
systems_apply_patch: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
78
|
+
systems_rollback: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
79
|
+
systems_form_get: withTier('foundation_live', READ_OBJECTS),
|
|
80
|
+
systems_form_submit: withTier('tranche_3_safe_writes', WRITE_OBJECTS),
|
|
81
|
+
systems_portal_get: withTier('foundation_live', READ_OBJECTS),
|
|
82
|
+
systems_queue_get: withTier('foundation_live', READ_OBJECTS),
|
|
83
|
+
systems_queue_list_items: withTier('foundation_live', READ_OBJECTS),
|
|
84
|
+
systems_queue_get_item: withTier('foundation_live', READ_OBJECTS),
|
|
85
|
+
systems_queue_claim: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
86
|
+
systems_queue_release: withTier('tranche_4_power_writes', WRITE_OBJECTS),
|
|
87
|
+
systems_queue_start_session: withTier('tranche_3_safe_writes', WRITE_OBJECTS),
|
|
88
|
+
systems_session_get: withTier('foundation_live', READ_OBJECTS),
|
|
89
|
+
systems_session_action_execute: withTier('tranche_3_safe_writes', WRITE_OBJECTS),
|
|
90
|
+
systems_session_close: withTier('tranche_3_safe_writes', WRITE_OBJECTS),
|
|
91
|
+
systems_hosted_chat_context_get: withTier('foundation_live', READ_SYSTEMS),
|
|
92
|
+
systems_propose_action_revision: withTier('tranche_3_safe_writes', WRITE_SYSTEMS),
|
|
93
|
+
asqend_propose_config_diff: withTier('tranche_3_safe_writes', WRITE_SYSTEMS),
|
|
94
|
+
systems_social_content_draft_capture: withTier('tranche_3_safe_writes', WRITE_SYSTEMS),
|
|
95
|
+
systems_social_content_draft_update: withTier('tranche_3_safe_writes', WRITE_SYSTEMS),
|
|
96
|
+
meetings_context_get: withTier('tranche_2_safe_reads', READ_RECORDS),
|
|
97
|
+
meetings_ingest_manual_source: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
98
|
+
meetings_propose_action_review: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
99
|
+
meetings_participant_identity_update: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
100
|
+
get_pending_work: withTier('foundation_live', WRITE_OBJECTS),
|
|
101
|
+
heartbeat: withTier('foundation_live', WRITE_OBJECTS),
|
|
102
|
+
complete_task: withTier('foundation_live', WRITE_OBJECTS),
|
|
103
|
+
fail_task: withTier('foundation_live', WRITE_OBJECTS),
|
|
104
|
+
records_get: withTier('tranche_2_safe_reads', READ_RECORDS),
|
|
105
|
+
records_list: withTier('tranche_2_safe_reads', READ_RECORDS),
|
|
106
|
+
records_lookup_exact: withTier('tranche_2_safe_reads', READ_RECORDS),
|
|
107
|
+
records_create: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
108
|
+
records_create_batch: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
109
|
+
records_upsert: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
110
|
+
records_update: withTier('tranche_3_safe_writes', WRITE_RECORDS),
|
|
111
|
+
records_delete: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
112
|
+
record_comments_create: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
113
|
+
record_comments_update: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
114
|
+
record_comments_delete: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
115
|
+
record_checklist_create: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
116
|
+
record_checklist_update: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
117
|
+
record_checklist_delete: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
118
|
+
record_attachments_delete: withTier('tranche_4_power_writes', WRITE_RECORDS),
|
|
119
|
+
calendar_get_event: withTier('tranche_2_safe_reads', READ_CALENDAR),
|
|
120
|
+
calendar_list_events: withTier('tranche_2_safe_reads', READ_CALENDAR),
|
|
121
|
+
calendar_list_range: withTier('tranche_2_safe_reads', READ_CALENDAR),
|
|
122
|
+
calendar_list_calendars: withTier('tranche_2_safe_reads', READ_CALENDAR),
|
|
123
|
+
calendar_freebusy: withTier('tranche_2_safe_reads', READ_CALENDAR),
|
|
124
|
+
calendar_create_event: withTier('tranche_3_safe_writes', WRITE_CALENDAR),
|
|
125
|
+
calendar_update_event: withTier('tranche_3_safe_writes', WRITE_CALENDAR),
|
|
126
|
+
drive_list: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
127
|
+
drive_read: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
128
|
+
drive_download: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
129
|
+
drive_create: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
130
|
+
drive_copy: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
131
|
+
drive_create_folder: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
132
|
+
drive_upload: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
133
|
+
drive_rename: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
134
|
+
drive_move: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
135
|
+
drive_share: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
136
|
+
drive_delete: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
137
|
+
sheets_read_values: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
138
|
+
sheets_list_tabs: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
139
|
+
sheets_write_values: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
140
|
+
sheets_append_rows: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
141
|
+
sheets_create_spreadsheet: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
142
|
+
sheets_add_tab: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
143
|
+
sheets_clear_range: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
144
|
+
sheets_format_cells: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
145
|
+
sheets_batch_update: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
146
|
+
docs_list_tabs: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
147
|
+
docs_read_tab: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
148
|
+
docs_get_text: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
149
|
+
docs_get_outline: withTier('tranche_2_safe_reads', READ_DRIVE),
|
|
150
|
+
docs_replace_text: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
151
|
+
docs_create_tab: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
152
|
+
docs_write_tab: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
153
|
+
docs_insert_text: withTier('tranche_3_safe_writes', WRITE_DRIVE),
|
|
154
|
+
docs_batch_update: withTier('tranche_4_power_writes', WRITE_DRIVE),
|
|
155
|
+
google_contacts_list: withTier('tranche_2_safe_reads', READ_GOOGLE_CONTACTS),
|
|
156
|
+
google_contacts_search: withTier('tranche_2_safe_reads', READ_GOOGLE_CONTACTS),
|
|
157
|
+
email_accounts_list: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
158
|
+
email_labels_list: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
159
|
+
email_search: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
160
|
+
email_thread_get: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
161
|
+
email_message_get: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
162
|
+
email_attachment_get: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
163
|
+
email_draft_list: withTier('tranche_2_safe_reads', READ_EMAIL),
|
|
164
|
+
email_compose: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
165
|
+
email_compose_with_attachment: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
166
|
+
email_reply_send: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
167
|
+
email_reply_with_attachment: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
168
|
+
email_forward: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
169
|
+
email_draft_send: withTier('tranche_3_safe_writes', SEND_EMAIL),
|
|
170
|
+
email_modify: withTier('tranche_3_safe_writes', WRITE_EMAIL),
|
|
171
|
+
email_draft_create: withTier('tranche_3_safe_writes', WRITE_EMAIL),
|
|
172
|
+
email_draft_delete: withTier('tranche_3_safe_writes', WRITE_EMAIL),
|
|
173
|
+
email_label_create: withTier('tranche_3_safe_writes', WRITE_EMAIL),
|
|
174
|
+
email_archive_thread: withTier('tranche_3_safe_writes', WRITE_EMAIL),
|
|
175
|
+
web_search: withTier('tranche_2_safe_reads', READ_OBJECTS),
|
|
176
|
+
web_fetch: withTier('tranche_2_safe_reads', READ_OBJECTS),
|
|
177
|
+
};
|
|
178
|
+
export function getHostedRemoteToolPolicy(canonicalToolName) {
|
|
179
|
+
return hostedRemoteToolPolicyByCanonicalToolName[canonicalToolName] ?? null;
|
|
180
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { generatedToolManifest } from './manifest.js';
|
|
2
|
+
export { generatedToolDefinitions } from './definitions.js';
|
|
3
|
+
export { generatedDispatch } from './dispatch.js';
|
|
4
|
+
export { generatedDefaultVisibleToolNames } from './visibility.js';
|
|
5
|
+
export { generatedWriteTools } from './write-set.js';
|
|
6
|
+
export { generatedFallbackTools } from './fallback-set.js';
|
|
7
|
+
export { generatedHostedBridgeConfig } from './hosted-bridge.js';
|
|
8
|
+
export { classifyGeneratedToolEndpointStatus, getGeneratedToolTransportSupport, generatedToolTransportSupportByName, } from './transport-support.js';
|
|
9
|
+
export { executeBatchExecuteOperations, parseBatchExecuteOperations, resolveBatchExecuteConcurrency, } from './batch-execute.js';
|
|
10
|
+
export type { BatchExecuteResult, BatchOperation, BatchOperationResult } from './batch-execute.js';
|
|
11
|
+
export { getHostedRemoteToolPolicy, hostedRemoteToolPolicyByCanonicalToolName, } from './hosted-tools.js';
|
|
12
|
+
export type { HostedRemoteToolAccessPolicy, HostedRemoteToolPolicy } from './hosted-tools.js';
|
|
13
|
+
export { getHostedRemoteRolloutTier, hostedRemoteRolloutTierByCanonicalToolName, isHostedRemoteToolEnabled, } from './hosted-rollout.js';
|
|
14
|
+
export type { GeneratedDispatchEntry, GeneratedHostedBridgeConfig, HostedRemoteRolloutTier, GeneratedToolEndpointHealthClass, GeneratedToolEndpointProbe, GeneratedToolEndpointStatus, GeneratedToolEndpointTransportClass, GeneratedToolDefinition, GeneratedToolTransportSupport, } from './types.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { generatedToolManifest } from './manifest.js';
|
|
2
|
+
export { generatedToolDefinitions } from './definitions.js';
|
|
3
|
+
export { generatedDispatch } from './dispatch.js';
|
|
4
|
+
export { generatedDefaultVisibleToolNames } from './visibility.js';
|
|
5
|
+
export { generatedWriteTools } from './write-set.js';
|
|
6
|
+
export { generatedFallbackTools } from './fallback-set.js';
|
|
7
|
+
export { generatedHostedBridgeConfig } from './hosted-bridge.js';
|
|
8
|
+
export { classifyGeneratedToolEndpointStatus, getGeneratedToolTransportSupport, generatedToolTransportSupportByName, } from './transport-support.js';
|
|
9
|
+
export { executeBatchExecuteOperations, parseBatchExecuteOperations, resolveBatchExecuteConcurrency, } from './batch-execute.js';
|
|
10
|
+
export { getHostedRemoteToolPolicy, hostedRemoteToolPolicyByCanonicalToolName, } from './hosted-tools.js';
|
|
11
|
+
export { getHostedRemoteRolloutTier, hostedRemoteRolloutTierByCanonicalToolName, isHostedRemoteToolEnabled, } from './hosted-rollout.js';
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GeneratedToolEndpointProbe, GeneratedToolEndpointStatus, GeneratedToolTransportSupport } from './types.js';
|
|
2
|
+
export declare const generatedToolTransportSupportByName: Record<string, GeneratedToolTransportSupport>;
|
|
3
|
+
export declare function getGeneratedToolTransportSupport(toolName: string): GeneratedToolTransportSupport | null;
|
|
4
|
+
export declare function classifyGeneratedToolEndpointStatus(args: {
|
|
5
|
+
toolName: string;
|
|
6
|
+
probe?: GeneratedToolEndpointProbe;
|
|
7
|
+
}): GeneratedToolEndpointStatus;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { generatedToolManifest } from './manifest.js';
|
|
2
|
+
function deriveGeneratedToolTransportSupport(toolName) {
|
|
3
|
+
const tool = generatedToolManifest.tools.find((entry) => entry.name === toolName);
|
|
4
|
+
if (!tool) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
const transportSupport = tool.transportSupport;
|
|
8
|
+
if (!transportSupport || typeof transportSupport !== 'object') {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
const candidate = transportSupport;
|
|
12
|
+
if (typeof candidate.localStdio !== 'boolean' ||
|
|
13
|
+
typeof candidate.hostedRemote !== 'boolean' ||
|
|
14
|
+
typeof candidate.capabilityHttp !== 'boolean' ||
|
|
15
|
+
typeof candidate.localOnly !== 'boolean' ||
|
|
16
|
+
typeof candidate.remoteOnly !== 'boolean') {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
localStdio: candidate.localStdio,
|
|
21
|
+
hostedRemote: candidate.hostedRemote,
|
|
22
|
+
capabilityHttp: candidate.capabilityHttp,
|
|
23
|
+
localOnly: candidate.localOnly,
|
|
24
|
+
remoteOnly: candidate.remoteOnly,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export const generatedToolTransportSupportByName = Object.fromEntries(generatedToolManifest.tools
|
|
28
|
+
.map((tool) => [tool.name, deriveGeneratedToolTransportSupport(tool.name)])
|
|
29
|
+
.filter((entry) => entry[1] !== null));
|
|
30
|
+
export function getGeneratedToolTransportSupport(toolName) {
|
|
31
|
+
return generatedToolTransportSupportByName[toolName] ?? null;
|
|
32
|
+
}
|
|
33
|
+
function getGeneratedManifestTool(toolName) {
|
|
34
|
+
return generatedToolManifest.tools.find((entry) => entry.name === toolName) ?? null;
|
|
35
|
+
}
|
|
36
|
+
function classifyTransport(support) {
|
|
37
|
+
if (!support) {
|
|
38
|
+
return 'unsupported_transport';
|
|
39
|
+
}
|
|
40
|
+
if (support.capabilityHttp) {
|
|
41
|
+
return 'capability_http';
|
|
42
|
+
}
|
|
43
|
+
if (support.hostedRemote) {
|
|
44
|
+
return 'hosted_remote_mcp_compatibility';
|
|
45
|
+
}
|
|
46
|
+
if (support.localOnly || support.localStdio) {
|
|
47
|
+
return 'local_stdio_only';
|
|
48
|
+
}
|
|
49
|
+
return 'unsupported_transport';
|
|
50
|
+
}
|
|
51
|
+
function defaultNonHttpReason(transportClass) {
|
|
52
|
+
switch (transportClass) {
|
|
53
|
+
case 'hosted_remote_mcp_compatibility':
|
|
54
|
+
return 'Tool is available as hosted remote MCP compatibility, not as hosted capability HTTP.';
|
|
55
|
+
case 'local_stdio_only':
|
|
56
|
+
return 'Tool is local stdio only and is not available over hosted capability HTTP.';
|
|
57
|
+
case 'unsupported_transport':
|
|
58
|
+
return 'Tool has no supported generated transport.';
|
|
59
|
+
case 'capability_http':
|
|
60
|
+
return 'Tool has a generated hosted capability HTTP route.';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function statusFromProbe(args) {
|
|
64
|
+
if (args.transportClass !== 'capability_http') {
|
|
65
|
+
return {
|
|
66
|
+
healthClass: 'not_capability_http',
|
|
67
|
+
statusLabel: args.transportClass === 'hosted_remote_mcp_compatibility'
|
|
68
|
+
? 'Hosted remote MCP'
|
|
69
|
+
: args.transportClass === 'local_stdio_only'
|
|
70
|
+
? 'Local stdio only'
|
|
71
|
+
: 'Unsupported transport',
|
|
72
|
+
reason: args.probe?.reason ?? defaultNonHttpReason(args.transportClass),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
switch (args.probe?.kind) {
|
|
76
|
+
case 'http_success':
|
|
77
|
+
return {
|
|
78
|
+
healthClass: 'works',
|
|
79
|
+
statusLabel: 'Works',
|
|
80
|
+
reason: args.probe.reason ?? `Hosted capability HTTP route ${args.routePath} returned OK.`,
|
|
81
|
+
};
|
|
82
|
+
case 'http_error':
|
|
83
|
+
return {
|
|
84
|
+
healthClass: 'doesnt_work',
|
|
85
|
+
statusLabel: "Doesn't work",
|
|
86
|
+
reason: args.probe.reason ??
|
|
87
|
+
`Hosted capability HTTP route ${args.routePath} returned HTTP ${args.probe.httpStatus}.`,
|
|
88
|
+
};
|
|
89
|
+
case 'capability_fulfillment_disabled':
|
|
90
|
+
return {
|
|
91
|
+
healthClass: 'requires_fulfillment',
|
|
92
|
+
statusLabel: 'Requires fulfillment',
|
|
93
|
+
reason: args.probe.reason ??
|
|
94
|
+
`Hosted capability HTTP route ${args.routePath} is available but requires enabled capability fulfillment.`,
|
|
95
|
+
};
|
|
96
|
+
case 'fixture_required':
|
|
97
|
+
return {
|
|
98
|
+
healthClass: 'fixture_required',
|
|
99
|
+
statusLabel: 'Fixture required',
|
|
100
|
+
reason: args.probe.reason ??
|
|
101
|
+
`Hosted capability HTTP route ${args.routePath} exists but needs a safe fixture for full proof.`,
|
|
102
|
+
};
|
|
103
|
+
case 'not_exercised':
|
|
104
|
+
case undefined:
|
|
105
|
+
return {
|
|
106
|
+
healthClass: 'half_works',
|
|
107
|
+
statusLabel: 'Half works',
|
|
108
|
+
reason: args.probe?.reason ??
|
|
109
|
+
`Hosted capability HTTP route ${args.routePath} exists but was not fully exercised.`,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export function classifyGeneratedToolEndpointStatus(args) {
|
|
114
|
+
const tool = getGeneratedManifestTool(args.toolName);
|
|
115
|
+
if (!tool) {
|
|
116
|
+
return {
|
|
117
|
+
toolName: args.toolName,
|
|
118
|
+
routePath: null,
|
|
119
|
+
transportClass: 'unsupported_transport',
|
|
120
|
+
healthClass: 'unknown_tool',
|
|
121
|
+
statusLabel: 'Unknown tool',
|
|
122
|
+
reason: 'Tool is not present in the generated MCP manifest.',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const support = getGeneratedToolTransportSupport(args.toolName);
|
|
126
|
+
const transportClass = classifyTransport(support);
|
|
127
|
+
const routePath = typeof tool.routePath === 'string' ? tool.routePath : null;
|
|
128
|
+
const status = statusFromProbe({
|
|
129
|
+
routePath,
|
|
130
|
+
transportClass,
|
|
131
|
+
probe: args.probe,
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
toolName: args.toolName,
|
|
135
|
+
routePath,
|
|
136
|
+
transportClass,
|
|
137
|
+
...status,
|
|
138
|
+
};
|
|
139
|
+
}
|