portercode 0.1.1 → 0.1.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/LICENSE +93 -63
- package/dist/config/config.d.ts +40 -40
- package/dist/index.js +1 -1
- package/dist/prompt/index.d.ts +1 -1
- package/dist/prompt/system.d.ts +6 -1
- package/dist/server/index.d.ts +21 -0
- package/dist/server/routes/api.d.ts +2 -0
- package/dist/server/routes/events.d.ts +2 -0
- package/dist/server/routes/health.d.ts +2 -0
- package/dist/server/routes/sessions.d.ts +2 -0
- package/dist/server/services/agent.d.ts +29 -0
- package/dist/server/services/permission.d.ts +43 -0
- package/dist/server/sse/emitter.d.ts +57 -0
- package/dist/session/index.d.ts +1 -0
- package/dist/session/llm.d.ts +2 -0
- package/dist/session/session.d.ts +33 -1
- package/dist/session/title-generator.d.ts +11 -0
- package/dist/session/types.d.ts +93 -0
- package/dist/tool/image.d.ts +2 -2
- package/package.json +3 -2
package/LICENSE
CHANGED
|
@@ -1,121 +1,151 @@
|
|
|
1
|
-
PROPRIETARY SOFTWARE LICENSE
|
|
2
|
-
|
|
1
|
+
PROPRIETARY SOFTWARE LICENSE WITH SHARED RIGHTS
|
|
2
|
+
================================================
|
|
3
3
|
|
|
4
|
-
Copyright (c) 2025
|
|
4
|
+
Copyright (c) 2025 Carlos Alexis Gomez Ruiz
|
|
5
5
|
All Rights Reserved.
|
|
6
6
|
|
|
7
|
-
Author: Carlos Alexis Gomez Ruiz <alexis@portermetrics.com>
|
|
8
|
-
|
|
9
7
|
--------------------------------------------------------------------------------
|
|
10
|
-
1. OWNERSHIP AND
|
|
8
|
+
1. OWNERSHIP AND COPYRIGHT
|
|
11
9
|
--------------------------------------------------------------------------------
|
|
12
10
|
|
|
13
11
|
This software and associated documentation files (the "Software") are the
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Porter Metrics Inc.
|
|
12
|
+
original creation and exclusive intellectual property of Carlos Alexis Gomez
|
|
13
|
+
Ruiz (hereinafter "the Author"). All copyrights, patents, trade secrets,
|
|
14
|
+
trademarks, and other intellectual property rights in and to the Software
|
|
15
|
+
are and shall remain the exclusive property of the Author.
|
|
19
16
|
|
|
20
17
|
--------------------------------------------------------------------------------
|
|
21
|
-
2. LICENSE
|
|
18
|
+
2. NON-EXCLUSIVE LICENSE GRANT TO PORTER METRICS INC.
|
|
22
19
|
--------------------------------------------------------------------------------
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
The Author hereby grants to Porter Metrics Inc. a NON-EXCLUSIVE, worldwide,
|
|
22
|
+
perpetual license to:
|
|
25
23
|
|
|
26
|
-
a)
|
|
27
|
-
b) Modify, adapt, translate,
|
|
28
|
-
c) Distribute, sublicense, lease, rent, loan,
|
|
29
|
-
d)
|
|
30
|
-
e)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
a) Use, copy, reproduce, and duplicate the Software
|
|
25
|
+
b) Modify, adapt, translate, and create derivative works based on the Software
|
|
26
|
+
c) Distribute, sublicense, lease, rent, loan, and transfer the Software
|
|
27
|
+
d) Commercially exploit and monetize the Software
|
|
28
|
+
e) Integrate the Software into other products and services
|
|
29
|
+
|
|
30
|
+
This license grant is NON-EXCLUSIVE, meaning:
|
|
31
|
+
|
|
32
|
+
- The Author retains ALL rights to the Software without any limitations
|
|
33
|
+
- The Author may use, modify, distribute, license, sell, or otherwise
|
|
34
|
+
exploit the Software in any manner, at any time, without restriction
|
|
35
|
+
- The Author may grant similar or different licenses to other parties
|
|
36
|
+
- Porter Metrics Inc. does not acquire any ownership rights over the Software
|
|
34
37
|
|
|
35
38
|
--------------------------------------------------------------------------------
|
|
36
|
-
3.
|
|
39
|
+
3. AUTHOR'S RESERVED RIGHTS
|
|
37
40
|
--------------------------------------------------------------------------------
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
The Author expressly reserves the following unlimited rights:
|
|
40
43
|
|
|
41
|
-
a)
|
|
42
|
-
|
|
44
|
+
a) To use, modify, and exploit the Software in any form, for any purpose,
|
|
45
|
+
commercial or non-commercial, without any obligation to Porter Metrics Inc.
|
|
43
46
|
|
|
44
|
-
b)
|
|
45
|
-
Confidential Information to any third party without prior written consent.
|
|
47
|
+
b) To license the Software to any third party under any terms
|
|
46
48
|
|
|
47
|
-
c)
|
|
48
|
-
and shall take all reasonable measures to protect its confidentiality.
|
|
49
|
+
c) To create, publish, and distribute any derivative works
|
|
49
50
|
|
|
50
|
-
d)
|
|
51
|
-
promptly return or destroy all copies of Confidential Information.
|
|
51
|
+
d) To incorporate the Software into other projects without restriction
|
|
52
52
|
|
|
53
|
-
e)
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
e) To revoke or modify third-party licenses (excluding the license granted
|
|
54
|
+
to Porter Metrics Inc.) at the Author's discretion
|
|
55
|
+
|
|
56
|
+
--------------------------------------------------------------------------------
|
|
57
|
+
4. DERIVATIVE WORKS AND MODIFICATIONS
|
|
58
|
+
--------------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
Any modifications, enhancements, derivative works, or contributions made to
|
|
61
|
+
the Software by any person or entity authorized by the Author (including but
|
|
62
|
+
not limited to Porter Metrics Inc., employees, contractors, or collaborators)
|
|
63
|
+
shall be subject to the following terms:
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
a) All derivative works and modifications are and shall remain the property
|
|
66
|
+
of Carlos Alexis Gomez Ruiz by virtue of the original copyright.
|
|
67
|
+
|
|
68
|
+
b) Any authorized party making modifications to the Software MUST deliver
|
|
69
|
+
and transfer all such modifications, including source code, documentation,
|
|
70
|
+
and related materials, to the Author upon the Author's request.
|
|
71
|
+
|
|
72
|
+
c) The Author shall have unlimited rights to use, modify, license, or
|
|
73
|
+
otherwise exploit any and all derivative works and modifications.
|
|
74
|
+
|
|
75
|
+
d) Authorized parties retain no exclusive rights over their modifications;
|
|
76
|
+
any rights granted to them are subject to the Author's superior ownership.
|
|
77
|
+
|
|
78
|
+
e) This obligation to deliver modifications survives the termination of
|
|
79
|
+
any authorization or license agreement.
|
|
60
80
|
|
|
61
81
|
--------------------------------------------------------------------------------
|
|
62
|
-
|
|
82
|
+
5. RESTRICTIONS FOR UNAUTHORIZED PARTIES
|
|
63
83
|
--------------------------------------------------------------------------------
|
|
64
84
|
|
|
65
|
-
|
|
85
|
+
Unless expressly authorized in writing by the Author, unauthorized parties
|
|
86
|
+
may NOT:
|
|
66
87
|
|
|
67
|
-
a)
|
|
68
|
-
|
|
88
|
+
a) Copy, reproduce, or duplicate the Software or any portion thereof
|
|
89
|
+
b) Modify, adapt, translate, or create derivative works based on the Software
|
|
90
|
+
c) Distribute, sublicense, lease, rent, loan, or transfer the Software
|
|
91
|
+
d) Reverse engineer, disassemble, decompile, or attempt to derive source code
|
|
92
|
+
e) Remove, alter, or obscure any proprietary notices on the Software
|
|
93
|
+
f) Use the Software for any unlawful purpose
|
|
94
|
+
g) Use the Software to develop competing products or services
|
|
69
95
|
|
|
70
|
-
|
|
71
|
-
|
|
96
|
+
--------------------------------------------------------------------------------
|
|
97
|
+
6. CONFIDENTIALITY
|
|
98
|
+
--------------------------------------------------------------------------------
|
|
72
99
|
|
|
73
|
-
|
|
74
|
-
policies when using the Software.
|
|
100
|
+
All parties with access to the Software acknowledge and agree that:
|
|
75
101
|
|
|
76
|
-
|
|
102
|
+
a) The Software, including its source code, architecture, algorithms, and
|
|
103
|
+
documentation, constitutes Confidential Information of the Author.
|
|
77
104
|
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
b) Confidential Information shall not be disclosed to any unauthorized
|
|
106
|
+
third party without prior written consent from the Author.
|
|
80
107
|
|
|
81
|
-
|
|
82
|
-
|
|
108
|
+
c) This confidentiality obligation shall survive termination and remain in
|
|
109
|
+
effect indefinitely for trade secrets and for five (5) years for other
|
|
110
|
+
Confidential Information.
|
|
83
111
|
|
|
84
112
|
--------------------------------------------------------------------------------
|
|
85
|
-
|
|
113
|
+
7. DISCLAIMER OF WARRANTIES
|
|
86
114
|
--------------------------------------------------------------------------------
|
|
87
115
|
|
|
88
116
|
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
89
117
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
90
|
-
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
91
|
-
|
|
118
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. THE AUTHOR DOES NOT
|
|
119
|
+
WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
92
120
|
|
|
93
121
|
--------------------------------------------------------------------------------
|
|
94
|
-
|
|
122
|
+
8. LIMITATION OF LIABILITY
|
|
95
123
|
--------------------------------------------------------------------------------
|
|
96
124
|
|
|
97
|
-
IN NO EVENT SHALL
|
|
98
|
-
OR
|
|
99
|
-
OR
|
|
100
|
-
OR
|
|
125
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
|
126
|
+
CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
127
|
+
PROFITS, DATA, OR USE, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE
|
|
128
|
+
OR THE SOFTWARE.
|
|
101
129
|
|
|
102
130
|
--------------------------------------------------------------------------------
|
|
103
|
-
|
|
131
|
+
9. GOVERNING LAW AND JURISDICTION
|
|
104
132
|
--------------------------------------------------------------------------------
|
|
105
133
|
|
|
106
134
|
This License shall be governed by and construed in accordance with the laws
|
|
107
135
|
of the State of Delaware, United States of America, without regard to conflict
|
|
108
136
|
of law principles. Any disputes arising under this License shall be resolved
|
|
109
|
-
exclusively in the state or federal courts located in Delaware
|
|
110
|
-
consents to the personal jurisdiction of such courts.
|
|
137
|
+
exclusively in the state or federal courts located in Delaware.
|
|
111
138
|
|
|
112
139
|
--------------------------------------------------------------------------------
|
|
113
|
-
|
|
140
|
+
10. CONTACT INFORMATION
|
|
114
141
|
--------------------------------------------------------------------------------
|
|
115
142
|
|
|
116
143
|
For licensing inquiries, permissions, or to report violations:
|
|
117
144
|
|
|
118
|
-
|
|
145
|
+
Carlos Alexis Gomez Ruiz
|
|
146
|
+
Email: alexisg.0207@gmail.com
|
|
147
|
+
|
|
148
|
+
Porter Metrics Inc. (Authorized Licensee)
|
|
119
149
|
Email: alexis@portermetrics.com
|
|
120
150
|
|
|
121
151
|
================================================================================
|
package/dist/config/config.d.ts
CHANGED
|
@@ -21,14 +21,6 @@ export declare namespace Config {
|
|
|
21
21
|
externalDirectory?: "ask" | "allow" | "deny" | undefined;
|
|
22
22
|
} | undefined;
|
|
23
23
|
model?: string | undefined;
|
|
24
|
-
command?: Record<string, {
|
|
25
|
-
template: string;
|
|
26
|
-
model?: string | undefined;
|
|
27
|
-
description?: string | undefined;
|
|
28
|
-
agent?: string | undefined;
|
|
29
|
-
subtask?: boolean | undefined;
|
|
30
|
-
}> | undefined;
|
|
31
|
-
tools?: Record<string, boolean> | undefined;
|
|
32
24
|
$schema?: string | undefined;
|
|
33
25
|
theme?: string | undefined;
|
|
34
26
|
logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR" | undefined;
|
|
@@ -689,6 +681,13 @@ export declare namespace Config {
|
|
|
689
681
|
webfetch?: "ask" | "allow" | "deny" | undefined;
|
|
690
682
|
}>>;
|
|
691
683
|
}, z.ZodAny, "strip">>, "strip"> | undefined;
|
|
684
|
+
command?: Record<string, {
|
|
685
|
+
template: string;
|
|
686
|
+
model?: string | undefined;
|
|
687
|
+
description?: string | undefined;
|
|
688
|
+
agent?: string | undefined;
|
|
689
|
+
subtask?: boolean | undefined;
|
|
690
|
+
}> | undefined;
|
|
692
691
|
plugin?: string[] | undefined;
|
|
693
692
|
snapshot?: boolean | undefined;
|
|
694
693
|
disabled_providers?: string[] | undefined;
|
|
@@ -696,6 +695,7 @@ export declare namespace Config {
|
|
|
696
695
|
small_model?: string | undefined;
|
|
697
696
|
default_agent?: string | undefined;
|
|
698
697
|
username?: string | undefined;
|
|
698
|
+
tools?: Record<string, boolean> | undefined;
|
|
699
699
|
contextOptimization?: {
|
|
700
700
|
auto?: boolean | undefined;
|
|
701
701
|
prune?: boolean | undefined;
|
|
@@ -3072,14 +3072,6 @@ export declare namespace Config {
|
|
|
3072
3072
|
externalDirectory?: "ask" | "allow" | "deny" | undefined;
|
|
3073
3073
|
} | undefined;
|
|
3074
3074
|
model?: string | undefined;
|
|
3075
|
-
command?: Record<string, {
|
|
3076
|
-
template: string;
|
|
3077
|
-
model?: string | undefined;
|
|
3078
|
-
description?: string | undefined;
|
|
3079
|
-
agent?: string | undefined;
|
|
3080
|
-
subtask?: boolean | undefined;
|
|
3081
|
-
}> | undefined;
|
|
3082
|
-
tools?: Record<string, boolean> | undefined;
|
|
3083
3075
|
$schema?: string | undefined;
|
|
3084
3076
|
theme?: string | undefined;
|
|
3085
3077
|
logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR" | undefined;
|
|
@@ -3740,6 +3732,13 @@ export declare namespace Config {
|
|
|
3740
3732
|
webfetch?: "ask" | "allow" | "deny" | undefined;
|
|
3741
3733
|
}>>;
|
|
3742
3734
|
}, z.ZodAny, "strip">>, "strip"> | undefined;
|
|
3735
|
+
command?: Record<string, {
|
|
3736
|
+
template: string;
|
|
3737
|
+
model?: string | undefined;
|
|
3738
|
+
description?: string | undefined;
|
|
3739
|
+
agent?: string | undefined;
|
|
3740
|
+
subtask?: boolean | undefined;
|
|
3741
|
+
}> | undefined;
|
|
3743
3742
|
plugin?: string[] | undefined;
|
|
3744
3743
|
snapshot?: boolean | undefined;
|
|
3745
3744
|
disabled_providers?: string[] | undefined;
|
|
@@ -3747,6 +3746,7 @@ export declare namespace Config {
|
|
|
3747
3746
|
small_model?: string | undefined;
|
|
3748
3747
|
default_agent?: string | undefined;
|
|
3749
3748
|
username?: string | undefined;
|
|
3749
|
+
tools?: Record<string, boolean> | undefined;
|
|
3750
3750
|
contextOptimization?: {
|
|
3751
3751
|
auto?: boolean | undefined;
|
|
3752
3752
|
prune?: boolean | undefined;
|
|
@@ -3788,14 +3788,6 @@ export declare namespace Config {
|
|
|
3788
3788
|
externalDirectory?: "ask" | "allow" | "deny" | undefined;
|
|
3789
3789
|
} | undefined;
|
|
3790
3790
|
model?: string | undefined;
|
|
3791
|
-
command?: Record<string, {
|
|
3792
|
-
template: string;
|
|
3793
|
-
model?: string | undefined;
|
|
3794
|
-
description?: string | undefined;
|
|
3795
|
-
agent?: string | undefined;
|
|
3796
|
-
subtask?: boolean | undefined;
|
|
3797
|
-
}> | undefined;
|
|
3798
|
-
tools?: Record<string, boolean> | undefined;
|
|
3799
3791
|
$schema?: string | undefined;
|
|
3800
3792
|
theme?: string | undefined;
|
|
3801
3793
|
logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR" | undefined;
|
|
@@ -4456,6 +4448,13 @@ export declare namespace Config {
|
|
|
4456
4448
|
webfetch?: "ask" | "allow" | "deny" | undefined;
|
|
4457
4449
|
}>>;
|
|
4458
4450
|
}, z.ZodAny, "strip">>, "strip"> | undefined;
|
|
4451
|
+
command?: Record<string, {
|
|
4452
|
+
template: string;
|
|
4453
|
+
model?: string | undefined;
|
|
4454
|
+
description?: string | undefined;
|
|
4455
|
+
agent?: string | undefined;
|
|
4456
|
+
subtask?: boolean | undefined;
|
|
4457
|
+
}> | undefined;
|
|
4459
4458
|
plugin?: string[] | undefined;
|
|
4460
4459
|
snapshot?: boolean | undefined;
|
|
4461
4460
|
disabled_providers?: string[] | undefined;
|
|
@@ -4463,6 +4462,7 @@ export declare namespace Config {
|
|
|
4463
4462
|
small_model?: string | undefined;
|
|
4464
4463
|
default_agent?: string | undefined;
|
|
4465
4464
|
username?: string | undefined;
|
|
4465
|
+
tools?: Record<string, boolean> | undefined;
|
|
4466
4466
|
contextOptimization?: {
|
|
4467
4467
|
auto?: boolean | undefined;
|
|
4468
4468
|
prune?: boolean | undefined;
|
|
@@ -4506,14 +4506,6 @@ export declare namespace Config {
|
|
|
4506
4506
|
externalDirectory?: "ask" | "allow" | "deny" | undefined;
|
|
4507
4507
|
} | undefined;
|
|
4508
4508
|
model?: string | undefined;
|
|
4509
|
-
command?: Record<string, {
|
|
4510
|
-
template: string;
|
|
4511
|
-
model?: string | undefined;
|
|
4512
|
-
description?: string | undefined;
|
|
4513
|
-
agent?: string | undefined;
|
|
4514
|
-
subtask?: boolean | undefined;
|
|
4515
|
-
}> | undefined;
|
|
4516
|
-
tools?: Record<string, boolean> | undefined;
|
|
4517
4509
|
$schema?: string | undefined;
|
|
4518
4510
|
theme?: string | undefined;
|
|
4519
4511
|
logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR" | undefined;
|
|
@@ -5174,6 +5166,13 @@ export declare namespace Config {
|
|
|
5174
5166
|
webfetch?: "ask" | "allow" | "deny" | undefined;
|
|
5175
5167
|
}>>;
|
|
5176
5168
|
}, z.ZodAny, "strip">>, "strip"> | undefined;
|
|
5169
|
+
command?: Record<string, {
|
|
5170
|
+
template: string;
|
|
5171
|
+
model?: string | undefined;
|
|
5172
|
+
description?: string | undefined;
|
|
5173
|
+
agent?: string | undefined;
|
|
5174
|
+
subtask?: boolean | undefined;
|
|
5175
|
+
}> | undefined;
|
|
5177
5176
|
plugin?: string[] | undefined;
|
|
5178
5177
|
snapshot?: boolean | undefined;
|
|
5179
5178
|
disabled_providers?: string[] | undefined;
|
|
@@ -5181,6 +5180,7 @@ export declare namespace Config {
|
|
|
5181
5180
|
small_model?: string | undefined;
|
|
5182
5181
|
default_agent?: string | undefined;
|
|
5183
5182
|
username?: string | undefined;
|
|
5183
|
+
tools?: Record<string, boolean> | undefined;
|
|
5184
5184
|
contextOptimization?: {
|
|
5185
5185
|
auto?: boolean | undefined;
|
|
5186
5186
|
prune?: boolean | undefined;
|
|
@@ -6055,14 +6055,6 @@ export declare namespace Config {
|
|
|
6055
6055
|
externalDirectory?: "ask" | "allow" | "deny" | undefined;
|
|
6056
6056
|
} | undefined;
|
|
6057
6057
|
model?: string | undefined;
|
|
6058
|
-
command?: Record<string, {
|
|
6059
|
-
template: string;
|
|
6060
|
-
model?: string | undefined;
|
|
6061
|
-
description?: string | undefined;
|
|
6062
|
-
agent?: string | undefined;
|
|
6063
|
-
subtask?: boolean | undefined;
|
|
6064
|
-
}> | undefined;
|
|
6065
|
-
tools?: Record<string, boolean> | undefined;
|
|
6066
6058
|
$schema?: string | undefined;
|
|
6067
6059
|
theme?: string | undefined;
|
|
6068
6060
|
logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR" | undefined;
|
|
@@ -6723,6 +6715,13 @@ export declare namespace Config {
|
|
|
6723
6715
|
webfetch?: "ask" | "allow" | "deny" | undefined;
|
|
6724
6716
|
}>>;
|
|
6725
6717
|
}, z.ZodAny, "strip">>, "strip"> | undefined;
|
|
6718
|
+
command?: Record<string, {
|
|
6719
|
+
template: string;
|
|
6720
|
+
model?: string | undefined;
|
|
6721
|
+
description?: string | undefined;
|
|
6722
|
+
agent?: string | undefined;
|
|
6723
|
+
subtask?: boolean | undefined;
|
|
6724
|
+
}> | undefined;
|
|
6726
6725
|
plugin?: string[] | undefined;
|
|
6727
6726
|
snapshot?: boolean | undefined;
|
|
6728
6727
|
disabled_providers?: string[] | undefined;
|
|
@@ -6730,6 +6729,7 @@ export declare namespace Config {
|
|
|
6730
6729
|
small_model?: string | undefined;
|
|
6731
6730
|
default_agent?: string | undefined;
|
|
6732
6731
|
username?: string | undefined;
|
|
6732
|
+
tools?: Record<string, boolean> | undefined;
|
|
6733
6733
|
contextOptimization?: {
|
|
6734
6734
|
auto?: boolean | undefined;
|
|
6735
6735
|
prune?: boolean | undefined;
|